@openvtc/trust-tasks 0.28.17 → 0.28.18
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 +36 -0
- package/dist/_shared/components.d.ts +26 -1
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/collection/_shared/0.1/collection.d.ts +2 -2
- package/dist/vta/collection/_shared/0.1/collection.d.ts.map +1 -1
- package/dist/vta/collection/list/0.1/payload.d.ts +4 -4
- package/dist/vta/collection/list/0.1/payload.js +2 -2
- package/dist/vta/collection/list/0.1/payload.js.map +1 -1
- package/dist/vta/collection/settings/set/0.1/payload.d.ts +469 -0
- package/dist/vta/collection/settings/set/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/settings/set/0.1/payload.js +275 -0
- package/dist/vta/collection/settings/set/0.1/payload.js.map +1 -0
- package/dist/vta/collection/settings/show/0.1/payload.d.ts +437 -0
- package/dist/vta/collection/settings/show/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/settings/show/0.1/payload.js +260 -0
- package/dist/vta/collection/settings/show/0.1/payload.js.map +1 -0
- package/dist/vtn/registry/check/0.1/payload.d.ts +528 -0
- package/dist/vtn/registry/check/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/registry/check/0.1/payload.js +282 -0
- package/dist/vtn/registry/check/0.1/payload.js.map +1 -0
- package/dist/vtn/registry/status/0.1/payload.d.ts +736 -0
- package/dist/vtn/registry/status/0.1/payload.d.ts.map +1 -0
- package/dist/vtn/registry/status/0.1/payload.js +421 -0
- package/dist/vtn/registry/status/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +26 -1
- package/src/index.ts +12 -0
- package/src/vta/collection/_shared/0.1/collection.ts +2 -2
- package/src/vta/collection/list/0.1/payload.ts +2 -2
- package/src/vta/collection/settings/set/0.1/payload.ts +319 -0
- package/src/vta/collection/settings/show/0.1/payload.ts +296 -0
- package/src/vtn/registry/check/0.1/payload.ts +365 -0
- package/src/vtn/registry/status/0.1/payload.ts +502 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtn/registry/check/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Did_VtnV0_1 as Did, Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Ask the network to ask its trust registry about one party. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTNRegistryCheckPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The party asked about.
|
|
15
|
+
*/
|
|
16
|
+
did: Did;
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What the registry answered, and its own answer document.
|
|
21
|
+
*/
|
|
22
|
+
export interface VTNRegistryCheckResponsePayload {
|
|
23
|
+
/**
|
|
24
|
+
* The trust registry asked.
|
|
25
|
+
*/
|
|
26
|
+
registry: Did;
|
|
27
|
+
/**
|
|
28
|
+
* The network's DID: the authority of its records.
|
|
29
|
+
*/
|
|
30
|
+
authority: Did;
|
|
31
|
+
/**
|
|
32
|
+
* The TRQP resource the network's records are published under.
|
|
33
|
+
*/
|
|
34
|
+
resource: string;
|
|
35
|
+
actions: Actions;
|
|
36
|
+
/**
|
|
37
|
+
* The party asked about.
|
|
38
|
+
*/
|
|
39
|
+
did: Did;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the registry answered. `false` is indeterminate, never "not a member".
|
|
42
|
+
*/
|
|
43
|
+
reachable: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the registry holds an authorised member record for the party. Absent when not reachable.
|
|
46
|
+
*/
|
|
47
|
+
member?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the registry holds an authorised listed record for the party. Absent when not reachable.
|
|
50
|
+
*/
|
|
51
|
+
listed?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The registry's answer document, verbatim and signed by the registry.
|
|
54
|
+
*/
|
|
55
|
+
answer?: {};
|
|
56
|
+
/**
|
|
57
|
+
* Why the registry could not be asked, when not reachable.
|
|
58
|
+
*/
|
|
59
|
+
reason?: string;
|
|
60
|
+
ext?: Ext;
|
|
61
|
+
}
|
|
62
|
+
export interface Actions {
|
|
63
|
+
/**
|
|
64
|
+
* The action acknowledged members are published under.
|
|
65
|
+
*/
|
|
66
|
+
member: string;
|
|
67
|
+
/**
|
|
68
|
+
* The action listed parties are published under, where the network publishes them.
|
|
69
|
+
*/
|
|
70
|
+
listed: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
74
|
+
export type { Did, Ext };
|
|
75
|
+
|
|
76
|
+
/** Trust Task type URI. */
|
|
77
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtn/registry/check/0.1" as const;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The earlier version of this specification that this one declares it
|
|
81
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
82
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
83
|
+
* `extendsChain` / `readForSpec`.
|
|
84
|
+
*/
|
|
85
|
+
export const EXTENDS: string | null = null;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
89
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
90
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
91
|
+
* Versions").
|
|
92
|
+
*/
|
|
93
|
+
export const DEPRECATION: string | null = null;
|
|
94
|
+
|
|
95
|
+
/** Stable alias for this specification's request payload shape. */
|
|
96
|
+
export type Payload = VTNRegistryCheckPayload;
|
|
97
|
+
|
|
98
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
99
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtn/registry/check/0.1#response" as const;
|
|
100
|
+
|
|
101
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
102
|
+
export type Response = VTNRegistryCheckResponsePayload;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* This specification's payload schema, as a value.
|
|
106
|
+
*
|
|
107
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
108
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
109
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
110
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
111
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
112
|
+
*/
|
|
113
|
+
export const PAYLOAD_SCHEMA = {
|
|
114
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
115
|
+
"$id": "https://trusttasks.org/spec/vtn/registry/check/0.1",
|
|
116
|
+
"title": "VTN Registry — Check — payload",
|
|
117
|
+
"description": "Ask the network to ask its trust registry about one party. The outer document members are owned by the framework — SPEC §6.3.",
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": [
|
|
121
|
+
"did"
|
|
122
|
+
],
|
|
123
|
+
"properties": {
|
|
124
|
+
"did": {
|
|
125
|
+
"$ref": "#/$defs/Did",
|
|
126
|
+
"description": "The party asked about."
|
|
127
|
+
},
|
|
128
|
+
"ext": {
|
|
129
|
+
"$ref": "#/$defs/Ext"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"$defs": {
|
|
133
|
+
"Actions": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": [
|
|
137
|
+
"member",
|
|
138
|
+
"listed"
|
|
139
|
+
],
|
|
140
|
+
"properties": {
|
|
141
|
+
"member": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"minLength": 1,
|
|
144
|
+
"description": "The action acknowledged members are published under."
|
|
145
|
+
},
|
|
146
|
+
"listed": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"minLength": 1,
|
|
149
|
+
"description": "The action listed parties are published under, where the network publishes them."
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"Response": {
|
|
154
|
+
"$anchor": "response",
|
|
155
|
+
"title": "VTN Registry — Check — response payload",
|
|
156
|
+
"description": "What the registry answered, and its own answer document.",
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"required": [
|
|
160
|
+
"registry",
|
|
161
|
+
"authority",
|
|
162
|
+
"resource",
|
|
163
|
+
"actions",
|
|
164
|
+
"did",
|
|
165
|
+
"reachable"
|
|
166
|
+
],
|
|
167
|
+
"properties": {
|
|
168
|
+
"registry": {
|
|
169
|
+
"$ref": "#/$defs/Did",
|
|
170
|
+
"description": "The trust registry asked."
|
|
171
|
+
},
|
|
172
|
+
"authority": {
|
|
173
|
+
"$ref": "#/$defs/Did",
|
|
174
|
+
"description": "The network's DID: the authority of its records."
|
|
175
|
+
},
|
|
176
|
+
"resource": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"minLength": 1,
|
|
179
|
+
"description": "The TRQP resource the network's records are published under."
|
|
180
|
+
},
|
|
181
|
+
"actions": {
|
|
182
|
+
"$ref": "#/$defs/Actions"
|
|
183
|
+
},
|
|
184
|
+
"did": {
|
|
185
|
+
"$ref": "#/$defs/Did",
|
|
186
|
+
"description": "The party asked about."
|
|
187
|
+
},
|
|
188
|
+
"reachable": {
|
|
189
|
+
"type": "boolean",
|
|
190
|
+
"description": "Whether the registry answered. `false` is indeterminate, never \"not a member\"."
|
|
191
|
+
},
|
|
192
|
+
"member": {
|
|
193
|
+
"type": "boolean",
|
|
194
|
+
"description": "Whether the registry holds an authorised member record for the party. Absent when not reachable."
|
|
195
|
+
},
|
|
196
|
+
"listed": {
|
|
197
|
+
"type": "boolean",
|
|
198
|
+
"description": "Whether the registry holds an authorised listed record for the party. Absent when not reachable."
|
|
199
|
+
},
|
|
200
|
+
"answer": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"description": "The registry's answer document, verbatim and signed by the registry."
|
|
203
|
+
},
|
|
204
|
+
"reason": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"maxLength": 1024,
|
|
207
|
+
"description": "Why the registry could not be asked, when not reachable."
|
|
208
|
+
},
|
|
209
|
+
"ext": {
|
|
210
|
+
"$ref": "#/$defs/Ext"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"Ext": {
|
|
215
|
+
"title": "Ext",
|
|
216
|
+
"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.",
|
|
217
|
+
"type": "object",
|
|
218
|
+
"minProperties": 1,
|
|
219
|
+
"additionalProperties": true,
|
|
220
|
+
"propertyNames": {
|
|
221
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"Did": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"pattern": "^did:[a-z0-9]+:.+$",
|
|
227
|
+
"maxLength": 2048,
|
|
228
|
+
"description": "A DID."
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
} as const;
|
|
232
|
+
|
|
233
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
234
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
235
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
236
|
+
"$ref": "#/$defs/Response",
|
|
237
|
+
"$defs": {
|
|
238
|
+
"Actions": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"additionalProperties": false,
|
|
241
|
+
"required": [
|
|
242
|
+
"member",
|
|
243
|
+
"listed"
|
|
244
|
+
],
|
|
245
|
+
"properties": {
|
|
246
|
+
"member": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"minLength": 1,
|
|
249
|
+
"description": "The action acknowledged members are published under."
|
|
250
|
+
},
|
|
251
|
+
"listed": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"minLength": 1,
|
|
254
|
+
"description": "The action listed parties are published under, where the network publishes them."
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"Response": {
|
|
259
|
+
"$anchor": "response",
|
|
260
|
+
"title": "VTN Registry — Check — response payload",
|
|
261
|
+
"description": "What the registry answered, and its own answer document.",
|
|
262
|
+
"type": "object",
|
|
263
|
+
"additionalProperties": false,
|
|
264
|
+
"required": [
|
|
265
|
+
"registry",
|
|
266
|
+
"authority",
|
|
267
|
+
"resource",
|
|
268
|
+
"actions",
|
|
269
|
+
"did",
|
|
270
|
+
"reachable"
|
|
271
|
+
],
|
|
272
|
+
"properties": {
|
|
273
|
+
"registry": {
|
|
274
|
+
"$ref": "#/$defs/Did",
|
|
275
|
+
"description": "The trust registry asked."
|
|
276
|
+
},
|
|
277
|
+
"authority": {
|
|
278
|
+
"$ref": "#/$defs/Did",
|
|
279
|
+
"description": "The network's DID: the authority of its records."
|
|
280
|
+
},
|
|
281
|
+
"resource": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"minLength": 1,
|
|
284
|
+
"description": "The TRQP resource the network's records are published under."
|
|
285
|
+
},
|
|
286
|
+
"actions": {
|
|
287
|
+
"$ref": "#/$defs/Actions"
|
|
288
|
+
},
|
|
289
|
+
"did": {
|
|
290
|
+
"$ref": "#/$defs/Did",
|
|
291
|
+
"description": "The party asked about."
|
|
292
|
+
},
|
|
293
|
+
"reachable": {
|
|
294
|
+
"type": "boolean",
|
|
295
|
+
"description": "Whether the registry answered. `false` is indeterminate, never \"not a member\"."
|
|
296
|
+
},
|
|
297
|
+
"member": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"description": "Whether the registry holds an authorised member record for the party. Absent when not reachable."
|
|
300
|
+
},
|
|
301
|
+
"listed": {
|
|
302
|
+
"type": "boolean",
|
|
303
|
+
"description": "Whether the registry holds an authorised listed record for the party. Absent when not reachable."
|
|
304
|
+
},
|
|
305
|
+
"answer": {
|
|
306
|
+
"type": "object",
|
|
307
|
+
"description": "The registry's answer document, verbatim and signed by the registry."
|
|
308
|
+
},
|
|
309
|
+
"reason": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"maxLength": 1024,
|
|
312
|
+
"description": "Why the registry could not be asked, when not reachable."
|
|
313
|
+
},
|
|
314
|
+
"ext": {
|
|
315
|
+
"$ref": "#/$defs/Ext"
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"Ext": {
|
|
320
|
+
"title": "Ext",
|
|
321
|
+
"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.",
|
|
322
|
+
"type": "object",
|
|
323
|
+
"minProperties": 1,
|
|
324
|
+
"additionalProperties": true,
|
|
325
|
+
"propertyNames": {
|
|
326
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"Did": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"pattern": "^did:[a-z0-9]+:.+$",
|
|
332
|
+
"maxLength": 2048,
|
|
333
|
+
"description": "A DID."
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
} as const;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
340
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
341
|
+
* per-specification and cannot be derived from the document alone, and
|
|
342
|
+
* item 2 needs the schema this carries.
|
|
343
|
+
*/
|
|
344
|
+
export const SPEC = {
|
|
345
|
+
typeUri: TYPE_URI,
|
|
346
|
+
isBearer: false,
|
|
347
|
+
isProofRequired: false,
|
|
348
|
+
isRecipientRequired: true,
|
|
349
|
+
isIssuedAtRequired: false,
|
|
350
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
351
|
+
} as const;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
355
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
356
|
+
* parties (§7.3 item 5).
|
|
357
|
+
*/
|
|
358
|
+
export const RESPONSE_SPEC = {
|
|
359
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
360
|
+
isBearer: false,
|
|
361
|
+
isProofRequired: false,
|
|
362
|
+
isRecipientRequired: true,
|
|
363
|
+
isIssuedAtRequired: false,
|
|
364
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
365
|
+
} as const;
|