{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A poll within a chat channel. Lives in the creator's repo.",
      "key": "tid",
      "record": {
        "properties": {
          "allowMultiple": {
            "default": false,
            "description": "Whether voters can select multiple options.",
            "type": "boolean"
          },
          "channel": {
            "description": "AT-URI of the channel this poll belongs to.",
            "format": "at-uri",
            "type": "string"
          },
          "createdAt": {
            "description": "Timestamp of poll creation.",
            "format": "datetime",
            "type": "string"
          },
          "expiresAt": {
            "description": "When the poll closes. Omit for no expiry.",
            "format": "datetime",
            "type": "string"
          },
          "options": {
            "description": "Poll answer options.",
            "items": {
              "maxLength": 100,
              "type": "string"
            },
            "maxLength": 10,
            "minLength": 2,
            "type": "array"
          },
          "question": {
            "description": "The poll question.",
            "maxLength": 200,
            "type": "string"
          }
        },
        "required": [
          "channel",
          "question",
          "options",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.protoimsg.chat.poll",
  "lexicon": 1
}
