@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,298 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vault/credentials/receive/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Verify and store a W3C verifiable credential. Exactly one of `credential` or `credentialBase64` must be present.
|
|
11
|
+
*/
|
|
12
|
+
export type VaultCredentialsReceive = {
|
|
13
|
+
/**
|
|
14
|
+
* The verifiable credential as a JSON object.
|
|
15
|
+
*/
|
|
16
|
+
credential?: {};
|
|
17
|
+
/**
|
|
18
|
+
* The credential base64url-encoded without padding, for formats whose canonical form is not JSON.
|
|
19
|
+
*/
|
|
20
|
+
credentialBase64?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Credential format, when not evident from the body. An unimplemented format is refused, not stored.
|
|
23
|
+
*/
|
|
24
|
+
format?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Local handle to store under. Absent, derived from the credential's own id. A handle, not a description — see Data carried.
|
|
27
|
+
*/
|
|
28
|
+
id?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Context to hold the credential in. Absent, the consumer's own.
|
|
31
|
+
*/
|
|
32
|
+
contextId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
35
|
+
*/
|
|
36
|
+
ext?: Ext;
|
|
37
|
+
} & {
|
|
38
|
+
[k: string]: unknown | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export interface VaultCredentialsReceiveResponsePayload {
|
|
42
|
+
/**
|
|
43
|
+
* The handle the credential can now be fetched by.
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* VC `type` tags the maintainer read.
|
|
48
|
+
*/
|
|
49
|
+
types: string[];
|
|
50
|
+
/**
|
|
51
|
+
* Classification the maintainer derived. Never supplied by the consumer.
|
|
52
|
+
*/
|
|
53
|
+
purpose?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Validity the maintainer computed at storage time.
|
|
56
|
+
*/
|
|
57
|
+
status: "valid" | "expired" | "revoked" | "unknown";
|
|
58
|
+
/**
|
|
59
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
60
|
+
*/
|
|
61
|
+
ext?: Ext;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
65
|
+
export type { Ext };
|
|
66
|
+
|
|
67
|
+
/** Trust Task type URI. */
|
|
68
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vault/credentials/receive/0.1" as const;
|
|
69
|
+
|
|
70
|
+
/** Stable alias for this specification's request payload shape. */
|
|
71
|
+
export type Payload = VaultCredentialsReceive;
|
|
72
|
+
|
|
73
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
74
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/credentials/receive/0.1#response" as const;
|
|
75
|
+
|
|
76
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
77
|
+
export type Response = VaultCredentialsReceiveResponsePayload;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* This specification's payload schema, as a value.
|
|
81
|
+
*
|
|
82
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
83
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
84
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
85
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
86
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
87
|
+
*/
|
|
88
|
+
export const PAYLOAD_SCHEMA = {
|
|
89
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
90
|
+
"$id": "https://trusttasks.org/spec/vault/credentials/receive/0.1",
|
|
91
|
+
"title": "Vault Credentials — Receive",
|
|
92
|
+
"description": "Verify and store a W3C verifiable credential. Exactly one of `credential` or `credentialBase64` must be present.",
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"oneOf": [
|
|
96
|
+
{
|
|
97
|
+
"required": [
|
|
98
|
+
"credential"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"required": [
|
|
103
|
+
"credentialBase64"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"properties": {
|
|
108
|
+
"credential": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"minProperties": 1,
|
|
111
|
+
"description": "The verifiable credential as a JSON object."
|
|
112
|
+
},
|
|
113
|
+
"credentialBase64": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1,
|
|
116
|
+
"maxLength": 1048576,
|
|
117
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
118
|
+
"description": "The credential base64url-encoded without padding, for formats whose canonical form is not JSON."
|
|
119
|
+
},
|
|
120
|
+
"format": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"minLength": 1,
|
|
123
|
+
"maxLength": 128,
|
|
124
|
+
"description": "Credential format, when not evident from the body. An unimplemented format is refused, not stored."
|
|
125
|
+
},
|
|
126
|
+
"id": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"minLength": 1,
|
|
129
|
+
"maxLength": 256,
|
|
130
|
+
"description": "Local handle to store under. Absent, derived from the credential's own id. A handle, not a description — see Data carried."
|
|
131
|
+
},
|
|
132
|
+
"contextId": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"minLength": 1,
|
|
135
|
+
"maxLength": 256,
|
|
136
|
+
"description": "Context to hold the credential in. Absent, the consumer's own."
|
|
137
|
+
},
|
|
138
|
+
"ext": {
|
|
139
|
+
"$ref": "#/$defs/Ext",
|
|
140
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"$defs": {
|
|
144
|
+
"Response": {
|
|
145
|
+
"$anchor": "response",
|
|
146
|
+
"title": "Vault Credentials Receive — response payload",
|
|
147
|
+
"type": "object",
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"required": [
|
|
150
|
+
"id",
|
|
151
|
+
"types",
|
|
152
|
+
"status"
|
|
153
|
+
],
|
|
154
|
+
"properties": {
|
|
155
|
+
"id": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"minLength": 1,
|
|
158
|
+
"maxLength": 256,
|
|
159
|
+
"description": "The handle the credential can now be fetched by."
|
|
160
|
+
},
|
|
161
|
+
"types": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"items": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"minLength": 1,
|
|
166
|
+
"maxLength": 256
|
|
167
|
+
},
|
|
168
|
+
"description": "VC `type` tags the maintainer read."
|
|
169
|
+
},
|
|
170
|
+
"purpose": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"minLength": 1,
|
|
173
|
+
"maxLength": 128,
|
|
174
|
+
"description": "Classification the maintainer derived. Never supplied by the consumer."
|
|
175
|
+
},
|
|
176
|
+
"status": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"enum": [
|
|
179
|
+
"valid",
|
|
180
|
+
"expired",
|
|
181
|
+
"revoked",
|
|
182
|
+
"unknown"
|
|
183
|
+
],
|
|
184
|
+
"description": "Validity the maintainer computed at storage time."
|
|
185
|
+
},
|
|
186
|
+
"ext": {
|
|
187
|
+
"$ref": "#/$defs/Ext",
|
|
188
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"Ext": {
|
|
193
|
+
"title": "Ext",
|
|
194
|
+
"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.",
|
|
195
|
+
"type": "object",
|
|
196
|
+
"minProperties": 1,
|
|
197
|
+
"additionalProperties": true,
|
|
198
|
+
"propertyNames": {
|
|
199
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
} as const;
|
|
204
|
+
|
|
205
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
206
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
207
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
208
|
+
"$ref": "#/$defs/Response",
|
|
209
|
+
"$defs": {
|
|
210
|
+
"Response": {
|
|
211
|
+
"$anchor": "response",
|
|
212
|
+
"title": "Vault Credentials Receive — response payload",
|
|
213
|
+
"type": "object",
|
|
214
|
+
"additionalProperties": false,
|
|
215
|
+
"required": [
|
|
216
|
+
"id",
|
|
217
|
+
"types",
|
|
218
|
+
"status"
|
|
219
|
+
],
|
|
220
|
+
"properties": {
|
|
221
|
+
"id": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"minLength": 1,
|
|
224
|
+
"maxLength": 256,
|
|
225
|
+
"description": "The handle the credential can now be fetched by."
|
|
226
|
+
},
|
|
227
|
+
"types": {
|
|
228
|
+
"type": "array",
|
|
229
|
+
"items": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"minLength": 1,
|
|
232
|
+
"maxLength": 256
|
|
233
|
+
},
|
|
234
|
+
"description": "VC `type` tags the maintainer read."
|
|
235
|
+
},
|
|
236
|
+
"purpose": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"minLength": 1,
|
|
239
|
+
"maxLength": 128,
|
|
240
|
+
"description": "Classification the maintainer derived. Never supplied by the consumer."
|
|
241
|
+
},
|
|
242
|
+
"status": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"enum": [
|
|
245
|
+
"valid",
|
|
246
|
+
"expired",
|
|
247
|
+
"revoked",
|
|
248
|
+
"unknown"
|
|
249
|
+
],
|
|
250
|
+
"description": "Validity the maintainer computed at storage time."
|
|
251
|
+
},
|
|
252
|
+
"ext": {
|
|
253
|
+
"$ref": "#/$defs/Ext",
|
|
254
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"Ext": {
|
|
259
|
+
"title": "Ext",
|
|
260
|
+
"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.",
|
|
261
|
+
"type": "object",
|
|
262
|
+
"minProperties": 1,
|
|
263
|
+
"additionalProperties": true,
|
|
264
|
+
"propertyNames": {
|
|
265
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
} as const;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
273
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
274
|
+
* per-specification and cannot be derived from the document alone, and
|
|
275
|
+
* item 2 needs the schema this carries.
|
|
276
|
+
*/
|
|
277
|
+
export const SPEC = {
|
|
278
|
+
typeUri: TYPE_URI,
|
|
279
|
+
isBearer: false,
|
|
280
|
+
isProofRequired: true,
|
|
281
|
+
isRecipientRequired: true,
|
|
282
|
+
isIssuedAtRequired: true,
|
|
283
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
284
|
+
} as const;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
288
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
289
|
+
* parties (§7.3 item 5).
|
|
290
|
+
*/
|
|
291
|
+
export const RESPONSE_SPEC = {
|
|
292
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
293
|
+
isBearer: false,
|
|
294
|
+
isProofRequired: true,
|
|
295
|
+
isRecipientRequired: true,
|
|
296
|
+
isIssuedAtRequired: true,
|
|
297
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
298
|
+
} as const;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vault/credentials/restore/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Return a soft-deleted credential to the active state, while its grace window lasts.
|
|
11
|
+
*/
|
|
12
|
+
export interface VaultCredentialsRestore {
|
|
13
|
+
/**
|
|
14
|
+
* Local handle from a query descriptor. Opaque; consumers must not derive or guess one.
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Free text recorded with the transition. Must not carry credential contents.
|
|
19
|
+
*/
|
|
20
|
+
reason?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
23
|
+
*/
|
|
24
|
+
ext?: Ext;
|
|
25
|
+
}
|
|
26
|
+
export interface VaultCredentialsRestoreResponsePayload {
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* State after the transition, echoed rather than left to be inferred from the verb.
|
|
30
|
+
*/
|
|
31
|
+
lifecycle: "active" | "archived" | "deleted";
|
|
32
|
+
/**
|
|
33
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
34
|
+
*/
|
|
35
|
+
ext?: Ext;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
39
|
+
export type { Ext };
|
|
40
|
+
|
|
41
|
+
/** Trust Task type URI. */
|
|
42
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vault/credentials/restore/0.1" as const;
|
|
43
|
+
|
|
44
|
+
/** Stable alias for this specification's request payload shape. */
|
|
45
|
+
export type Payload = VaultCredentialsRestore;
|
|
46
|
+
|
|
47
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
48
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/credentials/restore/0.1#response" as const;
|
|
49
|
+
|
|
50
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
51
|
+
export type Response = VaultCredentialsRestoreResponsePayload;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* This specification's payload schema, as a value.
|
|
55
|
+
*
|
|
56
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
57
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
58
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
59
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
60
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
61
|
+
*/
|
|
62
|
+
export const PAYLOAD_SCHEMA = {
|
|
63
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
64
|
+
"$id": "https://trusttasks.org/spec/vault/credentials/restore/0.1",
|
|
65
|
+
"title": "Vault Credentials — Restore",
|
|
66
|
+
"description": "Return a soft-deleted credential to the active state, while its grace window lasts.",
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": [
|
|
70
|
+
"id"
|
|
71
|
+
],
|
|
72
|
+
"properties": {
|
|
73
|
+
"id": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1,
|
|
76
|
+
"maxLength": 256,
|
|
77
|
+
"description": "Local handle from a query descriptor. Opaque; consumers must not derive or guess one."
|
|
78
|
+
},
|
|
79
|
+
"reason": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"maxLength": 512,
|
|
83
|
+
"description": "Free text recorded with the transition. Must not carry credential contents."
|
|
84
|
+
},
|
|
85
|
+
"ext": {
|
|
86
|
+
"$ref": "#/$defs/Ext",
|
|
87
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"$defs": {
|
|
91
|
+
"Response": {
|
|
92
|
+
"$anchor": "response",
|
|
93
|
+
"title": "Vault Credentials Restore — response payload",
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"required": [
|
|
97
|
+
"id",
|
|
98
|
+
"lifecycle"
|
|
99
|
+
],
|
|
100
|
+
"properties": {
|
|
101
|
+
"id": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"minLength": 1,
|
|
104
|
+
"maxLength": 256
|
|
105
|
+
},
|
|
106
|
+
"lifecycle": {
|
|
107
|
+
"$ref": "#/$defs/VaultLifecycle",
|
|
108
|
+
"description": "State after the transition, echoed rather than left to be inferred from the verb."
|
|
109
|
+
},
|
|
110
|
+
"ext": {
|
|
111
|
+
"$ref": "#/$defs/Ext",
|
|
112
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"VaultLifecycle": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"enum": [
|
|
119
|
+
"active",
|
|
120
|
+
"archived",
|
|
121
|
+
"deleted"
|
|
122
|
+
],
|
|
123
|
+
"description": "Archival state. Orthogonal to validity."
|
|
124
|
+
},
|
|
125
|
+
"Ext": {
|
|
126
|
+
"title": "Ext",
|
|
127
|
+
"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.",
|
|
128
|
+
"type": "object",
|
|
129
|
+
"minProperties": 1,
|
|
130
|
+
"additionalProperties": true,
|
|
131
|
+
"propertyNames": {
|
|
132
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
} as const;
|
|
137
|
+
|
|
138
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
139
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
140
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
141
|
+
"$ref": "#/$defs/Response",
|
|
142
|
+
"$defs": {
|
|
143
|
+
"Response": {
|
|
144
|
+
"$anchor": "response",
|
|
145
|
+
"title": "Vault Credentials Restore — response payload",
|
|
146
|
+
"type": "object",
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"required": [
|
|
149
|
+
"id",
|
|
150
|
+
"lifecycle"
|
|
151
|
+
],
|
|
152
|
+
"properties": {
|
|
153
|
+
"id": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"minLength": 1,
|
|
156
|
+
"maxLength": 256
|
|
157
|
+
},
|
|
158
|
+
"lifecycle": {
|
|
159
|
+
"$ref": "#/$defs/VaultLifecycle",
|
|
160
|
+
"description": "State after the transition, echoed rather than left to be inferred from the verb."
|
|
161
|
+
},
|
|
162
|
+
"ext": {
|
|
163
|
+
"$ref": "#/$defs/Ext",
|
|
164
|
+
"description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"VaultLifecycle": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"enum": [
|
|
171
|
+
"active",
|
|
172
|
+
"archived",
|
|
173
|
+
"deleted"
|
|
174
|
+
],
|
|
175
|
+
"description": "Archival state. Orthogonal to validity."
|
|
176
|
+
},
|
|
177
|
+
"Ext": {
|
|
178
|
+
"title": "Ext",
|
|
179
|
+
"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.",
|
|
180
|
+
"type": "object",
|
|
181
|
+
"minProperties": 1,
|
|
182
|
+
"additionalProperties": true,
|
|
183
|
+
"propertyNames": {
|
|
184
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
} as const;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
192
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
193
|
+
* per-specification and cannot be derived from the document alone, and
|
|
194
|
+
* item 2 needs the schema this carries.
|
|
195
|
+
*/
|
|
196
|
+
export const SPEC = {
|
|
197
|
+
typeUri: TYPE_URI,
|
|
198
|
+
isBearer: false,
|
|
199
|
+
isProofRequired: true,
|
|
200
|
+
isRecipientRequired: true,
|
|
201
|
+
isIssuedAtRequired: true,
|
|
202
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
203
|
+
} as const;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
207
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
208
|
+
* parties (§7.3 item 5).
|
|
209
|
+
*/
|
|
210
|
+
export const RESPONSE_SPEC = {
|
|
211
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
212
|
+
isBearer: false,
|
|
213
|
+
isProofRequired: true,
|
|
214
|
+
isRecipientRequired: true,
|
|
215
|
+
isIssuedAtRequired: true,
|
|
216
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
217
|
+
} as const;
|