@openvtc/trust-tasks 0.28.11 → 0.28.12
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 +48 -0
- package/dist/_shared/components.d.ts +38 -0
- 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 +16 -0
- package/dist/vta/collection/_shared/0.1/collection.d.ts.map +1 -0
- package/dist/vta/collection/_shared/0.1/collection.js +6 -0
- package/dist/vta/collection/_shared/0.1/collection.js.map +1 -0
- package/dist/vta/collection/claim/0.1/payload.d.ts +352 -0
- package/dist/vta/collection/claim/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/claim/0.1/payload.js +198 -0
- package/dist/vta/collection/claim/0.1/payload.js.map +1 -0
- package/dist/vta/collection/list/0.1/payload.d.ts +740 -0
- package/dist/vta/collection/list/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/list/0.1/payload.js +447 -0
- package/dist/vta/collection/list/0.1/payload.js.map +1 -0
- package/dist/vta/collection/release/0.1/payload.d.ts +316 -0
- package/dist/vta/collection/release/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/release/0.1/payload.js +182 -0
- package/dist/vta/collection/release/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +38 -0
- package/src/index.ts +12 -0
- package/src/vta/collection/_shared/0.1/collection.ts +17 -0
- package/src/vta/collection/claim/0.1/payload.ts +247 -0
- package/src/vta/collection/list/0.1/payload.ts +500 -0
- package/src/vta/collection/release/0.1/payload.ts +223 -0
|
@@ -0,0 +1,740 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vta/collection/list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Claim, CollectionEntry, Collector, ContextId_VtaCollectionV0_1 as ContextId, Did_NotificationsV0_1 as Did, Ext, NotCollectedReason } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* A client with standing in a trust context lists, for every identifier there that its VTA collects for unless a client has claimed it, who collects for it now: the VTA, a claimant — with the claim's end and whether it can be renewed — or nobody, and why (VTI-NTF-091). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTACollectionListPayload {
|
|
10
|
+
contextId: ContextId;
|
|
11
|
+
/**
|
|
12
|
+
* Only this identifier.
|
|
13
|
+
*/
|
|
14
|
+
identifier?: Did;
|
|
15
|
+
/**
|
|
16
|
+
* Only identifiers with this collector — `none`, for instance, to find the identifiers nobody collects for.
|
|
17
|
+
*/
|
|
18
|
+
collector?: Collector;
|
|
19
|
+
/**
|
|
20
|
+
* An opaque cursor from a previous response's `nextCursor`, for the same filters. The VTA refuses one it did not issue.
|
|
21
|
+
*/
|
|
22
|
+
cursor?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The most items to return.
|
|
25
|
+
*/
|
|
26
|
+
limit?: number;
|
|
27
|
+
ext?: Ext;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One page of the identifiers that match.
|
|
31
|
+
*/
|
|
32
|
+
export interface VTACollectionListResponsePayload {
|
|
33
|
+
items: CollectionEntry[];
|
|
34
|
+
/**
|
|
35
|
+
* Present when more items remain; absent on the last page.
|
|
36
|
+
*/
|
|
37
|
+
nextCursor?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
40
|
+
export type { Claim, CollectionEntry, Collector, ContextId, Did, Ext, NotCollectedReason };
|
|
41
|
+
/** Trust Task type URI. */
|
|
42
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vta/collection/list/0.1";
|
|
43
|
+
/**
|
|
44
|
+
* The earlier version of this specification that this one declares it
|
|
45
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
46
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
47
|
+
* `extendsChain` / `readForSpec`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const EXTENDS: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
52
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
53
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
54
|
+
* Versions").
|
|
55
|
+
*/
|
|
56
|
+
export declare const DEPRECATION: string | null;
|
|
57
|
+
/** Stable alias for this specification's request payload shape. */
|
|
58
|
+
export type Payload = VTACollectionListPayload;
|
|
59
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
60
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vta/collection/list/0.1#response";
|
|
61
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
62
|
+
export type Response = VTACollectionListResponsePayload;
|
|
63
|
+
/**
|
|
64
|
+
* This specification's payload schema, as a value.
|
|
65
|
+
*
|
|
66
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
67
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
68
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
69
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
70
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
71
|
+
*/
|
|
72
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
73
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
74
|
+
readonly $id: "https://trusttasks.org/spec/vta/collection/list/0.1";
|
|
75
|
+
readonly title: "VTA Collection — List — payload";
|
|
76
|
+
readonly description: "A client with standing in a trust context lists, for every identifier there that its VTA collects for unless a client has claimed it, who collects for it now: the VTA, a claimant — with the claim's end and whether it can be renewed — or nobody, and why (VTI-NTF-091). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
77
|
+
readonly type: "object";
|
|
78
|
+
readonly additionalProperties: false;
|
|
79
|
+
readonly required: readonly ["contextId"];
|
|
80
|
+
readonly properties: {
|
|
81
|
+
readonly contextId: {
|
|
82
|
+
readonly $ref: "#/$defs/ContextId";
|
|
83
|
+
};
|
|
84
|
+
readonly identifier: {
|
|
85
|
+
readonly $ref: "#/$defs/Did";
|
|
86
|
+
readonly description: "Only this identifier.";
|
|
87
|
+
};
|
|
88
|
+
readonly collector: {
|
|
89
|
+
readonly $ref: "#/$defs/Collector";
|
|
90
|
+
readonly description: "Only identifiers with this collector — `none`, for instance, to find the identifiers nobody collects for.";
|
|
91
|
+
};
|
|
92
|
+
readonly cursor: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly minLength: 1;
|
|
95
|
+
readonly maxLength: 512;
|
|
96
|
+
readonly description: "An opaque cursor from a previous response's `nextCursor`, for the same filters. The VTA refuses one it did not issue.";
|
|
97
|
+
};
|
|
98
|
+
readonly limit: {
|
|
99
|
+
readonly type: "integer";
|
|
100
|
+
readonly minimum: 1;
|
|
101
|
+
readonly maximum: 200;
|
|
102
|
+
readonly description: "The most items to return.";
|
|
103
|
+
};
|
|
104
|
+
readonly ext: {
|
|
105
|
+
readonly $ref: "#/$defs/Ext";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly $defs: {
|
|
109
|
+
readonly Response: {
|
|
110
|
+
readonly $anchor: "response";
|
|
111
|
+
readonly title: "VTA Collection — List — response payload";
|
|
112
|
+
readonly type: "object";
|
|
113
|
+
readonly additionalProperties: false;
|
|
114
|
+
readonly required: readonly ["items"];
|
|
115
|
+
readonly description: "One page of the identifiers that match.";
|
|
116
|
+
readonly properties: {
|
|
117
|
+
readonly items: {
|
|
118
|
+
readonly type: "array";
|
|
119
|
+
readonly items: {
|
|
120
|
+
readonly $ref: "#/$defs/CollectionEntry";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
readonly nextCursor: {
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly minLength: 1;
|
|
126
|
+
readonly maxLength: 512;
|
|
127
|
+
readonly description: "Present when more items remain; absent on the last page.";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
readonly CollectionEntry: {
|
|
132
|
+
readonly title: "CollectionEntry";
|
|
133
|
+
readonly description: "The collection state of one identifier. `claim` is present exactly when `collector` is `client`, and `notCollectedReason` exactly when it is `none`.";
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly additionalProperties: false;
|
|
136
|
+
readonly required: readonly ["identifier", "collector"];
|
|
137
|
+
readonly properties: {
|
|
138
|
+
readonly identifier: {
|
|
139
|
+
readonly $ref: "#/$defs/Did";
|
|
140
|
+
};
|
|
141
|
+
readonly collector: {
|
|
142
|
+
readonly $ref: "#/$defs/Collector";
|
|
143
|
+
};
|
|
144
|
+
readonly claim: {
|
|
145
|
+
readonly $ref: "#/$defs/Claim";
|
|
146
|
+
};
|
|
147
|
+
readonly notCollectedReason: {
|
|
148
|
+
readonly $ref: "#/$defs/NotCollectedReason";
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly dependentSchemas: {
|
|
152
|
+
readonly claim: {
|
|
153
|
+
readonly properties: {
|
|
154
|
+
readonly collector: {
|
|
155
|
+
readonly const: "client";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
readonly notCollectedReason: {
|
|
160
|
+
readonly properties: {
|
|
161
|
+
readonly collector: {
|
|
162
|
+
readonly const: "none";
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly collector: {
|
|
167
|
+
readonly anyOf: readonly [{
|
|
168
|
+
readonly properties: {
|
|
169
|
+
readonly collector: {
|
|
170
|
+
readonly const: "vta";
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
readonly not: {
|
|
174
|
+
readonly anyOf: readonly [{
|
|
175
|
+
readonly required: readonly ["claim"];
|
|
176
|
+
}, {
|
|
177
|
+
readonly required: readonly ["notCollectedReason"];
|
|
178
|
+
}];
|
|
179
|
+
};
|
|
180
|
+
}, {
|
|
181
|
+
readonly required: readonly ["claim"];
|
|
182
|
+
}, {
|
|
183
|
+
readonly required: readonly ["notCollectedReason"];
|
|
184
|
+
}];
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly NotCollectedReason: {
|
|
189
|
+
readonly title: "NotCollectedReason";
|
|
190
|
+
readonly description: "Why nobody collects for an identifier the VTA would otherwise collect for: `limit`, the VTA is at the bound it states on the number of identifiers it collects for (VTI-NTF-088); `conflict`, another connection for the identifier kept closing the VTA's, and the VTA stopped after the bound it states until the conflict is resolved (VTI-NTF-085). `disabled`, the VTA's operator has not enabled collection by default (VTI-NTF-093), so the VTA collects for no identifier a client has not claimed.";
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
readonly enum: readonly ["limit", "conflict", "disabled"];
|
|
193
|
+
};
|
|
194
|
+
readonly Claim: {
|
|
195
|
+
readonly title: "Claim";
|
|
196
|
+
readonly description: "A collection claim in force for one identifier: the client that is its collector, when the claim ends, and whether the claimant may still renew it. A claim released by a party other than its claimant, or whose claimant's access control entry no longer gives it standing in the context, is not renewable and still ends at `endsAt`, because the claimant is still connected until its own clock tells it to stop (VTI-NTF-084).";
|
|
197
|
+
readonly type: "object";
|
|
198
|
+
readonly additionalProperties: false;
|
|
199
|
+
readonly required: readonly ["claimant", "endsAt", "renewable"];
|
|
200
|
+
readonly properties: {
|
|
201
|
+
readonly claimant: {
|
|
202
|
+
readonly $ref: "#/$defs/Did";
|
|
203
|
+
readonly description: "The client holding the claim: the subject of the access control entry it was granted to.";
|
|
204
|
+
};
|
|
205
|
+
readonly endsAt: {
|
|
206
|
+
readonly type: "string";
|
|
207
|
+
readonly format: "date-time";
|
|
208
|
+
readonly description: "When the claim ends unless renewed. The claimant stops collecting before this instant less its clock-skew tolerance; the VTA resumes no earlier than this instant plus its own (VTI-NTF-083, VTI-NTF-084).";
|
|
209
|
+
};
|
|
210
|
+
readonly renewable: {
|
|
211
|
+
readonly type: "boolean";
|
|
212
|
+
readonly description: "Whether the claimant may renew the claim with vta/collection/claim before it ends.";
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
readonly Did: {
|
|
217
|
+
readonly title: "Did";
|
|
218
|
+
readonly description: "A DID.";
|
|
219
|
+
readonly type: "string";
|
|
220
|
+
readonly minLength: 8;
|
|
221
|
+
readonly maxLength: 2048;
|
|
222
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
223
|
+
};
|
|
224
|
+
readonly Collector: {
|
|
225
|
+
readonly title: "Collector";
|
|
226
|
+
readonly description: "Who collects for an identifier: `vta`, the VTA itself; `client`, the claimant of a collection claim in force; or `none`, nobody, for the reason given in `notCollectedReason`.";
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
readonly enum: readonly ["vta", "client", "none"];
|
|
229
|
+
};
|
|
230
|
+
readonly Ext: {
|
|
231
|
+
readonly title: "Ext";
|
|
232
|
+
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.";
|
|
233
|
+
readonly type: "object";
|
|
234
|
+
readonly minProperties: 1;
|
|
235
|
+
readonly additionalProperties: true;
|
|
236
|
+
readonly propertyNames: {
|
|
237
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
readonly ContextId: {
|
|
241
|
+
readonly title: "ContextId";
|
|
242
|
+
readonly description: "The trust context the identifier belongs to.";
|
|
243
|
+
readonly type: "string";
|
|
244
|
+
readonly minLength: 1;
|
|
245
|
+
readonly maxLength: 256;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
250
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
251
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
252
|
+
readonly $ref: "#/$defs/Response";
|
|
253
|
+
readonly $defs: {
|
|
254
|
+
readonly Response: {
|
|
255
|
+
readonly $anchor: "response";
|
|
256
|
+
readonly title: "VTA Collection — List — response payload";
|
|
257
|
+
readonly type: "object";
|
|
258
|
+
readonly additionalProperties: false;
|
|
259
|
+
readonly required: readonly ["items"];
|
|
260
|
+
readonly description: "One page of the identifiers that match.";
|
|
261
|
+
readonly properties: {
|
|
262
|
+
readonly items: {
|
|
263
|
+
readonly type: "array";
|
|
264
|
+
readonly items: {
|
|
265
|
+
readonly $ref: "#/$defs/CollectionEntry";
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
readonly nextCursor: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly minLength: 1;
|
|
271
|
+
readonly maxLength: 512;
|
|
272
|
+
readonly description: "Present when more items remain; absent on the last page.";
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
readonly CollectionEntry: {
|
|
277
|
+
readonly title: "CollectionEntry";
|
|
278
|
+
readonly description: "The collection state of one identifier. `claim` is present exactly when `collector` is `client`, and `notCollectedReason` exactly when it is `none`.";
|
|
279
|
+
readonly type: "object";
|
|
280
|
+
readonly additionalProperties: false;
|
|
281
|
+
readonly required: readonly ["identifier", "collector"];
|
|
282
|
+
readonly properties: {
|
|
283
|
+
readonly identifier: {
|
|
284
|
+
readonly $ref: "#/$defs/Did";
|
|
285
|
+
};
|
|
286
|
+
readonly collector: {
|
|
287
|
+
readonly $ref: "#/$defs/Collector";
|
|
288
|
+
};
|
|
289
|
+
readonly claim: {
|
|
290
|
+
readonly $ref: "#/$defs/Claim";
|
|
291
|
+
};
|
|
292
|
+
readonly notCollectedReason: {
|
|
293
|
+
readonly $ref: "#/$defs/NotCollectedReason";
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
readonly dependentSchemas: {
|
|
297
|
+
readonly claim: {
|
|
298
|
+
readonly properties: {
|
|
299
|
+
readonly collector: {
|
|
300
|
+
readonly const: "client";
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
readonly notCollectedReason: {
|
|
305
|
+
readonly properties: {
|
|
306
|
+
readonly collector: {
|
|
307
|
+
readonly const: "none";
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
readonly collector: {
|
|
312
|
+
readonly anyOf: readonly [{
|
|
313
|
+
readonly properties: {
|
|
314
|
+
readonly collector: {
|
|
315
|
+
readonly const: "vta";
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
readonly not: {
|
|
319
|
+
readonly anyOf: readonly [{
|
|
320
|
+
readonly required: readonly ["claim"];
|
|
321
|
+
}, {
|
|
322
|
+
readonly required: readonly ["notCollectedReason"];
|
|
323
|
+
}];
|
|
324
|
+
};
|
|
325
|
+
}, {
|
|
326
|
+
readonly required: readonly ["claim"];
|
|
327
|
+
}, {
|
|
328
|
+
readonly required: readonly ["notCollectedReason"];
|
|
329
|
+
}];
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
readonly NotCollectedReason: {
|
|
334
|
+
readonly title: "NotCollectedReason";
|
|
335
|
+
readonly description: "Why nobody collects for an identifier the VTA would otherwise collect for: `limit`, the VTA is at the bound it states on the number of identifiers it collects for (VTI-NTF-088); `conflict`, another connection for the identifier kept closing the VTA's, and the VTA stopped after the bound it states until the conflict is resolved (VTI-NTF-085). `disabled`, the VTA's operator has not enabled collection by default (VTI-NTF-093), so the VTA collects for no identifier a client has not claimed.";
|
|
336
|
+
readonly type: "string";
|
|
337
|
+
readonly enum: readonly ["limit", "conflict", "disabled"];
|
|
338
|
+
};
|
|
339
|
+
readonly Claim: {
|
|
340
|
+
readonly title: "Claim";
|
|
341
|
+
readonly description: "A collection claim in force for one identifier: the client that is its collector, when the claim ends, and whether the claimant may still renew it. A claim released by a party other than its claimant, or whose claimant's access control entry no longer gives it standing in the context, is not renewable and still ends at `endsAt`, because the claimant is still connected until its own clock tells it to stop (VTI-NTF-084).";
|
|
342
|
+
readonly type: "object";
|
|
343
|
+
readonly additionalProperties: false;
|
|
344
|
+
readonly required: readonly ["claimant", "endsAt", "renewable"];
|
|
345
|
+
readonly properties: {
|
|
346
|
+
readonly claimant: {
|
|
347
|
+
readonly $ref: "#/$defs/Did";
|
|
348
|
+
readonly description: "The client holding the claim: the subject of the access control entry it was granted to.";
|
|
349
|
+
};
|
|
350
|
+
readonly endsAt: {
|
|
351
|
+
readonly type: "string";
|
|
352
|
+
readonly format: "date-time";
|
|
353
|
+
readonly description: "When the claim ends unless renewed. The claimant stops collecting before this instant less its clock-skew tolerance; the VTA resumes no earlier than this instant plus its own (VTI-NTF-083, VTI-NTF-084).";
|
|
354
|
+
};
|
|
355
|
+
readonly renewable: {
|
|
356
|
+
readonly type: "boolean";
|
|
357
|
+
readonly description: "Whether the claimant may renew the claim with vta/collection/claim before it ends.";
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
readonly Did: {
|
|
362
|
+
readonly title: "Did";
|
|
363
|
+
readonly description: "A DID.";
|
|
364
|
+
readonly type: "string";
|
|
365
|
+
readonly minLength: 8;
|
|
366
|
+
readonly maxLength: 2048;
|
|
367
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
368
|
+
};
|
|
369
|
+
readonly Collector: {
|
|
370
|
+
readonly title: "Collector";
|
|
371
|
+
readonly description: "Who collects for an identifier: `vta`, the VTA itself; `client`, the claimant of a collection claim in force; or `none`, nobody, for the reason given in `notCollectedReason`.";
|
|
372
|
+
readonly type: "string";
|
|
373
|
+
readonly enum: readonly ["vta", "client", "none"];
|
|
374
|
+
};
|
|
375
|
+
readonly Ext: {
|
|
376
|
+
readonly title: "Ext";
|
|
377
|
+
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.";
|
|
378
|
+
readonly type: "object";
|
|
379
|
+
readonly minProperties: 1;
|
|
380
|
+
readonly additionalProperties: true;
|
|
381
|
+
readonly propertyNames: {
|
|
382
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
readonly ContextId: {
|
|
386
|
+
readonly title: "ContextId";
|
|
387
|
+
readonly description: "The trust context the identifier belongs to.";
|
|
388
|
+
readonly type: "string";
|
|
389
|
+
readonly minLength: 1;
|
|
390
|
+
readonly maxLength: 256;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
396
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
397
|
+
* per-specification and cannot be derived from the document alone, and
|
|
398
|
+
* item 2 needs the schema this carries.
|
|
399
|
+
*/
|
|
400
|
+
export declare const SPEC: {
|
|
401
|
+
readonly typeUri: "https://trusttasks.org/spec/vta/collection/list/0.1";
|
|
402
|
+
readonly isBearer: false;
|
|
403
|
+
readonly isProofRequired: false;
|
|
404
|
+
readonly isRecipientRequired: true;
|
|
405
|
+
readonly isIssuedAtRequired: false;
|
|
406
|
+
readonly payloadSchema: {
|
|
407
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
408
|
+
readonly $id: "https://trusttasks.org/spec/vta/collection/list/0.1";
|
|
409
|
+
readonly title: "VTA Collection — List — payload";
|
|
410
|
+
readonly description: "A client with standing in a trust context lists, for every identifier there that its VTA collects for unless a client has claimed it, who collects for it now: the VTA, a claimant — with the claim's end and whether it can be renewed — or nobody, and why (VTI-NTF-091). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
411
|
+
readonly type: "object";
|
|
412
|
+
readonly additionalProperties: false;
|
|
413
|
+
readonly required: readonly ["contextId"];
|
|
414
|
+
readonly properties: {
|
|
415
|
+
readonly contextId: {
|
|
416
|
+
readonly $ref: "#/$defs/ContextId";
|
|
417
|
+
};
|
|
418
|
+
readonly identifier: {
|
|
419
|
+
readonly $ref: "#/$defs/Did";
|
|
420
|
+
readonly description: "Only this identifier.";
|
|
421
|
+
};
|
|
422
|
+
readonly collector: {
|
|
423
|
+
readonly $ref: "#/$defs/Collector";
|
|
424
|
+
readonly description: "Only identifiers with this collector — `none`, for instance, to find the identifiers nobody collects for.";
|
|
425
|
+
};
|
|
426
|
+
readonly cursor: {
|
|
427
|
+
readonly type: "string";
|
|
428
|
+
readonly minLength: 1;
|
|
429
|
+
readonly maxLength: 512;
|
|
430
|
+
readonly description: "An opaque cursor from a previous response's `nextCursor`, for the same filters. The VTA refuses one it did not issue.";
|
|
431
|
+
};
|
|
432
|
+
readonly limit: {
|
|
433
|
+
readonly type: "integer";
|
|
434
|
+
readonly minimum: 1;
|
|
435
|
+
readonly maximum: 200;
|
|
436
|
+
readonly description: "The most items to return.";
|
|
437
|
+
};
|
|
438
|
+
readonly ext: {
|
|
439
|
+
readonly $ref: "#/$defs/Ext";
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
readonly $defs: {
|
|
443
|
+
readonly Response: {
|
|
444
|
+
readonly $anchor: "response";
|
|
445
|
+
readonly title: "VTA Collection — List — response payload";
|
|
446
|
+
readonly type: "object";
|
|
447
|
+
readonly additionalProperties: false;
|
|
448
|
+
readonly required: readonly ["items"];
|
|
449
|
+
readonly description: "One page of the identifiers that match.";
|
|
450
|
+
readonly properties: {
|
|
451
|
+
readonly items: {
|
|
452
|
+
readonly type: "array";
|
|
453
|
+
readonly items: {
|
|
454
|
+
readonly $ref: "#/$defs/CollectionEntry";
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
readonly nextCursor: {
|
|
458
|
+
readonly type: "string";
|
|
459
|
+
readonly minLength: 1;
|
|
460
|
+
readonly maxLength: 512;
|
|
461
|
+
readonly description: "Present when more items remain; absent on the last page.";
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
readonly CollectionEntry: {
|
|
466
|
+
readonly title: "CollectionEntry";
|
|
467
|
+
readonly description: "The collection state of one identifier. `claim` is present exactly when `collector` is `client`, and `notCollectedReason` exactly when it is `none`.";
|
|
468
|
+
readonly type: "object";
|
|
469
|
+
readonly additionalProperties: false;
|
|
470
|
+
readonly required: readonly ["identifier", "collector"];
|
|
471
|
+
readonly properties: {
|
|
472
|
+
readonly identifier: {
|
|
473
|
+
readonly $ref: "#/$defs/Did";
|
|
474
|
+
};
|
|
475
|
+
readonly collector: {
|
|
476
|
+
readonly $ref: "#/$defs/Collector";
|
|
477
|
+
};
|
|
478
|
+
readonly claim: {
|
|
479
|
+
readonly $ref: "#/$defs/Claim";
|
|
480
|
+
};
|
|
481
|
+
readonly notCollectedReason: {
|
|
482
|
+
readonly $ref: "#/$defs/NotCollectedReason";
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
readonly dependentSchemas: {
|
|
486
|
+
readonly claim: {
|
|
487
|
+
readonly properties: {
|
|
488
|
+
readonly collector: {
|
|
489
|
+
readonly const: "client";
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
readonly notCollectedReason: {
|
|
494
|
+
readonly properties: {
|
|
495
|
+
readonly collector: {
|
|
496
|
+
readonly const: "none";
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
readonly collector: {
|
|
501
|
+
readonly anyOf: readonly [{
|
|
502
|
+
readonly properties: {
|
|
503
|
+
readonly collector: {
|
|
504
|
+
readonly const: "vta";
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
readonly not: {
|
|
508
|
+
readonly anyOf: readonly [{
|
|
509
|
+
readonly required: readonly ["claim"];
|
|
510
|
+
}, {
|
|
511
|
+
readonly required: readonly ["notCollectedReason"];
|
|
512
|
+
}];
|
|
513
|
+
};
|
|
514
|
+
}, {
|
|
515
|
+
readonly required: readonly ["claim"];
|
|
516
|
+
}, {
|
|
517
|
+
readonly required: readonly ["notCollectedReason"];
|
|
518
|
+
}];
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
readonly NotCollectedReason: {
|
|
523
|
+
readonly title: "NotCollectedReason";
|
|
524
|
+
readonly description: "Why nobody collects for an identifier the VTA would otherwise collect for: `limit`, the VTA is at the bound it states on the number of identifiers it collects for (VTI-NTF-088); `conflict`, another connection for the identifier kept closing the VTA's, and the VTA stopped after the bound it states until the conflict is resolved (VTI-NTF-085). `disabled`, the VTA's operator has not enabled collection by default (VTI-NTF-093), so the VTA collects for no identifier a client has not claimed.";
|
|
525
|
+
readonly type: "string";
|
|
526
|
+
readonly enum: readonly ["limit", "conflict", "disabled"];
|
|
527
|
+
};
|
|
528
|
+
readonly Claim: {
|
|
529
|
+
readonly title: "Claim";
|
|
530
|
+
readonly description: "A collection claim in force for one identifier: the client that is its collector, when the claim ends, and whether the claimant may still renew it. A claim released by a party other than its claimant, or whose claimant's access control entry no longer gives it standing in the context, is not renewable and still ends at `endsAt`, because the claimant is still connected until its own clock tells it to stop (VTI-NTF-084).";
|
|
531
|
+
readonly type: "object";
|
|
532
|
+
readonly additionalProperties: false;
|
|
533
|
+
readonly required: readonly ["claimant", "endsAt", "renewable"];
|
|
534
|
+
readonly properties: {
|
|
535
|
+
readonly claimant: {
|
|
536
|
+
readonly $ref: "#/$defs/Did";
|
|
537
|
+
readonly description: "The client holding the claim: the subject of the access control entry it was granted to.";
|
|
538
|
+
};
|
|
539
|
+
readonly endsAt: {
|
|
540
|
+
readonly type: "string";
|
|
541
|
+
readonly format: "date-time";
|
|
542
|
+
readonly description: "When the claim ends unless renewed. The claimant stops collecting before this instant less its clock-skew tolerance; the VTA resumes no earlier than this instant plus its own (VTI-NTF-083, VTI-NTF-084).";
|
|
543
|
+
};
|
|
544
|
+
readonly renewable: {
|
|
545
|
+
readonly type: "boolean";
|
|
546
|
+
readonly description: "Whether the claimant may renew the claim with vta/collection/claim before it ends.";
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
readonly Did: {
|
|
551
|
+
readonly title: "Did";
|
|
552
|
+
readonly description: "A DID.";
|
|
553
|
+
readonly type: "string";
|
|
554
|
+
readonly minLength: 8;
|
|
555
|
+
readonly maxLength: 2048;
|
|
556
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
557
|
+
};
|
|
558
|
+
readonly Collector: {
|
|
559
|
+
readonly title: "Collector";
|
|
560
|
+
readonly description: "Who collects for an identifier: `vta`, the VTA itself; `client`, the claimant of a collection claim in force; or `none`, nobody, for the reason given in `notCollectedReason`.";
|
|
561
|
+
readonly type: "string";
|
|
562
|
+
readonly enum: readonly ["vta", "client", "none"];
|
|
563
|
+
};
|
|
564
|
+
readonly Ext: {
|
|
565
|
+
readonly title: "Ext";
|
|
566
|
+
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.";
|
|
567
|
+
readonly type: "object";
|
|
568
|
+
readonly minProperties: 1;
|
|
569
|
+
readonly additionalProperties: true;
|
|
570
|
+
readonly propertyNames: {
|
|
571
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
readonly ContextId: {
|
|
575
|
+
readonly title: "ContextId";
|
|
576
|
+
readonly description: "The trust context the identifier belongs to.";
|
|
577
|
+
readonly type: "string";
|
|
578
|
+
readonly minLength: 1;
|
|
579
|
+
readonly maxLength: 256;
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
585
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
586
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
587
|
+
* parties (§7.3 item 5).
|
|
588
|
+
*/
|
|
589
|
+
export declare const RESPONSE_SPEC: {
|
|
590
|
+
readonly typeUri: "https://trusttasks.org/spec/vta/collection/list/0.1#response";
|
|
591
|
+
readonly isBearer: false;
|
|
592
|
+
readonly isProofRequired: false;
|
|
593
|
+
readonly isRecipientRequired: true;
|
|
594
|
+
readonly isIssuedAtRequired: false;
|
|
595
|
+
readonly payloadSchema: {
|
|
596
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
597
|
+
readonly $ref: "#/$defs/Response";
|
|
598
|
+
readonly $defs: {
|
|
599
|
+
readonly Response: {
|
|
600
|
+
readonly $anchor: "response";
|
|
601
|
+
readonly title: "VTA Collection — List — response payload";
|
|
602
|
+
readonly type: "object";
|
|
603
|
+
readonly additionalProperties: false;
|
|
604
|
+
readonly required: readonly ["items"];
|
|
605
|
+
readonly description: "One page of the identifiers that match.";
|
|
606
|
+
readonly properties: {
|
|
607
|
+
readonly items: {
|
|
608
|
+
readonly type: "array";
|
|
609
|
+
readonly items: {
|
|
610
|
+
readonly $ref: "#/$defs/CollectionEntry";
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
readonly nextCursor: {
|
|
614
|
+
readonly type: "string";
|
|
615
|
+
readonly minLength: 1;
|
|
616
|
+
readonly maxLength: 512;
|
|
617
|
+
readonly description: "Present when more items remain; absent on the last page.";
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
readonly CollectionEntry: {
|
|
622
|
+
readonly title: "CollectionEntry";
|
|
623
|
+
readonly description: "The collection state of one identifier. `claim` is present exactly when `collector` is `client`, and `notCollectedReason` exactly when it is `none`.";
|
|
624
|
+
readonly type: "object";
|
|
625
|
+
readonly additionalProperties: false;
|
|
626
|
+
readonly required: readonly ["identifier", "collector"];
|
|
627
|
+
readonly properties: {
|
|
628
|
+
readonly identifier: {
|
|
629
|
+
readonly $ref: "#/$defs/Did";
|
|
630
|
+
};
|
|
631
|
+
readonly collector: {
|
|
632
|
+
readonly $ref: "#/$defs/Collector";
|
|
633
|
+
};
|
|
634
|
+
readonly claim: {
|
|
635
|
+
readonly $ref: "#/$defs/Claim";
|
|
636
|
+
};
|
|
637
|
+
readonly notCollectedReason: {
|
|
638
|
+
readonly $ref: "#/$defs/NotCollectedReason";
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
readonly dependentSchemas: {
|
|
642
|
+
readonly claim: {
|
|
643
|
+
readonly properties: {
|
|
644
|
+
readonly collector: {
|
|
645
|
+
readonly const: "client";
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
readonly notCollectedReason: {
|
|
650
|
+
readonly properties: {
|
|
651
|
+
readonly collector: {
|
|
652
|
+
readonly const: "none";
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
readonly collector: {
|
|
657
|
+
readonly anyOf: readonly [{
|
|
658
|
+
readonly properties: {
|
|
659
|
+
readonly collector: {
|
|
660
|
+
readonly const: "vta";
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
readonly not: {
|
|
664
|
+
readonly anyOf: readonly [{
|
|
665
|
+
readonly required: readonly ["claim"];
|
|
666
|
+
}, {
|
|
667
|
+
readonly required: readonly ["notCollectedReason"];
|
|
668
|
+
}];
|
|
669
|
+
};
|
|
670
|
+
}, {
|
|
671
|
+
readonly required: readonly ["claim"];
|
|
672
|
+
}, {
|
|
673
|
+
readonly required: readonly ["notCollectedReason"];
|
|
674
|
+
}];
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
readonly NotCollectedReason: {
|
|
679
|
+
readonly title: "NotCollectedReason";
|
|
680
|
+
readonly description: "Why nobody collects for an identifier the VTA would otherwise collect for: `limit`, the VTA is at the bound it states on the number of identifiers it collects for (VTI-NTF-088); `conflict`, another connection for the identifier kept closing the VTA's, and the VTA stopped after the bound it states until the conflict is resolved (VTI-NTF-085). `disabled`, the VTA's operator has not enabled collection by default (VTI-NTF-093), so the VTA collects for no identifier a client has not claimed.";
|
|
681
|
+
readonly type: "string";
|
|
682
|
+
readonly enum: readonly ["limit", "conflict", "disabled"];
|
|
683
|
+
};
|
|
684
|
+
readonly Claim: {
|
|
685
|
+
readonly title: "Claim";
|
|
686
|
+
readonly description: "A collection claim in force for one identifier: the client that is its collector, when the claim ends, and whether the claimant may still renew it. A claim released by a party other than its claimant, or whose claimant's access control entry no longer gives it standing in the context, is not renewable and still ends at `endsAt`, because the claimant is still connected until its own clock tells it to stop (VTI-NTF-084).";
|
|
687
|
+
readonly type: "object";
|
|
688
|
+
readonly additionalProperties: false;
|
|
689
|
+
readonly required: readonly ["claimant", "endsAt", "renewable"];
|
|
690
|
+
readonly properties: {
|
|
691
|
+
readonly claimant: {
|
|
692
|
+
readonly $ref: "#/$defs/Did";
|
|
693
|
+
readonly description: "The client holding the claim: the subject of the access control entry it was granted to.";
|
|
694
|
+
};
|
|
695
|
+
readonly endsAt: {
|
|
696
|
+
readonly type: "string";
|
|
697
|
+
readonly format: "date-time";
|
|
698
|
+
readonly description: "When the claim ends unless renewed. The claimant stops collecting before this instant less its clock-skew tolerance; the VTA resumes no earlier than this instant plus its own (VTI-NTF-083, VTI-NTF-084).";
|
|
699
|
+
};
|
|
700
|
+
readonly renewable: {
|
|
701
|
+
readonly type: "boolean";
|
|
702
|
+
readonly description: "Whether the claimant may renew the claim with vta/collection/claim before it ends.";
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
readonly Did: {
|
|
707
|
+
readonly title: "Did";
|
|
708
|
+
readonly description: "A DID.";
|
|
709
|
+
readonly type: "string";
|
|
710
|
+
readonly minLength: 8;
|
|
711
|
+
readonly maxLength: 2048;
|
|
712
|
+
readonly pattern: "^did:[a-z0-9]+:\\S+$";
|
|
713
|
+
};
|
|
714
|
+
readonly Collector: {
|
|
715
|
+
readonly title: "Collector";
|
|
716
|
+
readonly description: "Who collects for an identifier: `vta`, the VTA itself; `client`, the claimant of a collection claim in force; or `none`, nobody, for the reason given in `notCollectedReason`.";
|
|
717
|
+
readonly type: "string";
|
|
718
|
+
readonly enum: readonly ["vta", "client", "none"];
|
|
719
|
+
};
|
|
720
|
+
readonly Ext: {
|
|
721
|
+
readonly title: "Ext";
|
|
722
|
+
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.";
|
|
723
|
+
readonly type: "object";
|
|
724
|
+
readonly minProperties: 1;
|
|
725
|
+
readonly additionalProperties: true;
|
|
726
|
+
readonly propertyNames: {
|
|
727
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
readonly ContextId: {
|
|
731
|
+
readonly title: "ContextId";
|
|
732
|
+
readonly description: "The trust context the identifier belongs to.";
|
|
733
|
+
readonly type: "string";
|
|
734
|
+
readonly minLength: 1;
|
|
735
|
+
readonly maxLength: 256;
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
};
|
|
739
|
+
};
|
|
740
|
+
//# sourceMappingURL=payload.d.ts.map
|