@openvtc/trust-tasks 0.19.15 → 0.19.17

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 (65) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/_shared/components.d.ts +314 -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/package.json +1 -1
  53. package/src/_shared/components.ts +342 -0
  54. package/src/index.ts +11 -0
  55. package/src/messaging/_shared/0.1/mediator-ops.ts +17 -0
  56. package/src/messaging/message/delete/0.1/payload.ts +259 -0
  57. package/src/messaging/message/get/0.1/payload.ts +375 -0
  58. package/src/messaging/message/list/0.1/payload.ts +410 -0
  59. package/src/messaging/monitor/event/0.1/payload.ts +267 -0
  60. package/src/messaging/monitor/subscribe/0.1/payload.ts +473 -0
  61. package/src/messaging/monitor/unsubscribe/0.1/payload.ts +172 -0
  62. package/src/messaging/queue/list/0.1/payload.ts +443 -0
  63. package/src/messaging/queue/purge/0.1/payload.ts +270 -0
  64. package/src/messaging/queue/status/0.1/payload.ts +439 -0
  65. package/src/messaging/stats/show/0.1/payload.ts +611 -0
@@ -0,0 +1,697 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/messaging/queue/status/0.1/payload.schema.json
4
+ */
5
+ import type { AccountType, Ext, PeerDepth, QueueDepth, QueueSummary, Vid } from "../../../../_shared/components.js";
6
+ export interface MessagingShowQueueStatusPayload {
7
+ /**
8
+ * The account whose queues to report. Omitted = the requester's own account. A requester without administrative standing may name only itself.
9
+ */
10
+ did?: Vid;
11
+ /**
12
+ * Also return the top N counterparties of each queue by message count. Omitted = no per-peer breakdown.
13
+ */
14
+ includePeers?: number;
15
+ /**
16
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
17
+ */
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * The success response to a messaging/queue/status request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/queue/status/0.1#response.
22
+ */
23
+ export interface MessagingShowQueueStatusResponsePayload {
24
+ queues: QueueSummary;
25
+ /**
26
+ * Top senders into the receive queue. Present only when includePeers was requested.
27
+ */
28
+ receivePeers?: PeerDepth[];
29
+ /**
30
+ * Top recipients holding the send queue. Present only when includePeers was requested.
31
+ */
32
+ sendPeers?: PeerDepth[];
33
+ /**
34
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
35
+ */
36
+ ext?: Ext;
37
+ }
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { AccountType, Ext, PeerDepth, QueueDepth, QueueSummary, Vid };
40
+ /** Trust Task type URI. */
41
+ export declare const TYPE_URI: "https://trusttasks.org/spec/messaging/queue/status/0.1";
42
+ /** Stable alias for this specification's request payload shape. */
43
+ export type Payload = MessagingShowQueueStatusPayload;
44
+ /** Trust Task response type URI (request type URI + "#response"). */
45
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/messaging/queue/status/0.1#response";
46
+ /** Stable alias for this specification's success-response payload shape. */
47
+ export type Response = MessagingShowQueueStatusResponsePayload;
48
+ /**
49
+ * This specification's payload schema, as a value.
50
+ *
51
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
52
+ * rather than only as a `.json` file because TypeScript types are erased
53
+ * at runtime: without a schema a consumer has nothing to validate, and
54
+ * every REQUIRED payload member is optional in practice. Cross-file
55
+ * `$ref`s are already inlined, so it needs no resolver.
56
+ */
57
+ export declare const PAYLOAD_SCHEMA: {
58
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
59
+ readonly $id: "https://trusttasks.org/spec/messaging/queue/status/0.1";
60
+ readonly title: "Messaging — Show Queue Status — payload";
61
+ readonly type: "object";
62
+ readonly additionalProperties: false;
63
+ readonly properties: {
64
+ readonly did: {
65
+ readonly $ref: "#/$defs/Vid";
66
+ readonly description: "The account whose queues to report. Omitted = the requester's own account. A requester without administrative standing may name only itself.";
67
+ };
68
+ readonly includePeers: {
69
+ readonly type: "integer";
70
+ readonly minimum: 1;
71
+ readonly maximum: 100;
72
+ readonly description: "Also return the top N counterparties of each queue by message count. Omitted = no per-peer breakdown.";
73
+ };
74
+ readonly ext: {
75
+ readonly $ref: "#/$defs/Ext";
76
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
77
+ };
78
+ };
79
+ readonly $defs: {
80
+ readonly Response: {
81
+ readonly $anchor: "response";
82
+ readonly title: "Messaging — Show Queue Status — response payload";
83
+ readonly description: "The success response to a messaging/queue/status request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/queue/status/0.1#response.";
84
+ readonly type: "object";
85
+ readonly additionalProperties: false;
86
+ readonly properties: {
87
+ readonly queues: {
88
+ readonly $ref: "#/$defs/QueueSummary";
89
+ };
90
+ readonly receivePeers: {
91
+ readonly type: "array";
92
+ readonly items: {
93
+ readonly $ref: "#/$defs/PeerDepth";
94
+ };
95
+ readonly description: "Top senders into the receive queue. Present only when includePeers was requested.";
96
+ };
97
+ readonly sendPeers: {
98
+ readonly type: "array";
99
+ readonly items: {
100
+ readonly $ref: "#/$defs/PeerDepth";
101
+ };
102
+ readonly description: "Top recipients holding the send queue. Present only when includePeers was requested.";
103
+ };
104
+ readonly ext: {
105
+ readonly $ref: "#/$defs/Ext";
106
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
107
+ };
108
+ };
109
+ readonly required: readonly ["queues"];
110
+ };
111
+ readonly Ext: {
112
+ readonly title: "Ext";
113
+ 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.";
114
+ readonly type: "object";
115
+ readonly minProperties: 1;
116
+ readonly additionalProperties: true;
117
+ readonly propertyNames: {
118
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
119
+ };
120
+ };
121
+ readonly PeerDepth: {
122
+ readonly title: "PeerDepth";
123
+ readonly type: "object";
124
+ readonly additionalProperties: false;
125
+ readonly required: readonly ["peer", "count", "bytes"];
126
+ readonly description: "The share of one queue attributable to one counterparty: in a send queue, the recipient; in a receive queue, the sender.";
127
+ readonly properties: {
128
+ readonly peer: {
129
+ readonly $ref: "#/$defs/Vid";
130
+ readonly description: "The counterparty's identifier, in the same form the mediator uses for accounts.";
131
+ };
132
+ readonly count: {
133
+ readonly type: "integer";
134
+ readonly minimum: 0;
135
+ };
136
+ readonly bytes: {
137
+ readonly type: "integer";
138
+ readonly minimum: 0;
139
+ };
140
+ readonly oldestAgeSeconds: {
141
+ readonly type: "integer";
142
+ readonly minimum: 0;
143
+ };
144
+ };
145
+ };
146
+ readonly Vid: {
147
+ readonly title: "Vid";
148
+ readonly type: "string";
149
+ readonly minLength: 1;
150
+ readonly 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.";
151
+ };
152
+ readonly QueueSummary: {
153
+ readonly title: "QueueSummary";
154
+ readonly type: "object";
155
+ readonly additionalProperties: false;
156
+ readonly required: readonly ["did", "receive", "send"];
157
+ readonly description: "Both queues of one account.";
158
+ readonly properties: {
159
+ readonly did: {
160
+ readonly $ref: "#/$defs/Vid";
161
+ };
162
+ readonly accountType: {
163
+ readonly $ref: "#/$defs/AccountType";
164
+ };
165
+ readonly receive: {
166
+ readonly $ref: "#/$defs/QueueDepth";
167
+ };
168
+ readonly send: {
169
+ readonly $ref: "#/$defs/QueueDepth";
170
+ };
171
+ };
172
+ };
173
+ readonly QueueDepth: {
174
+ readonly title: "QueueDepth";
175
+ readonly type: "object";
176
+ readonly additionalProperties: false;
177
+ readonly required: readonly ["count", "bytes"];
178
+ readonly description: "The depth of one queue and its effective limit.";
179
+ readonly properties: {
180
+ readonly count: {
181
+ readonly type: "integer";
182
+ readonly minimum: 0;
183
+ readonly description: "Messages currently in the queue.";
184
+ };
185
+ readonly bytes: {
186
+ readonly type: "integer";
187
+ readonly minimum: 0;
188
+ readonly description: "Total stored size of those messages, in bytes.";
189
+ };
190
+ readonly limit: {
191
+ readonly type: "integer";
192
+ readonly minimum: -1;
193
+ readonly description: "The effective message-count limit for this queue after account overrides and mediator defaults are applied; -1 = unlimited.";
194
+ };
195
+ readonly saturation: {
196
+ readonly type: "number";
197
+ readonly minimum: 0;
198
+ readonly description: "count ÷ limit. Absent when the limit is unlimited. May exceed 1 when a limit was lowered below the current depth.";
199
+ };
200
+ readonly oldestAgeSeconds: {
201
+ readonly type: "integer";
202
+ readonly minimum: 0;
203
+ readonly description: "Age of the oldest message in the queue, in seconds. Absent when the queue is empty or the mediator did not measure it.";
204
+ };
205
+ readonly deliveredUnacked: {
206
+ readonly type: "integer";
207
+ readonly minimum: 0;
208
+ readonly 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.";
209
+ };
210
+ };
211
+ };
212
+ readonly AccountType: {
213
+ readonly title: "AccountType";
214
+ readonly type: "string";
215
+ readonly enum: readonly ["standard", "admin", "rootAdmin", "mediator"];
216
+ readonly description: "The account's role at the mediator. `standard` is an ordinary served account; `admin`/`rootAdmin` may administer other accounts; `mediator` is the mediator's own account. Only a rootAdmin may assign or modify the rootAdmin role.";
217
+ };
218
+ };
219
+ };
220
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
221
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
222
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
223
+ readonly $ref: "#/$defs/Response";
224
+ readonly $defs: {
225
+ readonly Response: {
226
+ readonly $anchor: "response";
227
+ readonly title: "Messaging — Show Queue Status — response payload";
228
+ readonly description: "The success response to a messaging/queue/status request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/queue/status/0.1#response.";
229
+ readonly type: "object";
230
+ readonly additionalProperties: false;
231
+ readonly properties: {
232
+ readonly queues: {
233
+ readonly $ref: "#/$defs/QueueSummary";
234
+ };
235
+ readonly receivePeers: {
236
+ readonly type: "array";
237
+ readonly items: {
238
+ readonly $ref: "#/$defs/PeerDepth";
239
+ };
240
+ readonly description: "Top senders into the receive queue. Present only when includePeers was requested.";
241
+ };
242
+ readonly sendPeers: {
243
+ readonly type: "array";
244
+ readonly items: {
245
+ readonly $ref: "#/$defs/PeerDepth";
246
+ };
247
+ readonly description: "Top recipients holding the send queue. Present only when includePeers was requested.";
248
+ };
249
+ readonly ext: {
250
+ readonly $ref: "#/$defs/Ext";
251
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
252
+ };
253
+ };
254
+ readonly required: readonly ["queues"];
255
+ };
256
+ readonly Ext: {
257
+ readonly title: "Ext";
258
+ 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.";
259
+ readonly type: "object";
260
+ readonly minProperties: 1;
261
+ readonly additionalProperties: true;
262
+ readonly propertyNames: {
263
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
264
+ };
265
+ };
266
+ readonly PeerDepth: {
267
+ readonly title: "PeerDepth";
268
+ readonly type: "object";
269
+ readonly additionalProperties: false;
270
+ readonly required: readonly ["peer", "count", "bytes"];
271
+ readonly description: "The share of one queue attributable to one counterparty: in a send queue, the recipient; in a receive queue, the sender.";
272
+ readonly properties: {
273
+ readonly peer: {
274
+ readonly $ref: "#/$defs/Vid";
275
+ readonly description: "The counterparty's identifier, in the same form the mediator uses for accounts.";
276
+ };
277
+ readonly count: {
278
+ readonly type: "integer";
279
+ readonly minimum: 0;
280
+ };
281
+ readonly bytes: {
282
+ readonly type: "integer";
283
+ readonly minimum: 0;
284
+ };
285
+ readonly oldestAgeSeconds: {
286
+ readonly type: "integer";
287
+ readonly minimum: 0;
288
+ };
289
+ };
290
+ };
291
+ readonly Vid: {
292
+ readonly title: "Vid";
293
+ readonly type: "string";
294
+ readonly minLength: 1;
295
+ readonly 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.";
296
+ };
297
+ readonly QueueSummary: {
298
+ readonly title: "QueueSummary";
299
+ readonly type: "object";
300
+ readonly additionalProperties: false;
301
+ readonly required: readonly ["did", "receive", "send"];
302
+ readonly description: "Both queues of one account.";
303
+ readonly properties: {
304
+ readonly did: {
305
+ readonly $ref: "#/$defs/Vid";
306
+ };
307
+ readonly accountType: {
308
+ readonly $ref: "#/$defs/AccountType";
309
+ };
310
+ readonly receive: {
311
+ readonly $ref: "#/$defs/QueueDepth";
312
+ };
313
+ readonly send: {
314
+ readonly $ref: "#/$defs/QueueDepth";
315
+ };
316
+ };
317
+ };
318
+ readonly QueueDepth: {
319
+ readonly title: "QueueDepth";
320
+ readonly type: "object";
321
+ readonly additionalProperties: false;
322
+ readonly required: readonly ["count", "bytes"];
323
+ readonly description: "The depth of one queue and its effective limit.";
324
+ readonly properties: {
325
+ readonly count: {
326
+ readonly type: "integer";
327
+ readonly minimum: 0;
328
+ readonly description: "Messages currently in the queue.";
329
+ };
330
+ readonly bytes: {
331
+ readonly type: "integer";
332
+ readonly minimum: 0;
333
+ readonly description: "Total stored size of those messages, in bytes.";
334
+ };
335
+ readonly limit: {
336
+ readonly type: "integer";
337
+ readonly minimum: -1;
338
+ readonly description: "The effective message-count limit for this queue after account overrides and mediator defaults are applied; -1 = unlimited.";
339
+ };
340
+ readonly saturation: {
341
+ readonly type: "number";
342
+ readonly minimum: 0;
343
+ readonly description: "count ÷ limit. Absent when the limit is unlimited. May exceed 1 when a limit was lowered below the current depth.";
344
+ };
345
+ readonly oldestAgeSeconds: {
346
+ readonly type: "integer";
347
+ readonly minimum: 0;
348
+ readonly description: "Age of the oldest message in the queue, in seconds. Absent when the queue is empty or the mediator did not measure it.";
349
+ };
350
+ readonly deliveredUnacked: {
351
+ readonly type: "integer";
352
+ readonly minimum: 0;
353
+ readonly 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.";
354
+ };
355
+ };
356
+ };
357
+ readonly AccountType: {
358
+ readonly title: "AccountType";
359
+ readonly type: "string";
360
+ readonly enum: readonly ["standard", "admin", "rootAdmin", "mediator"];
361
+ readonly description: "The account's role at the mediator. `standard` is an ordinary served account; `admin`/`rootAdmin` may administer other accounts; `mediator` is the mediator's own account. Only a rootAdmin may assign or modify the rootAdmin role.";
362
+ };
363
+ };
364
+ };
365
+ /**
366
+ * SPEC.md §7.2 policy for the request variant, from this specification's
367
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
368
+ * per-specification and cannot be derived from the document alone, and
369
+ * item 2 needs the schema this carries.
370
+ */
371
+ export declare const SPEC: {
372
+ readonly typeUri: "https://trusttasks.org/spec/messaging/queue/status/0.1";
373
+ readonly isBearer: false;
374
+ readonly isProofRequired: true;
375
+ readonly isRecipientRequired: true;
376
+ readonly isIssuedAtRequired: true;
377
+ readonly payloadSchema: {
378
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
379
+ readonly $id: "https://trusttasks.org/spec/messaging/queue/status/0.1";
380
+ readonly title: "Messaging — Show Queue Status — payload";
381
+ readonly type: "object";
382
+ readonly additionalProperties: false;
383
+ readonly properties: {
384
+ readonly did: {
385
+ readonly $ref: "#/$defs/Vid";
386
+ readonly description: "The account whose queues to report. Omitted = the requester's own account. A requester without administrative standing may name only itself.";
387
+ };
388
+ readonly includePeers: {
389
+ readonly type: "integer";
390
+ readonly minimum: 1;
391
+ readonly maximum: 100;
392
+ readonly description: "Also return the top N counterparties of each queue by message count. Omitted = no per-peer breakdown.";
393
+ };
394
+ readonly ext: {
395
+ readonly $ref: "#/$defs/Ext";
396
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
397
+ };
398
+ };
399
+ readonly $defs: {
400
+ readonly Response: {
401
+ readonly $anchor: "response";
402
+ readonly title: "Messaging — Show Queue Status — response payload";
403
+ readonly description: "The success response to a messaging/queue/status request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/queue/status/0.1#response.";
404
+ readonly type: "object";
405
+ readonly additionalProperties: false;
406
+ readonly properties: {
407
+ readonly queues: {
408
+ readonly $ref: "#/$defs/QueueSummary";
409
+ };
410
+ readonly receivePeers: {
411
+ readonly type: "array";
412
+ readonly items: {
413
+ readonly $ref: "#/$defs/PeerDepth";
414
+ };
415
+ readonly description: "Top senders into the receive queue. Present only when includePeers was requested.";
416
+ };
417
+ readonly sendPeers: {
418
+ readonly type: "array";
419
+ readonly items: {
420
+ readonly $ref: "#/$defs/PeerDepth";
421
+ };
422
+ readonly description: "Top recipients holding the send queue. Present only when includePeers was requested.";
423
+ };
424
+ readonly ext: {
425
+ readonly $ref: "#/$defs/Ext";
426
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
427
+ };
428
+ };
429
+ readonly required: readonly ["queues"];
430
+ };
431
+ readonly Ext: {
432
+ readonly title: "Ext";
433
+ 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.";
434
+ readonly type: "object";
435
+ readonly minProperties: 1;
436
+ readonly additionalProperties: true;
437
+ readonly propertyNames: {
438
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
439
+ };
440
+ };
441
+ readonly PeerDepth: {
442
+ readonly title: "PeerDepth";
443
+ readonly type: "object";
444
+ readonly additionalProperties: false;
445
+ readonly required: readonly ["peer", "count", "bytes"];
446
+ readonly description: "The share of one queue attributable to one counterparty: in a send queue, the recipient; in a receive queue, the sender.";
447
+ readonly properties: {
448
+ readonly peer: {
449
+ readonly $ref: "#/$defs/Vid";
450
+ readonly description: "The counterparty's identifier, in the same form the mediator uses for accounts.";
451
+ };
452
+ readonly count: {
453
+ readonly type: "integer";
454
+ readonly minimum: 0;
455
+ };
456
+ readonly bytes: {
457
+ readonly type: "integer";
458
+ readonly minimum: 0;
459
+ };
460
+ readonly oldestAgeSeconds: {
461
+ readonly type: "integer";
462
+ readonly minimum: 0;
463
+ };
464
+ };
465
+ };
466
+ readonly Vid: {
467
+ readonly title: "Vid";
468
+ readonly type: "string";
469
+ readonly minLength: 1;
470
+ readonly 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.";
471
+ };
472
+ readonly QueueSummary: {
473
+ readonly title: "QueueSummary";
474
+ readonly type: "object";
475
+ readonly additionalProperties: false;
476
+ readonly required: readonly ["did", "receive", "send"];
477
+ readonly description: "Both queues of one account.";
478
+ readonly properties: {
479
+ readonly did: {
480
+ readonly $ref: "#/$defs/Vid";
481
+ };
482
+ readonly accountType: {
483
+ readonly $ref: "#/$defs/AccountType";
484
+ };
485
+ readonly receive: {
486
+ readonly $ref: "#/$defs/QueueDepth";
487
+ };
488
+ readonly send: {
489
+ readonly $ref: "#/$defs/QueueDepth";
490
+ };
491
+ };
492
+ };
493
+ readonly QueueDepth: {
494
+ readonly title: "QueueDepth";
495
+ readonly type: "object";
496
+ readonly additionalProperties: false;
497
+ readonly required: readonly ["count", "bytes"];
498
+ readonly description: "The depth of one queue and its effective limit.";
499
+ readonly properties: {
500
+ readonly count: {
501
+ readonly type: "integer";
502
+ readonly minimum: 0;
503
+ readonly description: "Messages currently in the queue.";
504
+ };
505
+ readonly bytes: {
506
+ readonly type: "integer";
507
+ readonly minimum: 0;
508
+ readonly description: "Total stored size of those messages, in bytes.";
509
+ };
510
+ readonly limit: {
511
+ readonly type: "integer";
512
+ readonly minimum: -1;
513
+ readonly description: "The effective message-count limit for this queue after account overrides and mediator defaults are applied; -1 = unlimited.";
514
+ };
515
+ readonly saturation: {
516
+ readonly type: "number";
517
+ readonly minimum: 0;
518
+ readonly description: "count ÷ limit. Absent when the limit is unlimited. May exceed 1 when a limit was lowered below the current depth.";
519
+ };
520
+ readonly oldestAgeSeconds: {
521
+ readonly type: "integer";
522
+ readonly minimum: 0;
523
+ readonly description: "Age of the oldest message in the queue, in seconds. Absent when the queue is empty or the mediator did not measure it.";
524
+ };
525
+ readonly deliveredUnacked: {
526
+ readonly type: "integer";
527
+ readonly minimum: 0;
528
+ readonly 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.";
529
+ };
530
+ };
531
+ };
532
+ readonly AccountType: {
533
+ readonly title: "AccountType";
534
+ readonly type: "string";
535
+ readonly enum: readonly ["standard", "admin", "rootAdmin", "mediator"];
536
+ readonly description: "The account's role at the mediator. `standard` is an ordinary served account; `admin`/`rootAdmin` may administer other accounts; `mediator` is the mediator's own account. Only a rootAdmin may assign or modify the rootAdmin role.";
537
+ };
538
+ };
539
+ };
540
+ };
541
+ /**
542
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
543
+ * tracks the *issuer* party's requirement because a response swaps the
544
+ * parties (§7.3 item 5).
545
+ */
546
+ export declare const RESPONSE_SPEC: {
547
+ readonly typeUri: "https://trusttasks.org/spec/messaging/queue/status/0.1#response";
548
+ readonly isBearer: false;
549
+ readonly isProofRequired: false;
550
+ readonly isRecipientRequired: true;
551
+ readonly isIssuedAtRequired: true;
552
+ readonly payloadSchema: {
553
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
554
+ readonly $ref: "#/$defs/Response";
555
+ readonly $defs: {
556
+ readonly Response: {
557
+ readonly $anchor: "response";
558
+ readonly title: "Messaging — Show Queue Status — response payload";
559
+ readonly description: "The success response to a messaging/queue/status request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/queue/status/0.1#response.";
560
+ readonly type: "object";
561
+ readonly additionalProperties: false;
562
+ readonly properties: {
563
+ readonly queues: {
564
+ readonly $ref: "#/$defs/QueueSummary";
565
+ };
566
+ readonly receivePeers: {
567
+ readonly type: "array";
568
+ readonly items: {
569
+ readonly $ref: "#/$defs/PeerDepth";
570
+ };
571
+ readonly description: "Top senders into the receive queue. Present only when includePeers was requested.";
572
+ };
573
+ readonly sendPeers: {
574
+ readonly type: "array";
575
+ readonly items: {
576
+ readonly $ref: "#/$defs/PeerDepth";
577
+ };
578
+ readonly description: "Top recipients holding the send queue. Present only when includePeers was requested.";
579
+ };
580
+ readonly ext: {
581
+ readonly $ref: "#/$defs/Ext";
582
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
583
+ };
584
+ };
585
+ readonly required: readonly ["queues"];
586
+ };
587
+ readonly Ext: {
588
+ readonly title: "Ext";
589
+ 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.";
590
+ readonly type: "object";
591
+ readonly minProperties: 1;
592
+ readonly additionalProperties: true;
593
+ readonly propertyNames: {
594
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
595
+ };
596
+ };
597
+ readonly PeerDepth: {
598
+ readonly title: "PeerDepth";
599
+ readonly type: "object";
600
+ readonly additionalProperties: false;
601
+ readonly required: readonly ["peer", "count", "bytes"];
602
+ readonly description: "The share of one queue attributable to one counterparty: in a send queue, the recipient; in a receive queue, the sender.";
603
+ readonly properties: {
604
+ readonly peer: {
605
+ readonly $ref: "#/$defs/Vid";
606
+ readonly description: "The counterparty's identifier, in the same form the mediator uses for accounts.";
607
+ };
608
+ readonly count: {
609
+ readonly type: "integer";
610
+ readonly minimum: 0;
611
+ };
612
+ readonly bytes: {
613
+ readonly type: "integer";
614
+ readonly minimum: 0;
615
+ };
616
+ readonly oldestAgeSeconds: {
617
+ readonly type: "integer";
618
+ readonly minimum: 0;
619
+ };
620
+ };
621
+ };
622
+ readonly Vid: {
623
+ readonly title: "Vid";
624
+ readonly type: "string";
625
+ readonly minLength: 1;
626
+ readonly 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.";
627
+ };
628
+ readonly QueueSummary: {
629
+ readonly title: "QueueSummary";
630
+ readonly type: "object";
631
+ readonly additionalProperties: false;
632
+ readonly required: readonly ["did", "receive", "send"];
633
+ readonly description: "Both queues of one account.";
634
+ readonly properties: {
635
+ readonly did: {
636
+ readonly $ref: "#/$defs/Vid";
637
+ };
638
+ readonly accountType: {
639
+ readonly $ref: "#/$defs/AccountType";
640
+ };
641
+ readonly receive: {
642
+ readonly $ref: "#/$defs/QueueDepth";
643
+ };
644
+ readonly send: {
645
+ readonly $ref: "#/$defs/QueueDepth";
646
+ };
647
+ };
648
+ };
649
+ readonly QueueDepth: {
650
+ readonly title: "QueueDepth";
651
+ readonly type: "object";
652
+ readonly additionalProperties: false;
653
+ readonly required: readonly ["count", "bytes"];
654
+ readonly description: "The depth of one queue and its effective limit.";
655
+ readonly properties: {
656
+ readonly count: {
657
+ readonly type: "integer";
658
+ readonly minimum: 0;
659
+ readonly description: "Messages currently in the queue.";
660
+ };
661
+ readonly bytes: {
662
+ readonly type: "integer";
663
+ readonly minimum: 0;
664
+ readonly description: "Total stored size of those messages, in bytes.";
665
+ };
666
+ readonly limit: {
667
+ readonly type: "integer";
668
+ readonly minimum: -1;
669
+ readonly description: "The effective message-count limit for this queue after account overrides and mediator defaults are applied; -1 = unlimited.";
670
+ };
671
+ readonly saturation: {
672
+ readonly type: "number";
673
+ readonly minimum: 0;
674
+ readonly description: "count ÷ limit. Absent when the limit is unlimited. May exceed 1 when a limit was lowered below the current depth.";
675
+ };
676
+ readonly oldestAgeSeconds: {
677
+ readonly type: "integer";
678
+ readonly minimum: 0;
679
+ readonly description: "Age of the oldest message in the queue, in seconds. Absent when the queue is empty or the mediator did not measure it.";
680
+ };
681
+ readonly deliveredUnacked: {
682
+ readonly type: "integer";
683
+ readonly minimum: 0;
684
+ readonly 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.";
685
+ };
686
+ };
687
+ };
688
+ readonly AccountType: {
689
+ readonly title: "AccountType";
690
+ readonly type: "string";
691
+ readonly enum: readonly ["standard", "admin", "rootAdmin", "mediator"];
692
+ readonly description: "The account's role at the mediator. `standard` is an ordinary served account; `admin`/`rootAdmin` may administer other accounts; `mediator` is the mediator's own account. Only a rootAdmin may assign or modify the rootAdmin role.";
693
+ };
694
+ };
695
+ };
696
+ };
697
+ //# sourceMappingURL=payload.d.ts.map