@openvtc/trust-tasks 0.19.14 → 0.19.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/_shared/components.d.ts +331 -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/dist/vtc/join-requests/list/0.1/payload.d.ts +88 -0
- package/dist/vtc/join-requests/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/join-requests/list/0.1/payload.js +50 -0
- package/dist/vtc/join-requests/list/0.1/payload.js.map +1 -1
- package/dist/vtc/join-requests/manifest/0.2/payload.d.ts +135 -0
- package/dist/vtc/join-requests/manifest/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/join-requests/manifest/0.2/payload.js +62 -0
- package/dist/vtc/join-requests/manifest/0.2/payload.js.map +1 -1
- package/dist/vtc/join-requests/show/0.1/payload.d.ts +88 -0
- package/dist/vtc/join-requests/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/join-requests/show/0.1/payload.js +50 -0
- package/dist/vtc/join-requests/show/0.1/payload.js.map +1 -1
- package/dist/vtc/join-requests/submit/0.2/payload.d.ts +61 -0
- package/dist/vtc/join-requests/submit/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/join-requests/submit/0.2/payload.js +25 -0
- package/dist/vtc/join-requests/submit/0.2/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +359 -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
- package/src/vtc/join-requests/list/0.1/payload.ts +50 -0
- package/src/vtc/join-requests/manifest/0.2/payload.ts +81 -0
- package/src/vtc/join-requests/show/0.1/payload.ts +50 -0
- package/src/vtc/join-requests/submit/0.2/payload.ts +42 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/messaging/queue/purge/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, Queue, Vid } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface MessagingPurgeQueuePayload {
|
|
10
|
+
/**
|
|
11
|
+
* The account whose queue to purge. Omitted = the requester's own account. A requester without administrative standing may name only itself.
|
|
12
|
+
*/
|
|
13
|
+
did?: Vid;
|
|
14
|
+
queue: Queue;
|
|
15
|
+
/**
|
|
16
|
+
* Only messages exchanged with this counterparty: in a send queue, the recipient; in a receive queue, the sender.
|
|
17
|
+
*/
|
|
18
|
+
peer?: Vid;
|
|
19
|
+
/**
|
|
20
|
+
* Only messages queued at least this long.
|
|
21
|
+
*/
|
|
22
|
+
olderThanSeconds?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Report what would be purged and purge nothing. Default false.
|
|
25
|
+
*/
|
|
26
|
+
dryRun?: boolean;
|
|
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/purge request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/queue/purge/0.1#response.
|
|
34
|
+
*/
|
|
35
|
+
export interface MessagingPurgeQueueResponsePayload {
|
|
36
|
+
/**
|
|
37
|
+
* Messages that matched the selection.
|
|
38
|
+
*/
|
|
39
|
+
matched: number;
|
|
40
|
+
matchedBytes?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Messages actually removed. 0 on a dry run.
|
|
43
|
+
*/
|
|
44
|
+
purged: number;
|
|
45
|
+
dryRun: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
48
|
+
*/
|
|
49
|
+
ext?: Ext;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
53
|
+
export type { Ext, Queue, Vid };
|
|
54
|
+
|
|
55
|
+
/** Trust Task type URI. */
|
|
56
|
+
export const TYPE_URI = "https://trusttasks.org/spec/messaging/queue/purge/0.1" as const;
|
|
57
|
+
|
|
58
|
+
/** Stable alias for this specification's request payload shape. */
|
|
59
|
+
export type Payload = MessagingPurgeQueuePayload;
|
|
60
|
+
|
|
61
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
62
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/messaging/queue/purge/0.1#response" as const;
|
|
63
|
+
|
|
64
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
65
|
+
export type Response = MessagingPurgeQueueResponsePayload;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* This specification's payload schema, as a value.
|
|
69
|
+
*
|
|
70
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
71
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
72
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
73
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
74
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
75
|
+
*/
|
|
76
|
+
export const PAYLOAD_SCHEMA = {
|
|
77
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
78
|
+
"$id": "https://trusttasks.org/spec/messaging/queue/purge/0.1",
|
|
79
|
+
"title": "Messaging — Purge Queue — payload",
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": [
|
|
83
|
+
"queue"
|
|
84
|
+
],
|
|
85
|
+
"properties": {
|
|
86
|
+
"did": {
|
|
87
|
+
"$ref": "#/$defs/Vid",
|
|
88
|
+
"description": "The account whose queue to purge. Omitted = the requester's own account. A requester without administrative standing may name only itself."
|
|
89
|
+
},
|
|
90
|
+
"queue": {
|
|
91
|
+
"$ref": "#/$defs/Queue"
|
|
92
|
+
},
|
|
93
|
+
"peer": {
|
|
94
|
+
"$ref": "#/$defs/Vid",
|
|
95
|
+
"description": "Only messages exchanged with this counterparty: in a send queue, the recipient; in a receive queue, the sender."
|
|
96
|
+
},
|
|
97
|
+
"olderThanSeconds": {
|
|
98
|
+
"type": "integer",
|
|
99
|
+
"minimum": 0,
|
|
100
|
+
"description": "Only messages queued at least this long."
|
|
101
|
+
},
|
|
102
|
+
"dryRun": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"description": "Report what would be purged and purge nothing. Default false."
|
|
105
|
+
},
|
|
106
|
+
"ext": {
|
|
107
|
+
"$ref": "#/$defs/Ext",
|
|
108
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"$defs": {
|
|
112
|
+
"Response": {
|
|
113
|
+
"$anchor": "response",
|
|
114
|
+
"title": "Messaging — Purge Queue — response payload",
|
|
115
|
+
"description": "The success response to a messaging/queue/purge request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/queue/purge/0.1#response.",
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"properties": {
|
|
119
|
+
"matched": {
|
|
120
|
+
"type": "integer",
|
|
121
|
+
"minimum": 0,
|
|
122
|
+
"description": "Messages that matched the selection."
|
|
123
|
+
},
|
|
124
|
+
"matchedBytes": {
|
|
125
|
+
"type": "integer",
|
|
126
|
+
"minimum": 0
|
|
127
|
+
},
|
|
128
|
+
"purged": {
|
|
129
|
+
"type": "integer",
|
|
130
|
+
"minimum": 0,
|
|
131
|
+
"description": "Messages actually removed. 0 on a dry run."
|
|
132
|
+
},
|
|
133
|
+
"dryRun": {
|
|
134
|
+
"type": "boolean"
|
|
135
|
+
},
|
|
136
|
+
"ext": {
|
|
137
|
+
"$ref": "#/$defs/Ext",
|
|
138
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": [
|
|
142
|
+
"matched",
|
|
143
|
+
"purged",
|
|
144
|
+
"dryRun"
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"Ext": {
|
|
148
|
+
"title": "Ext",
|
|
149
|
+
"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.",
|
|
150
|
+
"type": "object",
|
|
151
|
+
"minProperties": 1,
|
|
152
|
+
"additionalProperties": true,
|
|
153
|
+
"propertyNames": {
|
|
154
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"Vid": {
|
|
158
|
+
"title": "Vid",
|
|
159
|
+
"type": "string",
|
|
160
|
+
"minLength": 1,
|
|
161
|
+
"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."
|
|
162
|
+
},
|
|
163
|
+
"Queue": {
|
|
164
|
+
"title": "Queue",
|
|
165
|
+
"type": "string",
|
|
166
|
+
"enum": [
|
|
167
|
+
"receive",
|
|
168
|
+
"send"
|
|
169
|
+
],
|
|
170
|
+
"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."
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
} as const;
|
|
174
|
+
|
|
175
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
176
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
177
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
178
|
+
"$ref": "#/$defs/Response",
|
|
179
|
+
"$defs": {
|
|
180
|
+
"Response": {
|
|
181
|
+
"$anchor": "response",
|
|
182
|
+
"title": "Messaging — Purge Queue — response payload",
|
|
183
|
+
"description": "The success response to a messaging/queue/purge request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/messaging/queue/purge/0.1#response.",
|
|
184
|
+
"type": "object",
|
|
185
|
+
"additionalProperties": false,
|
|
186
|
+
"properties": {
|
|
187
|
+
"matched": {
|
|
188
|
+
"type": "integer",
|
|
189
|
+
"minimum": 0,
|
|
190
|
+
"description": "Messages that matched the selection."
|
|
191
|
+
},
|
|
192
|
+
"matchedBytes": {
|
|
193
|
+
"type": "integer",
|
|
194
|
+
"minimum": 0
|
|
195
|
+
},
|
|
196
|
+
"purged": {
|
|
197
|
+
"type": "integer",
|
|
198
|
+
"minimum": 0,
|
|
199
|
+
"description": "Messages actually removed. 0 on a dry run."
|
|
200
|
+
},
|
|
201
|
+
"dryRun": {
|
|
202
|
+
"type": "boolean"
|
|
203
|
+
},
|
|
204
|
+
"ext": {
|
|
205
|
+
"$ref": "#/$defs/Ext",
|
|
206
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"required": [
|
|
210
|
+
"matched",
|
|
211
|
+
"purged",
|
|
212
|
+
"dryRun"
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"Ext": {
|
|
216
|
+
"title": "Ext",
|
|
217
|
+
"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.",
|
|
218
|
+
"type": "object",
|
|
219
|
+
"minProperties": 1,
|
|
220
|
+
"additionalProperties": true,
|
|
221
|
+
"propertyNames": {
|
|
222
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"Vid": {
|
|
226
|
+
"title": "Vid",
|
|
227
|
+
"type": "string",
|
|
228
|
+
"minLength": 1,
|
|
229
|
+
"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."
|
|
230
|
+
},
|
|
231
|
+
"Queue": {
|
|
232
|
+
"title": "Queue",
|
|
233
|
+
"type": "string",
|
|
234
|
+
"enum": [
|
|
235
|
+
"receive",
|
|
236
|
+
"send"
|
|
237
|
+
],
|
|
238
|
+
"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."
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
} as const;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
245
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
246
|
+
* per-specification and cannot be derived from the document alone, and
|
|
247
|
+
* item 2 needs the schema this carries.
|
|
248
|
+
*/
|
|
249
|
+
export const SPEC = {
|
|
250
|
+
typeUri: TYPE_URI,
|
|
251
|
+
isBearer: false,
|
|
252
|
+
isProofRequired: true,
|
|
253
|
+
isRecipientRequired: true,
|
|
254
|
+
isIssuedAtRequired: true,
|
|
255
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
256
|
+
} as const;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
260
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
261
|
+
* parties (§7.3 item 5).
|
|
262
|
+
*/
|
|
263
|
+
export const RESPONSE_SPEC = {
|
|
264
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
265
|
+
isBearer: false,
|
|
266
|
+
isProofRequired: false,
|
|
267
|
+
isRecipientRequired: true,
|
|
268
|
+
isIssuedAtRequired: true,
|
|
269
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
270
|
+
} as const;
|