@openvtc/trust-tasks 0.19.14 → 0.19.16

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 (85) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/_shared/components.d.ts +331 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +11 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +11 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/messaging/_shared/0.1/mediator-ops.d.ts +16 -0
  9. package/dist/messaging/_shared/0.1/mediator-ops.d.ts.map +1 -0
  10. package/dist/messaging/_shared/0.1/mediator-ops.js +6 -0
  11. package/dist/messaging/_shared/0.1/mediator-ops.js.map +1 -0
  12. package/dist/messaging/message/delete/0.1/payload.d.ts +370 -0
  13. package/dist/messaging/message/delete/0.1/payload.d.ts.map +1 -0
  14. package/dist/messaging/message/delete/0.1/payload.js +206 -0
  15. package/dist/messaging/message/delete/0.1/payload.js.map +1 -0
  16. package/dist/messaging/message/get/0.1/payload.d.ts +568 -0
  17. package/dist/messaging/message/get/0.1/payload.d.ts.map +1 -0
  18. package/dist/messaging/message/get/0.1/payload.js +332 -0
  19. package/dist/messaging/message/get/0.1/payload.js.map +1 -0
  20. package/dist/messaging/message/list/0.1/payload.d.ts +627 -0
  21. package/dist/messaging/message/list/0.1/payload.d.ts.map +1 -0
  22. package/dist/messaging/message/list/0.1/payload.js +352 -0
  23. package/dist/messaging/message/list/0.1/payload.js.map +1 -0
  24. package/dist/messaging/monitor/event/0.1/payload.d.ts +385 -0
  25. package/dist/messaging/monitor/event/0.1/payload.d.ts.map +1 -0
  26. package/dist/messaging/monitor/event/0.1/payload.js +230 -0
  27. package/dist/messaging/monitor/event/0.1/payload.js.map +1 -0
  28. package/dist/messaging/monitor/subscribe/0.1/payload.d.ts +719 -0
  29. package/dist/messaging/monitor/subscribe/0.1/payload.d.ts.map +1 -0
  30. package/dist/messaging/monitor/subscribe/0.1/payload.js +417 -0
  31. package/dist/messaging/monitor/subscribe/0.1/payload.js.map +1 -0
  32. package/dist/messaging/monitor/unsubscribe/0.1/payload.d.ts +245 -0
  33. package/dist/messaging/monitor/unsubscribe/0.1/payload.d.ts.map +1 -0
  34. package/dist/messaging/monitor/unsubscribe/0.1/payload.js +136 -0
  35. package/dist/messaging/monitor/unsubscribe/0.1/payload.js.map +1 -0
  36. package/dist/messaging/queue/list/0.1/payload.d.ts +679 -0
  37. package/dist/messaging/queue/list/0.1/payload.d.ts.map +1 -0
  38. package/dist/messaging/queue/list/0.1/payload.js +377 -0
  39. package/dist/messaging/queue/list/0.1/payload.js.map +1 -0
  40. package/dist/messaging/queue/purge/0.1/payload.d.ts +389 -0
  41. package/dist/messaging/queue/purge/0.1/payload.d.ts.map +1 -0
  42. package/dist/messaging/queue/purge/0.1/payload.js +210 -0
  43. package/dist/messaging/queue/purge/0.1/payload.js.map +1 -0
  44. package/dist/messaging/queue/status/0.1/payload.d.ts +697 -0
  45. package/dist/messaging/queue/status/0.1/payload.d.ts.map +1 -0
  46. package/dist/messaging/queue/status/0.1/payload.js +389 -0
  47. package/dist/messaging/queue/status/0.1/payload.js.map +1 -0
  48. package/dist/messaging/stats/show/0.1/payload.d.ts +963 -0
  49. package/dist/messaging/stats/show/0.1/payload.d.ts.map +1 -0
  50. package/dist/messaging/stats/show/0.1/payload.js +515 -0
  51. package/dist/messaging/stats/show/0.1/payload.js.map +1 -0
  52. package/dist/vtc/join-requests/list/0.1/payload.d.ts +88 -0
  53. package/dist/vtc/join-requests/list/0.1/payload.d.ts.map +1 -1
  54. package/dist/vtc/join-requests/list/0.1/payload.js +50 -0
  55. package/dist/vtc/join-requests/list/0.1/payload.js.map +1 -1
  56. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts +135 -0
  57. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts.map +1 -1
  58. package/dist/vtc/join-requests/manifest/0.2/payload.js +62 -0
  59. package/dist/vtc/join-requests/manifest/0.2/payload.js.map +1 -1
  60. package/dist/vtc/join-requests/show/0.1/payload.d.ts +88 -0
  61. package/dist/vtc/join-requests/show/0.1/payload.d.ts.map +1 -1
  62. package/dist/vtc/join-requests/show/0.1/payload.js +50 -0
  63. package/dist/vtc/join-requests/show/0.1/payload.js.map +1 -1
  64. package/dist/vtc/join-requests/submit/0.2/payload.d.ts +61 -0
  65. package/dist/vtc/join-requests/submit/0.2/payload.d.ts.map +1 -1
  66. package/dist/vtc/join-requests/submit/0.2/payload.js +25 -0
  67. package/dist/vtc/join-requests/submit/0.2/payload.js.map +1 -1
  68. package/package.json +1 -1
  69. package/src/_shared/components.ts +359 -0
  70. package/src/index.ts +11 -0
  71. package/src/messaging/_shared/0.1/mediator-ops.ts +17 -0
  72. package/src/messaging/message/delete/0.1/payload.ts +259 -0
  73. package/src/messaging/message/get/0.1/payload.ts +375 -0
  74. package/src/messaging/message/list/0.1/payload.ts +410 -0
  75. package/src/messaging/monitor/event/0.1/payload.ts +267 -0
  76. package/src/messaging/monitor/subscribe/0.1/payload.ts +473 -0
  77. package/src/messaging/monitor/unsubscribe/0.1/payload.ts +172 -0
  78. package/src/messaging/queue/list/0.1/payload.ts +443 -0
  79. package/src/messaging/queue/purge/0.1/payload.ts +270 -0
  80. package/src/messaging/queue/status/0.1/payload.ts +439 -0
  81. package/src/messaging/stats/show/0.1/payload.ts +611 -0
  82. package/src/vtc/join-requests/list/0.1/payload.ts +50 -0
  83. package/src/vtc/join-requests/manifest/0.2/payload.ts +81 -0
  84. package/src/vtc/join-requests/show/0.1/payload.ts +50 -0
  85. package/src/vtc/join-requests/submit/0.2/payload.ts +42 -0
@@ -0,0 +1,473 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/messaging/monitor/subscribe/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, MonitorFilter, TrafficChannel, TrafficDirection, TrafficStage, Vid, WireProtocol } from "../../../../_shared/components.js";
7
+
8
+
9
+ export interface MessagingSubscribeToTrafficMonitorPayload {
10
+ filter?: MonitorFilter;
11
+ /**
12
+ * How long the subscription lives unless renewed. Default 300.
13
+ */
14
+ leaseSeconds?: number;
15
+ /**
16
+ * Rate ceiling the subscriber can absorb; the mediator MAY apply a lower one. Events over the ceiling are counted as dropped, never queued.
17
+ */
18
+ maxEventsPerSecond?: number;
19
+ /**
20
+ * Renew or re-filter an existing subscription held by the same requester. Omitted = create a new one.
21
+ */
22
+ subscriptionId?: string;
23
+ /**
24
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
25
+ */
26
+ ext?: Ext;
27
+ }
28
+ /**
29
+ * The success response to a messaging/monitor/subscribe request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/monitor/subscribe/0.1#response.
30
+ */
31
+ export interface MessagingSubscribeToTrafficMonitorResponsePayload {
32
+ subscriptionId: string;
33
+ expiresAt: string;
34
+ /**
35
+ * The filter in force, after the mediator narrowed it to what the requester is entitled to see.
36
+ */
37
+ filter: MonitorFilter;
38
+ /**
39
+ * The rate ceiling in force.
40
+ */
41
+ maxEventsPerSecond: number;
42
+ /**
43
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
44
+ */
45
+ ext?: Ext;
46
+ }
47
+
48
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
49
+ export type { Ext, MonitorFilter, TrafficChannel, TrafficDirection, TrafficStage, Vid, WireProtocol };
50
+
51
+ /** Trust Task type URI. */
52
+ export const TYPE_URI = "https://trusttasks.org/spec/messaging/monitor/subscribe/0.1" as const;
53
+
54
+ /** Stable alias for this specification's request payload shape. */
55
+ export type Payload = MessagingSubscribeToTrafficMonitorPayload;
56
+
57
+ /** Trust Task response type URI (request type URI + "#response"). */
58
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/monitor/subscribe/0.1#response" as const;
59
+
60
+ /** Stable alias for this specification's success-response payload shape. */
61
+ export type Response = MessagingSubscribeToTrafficMonitorResponsePayload;
62
+
63
+ /**
64
+ * This specification's payload schema, as a value.
65
+ *
66
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
67
+ * rather than only as a `.json` file because TypeScript types are erased
68
+ * at runtime: without a schema a consumer has nothing to validate, and
69
+ * every REQUIRED payload member is optional in practice. Cross-file
70
+ * `$ref`s are already inlined, so it needs no resolver.
71
+ */
72
+ export const PAYLOAD_SCHEMA = {
73
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
74
+ "$id": "https://trusttasks.org/spec/messaging/monitor/subscribe/0.1",
75
+ "title": "Messaging — Subscribe to Traffic Monitor — payload",
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "filter": {
80
+ "$ref": "#/$defs/MonitorFilter"
81
+ },
82
+ "leaseSeconds": {
83
+ "type": "integer",
84
+ "minimum": 10,
85
+ "maximum": 3600,
86
+ "description": "How long the subscription lives unless renewed. Default 300."
87
+ },
88
+ "maxEventsPerSecond": {
89
+ "type": "integer",
90
+ "minimum": 1,
91
+ "maximum": 1000,
92
+ "description": "Rate ceiling the subscriber can absorb; the mediator MAY apply a lower one. Events over the ceiling are counted as dropped, never queued."
93
+ },
94
+ "subscriptionId": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "description": "Renew or re-filter an existing subscription held by the same requester. Omitted = create a new one."
98
+ },
99
+ "ext": {
100
+ "$ref": "#/$defs/Ext",
101
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
102
+ }
103
+ },
104
+ "$defs": {
105
+ "Response": {
106
+ "$anchor": "response",
107
+ "title": "Messaging — Subscribe to Traffic Monitor — response payload",
108
+ "description": "The success response to a messaging/monitor/subscribe request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/monitor/subscribe/0.1#response.",
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "properties": {
112
+ "subscriptionId": {
113
+ "type": "string",
114
+ "minLength": 1
115
+ },
116
+ "expiresAt": {
117
+ "type": "string",
118
+ "format": "date-time"
119
+ },
120
+ "filter": {
121
+ "$ref": "#/$defs/MonitorFilter",
122
+ "description": "The filter in force, after the mediator narrowed it to what the requester is entitled to see."
123
+ },
124
+ "maxEventsPerSecond": {
125
+ "type": "integer",
126
+ "minimum": 1,
127
+ "description": "The rate ceiling in force."
128
+ },
129
+ "ext": {
130
+ "$ref": "#/$defs/Ext",
131
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
132
+ }
133
+ },
134
+ "required": [
135
+ "subscriptionId",
136
+ "expiresAt",
137
+ "filter",
138
+ "maxEventsPerSecond"
139
+ ]
140
+ },
141
+ "Ext": {
142
+ "title": "Ext",
143
+ "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.",
144
+ "type": "object",
145
+ "minProperties": 1,
146
+ "additionalProperties": true,
147
+ "propertyNames": {
148
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
149
+ }
150
+ },
151
+ "MonitorFilter": {
152
+ "title": "MonitorFilter",
153
+ "type": "object",
154
+ "additionalProperties": false,
155
+ "description": "Selects which events a monitor subscription receives. Every member present narrows the selection (members are ANDed; values within one member are ORed). An empty filter selects everything the requester is entitled to see.",
156
+ "properties": {
157
+ "dids": {
158
+ "type": "array",
159
+ "minItems": 1,
160
+ "maxItems": 100,
161
+ "uniqueItems": true,
162
+ "items": {
163
+ "$ref": "#/$defs/Vid"
164
+ },
165
+ "description": "Only events whose `from` or `to` is one of these accounts."
166
+ },
167
+ "directions": {
168
+ "type": "array",
169
+ "minItems": 1,
170
+ "uniqueItems": true,
171
+ "items": {
172
+ "$ref": "#/$defs/TrafficDirection"
173
+ }
174
+ },
175
+ "stages": {
176
+ "type": "array",
177
+ "minItems": 1,
178
+ "uniqueItems": true,
179
+ "items": {
180
+ "$ref": "#/$defs/TrafficStage"
181
+ }
182
+ },
183
+ "protocols": {
184
+ "type": "array",
185
+ "minItems": 1,
186
+ "uniqueItems": true,
187
+ "items": {
188
+ "$ref": "#/$defs/WireProtocol"
189
+ }
190
+ },
191
+ "channels": {
192
+ "type": "array",
193
+ "minItems": 1,
194
+ "uniqueItems": true,
195
+ "items": {
196
+ "$ref": "#/$defs/TrafficChannel"
197
+ }
198
+ },
199
+ "messageTypePrefixes": {
200
+ "type": "array",
201
+ "minItems": 1,
202
+ "maxItems": 20,
203
+ "uniqueItems": true,
204
+ "items": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "maxLength": 512
208
+ },
209
+ "description": "Only events whose `messageType` starts with one of these strings. Events with no `messageType` never match when this member is present."
210
+ },
211
+ "failuresOnly": {
212
+ "type": "boolean",
213
+ "description": "Only events that carry an `outcome`."
214
+ }
215
+ }
216
+ },
217
+ "TrafficChannel": {
218
+ "title": "TrafficChannel",
219
+ "type": "string",
220
+ "enum": [
221
+ "websocket",
222
+ "rest",
223
+ "peerMediator",
224
+ "internal"
225
+ ],
226
+ "description": "How the traffic reached or left the mediator. `peerMediator` is mediator-to-mediator forwarding."
227
+ },
228
+ "WireProtocol": {
229
+ "title": "WireProtocol",
230
+ "type": "string",
231
+ "enum": [
232
+ "didcomm",
233
+ "didcommV1",
234
+ "tsp",
235
+ "other"
236
+ ],
237
+ "description": "The protocol a message travelled in, as the mediator detected it from the wire form. `didcomm` is DIDComm v2 (JWE/JWS); `didcommV1` is a DIDComm v1 envelope; `tsp` is a Trust Spanning Protocol message; `other` is anything the mediator could not classify."
238
+ },
239
+ "TrafficStage": {
240
+ "title": "TrafficStage",
241
+ "type": "string",
242
+ "enum": [
243
+ "received",
244
+ "stored",
245
+ "delivered",
246
+ "forwarded",
247
+ "refused",
248
+ "deleted",
249
+ "expired",
250
+ "purged"
251
+ ],
252
+ "description": "What happened. `received`: a frame arrived. `stored`: it was queued for a local account. `delivered`: handed to its recipient. `forwarded`: relayed to another mediator. `refused`: rejected (see the event's `outcome`). `deleted`: removed by its recipient or an administrator. `expired`: removed by expiry. `purged`: removed by a queue purge."
253
+ },
254
+ "TrafficDirection": {
255
+ "title": "TrafficDirection",
256
+ "type": "string",
257
+ "enum": [
258
+ "inbound",
259
+ "outbound",
260
+ "internal"
261
+ ],
262
+ "description": "`inbound`: arriving at the mediator. `outbound`: leaving it (delivery to a recipient, or a forward to another mediator). `internal`: a state change with no wire traffic (expiry, deletion, purge)."
263
+ },
264
+ "Vid": {
265
+ "title": "Vid",
266
+ "type": "string",
267
+ "minLength": 1,
268
+ "description": "A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses."
269
+ }
270
+ }
271
+ } as const;
272
+
273
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
274
+ export const RESPONSE_PAYLOAD_SCHEMA = {
275
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
276
+ "$ref": "#/$defs/Response",
277
+ "$defs": {
278
+ "Response": {
279
+ "$anchor": "response",
280
+ "title": "Messaging — Subscribe to Traffic Monitor — response payload",
281
+ "description": "The success response to a messaging/monitor/subscribe request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/monitor/subscribe/0.1#response.",
282
+ "type": "object",
283
+ "additionalProperties": false,
284
+ "properties": {
285
+ "subscriptionId": {
286
+ "type": "string",
287
+ "minLength": 1
288
+ },
289
+ "expiresAt": {
290
+ "type": "string",
291
+ "format": "date-time"
292
+ },
293
+ "filter": {
294
+ "$ref": "#/$defs/MonitorFilter",
295
+ "description": "The filter in force, after the mediator narrowed it to what the requester is entitled to see."
296
+ },
297
+ "maxEventsPerSecond": {
298
+ "type": "integer",
299
+ "minimum": 1,
300
+ "description": "The rate ceiling in force."
301
+ },
302
+ "ext": {
303
+ "$ref": "#/$defs/Ext",
304
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
305
+ }
306
+ },
307
+ "required": [
308
+ "subscriptionId",
309
+ "expiresAt",
310
+ "filter",
311
+ "maxEventsPerSecond"
312
+ ]
313
+ },
314
+ "Ext": {
315
+ "title": "Ext",
316
+ "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.",
317
+ "type": "object",
318
+ "minProperties": 1,
319
+ "additionalProperties": true,
320
+ "propertyNames": {
321
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
322
+ }
323
+ },
324
+ "MonitorFilter": {
325
+ "title": "MonitorFilter",
326
+ "type": "object",
327
+ "additionalProperties": false,
328
+ "description": "Selects which events a monitor subscription receives. Every member present narrows the selection (members are ANDed; values within one member are ORed). An empty filter selects everything the requester is entitled to see.",
329
+ "properties": {
330
+ "dids": {
331
+ "type": "array",
332
+ "minItems": 1,
333
+ "maxItems": 100,
334
+ "uniqueItems": true,
335
+ "items": {
336
+ "$ref": "#/$defs/Vid"
337
+ },
338
+ "description": "Only events whose `from` or `to` is one of these accounts."
339
+ },
340
+ "directions": {
341
+ "type": "array",
342
+ "minItems": 1,
343
+ "uniqueItems": true,
344
+ "items": {
345
+ "$ref": "#/$defs/TrafficDirection"
346
+ }
347
+ },
348
+ "stages": {
349
+ "type": "array",
350
+ "minItems": 1,
351
+ "uniqueItems": true,
352
+ "items": {
353
+ "$ref": "#/$defs/TrafficStage"
354
+ }
355
+ },
356
+ "protocols": {
357
+ "type": "array",
358
+ "minItems": 1,
359
+ "uniqueItems": true,
360
+ "items": {
361
+ "$ref": "#/$defs/WireProtocol"
362
+ }
363
+ },
364
+ "channels": {
365
+ "type": "array",
366
+ "minItems": 1,
367
+ "uniqueItems": true,
368
+ "items": {
369
+ "$ref": "#/$defs/TrafficChannel"
370
+ }
371
+ },
372
+ "messageTypePrefixes": {
373
+ "type": "array",
374
+ "minItems": 1,
375
+ "maxItems": 20,
376
+ "uniqueItems": true,
377
+ "items": {
378
+ "type": "string",
379
+ "minLength": 1,
380
+ "maxLength": 512
381
+ },
382
+ "description": "Only events whose `messageType` starts with one of these strings. Events with no `messageType` never match when this member is present."
383
+ },
384
+ "failuresOnly": {
385
+ "type": "boolean",
386
+ "description": "Only events that carry an `outcome`."
387
+ }
388
+ }
389
+ },
390
+ "TrafficChannel": {
391
+ "title": "TrafficChannel",
392
+ "type": "string",
393
+ "enum": [
394
+ "websocket",
395
+ "rest",
396
+ "peerMediator",
397
+ "internal"
398
+ ],
399
+ "description": "How the traffic reached or left the mediator. `peerMediator` is mediator-to-mediator forwarding."
400
+ },
401
+ "WireProtocol": {
402
+ "title": "WireProtocol",
403
+ "type": "string",
404
+ "enum": [
405
+ "didcomm",
406
+ "didcommV1",
407
+ "tsp",
408
+ "other"
409
+ ],
410
+ "description": "The protocol a message travelled in, as the mediator detected it from the wire form. `didcomm` is DIDComm v2 (JWE/JWS); `didcommV1` is a DIDComm v1 envelope; `tsp` is a Trust Spanning Protocol message; `other` is anything the mediator could not classify."
411
+ },
412
+ "TrafficStage": {
413
+ "title": "TrafficStage",
414
+ "type": "string",
415
+ "enum": [
416
+ "received",
417
+ "stored",
418
+ "delivered",
419
+ "forwarded",
420
+ "refused",
421
+ "deleted",
422
+ "expired",
423
+ "purged"
424
+ ],
425
+ "description": "What happened. `received`: a frame arrived. `stored`: it was queued for a local account. `delivered`: handed to its recipient. `forwarded`: relayed to another mediator. `refused`: rejected (see the event's `outcome`). `deleted`: removed by its recipient or an administrator. `expired`: removed by expiry. `purged`: removed by a queue purge."
426
+ },
427
+ "TrafficDirection": {
428
+ "title": "TrafficDirection",
429
+ "type": "string",
430
+ "enum": [
431
+ "inbound",
432
+ "outbound",
433
+ "internal"
434
+ ],
435
+ "description": "`inbound`: arriving at the mediator. `outbound`: leaving it (delivery to a recipient, or a forward to another mediator). `internal`: a state change with no wire traffic (expiry, deletion, purge)."
436
+ },
437
+ "Vid": {
438
+ "title": "Vid",
439
+ "type": "string",
440
+ "minLength": 1,
441
+ "description": "A Verifiable Identifier (SPEC §4.8). For a mediator-served account this is the account's controlling DID, carried verbatim and compared by exact string equality. For privacy — and because some mediators key accounts by a one-way hash and never hold the full DID — a stable hash of the DID (e.g. its SHA-256 digest) is an equally valid value here: producer and consumer simply agree on the same opaque identifier and compare by exact string equality. The field carries whichever form the issuing mediator uses."
442
+ }
443
+ }
444
+ } as const;
445
+
446
+ /**
447
+ * SPEC.md §7.2 policy for the request variant, from this specification's
448
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
449
+ * per-specification and cannot be derived from the document alone, and
450
+ * item 2 needs the schema this carries.
451
+ */
452
+ export const SPEC = {
453
+ typeUri: TYPE_URI,
454
+ isBearer: false,
455
+ isProofRequired: true,
456
+ isRecipientRequired: true,
457
+ isIssuedAtRequired: true,
458
+ payloadSchema: PAYLOAD_SCHEMA,
459
+ } as const;
460
+
461
+ /**
462
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
463
+ * tracks the *issuer* party's requirement because a response swaps the
464
+ * parties (§7.3 item 5).
465
+ */
466
+ export const RESPONSE_SPEC = {
467
+ typeUri: RESPONSE_TYPE_URI,
468
+ isBearer: false,
469
+ isProofRequired: false,
470
+ isRecipientRequired: true,
471
+ isIssuedAtRequired: true,
472
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
473
+ } as const;
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/messaging/monitor/unsubscribe/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ export interface MessagingUnsubscribeFromTrafficMonitorPayload {
10
+ subscriptionId: string;
11
+ /**
12
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
13
+ */
14
+ ext?: Ext;
15
+ }
16
+ /**
17
+ * The success response to a messaging/monitor/unsubscribe request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/monitor/unsubscribe/0.1#response.
18
+ */
19
+ export interface MessagingUnsubscribeFromTrafficMonitorResponsePayload {
20
+ eventsSent?: number;
21
+ eventsDropped?: number;
22
+ /**
23
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
24
+ */
25
+ ext?: Ext;
26
+ }
27
+
28
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
29
+ export type { Ext };
30
+
31
+ /** Trust Task type URI. */
32
+ export const TYPE_URI = "https://trusttasks.org/spec/messaging/monitor/unsubscribe/0.1" as const;
33
+
34
+ /** Stable alias for this specification's request payload shape. */
35
+ export type Payload = MessagingUnsubscribeFromTrafficMonitorPayload;
36
+
37
+ /** Trust Task response type URI (request type URI + "#response"). */
38
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/monitor/unsubscribe/0.1#response" as const;
39
+
40
+ /** Stable alias for this specification's success-response payload shape. */
41
+ export type Response = MessagingUnsubscribeFromTrafficMonitorResponsePayload;
42
+
43
+ /**
44
+ * This specification's payload schema, as a value.
45
+ *
46
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
47
+ * rather than only as a `.json` file because TypeScript types are erased
48
+ * at runtime: without a schema a consumer has nothing to validate, and
49
+ * every REQUIRED payload member is optional in practice. Cross-file
50
+ * `$ref`s are already inlined, so it needs no resolver.
51
+ */
52
+ export const PAYLOAD_SCHEMA = {
53
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
54
+ "$id": "https://trusttasks.org/spec/messaging/monitor/unsubscribe/0.1",
55
+ "title": "Messaging — Unsubscribe from Traffic Monitor — payload",
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": [
59
+ "subscriptionId"
60
+ ],
61
+ "properties": {
62
+ "subscriptionId": {
63
+ "type": "string",
64
+ "minLength": 1
65
+ },
66
+ "ext": {
67
+ "$ref": "#/$defs/Ext",
68
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
69
+ }
70
+ },
71
+ "$defs": {
72
+ "Response": {
73
+ "$anchor": "response",
74
+ "title": "Messaging — Unsubscribe from Traffic Monitor — response payload",
75
+ "description": "The success response to a messaging/monitor/unsubscribe request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/monitor/unsubscribe/0.1#response.",
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "eventsSent": {
80
+ "type": "integer",
81
+ "minimum": 0
82
+ },
83
+ "eventsDropped": {
84
+ "type": "integer",
85
+ "minimum": 0
86
+ },
87
+ "ext": {
88
+ "$ref": "#/$defs/Ext",
89
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
90
+ }
91
+ }
92
+ },
93
+ "Ext": {
94
+ "title": "Ext",
95
+ "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.",
96
+ "type": "object",
97
+ "minProperties": 1,
98
+ "additionalProperties": true,
99
+ "propertyNames": {
100
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
101
+ }
102
+ }
103
+ }
104
+ } as const;
105
+
106
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
107
+ export const RESPONSE_PAYLOAD_SCHEMA = {
108
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
109
+ "$ref": "#/$defs/Response",
110
+ "$defs": {
111
+ "Response": {
112
+ "$anchor": "response",
113
+ "title": "Messaging — Unsubscribe from Traffic Monitor — response payload",
114
+ "description": "The success response to a messaging/monitor/unsubscribe request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/monitor/unsubscribe/0.1#response.",
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "properties": {
118
+ "eventsSent": {
119
+ "type": "integer",
120
+ "minimum": 0
121
+ },
122
+ "eventsDropped": {
123
+ "type": "integer",
124
+ "minimum": 0
125
+ },
126
+ "ext": {
127
+ "$ref": "#/$defs/Ext",
128
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
129
+ }
130
+ }
131
+ },
132
+ "Ext": {
133
+ "title": "Ext",
134
+ "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
+ "type": "object",
136
+ "minProperties": 1,
137
+ "additionalProperties": true,
138
+ "propertyNames": {
139
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
140
+ }
141
+ }
142
+ }
143
+ } as const;
144
+
145
+ /**
146
+ * SPEC.md §7.2 policy for the request variant, from this specification's
147
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
148
+ * per-specification and cannot be derived from the document alone, and
149
+ * item 2 needs the schema this carries.
150
+ */
151
+ export const SPEC = {
152
+ typeUri: TYPE_URI,
153
+ isBearer: false,
154
+ isProofRequired: true,
155
+ isRecipientRequired: true,
156
+ isIssuedAtRequired: true,
157
+ payloadSchema: PAYLOAD_SCHEMA,
158
+ } as const;
159
+
160
+ /**
161
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
162
+ * tracks the *issuer* party's requirement because a response swaps the
163
+ * parties (§7.3 item 5).
164
+ */
165
+ export const RESPONSE_SPEC = {
166
+ typeUri: RESPONSE_TYPE_URI,
167
+ isBearer: false,
168
+ isProofRequired: false,
169
+ isRecipientRequired: true,
170
+ isIssuedAtRequired: true,
171
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
172
+ } as const;