@openvtc/trust-tasks 0.28.21 → 0.28.23

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 +34 -0
  2. package/dist/_shared/components.d.ts +48 -4
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +12 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +12 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/vtc/badges/_shared/0.1/badge.d.ts +1 -1
  9. package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -1
  10. package/dist/vtc/badges/claims/create/0.1/payload.d.ts +595 -0
  11. package/dist/vtc/badges/claims/create/0.1/payload.d.ts.map +1 -0
  12. package/dist/vtc/badges/claims/create/0.1/payload.js +345 -0
  13. package/dist/vtc/badges/claims/create/0.1/payload.js.map +1 -0
  14. package/dist/vtc/badges/claims/list/0.1/payload.d.ts +586 -0
  15. package/dist/vtc/badges/claims/list/0.1/payload.d.ts.map +1 -0
  16. package/dist/vtc/badges/claims/list/0.1/payload.js +335 -0
  17. package/dist/vtc/badges/claims/list/0.1/payload.js.map +1 -0
  18. package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts +720 -0
  19. package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts.map +1 -0
  20. package/dist/vtc/badges/claims/redeem/0.1/payload.js +417 -0
  21. package/dist/vtc/badges/claims/redeem/0.1/payload.js.map +1 -0
  22. package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts +512 -0
  23. package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts.map +1 -0
  24. package/dist/vtc/badges/claims/withdraw/0.1/payload.js +305 -0
  25. package/dist/vtc/badges/claims/withdraw/0.1/payload.js.map +1 -0
  26. package/dist/vtc/badges/create/0.1/payload.d.ts +40 -16
  27. package/dist/vtc/badges/create/0.1/payload.d.ts.map +1 -1
  28. package/dist/vtc/badges/create/0.1/payload.js +28 -8
  29. package/dist/vtc/badges/create/0.1/payload.js.map +1 -1
  30. package/dist/vtc/badges/promote/0.1/payload.d.ts +40 -16
  31. package/dist/vtc/badges/promote/0.1/payload.d.ts.map +1 -1
  32. package/dist/vtc/badges/promote/0.1/payload.js +28 -8
  33. package/dist/vtc/badges/promote/0.1/payload.js.map +1 -1
  34. package/dist/vtc/groups/create/0.1/payload.d.ts +40 -16
  35. package/dist/vtc/groups/create/0.1/payload.d.ts.map +1 -1
  36. package/dist/vtc/groups/create/0.1/payload.js +28 -8
  37. package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
  38. package/dist/vtc/groups/list/0.1/payload.d.ts +40 -16
  39. package/dist/vtc/groups/list/0.1/payload.d.ts.map +1 -1
  40. package/dist/vtc/groups/list/0.1/payload.js +28 -8
  41. package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
  42. package/dist/vtc/groups/list/0.2/payload.d.ts +40 -16
  43. package/dist/vtc/groups/list/0.2/payload.d.ts.map +1 -1
  44. package/dist/vtc/groups/list/0.2/payload.js +28 -8
  45. package/dist/vtc/groups/list/0.2/payload.js.map +1 -1
  46. package/dist/vtc/groups/show/0.1/payload.d.ts +40 -16
  47. package/dist/vtc/groups/show/0.1/payload.d.ts.map +1 -1
  48. package/dist/vtc/groups/show/0.1/payload.js +28 -8
  49. package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
  50. package/dist/vtc/groups/update/0.1/payload.d.ts +40 -16
  51. package/dist/vtc/groups/update/0.1/payload.d.ts.map +1 -1
  52. package/dist/vtc/groups/update/0.1/payload.js +28 -8
  53. package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
  54. package/dist/vtc/members/rotate/0.1/payload.d.ts +12 -5
  55. package/dist/vtc/members/rotate/0.1/payload.d.ts.map +1 -1
  56. package/dist/vtc/members/rotate/0.1/payload.js +8 -2
  57. package/dist/vtc/members/rotate/0.1/payload.js.map +1 -1
  58. package/package.json +1 -1
  59. package/src/_shared/components.ts +48 -4
  60. package/src/index.ts +12 -0
  61. package/src/vtc/badges/_shared/0.1/badge.ts +1 -1
  62. package/src/vtc/badges/claims/create/0.1/payload.ts +395 -0
  63. package/src/vtc/badges/claims/list/0.1/payload.ts +386 -0
  64. package/src/vtc/badges/claims/redeem/0.1/payload.ts +454 -0
  65. package/src/vtc/badges/claims/withdraw/0.1/payload.ts +342 -0
  66. package/src/vtc/badges/create/0.1/payload.ts +28 -8
  67. package/src/vtc/badges/promote/0.1/payload.ts +28 -8
  68. package/src/vtc/groups/create/0.1/payload.ts +28 -8
  69. package/src/vtc/groups/list/0.1/payload.ts +28 -8
  70. package/src/vtc/groups/list/0.2/payload.ts +28 -8
  71. package/src/vtc/groups/show/0.1/payload.ts +28 -8
  72. package/src/vtc/groups/update/0.1/payload.ts +28 -8
  73. package/src/vtc/members/rotate/0.1/payload.ts +12 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/badges/claims/redeem/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAGrK;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACnD;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC;AAEzH,2BAA2B;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,417 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/badges/claims/redeem/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/claims/redeem/0.1";
7
+ /**
8
+ * The earlier version of this specification that this one declares it
9
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
10
+ * `null`. Only the direct declaration — follow the chain with
11
+ * `extendsChain` / `readForSpec`.
12
+ */
13
+ export const EXTENDS = null;
14
+ /**
15
+ * Why this version is deprecated, or `null` while it is current. A
16
+ * superseded or retired version is still supported, and is withdrawn from
17
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
18
+ * Versions").
19
+ */
20
+ export const DEPRECATION = null;
21
+ /** Trust Task response type URI (request type URI + "#response"). */
22
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/badges/claims/redeem/0.1#response";
23
+ /**
24
+ * This specification's payload schema, as a value.
25
+ *
26
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
27
+ * rather than only as a `.json` file because TypeScript types are erased
28
+ * at runtime: without a schema a consumer has nothing to validate, and
29
+ * every REQUIRED payload member is optional in practice. Cross-file
30
+ * `$ref`s are already inlined, so it needs no resolver.
31
+ */
32
+ export const PAYLOAD_SCHEMA = {
33
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
34
+ "$id": "https://trusttasks.org/spec/vtc/badges/claims/redeem/0.1",
35
+ "title": "VTC Badges — Claims — Redeem — payload",
36
+ "description": "Redeem a claim code: the member is admitted to the badge, the redemption being their consent. The outer document members are owned by the framework — SPEC §6.3.",
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": [
40
+ "code"
41
+ ],
42
+ "properties": {
43
+ "code": {
44
+ "$ref": "#/$defs/ClaimSecret"
45
+ },
46
+ "ext": {
47
+ "$ref": "#/$defs/Ext"
48
+ }
49
+ },
50
+ "$defs": {
51
+ "Response": {
52
+ "$anchor": "response",
53
+ "title": "VTC Badges — Claims — Redeem — response payload",
54
+ "description": "The success response to a vtc/badges/claims/redeem/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/redeem/0.1#response.",
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": [
58
+ "award"
59
+ ],
60
+ "properties": {
61
+ "award": {
62
+ "$ref": "#/$defs/Award",
63
+ "description": "The award the claim recorded, `accepted`, its giver the code's issuer."
64
+ },
65
+ "ext": {
66
+ "$ref": "#/$defs/Ext"
67
+ }
68
+ }
69
+ },
70
+ "Ext": {
71
+ "title": "Ext",
72
+ "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.",
73
+ "type": "object",
74
+ "minProperties": 1,
75
+ "additionalProperties": true,
76
+ "propertyNames": {
77
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
78
+ }
79
+ },
80
+ "Award": {
81
+ "title": "Award",
82
+ "description": "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).",
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "awardId",
87
+ "badgeId",
88
+ "entryId",
89
+ "state",
90
+ "offeredAt"
91
+ ],
92
+ "properties": {
93
+ "awardId": {
94
+ "$ref": "#/$defs/AwardId"
95
+ },
96
+ "badgeId": {
97
+ "$ref": "#/$defs/BadgeId"
98
+ },
99
+ "entryId": {
100
+ "$ref": "#/$defs/EntryId",
101
+ "description": "The recipient."
102
+ },
103
+ "givenBy": {
104
+ "$ref": "#/$defs/EntryId"
105
+ },
106
+ "note": {
107
+ "$ref": "#/$defs/AwardNote"
108
+ },
109
+ "state": {
110
+ "$ref": "#/$defs/AwardState"
111
+ },
112
+ "offeredAt": {
113
+ "type": "string",
114
+ "format": "date-time"
115
+ },
116
+ "decidedAt": {
117
+ "type": "string",
118
+ "format": "date-time",
119
+ "description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
120
+ },
121
+ "expiresAt": {
122
+ "type": "string",
123
+ "format": "date-time",
124
+ "description": "When an unanswered offer lapses, where the community expires offers."
125
+ },
126
+ "credentialId": {
127
+ "$ref": "#/$defs/GroupCredentialId"
128
+ },
129
+ "shared": {
130
+ "$ref": "#/$defs/AwardShare"
131
+ },
132
+ "ext": {
133
+ "$ref": "#/$defs/Ext"
134
+ }
135
+ }
136
+ },
137
+ "AwardShare": {
138
+ "title": "AwardShare",
139
+ "description": "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).",
140
+ "type": "object",
141
+ "additionalProperties": false,
142
+ "required": [
143
+ "verificationUrl",
144
+ "since"
145
+ ],
146
+ "properties": {
147
+ "verificationUrl": {
148
+ "type": "string",
149
+ "format": "uri",
150
+ "maxLength": 2048,
151
+ "description": "The public location that answers the credential and a verification of it."
152
+ },
153
+ "bakedImageUrl": {
154
+ "type": "string",
155
+ "format": "uri",
156
+ "maxLength": 2048,
157
+ "description": "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image."
158
+ },
159
+ "since": {
160
+ "type": "string",
161
+ "format": "date-time"
162
+ }
163
+ }
164
+ },
165
+ "AwardState": {
166
+ "title": "AwardState",
167
+ "description": "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).",
168
+ "type": "string",
169
+ "enum": [
170
+ "offered",
171
+ "accepted",
172
+ "declined",
173
+ "withdrawn",
174
+ "expired",
175
+ "revoked"
176
+ ]
177
+ },
178
+ "AwardNote": {
179
+ "title": "AwardNote",
180
+ "type": "string",
181
+ "minLength": 1,
182
+ "maxLength": 500,
183
+ "description": "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090)."
184
+ },
185
+ "BadgeId": {
186
+ "title": "BadgeId",
187
+ "description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
188
+ "type": "string",
189
+ "pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
190
+ },
191
+ "AwardId": {
192
+ "title": "AwardId",
193
+ "description": "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.",
194
+ "type": "string",
195
+ "pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
196
+ },
197
+ "GroupCredentialId": {
198
+ "title": "GroupCredentialId",
199
+ "description": "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.",
200
+ "type": "string",
201
+ "minLength": 1,
202
+ "maxLength": 512
203
+ },
204
+ "EntryId": {
205
+ "title": "EntryId",
206
+ "description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
207
+ "type": "string",
208
+ "pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
209
+ },
210
+ "ClaimSecret": {
211
+ "title": "ClaimSecret",
212
+ "description": "A claim code itself: at least 128 random bits the community generated, base64url (22 to 64 characters). A bearer secret: shown to its issuer once, redeemed by a member, never stored or answered again (VTI-BDG-025).",
213
+ "type": "string",
214
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
215
+ }
216
+ }
217
+ };
218
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
219
+ export const RESPONSE_PAYLOAD_SCHEMA = {
220
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
221
+ "$ref": "#/$defs/Response",
222
+ "$defs": {
223
+ "Response": {
224
+ "$anchor": "response",
225
+ "title": "VTC Badges — Claims — Redeem — response payload",
226
+ "description": "The success response to a vtc/badges/claims/redeem/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/redeem/0.1#response.",
227
+ "type": "object",
228
+ "additionalProperties": false,
229
+ "required": [
230
+ "award"
231
+ ],
232
+ "properties": {
233
+ "award": {
234
+ "$ref": "#/$defs/Award",
235
+ "description": "The award the claim recorded, `accepted`, its giver the code's issuer."
236
+ },
237
+ "ext": {
238
+ "$ref": "#/$defs/Ext"
239
+ }
240
+ }
241
+ },
242
+ "Ext": {
243
+ "title": "Ext",
244
+ "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.",
245
+ "type": "object",
246
+ "minProperties": 1,
247
+ "additionalProperties": true,
248
+ "propertyNames": {
249
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
250
+ }
251
+ },
252
+ "Award": {
253
+ "title": "Award",
254
+ "description": "One giving of a badge to one member. `givenBy` is the giver's directory entry, absent for an award a dynamic badge group's rule made. `note` is shown to the recipient, the giver, the badge's owners and administrators, never to other members. `credentialId` is present on an accepted award of a community badge: the badge credential that evidences it, renewed or re-issued as the badge's regime requires. `shared` is present on an accepted award of a badge its holders may show outside while its holder shares it (vtc/badges/awards/share).",
255
+ "type": "object",
256
+ "additionalProperties": false,
257
+ "required": [
258
+ "awardId",
259
+ "badgeId",
260
+ "entryId",
261
+ "state",
262
+ "offeredAt"
263
+ ],
264
+ "properties": {
265
+ "awardId": {
266
+ "$ref": "#/$defs/AwardId"
267
+ },
268
+ "badgeId": {
269
+ "$ref": "#/$defs/BadgeId"
270
+ },
271
+ "entryId": {
272
+ "$ref": "#/$defs/EntryId",
273
+ "description": "The recipient."
274
+ },
275
+ "givenBy": {
276
+ "$ref": "#/$defs/EntryId"
277
+ },
278
+ "note": {
279
+ "$ref": "#/$defs/AwardNote"
280
+ },
281
+ "state": {
282
+ "$ref": "#/$defs/AwardState"
283
+ },
284
+ "offeredAt": {
285
+ "type": "string",
286
+ "format": "date-time"
287
+ },
288
+ "decidedAt": {
289
+ "type": "string",
290
+ "format": "date-time",
291
+ "description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
292
+ },
293
+ "expiresAt": {
294
+ "type": "string",
295
+ "format": "date-time",
296
+ "description": "When an unanswered offer lapses, where the community expires offers."
297
+ },
298
+ "credentialId": {
299
+ "$ref": "#/$defs/GroupCredentialId"
300
+ },
301
+ "shared": {
302
+ "$ref": "#/$defs/AwardShare"
303
+ },
304
+ "ext": {
305
+ "$ref": "#/$defs/Ext"
306
+ }
307
+ }
308
+ },
309
+ "AwardShare": {
310
+ "title": "AwardShare",
311
+ "description": "Where an accepted award is shown outside the community, by its holder's choice (VTI-BDG-070): the public location that answers a verification of exactly what the credential says, the baked image where the community serves one, and since when. Present only while the holder shares the award; absent once they stop, the award is taken back, the badge is retired or the holder departs. The locations are unguessable and name no other holder (VTI-BDG-071).",
312
+ "type": "object",
313
+ "additionalProperties": false,
314
+ "required": [
315
+ "verificationUrl",
316
+ "since"
317
+ ],
318
+ "properties": {
319
+ "verificationUrl": {
320
+ "type": "string",
321
+ "format": "uri",
322
+ "maxLength": 2048,
323
+ "description": "The public location that answers the credential and a verification of it."
324
+ },
325
+ "bakedImageUrl": {
326
+ "type": "string",
327
+ "format": "uri",
328
+ "maxLength": 2048,
329
+ "description": "The badge's picture with the credential baked into it, for a website or an email signature. Absent where the community serves no baked image."
330
+ },
331
+ "since": {
332
+ "type": "string",
333
+ "format": "date-time"
334
+ }
335
+ }
336
+ },
337
+ "AwardState": {
338
+ "title": "AwardState",
339
+ "description": "`offered`: waiting for the recipient. `accepted`: the recipient took it; for a community badge the credential was issued and the membership recorded. `declined`: the recipient declined; nothing was recorded in the group and nothing issued. `withdrawn`: the giver withdrew the offer before a decision. `expired`: the offer lapsed unanswered. `revoked`: taken back after acceptance (VTI-BDG-023).",
340
+ "type": "string",
341
+ "enum": [
342
+ "offered",
343
+ "accepted",
344
+ "declined",
345
+ "withdrawn",
346
+ "expired",
347
+ "revoked"
348
+ ]
349
+ },
350
+ "AwardNote": {
351
+ "title": "AwardNote",
352
+ "type": "string",
353
+ "minLength": 1,
354
+ "maxLength": 500,
355
+ "description": "What the award is for, from the giver, shown to the recipient and written as the award's evidence narrative where the badge carries a credential. Plain text; erased with its author (VTI-BDG-090)."
356
+ },
357
+ "BadgeId": {
358
+ "title": "BadgeId",
359
+ "description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
360
+ "type": "string",
361
+ "pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
362
+ },
363
+ "AwardId": {
364
+ "title": "AwardId",
365
+ "description": "Opaque identifier of one giving of a badge to one member: `awd_` followed by 16 to 64 base64url characters. Random and unique within the community.",
366
+ "type": "string",
367
+ "pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
368
+ },
369
+ "GroupCredentialId": {
370
+ "title": "GroupCredentialId",
371
+ "description": "Identifier (`id`) of a group membership credential issued to a member. Each renewal issues a new credential with a new identifier. Validity is the community's setting; a community SHOULD default to 30 days, renewed when 10 days remain.",
372
+ "type": "string",
373
+ "minLength": 1,
374
+ "maxLength": 512
375
+ },
376
+ "EntryId": {
377
+ "title": "EntryId",
378
+ "description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
379
+ "type": "string",
380
+ "pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
381
+ },
382
+ "ClaimSecret": {
383
+ "title": "ClaimSecret",
384
+ "description": "A claim code itself: at least 128 random bits the community generated, base64url (22 to 64 characters). A bearer secret: shown to its issuer once, redeemed by a member, never stored or answered again (VTI-BDG-025).",
385
+ "type": "string",
386
+ "pattern": "^[A-Za-z0-9_-]{22,64}$"
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 const SPEC = {
397
+ typeUri: TYPE_URI,
398
+ isBearer: false,
399
+ isProofRequired: true,
400
+ isRecipientRequired: true,
401
+ isIssuedAtRequired: true,
402
+ payloadSchema: PAYLOAD_SCHEMA,
403
+ };
404
+ /**
405
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
406
+ * tracks the *issuer* party's requirement because a response swaps the
407
+ * parties (§7.3 item 5).
408
+ */
409
+ export const RESPONSE_SPEC = {
410
+ typeUri: RESPONSE_TYPE_URI,
411
+ isBearer: false,
412
+ isProofRequired: true,
413
+ isRecipientRequired: true,
414
+ isIssuedAtRequired: true,
415
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
416
+ };
417
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vtc/badges/claims/redeem/0.1/payload.ts"],"names":[],"mapp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