{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "image": {
      "properties": {
        "alt": {
          "description": "Alt text describing the photo.",
          "maxGraphemes": 1000,
          "maxLength": 10000,
          "type": "string"
        },
        "aspectRatio": {
          "ref": "app.bsky.embed.defs#aspectRatio",
          "type": "ref"
        },
        "image": {
          "accept": [
            "image/*"
          ],
          "description": "The view: a WebP of the photo as uploaded, under 1,000,000 bytes.",
          "maxSize": 1000000,
          "type": "blob"
        }
      },
      "required": [
        "image",
        "alt"
      ],
      "type": "object"
    },
    "main": {
      "description": "What a member thought of something, with a rating from 1 to 10, in a content space (D99). Members respond by replying to it, so a review heads a thread. The author edits it, rating included, by rewriting it at the same key; it sorts by createdAt, so an edit keeps its place.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "description": "When it was written; it sorts by this, so an edit keeps its place.",
            "format": "datetime",
            "type": "string"
          },
          "facets": {
            "description": "Annotations of text (mentions, URLs, hashtags, etc).",
            "items": {
              "ref": "app.bsky.richtext.facet",
              "type": "ref"
            },
            "type": "array"
          },
          "images": {
            "description": "In the order shown. The thumbnails and originals behind them are a us.off-the-clock.embed.imageSet under the review's record key (D70).",
            "items": {
              "ref": "#image",
              "type": "ref"
            },
            "maxLength": 10,
            "type": "array"
          },
          "labels": {
            "description": "The author's own labels: spoiler and a content rating.",
            "refs": [
              "com.atproto.label.defs#selfLabels"
            ],
            "type": "union"
          },
          "links": {
            "description": "Pages about what is reviewed, each an http or https URI.",
            "items": {
              "format": "uri",
              "maxLength": 3000,
              "type": "string"
            },
            "maxLength": 5,
            "type": "array"
          },
          "locations": {
            "description": "The places the review is about, as an event names its locations: an address, and a geo named like it when its coordinates are known.",
            "items": {
              "refs": [
                "community.lexicon.location.address",
                "community.lexicon.location.fsq",
                "community.lexicon.location.geo",
                "community.lexicon.location.hthree"
              ],
              "type": "union"
            },
            "maxLength": 10,
            "type": "array"
          },
          "rating": {
            "description": "The score out of 10.",
            "maximum": 10,
            "minimum": 1,
            "type": "integer"
          },
          "subject": {
            "description": "What is reviewed, as free text: a place, a film, an episode.",
            "maxGraphemes": 100,
            "maxLength": 1000,
            "minGraphemes": 1,
            "minLength": 1,
            "type": "string"
          },
          "text": {
            "description": "The review itself.",
            "maxGraphemes": 3000,
            "maxLength": 30000,
            "minGraphemes": 1,
            "minLength": 1,
            "type": "string"
          },
          "title": {
            "maxGraphemes": 100,
            "maxLength": 1000,
            "minGraphemes": 1,
            "minLength": 1,
            "type": "string"
          },
          "updatedAt": {
            "description": "When it was last edited.",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "subject",
          "rating",
          "title",
          "text",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "us.off-the-clock.review",
  "lexicon": 1
}
