@getcirrus/space-conformance 0.0.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-D8a-ZK57.d.ts +249 -0
- package/dist/base-D8a-ZK57.d.ts.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +373 -0
- package/dist/cli.js.map +1 -0
- package/dist/coverage-DhJZu8P8.js +1914 -0
- package/dist/coverage-DhJZu8P8.js.map +1 -0
- package/dist/full-D4ufJLcw.js +409 -0
- package/dist/full-D4ufJLcw.js.map +1 -0
- package/dist/full.d.ts +59 -0
- package/dist/full.d.ts.map +1 -0
- package/dist/full.js +4 -0
- package/dist/index.d.ts +178 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/operator-BErXCDow.js +923 -0
- package/dist/operator-BErXCDow.js.map +1 -0
- package/lexicons/MANIFEST.json +7 -0
- package/lexicons/simplespace/addMember.json +37 -0
- package/lexicons/simplespace/checkUserAccess.json +43 -0
- package/lexicons/simplespace/createSpace.json +74 -0
- package/lexicons/simplespace/defs.json +47 -0
- package/lexicons/simplespace/deleteSpace.json +32 -0
- package/lexicons/simplespace/getSpace.json +53 -0
- package/lexicons/simplespace/listMembers.json +65 -0
- package/lexicons/simplespace/removeMember.json +37 -0
- package/lexicons/simplespace/updateSpace.json +57 -0
- package/lexicons/space/applyWrites.json +163 -0
- package/lexicons/space/createRecord.json +79 -0
- package/lexicons/space/defs.json +38 -0
- package/lexicons/space/deleteRecord.json +51 -0
- package/lexicons/space/getBlob.json +54 -0
- package/lexicons/space/getDelegationToken.json +34 -0
- package/lexicons/space/getLatestCommit.json +57 -0
- package/lexicons/space/getRecord.json +76 -0
- package/lexicons/space/getRepo.json +41 -0
- package/lexicons/space/getSpaceCredential.json +67 -0
- package/lexicons/space/listBlobs.json +59 -0
- package/lexicons/space/listRecords.json +108 -0
- package/lexicons/space/listRepoOps.json +111 -0
- package/lexicons/space/listRepos.json +75 -0
- package/lexicons/space/listSpaces.json +65 -0
- package/lexicons/space/notifySpaceDeleted.json +24 -0
- package/lexicons/space/notifyWrite.json +38 -0
- package/lexicons/space/putRecord.json +75 -0
- package/lexicons/space/registerNotify.json +49 -0
- package/lexicons/space/unregisterNotify.json +29 -0
- package/package.json +53 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.listBlobs",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "List the CIDs of blobs referenced by an account's records within a permissioned space, optionally since some revision of that repo. Lets a syncer discover which blobs to fetch via getBlob, and lets an account enumerate the blobs it must carry when migrating a permissioned repo. Scoped to one space: blobs behind permissioned records are never enumerated by com.atproto.sync.listBlobs, which is unauthenticated. Callable with either OAuth (for the authenticated user's own data) or a space credential (for syncing services).",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"required": ["space", "repo"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"space": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "space-ref",
|
|
15
|
+
"description": "Reference to the space."
|
|
16
|
+
},
|
|
17
|
+
"repo": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "did",
|
|
20
|
+
"description": "The DID of the account whose blobs to list."
|
|
21
|
+
},
|
|
22
|
+
"since": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "tid",
|
|
25
|
+
"description": "Optional revision of the permissioned repo to list blobs since."
|
|
26
|
+
},
|
|
27
|
+
"limit": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 1,
|
|
30
|
+
"maximum": 1000,
|
|
31
|
+
"default": 500
|
|
32
|
+
},
|
|
33
|
+
"cursor": { "type": "string" }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"output": {
|
|
37
|
+
"encoding": "application/json",
|
|
38
|
+
"schema": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"required": ["cids"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"cursor": { "type": "string" },
|
|
43
|
+
"cids": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "type": "string", "format": "cid" }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"errors": [
|
|
51
|
+
{ "name": "SpaceNotFound" },
|
|
52
|
+
{ "name": "RepoNotFound" },
|
|
53
|
+
{ "name": "RepoTakendown" },
|
|
54
|
+
{ "name": "RepoSuspended" },
|
|
55
|
+
{ "name": "RepoDeactivated" }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.listRecords",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "List the records in an account's repo within a permissioned space, optionally filtered by collection. By default each record's value is inlined; set excludeValues for a metadata-only listing (collection, rkey, cid). Used for full-state recovery. Callable with either OAuth (for the authenticated user's own data) or a space credential (for syncing services). Throws RepoNotFound when the account holds no repo in the space; this does not distinguish a member that has never written from a non-member.",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"required": ["space", "repo"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"space": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "space-ref",
|
|
15
|
+
"description": "Reference to the space."
|
|
16
|
+
},
|
|
17
|
+
"repo": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "did",
|
|
20
|
+
"description": "The DID of the account whose repo to list."
|
|
21
|
+
},
|
|
22
|
+
"collection": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "nsid",
|
|
25
|
+
"description": "The NSID of the record collection. If omitted, lists records across all collections."
|
|
26
|
+
},
|
|
27
|
+
"limit": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 1,
|
|
30
|
+
"maximum": 1000,
|
|
31
|
+
"default": 50,
|
|
32
|
+
"description": "The number of records to return."
|
|
33
|
+
},
|
|
34
|
+
"cursor": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"reverse": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"description": "Flag to reverse the order of the returned records."
|
|
40
|
+
},
|
|
41
|
+
"excludeValues": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": false,
|
|
44
|
+
"description": "If true, omit inlined record values and return only metadata (collection, rkey, cid)."
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"output": {
|
|
49
|
+
"encoding": "application/json",
|
|
50
|
+
"schema": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": ["records"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"cursor": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"records": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "ref",
|
|
61
|
+
"ref": "#record"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"errors": [
|
|
68
|
+
{
|
|
69
|
+
"name": "SpaceNotFound"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "RepoNotFound"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "RepoTakendown"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "RepoSuspended"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "RepoDeactivated"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"record": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"required": ["collection", "rkey", "cid"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"collection": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"format": "nsid"
|
|
92
|
+
},
|
|
93
|
+
"rkey": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"format": "record-key"
|
|
96
|
+
},
|
|
97
|
+
"cid": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"format": "cid"
|
|
100
|
+
},
|
|
101
|
+
"value": {
|
|
102
|
+
"type": "unknown",
|
|
103
|
+
"description": "The record's value. Inlined by default; omitted when excludeValues is set."
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.listRepoOps",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "List the operation log for an account's permissioned repo within a space, returning operations after a given revision. Primary incremental sync mechanism. By default each created or updated operation inlines the record's current value; set excludeValues for metadata-only entries. Note the oplog is a transport optimization with no history guarantee: a host may compact it or drop it, and it does not survive account migration, so omitting `since` returns the retained window rather than the repo's full history. Use getRepo for an initial sync or when a `since` revision is no longer available. Callable with either OAuth (for the authenticated user's own data) or a space credential (for syncing services).",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"required": ["space", "repo"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"space": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "space-ref",
|
|
15
|
+
"description": "Reference to the space."
|
|
16
|
+
},
|
|
17
|
+
"repo": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "did",
|
|
20
|
+
"description": "The DID of the account whose oplog to retrieve."
|
|
21
|
+
},
|
|
22
|
+
"since": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "tid",
|
|
25
|
+
"description": "Return operations after this revision. The caller's own sync position; use `cursor` to continue a paginated response."
|
|
26
|
+
},
|
|
27
|
+
"limit": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 1,
|
|
30
|
+
"maximum": 1000,
|
|
31
|
+
"default": 100,
|
|
32
|
+
"description": "Maximum number of operations to return."
|
|
33
|
+
},
|
|
34
|
+
"cursor": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Opaque pagination cursor from a previous response. Takes precedence over `since` when both are supplied."
|
|
37
|
+
},
|
|
38
|
+
"excludeValues": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"default": false,
|
|
41
|
+
"description": "If true, omit inlined record values and return only operation metadata."
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"output": {
|
|
46
|
+
"encoding": "application/json",
|
|
47
|
+
"schema": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["ops"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"ops": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "ref",
|
|
55
|
+
"ref": "#opEntry"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"commit": {
|
|
59
|
+
"type": "ref",
|
|
60
|
+
"ref": "com.atproto.space.defs#signedCommit",
|
|
61
|
+
"description": "The account's current signed commit. Included when the response reaches the head of the oplog; omitted on backfill responses."
|
|
62
|
+
},
|
|
63
|
+
"cursor": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Pass as `cursor` to fetch the next page. Absent once the response reaches the head of the oplog."
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"errors": [
|
|
71
|
+
{ "name": "SpaceNotFound" },
|
|
72
|
+
{ "name": "RepoNotFound" },
|
|
73
|
+
{ "name": "RepoTakendown" },
|
|
74
|
+
{ "name": "RepoSuspended" },
|
|
75
|
+
{ "name": "RepoDeactivated" }
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"opEntry": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"description": "A single operation in a permissioned repo's oplog. cid is null for deletes; prev is null for creates. Operations sharing the same rev belong to the same batch. value carries the record's current value for creates and updates, unless excludeValues was set or the value is stale (superseded by a later operation).",
|
|
81
|
+
"required": ["rev", "collection", "rkey", "cid", "prev"],
|
|
82
|
+
"nullable": ["cid", "prev"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"rev": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"format": "tid"
|
|
87
|
+
},
|
|
88
|
+
"collection": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"format": "nsid"
|
|
91
|
+
},
|
|
92
|
+
"rkey": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"format": "record-key"
|
|
95
|
+
},
|
|
96
|
+
"cid": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"format": "cid"
|
|
99
|
+
},
|
|
100
|
+
"prev": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"format": "cid"
|
|
103
|
+
},
|
|
104
|
+
"value": {
|
|
105
|
+
"type": "unknown",
|
|
106
|
+
"description": "The record's current value, inlined for create and update operations. Omitted when excludeValues is set, for deletes, or when the value has been superseded by a later operation."
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.listRepos",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "List the known repos that hold data in a space (the writer set), with each repo's current rev and commit hash. Served by the space host. This is the sync boundary, not an access-control list: it enumerates only writers, never readers. The set is what the authority claims from write notifications and is not itself authoritative; a repo's host is the source of truth.",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"required": ["space"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"space": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "space-ref",
|
|
15
|
+
"description": "Reference to the space."
|
|
16
|
+
},
|
|
17
|
+
"limit": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"minimum": 1,
|
|
20
|
+
"maximum": 1000,
|
|
21
|
+
"default": 100,
|
|
22
|
+
"description": "Maximum number of repos to return."
|
|
23
|
+
},
|
|
24
|
+
"cursor": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"output": {
|
|
30
|
+
"encoding": "application/json",
|
|
31
|
+
"schema": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": ["repos"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"cursor": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"repos": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "ref",
|
|
42
|
+
"ref": "#repo"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"errors": [
|
|
49
|
+
{
|
|
50
|
+
"name": "SpaceNotFound"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"repo": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["did", "rev", "hash"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"did": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "did",
|
|
61
|
+
"description": "The DID of a repo that holds data in the space."
|
|
62
|
+
},
|
|
63
|
+
"rev": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "The repo's current revision (TID), as last reported to the authority. May lag the repo host, which is the source of truth.",
|
|
66
|
+
"format": "tid"
|
|
67
|
+
},
|
|
68
|
+
"hash": {
|
|
69
|
+
"type": "bytes",
|
|
70
|
+
"description": "The repo's current commit hash (sha256 of the LtHash state), as last reported to the authority."
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.listSpaces",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "query",
|
|
7
|
+
"description": "List the spaces the authenticated user holds a repo in (i.e. spaces the user has written data to), optionally filtered by type and/or authority DID. Note this is not 'spaces I'm a member of' — a member's PDS only tracks spaces its user has written to. Requires auth, implemented by PDS.",
|
|
8
|
+
"parameters": {
|
|
9
|
+
"type": "params",
|
|
10
|
+
"properties": {
|
|
11
|
+
"type": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "nsid",
|
|
14
|
+
"description": "Filter to spaces of this type."
|
|
15
|
+
},
|
|
16
|
+
"did": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": "did",
|
|
19
|
+
"description": "Filter to spaces under this authority DID."
|
|
20
|
+
},
|
|
21
|
+
"limit": {
|
|
22
|
+
"type": "integer",
|
|
23
|
+
"minimum": 1,
|
|
24
|
+
"maximum": 100,
|
|
25
|
+
"default": 50,
|
|
26
|
+
"description": "The number of spaces to return."
|
|
27
|
+
},
|
|
28
|
+
"cursor": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"output": {
|
|
34
|
+
"encoding": "application/json",
|
|
35
|
+
"schema": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": ["spaces"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"cursor": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"spaces": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "ref",
|
|
46
|
+
"ref": "#spaceView"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"spaceView": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"required": ["uri"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"uri": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"format": "space-ref",
|
|
60
|
+
"description": "URI of the space."
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.notifySpaceDeleted",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "procedure",
|
|
7
|
+
"description": "Notify a syncing service that a space has been deleted, and that it should drop every copy of the space's data it holds. Sent by the space authority to the services registered for the space, best-effort. Authenticated with service auth addressed to the receiving service.",
|
|
8
|
+
"input": {
|
|
9
|
+
"encoding": "application/json",
|
|
10
|
+
"schema": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["space"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"space": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "space-ref",
|
|
17
|
+
"description": "Reference to the deleted space."
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.notifyWrite",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "procedure",
|
|
7
|
+
"description": "Notify that a repo in a space has advanced to a new revision. Sent by a repo host to the space host, and forwarded to registered syncers. Best-effort. Authenticated with service auth.",
|
|
8
|
+
"input": {
|
|
9
|
+
"encoding": "application/json",
|
|
10
|
+
"schema": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["space", "repo", "rev", "hash"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"space": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "space-ref",
|
|
17
|
+
"description": "Reference to the space."
|
|
18
|
+
},
|
|
19
|
+
"repo": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "did",
|
|
22
|
+
"description": "The DID of the account whose repo advanced."
|
|
23
|
+
},
|
|
24
|
+
"rev": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The revision of the write.",
|
|
27
|
+
"format": "tid"
|
|
28
|
+
},
|
|
29
|
+
"hash": {
|
|
30
|
+
"type": "bytes",
|
|
31
|
+
"description": "The repo's current commit hash (sha256 of the LtHash state) after the write. Lets the space host maintain each repo's hash for listRepos."
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.putRecord",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "procedure",
|
|
7
|
+
"description": "Write a record in a permissioned space, creating or updating it as needed. Requires auth, implemented by PDS.",
|
|
8
|
+
"input": {
|
|
9
|
+
"encoding": "application/json",
|
|
10
|
+
"schema": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["space", "repo", "collection", "rkey", "record"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"space": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "space-ref",
|
|
17
|
+
"description": "Reference to the space."
|
|
18
|
+
},
|
|
19
|
+
"repo": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "did",
|
|
22
|
+
"description": "The DID of the repo to write to (the authenticated member)."
|
|
23
|
+
},
|
|
24
|
+
"collection": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"format": "nsid",
|
|
27
|
+
"description": "The NSID of the record collection."
|
|
28
|
+
},
|
|
29
|
+
"rkey": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"format": "record-key",
|
|
32
|
+
"description": "The Record Key.",
|
|
33
|
+
"maxLength": 512
|
|
34
|
+
},
|
|
35
|
+
"validate": {
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"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."
|
|
38
|
+
},
|
|
39
|
+
"record": {
|
|
40
|
+
"type": "unknown",
|
|
41
|
+
"description": "The record to write."
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"output": {
|
|
47
|
+
"encoding": "application/json",
|
|
48
|
+
"schema": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": ["uri", "cid"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"uri": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"format": "at-uri",
|
|
55
|
+
"description": "URI of the written record."
|
|
56
|
+
},
|
|
57
|
+
"cid": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"format": "cid"
|
|
60
|
+
},
|
|
61
|
+
"validationStatus": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"knownValues": ["valid", "unknown"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"errors": [
|
|
69
|
+
{
|
|
70
|
+
"name": "SpaceNotFound"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.registerNotify",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "procedure",
|
|
7
|
+
"description": "Register a service to be notified of writes to any repo in a space. Called on the space host. The registering service is named by its service identifier rather than a bare URL, because notifyWrite is delivered with service auth addressed to that identifier; the delivery endpoint is resolved from the service's DID document. Authenticated with a space credential. Re-registering an existing service replaces its registration and extends the expiry.",
|
|
8
|
+
"input": {
|
|
9
|
+
"encoding": "application/json",
|
|
10
|
+
"schema": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["space", "service"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"space": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "space-ref",
|
|
17
|
+
"description": "Reference to the space."
|
|
18
|
+
},
|
|
19
|
+
"service": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Service identifier of the subscriber: a DID with an optional service fragment naming the entry in its DID document to deliver to (e.g. 'did:web:syncer.example.com#atproto_space_syncer'). notifyWrite calls are addressed to this identifier."
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"output": {
|
|
27
|
+
"encoding": "application/json",
|
|
28
|
+
"schema": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["expiresAt"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"expiresAt": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "datetime",
|
|
35
|
+
"description": "When the registration expires. May be later than the expiry of the space credential the request was authenticated with; renew before this time to stay subscribed."
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"errors": [
|
|
41
|
+
{ "name": "SpaceNotFound" },
|
|
42
|
+
{
|
|
43
|
+
"name": "ServiceNotResolvable",
|
|
44
|
+
"description": "The service identifier could not be resolved to a DID document with a matching service endpoint."
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "com.atproto.space.unregisterNotify",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "procedure",
|
|
7
|
+
"description": "Withdraw a write-notification registration made through registerNotify. Called on the space host. Idempotent: succeeds whether or not a matching registration existed. Registrations also lapse on their own at the expiry returned by registerNotify, so this is for explicit withdrawal rather than cleanup. Authenticated with a space credential.",
|
|
8
|
+
"input": {
|
|
9
|
+
"encoding": "application/json",
|
|
10
|
+
"schema": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["space", "service"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"space": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "space-ref",
|
|
17
|
+
"description": "Reference to the space."
|
|
18
|
+
},
|
|
19
|
+
"service": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Service identifier of the subscriber to remove, as passed to registerNotify."
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"errors": [{ "name": "SpaceNotFound" }]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|