@getcirrus/space-conformance 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-CGsQgOwR.d.ts +472 -0
- package/dist/base-CGsQgOwR.d.ts.map +1 -0
- package/dist/cli.js +79266 -26
- package/dist/cli.js.map +1 -1
- package/dist/coverage-zCMup3Nb.js +2245 -0
- package/dist/coverage-zCMup3Nb.js.map +1 -0
- package/dist/descriptors-YEk3XoDL.js +4428 -0
- package/dist/descriptors-YEk3XoDL.js.map +1 -0
- package/dist/full-Bomm2urj.js +12285 -0
- package/dist/full-Bomm2urj.js.map +1 -0
- package/dist/full.d.ts +43 -17
- package/dist/full.d.ts.map +1 -1
- package/dist/full.js +3 -3
- package/dist/index.d.ts +91 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +115 -93
- package/dist/index.js.map +1 -1
- package/lexicons/MANIFEST.json +3 -3
- package/lexicons/managedspace/checkAccess.json +44 -0
- package/lexicons/managedspace/policy.json +22 -0
- package/lexicons/memberspace/defs.json +22 -0
- package/lexicons/{simplespace → memberspace}/listMembers.json +15 -17
- package/lexicons/memberspace/member.json +23 -0
- package/lexicons/memberspace/policy.json +40 -0
- package/lexicons/memberspace/putMembers.json +43 -0
- package/lexicons/memberspace/removeMembers.json +43 -0
- package/lexicons/personalspace/policy.json +11 -0
- package/lexicons/space/applyWrites.json +6 -11
- package/lexicons/space/authorizeSpaceSync.json +109 -0
- package/lexicons/space/clearRecords.json +34 -0
- package/lexicons/space/confirmRegistration.json +44 -0
- package/lexicons/space/createRecord.json +7 -14
- package/lexicons/space/createSpace.json +58 -0
- package/lexicons/space/defs.json +61 -17
- package/lexicons/space/deleteRecord.json +5 -9
- package/lexicons/space/deleteSpace.json +31 -0
- package/lexicons/space/exportSpaceMeta.json +31 -0
- package/lexicons/space/getBlob.json +4 -7
- package/lexicons/space/getDelegationToken.json +3 -5
- package/lexicons/space/getLatestCommit.json +8 -7
- package/lexicons/space/getRecord.json +9 -9
- package/lexicons/space/getRepo.json +8 -11
- package/lexicons/space/getSpace.json +43 -0
- package/lexicons/space/importRepo.json +27 -0
- package/lexicons/space/importSpaceMeta.json +25 -0
- package/lexicons/space/listBlobs.json +3 -10
- package/lexicons/space/listRecords.json +10 -16
- package/lexicons/space/listRepoOps.json +23 -23
- package/lexicons/space/listSpaces.json +30 -14
- package/lexicons/space/listWriters.json +66 -0
- package/lexicons/space/notifyCredentialsRevoked.json +30 -0
- package/lexicons/space/notifyRepoUpdate.json +43 -0
- package/lexicons/space/notifySpaceUpdate.json +53 -0
- package/lexicons/space/policy.json +26 -0
- package/lexicons/space/putRecord.json +7 -14
- package/lexicons/space/removeWriter.json +35 -0
- package/lexicons/space/updateSpace.json +43 -0
- package/package.json +8 -10
- package/dist/base-D8a-ZK57.d.ts +0 -249
- package/dist/base-D8a-ZK57.d.ts.map +0 -1
- package/dist/coverage-DhJZu8P8.js +0 -1914
- package/dist/coverage-DhJZu8P8.js.map +0 -1
- package/dist/full-D4ufJLcw.js +0 -409
- package/dist/full-D4ufJLcw.js.map +0 -1
- package/dist/operator-BErXCDow.js +0 -923
- package/dist/operator-BErXCDow.js.map +0 -1
- package/lexicons/simplespace/addMember.json +0 -37
- package/lexicons/simplespace/checkUserAccess.json +0 -43
- package/lexicons/simplespace/createSpace.json +0 -74
- package/lexicons/simplespace/defs.json +0 -47
- package/lexicons/simplespace/deleteSpace.json +0 -32
- package/lexicons/simplespace/getSpace.json +0 -53
- package/lexicons/simplespace/removeMember.json +0 -37
- package/lexicons/simplespace/updateSpace.json +0 -57
- package/lexicons/space/getSpaceCredential.json +0 -67
- package/lexicons/space/listRepos.json +0 -75
- package/lexicons/space/notifySpaceDeleted.json +0 -24
- package/lexicons/space/notifyWrite.json +0 -38
- package/lexicons/space/registerNotify.json +0 -49
- package/lexicons/space/unregisterNotify.json +0 -29
|
@@ -0,0 +1,2245 @@
|
|
|
1
|
+
//#region src/alpha.ts
|
|
2
|
+
/**
|
|
3
|
+
* The alpha build the suite's verifiers are pinned to: the
|
|
4
|
+
* `@atproto/space` / `@atproto/crypto` versions bundled into dist, cut from
|
|
5
|
+
* bluesky-social/atproto `permissioned-data-alpha` at the vendored lexicon
|
|
6
|
+
* commit. Runners stamp it on every report.
|
|
7
|
+
*/
|
|
8
|
+
const ALPHA_BUILD = "0.0.0-spaces-alpha-20261124235736";
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/runner.ts
|
|
12
|
+
async function runChecks(options) {
|
|
13
|
+
const logs = [];
|
|
14
|
+
const state = /* @__PURE__ */ new Map();
|
|
15
|
+
const ctx = {
|
|
16
|
+
...options.context,
|
|
17
|
+
state,
|
|
18
|
+
log: (message) => logs.push(message)
|
|
19
|
+
};
|
|
20
|
+
const timeoutMs = options.checkTimeoutMs ?? 3e4;
|
|
21
|
+
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
22
|
+
const results = [];
|
|
23
|
+
const emit = (result) => {
|
|
24
|
+
results.push(result);
|
|
25
|
+
try {
|
|
26
|
+
options.onResult?.(result);
|
|
27
|
+
} catch {}
|
|
28
|
+
};
|
|
29
|
+
for (const check of options.catalog.runnable) {
|
|
30
|
+
const began = Date.now();
|
|
31
|
+
const controller = new AbortController();
|
|
32
|
+
const checkCtx = {
|
|
33
|
+
...ctx,
|
|
34
|
+
fetch: (input, init) => ctx.fetch(input, {
|
|
35
|
+
...init,
|
|
36
|
+
signal: init?.signal ?? controller.signal
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
try {
|
|
40
|
+
const outcome = await withTimeout(check.run(checkCtx), Math.max(timeoutMs, check.timeoutMs ?? 0), check.id, controller);
|
|
41
|
+
emit({
|
|
42
|
+
id: check.id,
|
|
43
|
+
tier: check.tier,
|
|
44
|
+
status: outcome.status,
|
|
45
|
+
detail: outcome.detail,
|
|
46
|
+
citations: check.citations,
|
|
47
|
+
...outcome.evidence !== void 0 ? { evidence: outcome.evidence } : {},
|
|
48
|
+
durationMs: Date.now() - began
|
|
49
|
+
});
|
|
50
|
+
} catch (err) {
|
|
51
|
+
emit({
|
|
52
|
+
id: check.id,
|
|
53
|
+
tier: check.tier,
|
|
54
|
+
status: "error",
|
|
55
|
+
detail: err instanceof Error ? err.message : String(err),
|
|
56
|
+
citations: check.citations,
|
|
57
|
+
durationMs: Date.now() - began
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
for (const { check, reason } of options.catalog.skipped) emit({
|
|
62
|
+
id: check.id,
|
|
63
|
+
tier: check.tier,
|
|
64
|
+
status: "skipped",
|
|
65
|
+
detail: reason,
|
|
66
|
+
citations: check.citations
|
|
67
|
+
});
|
|
68
|
+
const summary = {
|
|
69
|
+
pass: results.filter((r) => r.status === "pass").length,
|
|
70
|
+
fail: results.filter((r) => r.status === "fail").length,
|
|
71
|
+
mustFail: results.filter((r) => r.status === "fail" && r.tier === "must").length,
|
|
72
|
+
mustError: results.filter((r) => r.status === "error" && r.tier === "must").length,
|
|
73
|
+
skipped: results.filter((r) => r.status === "skipped").length,
|
|
74
|
+
error: results.filter((r) => r.status === "error").length
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
suite: {
|
|
78
|
+
name: "@getcirrus/space-conformance",
|
|
79
|
+
version: options.suiteVersion
|
|
80
|
+
},
|
|
81
|
+
alphaBuild: options.alphaBuild,
|
|
82
|
+
target: options.context.target,
|
|
83
|
+
startedAt,
|
|
84
|
+
finishedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
85
|
+
results,
|
|
86
|
+
logs,
|
|
87
|
+
summary
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function withTimeout(promise, ms, id$39, controller) {
|
|
91
|
+
return new Promise((resolve, reject) => {
|
|
92
|
+
const timer = setTimeout(() => {
|
|
93
|
+
controller.abort();
|
|
94
|
+
reject(/* @__PURE__ */ new Error(`check ${id$39} timed out after ${ms}ms`));
|
|
95
|
+
}, ms);
|
|
96
|
+
promise.then((value) => {
|
|
97
|
+
clearTimeout(timer);
|
|
98
|
+
resolve(value);
|
|
99
|
+
}, (err) => {
|
|
100
|
+
clearTimeout(timer);
|
|
101
|
+
reject(err);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/** Render a compact human-readable summary of a report. */
|
|
106
|
+
function renderReport(report) {
|
|
107
|
+
const lines = [];
|
|
108
|
+
const icon = {
|
|
109
|
+
pass: "✓",
|
|
110
|
+
fail: "✗",
|
|
111
|
+
skipped: "-",
|
|
112
|
+
error: "!"
|
|
113
|
+
};
|
|
114
|
+
lines.push(`# ${report.suite.name}@${report.suite.version} vs ${report.target.implementation ?? report.target.origin}`);
|
|
115
|
+
lines.push(`alpha build: ${report.alphaBuild}`);
|
|
116
|
+
for (const result of report.results) lines.push(`${icon[result.status]} [${result.tier}] ${result.id} — ${result.detail}`);
|
|
117
|
+
const s = report.summary;
|
|
118
|
+
lines.push(`${s.pass} pass, ${s.fail} fail (${s.mustFail} must), ${s.skipped} skipped, ${s.error} errored`);
|
|
119
|
+
return lines.join("\n");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region lexicons/space/applyWrites.json
|
|
124
|
+
var applyWrites_default = {
|
|
125
|
+
lexicon: 1,
|
|
126
|
+
id: "com.atproto.space.applyWrites",
|
|
127
|
+
defs: {
|
|
128
|
+
"main": {
|
|
129
|
+
"type": "procedure",
|
|
130
|
+
"description": "Apply a batch transaction of creates, updates, and deletes to a space repo. Requires auth, implemented by PDS.",
|
|
131
|
+
"input": {
|
|
132
|
+
"encoding": "application/json",
|
|
133
|
+
"schema": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"required": [
|
|
136
|
+
"space",
|
|
137
|
+
"repo",
|
|
138
|
+
"writes"
|
|
139
|
+
],
|
|
140
|
+
"properties": {
|
|
141
|
+
"space": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"format": "space-ref"
|
|
144
|
+
},
|
|
145
|
+
"repo": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"format": "did"
|
|
148
|
+
},
|
|
149
|
+
"validate": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"description": "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons."
|
|
152
|
+
},
|
|
153
|
+
"writes": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "union",
|
|
157
|
+
"refs": [
|
|
158
|
+
"#create",
|
|
159
|
+
"#update",
|
|
160
|
+
"#delete"
|
|
161
|
+
],
|
|
162
|
+
"closed": true
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"output": {
|
|
169
|
+
"encoding": "application/json",
|
|
170
|
+
"schema": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"properties": { "results": {
|
|
173
|
+
"type": "array",
|
|
174
|
+
"items": {
|
|
175
|
+
"type": "union",
|
|
176
|
+
"refs": [
|
|
177
|
+
"#createResult",
|
|
178
|
+
"#updateResult",
|
|
179
|
+
"#deleteResult"
|
|
180
|
+
],
|
|
181
|
+
"closed": true
|
|
182
|
+
}
|
|
183
|
+
} }
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"errors": [
|
|
187
|
+
{ "name": "SpaceNotFound" },
|
|
188
|
+
{ "name": "RecordNotFound" },
|
|
189
|
+
{ "name": "RecordAlreadyExists" }
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"create": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"description": "Operation which creates a new record.",
|
|
195
|
+
"required": ["collection", "value"],
|
|
196
|
+
"properties": {
|
|
197
|
+
"collection": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"format": "nsid"
|
|
200
|
+
},
|
|
201
|
+
"rkey": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"format": "record-key"
|
|
204
|
+
},
|
|
205
|
+
"value": { "type": "unknown" }
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"update": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"description": "Operation which updates an existing record.",
|
|
211
|
+
"required": [
|
|
212
|
+
"collection",
|
|
213
|
+
"rkey",
|
|
214
|
+
"value"
|
|
215
|
+
],
|
|
216
|
+
"properties": {
|
|
217
|
+
"collection": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"format": "nsid"
|
|
220
|
+
},
|
|
221
|
+
"rkey": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"format": "record-key"
|
|
224
|
+
},
|
|
225
|
+
"value": { "type": "unknown" }
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"delete": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"description": "Operation which deletes an existing record.",
|
|
231
|
+
"required": ["collection", "rkey"],
|
|
232
|
+
"properties": {
|
|
233
|
+
"collection": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"format": "nsid"
|
|
236
|
+
},
|
|
237
|
+
"rkey": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"format": "record-key"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"createResult": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"required": ["uri", "cid"],
|
|
246
|
+
"properties": {
|
|
247
|
+
"uri": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"format": "at-uri"
|
|
250
|
+
},
|
|
251
|
+
"cid": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"format": "cid"
|
|
254
|
+
},
|
|
255
|
+
"validationStatus": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"knownValues": ["valid", "unknown"]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"updateResult": {
|
|
262
|
+
"type": "object",
|
|
263
|
+
"required": ["uri", "cid"],
|
|
264
|
+
"properties": {
|
|
265
|
+
"uri": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"format": "at-uri"
|
|
268
|
+
},
|
|
269
|
+
"cid": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"format": "cid"
|
|
272
|
+
},
|
|
273
|
+
"validationStatus": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"knownValues": ["valid", "unknown"]
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"deleteResult": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"required": [],
|
|
282
|
+
"properties": {}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
//#endregion
|
|
288
|
+
//#region lexicons/space/authorizeSpaceSync.json
|
|
289
|
+
var authorizeSpaceSync_default = {
|
|
290
|
+
lexicon: 1,
|
|
291
|
+
id: "com.atproto.space.authorizeSpaceSync",
|
|
292
|
+
defs: {
|
|
293
|
+
"main": {
|
|
294
|
+
"type": "procedure",
|
|
295
|
+
"description": "Authorize syncing a space, returning a new credential for reading data across it and the space's current revision, and optionally registering for notifications of updates to it. Depending on the space's policy, a delegation token and/or client attestation may be required. Implemented by the space host.",
|
|
296
|
+
"input": {
|
|
297
|
+
"encoding": "application/json",
|
|
298
|
+
"schema": {
|
|
299
|
+
"type": "object",
|
|
300
|
+
"required": ["space", "credentialKey"],
|
|
301
|
+
"properties": {
|
|
302
|
+
"space": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"format": "space-ref"
|
|
305
|
+
},
|
|
306
|
+
"credentialKey": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"description": "P-256 did:key that the credential is bound to."
|
|
309
|
+
},
|
|
310
|
+
"delegationToken": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"description": "Obtained from getDelegationToken."
|
|
313
|
+
},
|
|
314
|
+
"clientAttestation": { "type": "string" },
|
|
315
|
+
"notify": {
|
|
316
|
+
"type": "ref",
|
|
317
|
+
"ref": "#notify",
|
|
318
|
+
"description": "Register an endpoint to be notified of updates to the space via notifySpaceUpdate. The registration stays active while this credential is valid. After it expires, the endpoint receives only a prompt to reauthorize, or notice of the space's deletion."
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"output": {
|
|
324
|
+
"encoding": "application/json",
|
|
325
|
+
"schema": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"required": ["credential"],
|
|
328
|
+
"properties": {
|
|
329
|
+
"credential": { "type": "string" },
|
|
330
|
+
"spaceRev": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"format": "tid",
|
|
333
|
+
"description": "The space's current revision. Omitted before the space's first update."
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"errors": [
|
|
339
|
+
{
|
|
340
|
+
"name": "SpaceNotFound",
|
|
341
|
+
"description": "May also be returned in place of AccountNotAuthorized, to avoid revealing that the space exists."
|
|
342
|
+
},
|
|
343
|
+
{ "name": "SpaceDeleted" },
|
|
344
|
+
{ "name": "AccountNotAuthorized" },
|
|
345
|
+
{ "name": "AppNotAuthorized" },
|
|
346
|
+
{
|
|
347
|
+
"name": "NotAuthorized",
|
|
348
|
+
"description": "Generic refusal. May be returned in place of AccountNotAuthorized or AppNotAuthorized."
|
|
349
|
+
},
|
|
350
|
+
{ "name": "InvalidDelegationToken" },
|
|
351
|
+
{ "name": "InvalidClientAttestation" },
|
|
352
|
+
{
|
|
353
|
+
"name": "RegistrationNotConfirmed",
|
|
354
|
+
"description": "The notify endpoint did not confirm the registration."
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"name": "RepoTakendown",
|
|
358
|
+
"description": "The space authority has been taken down."
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"name": "RepoDeactivated",
|
|
362
|
+
"description": "The space authority has been deactivated."
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
"notify": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"required": ["endpoint", "token"],
|
|
369
|
+
"properties": {
|
|
370
|
+
"endpoint": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"format": "uri",
|
|
373
|
+
"description": "Base HTTPS URL that notification methods are called against."
|
|
374
|
+
},
|
|
375
|
+
"token": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"maxLength": 512,
|
|
378
|
+
"description": "Opaque secret, included in the body of each request to the endpoint. The endpoint and token together identify the registration, so the token should stay the same across authorizations."
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region lexicons/space/clearRecords.json
|
|
387
|
+
var clearRecords_default = {
|
|
388
|
+
lexicon: 1,
|
|
389
|
+
id: "com.atproto.space.clearRecords",
|
|
390
|
+
defs: { "main": {
|
|
391
|
+
"type": "procedure",
|
|
392
|
+
"description": "Delete all records in the authenticated account's space repo. In the space authority's repo, records published from the space's configuration (such as its policy) are kept. Requires auth, implemented by PDS.",
|
|
393
|
+
"input": {
|
|
394
|
+
"encoding": "application/json",
|
|
395
|
+
"schema": {
|
|
396
|
+
"type": "object",
|
|
397
|
+
"required": ["space", "repo"],
|
|
398
|
+
"properties": {
|
|
399
|
+
"space": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"format": "space-ref"
|
|
402
|
+
},
|
|
403
|
+
"repo": {
|
|
404
|
+
"type": "string",
|
|
405
|
+
"format": "did"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"output": {
|
|
411
|
+
"encoding": "application/json",
|
|
412
|
+
"schema": {
|
|
413
|
+
"type": "object",
|
|
414
|
+
"properties": {}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
} }
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region lexicons/space/confirmRegistration.json
|
|
422
|
+
var confirmRegistration_default = {
|
|
423
|
+
lexicon: 1,
|
|
424
|
+
id: "com.atproto.space.confirmRegistration",
|
|
425
|
+
defs: { "main": {
|
|
426
|
+
"type": "procedure",
|
|
427
|
+
"description": "Confirm a new notification registration. Called by the space host on an endpoint passed to authorizeSpaceSync, before registering it. The syncing service checks that it issued the token for the space, and echoes back the challenge.",
|
|
428
|
+
"input": {
|
|
429
|
+
"encoding": "application/json",
|
|
430
|
+
"schema": {
|
|
431
|
+
"type": "object",
|
|
432
|
+
"required": [
|
|
433
|
+
"space",
|
|
434
|
+
"token",
|
|
435
|
+
"challenge"
|
|
436
|
+
],
|
|
437
|
+
"properties": {
|
|
438
|
+
"space": {
|
|
439
|
+
"type": "string",
|
|
440
|
+
"format": "space-ref"
|
|
441
|
+
},
|
|
442
|
+
"token": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"maxLength": 512
|
|
445
|
+
},
|
|
446
|
+
"challenge": {
|
|
447
|
+
"type": "string",
|
|
448
|
+
"maxLength": 512
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"output": {
|
|
454
|
+
"encoding": "application/json",
|
|
455
|
+
"schema": {
|
|
456
|
+
"type": "object",
|
|
457
|
+
"required": ["challenge"],
|
|
458
|
+
"properties": { "challenge": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"maxLength": 512
|
|
461
|
+
} }
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
} }
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
//#endregion
|
|
468
|
+
//#region lexicons/space/createRecord.json
|
|
469
|
+
var createRecord_default = {
|
|
470
|
+
lexicon: 1,
|
|
471
|
+
id: "com.atproto.space.createRecord",
|
|
472
|
+
defs: { "main": {
|
|
473
|
+
"type": "procedure",
|
|
474
|
+
"description": "Create a single new record in a space repo. Requires auth, implemented by PDS.",
|
|
475
|
+
"input": {
|
|
476
|
+
"encoding": "application/json",
|
|
477
|
+
"schema": {
|
|
478
|
+
"type": "object",
|
|
479
|
+
"required": [
|
|
480
|
+
"space",
|
|
481
|
+
"repo",
|
|
482
|
+
"collection",
|
|
483
|
+
"record"
|
|
484
|
+
],
|
|
485
|
+
"properties": {
|
|
486
|
+
"space": {
|
|
487
|
+
"type": "string",
|
|
488
|
+
"format": "space-ref"
|
|
489
|
+
},
|
|
490
|
+
"repo": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"format": "did"
|
|
493
|
+
},
|
|
494
|
+
"collection": {
|
|
495
|
+
"type": "string",
|
|
496
|
+
"format": "nsid"
|
|
497
|
+
},
|
|
498
|
+
"rkey": {
|
|
499
|
+
"type": "string",
|
|
500
|
+
"format": "record-key"
|
|
501
|
+
},
|
|
502
|
+
"validate": {
|
|
503
|
+
"type": "boolean",
|
|
504
|
+
"description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."
|
|
505
|
+
},
|
|
506
|
+
"record": {
|
|
507
|
+
"type": "unknown",
|
|
508
|
+
"description": "The record itself. Must contain a $type field."
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"output": {
|
|
514
|
+
"encoding": "application/json",
|
|
515
|
+
"schema": {
|
|
516
|
+
"type": "object",
|
|
517
|
+
"required": ["uri", "cid"],
|
|
518
|
+
"properties": {
|
|
519
|
+
"uri": {
|
|
520
|
+
"type": "string",
|
|
521
|
+
"format": "at-uri"
|
|
522
|
+
},
|
|
523
|
+
"cid": {
|
|
524
|
+
"type": "string",
|
|
525
|
+
"format": "cid"
|
|
526
|
+
},
|
|
527
|
+
"validationStatus": {
|
|
528
|
+
"type": "string",
|
|
529
|
+
"knownValues": ["valid", "unknown"]
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"errors": [{ "name": "SpaceNotFound" }, { "name": "RecordAlreadyExists" }]
|
|
535
|
+
} }
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
//#endregion
|
|
539
|
+
//#region lexicons/space/createSpace.json
|
|
540
|
+
var createSpace_default = {
|
|
541
|
+
lexicon: 1,
|
|
542
|
+
id: "com.atproto.space.createSpace",
|
|
543
|
+
defs: { "main": {
|
|
544
|
+
"type": "procedure",
|
|
545
|
+
"description": "Create a new space, with the authenticated account as its authority. Requires auth, implemented by PDS.",
|
|
546
|
+
"input": {
|
|
547
|
+
"encoding": "application/json",
|
|
548
|
+
"schema": {
|
|
549
|
+
"type": "object",
|
|
550
|
+
"required": ["spaceType", "policy"],
|
|
551
|
+
"properties": {
|
|
552
|
+
"spaceType": {
|
|
553
|
+
"type": "string",
|
|
554
|
+
"format": "nsid"
|
|
555
|
+
},
|
|
556
|
+
"skey": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"format": "record-key",
|
|
559
|
+
"description": "Space key. Generated as a TID if not provided."
|
|
560
|
+
},
|
|
561
|
+
"policy": {
|
|
562
|
+
"type": "union",
|
|
563
|
+
"description": "PDSes must support all of the listed policies. Other space hosts may support only some of them, and any host may support policies beyond those listed.",
|
|
564
|
+
"refs": [
|
|
565
|
+
"com.atproto.personalspace.policy",
|
|
566
|
+
"com.atproto.memberspace.policy",
|
|
567
|
+
"com.atproto.managedspace.policy"
|
|
568
|
+
]
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"output": {
|
|
574
|
+
"encoding": "application/json",
|
|
575
|
+
"schema": {
|
|
576
|
+
"type": "object",
|
|
577
|
+
"required": ["space"],
|
|
578
|
+
"properties": { "space": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"format": "space-ref"
|
|
581
|
+
} }
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"errors": [{ "name": "SpaceAlreadyExists" }, { "name": "UnsupportedPolicy" }]
|
|
585
|
+
} }
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region lexicons/space/defs.json
|
|
590
|
+
var defs_default$1 = {
|
|
591
|
+
lexicon: 1,
|
|
592
|
+
id: "com.atproto.space.defs",
|
|
593
|
+
defs: {
|
|
594
|
+
"commit": {
|
|
595
|
+
"type": "object",
|
|
596
|
+
"description": "Commit to the current state of a space repo. Not signed; authenticated by the repo host with a MAC instead.",
|
|
597
|
+
"required": [
|
|
598
|
+
"ver",
|
|
599
|
+
"repo",
|
|
600
|
+
"space",
|
|
601
|
+
"rev",
|
|
602
|
+
"data"
|
|
603
|
+
],
|
|
604
|
+
"properties": {
|
|
605
|
+
"ver": {
|
|
606
|
+
"type": "integer",
|
|
607
|
+
"description": "Commit format version, currently 1."
|
|
608
|
+
},
|
|
609
|
+
"repo": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"format": "did"
|
|
612
|
+
},
|
|
613
|
+
"space": {
|
|
614
|
+
"type": "string",
|
|
615
|
+
"format": "space-ref"
|
|
616
|
+
},
|
|
617
|
+
"rev": {
|
|
618
|
+
"type": "string",
|
|
619
|
+
"format": "tid"
|
|
620
|
+
},
|
|
621
|
+
"data": {
|
|
622
|
+
"type": "bytes",
|
|
623
|
+
"description": "SHA-256 digest of the repo's LtHash state."
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"repoWrite": {
|
|
628
|
+
"type": "object",
|
|
629
|
+
"description": "A repo in the space advanced to a new revision.",
|
|
630
|
+
"required": [
|
|
631
|
+
"repo",
|
|
632
|
+
"repoRev",
|
|
633
|
+
"data",
|
|
634
|
+
"spaceRev"
|
|
635
|
+
],
|
|
636
|
+
"properties": {
|
|
637
|
+
"repo": {
|
|
638
|
+
"type": "string",
|
|
639
|
+
"format": "did"
|
|
640
|
+
},
|
|
641
|
+
"repoRev": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"format": "tid"
|
|
644
|
+
},
|
|
645
|
+
"data": { "type": "bytes" },
|
|
646
|
+
"spaceRev": {
|
|
647
|
+
"type": "string",
|
|
648
|
+
"format": "tid",
|
|
649
|
+
"description": "The space revision at which this update was sequenced."
|
|
650
|
+
},
|
|
651
|
+
"prevSpaceRev": {
|
|
652
|
+
"type": "string",
|
|
653
|
+
"format": "tid",
|
|
654
|
+
"description": "The space revision before this update, if any. Set in notifySpaceUpdate, where a gap indicates missed notifications, which can be recovered with listWriters."
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
"repoRemoved": {
|
|
659
|
+
"type": "object",
|
|
660
|
+
"description": "A repo was removed from the writer set.",
|
|
661
|
+
"required": ["repo", "spaceRev"],
|
|
662
|
+
"properties": {
|
|
663
|
+
"repo": {
|
|
664
|
+
"type": "string",
|
|
665
|
+
"format": "did"
|
|
666
|
+
},
|
|
667
|
+
"spaceRev": {
|
|
668
|
+
"type": "string",
|
|
669
|
+
"format": "tid",
|
|
670
|
+
"description": "The space revision at which this update was sequenced."
|
|
671
|
+
},
|
|
672
|
+
"prevSpaceRev": {
|
|
673
|
+
"type": "string",
|
|
674
|
+
"format": "tid",
|
|
675
|
+
"description": "The space revision before this update, if any. Set in notifySpaceUpdate, where a gap indicates missed notifications, which can be recovered with listWriters."
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
//#endregion
|
|
683
|
+
//#region lexicons/space/deleteRecord.json
|
|
684
|
+
var deleteRecord_default = {
|
|
685
|
+
lexicon: 1,
|
|
686
|
+
id: "com.atproto.space.deleteRecord",
|
|
687
|
+
defs: { "main": {
|
|
688
|
+
"type": "procedure",
|
|
689
|
+
"description": "Delete a record from a space repo, or ensure it doesn't exist. Requires auth, implemented by PDS.",
|
|
690
|
+
"input": {
|
|
691
|
+
"encoding": "application/json",
|
|
692
|
+
"schema": {
|
|
693
|
+
"type": "object",
|
|
694
|
+
"required": [
|
|
695
|
+
"space",
|
|
696
|
+
"repo",
|
|
697
|
+
"collection",
|
|
698
|
+
"rkey"
|
|
699
|
+
],
|
|
700
|
+
"properties": {
|
|
701
|
+
"space": {
|
|
702
|
+
"type": "string",
|
|
703
|
+
"format": "space-ref"
|
|
704
|
+
},
|
|
705
|
+
"repo": {
|
|
706
|
+
"type": "string",
|
|
707
|
+
"format": "did"
|
|
708
|
+
},
|
|
709
|
+
"collection": {
|
|
710
|
+
"type": "string",
|
|
711
|
+
"format": "nsid"
|
|
712
|
+
},
|
|
713
|
+
"rkey": {
|
|
714
|
+
"type": "string",
|
|
715
|
+
"format": "record-key"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
"output": {
|
|
721
|
+
"encoding": "application/json",
|
|
722
|
+
"schema": {
|
|
723
|
+
"type": "object",
|
|
724
|
+
"properties": {}
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
"errors": [{ "name": "SpaceNotFound" }]
|
|
728
|
+
} }
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
//#endregion
|
|
732
|
+
//#region lexicons/space/deleteSpace.json
|
|
733
|
+
var deleteSpace_default = {
|
|
734
|
+
lexicon: 1,
|
|
735
|
+
id: "com.atproto.space.deleteSpace",
|
|
736
|
+
defs: { "main": {
|
|
737
|
+
"type": "procedure",
|
|
738
|
+
"description": "Delete a space, along with the authority's space repo. Requires auth as the space authority, implemented by PDS.",
|
|
739
|
+
"input": {
|
|
740
|
+
"encoding": "application/json",
|
|
741
|
+
"schema": {
|
|
742
|
+
"type": "object",
|
|
743
|
+
"required": ["space"],
|
|
744
|
+
"properties": { "space": {
|
|
745
|
+
"type": "string",
|
|
746
|
+
"format": "space-ref"
|
|
747
|
+
} }
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
"errors": [{ "name": "SpaceNotFound" }, { "name": "NotAuthorized" }]
|
|
751
|
+
} }
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
//#endregion
|
|
755
|
+
//#region lexicons/space/exportSpaceMeta.json
|
|
756
|
+
var exportSpaceMeta_default = {
|
|
757
|
+
lexicon: 1,
|
|
758
|
+
id: "com.atproto.space.exportSpaceMeta",
|
|
759
|
+
defs: { "main": {
|
|
760
|
+
"type": "query",
|
|
761
|
+
"description": "Export a space's state, such as its policy and member list, as a STAR file for account migration. Requires auth as the space authority, implemented by PDS.",
|
|
762
|
+
"parameters": {
|
|
763
|
+
"type": "params",
|
|
764
|
+
"required": ["space"],
|
|
765
|
+
"properties": { "space": {
|
|
766
|
+
"type": "string",
|
|
767
|
+
"format": "space-ref"
|
|
768
|
+
} }
|
|
769
|
+
},
|
|
770
|
+
"output": { "encoding": "application/vnd.dasl.star" },
|
|
771
|
+
"errors": [{ "name": "SpaceNotFound" }, { "name": "NotAuthorized" }]
|
|
772
|
+
} }
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region lexicons/space/getBlob.json
|
|
777
|
+
var getBlob_default = {
|
|
778
|
+
lexicon: 1,
|
|
779
|
+
id: "com.atproto.space.getBlob",
|
|
780
|
+
defs: { "main": {
|
|
781
|
+
"type": "query",
|
|
782
|
+
"description": "Get a blob referenced by a record in a space repo. Returns the full blob as originally uploaded. Requires auth as the repo's account or with a space credential; implemented by PDS.",
|
|
783
|
+
"parameters": {
|
|
784
|
+
"type": "params",
|
|
785
|
+
"required": [
|
|
786
|
+
"space",
|
|
787
|
+
"repo",
|
|
788
|
+
"cid"
|
|
789
|
+
],
|
|
790
|
+
"properties": {
|
|
791
|
+
"space": {
|
|
792
|
+
"type": "string",
|
|
793
|
+
"format": "space-ref"
|
|
794
|
+
},
|
|
795
|
+
"repo": {
|
|
796
|
+
"type": "string",
|
|
797
|
+
"format": "did"
|
|
798
|
+
},
|
|
799
|
+
"cid": {
|
|
800
|
+
"type": "string",
|
|
801
|
+
"format": "cid"
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
"output": { "encoding": "*/*" },
|
|
806
|
+
"errors": [
|
|
807
|
+
{ "name": "BlobNotFound" },
|
|
808
|
+
{ "name": "SpaceNotFound" },
|
|
809
|
+
{ "name": "RepoNotFound" },
|
|
810
|
+
{ "name": "RepoTakendown" },
|
|
811
|
+
{ "name": "RepoSuspended" },
|
|
812
|
+
{ "name": "RepoDeactivated" }
|
|
813
|
+
]
|
|
814
|
+
} }
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
//#endregion
|
|
818
|
+
//#region lexicons/space/getDelegationToken.json
|
|
819
|
+
var getDelegationToken_default = {
|
|
820
|
+
lexicon: 1,
|
|
821
|
+
id: "com.atproto.space.getDelegationToken",
|
|
822
|
+
defs: { "main": {
|
|
823
|
+
"type": "query",
|
|
824
|
+
"description": "Get a delegation token for a space, to exchange with the space host for a space credential. Requires auth, implemented by PDS.",
|
|
825
|
+
"parameters": {
|
|
826
|
+
"type": "params",
|
|
827
|
+
"required": ["space"],
|
|
828
|
+
"properties": { "space": {
|
|
829
|
+
"type": "string",
|
|
830
|
+
"format": "space-ref"
|
|
831
|
+
} }
|
|
832
|
+
},
|
|
833
|
+
"output": {
|
|
834
|
+
"encoding": "application/json",
|
|
835
|
+
"schema": {
|
|
836
|
+
"type": "object",
|
|
837
|
+
"required": ["token"],
|
|
838
|
+
"properties": { "token": { "type": "string" } }
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
} }
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
//#endregion
|
|
845
|
+
//#region lexicons/space/getLatestCommit.json
|
|
846
|
+
var getLatestCommit_default = {
|
|
847
|
+
lexicon: 1,
|
|
848
|
+
id: "com.atproto.space.getLatestCommit",
|
|
849
|
+
defs: { "main": {
|
|
850
|
+
"type": "query",
|
|
851
|
+
"description": "Get the current commit of a space repo. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.",
|
|
852
|
+
"parameters": {
|
|
853
|
+
"type": "params",
|
|
854
|
+
"required": ["space", "repo"],
|
|
855
|
+
"properties": {
|
|
856
|
+
"space": {
|
|
857
|
+
"type": "string",
|
|
858
|
+
"format": "space-ref"
|
|
859
|
+
},
|
|
860
|
+
"repo": {
|
|
861
|
+
"type": "string",
|
|
862
|
+
"format": "did"
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
"output": {
|
|
867
|
+
"encoding": "application/json",
|
|
868
|
+
"schema": {
|
|
869
|
+
"type": "object",
|
|
870
|
+
"properties": { "commit": {
|
|
871
|
+
"type": "ref",
|
|
872
|
+
"ref": "com.atproto.space.defs#commit"
|
|
873
|
+
} },
|
|
874
|
+
"required": ["commit"]
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
"errors": [
|
|
878
|
+
{
|
|
879
|
+
"name": "InvalidSpaceMac",
|
|
880
|
+
"description": "The MAC requested in the Accept-Signature header is missing or invalid."
|
|
881
|
+
},
|
|
882
|
+
{ "name": "SpaceNotFound" },
|
|
883
|
+
{ "name": "RepoNotFound" },
|
|
884
|
+
{ "name": "RepoTakendown" },
|
|
885
|
+
{ "name": "RepoSuspended" },
|
|
886
|
+
{ "name": "RepoDeactivated" }
|
|
887
|
+
]
|
|
888
|
+
} }
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
//#endregion
|
|
892
|
+
//#region lexicons/space/getRecord.json
|
|
893
|
+
var getRecord_default = {
|
|
894
|
+
lexicon: 1,
|
|
895
|
+
id: "com.atproto.space.getRecord",
|
|
896
|
+
defs: { "main": {
|
|
897
|
+
"type": "query",
|
|
898
|
+
"description": "Get a single record from a space repo. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.",
|
|
899
|
+
"parameters": {
|
|
900
|
+
"type": "params",
|
|
901
|
+
"required": [
|
|
902
|
+
"space",
|
|
903
|
+
"repo",
|
|
904
|
+
"collection",
|
|
905
|
+
"rkey"
|
|
906
|
+
],
|
|
907
|
+
"properties": {
|
|
908
|
+
"space": {
|
|
909
|
+
"type": "string",
|
|
910
|
+
"format": "space-ref"
|
|
911
|
+
},
|
|
912
|
+
"repo": {
|
|
913
|
+
"type": "string",
|
|
914
|
+
"format": "did"
|
|
915
|
+
},
|
|
916
|
+
"collection": {
|
|
917
|
+
"type": "string",
|
|
918
|
+
"format": "nsid"
|
|
919
|
+
},
|
|
920
|
+
"rkey": {
|
|
921
|
+
"type": "string",
|
|
922
|
+
"format": "record-key"
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
"output": {
|
|
927
|
+
"encoding": "application/json",
|
|
928
|
+
"schema": {
|
|
929
|
+
"type": "object",
|
|
930
|
+
"required": [
|
|
931
|
+
"uri",
|
|
932
|
+
"cid",
|
|
933
|
+
"value"
|
|
934
|
+
],
|
|
935
|
+
"properties": {
|
|
936
|
+
"uri": {
|
|
937
|
+
"type": "string",
|
|
938
|
+
"format": "at-uri"
|
|
939
|
+
},
|
|
940
|
+
"cid": {
|
|
941
|
+
"type": "string",
|
|
942
|
+
"format": "cid"
|
|
943
|
+
},
|
|
944
|
+
"value": { "type": "unknown" }
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
"errors": [
|
|
949
|
+
{
|
|
950
|
+
"name": "InvalidSpaceMac",
|
|
951
|
+
"description": "The MAC requested in the Accept-Signature header is missing or invalid."
|
|
952
|
+
},
|
|
953
|
+
{ "name": "RecordNotFound" },
|
|
954
|
+
{ "name": "SpaceNotFound" },
|
|
955
|
+
{ "name": "RepoNotFound" },
|
|
956
|
+
{ "name": "RepoTakendown" },
|
|
957
|
+
{ "name": "RepoSuspended" },
|
|
958
|
+
{ "name": "RepoDeactivated" }
|
|
959
|
+
]
|
|
960
|
+
} }
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region lexicons/space/getRepo.json
|
|
965
|
+
var getRepo_default = {
|
|
966
|
+
lexicon: 1,
|
|
967
|
+
id: "com.atproto.space.getRepo",
|
|
968
|
+
defs: { "main": {
|
|
969
|
+
"type": "query",
|
|
970
|
+
"description": "Download a space repo as a STAR file. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.",
|
|
971
|
+
"parameters": {
|
|
972
|
+
"type": "params",
|
|
973
|
+
"required": ["space", "repo"],
|
|
974
|
+
"properties": {
|
|
975
|
+
"space": {
|
|
976
|
+
"type": "string",
|
|
977
|
+
"format": "space-ref"
|
|
978
|
+
},
|
|
979
|
+
"repo": {
|
|
980
|
+
"type": "string",
|
|
981
|
+
"format": "did"
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
"output": { "encoding": "application/vnd.dasl.star" },
|
|
986
|
+
"errors": [
|
|
987
|
+
{
|
|
988
|
+
"name": "InvalidSpaceMac",
|
|
989
|
+
"description": "The MAC requested in the Accept-Signature header is missing or invalid."
|
|
990
|
+
},
|
|
991
|
+
{ "name": "SpaceNotFound" },
|
|
992
|
+
{ "name": "RepoNotFound" },
|
|
993
|
+
{ "name": "RepoTakendown" },
|
|
994
|
+
{ "name": "RepoSuspended" },
|
|
995
|
+
{ "name": "RepoDeactivated" }
|
|
996
|
+
]
|
|
997
|
+
} }
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
//#endregion
|
|
1001
|
+
//#region lexicons/space/getSpace.json
|
|
1002
|
+
var getSpace_default = {
|
|
1003
|
+
lexicon: 1,
|
|
1004
|
+
id: "com.atproto.space.getSpace",
|
|
1005
|
+
defs: { "main": {
|
|
1006
|
+
"type": "query",
|
|
1007
|
+
"description": "Get a space and its policy. Requires auth as the space authority, implemented by PDS.",
|
|
1008
|
+
"parameters": {
|
|
1009
|
+
"type": "params",
|
|
1010
|
+
"required": ["space"],
|
|
1011
|
+
"properties": { "space": {
|
|
1012
|
+
"type": "string",
|
|
1013
|
+
"format": "space-ref"
|
|
1014
|
+
} }
|
|
1015
|
+
},
|
|
1016
|
+
"output": {
|
|
1017
|
+
"encoding": "application/json",
|
|
1018
|
+
"schema": {
|
|
1019
|
+
"type": "object",
|
|
1020
|
+
"required": ["space", "policy"],
|
|
1021
|
+
"properties": {
|
|
1022
|
+
"space": {
|
|
1023
|
+
"type": "string",
|
|
1024
|
+
"format": "space-ref"
|
|
1025
|
+
},
|
|
1026
|
+
"policy": {
|
|
1027
|
+
"type": "union",
|
|
1028
|
+
"description": "PDSes must support all of the listed policies. Other space hosts may support only some of them, and any host may support policies beyond those listed.",
|
|
1029
|
+
"refs": [
|
|
1030
|
+
"com.atproto.personalspace.policy",
|
|
1031
|
+
"com.atproto.memberspace.policy",
|
|
1032
|
+
"com.atproto.managedspace.policy"
|
|
1033
|
+
]
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
"errors": [{ "name": "SpaceNotFound" }, { "name": "NotAuthorized" }]
|
|
1039
|
+
} }
|
|
1040
|
+
};
|
|
1041
|
+
|
|
1042
|
+
//#endregion
|
|
1043
|
+
//#region lexicons/space/importRepo.json
|
|
1044
|
+
var importRepo_default = {
|
|
1045
|
+
lexicon: 1,
|
|
1046
|
+
id: "com.atproto.space.importRepo",
|
|
1047
|
+
defs: { "main": {
|
|
1048
|
+
"type": "procedure",
|
|
1049
|
+
"description": "Import the authenticated account's space repo from a STAR file, for account migration. If the account is the space's authority, the space must first be imported with importSpaceMeta. Requires auth, implemented by PDS.",
|
|
1050
|
+
"input": { "encoding": "application/vnd.dasl.star" },
|
|
1051
|
+
"errors": [
|
|
1052
|
+
{
|
|
1053
|
+
"name": "SpaceNotFound",
|
|
1054
|
+
"description": "The account is the space's authority, and the space has not been imported yet."
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"name": "InvalidRepoFile",
|
|
1058
|
+
"description": "The STAR file is malformed or fails verification."
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"name": "RepoMismatch",
|
|
1062
|
+
"description": "The repo in the STAR file does not belong to the authenticated account."
|
|
1063
|
+
}
|
|
1064
|
+
]
|
|
1065
|
+
} }
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
//#endregion
|
|
1069
|
+
//#region lexicons/space/importSpaceMeta.json
|
|
1070
|
+
var importSpaceMeta_default = {
|
|
1071
|
+
lexicon: 1,
|
|
1072
|
+
id: "com.atproto.space.importSpaceMeta",
|
|
1073
|
+
defs: { "main": {
|
|
1074
|
+
"type": "procedure",
|
|
1075
|
+
"description": "Import a space's state from an archive produced by exportSpaceMeta, for account migration. Must be called before importing the authority's space repo with importRepo. Requires auth as the space authority, implemented by PDS.",
|
|
1076
|
+
"input": { "encoding": "application/vnd.dasl.star" },
|
|
1077
|
+
"errors": [
|
|
1078
|
+
{ "name": "NotAuthorized" },
|
|
1079
|
+
{ "name": "UnsupportedPolicy" },
|
|
1080
|
+
{
|
|
1081
|
+
"name": "InvalidSpaceMeta",
|
|
1082
|
+
"description": "The STAR file is malformed or fails verification."
|
|
1083
|
+
}
|
|
1084
|
+
]
|
|
1085
|
+
} }
|
|
1086
|
+
};
|
|
1087
|
+
|
|
1088
|
+
//#endregion
|
|
1089
|
+
//#region lexicons/space/listBlobs.json
|
|
1090
|
+
var listBlobs_default = {
|
|
1091
|
+
lexicon: 1,
|
|
1092
|
+
id: "com.atproto.space.listBlobs",
|
|
1093
|
+
defs: { "main": {
|
|
1094
|
+
"type": "query",
|
|
1095
|
+
"description": "List blob CIDs referenced by records in a space repo. Requires auth as the repo's account or with a space credential; implemented by PDS.",
|
|
1096
|
+
"parameters": {
|
|
1097
|
+
"type": "params",
|
|
1098
|
+
"required": ["space", "repo"],
|
|
1099
|
+
"properties": {
|
|
1100
|
+
"space": {
|
|
1101
|
+
"type": "string",
|
|
1102
|
+
"format": "space-ref"
|
|
1103
|
+
},
|
|
1104
|
+
"repo": {
|
|
1105
|
+
"type": "string",
|
|
1106
|
+
"format": "did"
|
|
1107
|
+
},
|
|
1108
|
+
"limit": {
|
|
1109
|
+
"type": "integer",
|
|
1110
|
+
"minimum": 1,
|
|
1111
|
+
"maximum": 1e3,
|
|
1112
|
+
"default": 500
|
|
1113
|
+
},
|
|
1114
|
+
"cursor": { "type": "string" }
|
|
1115
|
+
}
|
|
1116
|
+
},
|
|
1117
|
+
"output": {
|
|
1118
|
+
"encoding": "application/json",
|
|
1119
|
+
"schema": {
|
|
1120
|
+
"type": "object",
|
|
1121
|
+
"required": ["cids"],
|
|
1122
|
+
"properties": {
|
|
1123
|
+
"cursor": { "type": "string" },
|
|
1124
|
+
"cids": {
|
|
1125
|
+
"type": "array",
|
|
1126
|
+
"items": {
|
|
1127
|
+
"type": "string",
|
|
1128
|
+
"format": "cid"
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
"errors": [
|
|
1135
|
+
{ "name": "SpaceNotFound" },
|
|
1136
|
+
{ "name": "RepoNotFound" },
|
|
1137
|
+
{ "name": "RepoTakendown" },
|
|
1138
|
+
{ "name": "RepoSuspended" },
|
|
1139
|
+
{ "name": "RepoDeactivated" }
|
|
1140
|
+
]
|
|
1141
|
+
} }
|
|
1142
|
+
};
|
|
1143
|
+
|
|
1144
|
+
//#endregion
|
|
1145
|
+
//#region lexicons/space/listRecords.json
|
|
1146
|
+
var listRecords_default = {
|
|
1147
|
+
lexicon: 1,
|
|
1148
|
+
id: "com.atproto.space.listRecords",
|
|
1149
|
+
defs: {
|
|
1150
|
+
"main": {
|
|
1151
|
+
"type": "query",
|
|
1152
|
+
"description": "List records in a space repo, optionally filtered by collection. Requires auth as the repo's account or with a space credential; implemented by PDS.",
|
|
1153
|
+
"parameters": {
|
|
1154
|
+
"type": "params",
|
|
1155
|
+
"required": ["space", "repo"],
|
|
1156
|
+
"properties": {
|
|
1157
|
+
"space": {
|
|
1158
|
+
"type": "string",
|
|
1159
|
+
"format": "space-ref"
|
|
1160
|
+
},
|
|
1161
|
+
"repo": {
|
|
1162
|
+
"type": "string",
|
|
1163
|
+
"format": "did"
|
|
1164
|
+
},
|
|
1165
|
+
"collection": {
|
|
1166
|
+
"type": "string",
|
|
1167
|
+
"format": "nsid",
|
|
1168
|
+
"description": "If omitted, lists records across all collections."
|
|
1169
|
+
},
|
|
1170
|
+
"limit": {
|
|
1171
|
+
"type": "integer",
|
|
1172
|
+
"minimum": 1,
|
|
1173
|
+
"maximum": 1e3,
|
|
1174
|
+
"default": 50
|
|
1175
|
+
},
|
|
1176
|
+
"cursor": { "type": "string" },
|
|
1177
|
+
"excludeValues": {
|
|
1178
|
+
"type": "boolean",
|
|
1179
|
+
"default": false
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
},
|
|
1183
|
+
"output": {
|
|
1184
|
+
"encoding": "application/json",
|
|
1185
|
+
"schema": {
|
|
1186
|
+
"type": "object",
|
|
1187
|
+
"required": ["records"],
|
|
1188
|
+
"properties": {
|
|
1189
|
+
"cursor": { "type": "string" },
|
|
1190
|
+
"records": {
|
|
1191
|
+
"type": "array",
|
|
1192
|
+
"items": {
|
|
1193
|
+
"type": "ref",
|
|
1194
|
+
"ref": "#record"
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
"errors": [
|
|
1201
|
+
{ "name": "SpaceNotFound" },
|
|
1202
|
+
{ "name": "RepoNotFound" },
|
|
1203
|
+
{ "name": "RepoTakendown" },
|
|
1204
|
+
{ "name": "RepoSuspended" },
|
|
1205
|
+
{ "name": "RepoDeactivated" },
|
|
1206
|
+
{ "name": "InvalidCursor" }
|
|
1207
|
+
]
|
|
1208
|
+
},
|
|
1209
|
+
"record": {
|
|
1210
|
+
"type": "object",
|
|
1211
|
+
"required": [
|
|
1212
|
+
"collection",
|
|
1213
|
+
"rkey",
|
|
1214
|
+
"cid"
|
|
1215
|
+
],
|
|
1216
|
+
"properties": {
|
|
1217
|
+
"collection": {
|
|
1218
|
+
"type": "string",
|
|
1219
|
+
"format": "nsid"
|
|
1220
|
+
},
|
|
1221
|
+
"rkey": {
|
|
1222
|
+
"type": "string",
|
|
1223
|
+
"format": "record-key"
|
|
1224
|
+
},
|
|
1225
|
+
"cid": {
|
|
1226
|
+
"type": "string",
|
|
1227
|
+
"format": "cid"
|
|
1228
|
+
},
|
|
1229
|
+
"value": { "type": "unknown" }
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1235
|
+
//#endregion
|
|
1236
|
+
//#region lexicons/space/listRepoOps.json
|
|
1237
|
+
var listRepoOps_default = {
|
|
1238
|
+
lexicon: 1,
|
|
1239
|
+
id: "com.atproto.space.listRepoOps",
|
|
1240
|
+
defs: {
|
|
1241
|
+
"main": {
|
|
1242
|
+
"type": "query",
|
|
1243
|
+
"description": "List operations on a space repo after a given revision. Used for incremental sync. Hosts may truncate the log, so use getRepo for a full sync. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.",
|
|
1244
|
+
"parameters": {
|
|
1245
|
+
"type": "params",
|
|
1246
|
+
"required": ["space", "repo"],
|
|
1247
|
+
"properties": {
|
|
1248
|
+
"space": {
|
|
1249
|
+
"type": "string",
|
|
1250
|
+
"format": "space-ref"
|
|
1251
|
+
},
|
|
1252
|
+
"repo": {
|
|
1253
|
+
"type": "string",
|
|
1254
|
+
"format": "did"
|
|
1255
|
+
},
|
|
1256
|
+
"since": {
|
|
1257
|
+
"type": "string",
|
|
1258
|
+
"format": "tid"
|
|
1259
|
+
},
|
|
1260
|
+
"limit": {
|
|
1261
|
+
"type": "integer",
|
|
1262
|
+
"minimum": 1,
|
|
1263
|
+
"maximum": 1e3,
|
|
1264
|
+
"default": 100
|
|
1265
|
+
},
|
|
1266
|
+
"cursor": { "type": "string" },
|
|
1267
|
+
"excludeValues": {
|
|
1268
|
+
"type": "boolean",
|
|
1269
|
+
"default": false
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
"output": {
|
|
1274
|
+
"encoding": "application/json",
|
|
1275
|
+
"schema": {
|
|
1276
|
+
"type": "object",
|
|
1277
|
+
"required": ["ops", "commit"],
|
|
1278
|
+
"properties": {
|
|
1279
|
+
"ops": {
|
|
1280
|
+
"type": "array",
|
|
1281
|
+
"items": {
|
|
1282
|
+
"type": "ref",
|
|
1283
|
+
"ref": "#opEntry"
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1286
|
+
"commit": {
|
|
1287
|
+
"type": "ref",
|
|
1288
|
+
"ref": "com.atproto.space.defs#commit",
|
|
1289
|
+
"description": "The repo's current commit. A syncer compares it against its own set hash once it has applied the last page, which has no cursor."
|
|
1290
|
+
},
|
|
1291
|
+
"cursor": { "type": "string" }
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
"errors": [
|
|
1296
|
+
{
|
|
1297
|
+
"name": "InvalidSpaceMac",
|
|
1298
|
+
"description": "The MAC requested in the Accept-Signature header is missing or invalid."
|
|
1299
|
+
},
|
|
1300
|
+
{ "name": "SpaceNotFound" },
|
|
1301
|
+
{ "name": "RepoNotFound" },
|
|
1302
|
+
{ "name": "RepoTakendown" },
|
|
1303
|
+
{ "name": "RepoSuspended" },
|
|
1304
|
+
{ "name": "RepoDeactivated" },
|
|
1305
|
+
{ "name": "InvalidCursor" }
|
|
1306
|
+
]
|
|
1307
|
+
},
|
|
1308
|
+
"opEntry": {
|
|
1309
|
+
"type": "object",
|
|
1310
|
+
"description": "Operations that share a rev were applied in the same commit.",
|
|
1311
|
+
"required": [
|
|
1312
|
+
"rev",
|
|
1313
|
+
"collection",
|
|
1314
|
+
"rkey",
|
|
1315
|
+
"cid",
|
|
1316
|
+
"prev"
|
|
1317
|
+
],
|
|
1318
|
+
"nullable": ["cid", "prev"],
|
|
1319
|
+
"properties": {
|
|
1320
|
+
"rev": {
|
|
1321
|
+
"type": "string",
|
|
1322
|
+
"format": "tid"
|
|
1323
|
+
},
|
|
1324
|
+
"collection": {
|
|
1325
|
+
"type": "string",
|
|
1326
|
+
"format": "nsid"
|
|
1327
|
+
},
|
|
1328
|
+
"rkey": {
|
|
1329
|
+
"type": "string",
|
|
1330
|
+
"format": "record-key"
|
|
1331
|
+
},
|
|
1332
|
+
"cid": {
|
|
1333
|
+
"type": "string",
|
|
1334
|
+
"format": "cid",
|
|
1335
|
+
"description": "CID of the record after the operation. Null for deletes."
|
|
1336
|
+
},
|
|
1337
|
+
"prev": {
|
|
1338
|
+
"type": "string",
|
|
1339
|
+
"format": "cid",
|
|
1340
|
+
"description": "CID of the record before the operation. Null for creates."
|
|
1341
|
+
},
|
|
1342
|
+
"value": {
|
|
1343
|
+
"type": "unknown",
|
|
1344
|
+
"description": "Omitted for deletes, if excludeValues is set, or if the record has since changed."
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
//#endregion
|
|
1352
|
+
//#region lexicons/space/listSpaces.json
|
|
1353
|
+
var listSpaces_default = {
|
|
1354
|
+
lexicon: 1,
|
|
1355
|
+
id: "com.atproto.space.listSpaces",
|
|
1356
|
+
defs: {
|
|
1357
|
+
"main": {
|
|
1358
|
+
"type": "query",
|
|
1359
|
+
"description": "List spaces that the authenticated account has written to or is the authority for. Requires auth, implemented by PDS.",
|
|
1360
|
+
"parameters": {
|
|
1361
|
+
"type": "params",
|
|
1362
|
+
"properties": {
|
|
1363
|
+
"spaceDid": {
|
|
1364
|
+
"type": "string",
|
|
1365
|
+
"format": "did",
|
|
1366
|
+
"description": "Filter to spaces with this DID as their authority."
|
|
1367
|
+
},
|
|
1368
|
+
"spaceType": {
|
|
1369
|
+
"type": "string",
|
|
1370
|
+
"format": "nsid"
|
|
1371
|
+
},
|
|
1372
|
+
"limit": {
|
|
1373
|
+
"type": "integer",
|
|
1374
|
+
"minimum": 1,
|
|
1375
|
+
"maximum": 100,
|
|
1376
|
+
"default": 50
|
|
1377
|
+
},
|
|
1378
|
+
"cursor": { "type": "string" }
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
"output": {
|
|
1382
|
+
"encoding": "application/json",
|
|
1383
|
+
"schema": {
|
|
1384
|
+
"type": "object",
|
|
1385
|
+
"required": ["spaces"],
|
|
1386
|
+
"properties": {
|
|
1387
|
+
"cursor": { "type": "string" },
|
|
1388
|
+
"spaces": {
|
|
1389
|
+
"type": "array",
|
|
1390
|
+
"items": {
|
|
1391
|
+
"type": "ref",
|
|
1392
|
+
"ref": "#spaceView"
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
"errors": [{ "name": "InvalidCursor" }]
|
|
1399
|
+
},
|
|
1400
|
+
"spaceView": {
|
|
1401
|
+
"type": "object",
|
|
1402
|
+
"required": ["space"],
|
|
1403
|
+
"properties": {
|
|
1404
|
+
"space": {
|
|
1405
|
+
"type": "string",
|
|
1406
|
+
"format": "space-ref"
|
|
1407
|
+
},
|
|
1408
|
+
"repoRev": {
|
|
1409
|
+
"type": "string",
|
|
1410
|
+
"format": "tid",
|
|
1411
|
+
"description": "The current revision of the account's repo in the space, if it has one."
|
|
1412
|
+
},
|
|
1413
|
+
"data": {
|
|
1414
|
+
"type": "bytes",
|
|
1415
|
+
"description": "The current commit data of the account's repo in the space, if it has one."
|
|
1416
|
+
},
|
|
1417
|
+
"spaceRev": {
|
|
1418
|
+
"type": "string",
|
|
1419
|
+
"format": "tid",
|
|
1420
|
+
"description": "The current revision of the space. Only included if the account is the space's authority."
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
//#endregion
|
|
1428
|
+
//#region lexicons/space/listWriters.json
|
|
1429
|
+
var listWriters_default = {
|
|
1430
|
+
lexicon: 1,
|
|
1431
|
+
id: "com.atproto.space.listWriters",
|
|
1432
|
+
defs: { "main": {
|
|
1433
|
+
"type": "query",
|
|
1434
|
+
"description": "List the repos in a space's writer set, with the latest known state of each: its current revision, or its removal from the writer set. Requires a space credential, implemented by the space host.",
|
|
1435
|
+
"parameters": {
|
|
1436
|
+
"type": "params",
|
|
1437
|
+
"required": ["space"],
|
|
1438
|
+
"properties": {
|
|
1439
|
+
"space": {
|
|
1440
|
+
"type": "string",
|
|
1441
|
+
"format": "space-ref"
|
|
1442
|
+
},
|
|
1443
|
+
"limit": {
|
|
1444
|
+
"type": "integer",
|
|
1445
|
+
"minimum": 1,
|
|
1446
|
+
"maximum": 1e3,
|
|
1447
|
+
"default": 100
|
|
1448
|
+
},
|
|
1449
|
+
"cursor": {
|
|
1450
|
+
"type": "string",
|
|
1451
|
+
"description": "Return repos updated after this space revision. Removed repos may be garbage collected after 72 hrs, so a syncer whose last seen space revision is older should list the whole writer set instead."
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
"output": {
|
|
1456
|
+
"encoding": "application/json",
|
|
1457
|
+
"schema": {
|
|
1458
|
+
"type": "object",
|
|
1459
|
+
"required": ["repos"],
|
|
1460
|
+
"properties": {
|
|
1461
|
+
"repos": {
|
|
1462
|
+
"type": "array",
|
|
1463
|
+
"items": {
|
|
1464
|
+
"type": "union",
|
|
1465
|
+
"refs": ["com.atproto.space.defs#repoWrite", "com.atproto.space.defs#repoRemoved"]
|
|
1466
|
+
},
|
|
1467
|
+
"description": "The latest update to each repo, ordered by spaceRev, ascending. prevSpaceRev is not set."
|
|
1468
|
+
},
|
|
1469
|
+
"cursor": { "type": "string" }
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
"errors": [
|
|
1474
|
+
{ "name": "SpaceNotFound" },
|
|
1475
|
+
{
|
|
1476
|
+
"name": "RepoTakendown",
|
|
1477
|
+
"description": "The space authority has been taken down."
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"name": "RepoDeactivated",
|
|
1481
|
+
"description": "The space authority has been deactivated."
|
|
1482
|
+
}
|
|
1483
|
+
]
|
|
1484
|
+
} }
|
|
1485
|
+
};
|
|
1486
|
+
|
|
1487
|
+
//#endregion
|
|
1488
|
+
//#region lexicons/space/notifyCredentialsRevoked.json
|
|
1489
|
+
var notifyCredentialsRevoked_default = {
|
|
1490
|
+
lexicon: 1,
|
|
1491
|
+
id: "com.atproto.space.notifyCredentialsRevoked",
|
|
1492
|
+
defs: { "main": {
|
|
1493
|
+
"type": "procedure",
|
|
1494
|
+
"description": "Notify a repo host that space credentials have been revoked. Sent by the space host. Requires service auth, implemented by PDS.",
|
|
1495
|
+
"input": {
|
|
1496
|
+
"encoding": "application/json",
|
|
1497
|
+
"schema": {
|
|
1498
|
+
"type": "object",
|
|
1499
|
+
"required": ["space", "credentials"],
|
|
1500
|
+
"properties": {
|
|
1501
|
+
"space": {
|
|
1502
|
+
"type": "string",
|
|
1503
|
+
"format": "space-ref"
|
|
1504
|
+
},
|
|
1505
|
+
"credentials": {
|
|
1506
|
+
"type": "array",
|
|
1507
|
+
"minLength": 1,
|
|
1508
|
+
"maxLength": 100,
|
|
1509
|
+
"description": "The IDs (jti) of the revoked credentials.",
|
|
1510
|
+
"items": {
|
|
1511
|
+
"type": "string",
|
|
1512
|
+
"minLength": 1
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
} }
|
|
1519
|
+
};
|
|
1520
|
+
|
|
1521
|
+
//#endregion
|
|
1522
|
+
//#region lexicons/space/notifyRepoUpdate.json
|
|
1523
|
+
var notifyRepoUpdate_default = {
|
|
1524
|
+
lexicon: 1,
|
|
1525
|
+
id: "com.atproto.space.notifyRepoUpdate",
|
|
1526
|
+
defs: { "main": {
|
|
1527
|
+
"type": "procedure",
|
|
1528
|
+
"description": "Notify the space host that a space repo has been updated. Sent by repo hosts, with service auth.",
|
|
1529
|
+
"input": {
|
|
1530
|
+
"encoding": "application/json",
|
|
1531
|
+
"schema": {
|
|
1532
|
+
"type": "object",
|
|
1533
|
+
"required": [
|
|
1534
|
+
"space",
|
|
1535
|
+
"repo",
|
|
1536
|
+
"repoRev",
|
|
1537
|
+
"data"
|
|
1538
|
+
],
|
|
1539
|
+
"properties": {
|
|
1540
|
+
"space": {
|
|
1541
|
+
"type": "string",
|
|
1542
|
+
"format": "space-ref"
|
|
1543
|
+
},
|
|
1544
|
+
"repo": {
|
|
1545
|
+
"type": "string",
|
|
1546
|
+
"format": "did"
|
|
1547
|
+
},
|
|
1548
|
+
"repoRev": {
|
|
1549
|
+
"type": "string",
|
|
1550
|
+
"format": "tid"
|
|
1551
|
+
},
|
|
1552
|
+
"data": { "type": "bytes" }
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
},
|
|
1556
|
+
"errors": [{ "name": "SpaceNotFound" }, {
|
|
1557
|
+
"name": "FutureRev",
|
|
1558
|
+
"description": "The repo revision is too far in the future."
|
|
1559
|
+
}]
|
|
1560
|
+
} }
|
|
1561
|
+
};
|
|
1562
|
+
|
|
1563
|
+
//#endregion
|
|
1564
|
+
//#region lexicons/space/notifySpaceUpdate.json
|
|
1565
|
+
var notifySpaceUpdate_default = {
|
|
1566
|
+
lexicon: 1,
|
|
1567
|
+
id: "com.atproto.space.notifySpaceUpdate",
|
|
1568
|
+
defs: {
|
|
1569
|
+
"main": {
|
|
1570
|
+
"type": "procedure",
|
|
1571
|
+
"description": "Notify a syncing service of an update to a space. Sent by the space host to the notification endpoint registered through authorizeSpaceSync.",
|
|
1572
|
+
"input": {
|
|
1573
|
+
"encoding": "application/json",
|
|
1574
|
+
"schema": {
|
|
1575
|
+
"type": "object",
|
|
1576
|
+
"required": [
|
|
1577
|
+
"space",
|
|
1578
|
+
"token",
|
|
1579
|
+
"update"
|
|
1580
|
+
],
|
|
1581
|
+
"properties": {
|
|
1582
|
+
"space": {
|
|
1583
|
+
"type": "string",
|
|
1584
|
+
"format": "space-ref"
|
|
1585
|
+
},
|
|
1586
|
+
"token": {
|
|
1587
|
+
"type": "string",
|
|
1588
|
+
"maxLength": 512,
|
|
1589
|
+
"description": "The token the endpoint was registered with."
|
|
1590
|
+
},
|
|
1591
|
+
"update": {
|
|
1592
|
+
"type": "union",
|
|
1593
|
+
"refs": [
|
|
1594
|
+
"com.atproto.space.defs#repoWrite",
|
|
1595
|
+
"com.atproto.space.defs#repoRemoved",
|
|
1596
|
+
"#spaceDeleted",
|
|
1597
|
+
"#registrationExpired"
|
|
1598
|
+
]
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
"spaceDeleted": {
|
|
1605
|
+
"type": "object",
|
|
1606
|
+
"description": "The space has been deleted. Confirm with authorizeSpaceSync before dropping its data.",
|
|
1607
|
+
"properties": {}
|
|
1608
|
+
},
|
|
1609
|
+
"registrationExpired": {
|
|
1610
|
+
"type": "object",
|
|
1611
|
+
"description": "The endpoint's registration has expired. Sent in place of the first update after expiry. Call authorizeSpaceSync to keep receiving notifications.",
|
|
1612
|
+
"required": ["spaceRev"],
|
|
1613
|
+
"properties": { "spaceRev": {
|
|
1614
|
+
"type": "string",
|
|
1615
|
+
"format": "tid"
|
|
1616
|
+
} }
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
|
|
1621
|
+
//#endregion
|
|
1622
|
+
//#region lexicons/space/policy.json
|
|
1623
|
+
var policy_default$3 = {
|
|
1624
|
+
lexicon: 1,
|
|
1625
|
+
id: "com.atproto.space.policy",
|
|
1626
|
+
defs: { "main": {
|
|
1627
|
+
"type": "record",
|
|
1628
|
+
"description": "A published copy of a space's policy. Only authoritative in the space authority's repo.",
|
|
1629
|
+
"key": "literal:self",
|
|
1630
|
+
"record": {
|
|
1631
|
+
"type": "object",
|
|
1632
|
+
"required": ["policy"],
|
|
1633
|
+
"properties": { "policy": {
|
|
1634
|
+
"type": "union",
|
|
1635
|
+
"description": "PDSes must support all of the listed policies. Other space hosts may support only some of them, and any host may support policies beyond those listed.",
|
|
1636
|
+
"refs": [
|
|
1637
|
+
"com.atproto.personalspace.policy",
|
|
1638
|
+
"com.atproto.memberspace.policy",
|
|
1639
|
+
"com.atproto.managedspace.policy"
|
|
1640
|
+
]
|
|
1641
|
+
} }
|
|
1642
|
+
}
|
|
1643
|
+
} }
|
|
1644
|
+
};
|
|
1645
|
+
|
|
1646
|
+
//#endregion
|
|
1647
|
+
//#region lexicons/space/putRecord.json
|
|
1648
|
+
var putRecord_default = {
|
|
1649
|
+
lexicon: 1,
|
|
1650
|
+
id: "com.atproto.space.putRecord",
|
|
1651
|
+
defs: { "main": {
|
|
1652
|
+
"type": "procedure",
|
|
1653
|
+
"description": "Write a record in a space repo, creating or updating it as needed. Requires auth, implemented by PDS.",
|
|
1654
|
+
"input": {
|
|
1655
|
+
"encoding": "application/json",
|
|
1656
|
+
"schema": {
|
|
1657
|
+
"type": "object",
|
|
1658
|
+
"required": [
|
|
1659
|
+
"space",
|
|
1660
|
+
"repo",
|
|
1661
|
+
"collection",
|
|
1662
|
+
"rkey",
|
|
1663
|
+
"record"
|
|
1664
|
+
],
|
|
1665
|
+
"properties": {
|
|
1666
|
+
"space": {
|
|
1667
|
+
"type": "string",
|
|
1668
|
+
"format": "space-ref"
|
|
1669
|
+
},
|
|
1670
|
+
"repo": {
|
|
1671
|
+
"type": "string",
|
|
1672
|
+
"format": "did"
|
|
1673
|
+
},
|
|
1674
|
+
"collection": {
|
|
1675
|
+
"type": "string",
|
|
1676
|
+
"format": "nsid"
|
|
1677
|
+
},
|
|
1678
|
+
"rkey": {
|
|
1679
|
+
"type": "string",
|
|
1680
|
+
"format": "record-key"
|
|
1681
|
+
},
|
|
1682
|
+
"validate": {
|
|
1683
|
+
"type": "boolean",
|
|
1684
|
+
"description": "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."
|
|
1685
|
+
},
|
|
1686
|
+
"record": { "type": "unknown" }
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
"output": {
|
|
1691
|
+
"encoding": "application/json",
|
|
1692
|
+
"schema": {
|
|
1693
|
+
"type": "object",
|
|
1694
|
+
"required": ["uri", "cid"],
|
|
1695
|
+
"properties": {
|
|
1696
|
+
"uri": {
|
|
1697
|
+
"type": "string",
|
|
1698
|
+
"format": "at-uri"
|
|
1699
|
+
},
|
|
1700
|
+
"cid": {
|
|
1701
|
+
"type": "string",
|
|
1702
|
+
"format": "cid"
|
|
1703
|
+
},
|
|
1704
|
+
"validationStatus": {
|
|
1705
|
+
"type": "string",
|
|
1706
|
+
"knownValues": ["valid", "unknown"]
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
"errors": [{ "name": "SpaceNotFound" }]
|
|
1712
|
+
} }
|
|
1713
|
+
};
|
|
1714
|
+
|
|
1715
|
+
//#endregion
|
|
1716
|
+
//#region lexicons/space/removeWriter.json
|
|
1717
|
+
var removeWriter_default = {
|
|
1718
|
+
lexicon: 1,
|
|
1719
|
+
id: "com.atproto.space.removeWriter",
|
|
1720
|
+
defs: { "main": {
|
|
1721
|
+
"type": "procedure",
|
|
1722
|
+
"description": "Remove an account from a space's writer set, as returned by listWriters. The removal is sent to registered syncers. The account is added back if it makes another authorized write to the space. Does nothing if the account is not in the writer set. Requires auth as the space authority, implemented by PDS.",
|
|
1723
|
+
"input": {
|
|
1724
|
+
"encoding": "application/json",
|
|
1725
|
+
"schema": {
|
|
1726
|
+
"type": "object",
|
|
1727
|
+
"required": ["space", "repo"],
|
|
1728
|
+
"properties": {
|
|
1729
|
+
"space": {
|
|
1730
|
+
"type": "string",
|
|
1731
|
+
"format": "space-ref"
|
|
1732
|
+
},
|
|
1733
|
+
"repo": {
|
|
1734
|
+
"type": "string",
|
|
1735
|
+
"format": "did"
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
"errors": [{ "name": "SpaceNotFound" }, { "name": "NotAuthorized" }]
|
|
1741
|
+
} }
|
|
1742
|
+
};
|
|
1743
|
+
|
|
1744
|
+
//#endregion
|
|
1745
|
+
//#region lexicons/space/updateSpace.json
|
|
1746
|
+
var updateSpace_default = {
|
|
1747
|
+
lexicon: 1,
|
|
1748
|
+
id: "com.atproto.space.updateSpace",
|
|
1749
|
+
defs: { "main": {
|
|
1750
|
+
"type": "procedure",
|
|
1751
|
+
"description": "Replace the policy of a space. Changing to a different policy type discards state held by the previous policy, such as a member list. Requires auth as the space authority, implemented by PDS.",
|
|
1752
|
+
"input": {
|
|
1753
|
+
"encoding": "application/json",
|
|
1754
|
+
"schema": {
|
|
1755
|
+
"type": "object",
|
|
1756
|
+
"required": ["space", "policy"],
|
|
1757
|
+
"properties": {
|
|
1758
|
+
"space": {
|
|
1759
|
+
"type": "string",
|
|
1760
|
+
"format": "space-ref"
|
|
1761
|
+
},
|
|
1762
|
+
"policy": {
|
|
1763
|
+
"type": "union",
|
|
1764
|
+
"description": "PDSes must support all of the listed policies. Other space hosts may support only some of them, and any host may support policies beyond those listed.",
|
|
1765
|
+
"refs": [
|
|
1766
|
+
"com.atproto.personalspace.policy",
|
|
1767
|
+
"com.atproto.memberspace.policy",
|
|
1768
|
+
"com.atproto.managedspace.policy"
|
|
1769
|
+
]
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
},
|
|
1774
|
+
"errors": [
|
|
1775
|
+
{ "name": "SpaceNotFound" },
|
|
1776
|
+
{ "name": "NotAuthorized" },
|
|
1777
|
+
{ "name": "UnsupportedPolicy" }
|
|
1778
|
+
]
|
|
1779
|
+
} }
|
|
1780
|
+
};
|
|
1781
|
+
|
|
1782
|
+
//#endregion
|
|
1783
|
+
//#region lexicons/memberspace/defs.json
|
|
1784
|
+
var defs_default = {
|
|
1785
|
+
lexicon: 1,
|
|
1786
|
+
id: "com.atproto.memberspace.defs",
|
|
1787
|
+
defs: { "member": {
|
|
1788
|
+
"type": "object",
|
|
1789
|
+
"required": [
|
|
1790
|
+
"did",
|
|
1791
|
+
"read",
|
|
1792
|
+
"write"
|
|
1793
|
+
],
|
|
1794
|
+
"properties": {
|
|
1795
|
+
"did": {
|
|
1796
|
+
"type": "string",
|
|
1797
|
+
"format": "did"
|
|
1798
|
+
},
|
|
1799
|
+
"read": { "type": "boolean" },
|
|
1800
|
+
"write": { "type": "boolean" }
|
|
1801
|
+
}
|
|
1802
|
+
} }
|
|
1803
|
+
};
|
|
1804
|
+
|
|
1805
|
+
//#endregion
|
|
1806
|
+
//#region lexicons/memberspace/listMembers.json
|
|
1807
|
+
var listMembers_default = {
|
|
1808
|
+
lexicon: 1,
|
|
1809
|
+
id: "com.atproto.memberspace.listMembers",
|
|
1810
|
+
defs: { "main": {
|
|
1811
|
+
"type": "query",
|
|
1812
|
+
"description": "List the members of a space with a memberspace policy. Requires auth as the space authority, implemented by PDS.",
|
|
1813
|
+
"parameters": {
|
|
1814
|
+
"type": "params",
|
|
1815
|
+
"required": ["space"],
|
|
1816
|
+
"properties": {
|
|
1817
|
+
"space": {
|
|
1818
|
+
"type": "string",
|
|
1819
|
+
"format": "space-ref"
|
|
1820
|
+
},
|
|
1821
|
+
"limit": {
|
|
1822
|
+
"type": "integer",
|
|
1823
|
+
"minimum": 1,
|
|
1824
|
+
"maximum": 1e3,
|
|
1825
|
+
"default": 100
|
|
1826
|
+
},
|
|
1827
|
+
"cursor": { "type": "string" }
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
"output": {
|
|
1831
|
+
"encoding": "application/json",
|
|
1832
|
+
"schema": {
|
|
1833
|
+
"type": "object",
|
|
1834
|
+
"required": ["members"],
|
|
1835
|
+
"properties": {
|
|
1836
|
+
"cursor": { "type": "string" },
|
|
1837
|
+
"members": {
|
|
1838
|
+
"type": "array",
|
|
1839
|
+
"items": {
|
|
1840
|
+
"type": "ref",
|
|
1841
|
+
"ref": "com.atproto.memberspace.defs#member"
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
"errors": [
|
|
1848
|
+
{ "name": "SpaceNotFound" },
|
|
1849
|
+
{ "name": "NotAuthorized" },
|
|
1850
|
+
{
|
|
1851
|
+
"name": "PolicyMismatch",
|
|
1852
|
+
"description": "The space does not have a memberspace policy."
|
|
1853
|
+
},
|
|
1854
|
+
{ "name": "InvalidCursor" }
|
|
1855
|
+
]
|
|
1856
|
+
} }
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
//#endregion
|
|
1860
|
+
//#region lexicons/memberspace/member.json
|
|
1861
|
+
var member_default = {
|
|
1862
|
+
lexicon: 1,
|
|
1863
|
+
id: "com.atproto.memberspace.member",
|
|
1864
|
+
defs: { "main": {
|
|
1865
|
+
"type": "record",
|
|
1866
|
+
"description": "A published entry in a space's member list, keyed by the member's DID. Only authoritative in the space authority's repo.",
|
|
1867
|
+
"key": "any",
|
|
1868
|
+
"record": {
|
|
1869
|
+
"type": "object",
|
|
1870
|
+
"required": ["read", "write"],
|
|
1871
|
+
"properties": {
|
|
1872
|
+
"read": { "type": "boolean" },
|
|
1873
|
+
"write": { "type": "boolean" }
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
} }
|
|
1877
|
+
};
|
|
1878
|
+
|
|
1879
|
+
//#endregion
|
|
1880
|
+
//#region lexicons/memberspace/policy.json
|
|
1881
|
+
var policy_default$2 = {
|
|
1882
|
+
lexicon: 1,
|
|
1883
|
+
id: "com.atproto.memberspace.policy",
|
|
1884
|
+
defs: { "main": {
|
|
1885
|
+
"type": "object",
|
|
1886
|
+
"description": "Space policy that grants access based on a member list.",
|
|
1887
|
+
"properties": {
|
|
1888
|
+
"publicRead": {
|
|
1889
|
+
"type": "boolean",
|
|
1890
|
+
"default": false,
|
|
1891
|
+
"description": "If true, anyone may read the space. Otherwise, only members with read access."
|
|
1892
|
+
},
|
|
1893
|
+
"publicWrite": {
|
|
1894
|
+
"type": "boolean",
|
|
1895
|
+
"default": false,
|
|
1896
|
+
"description": "If true, any account's writes are tracked in the writer set, except members without write access. Otherwise, only members with write access."
|
|
1897
|
+
},
|
|
1898
|
+
"allowedApps": {
|
|
1899
|
+
"type": "array",
|
|
1900
|
+
"description": "If set, only these apps (by OAuth client ID) may read the space.",
|
|
1901
|
+
"items": {
|
|
1902
|
+
"type": "string",
|
|
1903
|
+
"format": "uri"
|
|
1904
|
+
}
|
|
1905
|
+
},
|
|
1906
|
+
"publishPolicy": {
|
|
1907
|
+
"type": "boolean",
|
|
1908
|
+
"default": false,
|
|
1909
|
+
"description": "Publish the policy as a com.atproto.space.policy record in the space."
|
|
1910
|
+
},
|
|
1911
|
+
"publishMembers": {
|
|
1912
|
+
"type": "boolean",
|
|
1913
|
+
"default": false,
|
|
1914
|
+
"description": "Publish the member list as com.atproto.memberspace.member records in the space."
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
} }
|
|
1918
|
+
};
|
|
1919
|
+
|
|
1920
|
+
//#endregion
|
|
1921
|
+
//#region lexicons/memberspace/putMembers.json
|
|
1922
|
+
var putMembers_default = {
|
|
1923
|
+
lexicon: 1,
|
|
1924
|
+
id: "com.atproto.memberspace.putMembers",
|
|
1925
|
+
defs: { "main": {
|
|
1926
|
+
"type": "procedure",
|
|
1927
|
+
"description": "Add members to a space, or update existing members' access, in a single commit. Requires auth as the space authority, implemented by PDS.",
|
|
1928
|
+
"input": {
|
|
1929
|
+
"encoding": "application/json",
|
|
1930
|
+
"schema": {
|
|
1931
|
+
"type": "object",
|
|
1932
|
+
"required": ["space", "members"],
|
|
1933
|
+
"properties": {
|
|
1934
|
+
"space": {
|
|
1935
|
+
"type": "string",
|
|
1936
|
+
"format": "space-ref"
|
|
1937
|
+
},
|
|
1938
|
+
"members": {
|
|
1939
|
+
"type": "array",
|
|
1940
|
+
"maxLength": 100,
|
|
1941
|
+
"items": {
|
|
1942
|
+
"type": "ref",
|
|
1943
|
+
"ref": "com.atproto.memberspace.defs#member"
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
},
|
|
1949
|
+
"errors": [
|
|
1950
|
+
{ "name": "SpaceNotFound" },
|
|
1951
|
+
{ "name": "NotAuthorized" },
|
|
1952
|
+
{
|
|
1953
|
+
"name": "PolicyMismatch",
|
|
1954
|
+
"description": "The space does not have a memberspace policy."
|
|
1955
|
+
}
|
|
1956
|
+
]
|
|
1957
|
+
} }
|
|
1958
|
+
};
|
|
1959
|
+
|
|
1960
|
+
//#endregion
|
|
1961
|
+
//#region lexicons/memberspace/removeMembers.json
|
|
1962
|
+
var removeMembers_default = {
|
|
1963
|
+
lexicon: 1,
|
|
1964
|
+
id: "com.atproto.memberspace.removeMembers",
|
|
1965
|
+
defs: { "main": {
|
|
1966
|
+
"type": "procedure",
|
|
1967
|
+
"description": "Remove members from a space in a single commit. DIDs that are not members are ignored. Requires auth as the space authority, implemented by PDS.",
|
|
1968
|
+
"input": {
|
|
1969
|
+
"encoding": "application/json",
|
|
1970
|
+
"schema": {
|
|
1971
|
+
"type": "object",
|
|
1972
|
+
"required": ["space", "dids"],
|
|
1973
|
+
"properties": {
|
|
1974
|
+
"space": {
|
|
1975
|
+
"type": "string",
|
|
1976
|
+
"format": "space-ref"
|
|
1977
|
+
},
|
|
1978
|
+
"dids": {
|
|
1979
|
+
"type": "array",
|
|
1980
|
+
"maxLength": 100,
|
|
1981
|
+
"items": {
|
|
1982
|
+
"type": "string",
|
|
1983
|
+
"format": "did"
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
"errors": [
|
|
1990
|
+
{ "name": "SpaceNotFound" },
|
|
1991
|
+
{ "name": "NotAuthorized" },
|
|
1992
|
+
{
|
|
1993
|
+
"name": "PolicyMismatch",
|
|
1994
|
+
"description": "The space does not have a memberspace policy."
|
|
1995
|
+
}
|
|
1996
|
+
]
|
|
1997
|
+
} }
|
|
1998
|
+
};
|
|
1999
|
+
|
|
2000
|
+
//#endregion
|
|
2001
|
+
//#region lexicons/personalspace/policy.json
|
|
2002
|
+
var policy_default$1 = {
|
|
2003
|
+
lexicon: 1,
|
|
2004
|
+
id: "com.atproto.personalspace.policy",
|
|
2005
|
+
defs: { "main": {
|
|
2006
|
+
"type": "object",
|
|
2007
|
+
"description": "Space policy for personal data that only the space authority and authorized apps can read, such as bookmarks or drafts.",
|
|
2008
|
+
"properties": {}
|
|
2009
|
+
} }
|
|
2010
|
+
};
|
|
2011
|
+
|
|
2012
|
+
//#endregion
|
|
2013
|
+
//#region lexicons/managedspace/checkAccess.json
|
|
2014
|
+
var checkAccess_default = {
|
|
2015
|
+
lexicon: 1,
|
|
2016
|
+
id: "com.atproto.managedspace.checkAccess",
|
|
2017
|
+
defs: { "main": {
|
|
2018
|
+
"type": "query",
|
|
2019
|
+
"description": "Check an account's read and write access to a managed space. Called by the space host, implemented by the space's managing app. Requires service auth.",
|
|
2020
|
+
"parameters": {
|
|
2021
|
+
"type": "params",
|
|
2022
|
+
"required": ["space"],
|
|
2023
|
+
"properties": {
|
|
2024
|
+
"space": {
|
|
2025
|
+
"type": "string",
|
|
2026
|
+
"format": "space-ref"
|
|
2027
|
+
},
|
|
2028
|
+
"repo": {
|
|
2029
|
+
"type": "string",
|
|
2030
|
+
"format": "did"
|
|
2031
|
+
},
|
|
2032
|
+
"clientId": {
|
|
2033
|
+
"type": "string",
|
|
2034
|
+
"format": "uri",
|
|
2035
|
+
"description": "OAuth client ID of the requesting app, if attested."
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
},
|
|
2039
|
+
"output": {
|
|
2040
|
+
"encoding": "application/json",
|
|
2041
|
+
"schema": {
|
|
2042
|
+
"type": "object",
|
|
2043
|
+
"required": ["read", "write"],
|
|
2044
|
+
"properties": {
|
|
2045
|
+
"read": { "type": "boolean" },
|
|
2046
|
+
"write": { "type": "boolean" }
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
} }
|
|
2051
|
+
};
|
|
2052
|
+
|
|
2053
|
+
//#endregion
|
|
2054
|
+
//#region lexicons/managedspace/policy.json
|
|
2055
|
+
var policy_default = {
|
|
2056
|
+
lexicon: 1,
|
|
2057
|
+
id: "com.atproto.managedspace.policy",
|
|
2058
|
+
defs: { "main": {
|
|
2059
|
+
"type": "object",
|
|
2060
|
+
"description": "Space policy that delegates access decisions to an external app through checkAccess.",
|
|
2061
|
+
"required": ["managingApp"],
|
|
2062
|
+
"properties": {
|
|
2063
|
+
"managingApp": {
|
|
2064
|
+
"type": "string",
|
|
2065
|
+
"description": "The `did#serviceId` reference of the managing app."
|
|
2066
|
+
},
|
|
2067
|
+
"publishPolicy": {
|
|
2068
|
+
"type": "boolean",
|
|
2069
|
+
"default": false,
|
|
2070
|
+
"description": "Publish the policy as a com.atproto.space.policy record in the space."
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
} }
|
|
2074
|
+
};
|
|
2075
|
+
|
|
2076
|
+
//#endregion
|
|
2077
|
+
//#region src/lexicons.ts
|
|
2078
|
+
/**
|
|
2079
|
+
* Vendored lexicon access. Generated by scripts/vendor-lexicons.mjs whenever
|
|
2080
|
+
* lexicons/ is re-vendored — imports are explicit so bundlers carry the
|
|
2081
|
+
* documents without filesystem access at runtime.
|
|
2082
|
+
*/
|
|
2083
|
+
const lexicons = [
|
|
2084
|
+
applyWrites_default,
|
|
2085
|
+
authorizeSpaceSync_default,
|
|
2086
|
+
clearRecords_default,
|
|
2087
|
+
confirmRegistration_default,
|
|
2088
|
+
createRecord_default,
|
|
2089
|
+
createSpace_default,
|
|
2090
|
+
defs_default$1,
|
|
2091
|
+
deleteRecord_default,
|
|
2092
|
+
deleteSpace_default,
|
|
2093
|
+
exportSpaceMeta_default,
|
|
2094
|
+
getBlob_default,
|
|
2095
|
+
getDelegationToken_default,
|
|
2096
|
+
getLatestCommit_default,
|
|
2097
|
+
getRecord_default,
|
|
2098
|
+
getRepo_default,
|
|
2099
|
+
getSpace_default,
|
|
2100
|
+
importRepo_default,
|
|
2101
|
+
importSpaceMeta_default,
|
|
2102
|
+
listBlobs_default,
|
|
2103
|
+
listRecords_default,
|
|
2104
|
+
listRepoOps_default,
|
|
2105
|
+
listSpaces_default,
|
|
2106
|
+
listWriters_default,
|
|
2107
|
+
notifyCredentialsRevoked_default,
|
|
2108
|
+
notifyRepoUpdate_default,
|
|
2109
|
+
notifySpaceUpdate_default,
|
|
2110
|
+
policy_default$3,
|
|
2111
|
+
putRecord_default,
|
|
2112
|
+
removeWriter_default,
|
|
2113
|
+
updateSpace_default,
|
|
2114
|
+
defs_default,
|
|
2115
|
+
listMembers_default,
|
|
2116
|
+
member_default,
|
|
2117
|
+
policy_default$2,
|
|
2118
|
+
putMembers_default,
|
|
2119
|
+
removeMembers_default,
|
|
2120
|
+
policy_default$1,
|
|
2121
|
+
checkAccess_default,
|
|
2122
|
+
policy_default
|
|
2123
|
+
];
|
|
2124
|
+
|
|
2125
|
+
//#endregion
|
|
2126
|
+
//#region src/coverage.ts
|
|
2127
|
+
const TAKEDOWN_REASON = "Needs a moderation or account-status action on the target (a takedown, suspension or deactivation of the account being read), which only the host's administrator can take. No black-box harness can arrange it without admin authority, and deactivating the operator's own account would end the session the run depends on.";
|
|
2128
|
+
const READ_SPACE_NOT_FOUND_REASON = "Declared on the repo-host reads, but neither the lexicons nor proposal 0016 name a condition under which a repo host answers it: reads are answered from the repo, and an empty or never-written repo is equivalent to a nonexistent one (proposal, Repo lifecycle). A must check would be the suite's own reading. The 1105 deleteSpace description said reads of a deleted space fail with SpaceNotFound; 1112 dropped that sentence, and the check that relied on it with it.";
|
|
2129
|
+
const INVALID_CURSOR_REASON = "Cursors are opaque, host-issued strings. Neither the lexicons nor the proposal define a value every host must reject, so which cursors are invalid is the host's choice. The should check request.garbage-cursor-rejected calibrates what the reference does.";
|
|
2130
|
+
const coverageExemptions = [
|
|
2131
|
+
{
|
|
2132
|
+
ref: "*@error:RepoTakendown",
|
|
2133
|
+
reason: TAKEDOWN_REASON
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
ref: "*@error:RepoSuspended",
|
|
2137
|
+
reason: TAKEDOWN_REASON
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
ref: "*@error:RepoDeactivated",
|
|
2141
|
+
reason: TAKEDOWN_REASON
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
ref: "*@error:InvalidCursor",
|
|
2145
|
+
reason: INVALID_CURSOR_REASON
|
|
2146
|
+
},
|
|
2147
|
+
...[
|
|
2148
|
+
"getRecord",
|
|
2149
|
+
"listRecords",
|
|
2150
|
+
"getLatestCommit",
|
|
2151
|
+
"listRepoOps",
|
|
2152
|
+
"getRepo",
|
|
2153
|
+
"listBlobs",
|
|
2154
|
+
"getBlob"
|
|
2155
|
+
].map((method) => ({
|
|
2156
|
+
ref: `com.atproto.space.${method}@error:SpaceNotFound`,
|
|
2157
|
+
reason: READ_SPACE_NOT_FOUND_REASON
|
|
2158
|
+
}))
|
|
2159
|
+
];
|
|
2160
|
+
/** Extract the coverage requirements from the vendored lexicons. */
|
|
2161
|
+
function coverageRequirements(docs = lexicons) {
|
|
2162
|
+
const requirements = [];
|
|
2163
|
+
for (const doc of docs) {
|
|
2164
|
+
const main = doc.defs.main;
|
|
2165
|
+
if (!main || main.type !== "query" && main.type !== "procedure") continue;
|
|
2166
|
+
requirements.push({
|
|
2167
|
+
ref: doc.id,
|
|
2168
|
+
kind: "method"
|
|
2169
|
+
});
|
|
2170
|
+
for (const error of main.errors ?? []) requirements.push({
|
|
2171
|
+
ref: `${doc.id}@error:${error.name}`,
|
|
2172
|
+
kind: "error"
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2175
|
+
return requirements;
|
|
2176
|
+
}
|
|
2177
|
+
/**
|
|
2178
|
+
* A citation covers a requirement when it names the method (which covers
|
|
2179
|
+
* the method requirement) or the exact `@error:` form. A citation with a
|
|
2180
|
+
* `#def` fragment covers its method.
|
|
2181
|
+
*/
|
|
2182
|
+
function citationRefs(check) {
|
|
2183
|
+
return check.citations.filter((c) => c.source === "lexicon").map((c) => c.ref);
|
|
2184
|
+
}
|
|
2185
|
+
function exemptionMatches(exemption, ref) {
|
|
2186
|
+
if (exemption.ref.startsWith("*@error:")) return ref.endsWith(exemption.ref.slice(1)) && ref.includes("@error:");
|
|
2187
|
+
return exemption.ref === ref;
|
|
2188
|
+
}
|
|
2189
|
+
function coverageReport(catalog, docs = lexicons, exemptions = coverageExemptions) {
|
|
2190
|
+
const requirements = coverageRequirements(docs);
|
|
2191
|
+
const known = new Set(requirements.map((r) => r.ref));
|
|
2192
|
+
const methodIds = new Set(requirements.filter((r) => r.kind === "method").map((r) => r.ref));
|
|
2193
|
+
const knownDocIds = new Set(docs.map((d) => d.id));
|
|
2194
|
+
const coveredBy = /* @__PURE__ */ new Map();
|
|
2195
|
+
const dangling = [];
|
|
2196
|
+
const credit = (ref, checkId) => coveredBy.set(ref, [...coveredBy.get(ref) ?? [], checkId]);
|
|
2197
|
+
for (const check of catalog) {
|
|
2198
|
+
if (check.tier !== "must") continue;
|
|
2199
|
+
for (const ref of citationRefs(check)) {
|
|
2200
|
+
const methodRef = ref.split("@")[0].split("#")[0];
|
|
2201
|
+
if (ref.includes("@error:")) {
|
|
2202
|
+
if (known.has(ref)) credit(ref, check.id);
|
|
2203
|
+
else dangling.push({
|
|
2204
|
+
checkId: check.id,
|
|
2205
|
+
ref
|
|
2206
|
+
});
|
|
2207
|
+
continue;
|
|
2208
|
+
}
|
|
2209
|
+
if (methodIds.has(methodRef)) credit(methodRef, check.id);
|
|
2210
|
+
else if (!knownDocIds.has(methodRef)) dangling.push({
|
|
2211
|
+
checkId: check.id,
|
|
2212
|
+
ref
|
|
2213
|
+
});
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
const uncovered = requirements.filter((r) => !coveredBy.has(r.ref));
|
|
2217
|
+
const exempt = [];
|
|
2218
|
+
const gaps = [];
|
|
2219
|
+
const used = /* @__PURE__ */ new Set();
|
|
2220
|
+
for (const requirement of uncovered) {
|
|
2221
|
+
const exemption = exemptions.find((e) => exemptionMatches(e, requirement.ref));
|
|
2222
|
+
if (exemption) {
|
|
2223
|
+
used.add(exemption);
|
|
2224
|
+
exempt.push({
|
|
2225
|
+
ref: requirement.ref,
|
|
2226
|
+
reason: exemption.reason
|
|
2227
|
+
});
|
|
2228
|
+
} else gaps.push(requirement);
|
|
2229
|
+
}
|
|
2230
|
+
return {
|
|
2231
|
+
requirements,
|
|
2232
|
+
covered: Array.from(coveredBy, ([ref, by]) => ({
|
|
2233
|
+
ref,
|
|
2234
|
+
by
|
|
2235
|
+
})),
|
|
2236
|
+
gaps,
|
|
2237
|
+
exempt,
|
|
2238
|
+
staleExemptions: exemptions.filter((e) => !used.has(e)),
|
|
2239
|
+
danglingCitations: dangling
|
|
2240
|
+
};
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
//#endregion
|
|
2244
|
+
export { renderReport as a, lexicons as i, coverageReport as n, runChecks as o, coverageRequirements as r, ALPHA_BUILD as s, coverageExemptions as t };
|
|
2245
|
+
//# sourceMappingURL=coverage-zCMup3Nb.js.map
|