@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,568 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/messaging/message/get/0.1/payload.schema.json
4
+ */
5
+ import type { DeliveryState, Ext, MessageMeta, Queue, Vid, WireProtocol } from "../../../../_shared/components.js";
6
+ export interface MessagingGetMessagePayload {
7
+ /**
8
+ * The account whose queue holds the message. Omitted = the requester's own account. A requester without administrative standing may name only itself.
9
+ */
10
+ did?: Vid;
11
+ msgId: string;
12
+ /**
13
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
14
+ */
15
+ ext?: Ext;
16
+ }
17
+ /**
18
+ * The success response to a messaging/message/get request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/message/get/0.1#response.
19
+ */
20
+ export interface MessagingGetMessageResponsePayload {
21
+ meta: MessageMeta;
22
+ /**
23
+ * The stored message exactly as the mediator holds it — a DIDComm JWE/JWS as JSON text, a TSP message as CESR qb64 text. The mediator does not decrypt it. Bounded at 10 MiB; a stored message larger than that is refused with messageTooLarge rather than truncated.
24
+ */
25
+ message: string;
26
+ /**
27
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
28
+ */
29
+ ext?: Ext;
30
+ }
31
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
32
+ export type { DeliveryState, Ext, MessageMeta, Queue, Vid, WireProtocol };
33
+ /** Trust Task type URI. */
34
+ export declare const TYPE_URI: "https://trusttasks.org/spec/messaging/message/get/0.1";
35
+ /** Stable alias for this specification's request payload shape. */
36
+ export type Payload = MessagingGetMessagePayload;
37
+ /** Trust Task response type URI (request type URI + "#response"). */
38
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/messaging/message/get/0.1#response";
39
+ /** Stable alias for this specification's success-response payload shape. */
40
+ export type Response = MessagingGetMessageResponsePayload;
41
+ /**
42
+ * This specification's payload schema, as a value.
43
+ *
44
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
45
+ * rather than only as a `.json` file because TypeScript types are erased
46
+ * at runtime: without a schema a consumer has nothing to validate, and
47
+ * every REQUIRED payload member is optional in practice. Cross-file
48
+ * `$ref`s are already inlined, so it needs no resolver.
49
+ */
50
+ export declare const PAYLOAD_SCHEMA: {
51
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
52
+ readonly $id: "https://trusttasks.org/spec/messaging/message/get/0.1";
53
+ readonly title: "Messaging — Get Message — payload";
54
+ readonly type: "object";
55
+ readonly additionalProperties: false;
56
+ readonly required: readonly ["msgId"];
57
+ readonly properties: {
58
+ readonly did: {
59
+ readonly $ref: "#/$defs/Vid";
60
+ readonly description: "The account whose queue holds the message. Omitted = the requester's own account. A requester without administrative standing may name only itself.";
61
+ };
62
+ readonly msgId: {
63
+ readonly type: "string";
64
+ readonly minLength: 1;
65
+ };
66
+ readonly ext: {
67
+ readonly $ref: "#/$defs/Ext";
68
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
69
+ };
70
+ };
71
+ readonly $defs: {
72
+ readonly Response: {
73
+ readonly $anchor: "response";
74
+ readonly title: "Messaging — Get Message — response payload";
75
+ readonly description: "The success response to a messaging/message/get request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/message/get/0.1#response.";
76
+ readonly type: "object";
77
+ readonly additionalProperties: false;
78
+ readonly properties: {
79
+ readonly meta: {
80
+ readonly $ref: "#/$defs/MessageMeta";
81
+ };
82
+ readonly message: {
83
+ readonly type: "string";
84
+ readonly description: "The stored message exactly as the mediator holds it — a DIDComm JWE/JWS as JSON text, a TSP message as CESR qb64 text. The mediator does not decrypt it. Bounded at 10 MiB; a stored message larger than that is refused with messageTooLarge rather than truncated.";
85
+ readonly maxLength: 10485760;
86
+ };
87
+ readonly ext: {
88
+ readonly $ref: "#/$defs/Ext";
89
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
90
+ };
91
+ };
92
+ readonly required: readonly ["meta", "message"];
93
+ };
94
+ readonly Ext: {
95
+ readonly title: "Ext";
96
+ 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.";
97
+ readonly type: "object";
98
+ readonly minProperties: 1;
99
+ readonly additionalProperties: true;
100
+ readonly propertyNames: {
101
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
102
+ };
103
+ };
104
+ readonly MessageMeta: {
105
+ readonly title: "MessageMeta";
106
+ readonly type: "object";
107
+ readonly additionalProperties: false;
108
+ readonly required: readonly ["msgId", "queue", "size", "receivedAt"];
109
+ readonly description: "Metadata of one stored message. Never carries the message body.";
110
+ readonly properties: {
111
+ readonly msgId: {
112
+ readonly type: "string";
113
+ readonly minLength: 1;
114
+ readonly description: "The mediator's identifier for the stored message; the handle messaging/message/get and messaging/message/delete accept.";
115
+ readonly maxLength: 256;
116
+ };
117
+ readonly queue: {
118
+ readonly $ref: "#/$defs/Queue";
119
+ };
120
+ readonly size: {
121
+ readonly type: "integer";
122
+ readonly minimum: 0;
123
+ readonly description: "Stored size in bytes.";
124
+ };
125
+ readonly receivedAt: {
126
+ readonly type: "string";
127
+ readonly format: "date-time";
128
+ readonly description: "When the mediator stored the message.";
129
+ };
130
+ readonly expiresAt: {
131
+ readonly type: "string";
132
+ readonly format: "date-time";
133
+ readonly description: "When the mediator will expire the message if it is not deleted first.";
134
+ };
135
+ readonly from: {
136
+ readonly $ref: "#/$defs/Vid";
137
+ readonly description: "The sender, where the mediator knows it. Absent for anonymous messages.";
138
+ };
139
+ readonly to: {
140
+ readonly $ref: "#/$defs/Vid";
141
+ readonly description: "The recipient account.";
142
+ };
143
+ readonly protocol: {
144
+ readonly $ref: "#/$defs/WireProtocol";
145
+ };
146
+ readonly deliveryState: {
147
+ readonly $ref: "#/$defs/DeliveryState";
148
+ };
149
+ readonly deliveredAt: {
150
+ readonly type: "string";
151
+ readonly format: "date-time";
152
+ readonly description: "When the message was first handed to the recipient. Present only when deliveryState is `delivered`.";
153
+ };
154
+ };
155
+ };
156
+ readonly DeliveryState: {
157
+ readonly title: "DeliveryState";
158
+ readonly type: "string";
159
+ readonly enum: readonly ["queued", "delivered"];
160
+ readonly description: "`queued`: stored and not yet handed to the recipient. `delivered`: handed to the recipient (pickup or live stream) but not yet deleted by it — the recipient has not acknowledged it.";
161
+ };
162
+ readonly WireProtocol: {
163
+ readonly title: "WireProtocol";
164
+ readonly type: "string";
165
+ readonly enum: readonly ["didcomm", "didcommV1", "tsp", "other"];
166
+ readonly description: "The protocol a message travelled in, as the mediator detected it from the wire form. `didcomm` is DIDComm v2 (JWE/JWS); `didcommV1` is a DIDComm v1 envelope; `tsp` is a Trust Spanning Protocol message; `other` is anything the mediator could not classify.";
167
+ };
168
+ readonly Queue: {
169
+ readonly title: "Queue";
170
+ readonly type: "string";
171
+ readonly enum: readonly ["receive", "send"];
172
+ 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.";
173
+ };
174
+ readonly Vid: {
175
+ readonly title: "Vid";
176
+ readonly type: "string";
177
+ readonly minLength: 1;
178
+ 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.";
179
+ };
180
+ };
181
+ };
182
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
183
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
184
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
185
+ readonly $ref: "#/$defs/Response";
186
+ readonly $defs: {
187
+ readonly Response: {
188
+ readonly $anchor: "response";
189
+ readonly title: "Messaging — Get Message — response payload";
190
+ readonly description: "The success response to a messaging/message/get request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/message/get/0.1#response.";
191
+ readonly type: "object";
192
+ readonly additionalProperties: false;
193
+ readonly properties: {
194
+ readonly meta: {
195
+ readonly $ref: "#/$defs/MessageMeta";
196
+ };
197
+ readonly message: {
198
+ readonly type: "string";
199
+ readonly description: "The stored message exactly as the mediator holds it — a DIDComm JWE/JWS as JSON text, a TSP message as CESR qb64 text. The mediator does not decrypt it. Bounded at 10 MiB; a stored message larger than that is refused with messageTooLarge rather than truncated.";
200
+ readonly maxLength: 10485760;
201
+ };
202
+ readonly ext: {
203
+ readonly $ref: "#/$defs/Ext";
204
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
205
+ };
206
+ };
207
+ readonly required: readonly ["meta", "message"];
208
+ };
209
+ readonly Ext: {
210
+ readonly title: "Ext";
211
+ 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.";
212
+ readonly type: "object";
213
+ readonly minProperties: 1;
214
+ readonly additionalProperties: true;
215
+ readonly propertyNames: {
216
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
217
+ };
218
+ };
219
+ readonly MessageMeta: {
220
+ readonly title: "MessageMeta";
221
+ readonly type: "object";
222
+ readonly additionalProperties: false;
223
+ readonly required: readonly ["msgId", "queue", "size", "receivedAt"];
224
+ readonly description: "Metadata of one stored message. Never carries the message body.";
225
+ readonly properties: {
226
+ readonly msgId: {
227
+ readonly type: "string";
228
+ readonly minLength: 1;
229
+ readonly description: "The mediator's identifier for the stored message; the handle messaging/message/get and messaging/message/delete accept.";
230
+ readonly maxLength: 256;
231
+ };
232
+ readonly queue: {
233
+ readonly $ref: "#/$defs/Queue";
234
+ };
235
+ readonly size: {
236
+ readonly type: "integer";
237
+ readonly minimum: 0;
238
+ readonly description: "Stored size in bytes.";
239
+ };
240
+ readonly receivedAt: {
241
+ readonly type: "string";
242
+ readonly format: "date-time";
243
+ readonly description: "When the mediator stored the message.";
244
+ };
245
+ readonly expiresAt: {
246
+ readonly type: "string";
247
+ readonly format: "date-time";
248
+ readonly description: "When the mediator will expire the message if it is not deleted first.";
249
+ };
250
+ readonly from: {
251
+ readonly $ref: "#/$defs/Vid";
252
+ readonly description: "The sender, where the mediator knows it. Absent for anonymous messages.";
253
+ };
254
+ readonly to: {
255
+ readonly $ref: "#/$defs/Vid";
256
+ readonly description: "The recipient account.";
257
+ };
258
+ readonly protocol: {
259
+ readonly $ref: "#/$defs/WireProtocol";
260
+ };
261
+ readonly deliveryState: {
262
+ readonly $ref: "#/$defs/DeliveryState";
263
+ };
264
+ readonly deliveredAt: {
265
+ readonly type: "string";
266
+ readonly format: "date-time";
267
+ readonly description: "When the message was first handed to the recipient. Present only when deliveryState is `delivered`.";
268
+ };
269
+ };
270
+ };
271
+ readonly DeliveryState: {
272
+ readonly title: "DeliveryState";
273
+ readonly type: "string";
274
+ readonly enum: readonly ["queued", "delivered"];
275
+ readonly description: "`queued`: stored and not yet handed to the recipient. `delivered`: handed to the recipient (pickup or live stream) but not yet deleted by it — the recipient has not acknowledged it.";
276
+ };
277
+ readonly WireProtocol: {
278
+ readonly title: "WireProtocol";
279
+ readonly type: "string";
280
+ readonly enum: readonly ["didcomm", "didcommV1", "tsp", "other"];
281
+ readonly description: "The protocol a message travelled in, as the mediator detected it from the wire form. `didcomm` is DIDComm v2 (JWE/JWS); `didcommV1` is a DIDComm v1 envelope; `tsp` is a Trust Spanning Protocol message; `other` is anything the mediator could not classify.";
282
+ };
283
+ readonly Queue: {
284
+ readonly title: "Queue";
285
+ readonly type: "string";
286
+ readonly enum: readonly ["receive", "send"];
287
+ 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.";
288
+ };
289
+ readonly Vid: {
290
+ readonly title: "Vid";
291
+ readonly type: "string";
292
+ readonly minLength: 1;
293
+ 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.";
294
+ };
295
+ };
296
+ };
297
+ /**
298
+ * SPEC.md §7.2 policy for the request variant, from this specification's
299
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
300
+ * per-specification and cannot be derived from the document alone, and
301
+ * item 2 needs the schema this carries.
302
+ */
303
+ export declare const SPEC: {
304
+ readonly typeUri: "https://trusttasks.org/spec/messaging/message/get/0.1";
305
+ readonly isBearer: false;
306
+ readonly isProofRequired: true;
307
+ readonly isRecipientRequired: true;
308
+ readonly isIssuedAtRequired: true;
309
+ readonly payloadSchema: {
310
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
311
+ readonly $id: "https://trusttasks.org/spec/messaging/message/get/0.1";
312
+ readonly title: "Messaging — Get Message — payload";
313
+ readonly type: "object";
314
+ readonly additionalProperties: false;
315
+ readonly required: readonly ["msgId"];
316
+ readonly properties: {
317
+ readonly did: {
318
+ readonly $ref: "#/$defs/Vid";
319
+ readonly description: "The account whose queue holds the message. Omitted = the requester's own account. A requester without administrative standing may name only itself.";
320
+ };
321
+ readonly msgId: {
322
+ readonly type: "string";
323
+ readonly minLength: 1;
324
+ };
325
+ readonly ext: {
326
+ readonly $ref: "#/$defs/Ext";
327
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
328
+ };
329
+ };
330
+ readonly $defs: {
331
+ readonly Response: {
332
+ readonly $anchor: "response";
333
+ readonly title: "Messaging — Get Message — response payload";
334
+ readonly description: "The success response to a messaging/message/get request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/message/get/0.1#response.";
335
+ readonly type: "object";
336
+ readonly additionalProperties: false;
337
+ readonly properties: {
338
+ readonly meta: {
339
+ readonly $ref: "#/$defs/MessageMeta";
340
+ };
341
+ readonly message: {
342
+ readonly type: "string";
343
+ readonly description: "The stored message exactly as the mediator holds it — a DIDComm JWE/JWS as JSON text, a TSP message as CESR qb64 text. The mediator does not decrypt it. Bounded at 10 MiB; a stored message larger than that is refused with messageTooLarge rather than truncated.";
344
+ readonly maxLength: 10485760;
345
+ };
346
+ readonly ext: {
347
+ readonly $ref: "#/$defs/Ext";
348
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
349
+ };
350
+ };
351
+ readonly required: readonly ["meta", "message"];
352
+ };
353
+ readonly Ext: {
354
+ readonly title: "Ext";
355
+ 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.";
356
+ readonly type: "object";
357
+ readonly minProperties: 1;
358
+ readonly additionalProperties: true;
359
+ readonly propertyNames: {
360
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
361
+ };
362
+ };
363
+ readonly MessageMeta: {
364
+ readonly title: "MessageMeta";
365
+ readonly type: "object";
366
+ readonly additionalProperties: false;
367
+ readonly required: readonly ["msgId", "queue", "size", "receivedAt"];
368
+ readonly description: "Metadata of one stored message. Never carries the message body.";
369
+ readonly properties: {
370
+ readonly msgId: {
371
+ readonly type: "string";
372
+ readonly minLength: 1;
373
+ readonly description: "The mediator's identifier for the stored message; the handle messaging/message/get and messaging/message/delete accept.";
374
+ readonly maxLength: 256;
375
+ };
376
+ readonly queue: {
377
+ readonly $ref: "#/$defs/Queue";
378
+ };
379
+ readonly size: {
380
+ readonly type: "integer";
381
+ readonly minimum: 0;
382
+ readonly description: "Stored size in bytes.";
383
+ };
384
+ readonly receivedAt: {
385
+ readonly type: "string";
386
+ readonly format: "date-time";
387
+ readonly description: "When the mediator stored the message.";
388
+ };
389
+ readonly expiresAt: {
390
+ readonly type: "string";
391
+ readonly format: "date-time";
392
+ readonly description: "When the mediator will expire the message if it is not deleted first.";
393
+ };
394
+ readonly from: {
395
+ readonly $ref: "#/$defs/Vid";
396
+ readonly description: "The sender, where the mediator knows it. Absent for anonymous messages.";
397
+ };
398
+ readonly to: {
399
+ readonly $ref: "#/$defs/Vid";
400
+ readonly description: "The recipient account.";
401
+ };
402
+ readonly protocol: {
403
+ readonly $ref: "#/$defs/WireProtocol";
404
+ };
405
+ readonly deliveryState: {
406
+ readonly $ref: "#/$defs/DeliveryState";
407
+ };
408
+ readonly deliveredAt: {
409
+ readonly type: "string";
410
+ readonly format: "date-time";
411
+ readonly description: "When the message was first handed to the recipient. Present only when deliveryState is `delivered`.";
412
+ };
413
+ };
414
+ };
415
+ readonly DeliveryState: {
416
+ readonly title: "DeliveryState";
417
+ readonly type: "string";
418
+ readonly enum: readonly ["queued", "delivered"];
419
+ readonly description: "`queued`: stored and not yet handed to the recipient. `delivered`: handed to the recipient (pickup or live stream) but not yet deleted by it — the recipient has not acknowledged it.";
420
+ };
421
+ readonly WireProtocol: {
422
+ readonly title: "WireProtocol";
423
+ readonly type: "string";
424
+ readonly enum: readonly ["didcomm", "didcommV1", "tsp", "other"];
425
+ readonly description: "The protocol a message travelled in, as the mediator detected it from the wire form. `didcomm` is DIDComm v2 (JWE/JWS); `didcommV1` is a DIDComm v1 envelope; `tsp` is a Trust Spanning Protocol message; `other` is anything the mediator could not classify.";
426
+ };
427
+ readonly Queue: {
428
+ readonly title: "Queue";
429
+ readonly type: "string";
430
+ readonly enum: readonly ["receive", "send"];
431
+ 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.";
432
+ };
433
+ readonly Vid: {
434
+ readonly title: "Vid";
435
+ readonly type: "string";
436
+ readonly minLength: 1;
437
+ 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.";
438
+ };
439
+ };
440
+ };
441
+ };
442
+ /**
443
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
444
+ * tracks the *issuer* party's requirement because a response swaps the
445
+ * parties (§7.3 item 5).
446
+ */
447
+ export declare const RESPONSE_SPEC: {
448
+ readonly typeUri: "https://trusttasks.org/spec/messaging/message/get/0.1#response";
449
+ readonly isBearer: false;
450
+ readonly isProofRequired: true;
451
+ readonly isRecipientRequired: true;
452
+ readonly isIssuedAtRequired: true;
453
+ readonly payloadSchema: {
454
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
455
+ readonly $ref: "#/$defs/Response";
456
+ readonly $defs: {
457
+ readonly Response: {
458
+ readonly $anchor: "response";
459
+ readonly title: "Messaging — Get Message — response payload";
460
+ readonly description: "The success response to a messaging/message/get request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/message/get/0.1#response.";
461
+ readonly type: "object";
462
+ readonly additionalProperties: false;
463
+ readonly properties: {
464
+ readonly meta: {
465
+ readonly $ref: "#/$defs/MessageMeta";
466
+ };
467
+ readonly message: {
468
+ readonly type: "string";
469
+ readonly description: "The stored message exactly as the mediator holds it — a DIDComm JWE/JWS as JSON text, a TSP message as CESR qb64 text. The mediator does not decrypt it. Bounded at 10 MiB; a stored message larger than that is refused with messageTooLarge rather than truncated.";
470
+ readonly maxLength: 10485760;
471
+ };
472
+ readonly ext: {
473
+ readonly $ref: "#/$defs/Ext";
474
+ readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
475
+ };
476
+ };
477
+ readonly required: readonly ["meta", "message"];
478
+ };
479
+ readonly Ext: {
480
+ readonly title: "Ext";
481
+ 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.";
482
+ readonly type: "object";
483
+ readonly minProperties: 1;
484
+ readonly additionalProperties: true;
485
+ readonly propertyNames: {
486
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
487
+ };
488
+ };
489
+ readonly MessageMeta: {
490
+ readonly title: "MessageMeta";
491
+ readonly type: "object";
492
+ readonly additionalProperties: false;
493
+ readonly required: readonly ["msgId", "queue", "size", "receivedAt"];
494
+ readonly description: "Metadata of one stored message. Never carries the message body.";
495
+ readonly properties: {
496
+ readonly msgId: {
497
+ readonly type: "string";
498
+ readonly minLength: 1;
499
+ readonly description: "The mediator's identifier for the stored message; the handle messaging/message/get and messaging/message/delete accept.";
500
+ readonly maxLength: 256;
501
+ };
502
+ readonly queue: {
503
+ readonly $ref: "#/$defs/Queue";
504
+ };
505
+ readonly size: {
506
+ readonly type: "integer";
507
+ readonly minimum: 0;
508
+ readonly description: "Stored size in bytes.";
509
+ };
510
+ readonly receivedAt: {
511
+ readonly type: "string";
512
+ readonly format: "date-time";
513
+ readonly description: "When the mediator stored the message.";
514
+ };
515
+ readonly expiresAt: {
516
+ readonly type: "string";
517
+ readonly format: "date-time";
518
+ readonly description: "When the mediator will expire the message if it is not deleted first.";
519
+ };
520
+ readonly from: {
521
+ readonly $ref: "#/$defs/Vid";
522
+ readonly description: "The sender, where the mediator knows it. Absent for anonymous messages.";
523
+ };
524
+ readonly to: {
525
+ readonly $ref: "#/$defs/Vid";
526
+ readonly description: "The recipient account.";
527
+ };
528
+ readonly protocol: {
529
+ readonly $ref: "#/$defs/WireProtocol";
530
+ };
531
+ readonly deliveryState: {
532
+ readonly $ref: "#/$defs/DeliveryState";
533
+ };
534
+ readonly deliveredAt: {
535
+ readonly type: "string";
536
+ readonly format: "date-time";
537
+ readonly description: "When the message was first handed to the recipient. Present only when deliveryState is `delivered`.";
538
+ };
539
+ };
540
+ };
541
+ readonly DeliveryState: {
542
+ readonly title: "DeliveryState";
543
+ readonly type: "string";
544
+ readonly enum: readonly ["queued", "delivered"];
545
+ readonly description: "`queued`: stored and not yet handed to the recipient. `delivered`: handed to the recipient (pickup or live stream) but not yet deleted by it — the recipient has not acknowledged it.";
546
+ };
547
+ readonly WireProtocol: {
548
+ readonly title: "WireProtocol";
549
+ readonly type: "string";
550
+ readonly enum: readonly ["didcomm", "didcommV1", "tsp", "other"];
551
+ readonly description: "The protocol a message travelled in, as the mediator detected it from the wire form. `didcomm` is DIDComm v2 (JWE/JWS); `didcommV1` is a DIDComm v1 envelope; `tsp` is a Trust Spanning Protocol message; `other` is anything the mediator could not classify.";
552
+ };
553
+ readonly Queue: {
554
+ readonly title: "Queue";
555
+ readonly type: "string";
556
+ readonly enum: readonly ["receive", "send"];
557
+ 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.";
558
+ };
559
+ readonly Vid: {
560
+ readonly title: "Vid";
561
+ readonly type: "string";
562
+ readonly minLength: 1;
563
+ 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.";
564
+ };
565
+ };
566
+ };
567
+ };
568
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/messaging/message/get/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGnH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,aAAa,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;AAE1E,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,uDAAgE,CAAC;AAEzF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAEjD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,gEAAyE,CAAC;AAE3G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,kCAAkC,CAAC;AAE1D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoI1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}