{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "dayWindow": {
      "properties": {
        "end": {
          "maxLength": 5,
          "type": "string"
        },
        "start": {
          "maxLength": 5,
          "type": "string"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    },
    "interval": {
      "properties": {
        "end": {
          "format": "datetime",
          "type": "string"
        },
        "start": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "start",
        "end"
      ],
      "type": "object"
    },
    "main": {
      "description": "An availability poll: date range, daily window, granularity.",
      "key": "tid",
      "record": {
        "properties": {
          "closesAt": {
            "format": "datetime",
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxGraphemes": 2000,
            "maxLength": 8000,
            "type": "string"
          },
          "finalized": {
            "ref": "#interval",
            "type": "ref"
          },
          "status": {
            "enum": [
              "active",
              "closed",
              "finalized",
              "cancelled"
            ],
            "type": "string"
          },
          "time": {
            "refs": [
              "#specificDates"
            ],
            "type": "union"
          },
          "title": {
            "maxGraphemes": 200,
            "maxLength": 800,
            "type": "string"
          }
        },
        "required": [
          "title",
          "time",
          "status",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "specificDates": {
      "properties": {
        "dates": {
          "items": {
            "type": "string"
          },
          "maxLength": 31,
          "type": "array"
        },
        "slotMinutes": {
          "enum": [
            10,
            15,
            20,
            30,
            45,
            60,
            90,
            120
          ],
          "type": "integer"
        },
        "timezone": {
          "maxLength": 64,
          "type": "string"
        },
        "window": {
          "ref": "#dayWindow",
          "type": "ref"
        }
      },
      "required": [
        "dates",
        "window",
        "slotMinutes",
        "timezone"
      ],
      "type": "object"
    }
  },
  "id": "lol.letsmeet.poll.schedule",
  "lexicon": 1
}
