a tool for shared writing and social publishing
at update/reader 48 lines 1.2 kB view raw
1import { LexiconDoc } from "@atproto/lexicon"; 2 3export const PubLeafletPollDefinition: LexiconDoc = { 4 lexicon: 1, 5 id: "pub.leaflet.poll.definition", 6 defs: { 7 main: { 8 type: "record", 9 key: "tid", 10 description: "Record declaring a poll", 11 record: { 12 type: "object", 13 required: ["name", "options"], 14 properties: { 15 name: { type: "string", maxLength: 500, maxGraphemes: 100 }, 16 options: { type: "array", items: { type: "ref", ref: "#option" } }, 17 endDate: { type: "string", format: "datetime" }, 18 }, 19 }, 20 }, 21 option: { 22 type: "object", 23 properties: { 24 text: { type: "string", maxLength: 500, maxGraphemes: 50 }, 25 }, 26 }, 27 }, 28}; 29 30export const PubLeafletPollVote: LexiconDoc = { 31 lexicon: 1, 32 id: "pub.leaflet.poll.vote", 33 defs: { 34 main: { 35 type: "record", 36 key: "tid", 37 description: "Record declaring a vote on a poll", 38 record: { 39 type: "object", 40 required: ["poll", "option"], 41 properties: { 42 poll: { type: "ref", ref: "com.atproto.repo.strongRef" }, 43 option: { type: "array", items: { type: "string" } }, 44 }, 45 }, 46 }, 47 }, 48};