org.passingreads.book.defs
Schema Diff
+17 -22
Compatibility Analysis
Breaking Changes Detected
9 breaking changes, 6 non-breaking changes.
Breaking Changes (9)
- RemovedVertex RemovedVertex { vertex_id: "org.passingreads.book.defs#confirmedEvent.did" }
- RemovedVertex RemovedVertex { vertex_id: "org.passingreads.book.defs#confirmedEvent.handle" }
- RemovedVertex RemovedVertex { vertex_id: "org.passingreads.book.defs#registrationView.did" }
- RemovedVertex RemovedVertex { vertex_id: "org.passingreads.book.defs#registrationView.handle" }
- RemovedEdge RemovedEdge { src: "org.passingreads.book.defs#confirmedEvent", tgt: "org.passingreads.book.defs#confirmedEvent.did", kind: "prop", name: Some("did") }
- RemovedEdge RemovedEdge { src: "org.passingreads.book.defs#confirmedEvent", tgt: "org.passingreads.book.defs#confirmedEvent.handle", kind: "prop", name: Some("handle") }
- RemovedEdge RemovedEdge { src: "org.passingreads.book.defs#registrationView", tgt: "org.passingreads.book.defs#registrationView.did", kind: "prop", name: Some("did") }
- RemovedEdge RemovedEdge { src: "org.passingreads.book.defs#registrationView", tgt: "org.passingreads.book.defs#registrationView.handle", kind: "prop", name: Some("handle") }
- ConstraintAdded ConstraintAdded { vertex_id: "org.passingreads.book.defs#registrationView.pageCount", sort: "minimum", value: "1" }
Non-Breaking Changes (6)
- AddedVertex AddedVertex { vertex_id: "org.passingreads.book.defs#confirmedEvent.actor" }
- AddedVertex AddedVertex { vertex_id: "org.passingreads.book.defs#registrationView.pageCount" }
- AddedVertex AddedVertex { vertex_id: "org.passingreads.book.defs#registrationView.registeredBy" }
- AddedEdge AddedEdge { src: "org.passingreads.book.defs#confirmedEvent", tgt: "org.passingreads.book.defs#confirmedEvent.actor", kind: "prop", name: Some("actor") }
- AddedEdge AddedEdge { src: "org.passingreads.book.defs#registrationView", tgt: "org.passingreads.book.defs#registrationView.pageCount", kind: "prop", name: Some("pageCount") }
- AddedEdge AddedEdge { src: "org.passingreads.book.defs#registrationView", tgt: "org.passingreads.book.defs#registrationView.registeredBy", kind: "prop", name: Some("registeredBy") }
Migration Guidance
Removed Elements
RemovedVertex { vertex_id: "org.passingreads.book.defs#confirmedEvent.did" }RemovedVertex { vertex_id: "org.passingreads.book.defs#confirmedEvent.handle" }RemovedVertex { vertex_id: "org.passingreads.book.defs#registrationView.did" }RemovedVertex { vertex_id: "org.passingreads.book.defs#registrationView.handle" }
Added Elements
AddedVertex { vertex_id: "org.passingreads.book.defs#confirmedEvent.actor" }AddedVertex { vertex_id: "org.passingreads.book.defs#registrationView.pageCount" }AddedVertex { vertex_id: "org.passingreads.book.defs#registrationView.registeredBy" }
Constraint Changes
- ConstraintAdded ConstraintAdded { vertex_id: "org.passingreads.book.defs#registrationView.pageCount", sort: "minimum", value: "1" }
Additional Notes
- Breaking: RemovedEdge { src: "org.passingreads.book.defs#confirmedEvent", tgt: "org.passingreads.book.defs#confirmedEvent.did", kind: "prop", name: Some("did") }
- Breaking: RemovedEdge { src: "org.passingreads.book.defs#confirmedEvent", tgt: "org.passingreads.book.defs#confirmedEvent.handle", kind: "prop", name: Some("handle") }
- Breaking: RemovedEdge { src: "org.passingreads.book.defs#registrationView", tgt: "org.passingreads.book.defs#registrationView.did", kind: "prop", name: Some("did") }
- Breaking: RemovedEdge { src: "org.passingreads.book.defs#registrationView", tgt: "org.passingreads.book.defs#registrationView.handle", kind: "prop", name: Some("handle") }
- Non-breaking: AddedEdge { src: "org.passingreads.book.defs#confirmedEvent", tgt: "org.passingreads.book.defs#confirmedEvent.actor", kind: "prop", name: Some("actor") }
- Non-breaking: AddedEdge { src: "org.passingreads.book.defs#registrationView", tgt: "org.passingreads.book.defs#registrationView.pageCount", kind: "prop", name: Some("pageCount") }
- Non-breaking: AddedEdge { src: "org.passingreads.book.defs#registrationView", tgt: "org.passingreads.book.defs#registrationView.registeredBy", kind: "prop", name: Some("registeredBy") }
1
1
{
2
2
"id": "org.passingreads.book.defs",
3
3
"defs": {
4
4
"statefulBook": {
5
5
"type": "object",
6
6
"required": [
7
7
"uri",
8
8
"cid",
9
9
"registration",
10
10
"state",
11
11
"currentHolder"
12
12
],
13
13
"properties": {
14
14
"cid": {
15
15
"type": "string",
16
16
"description": "The CID of the book registration record"
17
17
},
18
18
"uri": {
19
19
"type": "string",
20
20
"format": "at-uri",
21
21
"description": "The AT URI of the book registration record"
22
22
},
23
23
"state": {
24
24
"type": "string",
25
25
"description": "The current state of the book, derived from the latest event",
26
26
"knownValues": [
27
27
"org.passingreads.book.checkin",
28
28
"org.passingreads.book.drop",
29
29
"org.passingreads.book.find",
30
30
"org.passingreads.book.registration"
31
31
]
32
32
},
33
33
"events": {
34
34
"type": "array",
35
35
"items": {
36
36
"ref": "#confirmedEvent",
37
37
"type": "ref"
38
38
},
39
39
"description": "List of confirmed events for this book, in chronological order"
40
40
},
41
41
"coverUrl": {
42
42
"type": "string",
43
43
"format": "uri",
44
44
"description": "Resolved URL to the cover image (from the registration blob)"
45
45
},
46
46
"aspectRatio": {
47
47
"ref": "org.passingreads.defs#aspectRatio",
48
48
"type": "ref",
49
49
"description": "Aspect ratio of the cover image"
50
50
},
51
51
"registration": {
52
52
"ref": "#registrationView",
53
53
"type": "ref",
54
54
"description": "The book registration data (without cryptographic fields)"
55
55
},
56
56
"currentHolder": {
57
57
"type": "string",
58
58
"format": "did",
59
59
"description": "The DID of the current holder of the book"
60
60
},
61
61
"currentLocation": {
62
62
"ref": "community.lexicon.location.hthree#main",
63
63
"type": "ref",
64
64
"description": "The current location of the book (only present if state is 'org.passingreads.book.drop')"
65
65
}
66
66
},
67
67
"description": "A book with its current state, combining registration data with computed state information."
68
68
},
69
69
"confirmedEvent": {
70
70
"type": "object",
71
71
"required": [
72
72
"uri",
73
-
"did",
73
+
"actor",
74
74
"event",
75
75
"location",
76
76
"occurredAt"
77
77
],
78
78
"properties": {
79
-
"did": {
80
-
"type": "string",
81
-
"format": "did",
82
-
"description": "The DID of the person who performed this event"
83
-
},
84
79
"uri": {
85
80
"type": "string",
86
81
"format": "at-uri",
87
82
"description": "The AT URI of this event record"
88
83
},
84
+
"actor": {
85
+
"ref": "org.passingreads.defs#actor",
86
+
"type": "ref",
87
+
"description": "The person who performed this event"
88
+
},
89
89
"event": {
90
90
"type": "string",
91
91
"description": "What event occurred",
92
92
"knownValues": [
93
93
"org.passingreads.book.checkin",
94
94
"org.passingreads.book.drop",
95
95
"org.passingreads.book.find"
96
96
]
97
97
},
98
-
"handle": {
99
-
"type": "string",
100
-
"format": "handle",
101
-
"description": "The handle of the person who performed this event"
102
-
},
103
98
"location": {
104
99
"ref": "community.lexicon.location.hthree#main",
105
100
"type": "ref",
106
101
"description": "Where this event occurred"
107
102
},
108
103
"occurredAt": {
109
104
"type": "string",
110
105
"format": "datetime",
111
106
"description": "When this event occurred"
112
107
}
113
108
},
114
109
"description": "A confirmed book event for display purposes. Omits cryptographic fields (bookPub, bookSig) and book reference since it's shown in context of a book."
115
110
},
116
111
"registrationView": {
117
112
"type": "object",
118
113
"required": [
119
-
"did",
114
+
"registeredBy",
120
115
"bookId",
121
116
"title",
122
117
"authors",
123
118
"occurredAt"
124
119
],
125
120
"properties": {
126
-
"did": {
127
-
"type": "string",
128
-
"format": "did",
129
-
"description": "The DID of the person who registered the book"
130
-
},
131
121
"title": {
132
122
"type": "string",
133
123
"description": "The title of the book"
134
124
},
135
125
"bookId": {
136
126
"type": "string",
137
127
"description": "The book's ID (as defined on its QR Code)"
138
-
},
139
-
"handle": {
140
-
"type": "string",
141
-
"format": "handle",
142
-
"description": "The handle of the person who registered the book"
143
128
},
144
129
"authors": {
145
130
"type": "array",
146
131
"items": {
147
132
"type": "string"
148
133
},
149
134
"description": "Authors of this book, in order of credit"
150
135
},
136
+
"pageCount": {
137
+
"type": "integer",
138
+
"minimum": 1,
139
+
"description": "Number of pages in the book"
140
+
},
151
141
"occurredAt": {
152
142
"type": "string",
153
143
"format": "datetime",
154
144
"description": "When the book was registered"
155
145
},
146
+
"registeredBy": {
147
+
"ref": "org.passingreads.defs#actor",
148
+
"type": "ref",
149
+
"description": "The person who registered the book"
150
+
},
156
151
"publicationId": {
157
152
"type": "string",
158
153
"description": "The book's Open Library Edition ID"
159
154
}
160
155
},
161
156
"description": "A view of a book registration for API responses. Omits cryptographic fields (bookPub, bookSig) and the cover blob."
162
157
}
163
158
},
164
159
"$type": "com.atproto.lexicon.schema",
165
160
"lexicon": 1
166
161
}