atproto blogging
1{
2 "lexicon": 1,
3 "id": "sh.weaver.edit.defs",
4 "defs": {
5 "docRef": {
6 "type": "object",
7 "required": [
8 "value"
9 ],
10 "properties": {
11 "value": {
12 "type": "union",
13 "refs": [
14 "#notebookRef",
15 "#entryRef",
16 "#draftRef"
17 ]
18 }
19 }
20 },
21 "draftRef": {
22 "type": "object",
23 "required": [
24 "draftKey"
25 ],
26 "properties": {
27 "draftKey": {
28 "type": "string",
29 "maxLength": 200
30 }
31 }
32 },
33 "editBranchView": {
34 "type": "object",
35 "description": "A branch/fork in edit history (for when collaborators diverge).",
36 "required": [
37 "head",
38 "author",
39 "length",
40 "lastUpdated"
41 ],
42 "properties": {
43 "author": {
44 "type": "ref",
45 "ref": "sh.weaver.actor.defs#profileViewBasic"
46 },
47 "divergesFrom": {
48 "type": "ref",
49 "description": "Common ancestor if this is a fork",
50 "ref": "com.atproto.repo.strongRef"
51 },
52 "head": {
53 "type": "ref",
54 "ref": "com.atproto.repo.strongRef"
55 },
56 "isMerged": {
57 "type": "boolean"
58 },
59 "lastUpdated": {
60 "type": "string",
61 "format": "datetime"
62 },
63 "length": {
64 "type": "integer",
65 "description": "Number of diffs in this branch"
66 },
67 "root": {
68 "type": "ref",
69 "ref": "com.atproto.repo.strongRef"
70 }
71 }
72 },
73 "editHistoryEntry": {
74 "type": "object",
75 "description": "Summary of an edit (root or diff) for history queries.",
76 "required": [
77 "uri",
78 "cid",
79 "author",
80 "createdAt",
81 "type"
82 ],
83 "properties": {
84 "author": {
85 "type": "ref",
86 "ref": "sh.weaver.actor.defs#profileViewBasic"
87 },
88 "cid": {
89 "type": "string",
90 "format": "cid"
91 },
92 "createdAt": {
93 "type": "string",
94 "format": "datetime"
95 },
96 "hasInlineDiff": {
97 "type": "boolean"
98 },
99 "prevRef": {
100 "type": "ref",
101 "ref": "com.atproto.repo.strongRef"
102 },
103 "rootRef": {
104 "type": "ref",
105 "ref": "com.atproto.repo.strongRef"
106 },
107 "snapshotCid": {
108 "type": "string",
109 "format": "cid"
110 },
111 "type": {
112 "type": "string",
113 "knownValues": [
114 "root",
115 "diff"
116 ]
117 },
118 "uri": {
119 "type": "string",
120 "format": "at-uri"
121 }
122 }
123 },
124 "editTreeView": {
125 "type": "object",
126 "description": "Full tree structure showing all branches for a resource.",
127 "required": [
128 "resource",
129 "branches"
130 ],
131 "properties": {
132 "branches": {
133 "type": "array",
134 "items": {
135 "type": "ref",
136 "ref": "#editBranchView"
137 }
138 },
139 "conflictPoints": {
140 "type": "array",
141 "description": "Diffs where branches diverge",
142 "items": {
143 "type": "ref",
144 "ref": "com.atproto.repo.strongRef"
145 }
146 },
147 "hasConflicts": {
148 "type": "boolean"
149 },
150 "mainBranch": {
151 "type": "ref",
152 "ref": "#editBranchView"
153 },
154 "resource": {
155 "type": "ref",
156 "ref": "com.atproto.repo.strongRef"
157 }
158 }
159 },
160 "entryRef": {
161 "type": "object",
162 "required": [
163 "entry"
164 ],
165 "properties": {
166 "entry": {
167 "type": "ref",
168 "ref": "com.atproto.repo.strongRef"
169 }
170 }
171 },
172 "notebookRef": {
173 "type": "object",
174 "required": [
175 "notebook"
176 ],
177 "properties": {
178 "notebook": {
179 "type": "ref",
180 "ref": "com.atproto.repo.strongRef"
181 }
182 }
183 }
184 }
185}