@openvtc/trust-tasks 0.16.6 → 0.16.7

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 (40) hide show
  1. package/CHANGELOG.md +12 -2
  2. package/dist/_shared/components.d.ts +75 -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/_shared/0.1/room.d.ts +16 -0
  9. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -0
  10. package/dist/rooms/_shared/0.1/room.js +6 -0
  11. package/dist/rooms/_shared/0.1/room.js.map +1 -0
  12. package/dist/rooms/create/0.1/payload.d.ts +305 -0
  13. package/dist/rooms/create/0.1/payload.d.ts.map +1 -0
  14. package/dist/rooms/create/0.1/payload.js +176 -0
  15. package/dist/rooms/create/0.1/payload.js.map +1 -0
  16. package/dist/rooms/epoch/mint/0.1/payload.d.ts +385 -0
  17. package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -0
  18. package/dist/rooms/epoch/mint/0.1/payload.js +214 -0
  19. package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -0
  20. package/dist/rooms/records/get/0.1/payload.d.ts +505 -0
  21. package/dist/rooms/records/get/0.1/payload.d.ts.map +1 -0
  22. package/dist/rooms/records/get/0.1/payload.js +279 -0
  23. package/dist/rooms/records/get/0.1/payload.js.map +1 -0
  24. package/dist/rooms/records/list/0.1/payload.d.ts +618 -0
  25. package/dist/rooms/records/list/0.1/payload.d.ts.map +1 -0
  26. package/dist/rooms/records/list/0.1/payload.js +338 -0
  27. package/dist/rooms/records/list/0.1/payload.js.map +1 -0
  28. package/dist/rooms/records/put/0.1/payload.d.ts +591 -0
  29. package/dist/rooms/records/put/0.1/payload.d.ts.map +1 -0
  30. package/dist/rooms/records/put/0.1/payload.js +314 -0
  31. package/dist/rooms/records/put/0.1/payload.js.map +1 -0
  32. package/package.json +1 -1
  33. package/src/_shared/components.ts +83 -0
  34. package/src/index.ts +6 -0
  35. package/src/rooms/_shared/0.1/room.ts +17 -0
  36. package/src/rooms/create/0.1/payload.ts +224 -0
  37. package/src/rooms/epoch/mint/0.1/payload.ts +262 -0
  38. package/src/rooms/records/get/0.1/payload.ts +333 -0
  39. package/src/rooms/records/list/0.1/payload.ts +397 -0
  40. package/src/rooms/records/put/0.1/payload.ts +388 -0
@@ -0,0 +1,305 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/create/0.1/payload.schema.json
4
+ */
5
+ import type { Ext, Visibility } from "../../../_shared/components.js";
6
+ export interface RoomsCreatePayload {
7
+ /**
8
+ * The room's identifier, minted by its owner before this call. A host is told the identifier; it does not assign one, because a room whose identity the host chose could not move to another host.
9
+ */
10
+ roomId: string;
11
+ visibility: Visibility;
12
+ /**
13
+ * The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.
14
+ */
15
+ ownerDid: string;
16
+ /**
17
+ * How long the host will hold the room after its epoch lapses without renewal, before storage may be reclaimed. Stated at creation rather than discovered: reclamation that surprises a member is a failure of the design, not of the member.
18
+ */
19
+ retentionDays?: number;
20
+ /**
21
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
22
+ */
23
+ ext?: Ext;
24
+ }
25
+ /**
26
+ * Success response to rooms/create. Type https://trusttasks.org/spec/rooms/create/0.1#response.
27
+ */
28
+ export interface RoomsCreateResponsePayload {
29
+ roomId: string;
30
+ /**
31
+ * Always 1 for a new room.
32
+ */
33
+ epoch: number;
34
+ ext?: Ext;
35
+ }
36
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
37
+ export type { Ext, Visibility };
38
+ /** Trust Task type URI. */
39
+ export declare const TYPE_URI: "https://trusttasks.org/spec/rooms/create/0.1";
40
+ /** Stable alias for this specification's request payload shape. */
41
+ export type Payload = RoomsCreatePayload;
42
+ /** Trust Task response type URI (request type URI + "#response"). */
43
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/rooms/create/0.1#response";
44
+ /** Stable alias for this specification's success-response payload shape. */
45
+ export type Response = RoomsCreateResponsePayload;
46
+ /**
47
+ * This specification's payload schema, as a value.
48
+ *
49
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
50
+ * rather than only as a `.json` file because TypeScript types are erased
51
+ * at runtime: without a schema a consumer has nothing to validate, and
52
+ * every REQUIRED payload member is optional in practice. Cross-file
53
+ * `$ref`s are already inlined, so it needs no resolver.
54
+ */
55
+ export declare const PAYLOAD_SCHEMA: {
56
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
57
+ readonly $id: "https://trusttasks.org/spec/rooms/create/0.1";
58
+ readonly title: "Rooms Create — payload";
59
+ readonly type: "object";
60
+ readonly additionalProperties: false;
61
+ readonly required: readonly ["roomId", "visibility", "ownerDid"];
62
+ readonly properties: {
63
+ readonly roomId: {
64
+ readonly type: "string";
65
+ readonly description: "The room's identifier, minted by its owner before this call. A host is told the identifier; it does not assign one, because a room whose identity the host chose could not move to another host.";
66
+ };
67
+ readonly visibility: {
68
+ readonly $ref: "#/$defs/Visibility";
69
+ };
70
+ readonly ownerDid: {
71
+ readonly type: "string";
72
+ readonly description: "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.";
73
+ };
74
+ readonly retentionDays: {
75
+ readonly type: "integer";
76
+ readonly minimum: 1;
77
+ readonly description: "How long the host will hold the room after its epoch lapses without renewal, before storage may be reclaimed. Stated at creation rather than discovered: reclamation that surprises a member is a failure of the design, not of the member.";
78
+ };
79
+ readonly ext: {
80
+ readonly $ref: "#/$defs/Ext";
81
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
82
+ };
83
+ };
84
+ readonly $defs: {
85
+ readonly Response: {
86
+ readonly $anchor: "response";
87
+ readonly title: "Rooms Create — response payload";
88
+ readonly description: "Success response to rooms/create. Type https://trusttasks.org/spec/rooms/create/0.1#response.";
89
+ readonly type: "object";
90
+ readonly additionalProperties: false;
91
+ readonly required: readonly ["roomId", "epoch"];
92
+ readonly properties: {
93
+ readonly roomId: {
94
+ readonly type: "string";
95
+ };
96
+ readonly epoch: {
97
+ readonly type: "integer";
98
+ readonly minimum: 1;
99
+ readonly description: "Always 1 for a new room.";
100
+ };
101
+ readonly ext: {
102
+ readonly $ref: "#/$defs/Ext";
103
+ };
104
+ };
105
+ };
106
+ readonly Ext: {
107
+ readonly title: "Ext";
108
+ 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.";
109
+ readonly type: "object";
110
+ readonly minProperties: 1;
111
+ readonly additionalProperties: true;
112
+ readonly propertyNames: {
113
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
114
+ };
115
+ };
116
+ readonly Visibility: {
117
+ readonly title: "Visibility";
118
+ readonly type: "string";
119
+ readonly enum: readonly ["open", "attributed", "private"];
120
+ readonly description: "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything.";
121
+ };
122
+ };
123
+ };
124
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
125
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
126
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
127
+ readonly $ref: "#/$defs/Response";
128
+ readonly $defs: {
129
+ readonly Response: {
130
+ readonly $anchor: "response";
131
+ readonly title: "Rooms Create — response payload";
132
+ readonly description: "Success response to rooms/create. Type https://trusttasks.org/spec/rooms/create/0.1#response.";
133
+ readonly type: "object";
134
+ readonly additionalProperties: false;
135
+ readonly required: readonly ["roomId", "epoch"];
136
+ readonly properties: {
137
+ readonly roomId: {
138
+ readonly type: "string";
139
+ };
140
+ readonly epoch: {
141
+ readonly type: "integer";
142
+ readonly minimum: 1;
143
+ readonly description: "Always 1 for a new room.";
144
+ };
145
+ readonly ext: {
146
+ readonly $ref: "#/$defs/Ext";
147
+ };
148
+ };
149
+ };
150
+ readonly Ext: {
151
+ readonly title: "Ext";
152
+ 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.";
153
+ readonly type: "object";
154
+ readonly minProperties: 1;
155
+ readonly additionalProperties: true;
156
+ readonly propertyNames: {
157
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
158
+ };
159
+ };
160
+ readonly Visibility: {
161
+ readonly title: "Visibility";
162
+ readonly type: "string";
163
+ readonly enum: readonly ["open", "attributed", "private"];
164
+ readonly description: "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything.";
165
+ };
166
+ };
167
+ };
168
+ /**
169
+ * SPEC.md §7.2 policy for the request variant, from this specification's
170
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
171
+ * per-specification and cannot be derived from the document alone, and
172
+ * item 2 needs the schema this carries.
173
+ */
174
+ export declare const SPEC: {
175
+ readonly typeUri: "https://trusttasks.org/spec/rooms/create/0.1";
176
+ readonly isBearer: false;
177
+ readonly isProofRequired: true;
178
+ readonly isRecipientRequired: true;
179
+ readonly isIssuedAtRequired: true;
180
+ readonly payloadSchema: {
181
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
182
+ readonly $id: "https://trusttasks.org/spec/rooms/create/0.1";
183
+ readonly title: "Rooms Create — payload";
184
+ readonly type: "object";
185
+ readonly additionalProperties: false;
186
+ readonly required: readonly ["roomId", "visibility", "ownerDid"];
187
+ readonly properties: {
188
+ readonly roomId: {
189
+ readonly type: "string";
190
+ readonly description: "The room's identifier, minted by its owner before this call. A host is told the identifier; it does not assign one, because a room whose identity the host chose could not move to another host.";
191
+ };
192
+ readonly visibility: {
193
+ readonly $ref: "#/$defs/Visibility";
194
+ };
195
+ readonly ownerDid: {
196
+ readonly type: "string";
197
+ readonly description: "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it.";
198
+ };
199
+ readonly retentionDays: {
200
+ readonly type: "integer";
201
+ readonly minimum: 1;
202
+ readonly description: "How long the host will hold the room after its epoch lapses without renewal, before storage may be reclaimed. Stated at creation rather than discovered: reclamation that surprises a member is a failure of the design, not of the member.";
203
+ };
204
+ readonly ext: {
205
+ readonly $ref: "#/$defs/Ext";
206
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
207
+ };
208
+ };
209
+ readonly $defs: {
210
+ readonly Response: {
211
+ readonly $anchor: "response";
212
+ readonly title: "Rooms Create — response payload";
213
+ readonly description: "Success response to rooms/create. Type https://trusttasks.org/spec/rooms/create/0.1#response.";
214
+ readonly type: "object";
215
+ readonly additionalProperties: false;
216
+ readonly required: readonly ["roomId", "epoch"];
217
+ readonly properties: {
218
+ readonly roomId: {
219
+ readonly type: "string";
220
+ };
221
+ readonly epoch: {
222
+ readonly type: "integer";
223
+ readonly minimum: 1;
224
+ readonly description: "Always 1 for a new room.";
225
+ };
226
+ readonly ext: {
227
+ readonly $ref: "#/$defs/Ext";
228
+ };
229
+ };
230
+ };
231
+ readonly Ext: {
232
+ readonly title: "Ext";
233
+ 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.";
234
+ readonly type: "object";
235
+ readonly minProperties: 1;
236
+ readonly additionalProperties: true;
237
+ readonly propertyNames: {
238
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
239
+ };
240
+ };
241
+ readonly Visibility: {
242
+ readonly title: "Visibility";
243
+ readonly type: "string";
244
+ readonly enum: readonly ["open", "attributed", "private"];
245
+ readonly description: "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything.";
246
+ };
247
+ };
248
+ };
249
+ };
250
+ /**
251
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
252
+ * tracks the *issuer* party's requirement because a response swaps the
253
+ * parties (§7.3 item 5).
254
+ */
255
+ export declare const RESPONSE_SPEC: {
256
+ readonly typeUri: "https://trusttasks.org/spec/rooms/create/0.1#response";
257
+ readonly isBearer: false;
258
+ readonly isProofRequired: true;
259
+ readonly isRecipientRequired: true;
260
+ readonly isIssuedAtRequired: true;
261
+ readonly payloadSchema: {
262
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
263
+ readonly $ref: "#/$defs/Response";
264
+ readonly $defs: {
265
+ readonly Response: {
266
+ readonly $anchor: "response";
267
+ readonly title: "Rooms Create — response payload";
268
+ readonly description: "Success response to rooms/create. Type https://trusttasks.org/spec/rooms/create/0.1#response.";
269
+ readonly type: "object";
270
+ readonly additionalProperties: false;
271
+ readonly required: readonly ["roomId", "epoch"];
272
+ readonly properties: {
273
+ readonly roomId: {
274
+ readonly type: "string";
275
+ };
276
+ readonly epoch: {
277
+ readonly type: "integer";
278
+ readonly minimum: 1;
279
+ readonly description: "Always 1 for a new room.";
280
+ };
281
+ readonly ext: {
282
+ readonly $ref: "#/$defs/Ext";
283
+ };
284
+ };
285
+ };
286
+ readonly Ext: {
287
+ readonly title: "Ext";
288
+ 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.";
289
+ readonly type: "object";
290
+ readonly minProperties: 1;
291
+ readonly additionalProperties: true;
292
+ readonly propertyNames: {
293
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
294
+ };
295
+ };
296
+ readonly Visibility: {
297
+ readonly title: "Visibility";
298
+ readonly type: "string";
299
+ readonly enum: readonly ["open", "attributed", "private"];
300
+ readonly description: "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything.";
301
+ };
302
+ };
303
+ };
304
+ };
305
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAGtE,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC;AAEhC,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,8CAAuD,CAAC;AAEhF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,kBAAkB,CAAC;AAEzC,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,uDAAgE,CAAC;AAElG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAElD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/rooms/create/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/rooms/create/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/rooms/create/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/create/0.1",
21
+ "title": "Rooms Create — payload",
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "roomId",
26
+ "visibility",
27
+ "ownerDid"
28
+ ],
29
+ "properties": {
30
+ "roomId": {
31
+ "type": "string",
32
+ "description": "The room's identifier, minted by its owner before this call. A host is told the identifier; it does not assign one, because a room whose identity the host chose could not move to another host."
33
+ },
34
+ "visibility": {
35
+ "$ref": "#/$defs/Visibility"
36
+ },
37
+ "ownerDid": {
38
+ "type": "string",
39
+ "description": "The room's accountable party: the controller of the room's identifier, the issuer of every credential in it, and the party a host addresses about quota, abuse, or lifecycle. Visible at every visibility, including `private` — a room has someone answerable for it."
40
+ },
41
+ "retentionDays": {
42
+ "type": "integer",
43
+ "minimum": 1,
44
+ "description": "How long the host will hold the room after its epoch lapses without renewal, before storage may be reclaimed. Stated at creation rather than discovered: reclamation that surprises a member is a failure of the design, not of the member."
45
+ },
46
+ "ext": {
47
+ "$ref": "#/$defs/Ext",
48
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
49
+ }
50
+ },
51
+ "$defs": {
52
+ "Response": {
53
+ "$anchor": "response",
54
+ "title": "Rooms Create — response payload",
55
+ "description": "Success response to rooms/create. Type https://trusttasks.org/spec/rooms/create/0.1#response.",
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": [
59
+ "roomId",
60
+ "epoch"
61
+ ],
62
+ "properties": {
63
+ "roomId": {
64
+ "type": "string"
65
+ },
66
+ "epoch": {
67
+ "type": "integer",
68
+ "minimum": 1,
69
+ "description": "Always 1 for a new room."
70
+ },
71
+ "ext": {
72
+ "$ref": "#/$defs/Ext"
73
+ }
74
+ }
75
+ },
76
+ "Ext": {
77
+ "title": "Ext",
78
+ "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.",
79
+ "type": "object",
80
+ "minProperties": 1,
81
+ "additionalProperties": true,
82
+ "propertyNames": {
83
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
84
+ }
85
+ },
86
+ "Visibility": {
87
+ "title": "Visibility",
88
+ "type": "string",
89
+ "enum": [
90
+ "open",
91
+ "attributed",
92
+ "private"
93
+ ],
94
+ "description": "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything."
95
+ }
96
+ }
97
+ };
98
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
99
+ export const RESPONSE_PAYLOAD_SCHEMA = {
100
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
101
+ "$ref": "#/$defs/Response",
102
+ "$defs": {
103
+ "Response": {
104
+ "$anchor": "response",
105
+ "title": "Rooms Create — response payload",
106
+ "description": "Success response to rooms/create. Type https://trusttasks.org/spec/rooms/create/0.1#response.",
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "required": [
110
+ "roomId",
111
+ "epoch"
112
+ ],
113
+ "properties": {
114
+ "roomId": {
115
+ "type": "string"
116
+ },
117
+ "epoch": {
118
+ "type": "integer",
119
+ "minimum": 1,
120
+ "description": "Always 1 for a new room."
121
+ },
122
+ "ext": {
123
+ "$ref": "#/$defs/Ext"
124
+ }
125
+ }
126
+ },
127
+ "Ext": {
128
+ "title": "Ext",
129
+ "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.",
130
+ "type": "object",
131
+ "minProperties": 1,
132
+ "additionalProperties": true,
133
+ "propertyNames": {
134
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
135
+ }
136
+ },
137
+ "Visibility": {
138
+ "title": "Visibility",
139
+ "type": "string",
140
+ "enum": [
141
+ "open",
142
+ "attributed",
143
+ "private"
144
+ ],
145
+ "description": "How much of a room its host can see, fixed at creation and immutable thereafter. `open`: records are cleartext, searchable and fully audited. `attributed`: record content is sealed, and the host still learns which member acted. `private`: content is sealed and membership is presented in zero knowledge, so the host verifies that a member acted without learning which. Immutable because a downgrade cannot un-see cleartext and an upgrade would protect only what came after while presenting as though it protected everything."
146
+ }
147
+ }
148
+ };
149
+ /**
150
+ * SPEC.md §7.2 policy for the request variant, from this specification's
151
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
152
+ * per-specification and cannot be derived from the document alone, and
153
+ * item 2 needs the schema this carries.
154
+ */
155
+ export const SPEC = {
156
+ typeUri: TYPE_URI,
157
+ isBearer: false,
158
+ isProofRequired: true,
159
+ isRecipientRequired: true,
160
+ isIssuedAtRequired: true,
161
+ payloadSchema: PAYLOAD_SCHEMA,
162
+ };
163
+ /**
164
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
165
+ * tracks the *issuer* party's requirement because a response swaps the
166
+ * parties (§7.3 item 5).
167
+ */
168
+ export const RESPONSE_SPEC = {
169
+ typeUri: RESPONSE_TYPE_URI,
170
+ isBearer: false,
171
+ isProofRequired: true,
172
+ isRecipientRequired: true,
173
+ isIssuedAtRequired: true,
174
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
175
+ };
176
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/rooms/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,8CAAuD,CAAC;AAKhF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,uDAAgE,CAAC;AAKlG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,c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