wiki.lichen.noteRevision
Schema Diff
+21 -5
Compatibility Analysis
Breaking Changes Detected
1 breaking change, 4 non-breaking changes.
Breaking Changes (1)
- ConstraintTightened ConstraintTightened { vertex_id: "wiki.lichen.noteRevision:body.diffFormat", sort: "knownValues", old_value: "[\"diff-match-patch\"]", new_value: "[\"diff-match-patch\",\"full-text\"]" }
Non-Breaking Changes (4)
- AddedVertex AddedVertex { vertex_id: "wiki.lichen.noteRevision:body.status" }
- AddedVertex AddedVertex { vertex_id: "wiki.lichen.noteRevision:body.title" }
- AddedEdge AddedEdge { src: "wiki.lichen.noteRevision:body", tgt: "wiki.lichen.noteRevision:body.status", kind: "prop", name: Some("status") }
- AddedEdge AddedEdge { src: "wiki.lichen.noteRevision:body", tgt: "wiki.lichen.noteRevision:body.title", kind: "prop", name: Some("title") }
Migration Guidance
Added Elements
AddedVertex { vertex_id: "wiki.lichen.noteRevision:body.status" }AddedVertex { vertex_id: "wiki.lichen.noteRevision:body.title" }
Constraint Changes
- ConstraintTightened ConstraintTightened { vertex_id: "wiki.lichen.noteRevision:body.diffFormat", sort: "knownValues", old_value: "[\"diff-match-patch\"]", new_value: "[\"diff-match-patch\",\"full-text\"]" }
Additional Notes
- Non-breaking: AddedEdge { src: "wiki.lichen.noteRevision:body", tgt: "wiki.lichen.noteRevision:body.status", kind: "prop", name: Some("status") }
- Non-breaking: AddedEdge { src: "wiki.lichen.noteRevision:body", tgt: "wiki.lichen.noteRevision:body.title", kind: "prop", name: Some("title") }
1
1
{
2
2
"$type": "com.atproto.lexicon.schema",
3
3
"defs": {
4
4
"main": {
5
-
"description": "A revision to a note, stored as a diff from the previous revision.",
5
+
"description": "A revision to a note. It holds either a diff from the previous revision or the complete new body, depending on diffFormat.",
6
6
"key": "tid",
7
7
"record": {
8
8
"properties": {
9
9
"blobs": {
10
-
"description": "Blobs referenced by this revision's content.",
10
+
"description": "Blobs the content references. Each is identified by the uploading repo's DID and the blob CID. Content points at one with , the path lichen serves it from. Listing the ref here keeps the blob alive in the PDS.",
11
11
"items": {
12
12
"accept": [
13
13
"image/jpeg",
14
14
"image/png",
15
15
"image/gif",
16
16
"image/webp"
17
17
],
18
18
"maxSize": 2097152,
19
19
"type": "blob"
20
20
},
21
21
"type": "array"
22
22
},
23
23
"createdAt": {
24
24
"description": "When this revision was created.",
25
25
"format": "datetime",
26
26
"type": "string"
27
27
},
28
28
"diff": {
29
-
"description": "The diff content in the format specified by diffFormat.",
29
+
"description": "The revision payload. With \"diff-match-patch\" it is a patch against parentRevision. With \"full-text\" it is the note's whole new body, and it is only accepted when parentRevision is the current head.",
30
30
"maxLength": 1000000,
31
31
"type": "string"
32
32
},
33
33
"diffFormat": {
34
-
"description": "Format of the diff string.",
34
+
"description": "How to read the diff field. \"diff-match-patch\" means a patch against parentRevision. \"full-text\" means the whole note body.",
35
35
"knownValues": [
36
-
"diff-match-patch"
36
+
"diff-match-patch",
37
+
"full-text"
37
38
],
38
39
"maxLength": 32,
39
40
"type": "string"
40
41
},
41
42
"message": {
42
43
"description": "Optional commit message describing this revision.",
43
44
"maxGraphemes": 1024,
44
45
"maxLength": 10240,
45
46
"type": "string"
46
47
},
47
48
"noteRef": {
48
49
"description": "AT-URI of the parent note record.",
49
50
"format": "at-uri",
50
51
"type": "string"
51
52
},
52
53
"parentRevision": {
53
54
"description": "AT-URI of the previous revision. Omitted for the first revision of a note.",
54
55
"format": "at-uri",
55
56
"type": "string"
57
+
},
58
+
"status": {
59
+
"description": "Set to \"deleted\" to take the note out of its wiki, keeping its history, and to \"live\" to restore it. A revision without it keeps the status.",
60
+
"knownValues": [
61
+
"live",
62
+
"deleted"
63
+
],
64
+
"maxLength": 32,
65
+
"type": "string"
66
+
},
67
+
"title": {
68
+
"description": "Renames the note from this revision on. A revision that leaves it out keeps the title.",
69
+
"maxGraphemes": 256,
70
+
"maxLength": 2560,
71
+
"type": "string"
56
72
}
57
73
},
58
74
"required": [
59
75
"noteRef",
60
76
"diff",
61
77
"diffFormat",
62
78
"createdAt"
63
79
],
64
80
"type": "object"
65
81
},
66
82
"type": "record"
67
83
}
68
84
},
69
85
"id": "wiki.lichen.noteRevision",
70
86
"lexicon": 1
71
87
}