@openvtc/trust-tasks 0.26.1 → 0.26.3

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 (98) hide show
  1. package/CHANGELOG.md +152 -0
  2. package/dist/_shared/components.d.ts +107 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +15 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +15 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/rooms/owner/group/add/0.1/payload.d.ts +417 -0
  9. package/dist/rooms/owner/group/add/0.1/payload.d.ts.map +1 -0
  10. package/dist/rooms/owner/group/add/0.1/payload.js +218 -0
  11. package/dist/rooms/owner/group/add/0.1/payload.js.map +1 -0
  12. package/dist/rooms/owner/group/create/0.1/payload.d.ts +299 -0
  13. package/dist/rooms/owner/group/create/0.1/payload.d.ts.map +1 -0
  14. package/dist/rooms/owner/group/create/0.1/payload.js +163 -0
  15. package/dist/rooms/owner/group/create/0.1/payload.js.map +1 -0
  16. package/dist/rooms/owner/group/remove/0.1/payload.d.ts +343 -0
  17. package/dist/rooms/owner/group/remove/0.1/payload.d.ts.map +1 -0
  18. package/dist/rooms/owner/group/remove/0.1/payload.js +184 -0
  19. package/dist/rooms/owner/group/remove/0.1/payload.js.map +1 -0
  20. package/dist/rooms/owner/register/0.1/payload.d.ts +3 -3
  21. package/dist/rooms/owner/register/0.1/payload.js +1 -1
  22. package/dist/rooms/owner/register/0.1/payload.js.map +1 -1
  23. package/dist/vtc/_shared/0.1/community-room.d.ts +16 -0
  24. package/dist/vtc/_shared/0.1/community-room.d.ts.map +1 -0
  25. package/dist/vtc/_shared/0.1/community-room.js +6 -0
  26. package/dist/vtc/_shared/0.1/community-room.js.map +1 -0
  27. package/dist/vtc/admin/events/_shared/0.1/topic.d.ts +1 -1
  28. package/dist/vtc/admin/events/_shared/0.1/topic.d.ts.map +1 -1
  29. package/dist/vtc/admin/events/_shared/0.2/topic.d.ts +28 -0
  30. package/dist/vtc/admin/events/_shared/0.2/topic.d.ts.map +1 -0
  31. package/dist/vtc/admin/events/_shared/0.2/topic.js +6 -0
  32. package/dist/vtc/admin/events/_shared/0.2/topic.js.map +1 -0
  33. package/dist/vtc/admin/events/event/0.1/payload.d.ts +1 -1
  34. package/dist/vtc/admin/events/event/0.1/payload.d.ts.map +1 -1
  35. package/dist/vtc/admin/events/event/0.2/payload.d.ts +172 -0
  36. package/dist/vtc/admin/events/event/0.2/payload.d.ts.map +1 -0
  37. package/dist/vtc/admin/events/event/0.2/payload.js +100 -0
  38. package/dist/vtc/admin/events/event/0.2/payload.js.map +1 -0
  39. package/dist/vtc/admin/events/subscribe/0.1/payload.d.ts +1 -1
  40. package/dist/vtc/admin/events/subscribe/0.1/payload.d.ts.map +1 -1
  41. package/dist/vtc/admin/events/subscribe/0.2/payload.d.ts +409 -0
  42. package/dist/vtc/admin/events/subscribe/0.2/payload.d.ts.map +1 -0
  43. package/dist/vtc/admin/events/subscribe/0.2/payload.js +232 -0
  44. package/dist/vtc/admin/events/subscribe/0.2/payload.js.map +1 -0
  45. package/dist/vtc/rooms/community/create/0.1/payload.d.ts +789 -0
  46. package/dist/vtc/rooms/community/create/0.1/payload.d.ts.map +1 -0
  47. package/dist/vtc/rooms/community/create/0.1/payload.js +463 -0
  48. package/dist/vtc/rooms/community/create/0.1/payload.js.map +1 -0
  49. package/dist/vtc/rooms/community/get/0.1/payload.d.ts +711 -0
  50. package/dist/vtc/rooms/community/get/0.1/payload.d.ts.map +1 -0
  51. package/dist/vtc/rooms/community/get/0.1/payload.js +429 -0
  52. package/dist/vtc/rooms/community/get/0.1/payload.js.map +1 -0
  53. package/dist/vtc/rooms/community/list/0.1/payload.d.ts +772 -0
  54. package/dist/vtc/rooms/community/list/0.1/payload.d.ts.map +1 -0
  55. package/dist/vtc/rooms/community/list/0.1/payload.js +452 -0
  56. package/dist/vtc/rooms/community/list/0.1/payload.js.map +1 -0
  57. package/dist/vtc/rooms/community/members/add/0.1/payload.d.ts +535 -0
  58. package/dist/vtc/rooms/community/members/add/0.1/payload.d.ts.map +1 -0
  59. package/dist/vtc/rooms/community/members/add/0.1/payload.js +314 -0
  60. package/dist/vtc/rooms/community/members/add/0.1/payload.js.map +1 -0
  61. package/dist/vtc/rooms/community/members/list/0.1/payload.d.ts +554 -0
  62. package/dist/vtc/rooms/community/members/list/0.1/payload.d.ts.map +1 -0
  63. package/dist/vtc/rooms/community/members/list/0.1/payload.js +315 -0
  64. package/dist/vtc/rooms/community/members/list/0.1/payload.js.map +1 -0
  65. package/dist/vtc/rooms/community/members/remove/0.1/payload.d.ts +533 -0
  66. package/dist/vtc/rooms/community/members/remove/0.1/payload.d.ts.map +1 -0
  67. package/dist/vtc/rooms/community/members/remove/0.1/payload.js +313 -0
  68. package/dist/vtc/rooms/community/members/remove/0.1/payload.js.map +1 -0
  69. package/dist/vtc/rooms/offers/accept/0.1/payload.d.ts +349 -0
  70. package/dist/vtc/rooms/offers/accept/0.1/payload.d.ts.map +1 -0
  71. package/dist/vtc/rooms/offers/accept/0.1/payload.js +188 -0
  72. package/dist/vtc/rooms/offers/accept/0.1/payload.js.map +1 -0
  73. package/dist/vtc/rooms/offers/list/0.1/payload.d.ts +692 -0
  74. package/dist/vtc/rooms/offers/list/0.1/payload.d.ts.map +1 -0
  75. package/dist/vtc/rooms/offers/list/0.1/payload.js +408 -0
  76. package/dist/vtc/rooms/offers/list/0.1/payload.js.map +1 -0
  77. package/package.json +1 -1
  78. package/src/_shared/components.ts +120 -1
  79. package/src/index.ts +15 -0
  80. package/src/rooms/owner/group/add/0.1/payload.ts +288 -0
  81. package/src/rooms/owner/group/create/0.1/payload.ts +213 -0
  82. package/src/rooms/owner/group/remove/0.1/payload.ts +242 -0
  83. package/src/rooms/owner/register/0.1/payload.ts +2 -2
  84. package/src/vtc/_shared/0.1/community-room.ts +17 -0
  85. package/src/vtc/admin/events/_shared/0.1/topic.ts +1 -1
  86. package/src/vtc/admin/events/_shared/0.2/topic.ts +29 -0
  87. package/src/vtc/admin/events/event/0.1/payload.ts +1 -1
  88. package/src/vtc/admin/events/event/0.2/payload.ts +134 -0
  89. package/src/vtc/admin/events/subscribe/0.1/payload.ts +1 -1
  90. package/src/vtc/admin/events/subscribe/0.2/payload.ts +306 -0
  91. package/src/vtc/rooms/community/create/0.1/payload.ts +509 -0
  92. package/src/vtc/rooms/community/get/0.1/payload.ts +461 -0
  93. package/src/vtc/rooms/community/list/0.1/payload.ts +495 -0
  94. package/src/vtc/rooms/community/members/add/0.1/payload.ts +356 -0
  95. package/src/vtc/rooms/community/members/list/0.1/payload.ts +366 -0
  96. package/src/vtc/rooms/community/members/remove/0.1/payload.ts +351 -0
  97. package/src/vtc/rooms/offers/accept/0.1/payload.ts +240 -0
  98. package/src/vtc/rooms/offers/list/0.1/payload.ts +451 -0
@@ -0,0 +1,417 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/owner/group/add/0.1/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../../_shared/components.js";
6
+ export interface RoomsOwnerGroupAddPayload {
7
+ /**
8
+ * The room whose group admits a member. The recipient MUST hold its group.
9
+ */
10
+ roomId: string;
11
+ /**
12
+ * The room's host, as a DID: where the room's epoch advances. Named by the caller because the recipient holds key custody, not a hosting register.
13
+ */
14
+ host: string;
15
+ /**
16
+ * The DID being admitted. The KeyPackage's leaf credential MUST identify it; one that names anyone else is refused, so an owner never admits a party other than the one they meant.
17
+ */
18
+ member: string;
19
+ /**
20
+ * The newcomer's MLS KeyPackage, base64url without padding, as rooms/keys/key-package returned it.
21
+ */
22
+ keyPackage: string;
23
+ /**
24
+ * Why, carried to the host's epoch advance. Untrusted and attributed to its author: it MUST NOT carry personal data or a credential.
25
+ */
26
+ reason?: string;
27
+ /**
28
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
29
+ */
30
+ ext?: Ext;
31
+ }
32
+ /**
33
+ * Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.1#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.
34
+ */
35
+ export interface RoomsOwnerGroupAddResponsePayload {
36
+ /**
37
+ * The room.
38
+ */
39
+ roomId: string;
40
+ /**
41
+ * Who was admitted.
42
+ */
43
+ member: string;
44
+ /**
45
+ * The room epoch after the admission, as the host recorded it.
46
+ */
47
+ epoch: number;
48
+ /**
49
+ * The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host.
50
+ */
51
+ welcome: string;
52
+ /**
53
+ * The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged.
54
+ */
55
+ ratchetTree?: string;
56
+ ext?: Ext;
57
+ }
58
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
59
+ export type { Ext };
60
+ /** Trust Task type URI. */
61
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/owner/group/add/0.1";
62
+ /** Stable alias for this specification's request payload shape. */
63
+ export type Payload = RoomsOwnerGroupAddPayload;
64
+ /** Trust Task response type URI (request type URI + "#response"). */
65
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/owner/group/add/0.1#response";
66
+ /** Stable alias for this specification's success-response payload shape. */
67
+ export type Response = RoomsOwnerGroupAddResponsePayload;
68
+ /**
69
+ * This specification's payload schema, as a value.
70
+ *
71
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
72
+ * rather than only as a `.json` file because TypeScript types are erased
73
+ * at runtime: without a schema a consumer has nothing to validate, and
74
+ * every REQUIRED payload member is optional in practice. Cross-file
75
+ * `$ref`s are already inlined, so it needs no resolver.
76
+ */
77
+ export declare const PAYLOAD_SCHEMA: {
78
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
79
+ readonly $id: "https://trusttasks.org/spec/rooms/owner/group/add/0.1";
80
+ readonly title: "Rooms Owner Group Add — payload";
81
+ readonly type: "object";
82
+ readonly additionalProperties: false;
83
+ readonly required: readonly ["roomId", "host", "member", "keyPackage"];
84
+ readonly properties: {
85
+ readonly roomId: {
86
+ readonly type: "string";
87
+ readonly minLength: 1;
88
+ readonly maxLength: 512;
89
+ readonly description: "The room whose group admits a member. The recipient MUST hold its group.";
90
+ };
91
+ readonly host: {
92
+ readonly type: "string";
93
+ readonly pattern: "^did:";
94
+ readonly maxLength: 2048;
95
+ readonly description: "The room's host, as a DID: where the room's epoch advances. Named by the caller because the recipient holds key custody, not a hosting register.";
96
+ };
97
+ readonly member: {
98
+ readonly type: "string";
99
+ readonly pattern: "^did:";
100
+ readonly maxLength: 2048;
101
+ readonly description: "The DID being admitted. The KeyPackage's leaf credential MUST identify it; one that names anyone else is refused, so an owner never admits a party other than the one they meant.";
102
+ };
103
+ readonly keyPackage: {
104
+ readonly type: "string";
105
+ readonly minLength: 1;
106
+ readonly maxLength: 65536;
107
+ readonly pattern: "^[A-Za-z0-9_-]+$";
108
+ readonly description: "The newcomer's MLS KeyPackage, base64url without padding, as rooms/keys/key-package returned it.";
109
+ };
110
+ readonly reason: {
111
+ readonly type: "string";
112
+ readonly minLength: 1;
113
+ readonly maxLength: 500;
114
+ readonly description: "Why, carried to the host's epoch advance. Untrusted and attributed to its author: it MUST NOT carry personal data or a credential.";
115
+ };
116
+ readonly ext: {
117
+ readonly $ref: "#/$defs/Ext";
118
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
119
+ };
120
+ };
121
+ readonly $defs: {
122
+ readonly Response: {
123
+ readonly $anchor: "response";
124
+ readonly title: "Rooms Owner Group Add — response payload";
125
+ readonly description: "Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.1#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.";
126
+ readonly type: "object";
127
+ readonly additionalProperties: false;
128
+ readonly required: readonly ["roomId", "member", "epoch", "welcome"];
129
+ readonly properties: {
130
+ readonly roomId: {
131
+ readonly type: "string";
132
+ readonly minLength: 1;
133
+ readonly maxLength: 512;
134
+ readonly description: "The room.";
135
+ };
136
+ readonly member: {
137
+ readonly type: "string";
138
+ readonly pattern: "^did:";
139
+ readonly maxLength: 2048;
140
+ readonly description: "Who was admitted.";
141
+ };
142
+ readonly epoch: {
143
+ readonly type: "integer";
144
+ readonly minimum: 2;
145
+ readonly description: "The room epoch after the admission, as the host recorded it.";
146
+ };
147
+ readonly welcome: {
148
+ readonly type: "string";
149
+ readonly minLength: 1;
150
+ readonly pattern: "^[A-Za-z0-9_-]+$";
151
+ readonly description: "The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host.";
152
+ };
153
+ readonly ratchetTree: {
154
+ readonly type: "string";
155
+ readonly minLength: 1;
156
+ readonly pattern: "^[A-Za-z0-9_-]+$";
157
+ readonly description: "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged.";
158
+ };
159
+ readonly ext: {
160
+ readonly $ref: "#/$defs/Ext";
161
+ };
162
+ };
163
+ };
164
+ readonly Ext: {
165
+ readonly title: "Ext";
166
+ 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.";
167
+ readonly type: "object";
168
+ readonly minProperties: 1;
169
+ readonly additionalProperties: true;
170
+ readonly propertyNames: {
171
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
172
+ };
173
+ };
174
+ };
175
+ };
176
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
177
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
178
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
179
+ readonly $ref: "#/$defs/Response";
180
+ readonly $defs: {
181
+ readonly Response: {
182
+ readonly $anchor: "response";
183
+ readonly title: "Rooms Owner Group Add — response payload";
184
+ readonly description: "Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.1#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.";
185
+ readonly type: "object";
186
+ readonly additionalProperties: false;
187
+ readonly required: readonly ["roomId", "member", "epoch", "welcome"];
188
+ readonly properties: {
189
+ readonly roomId: {
190
+ readonly type: "string";
191
+ readonly minLength: 1;
192
+ readonly maxLength: 512;
193
+ readonly description: "The room.";
194
+ };
195
+ readonly member: {
196
+ readonly type: "string";
197
+ readonly pattern: "^did:";
198
+ readonly maxLength: 2048;
199
+ readonly description: "Who was admitted.";
200
+ };
201
+ readonly epoch: {
202
+ readonly type: "integer";
203
+ readonly minimum: 2;
204
+ readonly description: "The room epoch after the admission, as the host recorded it.";
205
+ };
206
+ readonly welcome: {
207
+ readonly type: "string";
208
+ readonly minLength: 1;
209
+ readonly pattern: "^[A-Za-z0-9_-]+$";
210
+ readonly description: "The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host.";
211
+ };
212
+ readonly ratchetTree: {
213
+ readonly type: "string";
214
+ readonly minLength: 1;
215
+ readonly pattern: "^[A-Za-z0-9_-]+$";
216
+ readonly description: "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged.";
217
+ };
218
+ readonly ext: {
219
+ readonly $ref: "#/$defs/Ext";
220
+ };
221
+ };
222
+ };
223
+ readonly Ext: {
224
+ readonly title: "Ext";
225
+ 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.";
226
+ readonly type: "object";
227
+ readonly minProperties: 1;
228
+ readonly additionalProperties: true;
229
+ readonly propertyNames: {
230
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
231
+ };
232
+ };
233
+ };
234
+ };
235
+ /**
236
+ * SPEC.md §7.2 policy for the request variant, from this specification's
237
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
238
+ * per-specification and cannot be derived from the document alone, and
239
+ * item 2 needs the schema this carries.
240
+ */
241
+ export declare const SPEC: {
242
+ readonly typeUri: "https://trusttasks.org/spec/rooms/owner/group/add/0.1";
243
+ readonly isBearer: false;
244
+ readonly isProofRequired: true;
245
+ readonly isRecipientRequired: true;
246
+ readonly isIssuedAtRequired: true;
247
+ readonly payloadSchema: {
248
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
249
+ readonly $id: "https://trusttasks.org/spec/rooms/owner/group/add/0.1";
250
+ readonly title: "Rooms Owner Group Add — payload";
251
+ readonly type: "object";
252
+ readonly additionalProperties: false;
253
+ readonly required: readonly ["roomId", "host", "member", "keyPackage"];
254
+ readonly properties: {
255
+ readonly roomId: {
256
+ readonly type: "string";
257
+ readonly minLength: 1;
258
+ readonly maxLength: 512;
259
+ readonly description: "The room whose group admits a member. The recipient MUST hold its group.";
260
+ };
261
+ readonly host: {
262
+ readonly type: "string";
263
+ readonly pattern: "^did:";
264
+ readonly maxLength: 2048;
265
+ readonly description: "The room's host, as a DID: where the room's epoch advances. Named by the caller because the recipient holds key custody, not a hosting register.";
266
+ };
267
+ readonly member: {
268
+ readonly type: "string";
269
+ readonly pattern: "^did:";
270
+ readonly maxLength: 2048;
271
+ readonly description: "The DID being admitted. The KeyPackage's leaf credential MUST identify it; one that names anyone else is refused, so an owner never admits a party other than the one they meant.";
272
+ };
273
+ readonly keyPackage: {
274
+ readonly type: "string";
275
+ readonly minLength: 1;
276
+ readonly maxLength: 65536;
277
+ readonly pattern: "^[A-Za-z0-9_-]+$";
278
+ readonly description: "The newcomer's MLS KeyPackage, base64url without padding, as rooms/keys/key-package returned it.";
279
+ };
280
+ readonly reason: {
281
+ readonly type: "string";
282
+ readonly minLength: 1;
283
+ readonly maxLength: 500;
284
+ readonly description: "Why, carried to the host's epoch advance. Untrusted and attributed to its author: it MUST NOT carry personal data or a credential.";
285
+ };
286
+ readonly ext: {
287
+ readonly $ref: "#/$defs/Ext";
288
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
289
+ };
290
+ };
291
+ readonly $defs: {
292
+ readonly Response: {
293
+ readonly $anchor: "response";
294
+ readonly title: "Rooms Owner Group Add — response payload";
295
+ readonly description: "Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.1#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.";
296
+ readonly type: "object";
297
+ readonly additionalProperties: false;
298
+ readonly required: readonly ["roomId", "member", "epoch", "welcome"];
299
+ readonly properties: {
300
+ readonly roomId: {
301
+ readonly type: "string";
302
+ readonly minLength: 1;
303
+ readonly maxLength: 512;
304
+ readonly description: "The room.";
305
+ };
306
+ readonly member: {
307
+ readonly type: "string";
308
+ readonly pattern: "^did:";
309
+ readonly maxLength: 2048;
310
+ readonly description: "Who was admitted.";
311
+ };
312
+ readonly epoch: {
313
+ readonly type: "integer";
314
+ readonly minimum: 2;
315
+ readonly description: "The room epoch after the admission, as the host recorded it.";
316
+ };
317
+ readonly welcome: {
318
+ readonly type: "string";
319
+ readonly minLength: 1;
320
+ readonly pattern: "^[A-Za-z0-9_-]+$";
321
+ readonly description: "The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host.";
322
+ };
323
+ readonly ratchetTree: {
324
+ readonly type: "string";
325
+ readonly minLength: 1;
326
+ readonly pattern: "^[A-Za-z0-9_-]+$";
327
+ readonly description: "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged.";
328
+ };
329
+ readonly ext: {
330
+ readonly $ref: "#/$defs/Ext";
331
+ };
332
+ };
333
+ };
334
+ readonly Ext: {
335
+ readonly title: "Ext";
336
+ 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.";
337
+ readonly type: "object";
338
+ readonly minProperties: 1;
339
+ readonly additionalProperties: true;
340
+ readonly propertyNames: {
341
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
342
+ };
343
+ };
344
+ };
345
+ };
346
+ };
347
+ /**
348
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
349
+ * tracks the *issuer* party's requirement because a response swaps the
350
+ * parties (§7.3 item 5).
351
+ */
352
+ export declare const RESPONSE_SPEC: {
353
+ readonly typeUri: "https://trusttasks.org/spec/rooms/owner/group/add/0.1#response";
354
+ readonly isBearer: false;
355
+ readonly isProofRequired: true;
356
+ readonly isRecipientRequired: true;
357
+ readonly isIssuedAtRequired: true;
358
+ readonly payloadSchema: {
359
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
360
+ readonly $ref: "#/$defs/Response";
361
+ readonly $defs: {
362
+ readonly Response: {
363
+ readonly $anchor: "response";
364
+ readonly title: "Rooms Owner Group Add — response payload";
365
+ readonly description: "Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.1#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.";
366
+ readonly type: "object";
367
+ readonly additionalProperties: false;
368
+ readonly required: readonly ["roomId", "member", "epoch", "welcome"];
369
+ readonly properties: {
370
+ readonly roomId: {
371
+ readonly type: "string";
372
+ readonly minLength: 1;
373
+ readonly maxLength: 512;
374
+ readonly description: "The room.";
375
+ };
376
+ readonly member: {
377
+ readonly type: "string";
378
+ readonly pattern: "^did:";
379
+ readonly maxLength: 2048;
380
+ readonly description: "Who was admitted.";
381
+ };
382
+ readonly epoch: {
383
+ readonly type: "integer";
384
+ readonly minimum: 2;
385
+ readonly description: "The room epoch after the admission, as the host recorded it.";
386
+ };
387
+ readonly welcome: {
388
+ readonly type: "string";
389
+ readonly minLength: 1;
390
+ readonly pattern: "^[A-Za-z0-9_-]+$";
391
+ readonly description: "The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host.";
392
+ };
393
+ readonly ratchetTree: {
394
+ readonly type: "string";
395
+ readonly minLength: 1;
396
+ readonly pattern: "^[A-Za-z0-9_-]+$";
397
+ readonly description: "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged.";
398
+ };
399
+ readonly ext: {
400
+ readonly $ref: "#/$defs/Ext";
401
+ };
402
+ };
403
+ };
404
+ readonly Ext: {
405
+ readonly title: "Ext";
406
+ 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.";
407
+ readonly type: "object";
408
+ readonly minProperties: 1;
409
+ readonly additionalProperties: true;
410
+ readonly propertyNames: {
411
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
412
+ };
413
+ };
414
+ };
415
+ };
416
+ };
417
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/rooms/owner/group/add/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAGhE,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,uDAAgE,CAAC;AAEzF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,yBAAyB,CAAC;AAEhD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,gEAAyE,CAAC;AAE3G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAEzD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,218 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/owner/group/add/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/owner/group/add/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/owner/group/add/0.1#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/owner/group/add/0.1",
21
+ "title": "Rooms Owner Group Add — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "roomId",
26
+ "host",
27
+ "member",
28
+ "keyPackage"
29
+ ],
30
+ "properties": {
31
+ "roomId": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 512,
35
+ "description": "The room whose group admits a member. The recipient MUST hold its group."
36
+ },
37
+ "host": {
38
+ "type": "string",
39
+ "pattern": "^did:",
40
+ "maxLength": 2048,
41
+ "description": "The room's host, as a DID: where the room's epoch advances. Named by the caller because the recipient holds key custody, not a hosting register."
42
+ },
43
+ "member": {
44
+ "type": "string",
45
+ "pattern": "^did:",
46
+ "maxLength": 2048,
47
+ "description": "The DID being admitted. The KeyPackage's leaf credential MUST identify it; one that names anyone else is refused, so an owner never admits a party other than the one they meant."
48
+ },
49
+ "keyPackage": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "maxLength": 65536,
53
+ "pattern": "^[A-Za-z0-9_-]+$",
54
+ "description": "The newcomer's MLS KeyPackage, base64url without padding, as rooms/keys/key-package returned it."
55
+ },
56
+ "reason": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 500,
60
+ "description": "Why, carried to the host's epoch advance. Untrusted and attributed to its author: it MUST NOT carry personal data or a credential."
61
+ },
62
+ "ext": {
63
+ "$ref": "#/$defs/Ext",
64
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
65
+ }
66
+ },
67
+ "$defs": {
68
+ "Response": {
69
+ "$anchor": "response",
70
+ "title": "Rooms Owner Group Add — response payload",
71
+ "description": "Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.1#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.",
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "roomId",
76
+ "member",
77
+ "epoch",
78
+ "welcome"
79
+ ],
80
+ "properties": {
81
+ "roomId": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "maxLength": 512,
85
+ "description": "The room."
86
+ },
87
+ "member": {
88
+ "type": "string",
89
+ "pattern": "^did:",
90
+ "maxLength": 2048,
91
+ "description": "Who was admitted."
92
+ },
93
+ "epoch": {
94
+ "type": "integer",
95
+ "minimum": 2,
96
+ "description": "The room epoch after the admission, as the host recorded it."
97
+ },
98
+ "welcome": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "pattern": "^[A-Za-z0-9_-]+$",
102
+ "description": "The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host."
103
+ },
104
+ "ratchetTree": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "pattern": "^[A-Za-z0-9_-]+$",
108
+ "description": "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged."
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext"
112
+ }
113
+ }
114
+ },
115
+ "Ext": {
116
+ "title": "Ext",
117
+ "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.",
118
+ "type": "object",
119
+ "minProperties": 1,
120
+ "additionalProperties": true,
121
+ "propertyNames": {
122
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
123
+ }
124
+ }
125
+ }
126
+ };
127
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
128
+ export const RESPONSE_PAYLOAD_SCHEMA = {
129
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
130
+ "$ref": "#/$defs/Response",
131
+ "$defs": {
132
+ "Response": {
133
+ "$anchor": "response",
134
+ "title": "Rooms Owner Group Add — response payload",
135
+ "description": "Success response to rooms/owner/group/add. Type https://trusttasks.org/spec/rooms/owner/group/add/0.1#response. The room's new epoch, and the Welcome for the caller to deliver to the newcomer's key holder with rooms/keys/welcome.",
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": [
139
+ "roomId",
140
+ "member",
141
+ "epoch",
142
+ "welcome"
143
+ ],
144
+ "properties": {
145
+ "roomId": {
146
+ "type": "string",
147
+ "minLength": 1,
148
+ "maxLength": 512,
149
+ "description": "The room."
150
+ },
151
+ "member": {
152
+ "type": "string",
153
+ "pattern": "^did:",
154
+ "maxLength": 2048,
155
+ "description": "Who was admitted."
156
+ },
157
+ "epoch": {
158
+ "type": "integer",
159
+ "minimum": 2,
160
+ "description": "The room epoch after the admission, as the host recorded it."
161
+ },
162
+ "welcome": {
163
+ "type": "string",
164
+ "minLength": 1,
165
+ "pattern": "^[A-Za-z0-9_-]+$",
166
+ "description": "The MLS Welcome, base64url, sealed to the newcomer's KeyPackage. For rooms/keys/welcome; never through the host."
167
+ },
168
+ "ratchetTree": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "pattern": "^[A-Za-z0-9_-]+$",
172
+ "description": "The group's ratchet tree, base64url, where the Welcome does not carry it as an extension. Passed to rooms/keys/welcome unchanged."
173
+ },
174
+ "ext": {
175
+ "$ref": "#/$defs/Ext"
176
+ }
177
+ }
178
+ },
179
+ "Ext": {
180
+ "title": "Ext",
181
+ "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.",
182
+ "type": "object",
183
+ "minProperties": 1,
184
+ "additionalProperties": true,
185
+ "propertyNames": {
186
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
187
+ }
188
+ }
189
+ }
190
+ };
191
+ /**
192
+ * SPEC.md §7.2 policy for the request variant, from this specification's
193
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
194
+ * per-specification and cannot be derived from the document alone, and
195
+ * item 2 needs the schema this carries.
196
+ */
197
+ export const SPEC = {
198
+ typeUri: TYPE_URI,
199
+ isBearer: false,
200
+ isProofRequired: true,
201
+ isRecipientRequired: true,
202
+ isIssuedAtRequired: true,
203
+ payloadSchema: PAYLOAD_SCHEMA,
204
+ };
205
+ /**
206
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
207
+ * tracks the *issuer* party's requirement because a response swaps the
208
+ * parties (§7.3 item 5).
209
+ */
210
+ export const RESPONSE_SPEC = {
211
+ typeUri: RESPONSE_TYPE_URI,
212
+ isBearer: false,
213
+ isProofRequired: true,
214
+ isRecipientRequired: true,
215
+ isIssuedAtRequired: true,
216
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
217
+ };
218
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/rooms/owner/group/add/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6DH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,uDAAgE,CAAC;AAKzF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,gEAAyE,CAAC;AAK3G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,uDAAuD;IAC9D,OAAO,EAAE,iCAAiC;IAC1C,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,YAAY;KACb;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MA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