@openvtc/trust-tasks 0.17.7 → 0.17.9
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/CHANGELOG.md +110 -0
- package/dist/_shared/components.d.ts +4 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -1
- package/dist/persona/facet/delete/1.0/payload.d.ts +310 -0
- package/dist/persona/facet/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/facet/delete/1.0/payload.js +169 -0
- package/dist/persona/facet/delete/1.0/payload.js.map +1 -0
- package/dist/persona/facet/list/1.0/payload.d.ts +599 -0
- package/dist/persona/facet/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/facet/list/1.0/payload.js +332 -0
- package/dist/persona/facet/list/1.0/payload.js.map +1 -0
- package/dist/persona/facet/put/1.0/payload.d.ts +490 -0
- package/dist/persona/facet/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/facet/put/1.0/payload.js +272 -0
- package/dist/persona/facet/put/1.0/payload.js.map +1 -0
- package/dist/rooms/keys/backfill/0.1/payload.d.ts +336 -0
- package/dist/rooms/keys/backfill/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/backfill/0.1/payload.js +177 -0
- package/dist/rooms/keys/backfill/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/register/0.1/payload.d.ts +382 -0
- package/dist/rooms/owner/register/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/register/0.1/payload.js +215 -0
- package/dist/rooms/owner/register/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +4 -0
- package/src/index.ts +5 -0
- package/src/persona/_shared/0.1/persona-record.ts +1 -1
- package/src/persona/facet/delete/1.0/payload.ts +212 -0
- package/src/persona/facet/list/1.0/payload.ts +402 -0
- package/src/persona/facet/put/1.0/payload.ts +339 -0
- package/src/rooms/keys/backfill/0.1/payload.ts +236 -0
- package/src/rooms/owner/register/0.1/payload.ts +278 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/facet/put/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/facet/put/1.0";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/facet/put/1.0#response";
|
|
9
|
+
/**
|
|
10
|
+
* This specification's payload schema, as a value.
|
|
11
|
+
*
|
|
12
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
13
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
14
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
15
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
16
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
17
|
+
*/
|
|
18
|
+
export const PAYLOAD_SCHEMA = {
|
|
19
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
20
|
+
"$id": "https://trusttasks.org/spec/persona/facet/put/1.0",
|
|
21
|
+
"title": "Persona — Facet Put — payload",
|
|
22
|
+
"description": "Create or replace one facet: a named part of the holder's life, and the faces and attributes that belong to it. Omit `facetId` to create; supply it to replace. `expectedVersion` makes the write conditional.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"name",
|
|
27
|
+
"colour"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"facetId": {
|
|
31
|
+
"$ref": "#/$defs/Ulid",
|
|
32
|
+
"description": "Omit to create — the maintainer assigns one and returns it. Supply to replace an existing facet, or to make a create idempotent under retry; a supplied id that already exists is a replacement, and a producer that meant to create MUST pair it with `expectedVersion: 0`."
|
|
33
|
+
},
|
|
34
|
+
"name": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 64,
|
|
38
|
+
"description": "The holder's name for this part of their life — \"Work\", \"Home\", \"Play\". Never disclosed to a verifier; it is how the holder finds it again. A maintainer MUST NOT interpret it: it is not a scope, a policy input, or a name a counterparty ever sees."
|
|
39
|
+
},
|
|
40
|
+
"colour": {
|
|
41
|
+
"$ref": "#/$defs/FacetColour"
|
|
42
|
+
},
|
|
43
|
+
"icon": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"maxLength": 8,
|
|
47
|
+
"description": "One or two emoji, as a decorative mark beside the name. Bounded at 8 bytes because it is a mark and not a field: anything longer is text, and text belongs in `name` where a consumer will lay it out. A maintainer stores it opaquely and MUST NOT parse it; a consumer that cannot render emoji omits it and shows the name, which is why it is OPTIONAL and carries no meaning of its own."
|
|
48
|
+
},
|
|
49
|
+
"faceIds": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"maxItems": 256,
|
|
52
|
+
"uniqueItems": true,
|
|
53
|
+
"default": [],
|
|
54
|
+
"items": {
|
|
55
|
+
"$ref": "#/$defs/Ulid"
|
|
56
|
+
},
|
|
57
|
+
"description": "Profiles belonging to this facet. A profile belongs to at most one facet — see `persona/facet/put:faceAlreadyPlaced` — because the facet is where a consumer reads a profile's colour from, and two answers is no answer. Omission on a replace means an empty list, not 'leave as they were': this is a replace, and a member whose absence meant 'keep' would make it impossible to empty one."
|
|
58
|
+
},
|
|
59
|
+
"attributeIds": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"maxItems": 1024,
|
|
62
|
+
"uniqueItems": true,
|
|
63
|
+
"default": [],
|
|
64
|
+
"items": {
|
|
65
|
+
"$ref": "#/$defs/Ulid"
|
|
66
|
+
},
|
|
67
|
+
"description": "Attributes belonging to this facet. Unlike a profile, an attribute MAY belong to several — a mobile number is genuinely both work and home — so no exclusivity is enforced and none should be inferred. Same replace semantics as `faceIds`."
|
|
68
|
+
},
|
|
69
|
+
"expectedVersion": {
|
|
70
|
+
"$ref": "#/$defs/ExpectedVersion",
|
|
71
|
+
"description": "Optional precondition. Omit for last-writer-wins. Supply the version a prior read returned to make the write conditional; supply 0 to create only."
|
|
72
|
+
},
|
|
73
|
+
"ext": {
|
|
74
|
+
"$ref": "#/$defs/Ext"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"$defs": {
|
|
78
|
+
"Response": {
|
|
79
|
+
"$anchor": "response",
|
|
80
|
+
"title": "Persona Facet Put — response payload",
|
|
81
|
+
"description": "Success response to persona/facet/put. Type https://trusttasks.org/spec/persona/facet/put/1.0#response. A failed precondition is not a success: it is a trust-task-error carrying persona/facet/put:versionConflict.",
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": [
|
|
85
|
+
"facetId",
|
|
86
|
+
"version",
|
|
87
|
+
"created",
|
|
88
|
+
"updatedAt"
|
|
89
|
+
],
|
|
90
|
+
"properties": {
|
|
91
|
+
"facetId": {
|
|
92
|
+
"$ref": "#/$defs/Ulid"
|
|
93
|
+
},
|
|
94
|
+
"version": {
|
|
95
|
+
"$ref": "#/$defs/Version"
|
|
96
|
+
},
|
|
97
|
+
"created": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"description": "True when this write created the facet, false when it replaced one. A producer that omitted `facetId` can still be told which happened, because a retried create with a supplied id is a replacement."
|
|
100
|
+
},
|
|
101
|
+
"createdAt": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"format": "date-time"
|
|
104
|
+
},
|
|
105
|
+
"updatedAt": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"format": "date-time"
|
|
108
|
+
},
|
|
109
|
+
"ext": {
|
|
110
|
+
"$ref": "#/$defs/Ext"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"Ext": {
|
|
115
|
+
"title": "Ext",
|
|
116
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
117
|
+
"type": "object",
|
|
118
|
+
"minProperties": 1,
|
|
119
|
+
"additionalProperties": true,
|
|
120
|
+
"propertyNames": {
|
|
121
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"Version": {
|
|
125
|
+
"title": "Version",
|
|
126
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
127
|
+
"type": "integer",
|
|
128
|
+
"minimum": 1
|
|
129
|
+
},
|
|
130
|
+
"Ulid": {
|
|
131
|
+
"title": "Ulid",
|
|
132
|
+
"description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
|
|
133
|
+
"type": "string",
|
|
134
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
135
|
+
},
|
|
136
|
+
"ExpectedVersion": {
|
|
137
|
+
"title": "ExpectedVersion",
|
|
138
|
+
"description": "Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.",
|
|
139
|
+
"type": "integer",
|
|
140
|
+
"minimum": 0
|
|
141
|
+
},
|
|
142
|
+
"FacetColour": {
|
|
143
|
+
"title": "FacetColour",
|
|
144
|
+
"description": "A colour **name**, resolved by each consumer against its own palette — never a hex value or any other literal. Two reasons, and both are about the consumer rather than the holder. A literal cannot be legible in a terminal, in a light theme and in a dark one at once, so a stored `#8B0000` is a colour that is wrong somewhere and the holder has no way to know where. And a consumer that reserves colours to mean something — an error, a warning, an irreversible act — must be able to keep a holder's decorative choice out of that channel; it cannot do that with an arbitrary value, and it can do it trivially with a closed set it maps itself. The eight members are chosen to be distinguishable from one another and deliberately carry no status connotation: none is named for success, warning or danger.",
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [
|
|
147
|
+
"slate",
|
|
148
|
+
"indigo",
|
|
149
|
+
"teal",
|
|
150
|
+
"moss",
|
|
151
|
+
"sand",
|
|
152
|
+
"clay",
|
|
153
|
+
"rose",
|
|
154
|
+
"plum"
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
160
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
161
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
162
|
+
"$ref": "#/$defs/Response",
|
|
163
|
+
"$defs": {
|
|
164
|
+
"Response": {
|
|
165
|
+
"$anchor": "response",
|
|
166
|
+
"title": "Persona Facet Put — response payload",
|
|
167
|
+
"description": "Success response to persona/facet/put. Type https://trusttasks.org/spec/persona/facet/put/1.0#response. A failed precondition is not a success: it is a trust-task-error carrying persona/facet/put:versionConflict.",
|
|
168
|
+
"type": "object",
|
|
169
|
+
"additionalProperties": false,
|
|
170
|
+
"required": [
|
|
171
|
+
"facetId",
|
|
172
|
+
"version",
|
|
173
|
+
"created",
|
|
174
|
+
"updatedAt"
|
|
175
|
+
],
|
|
176
|
+
"properties": {
|
|
177
|
+
"facetId": {
|
|
178
|
+
"$ref": "#/$defs/Ulid"
|
|
179
|
+
},
|
|
180
|
+
"version": {
|
|
181
|
+
"$ref": "#/$defs/Version"
|
|
182
|
+
},
|
|
183
|
+
"created": {
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"description": "True when this write created the facet, false when it replaced one. A producer that omitted `facetId` can still be told which happened, because a retried create with a supplied id is a replacement."
|
|
186
|
+
},
|
|
187
|
+
"createdAt": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"format": "date-time"
|
|
190
|
+
},
|
|
191
|
+
"updatedAt": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"format": "date-time"
|
|
194
|
+
},
|
|
195
|
+
"ext": {
|
|
196
|
+
"$ref": "#/$defs/Ext"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"Ext": {
|
|
201
|
+
"title": "Ext",
|
|
202
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
203
|
+
"type": "object",
|
|
204
|
+
"minProperties": 1,
|
|
205
|
+
"additionalProperties": true,
|
|
206
|
+
"propertyNames": {
|
|
207
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"Version": {
|
|
211
|
+
"title": "Version",
|
|
212
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
213
|
+
"type": "integer",
|
|
214
|
+
"minimum": 1
|
|
215
|
+
},
|
|
216
|
+
"Ulid": {
|
|
217
|
+
"title": "Ulid",
|
|
218
|
+
"description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
|
|
219
|
+
"type": "string",
|
|
220
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
221
|
+
},
|
|
222
|
+
"ExpectedVersion": {
|
|
223
|
+
"title": "ExpectedVersion",
|
|
224
|
+
"description": "Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.",
|
|
225
|
+
"type": "integer",
|
|
226
|
+
"minimum": 0
|
|
227
|
+
},
|
|
228
|
+
"FacetColour": {
|
|
229
|
+
"title": "FacetColour",
|
|
230
|
+
"description": "A colour **name**, resolved by each consumer against its own palette — never a hex value or any other literal. Two reasons, and both are about the consumer rather than the holder. A literal cannot be legible in a terminal, in a light theme and in a dark one at once, so a stored `#8B0000` is a colour that is wrong somewhere and the holder has no way to know where. And a consumer that reserves colours to mean something — an error, a warning, an irreversible act — must be able to keep a holder's decorative choice out of that channel; it cannot do that with an arbitrary value, and it can do it trivially with a closed set it maps itself. The eight members are chosen to be distinguishable from one another and deliberately carry no status connotation: none is named for success, warning or danger.",
|
|
231
|
+
"type": "string",
|
|
232
|
+
"enum": [
|
|
233
|
+
"slate",
|
|
234
|
+
"indigo",
|
|
235
|
+
"teal",
|
|
236
|
+
"moss",
|
|
237
|
+
"sand",
|
|
238
|
+
"clay",
|
|
239
|
+
"rose",
|
|
240
|
+
"plum"
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
247
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
248
|
+
* per-specification and cannot be derived from the document alone, and
|
|
249
|
+
* item 2 needs the schema this carries.
|
|
250
|
+
*/
|
|
251
|
+
export const SPEC = {
|
|
252
|
+
typeUri: TYPE_URI,
|
|
253
|
+
isBearer: false,
|
|
254
|
+
isProofRequired: true,
|
|
255
|
+
isRecipientRequired: true,
|
|
256
|
+
isIssuedAtRequired: true,
|
|
257
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
261
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
262
|
+
* parties (§7.3 item 5).
|
|
263
|
+
*/
|
|
264
|
+
export const RESPONSE_SPEC = {
|
|
265
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
266
|
+
isBearer: false,
|
|
267
|
+
isProofRequired: true,
|
|
268
|
+
isRecipientRequired: true,
|
|
269
|
+
isIssuedAtRequired: true,
|
|
270
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
271
|
+
};
|
|
272
|
+
//# sourceMappingURL=payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/persona/facet/put/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0DH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,mDAA4D,CAAC;AAKrF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,4DAAqE,CAAC;AAKvG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,+BAA+B;IACxC,aAAa,EAAE,gNAAgN;IAC/N,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,MAAM;QACN,QAAQ;KACT;IACD,YAAY,EAAE;QACZ,SAAS,EAAE;YACT,MAAM,EAAE,cAAc;YACtB,aAAa,EAAE,8QAA8Q;SAC9R;QACD,MAAM,EAAE;YACN,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,EAAE;YACf,aAAa,EAAE,8PAA8P;SAC9Q;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,qBAAqB;SAC9B;QACD,MAAM,EAAE;YACN,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,+XAA+X;SAC/Y;QACD,SAAS,EAAE;YACT,MAAM,EAAE,OAAO;YACf,UAAU,EAAE,GAAG;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C,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/rooms/keys/backfill/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
6
|
+
export interface RoomsKeysBackfillPayload {
|
|
7
|
+
/**
|
|
8
|
+
* The room to backfill. The recipient MUST already hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so fetching them for a room one is not in would retain key material for nothing.
|
|
9
|
+
*/
|
|
10
|
+
roomId: string;
|
|
11
|
+
/**
|
|
12
|
+
* The host to fetch from, as a DID. Named by the caller because nothing maps a room to its host: a room is portable — re-point it and it has moved — so a remembered host is a value that goes stale, and the recipient holds key custody rather than a hosting record. A caller who names the wrong host learns so as a refusal from a party that does not serve this room, which is loud and immediate.
|
|
13
|
+
*/
|
|
14
|
+
host: string;
|
|
15
|
+
/**
|
|
16
|
+
* Fetch only rungs at or below this epoch. Absent means from the room's current epoch down. A recipient that already reads to some epoch SHOULD pass it, so a host serves the part that is missing rather than the whole chain.
|
|
17
|
+
*/
|
|
18
|
+
fromEpoch?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Maximum rungs to request in one pass, highest `epoch` first. A host MAY return fewer. A caller walking a long history calls again with `fromEpoch` set below what it has.
|
|
21
|
+
*/
|
|
22
|
+
limit?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
25
|
+
*/
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.
|
|
30
|
+
*/
|
|
31
|
+
export interface RoomsKeysBackfillResponsePayload {
|
|
32
|
+
roomId: string;
|
|
33
|
+
/**
|
|
34
|
+
* The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.
|
|
35
|
+
*/
|
|
36
|
+
earliestReadableEpoch: number;
|
|
37
|
+
/**
|
|
38
|
+
* How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.
|
|
39
|
+
*/
|
|
40
|
+
fetched?: number;
|
|
41
|
+
/**
|
|
42
|
+
* How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.
|
|
43
|
+
*/
|
|
44
|
+
stored?: number;
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
48
|
+
export type { Ext };
|
|
49
|
+
/** Trust Task type URI. */
|
|
50
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/backfill/0.1";
|
|
51
|
+
/** Stable alias for this specification's request payload shape. */
|
|
52
|
+
export type Payload = RoomsKeysBackfillPayload;
|
|
53
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
54
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/backfill/0.1#response";
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = RoomsKeysBackfillResponsePayload;
|
|
57
|
+
/**
|
|
58
|
+
* This specification's payload schema, as a value.
|
|
59
|
+
*
|
|
60
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
61
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
62
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
63
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
64
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
65
|
+
*/
|
|
66
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
67
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
68
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/backfill/0.1";
|
|
69
|
+
readonly title: "Rooms Keys Backfill — payload";
|
|
70
|
+
readonly type: "object";
|
|
71
|
+
readonly additionalProperties: false;
|
|
72
|
+
readonly required: readonly ["roomId", "host"];
|
|
73
|
+
readonly properties: {
|
|
74
|
+
readonly roomId: {
|
|
75
|
+
readonly type: "string";
|
|
76
|
+
readonly description: "The room to backfill. The recipient MUST already hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so fetching them for a room one is not in would retain key material for nothing.";
|
|
77
|
+
};
|
|
78
|
+
readonly host: {
|
|
79
|
+
readonly type: "string";
|
|
80
|
+
readonly description: "The host to fetch from, as a DID. Named by the caller because nothing maps a room to its host: a room is portable — re-point it and it has moved — so a remembered host is a value that goes stale, and the recipient holds key custody rather than a hosting record. A caller who names the wrong host learns so as a refusal from a party that does not serve this room, which is loud and immediate.";
|
|
81
|
+
};
|
|
82
|
+
readonly fromEpoch: {
|
|
83
|
+
readonly type: "integer";
|
|
84
|
+
readonly minimum: 1;
|
|
85
|
+
readonly description: "Fetch only rungs at or below this epoch. Absent means from the room's current epoch down. A recipient that already reads to some epoch SHOULD pass it, so a host serves the part that is missing rather than the whole chain.";
|
|
86
|
+
};
|
|
87
|
+
readonly limit: {
|
|
88
|
+
readonly type: "integer";
|
|
89
|
+
readonly minimum: 1;
|
|
90
|
+
readonly description: "Maximum rungs to request in one pass, highest `epoch` first. A host MAY return fewer. A caller walking a long history calls again with `fromEpoch` set below what it has.";
|
|
91
|
+
};
|
|
92
|
+
readonly ext: {
|
|
93
|
+
readonly $ref: "#/$defs/Ext";
|
|
94
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
readonly $defs: {
|
|
98
|
+
readonly Response: {
|
|
99
|
+
readonly $anchor: "response";
|
|
100
|
+
readonly title: "Rooms Keys Backfill — response payload";
|
|
101
|
+
readonly description: "Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.";
|
|
102
|
+
readonly type: "object";
|
|
103
|
+
readonly additionalProperties: false;
|
|
104
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
105
|
+
readonly properties: {
|
|
106
|
+
readonly roomId: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
readonly earliestReadableEpoch: {
|
|
110
|
+
readonly type: "integer";
|
|
111
|
+
readonly minimum: 1;
|
|
112
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.";
|
|
113
|
+
};
|
|
114
|
+
readonly fetched: {
|
|
115
|
+
readonly type: "integer";
|
|
116
|
+
readonly minimum: 0;
|
|
117
|
+
readonly description: "How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.";
|
|
118
|
+
};
|
|
119
|
+
readonly stored: {
|
|
120
|
+
readonly type: "integer";
|
|
121
|
+
readonly minimum: 0;
|
|
122
|
+
readonly description: "How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.";
|
|
123
|
+
};
|
|
124
|
+
readonly ext: {
|
|
125
|
+
readonly $ref: "#/$defs/Ext";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly Ext: {
|
|
130
|
+
readonly title: "Ext";
|
|
131
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
readonly minProperties: 1;
|
|
134
|
+
readonly additionalProperties: true;
|
|
135
|
+
readonly propertyNames: {
|
|
136
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
142
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
143
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
144
|
+
readonly $ref: "#/$defs/Response";
|
|
145
|
+
readonly $defs: {
|
|
146
|
+
readonly Response: {
|
|
147
|
+
readonly $anchor: "response";
|
|
148
|
+
readonly title: "Rooms Keys Backfill — response payload";
|
|
149
|
+
readonly description: "Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.";
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly additionalProperties: false;
|
|
152
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
153
|
+
readonly properties: {
|
|
154
|
+
readonly roomId: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
};
|
|
157
|
+
readonly earliestReadableEpoch: {
|
|
158
|
+
readonly type: "integer";
|
|
159
|
+
readonly minimum: 1;
|
|
160
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.";
|
|
161
|
+
};
|
|
162
|
+
readonly fetched: {
|
|
163
|
+
readonly type: "integer";
|
|
164
|
+
readonly minimum: 0;
|
|
165
|
+
readonly description: "How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.";
|
|
166
|
+
};
|
|
167
|
+
readonly stored: {
|
|
168
|
+
readonly type: "integer";
|
|
169
|
+
readonly minimum: 0;
|
|
170
|
+
readonly description: "How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.";
|
|
171
|
+
};
|
|
172
|
+
readonly ext: {
|
|
173
|
+
readonly $ref: "#/$defs/Ext";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
readonly Ext: {
|
|
178
|
+
readonly title: "Ext";
|
|
179
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
180
|
+
readonly type: "object";
|
|
181
|
+
readonly minProperties: 1;
|
|
182
|
+
readonly additionalProperties: true;
|
|
183
|
+
readonly propertyNames: {
|
|
184
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
191
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
192
|
+
* per-specification and cannot be derived from the document alone, and
|
|
193
|
+
* item 2 needs the schema this carries.
|
|
194
|
+
*/
|
|
195
|
+
export declare const SPEC: {
|
|
196
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/backfill/0.1";
|
|
197
|
+
readonly isBearer: false;
|
|
198
|
+
readonly isProofRequired: true;
|
|
199
|
+
readonly isRecipientRequired: true;
|
|
200
|
+
readonly isIssuedAtRequired: true;
|
|
201
|
+
readonly payloadSchema: {
|
|
202
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
203
|
+
readonly $id: "https://trusttasks.org/spec/rooms/keys/backfill/0.1";
|
|
204
|
+
readonly title: "Rooms Keys Backfill — payload";
|
|
205
|
+
readonly type: "object";
|
|
206
|
+
readonly additionalProperties: false;
|
|
207
|
+
readonly required: readonly ["roomId", "host"];
|
|
208
|
+
readonly properties: {
|
|
209
|
+
readonly roomId: {
|
|
210
|
+
readonly type: "string";
|
|
211
|
+
readonly description: "The room to backfill. The recipient MUST already hold group state for it, and MUST NOT create any on the strength of this request: rungs are inert without an epoch key, so fetching them for a room one is not in would retain key material for nothing.";
|
|
212
|
+
};
|
|
213
|
+
readonly host: {
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
readonly description: "The host to fetch from, as a DID. Named by the caller because nothing maps a room to its host: a room is portable — re-point it and it has moved — so a remembered host is a value that goes stale, and the recipient holds key custody rather than a hosting record. A caller who names the wrong host learns so as a refusal from a party that does not serve this room, which is loud and immediate.";
|
|
216
|
+
};
|
|
217
|
+
readonly fromEpoch: {
|
|
218
|
+
readonly type: "integer";
|
|
219
|
+
readonly minimum: 1;
|
|
220
|
+
readonly description: "Fetch only rungs at or below this epoch. Absent means from the room's current epoch down. A recipient that already reads to some epoch SHOULD pass it, so a host serves the part that is missing rather than the whole chain.";
|
|
221
|
+
};
|
|
222
|
+
readonly limit: {
|
|
223
|
+
readonly type: "integer";
|
|
224
|
+
readonly minimum: 1;
|
|
225
|
+
readonly description: "Maximum rungs to request in one pass, highest `epoch` first. A host MAY return fewer. A caller walking a long history calls again with `fromEpoch` set below what it has.";
|
|
226
|
+
};
|
|
227
|
+
readonly ext: {
|
|
228
|
+
readonly $ref: "#/$defs/Ext";
|
|
229
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
readonly $defs: {
|
|
233
|
+
readonly Response: {
|
|
234
|
+
readonly $anchor: "response";
|
|
235
|
+
readonly title: "Rooms Keys Backfill — response payload";
|
|
236
|
+
readonly description: "Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.";
|
|
237
|
+
readonly type: "object";
|
|
238
|
+
readonly additionalProperties: false;
|
|
239
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
240
|
+
readonly properties: {
|
|
241
|
+
readonly roomId: {
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
};
|
|
244
|
+
readonly earliestReadableEpoch: {
|
|
245
|
+
readonly type: "integer";
|
|
246
|
+
readonly minimum: 1;
|
|
247
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.";
|
|
248
|
+
};
|
|
249
|
+
readonly fetched: {
|
|
250
|
+
readonly type: "integer";
|
|
251
|
+
readonly minimum: 0;
|
|
252
|
+
readonly description: "How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.";
|
|
253
|
+
};
|
|
254
|
+
readonly stored: {
|
|
255
|
+
readonly type: "integer";
|
|
256
|
+
readonly minimum: 0;
|
|
257
|
+
readonly description: "How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.";
|
|
258
|
+
};
|
|
259
|
+
readonly ext: {
|
|
260
|
+
readonly $ref: "#/$defs/Ext";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
readonly Ext: {
|
|
265
|
+
readonly title: "Ext";
|
|
266
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
267
|
+
readonly type: "object";
|
|
268
|
+
readonly minProperties: 1;
|
|
269
|
+
readonly additionalProperties: true;
|
|
270
|
+
readonly propertyNames: {
|
|
271
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
279
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
280
|
+
* parties (§7.3 item 5).
|
|
281
|
+
*/
|
|
282
|
+
export declare const RESPONSE_SPEC: {
|
|
283
|
+
readonly typeUri: "https://trusttasks.org/spec/rooms/keys/backfill/0.1#response";
|
|
284
|
+
readonly isBearer: false;
|
|
285
|
+
readonly isProofRequired: true;
|
|
286
|
+
readonly isRecipientRequired: true;
|
|
287
|
+
readonly isIssuedAtRequired: true;
|
|
288
|
+
readonly payloadSchema: {
|
|
289
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
290
|
+
readonly $ref: "#/$defs/Response";
|
|
291
|
+
readonly $defs: {
|
|
292
|
+
readonly Response: {
|
|
293
|
+
readonly $anchor: "response";
|
|
294
|
+
readonly title: "Rooms Keys Backfill — response payload";
|
|
295
|
+
readonly description: "Success response to rooms/keys/backfill. Type https://trusttasks.org/spec/rooms/keys/backfill/0.1#response.";
|
|
296
|
+
readonly type: "object";
|
|
297
|
+
readonly additionalProperties: false;
|
|
298
|
+
readonly required: readonly ["roomId", "earliestReadableEpoch"];
|
|
299
|
+
readonly properties: {
|
|
300
|
+
readonly roomId: {
|
|
301
|
+
readonly type: "string";
|
|
302
|
+
};
|
|
303
|
+
readonly earliestReadableEpoch: {
|
|
304
|
+
readonly type: "integer";
|
|
305
|
+
readonly minimum: 1;
|
|
306
|
+
readonly description: "The earliest epoch the recipient can now derive a key for, having walked what it holds. **This is the answer worth having**, and it is not derivable from `fetched`: a rung extends reach only if every rung above it is present, so a chain served with a gap in it moves this number not at all. `1` means the room's whole retained history is readable.";
|
|
307
|
+
};
|
|
308
|
+
readonly fetched: {
|
|
309
|
+
readonly type: "integer";
|
|
310
|
+
readonly minimum: 0;
|
|
311
|
+
readonly description: "How many rungs the host served. Reported separately from `stored` and from the reach so a caller can tell the three ways this ends: nothing served (the host has no more), served and stored but the reach did not move (a gap), or served and the reach moved.";
|
|
312
|
+
};
|
|
313
|
+
readonly stored: {
|
|
314
|
+
readonly type: "integer";
|
|
315
|
+
readonly minimum: 0;
|
|
316
|
+
readonly description: "How many of them the recipient did not already hold. Zero alongside a positive `fetched` means the chain was already delivered, which is what a retry looks like.";
|
|
317
|
+
};
|
|
318
|
+
readonly ext: {
|
|
319
|
+
readonly $ref: "#/$defs/Ext";
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
readonly Ext: {
|
|
324
|
+
readonly title: "Ext";
|
|
325
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
326
|
+
readonly type: "object";
|
|
327
|
+
readonly minProperties: 1;
|
|
328
|
+
readonly additionalProperties: true;
|
|
329
|
+
readonly propertyNames: {
|
|
330
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/backfill/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,gCAA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