@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,313 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/rooms/community/members/remove/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/rooms/community/members/remove/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/vtc/rooms/community/members/remove/0.1",
21
+ "title": "VTC Rooms Community Members Remove — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "roomId",
26
+ "member",
27
+ "reason"
28
+ ],
29
+ "properties": {
30
+ "roomId": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 512,
34
+ "description": "The room's identifier: its DID."
35
+ },
36
+ "member": {
37
+ "type": "string",
38
+ "pattern": "^did:",
39
+ "maxLength": 2048
40
+ },
41
+ "reason": {
42
+ "$ref": "#/$defs/Reason"
43
+ },
44
+ "ext": {
45
+ "$ref": "#/$defs/Ext"
46
+ }
47
+ },
48
+ "$defs": {
49
+ "Response": {
50
+ "$anchor": "response",
51
+ "title": "VTC Rooms Community Members Remove — response payload",
52
+ "description": "Success response to vtc/rooms/community/members/remove. Type https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.1#response. The member as recorded, in state `removed`, and on a sealed tier the epoch the room advanced to.",
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "member"
57
+ ],
58
+ "properties": {
59
+ "member": {
60
+ "$ref": "#/$defs/RoomMember"
61
+ },
62
+ "epoch": {
63
+ "type": "integer",
64
+ "minimum": 2,
65
+ "description": "On a sealed tier, the room epoch after the removal."
66
+ },
67
+ "ext": {
68
+ "$ref": "#/$defs/Ext"
69
+ }
70
+ }
71
+ },
72
+ "Ext": {
73
+ "title": "Ext",
74
+ "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.",
75
+ "type": "object",
76
+ "minProperties": 1,
77
+ "additionalProperties": true,
78
+ "propertyNames": {
79
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
80
+ }
81
+ },
82
+ "RoomMember": {
83
+ "title": "RoomMember",
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": [
87
+ "member",
88
+ "actions",
89
+ "validUntil",
90
+ "state",
91
+ "offeredAt"
92
+ ],
93
+ "description": "One party the community admitted to a room it owns, or offered admission to.",
94
+ "properties": {
95
+ "member": {
96
+ "type": "string",
97
+ "pattern": "^did:",
98
+ "maxLength": 2048
99
+ },
100
+ "actions": {
101
+ "$ref": "#/$defs/MemberActions"
102
+ },
103
+ "validUntil": {
104
+ "type": "string",
105
+ "format": "date-time",
106
+ "description": "When the member's authority credential expires."
107
+ },
108
+ "state": {
109
+ "$ref": "#/$defs/MemberState"
110
+ },
111
+ "offeredAt": {
112
+ "type": "string",
113
+ "format": "date-time"
114
+ },
115
+ "admittedAt": {
116
+ "type": "string",
117
+ "format": "date-time"
118
+ },
119
+ "removedAt": {
120
+ "type": "string",
121
+ "format": "date-time"
122
+ }
123
+ }
124
+ },
125
+ "MemberState": {
126
+ "title": "MemberState",
127
+ "type": "string",
128
+ "enum": [
129
+ "offered",
130
+ "admitted",
131
+ "removed"
132
+ ],
133
+ "description": "Where an admission stands. `offered`: credentials issued and waiting for the member to collect and accept them. `admitted`: accepted — on a sealed tier, the member is in the room's group. `removed`: an administrator removed them; on a sealed tier the room has advanced past them."
134
+ },
135
+ "MemberActions": {
136
+ "title": "MemberActions",
137
+ "type": "array",
138
+ "minItems": 1,
139
+ "maxItems": 3,
140
+ "uniqueItems": true,
141
+ "items": {
142
+ "$ref": "#/$defs/MemberAction"
143
+ },
144
+ "description": "The actions granted, at least one. An empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer."
145
+ },
146
+ "MemberAction": {
147
+ "title": "MemberAction",
148
+ "type": "string",
149
+ "enum": [
150
+ "read",
151
+ "write",
152
+ "curate"
153
+ ],
154
+ "description": "What a member of a community-owned room may do there. `admin` is not among them: minting epochs, admitting and removing members are the community's, as the room's owner, and are exercised through the vtc/rooms/community/* tasks rather than by any member's credential. `curate` is not implied by `write`."
155
+ },
156
+ "Reason": {
157
+ "title": "Reason",
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "maxLength": 500,
161
+ "description": "Why the administrator is making this change. Recorded with it in the audit trail. Attributed to its author on every surface and untrusted: it MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
162
+ }
163
+ }
164
+ };
165
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
166
+ export const RESPONSE_PAYLOAD_SCHEMA = {
167
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
168
+ "$ref": "#/$defs/Response",
169
+ "$defs": {
170
+ "Response": {
171
+ "$anchor": "response",
172
+ "title": "VTC Rooms Community Members Remove — response payload",
173
+ "description": "Success response to vtc/rooms/community/members/remove. Type https://trusttasks.org/spec/vtc/rooms/community/members/remove/0.1#response. The member as recorded, in state `removed`, and on a sealed tier the epoch the room advanced to.",
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "required": [
177
+ "member"
178
+ ],
179
+ "properties": {
180
+ "member": {
181
+ "$ref": "#/$defs/RoomMember"
182
+ },
183
+ "epoch": {
184
+ "type": "integer",
185
+ "minimum": 2,
186
+ "description": "On a sealed tier, the room epoch after the removal."
187
+ },
188
+ "ext": {
189
+ "$ref": "#/$defs/Ext"
190
+ }
191
+ }
192
+ },
193
+ "Ext": {
194
+ "title": "Ext",
195
+ "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.",
196
+ "type": "object",
197
+ "minProperties": 1,
198
+ "additionalProperties": true,
199
+ "propertyNames": {
200
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
201
+ }
202
+ },
203
+ "RoomMember": {
204
+ "title": "RoomMember",
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "required": [
208
+ "member",
209
+ "actions",
210
+ "validUntil",
211
+ "state",
212
+ "offeredAt"
213
+ ],
214
+ "description": "One party the community admitted to a room it owns, or offered admission to.",
215
+ "properties": {
216
+ "member": {
217
+ "type": "string",
218
+ "pattern": "^did:",
219
+ "maxLength": 2048
220
+ },
221
+ "actions": {
222
+ "$ref": "#/$defs/MemberActions"
223
+ },
224
+ "validUntil": {
225
+ "type": "string",
226
+ "format": "date-time",
227
+ "description": "When the member's authority credential expires."
228
+ },
229
+ "state": {
230
+ "$ref": "#/$defs/MemberState"
231
+ },
232
+ "offeredAt": {
233
+ "type": "string",
234
+ "format": "date-time"
235
+ },
236
+ "admittedAt": {
237
+ "type": "string",
238
+ "format": "date-time"
239
+ },
240
+ "removedAt": {
241
+ "type": "string",
242
+ "format": "date-time"
243
+ }
244
+ }
245
+ },
246
+ "MemberState": {
247
+ "title": "MemberState",
248
+ "type": "string",
249
+ "enum": [
250
+ "offered",
251
+ "admitted",
252
+ "removed"
253
+ ],
254
+ "description": "Where an admission stands. `offered`: credentials issued and waiting for the member to collect and accept them. `admitted`: accepted — on a sealed tier, the member is in the room's group. `removed`: an administrator removed them; on a sealed tier the room has advanced past them."
255
+ },
256
+ "MemberActions": {
257
+ "title": "MemberActions",
258
+ "type": "array",
259
+ "minItems": 1,
260
+ "maxItems": 3,
261
+ "uniqueItems": true,
262
+ "items": {
263
+ "$ref": "#/$defs/MemberAction"
264
+ },
265
+ "description": "The actions granted, at least one. An empty list confers nothing rather than everything, and a schema that allowed it would make the more dangerous reading available to a careless consumer."
266
+ },
267
+ "MemberAction": {
268
+ "title": "MemberAction",
269
+ "type": "string",
270
+ "enum": [
271
+ "read",
272
+ "write",
273
+ "curate"
274
+ ],
275
+ "description": "What a member of a community-owned room may do there. `admin` is not among them: minting epochs, admitting and removing members are the community's, as the room's owner, and are exercised through the vtc/rooms/community/* tasks rather than by any member's credential. `curate` is not implied by `write`."
276
+ },
277
+ "Reason": {
278
+ "title": "Reason",
279
+ "type": "string",
280
+ "minLength": 1,
281
+ "maxLength": 500,
282
+ "description": "Why the administrator is making this change. Recorded with it in the audit trail. Attributed to its author on every surface and untrusted: it MUST NOT carry personal data or a credential, and a reader MUST NOT treat it as instructions."
283
+ }
284
+ }
285
+ };
286
+ /**
287
+ * SPEC.md §7.2 policy for the request variant, from this specification's
288
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
289
+ * per-specification and cannot be derived from the document alone, and
290
+ * item 2 needs the schema this carries.
291
+ */
292
+ export const SPEC = {
293
+ typeUri: TYPE_URI,
294
+ isBearer: false,
295
+ isProofRequired: true,
296
+ isRecipientRequired: true,
297
+ isIssuedAtRequired: true,
298
+ payloadSchema: PAYLOAD_SCHEMA,
299
+ };
300
+ /**
301
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
302
+ * tracks the *issuer* party's requirement because a response swaps the
303
+ * parties (§7.3 item 5).
304
+ */
305
+ export const RESPONSE_SPEC = {
306
+ typeUri: RESPONSE_TYPE_URI,
307
+ isBearer: false,
308
+ isProofRequired: true,
309
+ isRecipientRequired: true,
310
+ isIssuedAtRequired: true,
311
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
312
+ };
313
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../../src/vtc/rooms/community/members/remove/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6BH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,oEAA6E,CAAC;AAKtG,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,6EAAsF,CAAC;AAKxH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,oEAAoE;IAC3E,OAAO,EAAE,8CAA8C;IACvD,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,QAAQ;QACR,QAAQ;QACR,QAAQ;KACT;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,GAAG;YAChB,aAAa,EAAE,iCAAiC;SACjD;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,OAAO;YAClB,WAAW,EAAE,IAAI;SAClB;QACD,Q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+ * Source: specs/vtc/rooms/offers/accept/0.1/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../../_shared/components.js";
6
+ export interface VTCRoomsOffersAcceptPayload {
7
+ /**
8
+ * The room's identifier: its DID.
9
+ */
10
+ roomId: string;
11
+ /**
12
+ * On an `attributed` or `private` room, the caller's MLS KeyPackage for this room, base64url without padding, as their key holder minted it with rooms/keys/key-package against the offer's invitation. Absent on an `open` room, which has no group.
13
+ */
14
+ keyPackage?: string;
15
+ ext?: Ext;
16
+ }
17
+ /**
18
+ * Success response to vtc/rooms/offers/accept. Type https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1#response. The caller is admitted; on a sealed tier, with the Welcome to deliver to their own key holder.
19
+ */
20
+ export interface VTCRoomsOffersAcceptResponsePayload {
21
+ /**
22
+ * The room's identifier: its DID.
23
+ */
24
+ roomId: string;
25
+ state: "admitted";
26
+ /**
27
+ * The room epoch the caller joins at.
28
+ */
29
+ epoch: number;
30
+ /**
31
+ * On a sealed tier, the MLS Welcome sealed to the caller's KeyPackage, for the caller to hand their own key holder with rooms/keys/welcome. Opens nothing for anyone else.
32
+ */
33
+ welcome?: string;
34
+ /**
35
+ * The group's ratchet tree, where the Welcome does not carry it. Passed to rooms/keys/welcome unchanged.
36
+ */
37
+ ratchetTree?: string;
38
+ ext?: Ext;
39
+ }
40
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
41
+ export type { Ext };
42
+ /** Trust Task type URI. */
43
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1";
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = VTCRoomsOffersAcceptPayload;
46
+ /** Trust Task response type URI (request type URI + "#response"). */
47
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1#response";
48
+ /** Stable alias for this specification's success-response payload shape. */
49
+ export type Response = VTCRoomsOffersAcceptResponsePayload;
50
+ /**
51
+ * This specification's payload schema, as a value.
52
+ *
53
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
54
+ * rather than only as a `.json` file because TypeScript types are erased
55
+ * at runtime: without a schema a consumer has nothing to validate, and
56
+ * every REQUIRED payload member is optional in practice. Cross-file
57
+ * `$ref`s are already inlined, so it needs no resolver.
58
+ */
59
+ export declare const PAYLOAD_SCHEMA: {
60
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
61
+ readonly $id: "https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1";
62
+ readonly title: "VTC Rooms Offers Accept — payload";
63
+ readonly type: "object";
64
+ readonly additionalProperties: false;
65
+ readonly required: readonly ["roomId"];
66
+ readonly properties: {
67
+ readonly roomId: {
68
+ readonly type: "string";
69
+ readonly minLength: 1;
70
+ readonly maxLength: 512;
71
+ readonly description: "The room's identifier: its DID.";
72
+ };
73
+ readonly keyPackage: {
74
+ readonly type: "string";
75
+ readonly minLength: 1;
76
+ readonly maxLength: 65536;
77
+ readonly pattern: "^[A-Za-z0-9_-]+$";
78
+ readonly description: "On an `attributed` or `private` room, the caller's MLS KeyPackage for this room, base64url without padding, as their key holder minted it with rooms/keys/key-package against the offer's invitation. Absent on an `open` room, which has no group.";
79
+ };
80
+ readonly ext: {
81
+ readonly $ref: "#/$defs/Ext";
82
+ };
83
+ };
84
+ readonly $defs: {
85
+ readonly Response: {
86
+ readonly $anchor: "response";
87
+ readonly title: "VTC Rooms Offers Accept — response payload";
88
+ readonly description: "Success response to vtc/rooms/offers/accept. Type https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1#response. The caller is admitted; on a sealed tier, with the Welcome to deliver to their own key holder.";
89
+ readonly type: "object";
90
+ readonly additionalProperties: false;
91
+ readonly required: readonly ["roomId", "state", "epoch"];
92
+ readonly properties: {
93
+ readonly roomId: {
94
+ readonly type: "string";
95
+ readonly minLength: 1;
96
+ readonly maxLength: 512;
97
+ readonly description: "The room's identifier: its DID.";
98
+ };
99
+ readonly state: {
100
+ readonly const: "admitted";
101
+ };
102
+ readonly epoch: {
103
+ readonly type: "integer";
104
+ readonly minimum: 1;
105
+ readonly description: "The room epoch the caller joins at.";
106
+ };
107
+ readonly welcome: {
108
+ readonly type: "string";
109
+ readonly minLength: 1;
110
+ readonly pattern: "^[A-Za-z0-9_-]+$";
111
+ readonly description: "On a sealed tier, the MLS Welcome sealed to the caller's KeyPackage, for the caller to hand their own key holder with rooms/keys/welcome. Opens nothing for anyone else.";
112
+ };
113
+ readonly ratchetTree: {
114
+ readonly type: "string";
115
+ readonly minLength: 1;
116
+ readonly pattern: "^[A-Za-z0-9_-]+$";
117
+ readonly description: "The group's ratchet tree, where the Welcome does not carry it. Passed to rooms/keys/welcome unchanged.";
118
+ };
119
+ readonly ext: {
120
+ readonly $ref: "#/$defs/Ext";
121
+ };
122
+ };
123
+ };
124
+ readonly Ext: {
125
+ readonly title: "Ext";
126
+ 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.";
127
+ readonly type: "object";
128
+ readonly minProperties: 1;
129
+ readonly additionalProperties: true;
130
+ readonly propertyNames: {
131
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
132
+ };
133
+ };
134
+ };
135
+ };
136
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
137
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
138
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
139
+ readonly $ref: "#/$defs/Response";
140
+ readonly $defs: {
141
+ readonly Response: {
142
+ readonly $anchor: "response";
143
+ readonly title: "VTC Rooms Offers Accept — response payload";
144
+ readonly description: "Success response to vtc/rooms/offers/accept. Type https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1#response. The caller is admitted; on a sealed tier, with the Welcome to deliver to their own key holder.";
145
+ readonly type: "object";
146
+ readonly additionalProperties: false;
147
+ readonly required: readonly ["roomId", "state", "epoch"];
148
+ readonly properties: {
149
+ readonly roomId: {
150
+ readonly type: "string";
151
+ readonly minLength: 1;
152
+ readonly maxLength: 512;
153
+ readonly description: "The room's identifier: its DID.";
154
+ };
155
+ readonly state: {
156
+ readonly const: "admitted";
157
+ };
158
+ readonly epoch: {
159
+ readonly type: "integer";
160
+ readonly minimum: 1;
161
+ readonly description: "The room epoch the caller joins at.";
162
+ };
163
+ readonly welcome: {
164
+ readonly type: "string";
165
+ readonly minLength: 1;
166
+ readonly pattern: "^[A-Za-z0-9_-]+$";
167
+ readonly description: "On a sealed tier, the MLS Welcome sealed to the caller's KeyPackage, for the caller to hand their own key holder with rooms/keys/welcome. Opens nothing for anyone else.";
168
+ };
169
+ readonly ratchetTree: {
170
+ readonly type: "string";
171
+ readonly minLength: 1;
172
+ readonly pattern: "^[A-Za-z0-9_-]+$";
173
+ readonly description: "The group's ratchet tree, where the Welcome does not carry it. Passed to rooms/keys/welcome unchanged.";
174
+ };
175
+ readonly ext: {
176
+ readonly $ref: "#/$defs/Ext";
177
+ };
178
+ };
179
+ };
180
+ readonly Ext: {
181
+ readonly title: "Ext";
182
+ 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.";
183
+ readonly type: "object";
184
+ readonly minProperties: 1;
185
+ readonly additionalProperties: true;
186
+ readonly propertyNames: {
187
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
188
+ };
189
+ };
190
+ };
191
+ };
192
+ /**
193
+ * SPEC.md §7.2 policy for the request variant, from this specification's
194
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
195
+ * per-specification and cannot be derived from the document alone, and
196
+ * item 2 needs the schema this carries.
197
+ */
198
+ export declare const SPEC: {
199
+ readonly typeUri: "https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1";
200
+ readonly isBearer: false;
201
+ readonly isProofRequired: true;
202
+ readonly isRecipientRequired: true;
203
+ readonly isIssuedAtRequired: true;
204
+ readonly payloadSchema: {
205
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
206
+ readonly $id: "https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1";
207
+ readonly title: "VTC Rooms Offers Accept — payload";
208
+ readonly type: "object";
209
+ readonly additionalProperties: false;
210
+ readonly required: readonly ["roomId"];
211
+ readonly properties: {
212
+ readonly roomId: {
213
+ readonly type: "string";
214
+ readonly minLength: 1;
215
+ readonly maxLength: 512;
216
+ readonly description: "The room's identifier: its DID.";
217
+ };
218
+ readonly keyPackage: {
219
+ readonly type: "string";
220
+ readonly minLength: 1;
221
+ readonly maxLength: 65536;
222
+ readonly pattern: "^[A-Za-z0-9_-]+$";
223
+ readonly description: "On an `attributed` or `private` room, the caller's MLS KeyPackage for this room, base64url without padding, as their key holder minted it with rooms/keys/key-package against the offer's invitation. Absent on an `open` room, which has no group.";
224
+ };
225
+ readonly ext: {
226
+ readonly $ref: "#/$defs/Ext";
227
+ };
228
+ };
229
+ readonly $defs: {
230
+ readonly Response: {
231
+ readonly $anchor: "response";
232
+ readonly title: "VTC Rooms Offers Accept — response payload";
233
+ readonly description: "Success response to vtc/rooms/offers/accept. Type https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1#response. The caller is admitted; on a sealed tier, with the Welcome to deliver to their own key holder.";
234
+ readonly type: "object";
235
+ readonly additionalProperties: false;
236
+ readonly required: readonly ["roomId", "state", "epoch"];
237
+ readonly properties: {
238
+ readonly roomId: {
239
+ readonly type: "string";
240
+ readonly minLength: 1;
241
+ readonly maxLength: 512;
242
+ readonly description: "The room's identifier: its DID.";
243
+ };
244
+ readonly state: {
245
+ readonly const: "admitted";
246
+ };
247
+ readonly epoch: {
248
+ readonly type: "integer";
249
+ readonly minimum: 1;
250
+ readonly description: "The room epoch the caller joins at.";
251
+ };
252
+ readonly welcome: {
253
+ readonly type: "string";
254
+ readonly minLength: 1;
255
+ readonly pattern: "^[A-Za-z0-9_-]+$";
256
+ readonly description: "On a sealed tier, the MLS Welcome sealed to the caller's KeyPackage, for the caller to hand their own key holder with rooms/keys/welcome. Opens nothing for anyone else.";
257
+ };
258
+ readonly ratchetTree: {
259
+ readonly type: "string";
260
+ readonly minLength: 1;
261
+ readonly pattern: "^[A-Za-z0-9_-]+$";
262
+ readonly description: "The group's ratchet tree, where the Welcome does not carry it. Passed to rooms/keys/welcome unchanged.";
263
+ };
264
+ readonly ext: {
265
+ readonly $ref: "#/$defs/Ext";
266
+ };
267
+ };
268
+ };
269
+ readonly Ext: {
270
+ readonly title: "Ext";
271
+ 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.";
272
+ readonly type: "object";
273
+ readonly minProperties: 1;
274
+ readonly additionalProperties: true;
275
+ readonly propertyNames: {
276
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
277
+ };
278
+ };
279
+ };
280
+ };
281
+ };
282
+ /**
283
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
284
+ * tracks the *issuer* party's requirement because a response swaps the
285
+ * parties (§7.3 item 5).
286
+ */
287
+ export declare const RESPONSE_SPEC: {
288
+ readonly typeUri: "https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1#response";
289
+ readonly isBearer: false;
290
+ readonly isProofRequired: true;
291
+ readonly isRecipientRequired: true;
292
+ readonly isIssuedAtRequired: true;
293
+ readonly payloadSchema: {
294
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
295
+ readonly $ref: "#/$defs/Response";
296
+ readonly $defs: {
297
+ readonly Response: {
298
+ readonly $anchor: "response";
299
+ readonly title: "VTC Rooms Offers Accept — response payload";
300
+ readonly description: "Success response to vtc/rooms/offers/accept. Type https://trusttasks.org/spec/vtc/rooms/offers/accept/0.1#response. The caller is admitted; on a sealed tier, with the Welcome to deliver to their own key holder.";
301
+ readonly type: "object";
302
+ readonly additionalProperties: false;
303
+ readonly required: readonly ["roomId", "state", "epoch"];
304
+ readonly properties: {
305
+ readonly roomId: {
306
+ readonly type: "string";
307
+ readonly minLength: 1;
308
+ readonly maxLength: 512;
309
+ readonly description: "The room's identifier: its DID.";
310
+ };
311
+ readonly state: {
312
+ readonly const: "admitted";
313
+ };
314
+ readonly epoch: {
315
+ readonly type: "integer";
316
+ readonly minimum: 1;
317
+ readonly description: "The room epoch the caller joins at.";
318
+ };
319
+ readonly welcome: {
320
+ readonly type: "string";
321
+ readonly minLength: 1;
322
+ readonly pattern: "^[A-Za-z0-9_-]+$";
323
+ readonly description: "On a sealed tier, the MLS Welcome sealed to the caller's KeyPackage, for the caller to hand their own key holder with rooms/keys/welcome. Opens nothing for anyone else.";
324
+ };
325
+ readonly ratchetTree: {
326
+ readonly type: "string";
327
+ readonly minLength: 1;
328
+ readonly pattern: "^[A-Za-z0-9_-]+$";
329
+ readonly description: "The group's ratchet tree, where the Welcome does not carry it. Passed to rooms/keys/welcome unchanged.";
330
+ };
331
+ readonly ext: {
332
+ readonly $ref: "#/$defs/Ext";
333
+ };
334
+ };
335
+ };
336
+ readonly Ext: {
337
+ readonly title: "Ext";
338
+ 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.";
339
+ readonly type: "object";
340
+ readonly minProperties: 1;
341
+ readonly additionalProperties: true;
342
+ readonly propertyNames: {
343
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
344
+ };
345
+ };
346
+ };
347
+ };
348
+ };
349
+ //# sourceMappingURL=payload.d.ts.map