@openvtc/trust-tasks 0.16.3 → 0.16.5

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/dist/index.d.ts +10 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +10 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/vault/credentials/archive/0.1/payload.d.ts +297 -0
  7. package/dist/vault/credentials/archive/0.1/payload.d.ts.map +1 -0
  8. package/dist/vault/credentials/archive/0.1/payload.js +171 -0
  9. package/dist/vault/credentials/archive/0.1/payload.js.map +1 -0
  10. package/dist/vault/credentials/delete/0.1/payload.d.ts +333 -0
  11. package/dist/vault/credentials/delete/0.1/payload.d.ts.map +1 -0
  12. package/dist/vault/credentials/delete/0.1/payload.js +185 -0
  13. package/dist/vault/credentials/delete/0.1/payload.js.map +1 -0
  14. package/dist/vault/credentials/get/0.1/payload.d.ts +244 -0
  15. package/dist/vault/credentials/get/0.1/payload.d.ts.map +1 -0
  16. package/dist/vault/credentials/get/0.1/payload.js +137 -0
  17. package/dist/vault/credentials/get/0.1/payload.js.map +1 -0
  18. package/dist/vault/credentials/purge/0.1/payload.d.ts +297 -0
  19. package/dist/vault/credentials/purge/0.1/payload.d.ts.map +1 -0
  20. package/dist/vault/credentials/purge/0.1/payload.js +171 -0
  21. package/dist/vault/credentials/purge/0.1/payload.js.map +1 -0
  22. package/dist/vault/credentials/query/0.1/payload.d.ts +689 -0
  23. package/dist/vault/credentials/query/0.1/payload.d.ts.map +1 -0
  24. package/dist/vault/credentials/query/0.1/payload.js +350 -0
  25. package/dist/vault/credentials/query/0.1/payload.js.map +1 -0
  26. package/dist/vault/credentials/receive/0.1/payload.d.ts +414 -0
  27. package/dist/vault/credentials/receive/0.1/payload.d.ts.map +1 -0
  28. package/dist/vault/credentials/receive/0.1/payload.js +226 -0
  29. package/dist/vault/credentials/receive/0.1/payload.js.map +1 -0
  30. package/dist/vault/credentials/restore/0.1/payload.d.ts +297 -0
  31. package/dist/vault/credentials/restore/0.1/payload.d.ts.map +1 -0
  32. package/dist/vault/credentials/restore/0.1/payload.js +171 -0
  33. package/dist/vault/credentials/restore/0.1/payload.js.map +1 -0
  34. package/dist/vault/credentials/unarchive/0.1/payload.d.ts +297 -0
  35. package/dist/vault/credentials/unarchive/0.1/payload.d.ts.map +1 -0
  36. package/dist/vault/credentials/unarchive/0.1/payload.js +171 -0
  37. package/dist/vault/credentials/unarchive/0.1/payload.js.map +1 -0
  38. package/dist/vta/credentials/list/0.1/payload.d.ts +630 -0
  39. package/dist/vta/credentials/list/0.1/payload.d.ts.map +1 -0
  40. package/dist/vta/credentials/list/0.1/payload.js +322 -0
  41. package/dist/vta/credentials/list/0.1/payload.js.map +1 -0
  42. package/dist/vtc/members/credentials/0.1/payload.d.ts +379 -0
  43. package/dist/vtc/members/credentials/0.1/payload.d.ts.map +1 -0
  44. package/dist/vtc/members/credentials/0.1/payload.js +195 -0
  45. package/dist/vtc/members/credentials/0.1/payload.js.map +1 -0
  46. package/package.json +1 -1
  47. package/src/index.ts +10 -0
  48. package/src/vault/credentials/archive/0.1/payload.ts +217 -0
  49. package/src/vault/credentials/delete/0.1/payload.ts +239 -0
  50. package/src/vault/credentials/get/0.1/payload.ts +178 -0
  51. package/src/vault/credentials/purge/0.1/payload.ts +217 -0
  52. package/src/vault/credentials/query/0.1/payload.ts +459 -0
  53. package/src/vault/credentials/receive/0.1/payload.ts +298 -0
  54. package/src/vault/credentials/restore/0.1/payload.ts +217 -0
  55. package/src/vault/credentials/unarchive/0.1/payload.ts +217 -0
  56. package/src/vta/credentials/list/0.1/payload.ts +420 -0
  57. package/src/vtc/members/credentials/0.1/payload.ts +259 -0
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vault/credentials/unarchive/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Return an archived credential to the active state.
11
+ */
12
+ export interface VaultCredentialsUnarchive {
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 VaultCredentialsUnarchiveResponsePayload {
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/unarchive/0.1" as const;
43
+
44
+ /** Stable alias for this specification's request payload shape. */
45
+ export type Payload = VaultCredentialsUnarchive;
46
+
47
+ /** Trust Task response type URI (request type URI + "#response"). */
48
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vault/credentials/unarchive/0.1#response" as const;
49
+
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = VaultCredentialsUnarchiveResponsePayload;
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/unarchive/0.1",
65
+ "title": "Vault Credentials — Unarchive",
66
+ "description": "Return an archived credential to the active state.",
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 Unarchive — 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 Unarchive — 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;
@@ -0,0 +1,420 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/credentials/list/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { CredentialId, Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Derived at read time. `revoked` takes precedence over `expired`: a credential revoked before its window closed is revoked, and reporting it as merely expired would hide that somebody acted.
11
+ */
12
+ export type IssuedCredentialStatus = "active" | "expired" | "revoked";
13
+
14
+ /**
15
+ * Enumerate the credentials an agent has issued, as metadata. Every filter is optional and those present are AND-combined.
16
+ */
17
+ export interface VTACredentialsList {
18
+ /**
19
+ * Only credentials issued to this DID.
20
+ */
21
+ holder?: string;
22
+ /**
23
+ * Only credentials carrying this type tag beyond `VerifiableCredential`.
24
+ */
25
+ credentialType?: string;
26
+ /**
27
+ * Only credentials in this state. Derived by the agent at read time, never stored.
28
+ */
29
+ status?: "active" | "expired" | "revoked";
30
+ /**
31
+ * Maximum records to return. The agent MAY return fewer and caps this value.
32
+ */
33
+ pageSize?: number;
34
+ /**
35
+ * Continue a previous page. Opaque — consumers must not construct or parse one.
36
+ */
37
+ cursor?: string;
38
+ /**
39
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
40
+ */
41
+ ext?: Ext;
42
+ }
43
+ export interface VTACredentialsListResponsePayload {
44
+ /**
45
+ * One summary per matching credential. Empty when nothing matched — a successful answer, not an error.
46
+ */
47
+ credentials: IssuedCredentialSummary[];
48
+ /**
49
+ * The agent stopped early. A consumer must not read a truncated page as a complete account of what was issued.
50
+ */
51
+ truncated: boolean;
52
+ /**
53
+ * Pass to the next request to continue. Absent when the page is the last.
54
+ */
55
+ cursor?: string;
56
+ /**
57
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
58
+ */
59
+ ext?: Ext;
60
+ }
61
+ /**
62
+ * A body-free projection of an issuance record. Carries no claim content by construction — see the specification's rationale for why a list does not return credentials.
63
+ */
64
+ export interface IssuedCredentialSummary {
65
+ /**
66
+ * The id `vta/credentials/revoke` is keyed on.
67
+ */
68
+ credentialId: CredentialId;
69
+ /**
70
+ * Who the credential was issued to.
71
+ */
72
+ holder: string;
73
+ /**
74
+ * The type tag beyond `VerifiableCredential`, when the credential carries one.
75
+ */
76
+ credentialType?: string;
77
+ issuedAt: string;
78
+ expiresAt: string;
79
+ status: IssuedCredentialStatus;
80
+ /**
81
+ * Present iff `status` is `revoked`.
82
+ */
83
+ revokedAt?: string;
84
+ /**
85
+ * Free text recorded at revocation. Disclosed to every caller entitled to this list — see Security & Privacy.
86
+ */
87
+ revocationReason?: string;
88
+ }
89
+
90
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
91
+ export type { CredentialId, Ext };
92
+
93
+ /** Trust Task type URI. */
94
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/credentials/list/0.1" as const;
95
+
96
+ /** Stable alias for this specification's request payload shape. */
97
+ export type Payload = VTACredentialsList;
98
+
99
+ /** Trust Task response type URI (request type URI + "#response"). */
100
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/credentials/list/0.1#response" as const;
101
+
102
+ /** Stable alias for this specification's success-response payload shape. */
103
+ export type Response = VTACredentialsListResponsePayload;
104
+
105
+ /**
106
+ * This specification's payload schema, as a value.
107
+ *
108
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
109
+ * rather than only as a `.json` file because TypeScript types are erased
110
+ * at runtime: without a schema a consumer has nothing to validate, and
111
+ * every REQUIRED payload member is optional in practice. Cross-file
112
+ * `$ref`s are already inlined, so it needs no resolver.
113
+ */
114
+ export const PAYLOAD_SCHEMA = {
115
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
116
+ "$id": "https://trusttasks.org/spec/vta/credentials/list/0.1",
117
+ "title": "VTA Credentials — List",
118
+ "description": "Enumerate the credentials an agent has issued, as metadata. Every filter is optional and those present are AND-combined.",
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "properties": {
122
+ "holder": {
123
+ "$ref": "#/$defs/Did",
124
+ "description": "Only credentials issued to this DID."
125
+ },
126
+ "credentialType": {
127
+ "type": "string",
128
+ "minLength": 1,
129
+ "maxLength": 256,
130
+ "description": "Only credentials carrying this type tag beyond `VerifiableCredential`."
131
+ },
132
+ "status": {
133
+ "$ref": "#/$defs/IssuedCredentialStatus",
134
+ "description": "Only credentials in this state. Derived by the agent at read time, never stored."
135
+ },
136
+ "pageSize": {
137
+ "type": "integer",
138
+ "minimum": 1,
139
+ "maximum": 1000,
140
+ "description": "Maximum records to return. The agent MAY return fewer and caps this value."
141
+ },
142
+ "cursor": {
143
+ "type": "string",
144
+ "minLength": 1,
145
+ "maxLength": 4096,
146
+ "description": "Continue a previous page. Opaque — consumers must not construct or parse one."
147
+ },
148
+ "ext": {
149
+ "$ref": "#/$defs/Ext",
150
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
151
+ }
152
+ },
153
+ "$defs": {
154
+ "Response": {
155
+ "$anchor": "response",
156
+ "title": "VTA Credentials List — response payload",
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": [
160
+ "credentials",
161
+ "truncated"
162
+ ],
163
+ "properties": {
164
+ "credentials": {
165
+ "type": "array",
166
+ "items": {
167
+ "$ref": "#/$defs/IssuedCredentialSummary"
168
+ },
169
+ "description": "One summary per matching credential. Empty when nothing matched — a successful answer, not an error."
170
+ },
171
+ "truncated": {
172
+ "type": "boolean",
173
+ "description": "The agent stopped early. A consumer must not read a truncated page as a complete account of what was issued."
174
+ },
175
+ "cursor": {
176
+ "type": "string",
177
+ "minLength": 1,
178
+ "maxLength": 4096,
179
+ "description": "Pass to the next request to continue. Absent when the page is the last."
180
+ },
181
+ "ext": {
182
+ "$ref": "#/$defs/Ext",
183
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
184
+ }
185
+ }
186
+ },
187
+ "IssuedCredentialSummary": {
188
+ "title": "IssuedCredentialSummary",
189
+ "description": "A body-free projection of an issuance record. Carries no claim content by construction — see the specification's rationale for why a list does not return credentials.",
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": [
193
+ "credentialId",
194
+ "holder",
195
+ "issuedAt",
196
+ "expiresAt",
197
+ "status"
198
+ ],
199
+ "properties": {
200
+ "credentialId": {
201
+ "$ref": "#/$defs/CredentialId",
202
+ "description": "The id `vta/credentials/revoke` is keyed on."
203
+ },
204
+ "holder": {
205
+ "$ref": "#/$defs/Did",
206
+ "description": "Who the credential was issued to."
207
+ },
208
+ "credentialType": {
209
+ "type": "string",
210
+ "minLength": 1,
211
+ "maxLength": 256,
212
+ "description": "The type tag beyond `VerifiableCredential`, when the credential carries one."
213
+ },
214
+ "issuedAt": {
215
+ "type": "string",
216
+ "format": "date-time"
217
+ },
218
+ "expiresAt": {
219
+ "type": "string",
220
+ "format": "date-time"
221
+ },
222
+ "status": {
223
+ "$ref": "#/$defs/IssuedCredentialStatus"
224
+ },
225
+ "revokedAt": {
226
+ "type": "string",
227
+ "format": "date-time",
228
+ "description": "Present iff `status` is `revoked`."
229
+ },
230
+ "revocationReason": {
231
+ "type": "string",
232
+ "maxLength": 1024,
233
+ "description": "Free text recorded at revocation. Disclosed to every caller entitled to this list — see Security & Privacy."
234
+ }
235
+ }
236
+ },
237
+ "IssuedCredentialStatus": {
238
+ "type": "string",
239
+ "enum": [
240
+ "active",
241
+ "expired",
242
+ "revoked"
243
+ ],
244
+ "description": "Derived at read time. `revoked` takes precedence over `expired`: a credential revoked before its window closed is revoked, and reporting it as merely expired would hide that somebody acted."
245
+ },
246
+ "Did": {
247
+ "type": "string",
248
+ "pattern": "^did:[a-z0-9]+:.+$",
249
+ "maxLength": 2048
250
+ },
251
+ "CredentialId": {
252
+ "$anchor": "credentialId",
253
+ "title": "CredentialId",
254
+ "description": "Stable identifier for an issued credential — the handle for revocation and audit. Opaque to the holder: it MUST be echoed verbatim when revoking and MUST NOT be parsed.",
255
+ "type": "string",
256
+ "minLength": 1
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
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
272
+ export const RESPONSE_PAYLOAD_SCHEMA = {
273
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
274
+ "$ref": "#/$defs/Response",
275
+ "$defs": {
276
+ "Response": {
277
+ "$anchor": "response",
278
+ "title": "VTA Credentials List — response payload",
279
+ "type": "object",
280
+ "additionalProperties": false,
281
+ "required": [
282
+ "credentials",
283
+ "truncated"
284
+ ],
285
+ "properties": {
286
+ "credentials": {
287
+ "type": "array",
288
+ "items": {
289
+ "$ref": "#/$defs/IssuedCredentialSummary"
290
+ },
291
+ "description": "One summary per matching credential. Empty when nothing matched — a successful answer, not an error."
292
+ },
293
+ "truncated": {
294
+ "type": "boolean",
295
+ "description": "The agent stopped early. A consumer must not read a truncated page as a complete account of what was issued."
296
+ },
297
+ "cursor": {
298
+ "type": "string",
299
+ "minLength": 1,
300
+ "maxLength": 4096,
301
+ "description": "Pass to the next request to continue. Absent when the page is the last."
302
+ },
303
+ "ext": {
304
+ "$ref": "#/$defs/Ext",
305
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
306
+ }
307
+ }
308
+ },
309
+ "IssuedCredentialSummary": {
310
+ "title": "IssuedCredentialSummary",
311
+ "description": "A body-free projection of an issuance record. Carries no claim content by construction — see the specification's rationale for why a list does not return credentials.",
312
+ "type": "object",
313
+ "additionalProperties": false,
314
+ "required": [
315
+ "credentialId",
316
+ "holder",
317
+ "issuedAt",
318
+ "expiresAt",
319
+ "status"
320
+ ],
321
+ "properties": {
322
+ "credentialId": {
323
+ "$ref": "#/$defs/CredentialId",
324
+ "description": "The id `vta/credentials/revoke` is keyed on."
325
+ },
326
+ "holder": {
327
+ "$ref": "#/$defs/Did",
328
+ "description": "Who the credential was issued to."
329
+ },
330
+ "credentialType": {
331
+ "type": "string",
332
+ "minLength": 1,
333
+ "maxLength": 256,
334
+ "description": "The type tag beyond `VerifiableCredential`, when the credential carries one."
335
+ },
336
+ "issuedAt": {
337
+ "type": "string",
338
+ "format": "date-time"
339
+ },
340
+ "expiresAt": {
341
+ "type": "string",
342
+ "format": "date-time"
343
+ },
344
+ "status": {
345
+ "$ref": "#/$defs/IssuedCredentialStatus"
346
+ },
347
+ "revokedAt": {
348
+ "type": "string",
349
+ "format": "date-time",
350
+ "description": "Present iff `status` is `revoked`."
351
+ },
352
+ "revocationReason": {
353
+ "type": "string",
354
+ "maxLength": 1024,
355
+ "description": "Free text recorded at revocation. Disclosed to every caller entitled to this list — see Security & Privacy."
356
+ }
357
+ }
358
+ },
359
+ "IssuedCredentialStatus": {
360
+ "type": "string",
361
+ "enum": [
362
+ "active",
363
+ "expired",
364
+ "revoked"
365
+ ],
366
+ "description": "Derived at read time. `revoked` takes precedence over `expired`: a credential revoked before its window closed is revoked, and reporting it as merely expired would hide that somebody acted."
367
+ },
368
+ "Did": {
369
+ "type": "string",
370
+ "pattern": "^did:[a-z0-9]+:.+$",
371
+ "maxLength": 2048
372
+ },
373
+ "CredentialId": {
374
+ "$anchor": "credentialId",
375
+ "title": "CredentialId",
376
+ "description": "Stable identifier for an issued credential — the handle for revocation and audit. Opaque to the holder: it MUST be echoed verbatim when revoking and MUST NOT be parsed.",
377
+ "type": "string",
378
+ "minLength": 1
379
+ },
380
+ "Ext": {
381
+ "title": "Ext",
382
+ "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.",
383
+ "type": "object",
384
+ "minProperties": 1,
385
+ "additionalProperties": true,
386
+ "propertyNames": {
387
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
388
+ }
389
+ }
390
+ }
391
+ } as const;
392
+
393
+ /**
394
+ * SPEC.md §7.2 policy for the request variant, from this specification's
395
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
396
+ * per-specification and cannot be derived from the document alone, and
397
+ * item 2 needs the schema this carries.
398
+ */
399
+ export const SPEC = {
400
+ typeUri: TYPE_URI,
401
+ isBearer: false,
402
+ isProofRequired: false,
403
+ isRecipientRequired: true,
404
+ isIssuedAtRequired: false,
405
+ payloadSchema: PAYLOAD_SCHEMA,
406
+ } as const;
407
+
408
+ /**
409
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
410
+ * tracks the *issuer* party's requirement because a response swaps the
411
+ * parties (§7.3 item 5).
412
+ */
413
+ export const RESPONSE_SPEC = {
414
+ typeUri: RESPONSE_TYPE_URI,
415
+ isBearer: false,
416
+ isProofRequired: false,
417
+ isRecipientRequired: true,
418
+ isIssuedAtRequired: false,
419
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
420
+ } as const;