@openvtc/trust-tasks 0.26.15 → 0.26.17

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/dist/_shared/components.d.ts +35 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +6 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +6 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/keys/act/0.4/payload.d.ts +546 -0
  9. package/dist/rooms/keys/act/0.4/payload.d.ts.map +1 -0
  10. package/dist/rooms/keys/act/0.4/payload.js +305 -0
  11. package/dist/rooms/keys/act/0.4/payload.js.map +1 -0
  12. package/dist/rooms/keys/act/0.5/payload.d.ts +546 -0
  13. package/dist/rooms/keys/act/0.5/payload.d.ts.map +1 -0
  14. package/dist/rooms/keys/act/0.5/payload.js +305 -0
  15. package/dist/rooms/keys/act/0.5/payload.js.map +1 -0
  16. package/dist/rooms/keys/key-package/0.2/payload.d.ts +304 -0
  17. package/dist/rooms/keys/key-package/0.2/payload.d.ts.map +1 -0
  18. package/dist/rooms/keys/key-package/0.2/payload.js +166 -0
  19. package/dist/rooms/keys/key-package/0.2/payload.js.map +1 -0
  20. package/dist/vtc/_shared/0.1/community-room.d.ts +1 -1
  21. package/dist/vtc/_shared/0.1/community-room.d.ts.map +1 -1
  22. package/dist/vtc/community/theme/show/0.1/payload.d.ts +238 -0
  23. package/dist/vtc/community/theme/show/0.1/payload.d.ts.map +1 -0
  24. package/dist/vtc/community/theme/show/0.1/payload.js +135 -0
  25. package/dist/vtc/community/theme/show/0.1/payload.js.map +1 -0
  26. package/dist/vtc/community/theme/update/0.1/payload.d.ts +286 -0
  27. package/dist/vtc/community/theme/update/0.1/payload.d.ts.map +1 -0
  28. package/dist/vtc/community/theme/update/0.1/payload.js +157 -0
  29. package/dist/vtc/community/theme/update/0.1/payload.js.map +1 -0
  30. package/dist/vtc/rooms/memberships/list/0.1/payload.d.ts +696 -0
  31. package/dist/vtc/rooms/memberships/list/0.1/payload.d.ts.map +1 -0
  32. package/dist/vtc/rooms/memberships/list/0.1/payload.js +402 -0
  33. package/dist/vtc/rooms/memberships/list/0.1/payload.js.map +1 -0
  34. package/package.json +1 -1
  35. package/src/_shared/components.ts +35 -0
  36. package/src/index.ts +6 -0
  37. package/src/rooms/keys/act/0.4/payload.ts +380 -0
  38. package/src/rooms/keys/act/0.5/payload.ts +380 -0
  39. package/src/rooms/keys/key-package/0.2/payload.ts +219 -0
  40. package/src/vtc/_shared/0.1/community-room.ts +1 -1
  41. package/src/vtc/community/theme/show/0.1/payload.ts +170 -0
  42. package/src/vtc/community/theme/update/0.1/payload.ts +204 -0
  43. package/src/vtc/rooms/memberships/list/0.1/payload.ts +445 -0
@@ -0,0 +1,305 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/act/0.5/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/keys/act/0.5";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/keys/act/0.5#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/rooms/keys/act/0.5",
21
+ "title": "Rooms Keys Act — payload",
22
+ "description": "A member's own client asks the member's key holder to complete one host-bound room request — or one of the two requests by which a member takes up a community's offer of admission to a room — as the member: the member's own authority narrowed to the one action the request's type needs, the member as issuer, and the member's signature. The outer document members are owned by the framework — SPEC §6.3.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "document"
27
+ ],
28
+ "properties": {
29
+ "document": {
30
+ "$ref": "#/$defs/UnsignedRoomRequest",
31
+ "description": "The room request to complete, as the client will send it, minus its presentation and its proof."
32
+ },
33
+ "ext": {
34
+ "$ref": "#/$defs/Ext",
35
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
36
+ }
37
+ },
38
+ "$defs": {
39
+ "UnsignedRoomRequest": {
40
+ "$anchor": "unsigned-room-request",
41
+ "title": "Unsigned room request",
42
+ "description": "A Trust Task document of a type in the rooms/keys/act table, built by the member's client: no proof, and no presentation in its payload. The recipient validates the payload against the named type's own schema; this one fixes only the envelope.",
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": [
46
+ "id",
47
+ "type",
48
+ "recipient",
49
+ "issuedAt",
50
+ "payload"
51
+ ],
52
+ "properties": {
53
+ "id": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "maxLength": 512,
57
+ "description": "The request's identifier, set by the client. The host keys duplicate-execution protection on it."
58
+ },
59
+ "type": {
60
+ "type": "string",
61
+ "pattern": "^https://trusttasks\\.org/spec/(rooms|vtc/rooms/(offers|memberships))/",
62
+ "maxLength": 2048,
63
+ "description": "The room request's Type URI: a rooms/* request, or one of the community types: vtc/rooms/offers/{list,accept} or vtc/rooms/memberships/list. Only the types in this task's table are completed; any other is `typeNotActable`."
64
+ },
65
+ "issuer": {
66
+ "type": "string",
67
+ "pattern": "^did:",
68
+ "maxLength": 2048,
69
+ "description": "The member to act as, and this task's subject (subjectPath /document/issuer). REQUIRED for a type that names no room (rooms/blobs/chunk/0.1, rooms/blobs/upload/{commit,abort}/0.2), where it is the member whose request opened the transfer; REQUIRED for the community types (vtc/rooms/offers/list/0.1 and 0.2, vtc/rooms/offers/accept/0.1, vtc/rooms/memberships/list/0.1), where it is the DID the community addressed its offers to; REQUIRED where the caller may act as more than one member of the room; optional where it may act as exactly one. A rule over two members this schema does not express: the recipient refuses an absent issuer it needs with principalAmbiguous. Never the client's own identifier."
70
+ },
71
+ "recipient": {
72
+ "type": "string",
73
+ "pattern": "^did:",
74
+ "maxLength": 2048,
75
+ "description": "The room's host, or for the community types the community that made the offers: the party the completed document is for. Covered by the member's proof."
76
+ },
77
+ "issuedAt": {
78
+ "type": "string",
79
+ "format": "date-time"
80
+ },
81
+ "expiresAt": {
82
+ "type": "string",
83
+ "format": "date-time"
84
+ },
85
+ "threadId": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "maxLength": 512
89
+ },
90
+ "payload": {
91
+ "type": "object",
92
+ "description": "The request's payload, as the named type's schema defines it but without `presentation`: the recipient inserts the member's own, narrowed to the table's action, where the type takes one, and refuses a payload that already carries one. For vtc/rooms/offers/accept/0.1 a `keyPackage`, where present, MUST be one the recipient minted with rooms/keys/key-package at 0.1 or 0.2 (Recipient item 10)."
93
+ },
94
+ "ext": {
95
+ "$ref": "#/$defs/Ext"
96
+ }
97
+ },
98
+ "not": {
99
+ "required": [
100
+ "proof"
101
+ ]
102
+ }
103
+ },
104
+ "Response": {
105
+ "$anchor": "response",
106
+ "title": "Rooms Keys Act — response payload",
107
+ "description": "Success response to rooms/keys/act. Type https://trusttasks.org/spec/rooms/keys/act/0.5#response. The request, completed as the member, for the caller to send to its recipient unaltered.",
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": [
111
+ "principal",
112
+ "document"
113
+ ],
114
+ "properties": {
115
+ "principal": {
116
+ "type": "string",
117
+ "pattern": "^did:",
118
+ "maxLength": 2048,
119
+ "description": "The member the recipient signed as: the completed document's `issuer`."
120
+ },
121
+ "document": {
122
+ "type": "object",
123
+ "required": [
124
+ "id",
125
+ "type",
126
+ "issuer",
127
+ "recipient",
128
+ "issuedAt",
129
+ "payload",
130
+ "proof"
131
+ ],
132
+ "description": "The supplied document with `issuer` set to the member, `payload.presentation` inserted where the type takes one, and the member's Data Integrity `proof` (`proofPurpose: authentication`). Every other member is unchanged."
133
+ },
134
+ "expiresAt": {
135
+ "type": "string",
136
+ "format": "date-time",
137
+ "description": "When the inserted presentation's leaf lapses. Absent when the type takes no presentation."
138
+ },
139
+ "ext": {
140
+ "$ref": "#/$defs/Ext"
141
+ }
142
+ }
143
+ },
144
+ "Ext": {
145
+ "title": "Ext",
146
+ "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.",
147
+ "type": "object",
148
+ "minProperties": 1,
149
+ "additionalProperties": true,
150
+ "propertyNames": {
151
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
152
+ }
153
+ }
154
+ }
155
+ };
156
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
157
+ export const RESPONSE_PAYLOAD_SCHEMA = {
158
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
159
+ "$ref": "#/$defs/Response",
160
+ "$defs": {
161
+ "UnsignedRoomRequest": {
162
+ "$anchor": "unsigned-room-request",
163
+ "title": "Unsigned room request",
164
+ "description": "A Trust Task document of a type in the rooms/keys/act table, built by the member's client: no proof, and no presentation in its payload. The recipient validates the payload against the named type's own schema; this one fixes only the envelope.",
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "required": [
168
+ "id",
169
+ "type",
170
+ "recipient",
171
+ "issuedAt",
172
+ "payload"
173
+ ],
174
+ "properties": {
175
+ "id": {
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "maxLength": 512,
179
+ "description": "The request's identifier, set by the client. The host keys duplicate-execution protection on it."
180
+ },
181
+ "type": {
182
+ "type": "string",
183
+ "pattern": "^https://trusttasks\\.org/spec/(rooms|vtc/rooms/(offers|memberships))/",
184
+ "maxLength": 2048,
185
+ "description": "The room request's Type URI: a rooms/* request, or one of the community types: vtc/rooms/offers/{list,accept} or vtc/rooms/memberships/list. Only the types in this task's table are completed; any other is `typeNotActable`."
186
+ },
187
+ "issuer": {
188
+ "type": "string",
189
+ "pattern": "^did:",
190
+ "maxLength": 2048,
191
+ "description": "The member to act as, and this task's subject (subjectPath /document/issuer). REQUIRED for a type that names no room (rooms/blobs/chunk/0.1, rooms/blobs/upload/{commit,abort}/0.2), where it is the member whose request opened the transfer; REQUIRED for the community types (vtc/rooms/offers/list/0.1 and 0.2, vtc/rooms/offers/accept/0.1, vtc/rooms/memberships/list/0.1), where it is the DID the community addressed its offers to; REQUIRED where the caller may act as more than one member of the room; optional where it may act as exactly one. A rule over two members this schema does not express: the recipient refuses an absent issuer it needs with principalAmbiguous. Never the client's own identifier."
192
+ },
193
+ "recipient": {
194
+ "type": "string",
195
+ "pattern": "^did:",
196
+ "maxLength": 2048,
197
+ "description": "The room's host, or for the community types the community that made the offers: the party the completed document is for. Covered by the member's proof."
198
+ },
199
+ "issuedAt": {
200
+ "type": "string",
201
+ "format": "date-time"
202
+ },
203
+ "expiresAt": {
204
+ "type": "string",
205
+ "format": "date-time"
206
+ },
207
+ "threadId": {
208
+ "type": "string",
209
+ "minLength": 1,
210
+ "maxLength": 512
211
+ },
212
+ "payload": {
213
+ "type": "object",
214
+ "description": "The request's payload, as the named type's schema defines it but without `presentation`: the recipient inserts the member's own, narrowed to the table's action, where the type takes one, and refuses a payload that already carries one. For vtc/rooms/offers/accept/0.1 a `keyPackage`, where present, MUST be one the recipient minted with rooms/keys/key-package at 0.1 or 0.2 (Recipient item 10)."
215
+ },
216
+ "ext": {
217
+ "$ref": "#/$defs/Ext"
218
+ }
219
+ },
220
+ "not": {
221
+ "required": [
222
+ "proof"
223
+ ]
224
+ }
225
+ },
226
+ "Response": {
227
+ "$anchor": "response",
228
+ "title": "Rooms Keys Act — response payload",
229
+ "description": "Success response to rooms/keys/act. Type https://trusttasks.org/spec/rooms/keys/act/0.5#response. The request, completed as the member, for the caller to send to its recipient unaltered.",
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "required": [
233
+ "principal",
234
+ "document"
235
+ ],
236
+ "properties": {
237
+ "principal": {
238
+ "type": "string",
239
+ "pattern": "^did:",
240
+ "maxLength": 2048,
241
+ "description": "The member the recipient signed as: the completed document's `issuer`."
242
+ },
243
+ "document": {
244
+ "type": "object",
245
+ "required": [
246
+ "id",
247
+ "type",
248
+ "issuer",
249
+ "recipient",
250
+ "issuedAt",
251
+ "payload",
252
+ "proof"
253
+ ],
254
+ "description": "The supplied document with `issuer` set to the member, `payload.presentation` inserted where the type takes one, and the member's Data Integrity `proof` (`proofPurpose: authentication`). Every other member is unchanged."
255
+ },
256
+ "expiresAt": {
257
+ "type": "string",
258
+ "format": "date-time",
259
+ "description": "When the inserted presentation's leaf lapses. Absent when the type takes no presentation."
260
+ },
261
+ "ext": {
262
+ "$ref": "#/$defs/Ext"
263
+ }
264
+ }
265
+ },
266
+ "Ext": {
267
+ "title": "Ext",
268
+ "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.",
269
+ "type": "object",
270
+ "minProperties": 1,
271
+ "additionalProperties": true,
272
+ "propertyNames": {
273
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
274
+ }
275
+ }
276
+ }
277
+ };
278
+ /**
279
+ * SPEC.md §7.2 policy for the request variant, from this specification's
280
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
281
+ * per-specification and cannot be derived from the document alone, and
282
+ * item 2 needs the schema this carries.
283
+ */
284
+ export const SPEC = {
285
+ typeUri: TYPE_URI,
286
+ isBearer: false,
287
+ isProofRequired: true,
288
+ isRecipientRequired: true,
289
+ isIssuedAtRequired: true,
290
+ payloadSchema: PAYLOAD_SCHEMA,
291
+ };
292
+ /**
293
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
294
+ * tracks the *issuer* party's requirement because a response swaps the
295
+ * parties (§7.3 item 5).
296
+ */
297
+ export const RESPONSE_SPEC = {
298
+ typeUri: RESPONSE_TYPE_URI,
299
+ isBearer: false,
300
+ isProofRequired: true,
301
+ isRecipientRequired: true,
302
+ isIssuedAtRequired: true,
303
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
304
+ };
305
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/rooms/keys/act/0.5/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkEH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,gDAAyD,CAAC;AAKlF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,yDAAkE,CAAC;AAKpG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,0BAA0B;IACnC,aAAa,EAAE,qZAAqZ;IACpa,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,UAAU;KACX;IACD,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,MAAM,EAAE,6BAA6B;YACrC,aAAa,EAAE,iGAAiG;SACjH;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;YACrB,aAAa,EAAE,yDAAyD;SACzE;KACF;IACD,OAAO,EAAE;QACP,qBAAqB,EAAE;YACrB,SAAS,EAAE,uBAAuB;YAClC,OAAO,EAAE,uBAAuB;YAChC,aAAa,EAAE,qPAAqP;YACpQ,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,IAAI;gBACJ,MAAM;gBACN,WAAW;gBACX,UAAU;gBACV,SAAS;aACV;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE;oBACJ,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,CAAC;oBACd,WAAW,EAAE,GAAG;oBAChB,aAAa,EAAE,kGAAkG;i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,QAAQ,EAAE,WAAW;oBACrB,aAAa,EAAE,2FAA2F;iBAC3G;gBACD,KAAK,EAAE;oBACL,MAAM,EAAE,aAAa;iBACtB;aACF;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,uKAAuK;YACtL,MAAM,EAAE,QAAQ;YAChB,eAAe,EAAE,CAAC;YAClB,sBAAsB,EAAE,IAAI;YAC5B,eAAe,EAAE;gBACf,SAAS,EAAE,mCAAmC;aAC/C;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,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,304 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/keys/key-package/0.2/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../_shared/components.js";
6
+ /**
7
+ * An invited party asks the agent that will hold its room keys for the MLS KeyPackage the room's owner adds to the group: the one it already holds for this room, member and invitation, or a new one. The private half stays with the agent; only the KeyPackage travels.
8
+ */
9
+ export interface RoomsKeysKeyPackagePayload {
10
+ /**
11
+ * The room to mint a KeyPackage for. Scoped per room rather than reused across rooms: one KeyPackage presented to two rooms correlates a member across them, which is the linkage a `private` room exists to deny.
12
+ */
13
+ roomId: string;
14
+ /**
15
+ * The invitation credential (VIC) the room issued to the member, serialized per the governing profile. It authorizes the mint, names the member — its subject — and, with the room and the member, identifies the KeyPackage the recipient returns again while it is outstanding.
16
+ */
17
+ invitation: string;
18
+ /**
19
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
20
+ */
21
+ ext?: Ext;
22
+ }
23
+ /**
24
+ * Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.2#response.
25
+ */
26
+ export interface RoomsKeysKeyPackageResponsePayload {
27
+ /**
28
+ * The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything.
29
+ */
30
+ keyPackage: string;
31
+ /**
32
+ * When the recipient stops holding the KeyPackage's private half. The same instant on every answer that returns the same KeyPackage: returning it again does not extend it.
33
+ */
34
+ expiresAt: string;
35
+ /**
36
+ * `true` when the recipient returned a KeyPackage it had already minted for this room, member and invitation and still holds; `false` when it minted this one for this request.
37
+ */
38
+ alreadyMinted: boolean;
39
+ ext?: Ext;
40
+ }
41
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
42
+ export type { Ext };
43
+ /** Trust Task type URI. */
44
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/keys/key-package/0.2";
45
+ /** Stable alias for this specification's request payload shape. */
46
+ export type Payload = RoomsKeysKeyPackagePayload;
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/keys/key-package/0.2#response";
49
+ /** Stable alias for this specification's success-response payload shape. */
50
+ export type Response = RoomsKeysKeyPackageResponsePayload;
51
+ /**
52
+ * This specification's payload schema, as a value.
53
+ *
54
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
55
+ * rather than only as a `.json` file because TypeScript types are erased
56
+ * at runtime: without a schema a consumer has nothing to validate, and
57
+ * every REQUIRED payload member is optional in practice. Cross-file
58
+ * `$ref`s are already inlined, so it needs no resolver.
59
+ */
60
+ export declare const PAYLOAD_SCHEMA: {
61
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
62
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/key-package/0.2";
63
+ readonly title: "Rooms Keys Key-Package — payload";
64
+ readonly description: "An invited party asks the agent that will hold its room keys for the MLS KeyPackage the room's owner adds to the group: the one it already holds for this room, member and invitation, or a new one. The private half stays with the agent; only the KeyPackage travels.";
65
+ readonly type: "object";
66
+ readonly additionalProperties: false;
67
+ readonly required: readonly ["roomId", "invitation"];
68
+ readonly properties: {
69
+ readonly roomId: {
70
+ readonly type: "string";
71
+ readonly minLength: 1;
72
+ readonly maxLength: 512;
73
+ readonly description: "The room to mint a KeyPackage for. Scoped per room rather than reused across rooms: one KeyPackage presented to two rooms correlates a member across them, which is the linkage a `private` room exists to deny.";
74
+ };
75
+ readonly invitation: {
76
+ readonly type: "string";
77
+ readonly minLength: 1;
78
+ readonly maxLength: 65536;
79
+ readonly description: "The invitation credential (VIC) the room issued to the member, serialized per the governing profile. It authorizes the mint, names the member — its subject — and, with the room and the member, identifies the KeyPackage the recipient returns again while it is outstanding.";
80
+ };
81
+ readonly ext: {
82
+ readonly $ref: "#/$defs/Ext";
83
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
84
+ };
85
+ };
86
+ readonly $defs: {
87
+ readonly Response: {
88
+ readonly $anchor: "response";
89
+ readonly title: "Rooms Keys Key-Package — response payload";
90
+ readonly description: "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.2#response.";
91
+ readonly type: "object";
92
+ readonly additionalProperties: false;
93
+ readonly required: readonly ["keyPackage", "expiresAt", "alreadyMinted"];
94
+ readonly properties: {
95
+ readonly keyPackage: {
96
+ readonly type: "string";
97
+ readonly minLength: 1;
98
+ readonly description: "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything.";
99
+ };
100
+ readonly expiresAt: {
101
+ readonly type: "string";
102
+ readonly format: "date-time";
103
+ readonly description: "When the recipient stops holding the KeyPackage's private half. The same instant on every answer that returns the same KeyPackage: returning it again does not extend it.";
104
+ };
105
+ readonly alreadyMinted: {
106
+ readonly type: "boolean";
107
+ readonly description: "`true` when the recipient returned a KeyPackage it had already minted for this room, member and invitation and still holds; `false` when it minted this one for this request.";
108
+ };
109
+ readonly ext: {
110
+ readonly $ref: "#/$defs/Ext";
111
+ };
112
+ };
113
+ };
114
+ readonly Ext: {
115
+ readonly title: "Ext";
116
+ 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.";
117
+ readonly type: "object";
118
+ readonly minProperties: 1;
119
+ readonly additionalProperties: true;
120
+ readonly propertyNames: {
121
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
122
+ };
123
+ };
124
+ };
125
+ };
126
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
127
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
128
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
129
+ readonly $ref: "#/$defs/Response";
130
+ readonly $defs: {
131
+ readonly Response: {
132
+ readonly $anchor: "response";
133
+ readonly title: "Rooms Keys Key-Package — response payload";
134
+ readonly description: "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.2#response.";
135
+ readonly type: "object";
136
+ readonly additionalProperties: false;
137
+ readonly required: readonly ["keyPackage", "expiresAt", "alreadyMinted"];
138
+ readonly properties: {
139
+ readonly keyPackage: {
140
+ readonly type: "string";
141
+ readonly minLength: 1;
142
+ readonly description: "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything.";
143
+ };
144
+ readonly expiresAt: {
145
+ readonly type: "string";
146
+ readonly format: "date-time";
147
+ readonly description: "When the recipient stops holding the KeyPackage's private half. The same instant on every answer that returns the same KeyPackage: returning it again does not extend it.";
148
+ };
149
+ readonly alreadyMinted: {
150
+ readonly type: "boolean";
151
+ readonly description: "`true` when the recipient returned a KeyPackage it had already minted for this room, member and invitation and still holds; `false` when it minted this one for this request.";
152
+ };
153
+ readonly ext: {
154
+ readonly $ref: "#/$defs/Ext";
155
+ };
156
+ };
157
+ };
158
+ readonly Ext: {
159
+ readonly title: "Ext";
160
+ 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.";
161
+ readonly type: "object";
162
+ readonly minProperties: 1;
163
+ readonly additionalProperties: true;
164
+ readonly propertyNames: {
165
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
166
+ };
167
+ };
168
+ };
169
+ };
170
+ /**
171
+ * SPEC.md §7.2 policy for the request variant, from this specification's
172
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
173
+ * per-specification and cannot be derived from the document alone, and
174
+ * item 2 needs the schema this carries.
175
+ */
176
+ export declare const SPEC: {
177
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/key-package/0.2";
178
+ readonly isBearer: false;
179
+ readonly isProofRequired: true;
180
+ readonly isRecipientRequired: true;
181
+ readonly isIssuedAtRequired: true;
182
+ readonly payloadSchema: {
183
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
184
+ readonly $id: "https://trusttasks.org/spec/rooms/keys/key-package/0.2";
185
+ readonly title: "Rooms Keys Key-Package — payload";
186
+ readonly description: "An invited party asks the agent that will hold its room keys for the MLS KeyPackage the room's owner adds to the group: the one it already holds for this room, member and invitation, or a new one. The private half stays with the agent; only the KeyPackage travels.";
187
+ readonly type: "object";
188
+ readonly additionalProperties: false;
189
+ readonly required: readonly ["roomId", "invitation"];
190
+ readonly properties: {
191
+ readonly roomId: {
192
+ readonly type: "string";
193
+ readonly minLength: 1;
194
+ readonly maxLength: 512;
195
+ readonly description: "The room to mint a KeyPackage for. Scoped per room rather than reused across rooms: one KeyPackage presented to two rooms correlates a member across them, which is the linkage a `private` room exists to deny.";
196
+ };
197
+ readonly invitation: {
198
+ readonly type: "string";
199
+ readonly minLength: 1;
200
+ readonly maxLength: 65536;
201
+ readonly description: "The invitation credential (VIC) the room issued to the member, serialized per the governing profile. It authorizes the mint, names the member — its subject — and, with the room and the member, identifies the KeyPackage the recipient returns again while it is outstanding.";
202
+ };
203
+ readonly ext: {
204
+ readonly $ref: "#/$defs/Ext";
205
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
206
+ };
207
+ };
208
+ readonly $defs: {
209
+ readonly Response: {
210
+ readonly $anchor: "response";
211
+ readonly title: "Rooms Keys Key-Package — response payload";
212
+ readonly description: "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.2#response.";
213
+ readonly type: "object";
214
+ readonly additionalProperties: false;
215
+ readonly required: readonly ["keyPackage", "expiresAt", "alreadyMinted"];
216
+ readonly properties: {
217
+ readonly keyPackage: {
218
+ readonly type: "string";
219
+ readonly minLength: 1;
220
+ readonly description: "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything.";
221
+ };
222
+ readonly expiresAt: {
223
+ readonly type: "string";
224
+ readonly format: "date-time";
225
+ readonly description: "When the recipient stops holding the KeyPackage's private half. The same instant on every answer that returns the same KeyPackage: returning it again does not extend it.";
226
+ };
227
+ readonly alreadyMinted: {
228
+ readonly type: "boolean";
229
+ readonly description: "`true` when the recipient returned a KeyPackage it had already minted for this room, member and invitation and still holds; `false` when it minted this one for this request.";
230
+ };
231
+ readonly ext: {
232
+ readonly $ref: "#/$defs/Ext";
233
+ };
234
+ };
235
+ };
236
+ readonly Ext: {
237
+ readonly title: "Ext";
238
+ 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.";
239
+ readonly type: "object";
240
+ readonly minProperties: 1;
241
+ readonly additionalProperties: true;
242
+ readonly propertyNames: {
243
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
244
+ };
245
+ };
246
+ };
247
+ };
248
+ };
249
+ /**
250
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
251
+ * tracks the *issuer* party's requirement because a response swaps the
252
+ * parties (§7.3 item 5).
253
+ */
254
+ export declare const RESPONSE_SPEC: {
255
+ readonly typeUri: "https://trusttasks.org/spec/rooms/keys/key-package/0.2#response";
256
+ readonly isBearer: false;
257
+ readonly isProofRequired: true;
258
+ readonly isRecipientRequired: true;
259
+ readonly isIssuedAtRequired: true;
260
+ readonly payloadSchema: {
261
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
262
+ readonly $ref: "#/$defs/Response";
263
+ readonly $defs: {
264
+ readonly Response: {
265
+ readonly $anchor: "response";
266
+ readonly title: "Rooms Keys Key-Package — response payload";
267
+ readonly description: "Success response to rooms/keys/key-package. Type https://trusttasks.org/spec/rooms/keys/key-package/0.2#response.";
268
+ readonly type: "object";
269
+ readonly additionalProperties: false;
270
+ readonly required: readonly ["keyPackage", "expiresAt", "alreadyMinted"];
271
+ readonly properties: {
272
+ readonly keyPackage: {
273
+ readonly type: "string";
274
+ readonly minLength: 1;
275
+ readonly description: "The MLS KeyPackage, base64url. Public: it carries a signature key, an HPKE init key and the leaf's credential, and nothing that opens anything.";
276
+ };
277
+ readonly expiresAt: {
278
+ readonly type: "string";
279
+ readonly format: "date-time";
280
+ readonly description: "When the recipient stops holding the KeyPackage's private half. The same instant on every answer that returns the same KeyPackage: returning it again does not extend it.";
281
+ };
282
+ readonly alreadyMinted: {
283
+ readonly type: "boolean";
284
+ readonly description: "`true` when the recipient returned a KeyPackage it had already minted for this room, member and invitation and still holds; `false` when it minted this one for this request.";
285
+ };
286
+ readonly ext: {
287
+ readonly $ref: "#/$defs/Ext";
288
+ };
289
+ };
290
+ };
291
+ readonly Ext: {
292
+ readonly title: "Ext";
293
+ 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.";
294
+ readonly type: "object";
295
+ readonly minProperties: 1;
296
+ readonly additionalProperties: true;
297
+ readonly propertyNames: {
298
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
299
+ };
300
+ };
301
+ };
302
+ };
303
+ };
304
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/rooms/keys/key-package/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,wDAAiE,CAAC;AAE1F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAEjD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,iEAA0E,CAAC;AAE5G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,kCAAkC,CAAC;AAE1D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;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