@openvtc/trust-tasks 0.26.0 → 0.26.2

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 (103) hide show
  1. package/CHANGELOG.md +170 -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 +16 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +16 -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/oid4vp/identities/list/0.1/payload.d.ts +938 -0
  46. package/dist/vtc/oid4vp/identities/list/0.1/payload.d.ts.map +1 -0
  47. package/dist/vtc/oid4vp/identities/list/0.1/payload.js +559 -0
  48. package/dist/vtc/oid4vp/identities/list/0.1/payload.js.map +1 -0
  49. package/dist/vtc/rooms/community/create/0.1/payload.d.ts +789 -0
  50. package/dist/vtc/rooms/community/create/0.1/payload.d.ts.map +1 -0
  51. package/dist/vtc/rooms/community/create/0.1/payload.js +463 -0
  52. package/dist/vtc/rooms/community/create/0.1/payload.js.map +1 -0
  53. package/dist/vtc/rooms/community/get/0.1/payload.d.ts +711 -0
  54. package/dist/vtc/rooms/community/get/0.1/payload.d.ts.map +1 -0
  55. package/dist/vtc/rooms/community/get/0.1/payload.js +429 -0
  56. package/dist/vtc/rooms/community/get/0.1/payload.js.map +1 -0
  57. package/dist/vtc/rooms/community/list/0.1/payload.d.ts +772 -0
  58. package/dist/vtc/rooms/community/list/0.1/payload.d.ts.map +1 -0
  59. package/dist/vtc/rooms/community/list/0.1/payload.js +452 -0
  60. package/dist/vtc/rooms/community/list/0.1/payload.js.map +1 -0
  61. package/dist/vtc/rooms/community/members/add/0.1/payload.d.ts +535 -0
  62. package/dist/vtc/rooms/community/members/add/0.1/payload.d.ts.map +1 -0
  63. package/dist/vtc/rooms/community/members/add/0.1/payload.js +314 -0
  64. package/dist/vtc/rooms/community/members/add/0.1/payload.js.map +1 -0
  65. package/dist/vtc/rooms/community/members/list/0.1/payload.d.ts +554 -0
  66. package/dist/vtc/rooms/community/members/list/0.1/payload.d.ts.map +1 -0
  67. package/dist/vtc/rooms/community/members/list/0.1/payload.js +315 -0
  68. package/dist/vtc/rooms/community/members/list/0.1/payload.js.map +1 -0
  69. package/dist/vtc/rooms/community/members/remove/0.1/payload.d.ts +533 -0
  70. package/dist/vtc/rooms/community/members/remove/0.1/payload.d.ts.map +1 -0
  71. package/dist/vtc/rooms/community/members/remove/0.1/payload.js +313 -0
  72. package/dist/vtc/rooms/community/members/remove/0.1/payload.js.map +1 -0
  73. package/dist/vtc/rooms/offers/accept/0.1/payload.d.ts +349 -0
  74. package/dist/vtc/rooms/offers/accept/0.1/payload.d.ts.map +1 -0
  75. package/dist/vtc/rooms/offers/accept/0.1/payload.js +188 -0
  76. package/dist/vtc/rooms/offers/accept/0.1/payload.js.map +1 -0
  77. package/dist/vtc/rooms/offers/list/0.1/payload.d.ts +692 -0
  78. package/dist/vtc/rooms/offers/list/0.1/payload.d.ts.map +1 -0
  79. package/dist/vtc/rooms/offers/list/0.1/payload.js +408 -0
  80. package/dist/vtc/rooms/offers/list/0.1/payload.js.map +1 -0
  81. package/package.json +1 -1
  82. package/src/_shared/components.ts +120 -1
  83. package/src/index.ts +16 -0
  84. package/src/rooms/owner/group/add/0.1/payload.ts +288 -0
  85. package/src/rooms/owner/group/create/0.1/payload.ts +213 -0
  86. package/src/rooms/owner/group/remove/0.1/payload.ts +242 -0
  87. package/src/rooms/owner/register/0.1/payload.ts +2 -2
  88. package/src/vtc/_shared/0.1/community-room.ts +17 -0
  89. package/src/vtc/admin/events/_shared/0.1/topic.ts +1 -1
  90. package/src/vtc/admin/events/_shared/0.2/topic.ts +29 -0
  91. package/src/vtc/admin/events/event/0.1/payload.ts +1 -1
  92. package/src/vtc/admin/events/event/0.2/payload.ts +134 -0
  93. package/src/vtc/admin/events/subscribe/0.1/payload.ts +1 -1
  94. package/src/vtc/admin/events/subscribe/0.2/payload.ts +306 -0
  95. package/src/vtc/oid4vp/identities/list/0.1/payload.ts +706 -0
  96. package/src/vtc/rooms/community/create/0.1/payload.ts +509 -0
  97. package/src/vtc/rooms/community/get/0.1/payload.ts +461 -0
  98. package/src/vtc/rooms/community/list/0.1/payload.ts +495 -0
  99. package/src/vtc/rooms/community/members/add/0.1/payload.ts +356 -0
  100. package/src/vtc/rooms/community/members/list/0.1/payload.ts +366 -0
  101. package/src/vtc/rooms/community/members/remove/0.1/payload.ts +351 -0
  102. package/src/vtc/rooms/offers/accept/0.1/payload.ts +240 -0
  103. package/src/vtc/rooms/offers/list/0.1/payload.ts +451 -0
@@ -0,0 +1,409 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/admin/events/subscribe/0.2/payload.schema.json
4
+ */
5
+ import type { Ext, ResumeToken, Topic_VtcAdminEventsV0_2 as Topic } from "../../../../../_shared/components.js";
6
+ /**
7
+ * Open an administrator console's live channel of hint-only events. The success response is the first document on a stream that then carries vtc/admin/events/event/0.2 documents; over HTTPS that stream is the streamed response of bindings/https/0.3 §2.1. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface VTCAdminEventsSubscribePayload {
10
+ /**
11
+ * The topics the console renders. The community narrows this to the topics the caller may read and reports the result as the response's `topics`.
12
+ *
13
+ * @minItems 1
14
+ * @maxItems 7
15
+ */
16
+ topics: [Topic] | [Topic, Topic] | [Topic, Topic, Topic] | [Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic, Topic, Topic];
17
+ /**
18
+ * The last `resumeToken` the console received on an earlier stream, to resume from. A token the community does not recognise, has expired, or minted for another caller is not an error: the stream starts fresh and the response says `resumed: false`.
19
+ */
20
+ since?: ResumeToken;
21
+ ext?: Ext;
22
+ }
23
+ /**
24
+ * The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.
25
+ */
26
+ export interface VTCAdminEventsSubscribeResponsePayload {
27
+ /**
28
+ * The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.
29
+ *
30
+ * @minItems 1
31
+ * @maxItems 7
32
+ */
33
+ topics: [Topic] | [Topic, Topic] | [Topic, Topic, Topic] | [Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic, Topic] | [Topic, Topic, Topic, Topic, Topic, Topic, Topic];
34
+ /**
35
+ * The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.
36
+ */
37
+ heartbeatSeconds: number;
38
+ /**
39
+ * `true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.
40
+ */
41
+ resumed: boolean;
42
+ /**
43
+ * The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.
44
+ */
45
+ resumeToken: ResumeToken;
46
+ ext?: Ext;
47
+ }
48
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
49
+ export type { Ext, ResumeToken, Topic };
50
+ /** Trust Task type URI. */
51
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.2";
52
+ /** Stable alias for this specification's request payload shape. */
53
+ export type Payload = VTCAdminEventsSubscribePayload;
54
+ /** Trust Task response type URI (request type URI + "#response"). */
55
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.2#response";
56
+ /** Stable alias for this specification's success-response payload shape. */
57
+ export type Response = VTCAdminEventsSubscribeResponsePayload;
58
+ /**
59
+ * This specification's payload schema, as a value.
60
+ *
61
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
62
+ * rather than only as a `.json` file because TypeScript types are erased
63
+ * at runtime: without a schema a consumer has nothing to validate, and
64
+ * every REQUIRED payload member is optional in practice. Cross-file
65
+ * `$ref`s are already inlined, so it needs no resolver.
66
+ */
67
+ export declare const PAYLOAD_SCHEMA: {
68
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
69
+ readonly $id: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.2";
70
+ readonly title: "VTC Admin Events — Subscribe — payload";
71
+ readonly description: "Open an administrator console's live channel of hint-only events. The success response is the first document on a stream that then carries vtc/admin/events/event/0.2 documents; over HTTPS that stream is the streamed response of bindings/https/0.3 §2.1. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
72
+ readonly type: "object";
73
+ readonly additionalProperties: false;
74
+ readonly required: readonly ["topics"];
75
+ readonly properties: {
76
+ readonly topics: {
77
+ readonly type: "array";
78
+ readonly minItems: 1;
79
+ readonly maxItems: 7;
80
+ readonly uniqueItems: true;
81
+ readonly items: {
82
+ readonly $ref: "#/$defs/Topic";
83
+ };
84
+ readonly description: "The topics the console renders. The community narrows this to the topics the caller may read and reports the result as the response's `topics`.";
85
+ };
86
+ readonly since: {
87
+ readonly $ref: "#/$defs/ResumeToken";
88
+ readonly description: "The last `resumeToken` the console received on an earlier stream, to resume from. A token the community does not recognise, has expired, or minted for another caller is not an error: the stream starts fresh and the response says `resumed: false`.";
89
+ };
90
+ readonly ext: {
91
+ readonly $ref: "#/$defs/Ext";
92
+ };
93
+ };
94
+ readonly $defs: {
95
+ readonly Response: {
96
+ readonly $anchor: "response";
97
+ readonly title: "VTC Admin Events — Subscribe — response payload";
98
+ readonly description: "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.";
99
+ readonly type: "object";
100
+ readonly additionalProperties: false;
101
+ readonly required: readonly ["topics", "heartbeatSeconds", "resumed", "resumeToken"];
102
+ readonly properties: {
103
+ readonly topics: {
104
+ readonly type: "array";
105
+ readonly minItems: 1;
106
+ readonly maxItems: 7;
107
+ readonly uniqueItems: true;
108
+ readonly items: {
109
+ readonly $ref: "#/$defs/Topic";
110
+ };
111
+ readonly description: "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.";
112
+ };
113
+ readonly heartbeatSeconds: {
114
+ readonly type: "integer";
115
+ readonly minimum: 5;
116
+ readonly maximum: 60;
117
+ readonly description: "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.";
118
+ };
119
+ readonly resumed: {
120
+ readonly type: "boolean";
121
+ readonly description: "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.";
122
+ };
123
+ readonly resumeToken: {
124
+ readonly $ref: "#/$defs/ResumeToken";
125
+ readonly description: "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.";
126
+ };
127
+ readonly ext: {
128
+ readonly $ref: "#/$defs/Ext";
129
+ };
130
+ };
131
+ };
132
+ readonly Ext: {
133
+ readonly title: "Ext";
134
+ 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.";
135
+ readonly type: "object";
136
+ readonly minProperties: 1;
137
+ readonly additionalProperties: true;
138
+ readonly propertyNames: {
139
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
140
+ };
141
+ };
142
+ readonly ResumeToken: {
143
+ readonly title: "ResumeToken";
144
+ readonly description: "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.";
145
+ readonly type: "string";
146
+ readonly minLength: 1;
147
+ readonly maxLength: 256;
148
+ readonly pattern: "^[A-Za-z0-9._~-]+$";
149
+ };
150
+ readonly Topic: {
151
+ readonly title: "Topic";
152
+ readonly description: "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.";
153
+ readonly type: "string";
154
+ readonly enum: readonly ["actions", "acknowledgements", "joinRequests", "members", "singleAdminMode", "config", "rooms"];
155
+ };
156
+ };
157
+ };
158
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
159
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
160
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
161
+ readonly $ref: "#/$defs/Response";
162
+ readonly $defs: {
163
+ readonly Response: {
164
+ readonly $anchor: "response";
165
+ readonly title: "VTC Admin Events — Subscribe — response payload";
166
+ readonly description: "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.";
167
+ readonly type: "object";
168
+ readonly additionalProperties: false;
169
+ readonly required: readonly ["topics", "heartbeatSeconds", "resumed", "resumeToken"];
170
+ readonly properties: {
171
+ readonly topics: {
172
+ readonly type: "array";
173
+ readonly minItems: 1;
174
+ readonly maxItems: 7;
175
+ readonly uniqueItems: true;
176
+ readonly items: {
177
+ readonly $ref: "#/$defs/Topic";
178
+ };
179
+ readonly description: "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.";
180
+ };
181
+ readonly heartbeatSeconds: {
182
+ readonly type: "integer";
183
+ readonly minimum: 5;
184
+ readonly maximum: 60;
185
+ readonly description: "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.";
186
+ };
187
+ readonly resumed: {
188
+ readonly type: "boolean";
189
+ readonly description: "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.";
190
+ };
191
+ readonly resumeToken: {
192
+ readonly $ref: "#/$defs/ResumeToken";
193
+ readonly description: "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.";
194
+ };
195
+ readonly ext: {
196
+ readonly $ref: "#/$defs/Ext";
197
+ };
198
+ };
199
+ };
200
+ readonly Ext: {
201
+ readonly title: "Ext";
202
+ 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.";
203
+ readonly type: "object";
204
+ readonly minProperties: 1;
205
+ readonly additionalProperties: true;
206
+ readonly propertyNames: {
207
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
208
+ };
209
+ };
210
+ readonly ResumeToken: {
211
+ readonly title: "ResumeToken";
212
+ readonly description: "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.";
213
+ readonly type: "string";
214
+ readonly minLength: 1;
215
+ readonly maxLength: 256;
216
+ readonly pattern: "^[A-Za-z0-9._~-]+$";
217
+ };
218
+ readonly Topic: {
219
+ readonly title: "Topic";
220
+ readonly description: "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.";
221
+ readonly type: "string";
222
+ readonly enum: readonly ["actions", "acknowledgements", "joinRequests", "members", "singleAdminMode", "config", "rooms"];
223
+ };
224
+ };
225
+ };
226
+ /**
227
+ * SPEC.md §7.2 policy for the request variant, from this specification's
228
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
229
+ * per-specification and cannot be derived from the document alone, and
230
+ * item 2 needs the schema this carries.
231
+ */
232
+ export declare const SPEC: {
233
+ readonly typeUri: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.2";
234
+ readonly isBearer: false;
235
+ readonly isProofRequired: true;
236
+ readonly isRecipientRequired: true;
237
+ readonly isIssuedAtRequired: true;
238
+ readonly payloadSchema: {
239
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
240
+ readonly $id: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.2";
241
+ readonly title: "VTC Admin Events — Subscribe — payload";
242
+ readonly description: "Open an administrator console's live channel of hint-only events. The success response is the first document on a stream that then carries vtc/admin/events/event/0.2 documents; over HTTPS that stream is the streamed response of bindings/https/0.3 §2.1. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
243
+ readonly type: "object";
244
+ readonly additionalProperties: false;
245
+ readonly required: readonly ["topics"];
246
+ readonly properties: {
247
+ readonly topics: {
248
+ readonly type: "array";
249
+ readonly minItems: 1;
250
+ readonly maxItems: 7;
251
+ readonly uniqueItems: true;
252
+ readonly items: {
253
+ readonly $ref: "#/$defs/Topic";
254
+ };
255
+ readonly description: "The topics the console renders. The community narrows this to the topics the caller may read and reports the result as the response's `topics`.";
256
+ };
257
+ readonly since: {
258
+ readonly $ref: "#/$defs/ResumeToken";
259
+ readonly description: "The last `resumeToken` the console received on an earlier stream, to resume from. A token the community does not recognise, has expired, or minted for another caller is not an error: the stream starts fresh and the response says `resumed: false`.";
260
+ };
261
+ readonly ext: {
262
+ readonly $ref: "#/$defs/Ext";
263
+ };
264
+ };
265
+ readonly $defs: {
266
+ readonly Response: {
267
+ readonly $anchor: "response";
268
+ readonly title: "VTC Admin Events — Subscribe — response payload";
269
+ readonly description: "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.";
270
+ readonly type: "object";
271
+ readonly additionalProperties: false;
272
+ readonly required: readonly ["topics", "heartbeatSeconds", "resumed", "resumeToken"];
273
+ readonly properties: {
274
+ readonly topics: {
275
+ readonly type: "array";
276
+ readonly minItems: 1;
277
+ readonly maxItems: 7;
278
+ readonly uniqueItems: true;
279
+ readonly items: {
280
+ readonly $ref: "#/$defs/Topic";
281
+ };
282
+ readonly description: "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.";
283
+ };
284
+ readonly heartbeatSeconds: {
285
+ readonly type: "integer";
286
+ readonly minimum: 5;
287
+ readonly maximum: 60;
288
+ readonly description: "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.";
289
+ };
290
+ readonly resumed: {
291
+ readonly type: "boolean";
292
+ readonly description: "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.";
293
+ };
294
+ readonly resumeToken: {
295
+ readonly $ref: "#/$defs/ResumeToken";
296
+ readonly description: "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.";
297
+ };
298
+ readonly ext: {
299
+ readonly $ref: "#/$defs/Ext";
300
+ };
301
+ };
302
+ };
303
+ readonly Ext: {
304
+ readonly title: "Ext";
305
+ 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.";
306
+ readonly type: "object";
307
+ readonly minProperties: 1;
308
+ readonly additionalProperties: true;
309
+ readonly propertyNames: {
310
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
311
+ };
312
+ };
313
+ readonly ResumeToken: {
314
+ readonly title: "ResumeToken";
315
+ readonly description: "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.";
316
+ readonly type: "string";
317
+ readonly minLength: 1;
318
+ readonly maxLength: 256;
319
+ readonly pattern: "^[A-Za-z0-9._~-]+$";
320
+ };
321
+ readonly Topic: {
322
+ readonly title: "Topic";
323
+ readonly description: "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.";
324
+ readonly type: "string";
325
+ readonly enum: readonly ["actions", "acknowledgements", "joinRequests", "members", "singleAdminMode", "config", "rooms"];
326
+ };
327
+ };
328
+ };
329
+ };
330
+ /**
331
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
332
+ * tracks the *issuer* party's requirement because a response swaps the
333
+ * parties (§7.3 item 5).
334
+ */
335
+ export declare const RESPONSE_SPEC: {
336
+ readonly typeUri: "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.2#response";
337
+ readonly isBearer: false;
338
+ readonly isProofRequired: false;
339
+ readonly isRecipientRequired: true;
340
+ readonly isIssuedAtRequired: true;
341
+ readonly payloadSchema: {
342
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
343
+ readonly $ref: "#/$defs/Response";
344
+ readonly $defs: {
345
+ readonly Response: {
346
+ readonly $anchor: "response";
347
+ readonly title: "VTC Admin Events — Subscribe — response payload";
348
+ readonly description: "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.";
349
+ readonly type: "object";
350
+ readonly additionalProperties: false;
351
+ readonly required: readonly ["topics", "heartbeatSeconds", "resumed", "resumeToken"];
352
+ readonly properties: {
353
+ readonly topics: {
354
+ readonly type: "array";
355
+ readonly minItems: 1;
356
+ readonly maxItems: 7;
357
+ readonly uniqueItems: true;
358
+ readonly items: {
359
+ readonly $ref: "#/$defs/Topic";
360
+ };
361
+ readonly description: "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live.";
362
+ };
363
+ readonly heartbeatSeconds: {
364
+ readonly type: "integer";
365
+ readonly minimum: 5;
366
+ readonly maximum: 60;
367
+ readonly description: "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead.";
368
+ };
369
+ readonly resumed: {
370
+ readonly type: "boolean";
371
+ readonly description: "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes.";
372
+ };
373
+ readonly resumeToken: {
374
+ readonly $ref: "#/$defs/ResumeToken";
375
+ readonly description: "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from.";
376
+ };
377
+ readonly ext: {
378
+ readonly $ref: "#/$defs/Ext";
379
+ };
380
+ };
381
+ };
382
+ readonly Ext: {
383
+ readonly title: "Ext";
384
+ 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.";
385
+ readonly type: "object";
386
+ readonly minProperties: 1;
387
+ readonly additionalProperties: true;
388
+ readonly propertyNames: {
389
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
390
+ };
391
+ };
392
+ readonly ResumeToken: {
393
+ readonly title: "ResumeToken";
394
+ readonly description: "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.";
395
+ readonly type: "string";
396
+ readonly minLength: 1;
397
+ readonly maxLength: 256;
398
+ readonly pattern: "^[A-Za-z0-9._~-]+$";
399
+ };
400
+ readonly Topic: {
401
+ readonly title: "Topic";
402
+ readonly description: "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.";
403
+ readonly type: "string";
404
+ readonly enum: readonly ["actions", "acknowledgements", "joinRequests", "members", "singleAdminMode", "config", "rooms"];
405
+ };
406
+ };
407
+ };
408
+ };
409
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","source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.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.2";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/admin/events/subscribe/0.2#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/admin/events/subscribe/0.2",
21
+ "title": "VTC Admin Events — Subscribe — payload",
22
+ "description": "Open an administrator console's live channel of hint-only events. The success response is the first document on a stream that then carries vtc/admin/events/event/0.2 documents; over HTTPS that stream is the streamed response of bindings/https/0.3 §2.1. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "topics"
27
+ ],
28
+ "properties": {
29
+ "topics": {
30
+ "type": "array",
31
+ "minItems": 1,
32
+ "maxItems": 7,
33
+ "uniqueItems": true,
34
+ "items": {
35
+ "$ref": "#/$defs/Topic"
36
+ },
37
+ "description": "The topics the console renders. The community narrows this to the topics the caller may read and reports the result as the response's `topics`."
38
+ },
39
+ "since": {
40
+ "$ref": "#/$defs/ResumeToken",
41
+ "description": "The last `resumeToken` the console received on an earlier stream, to resume from. A token the community does not recognise, has expired, or minted for another caller is not an error: the stream starts fresh and the response says `resumed: false`."
42
+ },
43
+ "ext": {
44
+ "$ref": "#/$defs/Ext"
45
+ }
46
+ },
47
+ "$defs": {
48
+ "Response": {
49
+ "$anchor": "response",
50
+ "title": "VTC Admin Events — Subscribe — response payload",
51
+ "description": "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.",
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "required": [
55
+ "topics",
56
+ "heartbeatSeconds",
57
+ "resumed",
58
+ "resumeToken"
59
+ ],
60
+ "properties": {
61
+ "topics": {
62
+ "type": "array",
63
+ "minItems": 1,
64
+ "maxItems": 7,
65
+ "uniqueItems": true,
66
+ "items": {
67
+ "$ref": "#/$defs/Topic"
68
+ },
69
+ "description": "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live."
70
+ },
71
+ "heartbeatSeconds": {
72
+ "type": "integer",
73
+ "minimum": 5,
74
+ "maximum": 60,
75
+ "description": "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead."
76
+ },
77
+ "resumed": {
78
+ "type": "boolean",
79
+ "description": "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes."
80
+ },
81
+ "resumeToken": {
82
+ "$ref": "#/$defs/ResumeToken",
83
+ "description": "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from."
84
+ },
85
+ "ext": {
86
+ "$ref": "#/$defs/Ext"
87
+ }
88
+ }
89
+ },
90
+ "Ext": {
91
+ "title": "Ext",
92
+ "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.",
93
+ "type": "object",
94
+ "minProperties": 1,
95
+ "additionalProperties": true,
96
+ "propertyNames": {
97
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
98
+ }
99
+ },
100
+ "ResumeToken": {
101
+ "title": "ResumeToken",
102
+ "description": "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.",
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "maxLength": 256,
106
+ "pattern": "^[A-Za-z0-9._~-]+$"
107
+ },
108
+ "Topic": {
109
+ "title": "Topic",
110
+ "description": "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.",
111
+ "type": "string",
112
+ "enum": [
113
+ "actions",
114
+ "acknowledgements",
115
+ "joinRequests",
116
+ "members",
117
+ "singleAdminMode",
118
+ "config",
119
+ "rooms"
120
+ ]
121
+ }
122
+ }
123
+ };
124
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
125
+ export const RESPONSE_PAYLOAD_SCHEMA = {
126
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
127
+ "$ref": "#/$defs/Response",
128
+ "$defs": {
129
+ "Response": {
130
+ "$anchor": "response",
131
+ "title": "VTC Admin Events — Subscribe — response payload",
132
+ "description": "The subscription as granted, sent as the first document on the stream. Failures use trust-task-error and open no stream.",
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": [
136
+ "topics",
137
+ "heartbeatSeconds",
138
+ "resumed",
139
+ "resumeToken"
140
+ ],
141
+ "properties": {
142
+ "topics": {
143
+ "type": "array",
144
+ "minItems": 1,
145
+ "maxItems": 7,
146
+ "uniqueItems": true,
147
+ "items": {
148
+ "$ref": "#/$defs/Topic"
149
+ },
150
+ "description": "The effective topics: those requested that the caller may read. The community sends events for these and no others. A requested topic missing here is one the caller may not read, and the console MUST NOT present it as live."
151
+ },
152
+ "heartbeatSeconds": {
153
+ "type": "integer",
154
+ "minimum": 5,
155
+ "maximum": 60,
156
+ "description": "The longest the community lets the stream go without sending anything. Over HTTPS the heartbeat is an SSE comment. A console that receives nothing for twice this interval MUST treat the stream as dead."
157
+ },
158
+ "resumed": {
159
+ "type": "boolean",
160
+ "description": "`true` when the community recognised `since` and will send a hint for every effective topic that changed after it. `false` when no `since` was given or it could not be honoured; the console MUST then re-fetch every effective topic, because it may have missed changes."
161
+ },
162
+ "resumeToken": {
163
+ "$ref": "#/$defs/ResumeToken",
164
+ "description": "The stream position as of this response, so that a console that disconnects before its first event still has a token to resume from."
165
+ },
166
+ "ext": {
167
+ "$ref": "#/$defs/Ext"
168
+ }
169
+ }
170
+ },
171
+ "Ext": {
172
+ "title": "Ext",
173
+ "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.",
174
+ "type": "object",
175
+ "minProperties": 1,
176
+ "additionalProperties": true,
177
+ "propertyNames": {
178
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
179
+ }
180
+ },
181
+ "ResumeToken": {
182
+ "title": "ResumeToken",
183
+ "description": "Opaque, community-minted position in one caller's event stream. A console MUST NOT parse, construct or order it; it only hands the latest one back as `since` when it re-subscribes. A community binds it to the caller it was minted for and treats a token minted for anyone else as unknown.",
184
+ "type": "string",
185
+ "minLength": 1,
186
+ "maxLength": 256,
187
+ "pattern": "^[A-Za-z0-9._~-]+$"
188
+ },
189
+ "Topic": {
190
+ "title": "Topic",
191
+ "description": "One kind of change a console can be told about. A closed set: a topic not listed here is a new MINOR version of this component, not an `ext` member, because each topic is bound to the read that authorizes it.",
192
+ "type": "string",
193
+ "enum": [
194
+ "actions",
195
+ "acknowledgements",
196
+ "joinRequests",
197
+ "members",
198
+ "singleAdminMode",
199
+ "config",
200
+ "rooms"
201
+ ]
202
+ }
203
+ }
204
+ };
205
+ /**
206
+ * SPEC.md §7.2 policy for the request variant, from this specification's
207
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
208
+ * per-specification and cannot be derived from the document alone, and
209
+ * item 2 needs the schema this carries.
210
+ */
211
+ export const SPEC = {
212
+ typeUri: TYPE_URI,
213
+ isBearer: false,
214
+ isProofRequired: true,
215
+ isRecipientRequired: true,
216
+ isIssuedAtRequired: true,
217
+ payloadSchema: PAYLOAD_SCHEMA,
218
+ };
219
+ /**
220
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
221
+ * tracks the *issuer* party's requirement because a response swaps the
222
+ * parties (§7.3 item 5).
223
+ */
224
+ export const RESPONSE_SPEC = {
225
+ typeUri: RESPONSE_TYPE_URI,
226
+ isBearer: false,
227
+ isProofRequired: false,
228
+ isRecipientRequired: true,
229
+ isIssuedAtRequired: true,
230
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
231
+ };
232
+ //# sourceMappingURL=payload.js.map