forked from
nonbinary.computer/weaver
atproto blogging
1{
2 "lexicon": 1,
3 "id": "sh.weaver.edit.cursor",
4 "defs": {
5 "main": {
6 "type": "record",
7 "description": "An edit record for a notebook.",
8 "key": "tid",
9 "record": {
10 "type": "object",
11 "required": ["container", "id"],
12 "properties": {
13 "id": {
14 "type": "ref",
15 "ref": "#id"
16 },
17 "container": {
18 "type": "ref",
19 "ref": "#containerId"
20 },
21 "side": {
22 "type": "ref",
23 "ref": "#cursorSide"
24 }
25 }
26 }
27 },
28 "id": {
29 "type": "object",
30 "required": ["peer", "counter"],
31 "properties": {
32 "peer": { "type": "integer" },
33 "counter": { "type": "integer" }
34 }
35 },
36 "cursorSide": {
37 "type": "object",
38 "required": ["value"],
39 "properties": {
40 "value": {
41 "type": "integer",
42 "description": "The side of an item the cursor is on (left = -1, right = 1, middle = 0)",
43 "enum": [-1, 0, 1]
44 }
45 }
46 },
47 "containerId": {
48 "type": "object",
49 "required": ["value"],
50 "properties": {
51 "value": {
52 "type": "union",
53 "refs": ["#normalContainerId", "#rootContainerId"]
54 }
55 }
56 },
57 "normalContainerId": {
58 "type": "object",
59 "required": ["peer", "counter", "container_type"],
60 "properties": {
61 "peer": { "type": "integer" },
62 "counter": { "type": "integer" },
63 "container_type": {
64 "type": "string",
65 "enum": ["Map", "List", "Text", "Tree", "MovableList", "Counter"]
66 }
67 }
68 },
69 "rootContainerId": {
70 "type": "object",
71 "required": ["name", "container_type"],
72 "properties": {
73 "name": { "type": "string" },
74 "container_type": {
75 "type": "string",
76 "enum": ["Map", "List", "Text", "Tree", "MovableList", "Counter"]
77 }
78 }
79 }
80 }
81}