@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,439 @@
|
|
|
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
|
+
|
|
6
|
+
import type { AccountType, Ext, PeerDepth, QueueDepth, QueueSummary, Vid } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface MessagingShowQueueStatusPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The account whose queues to report. Omitted = the requester's own account. A requester without administrative standing may name only itself.
|
|
12
|
+
*/
|
|
13
|
+
did?: Vid;
|
|
14
|
+
/**
|
|
15
|
+
* Also return the top N counterparties of each queue by message count. Omitted = no per-peer breakdown.
|
|
16
|
+
*/
|
|
17
|
+
includePeers?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
20
|
+
*/
|
|
21
|
+
ext?: Ext;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 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.
|
|
25
|
+
*/
|
|
26
|
+
export interface MessagingShowQueueStatusResponsePayload {
|
|
27
|
+
queues: QueueSummary;
|
|
28
|
+
/**
|
|
29
|
+
* Top senders into the receive queue. Present only when includePeers was requested.
|
|
30
|
+
*/
|
|
31
|
+
receivePeers?: PeerDepth[];
|
|
32
|
+
/**
|
|
33
|
+
* Top recipients holding the send queue. Present only when includePeers was requested.
|
|
34
|
+
*/
|
|
35
|
+
sendPeers?: PeerDepth[];
|
|
36
|
+
/**
|
|
37
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
38
|
+
*/
|
|
39
|
+
ext?: Ext;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
43
|
+
export type { AccountType, Ext, PeerDepth, QueueDepth, QueueSummary, Vid };
|
|
44
|
+
|
|
45
|
+
/** Trust Task type URI. */
|
|
46
|
+
export const TYPE_URI = "https://trusttasks.org/spec/messaging/queue/status/0.1" as const;
|
|
47
|
+
|
|
48
|
+
/** Stable alias for this specification's request payload shape. */
|
|
49
|
+
export type Payload = MessagingShowQueueStatusPayload;
|
|
50
|
+
|
|
51
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
52
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/queue/status/0.1#response" as const;
|
|
53
|
+
|
|
54
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
55
|
+
export type Response = MessagingShowQueueStatusResponsePayload;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* This specification's payload schema, as a value.
|
|
59
|
+
*
|
|
60
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
61
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
62
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
63
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
64
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
65
|
+
*/
|
|
66
|
+
export const PAYLOAD_SCHEMA = {
|
|
67
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
68
|
+
"$id": "https://trusttasks.org/spec/messaging/queue/status/0.1",
|
|
69
|
+
"title": "Messaging — Show Queue Status — payload",
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"properties": {
|
|
73
|
+
"did": {
|
|
74
|
+
"$ref": "#/$defs/Vid",
|
|
75
|
+
"description": "The account whose queues to report. Omitted = the requester's own account. A requester without administrative standing may name only itself."
|
|
76
|
+
},
|
|
77
|
+
"includePeers": {
|
|
78
|
+
"type": "integer",
|
|
79
|
+
"minimum": 1,
|
|
80
|
+
"maximum": 100,
|
|
81
|
+
"description": "Also return the top N counterparties of each queue by message count. Omitted = no per-peer breakdown."
|
|
82
|
+
},
|
|
83
|
+
"ext": {
|
|
84
|
+
"$ref": "#/$defs/Ext",
|
|
85
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"$defs": {
|
|
89
|
+
"Response": {
|
|
90
|
+
"$anchor": "response",
|
|
91
|
+
"title": "Messaging — Show Queue Status — response payload",
|
|
92
|
+
"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.",
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"properties": {
|
|
96
|
+
"queues": {
|
|
97
|
+
"$ref": "#/$defs/QueueSummary"
|
|
98
|
+
},
|
|
99
|
+
"receivePeers": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"items": {
|
|
102
|
+
"$ref": "#/$defs/PeerDepth"
|
|
103
|
+
},
|
|
104
|
+
"description": "Top senders into the receive queue. Present only when includePeers was requested."
|
|
105
|
+
},
|
|
106
|
+
"sendPeers": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": {
|
|
109
|
+
"$ref": "#/$defs/PeerDepth"
|
|
110
|
+
},
|
|
111
|
+
"description": "Top recipients holding the send queue. Present only when includePeers was requested."
|
|
112
|
+
},
|
|
113
|
+
"ext": {
|
|
114
|
+
"$ref": "#/$defs/Ext",
|
|
115
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": [
|
|
119
|
+
"queues"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"Ext": {
|
|
123
|
+
"title": "Ext",
|
|
124
|
+
"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.",
|
|
125
|
+
"type": "object",
|
|
126
|
+
"minProperties": 1,
|
|
127
|
+
"additionalProperties": true,
|
|
128
|
+
"propertyNames": {
|
|
129
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"PeerDepth": {
|
|
133
|
+
"title": "PeerDepth",
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": [
|
|
137
|
+
"peer",
|
|
138
|
+
"count",
|
|
139
|
+
"bytes"
|
|
140
|
+
],
|
|
141
|
+
"description": "The share of one queue attributable to one counterparty: in a send queue, the recipient; in a receive queue, the sender.",
|
|
142
|
+
"properties": {
|
|
143
|
+
"peer": {
|
|
144
|
+
"$ref": "#/$defs/Vid",
|
|
145
|
+
"description": "The counterparty's identifier, in the same form the mediator uses for accounts."
|
|
146
|
+
},
|
|
147
|
+
"count": {
|
|
148
|
+
"type": "integer",
|
|
149
|
+
"minimum": 0
|
|
150
|
+
},
|
|
151
|
+
"bytes": {
|
|
152
|
+
"type": "integer",
|
|
153
|
+
"minimum": 0
|
|
154
|
+
},
|
|
155
|
+
"oldestAgeSeconds": {
|
|
156
|
+
"type": "integer",
|
|
157
|
+
"minimum": 0
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"Vid": {
|
|
162
|
+
"title": "Vid",
|
|
163
|
+
"type": "string",
|
|
164
|
+
"minLength": 1,
|
|
165
|
+
"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."
|
|
166
|
+
},
|
|
167
|
+
"QueueSummary": {
|
|
168
|
+
"title": "QueueSummary",
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": [
|
|
172
|
+
"did",
|
|
173
|
+
"receive",
|
|
174
|
+
"send"
|
|
175
|
+
],
|
|
176
|
+
"description": "Both queues of one account.",
|
|
177
|
+
"properties": {
|
|
178
|
+
"did": {
|
|
179
|
+
"$ref": "#/$defs/Vid"
|
|
180
|
+
},
|
|
181
|
+
"accountType": {
|
|
182
|
+
"$ref": "#/$defs/AccountType"
|
|
183
|
+
},
|
|
184
|
+
"receive": {
|
|
185
|
+
"$ref": "#/$defs/QueueDepth"
|
|
186
|
+
},
|
|
187
|
+
"send": {
|
|
188
|
+
"$ref": "#/$defs/QueueDepth"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"QueueDepth": {
|
|
193
|
+
"title": "QueueDepth",
|
|
194
|
+
"type": "object",
|
|
195
|
+
"additionalProperties": false,
|
|
196
|
+
"required": [
|
|
197
|
+
"count",
|
|
198
|
+
"bytes"
|
|
199
|
+
],
|
|
200
|
+
"description": "The depth of one queue and its effective limit.",
|
|
201
|
+
"properties": {
|
|
202
|
+
"count": {
|
|
203
|
+
"type": "integer",
|
|
204
|
+
"minimum": 0,
|
|
205
|
+
"description": "Messages currently in the queue."
|
|
206
|
+
},
|
|
207
|
+
"bytes": {
|
|
208
|
+
"type": "integer",
|
|
209
|
+
"minimum": 0,
|
|
210
|
+
"description": "Total stored size of those messages, in bytes."
|
|
211
|
+
},
|
|
212
|
+
"limit": {
|
|
213
|
+
"type": "integer",
|
|
214
|
+
"minimum": -1,
|
|
215
|
+
"description": "The effective message-count limit for this queue after account overrides and mediator defaults are applied; -1 = unlimited."
|
|
216
|
+
},
|
|
217
|
+
"saturation": {
|
|
218
|
+
"type": "number",
|
|
219
|
+
"minimum": 0,
|
|
220
|
+
"description": "count ÷ limit. Absent when the limit is unlimited. May exceed 1 when a limit was lowered below the current depth."
|
|
221
|
+
},
|
|
222
|
+
"oldestAgeSeconds": {
|
|
223
|
+
"type": "integer",
|
|
224
|
+
"minimum": 0,
|
|
225
|
+
"description": "Age of the oldest message in the queue, in seconds. Absent when the queue is empty or the mediator did not measure it."
|
|
226
|
+
},
|
|
227
|
+
"deliveredUnacked": {
|
|
228
|
+
"type": "integer",
|
|
229
|
+
"minimum": 0,
|
|
230
|
+
"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."
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"AccountType": {
|
|
235
|
+
"title": "AccountType",
|
|
236
|
+
"type": "string",
|
|
237
|
+
"enum": [
|
|
238
|
+
"standard",
|
|
239
|
+
"admin",
|
|
240
|
+
"rootAdmin",
|
|
241
|
+
"mediator"
|
|
242
|
+
],
|
|
243
|
+
"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."
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
} as const;
|
|
247
|
+
|
|
248
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
249
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
250
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
251
|
+
"$ref": "#/$defs/Response",
|
|
252
|
+
"$defs": {
|
|
253
|
+
"Response": {
|
|
254
|
+
"$anchor": "response",
|
|
255
|
+
"title": "Messaging — Show Queue Status — response payload",
|
|
256
|
+
"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.",
|
|
257
|
+
"type": "object",
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"properties": {
|
|
260
|
+
"queues": {
|
|
261
|
+
"$ref": "#/$defs/QueueSummary"
|
|
262
|
+
},
|
|
263
|
+
"receivePeers": {
|
|
264
|
+
"type": "array",
|
|
265
|
+
"items": {
|
|
266
|
+
"$ref": "#/$defs/PeerDepth"
|
|
267
|
+
},
|
|
268
|
+
"description": "Top senders into the receive queue. Present only when includePeers was requested."
|
|
269
|
+
},
|
|
270
|
+
"sendPeers": {
|
|
271
|
+
"type": "array",
|
|
272
|
+
"items": {
|
|
273
|
+
"$ref": "#/$defs/PeerDepth"
|
|
274
|
+
},
|
|
275
|
+
"description": "Top recipients holding the send queue. Present only when includePeers was requested."
|
|
276
|
+
},
|
|
277
|
+
"ext": {
|
|
278
|
+
"$ref": "#/$defs/Ext",
|
|
279
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"required": [
|
|
283
|
+
"queues"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"Ext": {
|
|
287
|
+
"title": "Ext",
|
|
288
|
+
"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.",
|
|
289
|
+
"type": "object",
|
|
290
|
+
"minProperties": 1,
|
|
291
|
+
"additionalProperties": true,
|
|
292
|
+
"propertyNames": {
|
|
293
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"PeerDepth": {
|
|
297
|
+
"title": "PeerDepth",
|
|
298
|
+
"type": "object",
|
|
299
|
+
"additionalProperties": false,
|
|
300
|
+
"required": [
|
|
301
|
+
"peer",
|
|
302
|
+
"count",
|
|
303
|
+
"bytes"
|
|
304
|
+
],
|
|
305
|
+
"description": "The share of one queue attributable to one counterparty: in a send queue, the recipient; in a receive queue, the sender.",
|
|
306
|
+
"properties": {
|
|
307
|
+
"peer": {
|
|
308
|
+
"$ref": "#/$defs/Vid",
|
|
309
|
+
"description": "The counterparty's identifier, in the same form the mediator uses for accounts."
|
|
310
|
+
},
|
|
311
|
+
"count": {
|
|
312
|
+
"type": "integer",
|
|
313
|
+
"minimum": 0
|
|
314
|
+
},
|
|
315
|
+
"bytes": {
|
|
316
|
+
"type": "integer",
|
|
317
|
+
"minimum": 0
|
|
318
|
+
},
|
|
319
|
+
"oldestAgeSeconds": {
|
|
320
|
+
"type": "integer",
|
|
321
|
+
"minimum": 0
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"Vid": {
|
|
326
|
+
"title": "Vid",
|
|
327
|
+
"type": "string",
|
|
328
|
+
"minLength": 1,
|
|
329
|
+
"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."
|
|
330
|
+
},
|
|
331
|
+
"QueueSummary": {
|
|
332
|
+
"title": "QueueSummary",
|
|
333
|
+
"type": "object",
|
|
334
|
+
"additionalProperties": false,
|
|
335
|
+
"required": [
|
|
336
|
+
"did",
|
|
337
|
+
"receive",
|
|
338
|
+
"send"
|
|
339
|
+
],
|
|
340
|
+
"description": "Both queues of one account.",
|
|
341
|
+
"properties": {
|
|
342
|
+
"did": {
|
|
343
|
+
"$ref": "#/$defs/Vid"
|
|
344
|
+
},
|
|
345
|
+
"accountType": {
|
|
346
|
+
"$ref": "#/$defs/AccountType"
|
|
347
|
+
},
|
|
348
|
+
"receive": {
|
|
349
|
+
"$ref": "#/$defs/QueueDepth"
|
|
350
|
+
},
|
|
351
|
+
"send": {
|
|
352
|
+
"$ref": "#/$defs/QueueDepth"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"QueueDepth": {
|
|
357
|
+
"title": "QueueDepth",
|
|
358
|
+
"type": "object",
|
|
359
|
+
"additionalProperties": false,
|
|
360
|
+
"required": [
|
|
361
|
+
"count",
|
|
362
|
+
"bytes"
|
|
363
|
+
],
|
|
364
|
+
"description": "The depth of one queue and its effective limit.",
|
|
365
|
+
"properties": {
|
|
366
|
+
"count": {
|
|
367
|
+
"type": "integer",
|
|
368
|
+
"minimum": 0,
|
|
369
|
+
"description": "Messages currently in the queue."
|
|
370
|
+
},
|
|
371
|
+
"bytes": {
|
|
372
|
+
"type": "integer",
|
|
373
|
+
"minimum": 0,
|
|
374
|
+
"description": "Total stored size of those messages, in bytes."
|
|
375
|
+
},
|
|
376
|
+
"limit": {
|
|
377
|
+
"type": "integer",
|
|
378
|
+
"minimum": -1,
|
|
379
|
+
"description": "The effective message-count limit for this queue after account overrides and mediator defaults are applied; -1 = unlimited."
|
|
380
|
+
},
|
|
381
|
+
"saturation": {
|
|
382
|
+
"type": "number",
|
|
383
|
+
"minimum": 0,
|
|
384
|
+
"description": "count ÷ limit. Absent when the limit is unlimited. May exceed 1 when a limit was lowered below the current depth."
|
|
385
|
+
},
|
|
386
|
+
"oldestAgeSeconds": {
|
|
387
|
+
"type": "integer",
|
|
388
|
+
"minimum": 0,
|
|
389
|
+
"description": "Age of the oldest message in the queue, in seconds. Absent when the queue is empty or the mediator did not measure it."
|
|
390
|
+
},
|
|
391
|
+
"deliveredUnacked": {
|
|
392
|
+
"type": "integer",
|
|
393
|
+
"minimum": 0,
|
|
394
|
+
"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."
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"AccountType": {
|
|
399
|
+
"title": "AccountType",
|
|
400
|
+
"type": "string",
|
|
401
|
+
"enum": [
|
|
402
|
+
"standard",
|
|
403
|
+
"admin",
|
|
404
|
+
"rootAdmin",
|
|
405
|
+
"mediator"
|
|
406
|
+
],
|
|
407
|
+
"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."
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
} as const;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
414
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
415
|
+
* per-specification and cannot be derived from the document alone, and
|
|
416
|
+
* item 2 needs the schema this carries.
|
|
417
|
+
*/
|
|
418
|
+
export const SPEC = {
|
|
419
|
+
typeUri: TYPE_URI,
|
|
420
|
+
isBearer: false,
|
|
421
|
+
isProofRequired: true,
|
|
422
|
+
isRecipientRequired: true,
|
|
423
|
+
isIssuedAtRequired: true,
|
|
424
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
425
|
+
} as const;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
429
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
430
|
+
* parties (§7.3 item 5).
|
|
431
|
+
*/
|
|
432
|
+
export const RESPONSE_SPEC = {
|
|
433
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
434
|
+
isBearer: false,
|
|
435
|
+
isProofRequired: false,
|
|
436
|
+
isRecipientRequired: true,
|
|
437
|
+
isIssuedAtRequired: true,
|
|
438
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
439
|
+
} as const;
|