-
Notifications
You must be signed in to change notification settings - Fork 406
/
subscribeRepos.json
213 lines (213 loc) · 7.62 KB
/
subscribeRepos.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
{
"lexicon": 1,
"id": "com.atproto.sync.subscribeRepos",
"defs": {
"main": {
"type": "subscription",
"description": "Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.",
"parameters": {
"type": "params",
"properties": {
"cursor": {
"type": "integer",
"description": "The last known event seq number to backfill from."
}
}
},
"message": {
"schema": {
"type": "union",
"refs": [
"#commit",
"#identity",
"#account",
"#handle",
"#migrate",
"#tombstone",
"#info"
]
}
},
"errors": [
{ "name": "FutureCursor" },
{
"name": "ConsumerTooSlow",
"description": "If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."
}
]
},
"commit": {
"type": "object",
"description": "Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.",
"required": [
"seq",
"rebase",
"tooBig",
"repo",
"commit",
"rev",
"since",
"blocks",
"ops",
"blobs",
"time"
],
"nullable": ["prev", "since"],
"properties": {
"seq": {
"type": "integer",
"description": "The stream sequence number of this message."
},
"rebase": { "type": "boolean", "description": "DEPRECATED -- unused" },
"tooBig": {
"type": "boolean",
"description": "Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data."
},
"repo": {
"type": "string",
"format": "did",
"description": "The repo this event comes from."
},
"commit": {
"type": "cid-link",
"description": "Repo commit object CID."
},
"prev": {
"type": "cid-link",
"description": "DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability."
},
"rev": {
"type": "string",
"description": "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event."
},
"since": {
"type": "string",
"description": "The rev of the last emitted commit from this repo (if any)."
},
"blocks": {
"type": "bytes",
"description": "CAR file containing relevant blocks, as a diff since the previous repo state.",
"maxLength": 1000000
},
"ops": {
"type": "array",
"items": {
"type": "ref",
"ref": "#repoOp",
"description": "List of repo mutation operations in this commit (eg, records created, updated, or deleted)."
},
"maxLength": 200
},
"blobs": {
"type": "array",
"items": {
"type": "cid-link",
"description": "List of new blobs (by CID) referenced by records in this commit."
}
},
"time": {
"type": "string",
"format": "datetime",
"description": "Timestamp of when this message was originally broadcast."
}
}
},
"identity": {
"type": "object",
"description": "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.",
"required": ["seq", "did", "time"],
"properties": {
"seq": { "type": "integer" },
"did": { "type": "string", "format": "did" },
"time": { "type": "string", "format": "datetime" },
"handle": {
"type": "string",
"format": "handle",
"description": "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details."
}
}
},
"account": {
"type": "object",
"description": "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",
"required": ["seq", "did", "time", "active"],
"properties": {
"seq": { "type": "integer" },
"did": { "type": "string", "format": "did" },
"time": { "type": "string", "format": "datetime" },
"active": {
"type": "boolean",
"description": "Indicates that the account has a repository which can be fetched from the host that emitted this event."
},
"status": {
"type": "string",
"description": "If active=false, this optional field indicates a reason for why the account is not active.",
"knownValues": ["takendown", "suspended", "deleted", "deactivated"]
}
}
},
"handle": {
"type": "object",
"description": "DEPRECATED -- Use #identity event instead",
"required": ["seq", "did", "handle", "time"],
"properties": {
"seq": { "type": "integer" },
"did": { "type": "string", "format": "did" },
"handle": { "type": "string", "format": "handle" },
"time": { "type": "string", "format": "datetime" }
}
},
"migrate": {
"type": "object",
"description": "DEPRECATED -- Use #account event instead",
"required": ["seq", "did", "migrateTo", "time"],
"nullable": ["migrateTo"],
"properties": {
"seq": { "type": "integer" },
"did": { "type": "string", "format": "did" },
"migrateTo": { "type": "string" },
"time": { "type": "string", "format": "datetime" }
}
},
"tombstone": {
"type": "object",
"description": "DEPRECATED -- Use #account event instead",
"required": ["seq", "did", "time"],
"properties": {
"seq": { "type": "integer" },
"did": { "type": "string", "format": "did" },
"time": { "type": "string", "format": "datetime" }
}
},
"info": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"knownValues": ["OutdatedCursor"]
},
"message": {
"type": "string"
}
}
},
"repoOp": {
"type": "object",
"description": "A repo operation, ie a mutation of a single record.",
"required": ["action", "path", "cid"],
"nullable": ["cid"],
"properties": {
"action": {
"type": "string",
"knownValues": ["create", "update", "delete"]
},
"path": { "type": "string" },
"cid": {
"type": "cid-link",
"description": "For creates and updates, the new record CID. For deletions, null."
}
}
}
}
}