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