@openvtc/trust-tasks 0.16.2 → 0.16.4
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 +76 -0
- package/dist/consent/approve-request/0.1/payload.d.ts +267 -0
- package/dist/consent/approve-request/0.1/payload.d.ts.map +1 -0
- package/dist/consent/approve-request/0.1/payload.js +138 -0
- package/dist/consent/approve-request/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/vault/credentials/archive/0.1/payload.d.ts +297 -0
- package/dist/vault/credentials/archive/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/archive/0.1/payload.js +171 -0
- package/dist/vault/credentials/archive/0.1/payload.js.map +1 -0
- package/dist/vault/credentials/delete/0.1/payload.d.ts +333 -0
- package/dist/vault/credentials/delete/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/delete/0.1/payload.js +185 -0
- package/dist/vault/credentials/delete/0.1/payload.js.map +1 -0
- package/dist/vault/credentials/get/0.1/payload.d.ts +244 -0
- package/dist/vault/credentials/get/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/get/0.1/payload.js +137 -0
- package/dist/vault/credentials/get/0.1/payload.js.map +1 -0
- package/dist/vault/credentials/purge/0.1/payload.d.ts +297 -0
- package/dist/vault/credentials/purge/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/purge/0.1/payload.js +171 -0
- package/dist/vault/credentials/purge/0.1/payload.js.map +1 -0
- package/dist/vault/credentials/query/0.1/payload.d.ts +689 -0
- package/dist/vault/credentials/query/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/query/0.1/payload.js +350 -0
- package/dist/vault/credentials/query/0.1/payload.js.map +1 -0
- package/dist/vault/credentials/receive/0.1/payload.d.ts +414 -0
- package/dist/vault/credentials/receive/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/receive/0.1/payload.js +226 -0
- package/dist/vault/credentials/receive/0.1/payload.js.map +1 -0
- package/dist/vault/credentials/restore/0.1/payload.d.ts +297 -0
- package/dist/vault/credentials/restore/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/restore/0.1/payload.js +171 -0
- package/dist/vault/credentials/restore/0.1/payload.js.map +1 -0
- package/dist/vault/credentials/unarchive/0.1/payload.d.ts +297 -0
- package/dist/vault/credentials/unarchive/0.1/payload.d.ts.map +1 -0
- package/dist/vault/credentials/unarchive/0.1/payload.js +171 -0
- package/dist/vault/credentials/unarchive/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/consent/approve-request/0.1/payload.ts +200 -0
- package/src/index.ts +9 -0
- package/src/vault/credentials/archive/0.1/payload.ts +217 -0
- package/src/vault/credentials/delete/0.1/payload.ts +239 -0
- package/src/vault/credentials/get/0.1/payload.ts +178 -0
- package/src/vault/credentials/purge/0.1/payload.ts +217 -0
- package/src/vault/credentials/query/0.1/payload.ts +459 -0
- package/src/vault/credentials/receive/0.1/payload.ts +298 -0
- package/src/vault/credentials/restore/0.1/payload.ts +217 -0
- package/src/vault/credentials/unarchive/0.1/payload.ts +217 -0
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vault/credentials/query/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
6
|
+
export type Did = string;
|
|
7
|
+
/**
|
|
8
|
+
* Semantic classification. `invite`, `membership`, `role`, `endorsement` and `personhood` are defined; a maintainer MAY use another token.
|
|
9
|
+
*/
|
|
10
|
+
export type CredentialPurpose = string;
|
|
11
|
+
/**
|
|
12
|
+
* Validity, driven by the credential's own window and by status-list checks. Orthogonal to lifecycle.
|
|
13
|
+
*/
|
|
14
|
+
export type CredentialStatus = "valid" | "expired" | "revoked" | "unknown";
|
|
15
|
+
/**
|
|
16
|
+
* A filtered, body-free search over stored credentials. At least one of `type`, `communityDid`, `issuerDid`, `purpose` or `status` MUST be present — see the specification; `includeArchived` and `includeDeleted` are modifiers and do not satisfy that requirement.
|
|
17
|
+
*/
|
|
18
|
+
export interface VaultCredentialsQuery {
|
|
19
|
+
/**
|
|
20
|
+
* Match credentials carrying this VC `type` tag.
|
|
21
|
+
*/
|
|
22
|
+
type?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Match credentials held for this community or context DID.
|
|
25
|
+
*/
|
|
26
|
+
communityDid?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Match credentials issued by this DID.
|
|
29
|
+
*/
|
|
30
|
+
issuerDid?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Match the maintainer's semantic classification of the credential.
|
|
33
|
+
*/
|
|
34
|
+
purpose?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Match the validity dimension.
|
|
37
|
+
*/
|
|
38
|
+
status?: "valid" | "expired" | "revoked" | "unknown";
|
|
39
|
+
/**
|
|
40
|
+
* Modifier, not a filter: also return archived credentials matching the other constraints. Absent means false.
|
|
41
|
+
*/
|
|
42
|
+
includeArchived?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Modifier, not a filter: also return soft-deleted tombstones matching the other constraints. Absent means false.
|
|
45
|
+
*/
|
|
46
|
+
includeDeleted?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
49
|
+
*/
|
|
50
|
+
ext?: Ext;
|
|
51
|
+
}
|
|
52
|
+
export interface VaultCredentialsQueryResponsePayload {
|
|
53
|
+
/**
|
|
54
|
+
* Matching descriptors. Empty when nothing matched — a successful answer, not an error.
|
|
55
|
+
*/
|
|
56
|
+
credentials: CredentialDescriptor[];
|
|
57
|
+
/**
|
|
58
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
59
|
+
*/
|
|
60
|
+
ext?: Ext;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A body-free projection of a stored credential. Carries no claim content by construction.
|
|
64
|
+
*/
|
|
65
|
+
export interface CredentialDescriptor {
|
|
66
|
+
/**
|
|
67
|
+
* Local handle. Opaque to the consumer; the id `get`, `archive`, `delete` and the rest are keyed on.
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
/**
|
|
71
|
+
* VC `type` tags carried by the credential.
|
|
72
|
+
*/
|
|
73
|
+
types: string[];
|
|
74
|
+
issuerDid?: Did;
|
|
75
|
+
purpose?: CredentialPurpose;
|
|
76
|
+
status: CredentialStatus;
|
|
77
|
+
/**
|
|
78
|
+
* Omitted for active credentials, so an active-only result is unchanged by this member's existence.
|
|
79
|
+
*/
|
|
80
|
+
lifecycle?: "active" | "archived" | "deleted";
|
|
81
|
+
validFrom?: string;
|
|
82
|
+
validUntil?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Present iff `lifecycle` is `archived`.
|
|
85
|
+
*/
|
|
86
|
+
archivedAt?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Present iff `lifecycle` is `deleted`.
|
|
89
|
+
*/
|
|
90
|
+
deletedAt?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Present iff `lifecycle` is `deleted`. Restorable while now < graceUntil.
|
|
93
|
+
*/
|
|
94
|
+
graceUntil?: string;
|
|
95
|
+
}
|
|
96
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
97
|
+
export type { Ext };
|
|
98
|
+
/** Trust Task type URI. */
|
|
99
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vault/credentials/query/0.1";
|
|
100
|
+
/** Stable alias for this specification's request payload shape. */
|
|
101
|
+
export type Payload = VaultCredentialsQuery;
|
|
102
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
103
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vault/credentials/query/0.1#response";
|
|
104
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
105
|
+
export type Response = VaultCredentialsQueryResponsePayload;
|
|
106
|
+
/**
|
|
107
|
+
* This specification's payload schema, as a value.
|
|
108
|
+
*
|
|
109
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
110
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
111
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
112
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
113
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
114
|
+
*/
|
|
115
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
116
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
117
|
+
readonly $id: "https://trusttasks.org/spec/vault/credentials/query/0.1";
|
|
118
|
+
readonly title: "Vault Credentials — Query";
|
|
119
|
+
readonly description: "A filtered, body-free search over stored credentials. At least one of `type`, `communityDid`, `issuerDid`, `purpose` or `status` MUST be present — see the specification; `includeArchived` and `includeDeleted` are modifiers and do not satisfy that requirement.";
|
|
120
|
+
readonly type: "object";
|
|
121
|
+
readonly additionalProperties: false;
|
|
122
|
+
readonly properties: {
|
|
123
|
+
readonly type: {
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly minLength: 1;
|
|
126
|
+
readonly maxLength: 256;
|
|
127
|
+
readonly description: "Match credentials carrying this VC `type` tag.";
|
|
128
|
+
};
|
|
129
|
+
readonly communityDid: {
|
|
130
|
+
readonly $ref: "#/$defs/Did";
|
|
131
|
+
readonly description: "Match credentials held for this community or context DID.";
|
|
132
|
+
};
|
|
133
|
+
readonly issuerDid: {
|
|
134
|
+
readonly $ref: "#/$defs/Did";
|
|
135
|
+
readonly description: "Match credentials issued by this DID.";
|
|
136
|
+
};
|
|
137
|
+
readonly purpose: {
|
|
138
|
+
readonly $ref: "#/$defs/CredentialPurpose";
|
|
139
|
+
readonly description: "Match the maintainer's semantic classification of the credential.";
|
|
140
|
+
};
|
|
141
|
+
readonly status: {
|
|
142
|
+
readonly $ref: "#/$defs/CredentialStatus";
|
|
143
|
+
readonly description: "Match the validity dimension.";
|
|
144
|
+
};
|
|
145
|
+
readonly includeArchived: {
|
|
146
|
+
readonly type: "boolean";
|
|
147
|
+
readonly description: "Modifier, not a filter: also return archived credentials matching the other constraints. Absent means false.";
|
|
148
|
+
};
|
|
149
|
+
readonly includeDeleted: {
|
|
150
|
+
readonly type: "boolean";
|
|
151
|
+
readonly description: "Modifier, not a filter: also return soft-deleted tombstones matching the other constraints. Absent means false.";
|
|
152
|
+
};
|
|
153
|
+
readonly ext: {
|
|
154
|
+
readonly $ref: "#/$defs/Ext";
|
|
155
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
readonly $defs: {
|
|
159
|
+
readonly Response: {
|
|
160
|
+
readonly $anchor: "response";
|
|
161
|
+
readonly title: "Vault Credentials Query — response payload";
|
|
162
|
+
readonly type: "object";
|
|
163
|
+
readonly additionalProperties: false;
|
|
164
|
+
readonly required: readonly ["credentials"];
|
|
165
|
+
readonly properties: {
|
|
166
|
+
readonly credentials: {
|
|
167
|
+
readonly type: "array";
|
|
168
|
+
readonly items: {
|
|
169
|
+
readonly $ref: "#/$defs/CredentialDescriptor";
|
|
170
|
+
};
|
|
171
|
+
readonly description: "Matching descriptors. Empty when nothing matched — a successful answer, not an error.";
|
|
172
|
+
};
|
|
173
|
+
readonly ext: {
|
|
174
|
+
readonly $ref: "#/$defs/Ext";
|
|
175
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly CredentialDescriptor: {
|
|
180
|
+
readonly title: "Credential descriptor";
|
|
181
|
+
readonly description: "A body-free projection of a stored credential. Carries no claim content by construction.";
|
|
182
|
+
readonly type: "object";
|
|
183
|
+
readonly additionalProperties: false;
|
|
184
|
+
readonly required: readonly ["id", "types", "status"];
|
|
185
|
+
readonly properties: {
|
|
186
|
+
readonly id: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly minLength: 1;
|
|
189
|
+
readonly maxLength: 256;
|
|
190
|
+
readonly description: "Local handle. Opaque to the consumer; the id `get`, `archive`, `delete` and the rest are keyed on.";
|
|
191
|
+
};
|
|
192
|
+
readonly types: {
|
|
193
|
+
readonly type: "array";
|
|
194
|
+
readonly items: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly minLength: 1;
|
|
197
|
+
readonly maxLength: 256;
|
|
198
|
+
};
|
|
199
|
+
readonly description: "VC `type` tags carried by the credential.";
|
|
200
|
+
};
|
|
201
|
+
readonly issuerDid: {
|
|
202
|
+
readonly $ref: "#/$defs/Did";
|
|
203
|
+
};
|
|
204
|
+
readonly purpose: {
|
|
205
|
+
readonly $ref: "#/$defs/CredentialPurpose";
|
|
206
|
+
};
|
|
207
|
+
readonly status: {
|
|
208
|
+
readonly $ref: "#/$defs/CredentialStatus";
|
|
209
|
+
};
|
|
210
|
+
readonly lifecycle: {
|
|
211
|
+
readonly $ref: "#/$defs/VaultLifecycle";
|
|
212
|
+
readonly description: "Omitted for active credentials, so an active-only result is unchanged by this member's existence.";
|
|
213
|
+
};
|
|
214
|
+
readonly validFrom: {
|
|
215
|
+
readonly type: "string";
|
|
216
|
+
readonly format: "date-time";
|
|
217
|
+
};
|
|
218
|
+
readonly validUntil: {
|
|
219
|
+
readonly type: "string";
|
|
220
|
+
readonly format: "date-time";
|
|
221
|
+
};
|
|
222
|
+
readonly archivedAt: {
|
|
223
|
+
readonly type: "string";
|
|
224
|
+
readonly format: "date-time";
|
|
225
|
+
readonly description: "Present iff `lifecycle` is `archived`.";
|
|
226
|
+
};
|
|
227
|
+
readonly deletedAt: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly format: "date-time";
|
|
230
|
+
readonly description: "Present iff `lifecycle` is `deleted`.";
|
|
231
|
+
};
|
|
232
|
+
readonly graceUntil: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
readonly format: "date-time";
|
|
235
|
+
readonly description: "Present iff `lifecycle` is `deleted`. Restorable while now < graceUntil.";
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
readonly CredentialStatus: {
|
|
240
|
+
readonly type: "string";
|
|
241
|
+
readonly enum: readonly ["valid", "expired", "revoked", "unknown"];
|
|
242
|
+
readonly description: "Validity, driven by the credential's own window and by status-list checks. Orthogonal to lifecycle.";
|
|
243
|
+
};
|
|
244
|
+
readonly CredentialPurpose: {
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
readonly minLength: 1;
|
|
247
|
+
readonly maxLength: 128;
|
|
248
|
+
readonly description: "Semantic classification. `invite`, `membership`, `role`, `endorsement` and `personhood` are defined; a maintainer MAY use another token.";
|
|
249
|
+
};
|
|
250
|
+
readonly VaultLifecycle: {
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
readonly enum: readonly ["active", "archived", "deleted"];
|
|
253
|
+
readonly description: "Archival state, chosen through this family. Orthogonal to validity.";
|
|
254
|
+
};
|
|
255
|
+
readonly Did: {
|
|
256
|
+
readonly type: "string";
|
|
257
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
258
|
+
readonly maxLength: 2048;
|
|
259
|
+
};
|
|
260
|
+
readonly Ext: {
|
|
261
|
+
readonly title: "Ext";
|
|
262
|
+
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.";
|
|
263
|
+
readonly type: "object";
|
|
264
|
+
readonly minProperties: 1;
|
|
265
|
+
readonly additionalProperties: true;
|
|
266
|
+
readonly propertyNames: {
|
|
267
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
273
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
274
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
275
|
+
readonly $ref: "#/$defs/Response";
|
|
276
|
+
readonly $defs: {
|
|
277
|
+
readonly Response: {
|
|
278
|
+
readonly $anchor: "response";
|
|
279
|
+
readonly title: "Vault Credentials Query — response payload";
|
|
280
|
+
readonly type: "object";
|
|
281
|
+
readonly additionalProperties: false;
|
|
282
|
+
readonly required: readonly ["credentials"];
|
|
283
|
+
readonly properties: {
|
|
284
|
+
readonly credentials: {
|
|
285
|
+
readonly type: "array";
|
|
286
|
+
readonly items: {
|
|
287
|
+
readonly $ref: "#/$defs/CredentialDescriptor";
|
|
288
|
+
};
|
|
289
|
+
readonly description: "Matching descriptors. Empty when nothing matched — a successful answer, not an error.";
|
|
290
|
+
};
|
|
291
|
+
readonly ext: {
|
|
292
|
+
readonly $ref: "#/$defs/Ext";
|
|
293
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
readonly CredentialDescriptor: {
|
|
298
|
+
readonly title: "Credential descriptor";
|
|
299
|
+
readonly description: "A body-free projection of a stored credential. Carries no claim content by construction.";
|
|
300
|
+
readonly type: "object";
|
|
301
|
+
readonly additionalProperties: false;
|
|
302
|
+
readonly required: readonly ["id", "types", "status"];
|
|
303
|
+
readonly properties: {
|
|
304
|
+
readonly id: {
|
|
305
|
+
readonly type: "string";
|
|
306
|
+
readonly minLength: 1;
|
|
307
|
+
readonly maxLength: 256;
|
|
308
|
+
readonly description: "Local handle. Opaque to the consumer; the id `get`, `archive`, `delete` and the rest are keyed on.";
|
|
309
|
+
};
|
|
310
|
+
readonly types: {
|
|
311
|
+
readonly type: "array";
|
|
312
|
+
readonly items: {
|
|
313
|
+
readonly type: "string";
|
|
314
|
+
readonly minLength: 1;
|
|
315
|
+
readonly maxLength: 256;
|
|
316
|
+
};
|
|
317
|
+
readonly description: "VC `type` tags carried by the credential.";
|
|
318
|
+
};
|
|
319
|
+
readonly issuerDid: {
|
|
320
|
+
readonly $ref: "#/$defs/Did";
|
|
321
|
+
};
|
|
322
|
+
readonly purpose: {
|
|
323
|
+
readonly $ref: "#/$defs/CredentialPurpose";
|
|
324
|
+
};
|
|
325
|
+
readonly status: {
|
|
326
|
+
readonly $ref: "#/$defs/CredentialStatus";
|
|
327
|
+
};
|
|
328
|
+
readonly lifecycle: {
|
|
329
|
+
readonly $ref: "#/$defs/VaultLifecycle";
|
|
330
|
+
readonly description: "Omitted for active credentials, so an active-only result is unchanged by this member's existence.";
|
|
331
|
+
};
|
|
332
|
+
readonly validFrom: {
|
|
333
|
+
readonly type: "string";
|
|
334
|
+
readonly format: "date-time";
|
|
335
|
+
};
|
|
336
|
+
readonly validUntil: {
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
readonly format: "date-time";
|
|
339
|
+
};
|
|
340
|
+
readonly archivedAt: {
|
|
341
|
+
readonly type: "string";
|
|
342
|
+
readonly format: "date-time";
|
|
343
|
+
readonly description: "Present iff `lifecycle` is `archived`.";
|
|
344
|
+
};
|
|
345
|
+
readonly deletedAt: {
|
|
346
|
+
readonly type: "string";
|
|
347
|
+
readonly format: "date-time";
|
|
348
|
+
readonly description: "Present iff `lifecycle` is `deleted`.";
|
|
349
|
+
};
|
|
350
|
+
readonly graceUntil: {
|
|
351
|
+
readonly type: "string";
|
|
352
|
+
readonly format: "date-time";
|
|
353
|
+
readonly description: "Present iff `lifecycle` is `deleted`. Restorable while now < graceUntil.";
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
readonly CredentialStatus: {
|
|
358
|
+
readonly type: "string";
|
|
359
|
+
readonly enum: readonly ["valid", "expired", "revoked", "unknown"];
|
|
360
|
+
readonly description: "Validity, driven by the credential's own window and by status-list checks. Orthogonal to lifecycle.";
|
|
361
|
+
};
|
|
362
|
+
readonly CredentialPurpose: {
|
|
363
|
+
readonly type: "string";
|
|
364
|
+
readonly minLength: 1;
|
|
365
|
+
readonly maxLength: 128;
|
|
366
|
+
readonly description: "Semantic classification. `invite`, `membership`, `role`, `endorsement` and `personhood` are defined; a maintainer MAY use another token.";
|
|
367
|
+
};
|
|
368
|
+
readonly VaultLifecycle: {
|
|
369
|
+
readonly type: "string";
|
|
370
|
+
readonly enum: readonly ["active", "archived", "deleted"];
|
|
371
|
+
readonly description: "Archival state, chosen through this family. Orthogonal to validity.";
|
|
372
|
+
};
|
|
373
|
+
readonly Did: {
|
|
374
|
+
readonly type: "string";
|
|
375
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
376
|
+
readonly maxLength: 2048;
|
|
377
|
+
};
|
|
378
|
+
readonly Ext: {
|
|
379
|
+
readonly title: "Ext";
|
|
380
|
+
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.";
|
|
381
|
+
readonly type: "object";
|
|
382
|
+
readonly minProperties: 1;
|
|
383
|
+
readonly additionalProperties: true;
|
|
384
|
+
readonly propertyNames: {
|
|
385
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
392
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
393
|
+
* per-specification and cannot be derived from the document alone, and
|
|
394
|
+
* item 2 needs the schema this carries.
|
|
395
|
+
*/
|
|
396
|
+
export declare const SPEC: {
|
|
397
|
+
readonly typeUri: "https://trusttasks.org/spec/vault/credentials/query/0.1";
|
|
398
|
+
readonly isBearer: false;
|
|
399
|
+
readonly isProofRequired: false;
|
|
400
|
+
readonly isRecipientRequired: true;
|
|
401
|
+
readonly isIssuedAtRequired: false;
|
|
402
|
+
readonly payloadSchema: {
|
|
403
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
404
|
+
readonly $id: "https://trusttasks.org/spec/vault/credentials/query/0.1";
|
|
405
|
+
readonly title: "Vault Credentials — Query";
|
|
406
|
+
readonly description: "A filtered, body-free search over stored credentials. At least one of `type`, `communityDid`, `issuerDid`, `purpose` or `status` MUST be present — see the specification; `includeArchived` and `includeDeleted` are modifiers and do not satisfy that requirement.";
|
|
407
|
+
readonly type: "object";
|
|
408
|
+
readonly additionalProperties: false;
|
|
409
|
+
readonly properties: {
|
|
410
|
+
readonly type: {
|
|
411
|
+
readonly type: "string";
|
|
412
|
+
readonly minLength: 1;
|
|
413
|
+
readonly maxLength: 256;
|
|
414
|
+
readonly description: "Match credentials carrying this VC `type` tag.";
|
|
415
|
+
};
|
|
416
|
+
readonly communityDid: {
|
|
417
|
+
readonly $ref: "#/$defs/Did";
|
|
418
|
+
readonly description: "Match credentials held for this community or context DID.";
|
|
419
|
+
};
|
|
420
|
+
readonly issuerDid: {
|
|
421
|
+
readonly $ref: "#/$defs/Did";
|
|
422
|
+
readonly description: "Match credentials issued by this DID.";
|
|
423
|
+
};
|
|
424
|
+
readonly purpose: {
|
|
425
|
+
readonly $ref: "#/$defs/CredentialPurpose";
|
|
426
|
+
readonly description: "Match the maintainer's semantic classification of the credential.";
|
|
427
|
+
};
|
|
428
|
+
readonly status: {
|
|
429
|
+
readonly $ref: "#/$defs/CredentialStatus";
|
|
430
|
+
readonly description: "Match the validity dimension.";
|
|
431
|
+
};
|
|
432
|
+
readonly includeArchived: {
|
|
433
|
+
readonly type: "boolean";
|
|
434
|
+
readonly description: "Modifier, not a filter: also return archived credentials matching the other constraints. Absent means false.";
|
|
435
|
+
};
|
|
436
|
+
readonly includeDeleted: {
|
|
437
|
+
readonly type: "boolean";
|
|
438
|
+
readonly description: "Modifier, not a filter: also return soft-deleted tombstones matching the other constraints. Absent means false.";
|
|
439
|
+
};
|
|
440
|
+
readonly ext: {
|
|
441
|
+
readonly $ref: "#/$defs/Ext";
|
|
442
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
readonly $defs: {
|
|
446
|
+
readonly Response: {
|
|
447
|
+
readonly $anchor: "response";
|
|
448
|
+
readonly title: "Vault Credentials Query — response payload";
|
|
449
|
+
readonly type: "object";
|
|
450
|
+
readonly additionalProperties: false;
|
|
451
|
+
readonly required: readonly ["credentials"];
|
|
452
|
+
readonly properties: {
|
|
453
|
+
readonly credentials: {
|
|
454
|
+
readonly type: "array";
|
|
455
|
+
readonly items: {
|
|
456
|
+
readonly $ref: "#/$defs/CredentialDescriptor";
|
|
457
|
+
};
|
|
458
|
+
readonly description: "Matching descriptors. Empty when nothing matched — a successful answer, not an error.";
|
|
459
|
+
};
|
|
460
|
+
readonly ext: {
|
|
461
|
+
readonly $ref: "#/$defs/Ext";
|
|
462
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
readonly CredentialDescriptor: {
|
|
467
|
+
readonly title: "Credential descriptor";
|
|
468
|
+
readonly description: "A body-free projection of a stored credential. Carries no claim content by construction.";
|
|
469
|
+
readonly type: "object";
|
|
470
|
+
readonly additionalProperties: false;
|
|
471
|
+
readonly required: readonly ["id", "types", "status"];
|
|
472
|
+
readonly properties: {
|
|
473
|
+
readonly id: {
|
|
474
|
+
readonly type: "string";
|
|
475
|
+
readonly minLength: 1;
|
|
476
|
+
readonly maxLength: 256;
|
|
477
|
+
readonly description: "Local handle. Opaque to the consumer; the id `get`, `archive`, `delete` and the rest are keyed on.";
|
|
478
|
+
};
|
|
479
|
+
readonly types: {
|
|
480
|
+
readonly type: "array";
|
|
481
|
+
readonly items: {
|
|
482
|
+
readonly type: "string";
|
|
483
|
+
readonly minLength: 1;
|
|
484
|
+
readonly maxLength: 256;
|
|
485
|
+
};
|
|
486
|
+
readonly description: "VC `type` tags carried by the credential.";
|
|
487
|
+
};
|
|
488
|
+
readonly issuerDid: {
|
|
489
|
+
readonly $ref: "#/$defs/Did";
|
|
490
|
+
};
|
|
491
|
+
readonly purpose: {
|
|
492
|
+
readonly $ref: "#/$defs/CredentialPurpose";
|
|
493
|
+
};
|
|
494
|
+
readonly status: {
|
|
495
|
+
readonly $ref: "#/$defs/CredentialStatus";
|
|
496
|
+
};
|
|
497
|
+
readonly lifecycle: {
|
|
498
|
+
readonly $ref: "#/$defs/VaultLifecycle";
|
|
499
|
+
readonly description: "Omitted for active credentials, so an active-only result is unchanged by this member's existence.";
|
|
500
|
+
};
|
|
501
|
+
readonly validFrom: {
|
|
502
|
+
readonly type: "string";
|
|
503
|
+
readonly format: "date-time";
|
|
504
|
+
};
|
|
505
|
+
readonly validUntil: {
|
|
506
|
+
readonly type: "string";
|
|
507
|
+
readonly format: "date-time";
|
|
508
|
+
};
|
|
509
|
+
readonly archivedAt: {
|
|
510
|
+
readonly type: "string";
|
|
511
|
+
readonly format: "date-time";
|
|
512
|
+
readonly description: "Present iff `lifecycle` is `archived`.";
|
|
513
|
+
};
|
|
514
|
+
readonly deletedAt: {
|
|
515
|
+
readonly type: "string";
|
|
516
|
+
readonly format: "date-time";
|
|
517
|
+
readonly description: "Present iff `lifecycle` is `deleted`.";
|
|
518
|
+
};
|
|
519
|
+
readonly graceUntil: {
|
|
520
|
+
readonly type: "string";
|
|
521
|
+
readonly format: "date-time";
|
|
522
|
+
readonly description: "Present iff `lifecycle` is `deleted`. Restorable while now < graceUntil.";
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
readonly CredentialStatus: {
|
|
527
|
+
readonly type: "string";
|
|
528
|
+
readonly enum: readonly ["valid", "expired", "revoked", "unknown"];
|
|
529
|
+
readonly description: "Validity, driven by the credential's own window and by status-list checks. Orthogonal to lifecycle.";
|
|
530
|
+
};
|
|
531
|
+
readonly CredentialPurpose: {
|
|
532
|
+
readonly type: "string";
|
|
533
|
+
readonly minLength: 1;
|
|
534
|
+
readonly maxLength: 128;
|
|
535
|
+
readonly description: "Semantic classification. `invite`, `membership`, `role`, `endorsement` and `personhood` are defined; a maintainer MAY use another token.";
|
|
536
|
+
};
|
|
537
|
+
readonly VaultLifecycle: {
|
|
538
|
+
readonly type: "string";
|
|
539
|
+
readonly enum: readonly ["active", "archived", "deleted"];
|
|
540
|
+
readonly description: "Archival state, chosen through this family. Orthogonal to validity.";
|
|
541
|
+
};
|
|
542
|
+
readonly Did: {
|
|
543
|
+
readonly type: "string";
|
|
544
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
545
|
+
readonly maxLength: 2048;
|
|
546
|
+
};
|
|
547
|
+
readonly Ext: {
|
|
548
|
+
readonly title: "Ext";
|
|
549
|
+
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.";
|
|
550
|
+
readonly type: "object";
|
|
551
|
+
readonly minProperties: 1;
|
|
552
|
+
readonly additionalProperties: true;
|
|
553
|
+
readonly propertyNames: {
|
|
554
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
/**
|
|
561
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
562
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
563
|
+
* parties (§7.3 item 5).
|
|
564
|
+
*/
|
|
565
|
+
export declare const RESPONSE_SPEC: {
|
|
566
|
+
readonly typeUri: "https://trusttasks.org/spec/vault/credentials/query/0.1#response";
|
|
567
|
+
readonly isBearer: false;
|
|
568
|
+
readonly isProofRequired: false;
|
|
569
|
+
readonly isRecipientRequired: true;
|
|
570
|
+
readonly isIssuedAtRequired: false;
|
|
571
|
+
readonly payloadSchema: {
|
|
572
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
573
|
+
readonly $ref: "#/$defs/Response";
|
|
574
|
+
readonly $defs: {
|
|
575
|
+
readonly Response: {
|
|
576
|
+
readonly $anchor: "response";
|
|
577
|
+
readonly title: "Vault Credentials Query — response payload";
|
|
578
|
+
readonly type: "object";
|
|
579
|
+
readonly additionalProperties: false;
|
|
580
|
+
readonly required: readonly ["credentials"];
|
|
581
|
+
readonly properties: {
|
|
582
|
+
readonly credentials: {
|
|
583
|
+
readonly type: "array";
|
|
584
|
+
readonly items: {
|
|
585
|
+
readonly $ref: "#/$defs/CredentialDescriptor";
|
|
586
|
+
};
|
|
587
|
+
readonly description: "Matching descriptors. Empty when nothing matched — a successful answer, not an error.";
|
|
588
|
+
};
|
|
589
|
+
readonly ext: {
|
|
590
|
+
readonly $ref: "#/$defs/Ext";
|
|
591
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
readonly CredentialDescriptor: {
|
|
596
|
+
readonly title: "Credential descriptor";
|
|
597
|
+
readonly description: "A body-free projection of a stored credential. Carries no claim content by construction.";
|
|
598
|
+
readonly type: "object";
|
|
599
|
+
readonly additionalProperties: false;
|
|
600
|
+
readonly required: readonly ["id", "types", "status"];
|
|
601
|
+
readonly properties: {
|
|
602
|
+
readonly id: {
|
|
603
|
+
readonly type: "string";
|
|
604
|
+
readonly minLength: 1;
|
|
605
|
+
readonly maxLength: 256;
|
|
606
|
+
readonly description: "Local handle. Opaque to the consumer; the id `get`, `archive`, `delete` and the rest are keyed on.";
|
|
607
|
+
};
|
|
608
|
+
readonly types: {
|
|
609
|
+
readonly type: "array";
|
|
610
|
+
readonly items: {
|
|
611
|
+
readonly type: "string";
|
|
612
|
+
readonly minLength: 1;
|
|
613
|
+
readonly maxLength: 256;
|
|
614
|
+
};
|
|
615
|
+
readonly description: "VC `type` tags carried by the credential.";
|
|
616
|
+
};
|
|
617
|
+
readonly issuerDid: {
|
|
618
|
+
readonly $ref: "#/$defs/Did";
|
|
619
|
+
};
|
|
620
|
+
readonly purpose: {
|
|
621
|
+
readonly $ref: "#/$defs/CredentialPurpose";
|
|
622
|
+
};
|
|
623
|
+
readonly status: {
|
|
624
|
+
readonly $ref: "#/$defs/CredentialStatus";
|
|
625
|
+
};
|
|
626
|
+
readonly lifecycle: {
|
|
627
|
+
readonly $ref: "#/$defs/VaultLifecycle";
|
|
628
|
+
readonly description: "Omitted for active credentials, so an active-only result is unchanged by this member's existence.";
|
|
629
|
+
};
|
|
630
|
+
readonly validFrom: {
|
|
631
|
+
readonly type: "string";
|
|
632
|
+
readonly format: "date-time";
|
|
633
|
+
};
|
|
634
|
+
readonly validUntil: {
|
|
635
|
+
readonly type: "string";
|
|
636
|
+
readonly format: "date-time";
|
|
637
|
+
};
|
|
638
|
+
readonly archivedAt: {
|
|
639
|
+
readonly type: "string";
|
|
640
|
+
readonly format: "date-time";
|
|
641
|
+
readonly description: "Present iff `lifecycle` is `archived`.";
|
|
642
|
+
};
|
|
643
|
+
readonly deletedAt: {
|
|
644
|
+
readonly type: "string";
|
|
645
|
+
readonly format: "date-time";
|
|
646
|
+
readonly description: "Present iff `lifecycle` is `deleted`.";
|
|
647
|
+
};
|
|
648
|
+
readonly graceUntil: {
|
|
649
|
+
readonly type: "string";
|
|
650
|
+
readonly format: "date-time";
|
|
651
|
+
readonly description: "Present iff `lifecycle` is `deleted`. Restorable while now < graceUntil.";
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
readonly CredentialStatus: {
|
|
656
|
+
readonly type: "string";
|
|
657
|
+
readonly enum: readonly ["valid", "expired", "revoked", "unknown"];
|
|
658
|
+
readonly description: "Validity, driven by the credential's own window and by status-list checks. Orthogonal to lifecycle.";
|
|
659
|
+
};
|
|
660
|
+
readonly CredentialPurpose: {
|
|
661
|
+
readonly type: "string";
|
|
662
|
+
readonly minLength: 1;
|
|
663
|
+
readonly maxLength: 128;
|
|
664
|
+
readonly description: "Semantic classification. `invite`, `membership`, `role`, `endorsement` and `personhood` are defined; a maintainer MAY use another token.";
|
|
665
|
+
};
|
|
666
|
+
readonly VaultLifecycle: {
|
|
667
|
+
readonly type: "string";
|
|
668
|
+
readonly enum: readonly ["active", "archived", "deleted"];
|
|
669
|
+
readonly description: "Archival state, chosen through this family. Orthogonal to validity.";
|
|
670
|
+
};
|
|
671
|
+
readonly Did: {
|
|
672
|
+
readonly type: "string";
|
|
673
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
674
|
+
readonly maxLength: 2048;
|
|
675
|
+
};
|
|
676
|
+
readonly Ext: {
|
|
677
|
+
readonly title: "Ext";
|
|
678
|
+
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.";
|
|
679
|
+
readonly type: "object";
|
|
680
|
+
readonly minProperties: 1;
|
|
681
|
+
readonly additionalProperties: true;
|
|
682
|
+
readonly propertyNames: {
|
|
683
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
684
|
+
};
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
};
|
|
689
|
+
//# sourceMappingURL=payload.d.ts.map
|