{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "aspectRatio": {
      "properties": {
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "type": "object"
    },
    "main": {
      "description": "One photo or video in the author's media library (My media): uploaded, not yet part of a post. Lives on the author's own PDS and keeps its blob referenced until it is posted or deleted. Carries what was read from the file at upload — camera data and colours — and nothing a post decides (caption, location, categories). NOT PRIVATE: like every repo record it is publicly readable. Deliberately absent from the AppView's lexicons and firehose collections, so it is never indexed as content.",
      "key": "tid",
      "record": {
        "properties": {
          "aspectRatio": {
            "ref": "#aspectRatio",
            "type": "ref"
          },
          "blob": {
            "accept": [
              "image/*",
              "video/*"
            ],
            "description": "The file as it will be posted: a photo already compressed to the PDS's image limits, or the video Bluesky's video service stored.",
            "maxSize": 100000000,
            "type": "blob"
          },
          "colors": {
            "description": "Colour tags, as app.zeens.postMeta's colors.",
            "items": {
              "type": "string"
            },
            "maxLength": 12,
            "type": "array"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "exif": {
            "description": "Camera data in app.zeens.postMeta#exif's shape. Never a location.",
            "type": "unknown"
          },
          "kind": {
            "knownValues": [
              "image",
              "video"
            ],
            "type": "string"
          },
          "monochrome": {
            "type": "boolean"
          },
          "name": {
            "description": "The file's name on the author's device, so they can tell their uploads apart.",
            "maxLength": 300,
            "type": "string"
          },
          "palette": {
            "description": "Hex swatches, as app.zeens.postMeta's palette.",
            "items": {
              "type": "string"
            },
            "maxLength": 12,
            "type": "array"
          },
          "paletteShares": {
            "description": "Each swatch's share of the frame, as app.zeens.postMeta's paletteShares.",
            "items": {
              "type": "integer"
            },
            "maxLength": 12,
            "type": "array"
          },
          "post": {
            "description": "The post this was published (or scheduled) in. Absent while unpublished.",
            "format": "at-uri",
            "type": "string"
          },
          "postedAt": {
            "description": "When the post goes out: now, or a scheduled post's publishAt.",
            "format": "datetime",
            "type": "string"
          },
          "seconds": {
            "description": "A video's length, rounded.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "blob",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.zeens.media",
  "lexicon": 1
}
