a tool for shared writing and social publishing
1import { LexiconDoc } from "@atproto/lexicon";
2import { PubLeafletPagesLinearDocument } from "./pages/LinearDocument";
3import { PubLeafletPagesCanvasDocument } from "./pages";
4
5export const PubLeafletDocument: LexiconDoc = {
6 lexicon: 1,
7 id: "pub.leaflet.document",
8 revision: 1,
9 description: "A lexicon for long form rich media documents",
10 defs: {
11 main: {
12 type: "record",
13 key: "tid",
14 description: "Record containing a document",
15 record: {
16 type: "object",
17 required: ["pages", "author", "title", "publication"],
18 properties: {
19 title: { type: "string", maxLength: 1280, maxGraphemes: 128 },
20 postRef: { type: "ref", ref: "com.atproto.repo.strongRef" },
21 description: { type: "string", maxLength: 3000, maxGraphemes: 300 },
22 publishedAt: { type: "string", format: "datetime" },
23 publication: { type: "string", format: "at-uri" },
24 author: { type: "string", format: "at-identifier" },
25 pages: {
26 type: "array",
27 items: {
28 type: "union",
29 refs: [
30 PubLeafletPagesLinearDocument.id,
31 PubLeafletPagesCanvasDocument.id,
32 ],
33 },
34 },
35 },
36 },
37 },
38 },
39};