zone.stratos.sync.subscribeRecords
Schema Diff
+45 -5
Compatibility Analysis
Breaking Changes Detected
3 breaking changes, 10 non-breaking changes.
Breaking Changes (3)
- RequiredEdgeAdded RequiredEdgeAdded { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment", src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.time", kind: "prop", name: Some("time") }
- RequiredEdgeAdded RequiredEdgeAdded { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment", src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.action", kind: "prop", name: Some("action") }
- RequiredEdgeAdded RequiredEdgeAdded { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment", src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.did", kind: "prop", name: Some("did") }
Non-Breaking Changes (10)
- AddedVertex AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment" }
- AddedVertex AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.action" }
- AddedVertex AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.boundaries" }
- AddedVertex AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.boundaries:items" }
- AddedVertex AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.did" }
- AddedVertex AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.service" }
- AddedVertex AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.time" }
- AddedEdge AddedEdge { src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.boundaries", kind: "prop", name: Some("boundaries") }
- AddedEdge AddedEdge { src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.service", kind: "prop", name: Some("service") }
- AddedEdge AddedEdge { src: "zone.stratos.sync.subscribeRecords#enrollment.boundaries", tgt: "zone.stratos.sync.subscribeRecords#enrollment.boundaries:items", kind: "items", name: None }
Migration Guidance
Added Elements
AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment" }AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.action" }AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.boundaries" }AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.boundaries:items" }AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.did" }AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.service" }AddedVertex { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment.time" }
Additional Notes
- Breaking: RequiredEdgeAdded { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment", src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.time", kind: "prop", name: Some("time") }
- Breaking: RequiredEdgeAdded { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment", src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.action", kind: "prop", name: Some("action") }
- Breaking: RequiredEdgeAdded { vertex_id: "zone.stratos.sync.subscribeRecords#enrollment", src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.did", kind: "prop", name: Some("did") }
- Non-breaking: AddedEdge { src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.boundaries", kind: "prop", name: Some("boundaries") }
- Non-breaking: AddedEdge { src: "zone.stratos.sync.subscribeRecords#enrollment", tgt: "zone.stratos.sync.subscribeRecords#enrollment.service", kind: "prop", name: Some("service") }
- Non-breaking: AddedEdge { src: "zone.stratos.sync.subscribeRecords#enrollment.boundaries", tgt: "zone.stratos.sync.subscribeRecords#enrollment.boundaries:items", kind: "items", name: None }
1
1
{
2
2
"$type": "com.atproto.lexicon.schema",
3
3
"defs": {
4
4
"commit": {
5
5
"description": "A commit event containing record operations.",
6
6
"properties": {
7
7
"did": {
8
8
"description": "The DID of the account.",
9
9
"format": "did",
10
10
"type": "string"
11
11
},
12
12
"ops": {
13
13
"description": "List of record operations in this commit.",
14
14
"items": {
15
15
"ref": "#recordOp",
16
16
"type": "ref"
17
17
},
18
18
"type": "array"
19
19
},
20
20
"rev": {
21
21
"description": "The repo revision.",
22
22
"format": "tid",
23
23
"type": "string"
24
24
},
25
25
"seq": {
26
26
"description": "The sequence number of this event.",
27
27
"type": "integer"
28
28
},
29
29
"time": {
30
30
"description": "Timestamp of when the event was sequenced.",
31
31
"format": "datetime",
32
32
"type": "string"
33
33
}
34
34
},
35
35
"required": [
36
36
"seq",
37
37
"did",
38
38
"time",
39
39
"rev",
40
40
"ops"
41
41
],
42
42
"type": "object"
43
43
},
44
+
"enrollment": {
45
+
"description": "An enrollment event indicating a user has enrolled or unenrolled from the service.",
46
+
"properties": {
47
+
"action": {
48
+
"description": "The enrollment action.",
49
+
"knownValues": [
50
+
"enroll",
51
+
"unenroll"
52
+
],
53
+
"maxLength": 32,
54
+
"type": "string"
55
+
},
56
+
"boundaries": {
57
+
"description": "The boundaries assigned to the user.",
58
+
"items": {
59
+
"type": "string"
60
+
},
61
+
"type": "array"
62
+
},
63
+
"did": {
64
+
"description": "The DID of the user.",
65
+
"format": "did",
66
+
"type": "string"
67
+
},
68
+
"service": {
69
+
"description": "The Stratos service endpoint URL.",
70
+
"format": "uri",
71
+
"type": "string"
72
+
},
73
+
"time": {
74
+
"description": "Timestamp of the enrollment event.",
75
+
"format": "datetime",
76
+
"type": "string"
77
+
}
78
+
},
79
+
"required": [
80
+
"did",
81
+
"action",
82
+
"time"
83
+
],
84
+
"type": "object"
85
+
},
44
86
"info": {
45
87
"description": "An informational message about the subscription state.",
46
88
"properties": {
47
89
"message": {
48
90
"description": "Additional details about the info message.",
49
91
"maxLength": 1024,
50
92
"type": "string"
51
93
},
52
94
"name": {
53
95
"description": "The type of info message.",
54
96
"knownValues": [
55
97
"OutdatedCursor"
56
98
],
57
99
"maxLength": 128,
58
100
"type": "string"
59
101
}
60
102
},
61
103
"required": [
62
104
"name"
63
105
],
64
106
"type": "object"
65
107
},
66
108
"main": {
67
-
"description": "Subscribe to stratos record updates for a specific account. Requires service auth or owner authentication.",
109
+
"description": "Subscribe to stratos events. When 'did' is provided, subscribes to record updates for that account. When omitted, subscribes to service-level events (enrollments). Callers must authenticate with a signed service JWT via the Authorization: Bearer header.",
68
110
"errors": [
69
111
{
70
112
"description": "Cursor is in the future.",
71
113
"name": "FutureCursor"
72
114
},
73
115
{
74
116
"description": "Authentication is required.",
75
117
"name": "AuthRequired"
76
118
}
77
119
],
78
120
"message": {
79
121
"schema": {
80
122
"refs": [
81
123
"#commit",
124
+
"#enrollment",
82
125
"#info"
83
126
],
84
127
"type": "union"
85
128
}
86
129
},
87
130
"parameters": {
88
131
"properties": {
89
132
"cursor": {
90
133
"description": "The last known event sequence number to resume from.",
91
134
"type": "integer"
92
135
},
93
136
"did": {
94
-
"description": "The DID of the account to subscribe to.",
137
+
"description": "The DID of the account to subscribe to. If omitted, subscribes to service-level enrollment events.",
95
138
"format": "did",
96
139
"type": "string"
97
140
},
98
141
"domain": {
99
142
"description": "Optional domain filter. Only events for records with this domain in their boundary will be emitted.",
100
143
"maxLength": 253,
101
144
"type": "string"
102
145
}
103
146
},
104
-
"required": [
105
-
"did"
106
-
],
107
147
"type": "params"
108
148
},
109
149
"type": "subscription"
110
150
},
111
151
"recordOp": {
112
152
"description": "A single record operation within a commit.",
113
153
"properties": {
114
154
"action": {
115
155
"description": "The type of operation.",
116
156
"knownValues": [
117
157
"create",
118
158
"update",
119
159
"delete"
120
160
],
121
161
"maxLength": 32,
122
162
"type": "string"
123
163
},
124
164
"cid": {
125
165
"description": "The CID of the record. Present for create and update operations.",
126
166
"type": "cid-link"
127
167
},
128
168
"path": {
129
169
"description": "The record path (collection/rkey).",
130
170
"maxLength": 512,
131
171
"type": "string"
132
172
},
133
173
"record": {
134
174
"description": "The record content. Present for create and update operations.",
135
175
"type": "unknown"
136
176
}
137
177
},
138
178
"required": [
139
179
"action",
140
180
"path"
141
181
],
142
182
"type": "object"
143
183
}
144
184
},
145
185
"id": "zone.stratos.sync.subscribeRecords",
146
186
"lexicon": 1
147
187
}