@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,611 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/messaging/stats/show/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, QueueDepth } from "../../../../_shared/components.js";
7
+
8
+
9
+ export interface MessagingShowMediatorStatisticsPayload {
10
+ /**
11
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
12
+ */
13
+ ext?: Ext;
14
+ }
15
+ /**
16
+ * The success response to a messaging/stats/show request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/stats/show/0.1#response.
17
+ */
18
+ export interface MessagingShowMediatorStatisticsResponsePayload {
19
+ /**
20
+ * The mediator software's version string.
21
+ */
22
+ version: string;
23
+ startedAt?: string;
24
+ uptimeSeconds: number;
25
+ connections: {
26
+ websocketActive: number;
27
+ /**
28
+ * Configured ceiling; absent when unlimited.
29
+ */
30
+ websocketMax?: number;
31
+ };
32
+ /**
33
+ * Lifetime counters since the mediator's store was created. Monotonic; a client derives rates from successive readings.
34
+ */
35
+ totals: {
36
+ receivedCount: number;
37
+ receivedBytes: number;
38
+ sentCount: number;
39
+ sentBytes: number;
40
+ deletedCount: number;
41
+ deletedBytes?: number;
42
+ websocketOpened?: number;
43
+ websocketClosed?: number;
44
+ sessionsCreated?: number;
45
+ sessionsAuthenticated?: number;
46
+ invitationsCreated?: number;
47
+ invitationsClaimed?: number;
48
+ };
49
+ forwarding: {
50
+ /**
51
+ * Messages waiting to be forwarded to other mediators.
52
+ */
53
+ queueLength: number;
54
+ queueLimit?: number;
55
+ /**
56
+ * State of the store circuit breaker. `open` means the mediator is shedding store operations.
57
+ */
58
+ circuitBreaker?: "closed" | "open" | "halfOpen";
59
+ };
60
+ /**
61
+ * Aggregate of the mediator's most recent queue survey. Absent when no survey has completed.
62
+ */
63
+ queues?: {
64
+ surveyedAt: string;
65
+ /**
66
+ * Accounts the survey covered.
67
+ */
68
+ accounts: number;
69
+ /**
70
+ * The survey stopped before covering every account.
71
+ */
72
+ truncated?: boolean;
73
+ /**
74
+ * Totals across every surveyed receive queue; `saturation` is the maximum of any single queue.
75
+ */
76
+ receive?: QueueDepth;
77
+ /**
78
+ * Totals across every surveyed send queue; `saturation` is the maximum of any single queue.
79
+ */
80
+ send?: QueueDepth;
81
+ };
82
+ /**
83
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
84
+ */
85
+ ext?: Ext;
86
+ }
87
+
88
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
89
+ export type { Ext, QueueDepth };
90
+
91
+ /** Trust Task type URI. */
92
+ export const TYPE_URI = "https://trusttasks.org/spec/messaging/stats/show/0.1" as const;
93
+
94
+ /** Stable alias for this specification's request payload shape. */
95
+ export type Payload = MessagingShowMediatorStatisticsPayload;
96
+
97
+ /** Trust Task response type URI (request type URI + "#response"). */
98
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/stats/show/0.1#response" as const;
99
+
100
+ /** Stable alias for this specification's success-response payload shape. */
101
+ export type Response = MessagingShowMediatorStatisticsResponsePayload;
102
+
103
+ /**
104
+ * This specification's payload schema, as a value.
105
+ *
106
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
107
+ * rather than only as a `.json` file because TypeScript types are erased
108
+ * at runtime: without a schema a consumer has nothing to validate, and
109
+ * every REQUIRED payload member is optional in practice. Cross-file
110
+ * `$ref`s are already inlined, so it needs no resolver.
111
+ */
112
+ export const PAYLOAD_SCHEMA = {
113
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
114
+ "$id": "https://trusttasks.org/spec/messaging/stats/show/0.1",
115
+ "title": "Messaging — Show Mediator Statistics — payload",
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "properties": {
119
+ "ext": {
120
+ "$ref": "#/$defs/Ext",
121
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
122
+ }
123
+ },
124
+ "$defs": {
125
+ "Response": {
126
+ "$anchor": "response",
127
+ "title": "Messaging — Show Mediator Statistics — response payload",
128
+ "description": "The success response to a messaging/stats/show request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/stats/show/0.1#response.",
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "properties": {
132
+ "version": {
133
+ "type": "string",
134
+ "minLength": 1,
135
+ "description": "The mediator software's version string."
136
+ },
137
+ "startedAt": {
138
+ "type": "string",
139
+ "format": "date-time"
140
+ },
141
+ "uptimeSeconds": {
142
+ "type": "integer",
143
+ "minimum": 0
144
+ },
145
+ "connections": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": [
149
+ "websocketActive"
150
+ ],
151
+ "properties": {
152
+ "websocketActive": {
153
+ "type": "integer",
154
+ "minimum": 0
155
+ },
156
+ "websocketMax": {
157
+ "type": "integer",
158
+ "minimum": 0,
159
+ "description": "Configured ceiling; absent when unlimited."
160
+ }
161
+ }
162
+ },
163
+ "totals": {
164
+ "type": "object",
165
+ "additionalProperties": false,
166
+ "description": "Lifetime counters since the mediator's store was created. Monotonic; a client derives rates from successive readings.",
167
+ "required": [
168
+ "receivedCount",
169
+ "receivedBytes",
170
+ "sentCount",
171
+ "sentBytes",
172
+ "deletedCount"
173
+ ],
174
+ "properties": {
175
+ "receivedCount": {
176
+ "type": "integer",
177
+ "minimum": 0
178
+ },
179
+ "receivedBytes": {
180
+ "type": "integer",
181
+ "minimum": 0
182
+ },
183
+ "sentCount": {
184
+ "type": "integer",
185
+ "minimum": 0
186
+ },
187
+ "sentBytes": {
188
+ "type": "integer",
189
+ "minimum": 0
190
+ },
191
+ "deletedCount": {
192
+ "type": "integer",
193
+ "minimum": 0
194
+ },
195
+ "deletedBytes": {
196
+ "type": "integer",
197
+ "minimum": 0
198
+ },
199
+ "websocketOpened": {
200
+ "type": "integer",
201
+ "minimum": 0
202
+ },
203
+ "websocketClosed": {
204
+ "type": "integer",
205
+ "minimum": 0
206
+ },
207
+ "sessionsCreated": {
208
+ "type": "integer",
209
+ "minimum": 0
210
+ },
211
+ "sessionsAuthenticated": {
212
+ "type": "integer",
213
+ "minimum": 0
214
+ },
215
+ "invitationsCreated": {
216
+ "type": "integer",
217
+ "minimum": 0
218
+ },
219
+ "invitationsClaimed": {
220
+ "type": "integer",
221
+ "minimum": 0
222
+ }
223
+ }
224
+ },
225
+ "forwarding": {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": [
229
+ "queueLength"
230
+ ],
231
+ "properties": {
232
+ "queueLength": {
233
+ "type": "integer",
234
+ "minimum": 0,
235
+ "description": "Messages waiting to be forwarded to other mediators."
236
+ },
237
+ "queueLimit": {
238
+ "type": "integer",
239
+ "minimum": 0
240
+ },
241
+ "circuitBreaker": {
242
+ "type": "string",
243
+ "enum": [
244
+ "closed",
245
+ "open",
246
+ "halfOpen"
247
+ ],
248
+ "description": "State of the store circuit breaker. `open` means the mediator is shedding store operations."
249
+ }
250
+ }
251
+ },
252
+ "queues": {
253
+ "type": "object",
254
+ "additionalProperties": false,
255
+ "description": "Aggregate of the mediator's most recent queue survey. Absent when no survey has completed.",
256
+ "required": [
257
+ "surveyedAt",
258
+ "accounts"
259
+ ],
260
+ "properties": {
261
+ "surveyedAt": {
262
+ "type": "string",
263
+ "format": "date-time"
264
+ },
265
+ "accounts": {
266
+ "type": "integer",
267
+ "minimum": 0,
268
+ "description": "Accounts the survey covered."
269
+ },
270
+ "truncated": {
271
+ "type": "boolean",
272
+ "description": "The survey stopped before covering every account."
273
+ },
274
+ "receive": {
275
+ "$ref": "#/$defs/QueueDepth",
276
+ "description": "Totals across every surveyed receive queue; `saturation` is the maximum of any single queue."
277
+ },
278
+ "send": {
279
+ "$ref": "#/$defs/QueueDepth",
280
+ "description": "Totals across every surveyed send queue; `saturation` is the maximum of any single queue."
281
+ }
282
+ }
283
+ },
284
+ "ext": {
285
+ "$ref": "#/$defs/Ext",
286
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
287
+ }
288
+ },
289
+ "required": [
290
+ "version",
291
+ "uptimeSeconds",
292
+ "connections",
293
+ "totals",
294
+ "forwarding"
295
+ ]
296
+ },
297
+ "Ext": {
298
+ "title": "Ext",
299
+ "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.",
300
+ "type": "object",
301
+ "minProperties": 1,
302
+ "additionalProperties": true,
303
+ "propertyNames": {
304
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
305
+ }
306
+ },
307
+ "QueueDepth": {
308
+ "title": "QueueDepth",
309
+ "type": "object",
310
+ "additionalProperties": false,
311
+ "required": [
312
+ "count",
313
+ "bytes"
314
+ ],
315
+ "description": "The depth of one queue and its effective limit.",
316
+ "properties": {
317
+ "count": {
318
+ "type": "integer",
319
+ "minimum": 0,
320
+ "description": "Messages currently in the queue."
321
+ },
322
+ "bytes": {
323
+ "type": "integer",
324
+ "minimum": 0,
325
+ "description": "Total stored size of those messages, in bytes."
326
+ },
327
+ "limit": {
328
+ "type": "integer",
329
+ "minimum": -1,
330
+ "description": "The effective message-count limit for this queue after account overrides and mediator defaults are applied; -1 = unlimited."
331
+ },
332
+ "saturation": {
333
+ "type": "number",
334
+ "minimum": 0,
335
+ "description": "count ÷ limit. Absent when the limit is unlimited. May exceed 1 when a limit was lowered below the current depth."
336
+ },
337
+ "oldestAgeSeconds": {
338
+ "type": "integer",
339
+ "minimum": 0,
340
+ "description": "Age of the oldest message in the queue, in seconds. Absent when the queue is empty or the mediator did not measure it."
341
+ },
342
+ "deliveredUnacked": {
343
+ "type": "integer",
344
+ "minimum": 0,
345
+ "description": "Messages in the queue whose state is `delivered` — handed out but not yet deleted by the recipient. Absent when the mediator did not measure it."
346
+ }
347
+ }
348
+ }
349
+ }
350
+ } as const;
351
+
352
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
353
+ export const RESPONSE_PAYLOAD_SCHEMA = {
354
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
355
+ "$ref": "#/$defs/Response",
356
+ "$defs": {
357
+ "Response": {
358
+ "$anchor": "response",
359
+ "title": "Messaging — Show Mediator Statistics — response payload",
360
+ "description": "The success response to a messaging/stats/show request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/stats/show/0.1#response.",
361
+ "type": "object",
362
+ "additionalProperties": false,
363
+ "properties": {
364
+ "version": {
365
+ "type": "string",
366
+ "minLength": 1,
367
+ "description": "The mediator software's version string."
368
+ },
369
+ "startedAt": {
370
+ "type": "string",
371
+ "format": "date-time"
372
+ },
373
+ "uptimeSeconds": {
374
+ "type": "integer",
375
+ "minimum": 0
376
+ },
377
+ "connections": {
378
+ "type": "object",
379
+ "additionalProperties": false,
380
+ "required": [
381
+ "websocketActive"
382
+ ],
383
+ "properties": {
384
+ "websocketActive": {
385
+ "type": "integer",
386
+ "minimum": 0
387
+ },
388
+ "websocketMax": {
389
+ "type": "integer",
390
+ "minimum": 0,
391
+ "description": "Configured ceiling; absent when unlimited."
392
+ }
393
+ }
394
+ },
395
+ "totals": {
396
+ "type": "object",
397
+ "additionalProperties": false,
398
+ "description": "Lifetime counters since the mediator's store was created. Monotonic; a client derives rates from successive readings.",
399
+ "required": [
400
+ "receivedCount",
401
+ "receivedBytes",
402
+ "sentCount",
403
+ "sentBytes",
404
+ "deletedCount"
405
+ ],
406
+ "properties": {
407
+ "receivedCount": {
408
+ "type": "integer",
409
+ "minimum": 0
410
+ },
411
+ "receivedBytes": {
412
+ "type": "integer",
413
+ "minimum": 0
414
+ },
415
+ "sentCount": {
416
+ "type": "integer",
417
+ "minimum": 0
418
+ },
419
+ "sentBytes": {
420
+ "type": "integer",
421
+ "minimum": 0
422
+ },
423
+ "deletedCount": {
424
+ "type": "integer",
425
+ "minimum": 0
426
+ },
427
+ "deletedBytes": {
428
+ "type": "integer",
429
+ "minimum": 0
430
+ },
431
+ "websocketOpened": {
432
+ "type": "integer",
433
+ "minimum": 0
434
+ },
435
+ "websocketClosed": {
436
+ "type": "integer",
437
+ "minimum": 0
438
+ },
439
+ "sessionsCreated": {
440
+ "type": "integer",
441
+ "minimum": 0
442
+ },
443
+ "sessionsAuthenticated": {
444
+ "type": "integer",
445
+ "minimum": 0
446
+ },
447
+ "invitationsCreated": {
448
+ "type": "integer",
449
+ "minimum": 0
450
+ },
451
+ "invitationsClaimed": {
452
+ "type": "integer",
453
+ "minimum": 0
454
+ }
455
+ }
456
+ },
457
+ "forwarding": {
458
+ "type": "object",
459
+ "additionalProperties": false,
460
+ "required": [
461
+ "queueLength"
462
+ ],
463
+ "properties": {
464
+ "queueLength": {
465
+ "type": "integer",
466
+ "minimum": 0,
467
+ "description": "Messages waiting to be forwarded to other mediators."
468
+ },
469
+ "queueLimit": {
470
+ "type": "integer",
471
+ "minimum": 0
472
+ },
473
+ "circuitBreaker": {
474
+ "type": "string",
475
+ "enum": [
476
+ "closed",
477
+ "open",
478
+ "halfOpen"
479
+ ],
480
+ "description": "State of the store circuit breaker. `open` means the mediator is shedding store operations."
481
+ }
482
+ }
483
+ },
484
+ "queues": {
485
+ "type": "object",
486
+ "additionalProperties": false,
487
+ "description": "Aggregate of the mediator's most recent queue survey. Absent when no survey has completed.",
488
+ "required": [
489
+ "surveyedAt",
490
+ "accounts"
491
+ ],
492
+ "properties": {
493
+ "surveyedAt": {
494
+ "type": "string",
495
+ "format": "date-time"
496
+ },
497
+ "accounts": {
498
+ "type": "integer",
499
+ "minimum": 0,
500
+ "description": "Accounts the survey covered."
501
+ },
502
+ "truncated": {
503
+ "type": "boolean",
504
+ "description": "The survey stopped before covering every account."
505
+ },
506
+ "receive": {
507
+ "$ref": "#/$defs/QueueDepth",
508
+ "description": "Totals across every surveyed receive queue; `saturation` is the maximum of any single queue."
509
+ },
510
+ "send": {
511
+ "$ref": "#/$defs/QueueDepth",
512
+ "description": "Totals across every surveyed send queue; `saturation` is the maximum of any single queue."
513
+ }
514
+ }
515
+ },
516
+ "ext": {
517
+ "$ref": "#/$defs/Ext",
518
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
519
+ }
520
+ },
521
+ "required": [
522
+ "version",
523
+ "uptimeSeconds",
524
+ "connections",
525
+ "totals",
526
+ "forwarding"
527
+ ]
528
+ },
529
+ "Ext": {
530
+ "title": "Ext",
531
+ "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.",
532
+ "type": "object",
533
+ "minProperties": 1,
534
+ "additionalProperties": true,
535
+ "propertyNames": {
536
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
537
+ }
538
+ },
539
+ "QueueDepth": {
540
+ "title": "QueueDepth",
541
+ "type": "object",
542
+ "additionalProperties": false,
543
+ "required": [
544
+ "count",
545
+ "bytes"
546
+ ],
547
+ "description": "The depth of one queue and its effective limit.",
548
+ "properties": {
549
+ "count": {
550
+ "type": "integer",
551
+ "minimum": 0,
552
+ "description": "Messages currently in the queue."
553
+ },
554
+ "bytes": {
555
+ "type": "integer",
556
+ "minimum": 0,
557
+ "description": "Total stored size of those messages, in bytes."
558
+ },
559
+ "limit": {
560
+ "type": "integer",
561
+ "minimum": -1,
562
+ "description": "The effective message-count limit for this queue after account overrides and mediator defaults are applied; -1 = unlimited."
563
+ },
564
+ "saturation": {
565
+ "type": "number",
566
+ "minimum": 0,
567
+ "description": "count ÷ limit. Absent when the limit is unlimited. May exceed 1 when a limit was lowered below the current depth."
568
+ },
569
+ "oldestAgeSeconds": {
570
+ "type": "integer",
571
+ "minimum": 0,
572
+ "description": "Age of the oldest message in the queue, in seconds. Absent when the queue is empty or the mediator did not measure it."
573
+ },
574
+ "deliveredUnacked": {
575
+ "type": "integer",
576
+ "minimum": 0,
577
+ "description": "Messages in the queue whose state is `delivered` — handed out but not yet deleted by the recipient. Absent when the mediator did not measure it."
578
+ }
579
+ }
580
+ }
581
+ }
582
+ } as const;
583
+
584
+ /**
585
+ * SPEC.md §7.2 policy for the request variant, from this specification's
586
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
587
+ * per-specification and cannot be derived from the document alone, and
588
+ * item 2 needs the schema this carries.
589
+ */
590
+ export const SPEC = {
591
+ typeUri: TYPE_URI,
592
+ isBearer: false,
593
+ isProofRequired: true,
594
+ isRecipientRequired: true,
595
+ isIssuedAtRequired: true,
596
+ payloadSchema: PAYLOAD_SCHEMA,
597
+ } as const;
598
+
599
+ /**
600
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
601
+ * tracks the *issuer* party's requirement because a response swaps the
602
+ * parties (§7.3 item 5).
603
+ */
604
+ export const RESPONSE_SPEC = {
605
+ typeUri: RESPONSE_TYPE_URI,
606
+ isBearer: false,
607
+ isProofRequired: false,
608
+ isRecipientRequired: true,
609
+ isIssuedAtRequired: true,
610
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
611
+ } as const;
@@ -218,6 +218,31 @@ export const PAYLOAD_SCHEMA = {
218
218
  "extensions": {
219
219
  "type": "object",
220
220
  "description": "Opaque community-defined extension bag."
221
+ },
222
+ "attributes": {
223
+ "type": "array",
224
+ "maxItems": 32,
225
+ "description": "What the applicant told the community about themselves in answer to the manifest's `requestedAttributes` — self-asserted, and to be shown as such to whoever reviews the request. Absent when none were asked for or given.",
226
+ "items": {
227
+ "type": "object",
228
+ "additionalProperties": false,
229
+ "required": [
230
+ "type",
231
+ "value"
232
+ ],
233
+ "properties": {
234
+ "type": {
235
+ "type": "string",
236
+ "minLength": 1,
237
+ "maxLength": 128,
238
+ "pattern": "^(x:)?[a-z][A-Za-z0-9]*(\\.[a-z][A-Za-z0-9]*)*$",
239
+ "description": "A claim-type token from the persona claim-type registry (persona/_shared/0.1/CLAIM-TYPES.md) — `name.display`, `address.country` — or an `x:` extension token."
240
+ },
241
+ "value": {
242
+ "description": "The value the applicant gives. Self-asserted: the applicant's own statement, bound to them by the document proof, and attested by nobody."
243
+ }
244
+ }
245
+ }
221
246
  }
222
247
  }
223
248
  }
@@ -362,6 +387,31 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
362
387
  "extensions": {
363
388
  "type": "object",
364
389
  "description": "Opaque community-defined extension bag."
390
+ },
391
+ "attributes": {
392
+ "type": "array",
393
+ "maxItems": 32,
394
+ "description": "What the applicant told the community about themselves in answer to the manifest's `requestedAttributes` — self-asserted, and to be shown as such to whoever reviews the request. Absent when none were asked for or given.",
395
+ "items": {
396
+ "type": "object",
397
+ "additionalProperties": false,
398
+ "required": [
399
+ "type",
400
+ "value"
401
+ ],
402
+ "properties": {
403
+ "type": {
404
+ "type": "string",
405
+ "minLength": 1,
406
+ "maxLength": 128,
407
+ "pattern": "^(x:)?[a-z][A-Za-z0-9]*(\\.[a-z][A-Za-z0-9]*)*$",
408
+ "description": "A claim-type token from the persona claim-type registry (persona/_shared/0.1/CLAIM-TYPES.md) — `name.display`, `address.country` — or an `x:` extension token."
409
+ },
410
+ "value": {
411
+ "description": "The value the applicant gives. Self-asserted: the applicant's own statement, bound to them by the document proof, and attested by nobody."
412
+ }
413
+ }
414
+ }
365
415
  }
366
416
  }
367
417
  }