@openvtc/trust-tasks 0.19.18 → 0.19.19

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 (73) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/_shared/components.d.ts +38 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +3 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +3 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/persona/_shared/0.1/persona-record.d.ts +1 -1
  9. package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -1
  10. package/dist/persona/attribute/list/1.0/payload.d.ts +124 -4
  11. package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -1
  12. package/dist/persona/attribute/list/1.0/payload.js +72 -2
  13. package/dist/persona/attribute/list/1.0/payload.js.map +1 -1
  14. package/dist/persona/attribute/put/1.0/payload.d.ts +110 -4
  15. package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -1
  16. package/dist/persona/attribute/put/1.0/payload.js +62 -2
  17. package/dist/persona/attribute/put/1.0/payload.js.map +1 -1
  18. package/dist/persona/contact/get/1.0/payload.d.ts +84 -4
  19. package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -1
  20. package/dist/persona/contact/get/1.0/payload.js +52 -2
  21. package/dist/persona/contact/get/1.0/payload.js.map +1 -1
  22. package/dist/persona/contact/put/1.0/payload.d.ts +84 -4
  23. package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -1
  24. package/dist/persona/contact/put/1.0/payload.js +52 -2
  25. package/dist/persona/contact/put/1.0/payload.js.map +1 -1
  26. package/dist/persona/disclosure/preview/1.0/payload.d.ts +5 -5
  27. package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -1
  28. package/dist/persona/disclosure/preview/1.0/payload.js +4 -2
  29. package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -1
  30. package/dist/persona/profile/compose/1.0/payload.d.ts +14 -0
  31. package/dist/persona/profile/compose/1.0/payload.d.ts.map +1 -1
  32. package/dist/persona/profile/compose/1.0/payload.js +5 -0
  33. package/dist/persona/profile/compose/1.0/payload.js.map +1 -1
  34. package/dist/persona/profile/get/1.0/payload.d.ts +230 -6
  35. package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
  36. package/dist/persona/profile/get/1.0/payload.js +140 -2
  37. package/dist/persona/profile/get/1.0/payload.js.map +1 -1
  38. package/dist/persona/profile/list/1.0/payload.d.ts +230 -6
  39. package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
  40. package/dist/persona/profile/list/1.0/payload.js +140 -2
  41. package/dist/persona/profile/list/1.0/payload.js.map +1 -1
  42. package/dist/persona/profile/put/1.0/payload.d.ts +230 -6
  43. package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -1
  44. package/dist/persona/profile/put/1.0/payload.js +138 -2
  45. package/dist/persona/profile/put/1.0/payload.js.map +1 -1
  46. package/dist/persona/profile/timeline/1.0/payload.d.ts +588 -0
  47. package/dist/persona/profile/timeline/1.0/payload.d.ts.map +1 -0
  48. package/dist/persona/profile/timeline/1.0/payload.js +322 -0
  49. package/dist/persona/profile/timeline/1.0/payload.js.map +1 -0
  50. package/dist/persona/profile/usage/1.0/payload.d.ts +533 -0
  51. package/dist/persona/profile/usage/1.0/payload.d.ts.map +1 -0
  52. package/dist/persona/profile/usage/1.0/payload.js +302 -0
  53. package/dist/persona/profile/usage/1.0/payload.js.map +1 -0
  54. package/dist/vtc/invitations/deliver/0.1/payload.d.ts +318 -0
  55. package/dist/vtc/invitations/deliver/0.1/payload.d.ts.map +1 -0
  56. package/dist/vtc/invitations/deliver/0.1/payload.js +183 -0
  57. package/dist/vtc/invitations/deliver/0.1/payload.js.map +1 -0
  58. package/package.json +1 -1
  59. package/src/_shared/components.ts +41 -0
  60. package/src/index.ts +3 -0
  61. package/src/persona/_shared/0.1/persona-record.ts +1 -1
  62. package/src/persona/attribute/list/1.0/payload.ts +72 -2
  63. package/src/persona/attribute/put/1.0/payload.ts +68 -2
  64. package/src/persona/contact/get/1.0/payload.ts +52 -2
  65. package/src/persona/contact/put/1.0/payload.ts +52 -2
  66. package/src/persona/disclosure/preview/1.0/payload.ts +5 -3
  67. package/src/persona/profile/compose/1.0/payload.ts +9 -0
  68. package/src/persona/profile/get/1.0/payload.ts +142 -4
  69. package/src/persona/profile/list/1.0/payload.ts +142 -4
  70. package/src/persona/profile/put/1.0/payload.ts +144 -4
  71. package/src/persona/profile/timeline/1.0/payload.ts +402 -0
  72. package/src/persona/profile/usage/1.0/payload.ts +354 -0
  73. package/src/vtc/invitations/deliver/0.1/payload.ts +234 -0
@@ -0,0 +1,354 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/profile/usage/1.0/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, FaceReach, Ulid } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Where one face is worn now: every context and persona wearing it. The answer a holder needs to audit a face's reach, and to see the contexts a face is part of before changing or retiring it.
11
+ */
12
+ export interface PersonaProfileUsagePayload {
13
+ profileId: Ulid;
14
+ /**
15
+ * The context of a context-local face. Omit for a pool face.
16
+ */
17
+ contextId?: string;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * Success response to persona/profile/usage. Type https://trusttasks.org/spec/persona/profile/usage/1.0#response. An empty `usage` is a face worn nowhere — a normal state, not an error.
22
+ */
23
+ export interface PersonaProfileUsageResponsePayload {
24
+ profileId: Ulid;
25
+ /**
26
+ * The face's reach, so the answer and the allow-list it is audited against arrive together. Absent for a context-local face.
27
+ */
28
+ reach?: FaceReach;
29
+ /**
30
+ * @maxItems 1024
31
+ */
32
+ usage: {
33
+ contextId: string;
34
+ personaDid: string;
35
+ boundAt: string;
36
+ /**
37
+ * When wearing it here ends on its own. Absent when it lasts until changed.
38
+ */
39
+ until?: string;
40
+ }[];
41
+ ext?: Ext;
42
+ }
43
+
44
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
45
+ export type { Ext, FaceReach, Ulid };
46
+
47
+ /** Trust Task type URI. */
48
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/profile/usage/1.0" as const;
49
+
50
+ /** Stable alias for this specification's request payload shape. */
51
+ export type Payload = PersonaProfileUsagePayload;
52
+
53
+ /** Trust Task response type URI (request type URI + "#response"). */
54
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/profile/usage/1.0#response" as const;
55
+
56
+ /** Stable alias for this specification's success-response payload shape. */
57
+ export type Response = PersonaProfileUsageResponsePayload;
58
+
59
+ /**
60
+ * This specification's payload schema, as a value.
61
+ *
62
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
63
+ * rather than only as a `.json` file because TypeScript types are erased
64
+ * at runtime: without a schema a consumer has nothing to validate, and
65
+ * every REQUIRED payload member is optional in practice. Cross-file
66
+ * `$ref`s are already inlined, so it needs no resolver.
67
+ */
68
+ export const PAYLOAD_SCHEMA = {
69
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
70
+ "$id": "https://trusttasks.org/spec/persona/profile/usage/1.0",
71
+ "title": "Persona Profile Usage — payload",
72
+ "description": "Where one face is worn now: every context and persona wearing it. The answer a holder needs to audit a face's reach, and to see the contexts a face is part of before changing or retiring it.",
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": [
76
+ "profileId"
77
+ ],
78
+ "properties": {
79
+ "profileId": {
80
+ "$ref": "#/$defs/Ulid"
81
+ },
82
+ "contextId": {
83
+ "type": "string",
84
+ "minLength": 1,
85
+ "description": "The context of a context-local face. Omit for a pool face."
86
+ },
87
+ "ext": {
88
+ "$ref": "#/$defs/Ext"
89
+ }
90
+ },
91
+ "$defs": {
92
+ "Response": {
93
+ "$anchor": "response",
94
+ "title": "Persona Profile Usage — response payload",
95
+ "description": "Success response to persona/profile/usage. Type https://trusttasks.org/spec/persona/profile/usage/1.0#response. An empty `usage` is a face worn nowhere — a normal state, not an error.",
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": [
99
+ "profileId",
100
+ "usage"
101
+ ],
102
+ "properties": {
103
+ "profileId": {
104
+ "$ref": "#/$defs/Ulid"
105
+ },
106
+ "reach": {
107
+ "$ref": "#/$defs/FaceReach",
108
+ "description": "The face's reach, so the answer and the allow-list it is audited against arrive together. Absent for a context-local face."
109
+ },
110
+ "usage": {
111
+ "type": "array",
112
+ "maxItems": 1024,
113
+ "items": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": [
117
+ "contextId",
118
+ "personaDid",
119
+ "boundAt"
120
+ ],
121
+ "properties": {
122
+ "contextId": {
123
+ "type": "string",
124
+ "minLength": 1
125
+ },
126
+ "personaDid": {
127
+ "type": "string",
128
+ "minLength": 1
129
+ },
130
+ "boundAt": {
131
+ "type": "string",
132
+ "format": "date-time"
133
+ },
134
+ "until": {
135
+ "type": "string",
136
+ "format": "date-time",
137
+ "description": "When wearing it here ends on its own. Absent when it lasts until changed."
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "ext": {
143
+ "$ref": "#/$defs/Ext"
144
+ }
145
+ }
146
+ },
147
+ "Ext": {
148
+ "title": "Ext",
149
+ "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.",
150
+ "type": "object",
151
+ "minProperties": 1,
152
+ "additionalProperties": true,
153
+ "propertyNames": {
154
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
155
+ }
156
+ },
157
+ "FaceReach": {
158
+ "title": "FaceReach",
159
+ "description": "Where a pool face may be worn. `anywhere` is the default and what an absent member means. `only` names the contexts it may be worn in, and a maintainer MUST refuse to wear it in any other (persona/binding/set `outsideReach`).\n\nA tagged object rather than a bare list of contexts, deliberately: an empty list has been read as both 'unrestricted' and 'nowhere' in this family's neighbours, and a shape where the two cannot be confused is worth more than one where they must be remembered. So `only` requires at least one context, and 'nowhere' is not a reach — it is a retired face.\n\nA context-local face has no reach: it lives in its context and is worn there by construction.",
160
+ "oneOf": [
161
+ {
162
+ "type": "object",
163
+ "additionalProperties": false,
164
+ "required": [
165
+ "kind"
166
+ ],
167
+ "properties": {
168
+ "kind": {
169
+ "const": "anywhere"
170
+ }
171
+ }
172
+ },
173
+ {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "required": [
177
+ "kind",
178
+ "contextIds"
179
+ ],
180
+ "properties": {
181
+ "kind": {
182
+ "const": "only"
183
+ },
184
+ "contextIds": {
185
+ "type": "array",
186
+ "minItems": 1,
187
+ "maxItems": 256,
188
+ "uniqueItems": true,
189
+ "items": {
190
+ "type": "string",
191
+ "minLength": 1
192
+ }
193
+ }
194
+ }
195
+ }
196
+ ]
197
+ },
198
+ "Ulid": {
199
+ "title": "Ulid",
200
+ "description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
201
+ "type": "string",
202
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
203
+ }
204
+ }
205
+ } as const;
206
+
207
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
208
+ export const RESPONSE_PAYLOAD_SCHEMA = {
209
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
210
+ "$ref": "#/$defs/Response",
211
+ "$defs": {
212
+ "Response": {
213
+ "$anchor": "response",
214
+ "title": "Persona Profile Usage — response payload",
215
+ "description": "Success response to persona/profile/usage. Type https://trusttasks.org/spec/persona/profile/usage/1.0#response. An empty `usage` is a face worn nowhere — a normal state, not an error.",
216
+ "type": "object",
217
+ "additionalProperties": false,
218
+ "required": [
219
+ "profileId",
220
+ "usage"
221
+ ],
222
+ "properties": {
223
+ "profileId": {
224
+ "$ref": "#/$defs/Ulid"
225
+ },
226
+ "reach": {
227
+ "$ref": "#/$defs/FaceReach",
228
+ "description": "The face's reach, so the answer and the allow-list it is audited against arrive together. Absent for a context-local face."
229
+ },
230
+ "usage": {
231
+ "type": "array",
232
+ "maxItems": 1024,
233
+ "items": {
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "required": [
237
+ "contextId",
238
+ "personaDid",
239
+ "boundAt"
240
+ ],
241
+ "properties": {
242
+ "contextId": {
243
+ "type": "string",
244
+ "minLength": 1
245
+ },
246
+ "personaDid": {
247
+ "type": "string",
248
+ "minLength": 1
249
+ },
250
+ "boundAt": {
251
+ "type": "string",
252
+ "format": "date-time"
253
+ },
254
+ "until": {
255
+ "type": "string",
256
+ "format": "date-time",
257
+ "description": "When wearing it here ends on its own. Absent when it lasts until changed."
258
+ }
259
+ }
260
+ }
261
+ },
262
+ "ext": {
263
+ "$ref": "#/$defs/Ext"
264
+ }
265
+ }
266
+ },
267
+ "Ext": {
268
+ "title": "Ext",
269
+ "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.",
270
+ "type": "object",
271
+ "minProperties": 1,
272
+ "additionalProperties": true,
273
+ "propertyNames": {
274
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
275
+ }
276
+ },
277
+ "FaceReach": {
278
+ "title": "FaceReach",
279
+ "description": "Where a pool face may be worn. `anywhere` is the default and what an absent member means. `only` names the contexts it may be worn in, and a maintainer MUST refuse to wear it in any other (persona/binding/set `outsideReach`).\n\nA tagged object rather than a bare list of contexts, deliberately: an empty list has been read as both 'unrestricted' and 'nowhere' in this family's neighbours, and a shape where the two cannot be confused is worth more than one where they must be remembered. So `only` requires at least one context, and 'nowhere' is not a reach — it is a retired face.\n\nA context-local face has no reach: it lives in its context and is worn there by construction.",
280
+ "oneOf": [
281
+ {
282
+ "type": "object",
283
+ "additionalProperties": false,
284
+ "required": [
285
+ "kind"
286
+ ],
287
+ "properties": {
288
+ "kind": {
289
+ "const": "anywhere"
290
+ }
291
+ }
292
+ },
293
+ {
294
+ "type": "object",
295
+ "additionalProperties": false,
296
+ "required": [
297
+ "kind",
298
+ "contextIds"
299
+ ],
300
+ "properties": {
301
+ "kind": {
302
+ "const": "only"
303
+ },
304
+ "contextIds": {
305
+ "type": "array",
306
+ "minItems": 1,
307
+ "maxItems": 256,
308
+ "uniqueItems": true,
309
+ "items": {
310
+ "type": "string",
311
+ "minLength": 1
312
+ }
313
+ }
314
+ }
315
+ }
316
+ ]
317
+ },
318
+ "Ulid": {
319
+ "title": "Ulid",
320
+ "description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
321
+ "type": "string",
322
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
323
+ }
324
+ }
325
+ } as const;
326
+
327
+ /**
328
+ * SPEC.md §7.2 policy for the request variant, from this specification's
329
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
330
+ * per-specification and cannot be derived from the document alone, and
331
+ * item 2 needs the schema this carries.
332
+ */
333
+ export const SPEC = {
334
+ typeUri: TYPE_URI,
335
+ isBearer: false,
336
+ isProofRequired: false,
337
+ isRecipientRequired: true,
338
+ isIssuedAtRequired: false,
339
+ payloadSchema: PAYLOAD_SCHEMA,
340
+ } as const;
341
+
342
+ /**
343
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
344
+ * tracks the *issuer* party's requirement because a response swaps the
345
+ * parties (§7.3 item 5).
346
+ */
347
+ export const RESPONSE_SPEC = {
348
+ typeUri: RESPONSE_TYPE_URI,
349
+ isBearer: false,
350
+ isProofRequired: false,
351
+ isRecipientRequired: true,
352
+ isIssuedAtRequired: false,
353
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
354
+ } as const;
@@ -0,0 +1,234 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/invitations/deliver/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Deliver an issued invitation to the DID it admits: push an offer to that DID, or return the offer for a QR code. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCInvitationsDeliverPayload {
13
+ /**
14
+ * Identifier of the invitation to deliver, as `vtc/invitations/list` reports it.
15
+ */
16
+ id: string;
17
+ /**
18
+ * `message`: the community sends a `credential-exchange/offer` to the invited DID over a transport that DID advertises. `offer`: the community returns the offer, for the inviter to hand over out of band — typically as a QR code.
19
+ */
20
+ channel: "message" | "offer";
21
+ ext?: Ext;
22
+ }
23
+ export interface VTCInvitationsDeliverResponsePayload {
24
+ /**
25
+ * The invitation's identifier, echoed.
26
+ */
27
+ id: string;
28
+ /**
29
+ * The channel used, echoed.
30
+ */
31
+ channel: "message" | "offer";
32
+ /**
33
+ * Present exactly when `channel` is `offer`: an OID4VCI Credential Offer object, carried verbatim, whose pre-authorized code redeems only for the invited DID. Its members are OID4VCI's and are deliberately not re-specified here.
34
+ */
35
+ offer?: {};
36
+ /**
37
+ * When this delivery's offer lapses. Never later than the invitation's own expiry.
38
+ */
39
+ expiresAt: string;
40
+ ext?: Ext;
41
+ }
42
+
43
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
44
+ export type { Ext };
45
+
46
+ /** Trust Task type URI. */
47
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/invitations/deliver/0.1" as const;
48
+
49
+ /** Stable alias for this specification's request payload shape. */
50
+ export type Payload = VTCInvitationsDeliverPayload;
51
+
52
+ /** Trust Task response type URI (request type URI + "#response"). */
53
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/invitations/deliver/0.1#response" as const;
54
+
55
+ /** Stable alias for this specification's success-response payload shape. */
56
+ export type Response = VTCInvitationsDeliverResponsePayload;
57
+
58
+ /**
59
+ * This specification's payload schema, as a value.
60
+ *
61
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
62
+ * rather than only as a `.json` file because TypeScript types are erased
63
+ * at runtime: without a schema a consumer has nothing to validate, and
64
+ * every REQUIRED payload member is optional in practice. Cross-file
65
+ * `$ref`s are already inlined, so it needs no resolver.
66
+ */
67
+ export const PAYLOAD_SCHEMA = {
68
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
69
+ "$id": "https://trusttasks.org/spec/vtc/invitations/deliver/0.1",
70
+ "title": "VTC Invitations Deliver — payload",
71
+ "description": "Deliver an issued invitation to the DID it admits: push an offer to that DID, or return the offer for a QR code. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": [
75
+ "id",
76
+ "channel"
77
+ ],
78
+ "properties": {
79
+ "id": {
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "maxLength": 256,
83
+ "description": "Identifier of the invitation to deliver, as `vtc/invitations/list` reports it."
84
+ },
85
+ "channel": {
86
+ "type": "string",
87
+ "enum": [
88
+ "message",
89
+ "offer"
90
+ ],
91
+ "description": "`message`: the community sends a `credential-exchange/offer` to the invited DID over a transport that DID advertises. `offer`: the community returns the offer, for the inviter to hand over out of band — typically as a QR code."
92
+ },
93
+ "ext": {
94
+ "$ref": "#/$defs/Ext"
95
+ }
96
+ },
97
+ "$defs": {
98
+ "Response": {
99
+ "$anchor": "response",
100
+ "title": "VTC Invitations Deliver — response payload",
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": [
104
+ "id",
105
+ "channel",
106
+ "expiresAt"
107
+ ],
108
+ "properties": {
109
+ "id": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "maxLength": 256,
113
+ "description": "The invitation's identifier, echoed."
114
+ },
115
+ "channel": {
116
+ "type": "string",
117
+ "enum": [
118
+ "message",
119
+ "offer"
120
+ ],
121
+ "description": "The channel used, echoed."
122
+ },
123
+ "offer": {
124
+ "type": "object",
125
+ "description": "Present exactly when `channel` is `offer`: an OID4VCI Credential Offer object, carried verbatim, whose pre-authorized code redeems only for the invited DID. Its members are OID4VCI's and are deliberately not re-specified here."
126
+ },
127
+ "expiresAt": {
128
+ "type": "string",
129
+ "format": "date-time",
130
+ "description": "When this delivery's offer lapses. Never later than the invitation's own expiry."
131
+ },
132
+ "ext": {
133
+ "$ref": "#/$defs/Ext"
134
+ }
135
+ }
136
+ },
137
+ "Ext": {
138
+ "title": "Ext",
139
+ "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.",
140
+ "type": "object",
141
+ "minProperties": 1,
142
+ "additionalProperties": true,
143
+ "propertyNames": {
144
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
145
+ }
146
+ }
147
+ }
148
+ } as const;
149
+
150
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
151
+ export const RESPONSE_PAYLOAD_SCHEMA = {
152
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
153
+ "$ref": "#/$defs/Response",
154
+ "$defs": {
155
+ "Response": {
156
+ "$anchor": "response",
157
+ "title": "VTC Invitations Deliver — response payload",
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": [
161
+ "id",
162
+ "channel",
163
+ "expiresAt"
164
+ ],
165
+ "properties": {
166
+ "id": {
167
+ "type": "string",
168
+ "minLength": 1,
169
+ "maxLength": 256,
170
+ "description": "The invitation's identifier, echoed."
171
+ },
172
+ "channel": {
173
+ "type": "string",
174
+ "enum": [
175
+ "message",
176
+ "offer"
177
+ ],
178
+ "description": "The channel used, echoed."
179
+ },
180
+ "offer": {
181
+ "type": "object",
182
+ "description": "Present exactly when `channel` is `offer`: an OID4VCI Credential Offer object, carried verbatim, whose pre-authorized code redeems only for the invited DID. Its members are OID4VCI's and are deliberately not re-specified here."
183
+ },
184
+ "expiresAt": {
185
+ "type": "string",
186
+ "format": "date-time",
187
+ "description": "When this delivery's offer lapses. Never later than the invitation's own expiry."
188
+ },
189
+ "ext": {
190
+ "$ref": "#/$defs/Ext"
191
+ }
192
+ }
193
+ },
194
+ "Ext": {
195
+ "title": "Ext",
196
+ "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.",
197
+ "type": "object",
198
+ "minProperties": 1,
199
+ "additionalProperties": true,
200
+ "propertyNames": {
201
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
202
+ }
203
+ }
204
+ }
205
+ } as const;
206
+
207
+ /**
208
+ * SPEC.md §7.2 policy for the request variant, from this specification's
209
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
210
+ * per-specification and cannot be derived from the document alone, and
211
+ * item 2 needs the schema this carries.
212
+ */
213
+ export const SPEC = {
214
+ typeUri: TYPE_URI,
215
+ isBearer: false,
216
+ isProofRequired: true,
217
+ isRecipientRequired: true,
218
+ isIssuedAtRequired: true,
219
+ payloadSchema: PAYLOAD_SCHEMA,
220
+ } as const;
221
+
222
+ /**
223
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
224
+ * tracks the *issuer* party's requirement because a response swaps the
225
+ * parties (§7.3 item 5).
226
+ */
227
+ export const RESPONSE_SPEC = {
228
+ typeUri: RESPONSE_TYPE_URI,
229
+ isBearer: false,
230
+ isProofRequired: true,
231
+ isRecipientRequired: true,
232
+ isIssuedAtRequired: true,
233
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
234
+ } as const;