{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A us.off-the-clock.polls.poll with its results: a row per option key, then a row per distinct typed answer under an option that takes input. There is no anonymous voting: the rows name their voters.",
      "properties": {
        "author": {
          "ref": "app.bsky.actor.defs#profileViewBasic",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "closesAt": {
          "format": "datetime",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "labels": {
          "items": {
            "ref": "com.atproto.label.defs#label",
            "type": "ref"
          },
          "type": "array"
        },
        "opensAt": {
          "format": "datetime",
          "type": "string"
        },
        "prompt": {
          "type": "string"
        },
        "record": {
          "description": "The poll as written.",
          "type": "unknown"
        },
        "replyCount": {
          "minimum": 0,
          "type": "integer"
        },
        "results": {
          "items": {
            "ref": "#result",
            "type": "ref"
          },
          "type": "array"
        },
        "state": {
          "knownValues": [
            "pending",
            "open",
            "closed"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "viewerVote": {
          "ref": "#viewerVote",
          "type": "ref"
        },
        "voters": {
          "description": "Members with a counting vote, abstentions included.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "prompt",
        "results",
        "voters",
        "state",
        "replyCount",
        "indexedAt"
      ],
      "type": "object"
    },
    "result": {
      "description": "The votes for one key with no typed answer, or for one typed answer (compared trimmed and without case, shown as first typed).",
      "properties": {
        "input": {
          "maxLength": 1000,
          "type": "string"
        },
        "key": {
          "maxLength": 64,
          "type": "string"
        },
        "recentVoters": {
          "description": "Up to three of the row's voters, newest first; every one with getPoll's allVoters.",
          "items": {
            "ref": "app.bsky.actor.defs#profileViewBasic",
            "type": "ref"
          },
          "type": "array"
        },
        "votes": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "key",
        "votes",
        "recentVoters"
      ],
      "type": "object"
    },
    "viewerVote": {
      "properties": {
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "votes": {
          "items": {
            "ref": "us.off-the-clock.polls.vote#entry",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "uri",
        "votes"
      ],
      "type": "object"
    }
  },
  "id": "us.off-the-clock.polls.pollView",
  "lexicon": 1
}
