forked from
nonbinary.computer/weaver
atproto blogging
1{
2 "lexicon": 1,
3 "id": "sh.weaver.edit.defs",
4 "defs": {
5 "docRef": {
6 "type": "object",
7 "required": ["value"],
8 "properties": {
9 "value": {
10 "type": "union",
11 "refs": ["#notebookRef", "#entryRef", "#draftRef"]
12 }
13 }
14 },
15 "notebookRef": {
16 "type": "object",
17 "required": ["notebook"],
18 "properties": {
19 "notebook": {
20 "type": "ref",
21 "ref": "com.atproto.repo.strongRef"
22 }
23 }
24 },
25 "entryRef": {
26 "type": "object",
27 "required": ["entry"],
28 "properties": {
29 "entry": {
30 "type": "ref",
31 "ref": "com.atproto.repo.strongRef"
32 }
33 }
34 },
35
36 "draftRef": {
37 "type": "object",
38 "required": ["draftKey"],
39 "properties": {
40 "draftKey": {
41 "type": "string",
42 "maxLength": 200
43 }
44 }
45 },
46 "editHistoryEntry": {
47 "type": "object",
48 "description": "Summary of an edit (root or diff) for history queries.",
49 "required": ["uri", "cid", "author", "createdAt", "type"],
50 "properties": {
51 "uri": { "type": "string", "format": "at-uri" },
52 "cid": { "type": "string", "format": "cid" },
53 "author": { "type": "ref", "ref": "sh.weaver.actor.defs#profileViewBasic" },
54 "type": {
55 "type": "string",
56 "knownValues": ["root", "diff"]
57 },
58 "rootRef": { "type": "ref", "ref": "com.atproto.repo.strongRef" },
59 "prevRef": { "type": "ref", "ref": "com.atproto.repo.strongRef" },
60 "snapshotCid": { "type": "string", "format": "cid" },
61 "hasInlineDiff": { "type": "boolean" },
62 "createdAt": { "type": "string", "format": "datetime" }
63 }
64 },
65 "editBranchView": {
66 "type": "object",
67 "description": "A branch/fork in edit history (for when collaborators diverge).",
68 "required": ["head", "author", "length", "lastUpdated"],
69 "properties": {
70 "head": { "type": "ref", "ref": "com.atproto.repo.strongRef" },
71 "root": { "type": "ref", "ref": "com.atproto.repo.strongRef" },
72 "author": { "type": "ref", "ref": "sh.weaver.actor.defs#profileViewBasic" },
73 "length": {
74 "type": "integer",
75 "description": "Number of diffs in this branch"
76 },
77 "lastUpdated": { "type": "string", "format": "datetime" },
78 "divergesFrom": {
79 "type": "ref",
80 "ref": "com.atproto.repo.strongRef",
81 "description": "Common ancestor if this is a fork"
82 },
83 "isMerged": { "type": "boolean" }
84 }
85 },
86 "editTreeView": {
87 "type": "object",
88 "description": "Full tree structure showing all branches for a resource.",
89 "required": ["resource", "branches"],
90 "properties": {
91 "resource": { "type": "ref", "ref": "com.atproto.repo.strongRef" },
92 "mainBranch": { "type": "ref", "ref": "#editBranchView" },
93 "branches": {
94 "type": "array",
95 "items": { "type": "ref", "ref": "#editBranchView" }
96 },
97 "hasConflicts": { "type": "boolean" },
98 "conflictPoints": {
99 "type": "array",
100 "items": { "type": "ref", "ref": "com.atproto.repo.strongRef" },
101 "description": "Diffs where branches diverge"
102 }
103 }
104 }
105 }
106}