@openvtc/trust-tasks 0.28.21 → 0.28.22

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 (68) hide show
  1. package/CHANGELOG.md +9 -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/package.json +1 -1
  55. package/src/_shared/components.ts +48 -4
  56. package/src/index.ts +12 -0
  57. package/src/vtc/badges/_shared/0.1/badge.ts +1 -1
  58. package/src/vtc/badges/claims/create/0.1/payload.ts +395 -0
  59. package/src/vtc/badges/claims/list/0.1/payload.ts +386 -0
  60. package/src/vtc/badges/claims/redeem/0.1/payload.ts +454 -0
  61. package/src/vtc/badges/claims/withdraw/0.1/payload.ts +342 -0
  62. package/src/vtc/badges/create/0.1/payload.ts +28 -8
  63. package/src/vtc/badges/promote/0.1/payload.ts +28 -8
  64. package/src/vtc/groups/create/0.1/payload.ts +28 -8
  65. package/src/vtc/groups/list/0.1/payload.ts +28 -8
  66. package/src/vtc/groups/list/0.2/payload.ts +28 -8
  67. package/src/vtc/groups/show/0.1/payload.ts +28 -8
  68. package/src/vtc/groups/update/0.1/payload.ts +28 -8
@@ -0,0 +1,586 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/badges/claims/list/0.1/payload.schema.json
4
+ */
5
+ import type { BadgeId, ClaimCode, ClaimId, EntryId, Ext } from "../../../../../_shared/components.js";
6
+ /**
7
+ * A badge's claim codes, as its owners and administrators see them: never a code. The outer document members are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface VTCBadgesClaimsListPayload {
10
+ badgeId: BadgeId;
11
+ /**
12
+ * An opaque continuation token from a previous response's `nextCursor`, bound to the caller and the badge; a responder MUST NOT accept a cursor it did not issue.
13
+ */
14
+ cursor?: string;
15
+ /**
16
+ * The most items to return, at most 200; the responder chooses a default (50) and MAY return fewer.
17
+ */
18
+ limit?: number;
19
+ ext?: Ext;
20
+ }
21
+ /**
22
+ * The success response to a vtc/badges/claims/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/list/0.1#response.
23
+ */
24
+ export interface VTCBadgesClaimsListResponsePayload {
25
+ /**
26
+ * Newest `createdAt` first.
27
+ *
28
+ * @maxItems 200
29
+ */
30
+ items: ClaimCode[];
31
+ /**
32
+ * Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`.
33
+ */
34
+ nextCursor?: string;
35
+ ext?: Ext;
36
+ }
37
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
38
+ export type { BadgeId, ClaimCode, ClaimId, EntryId, Ext };
39
+ /** Trust Task type URI. */
40
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/badges/claims/list/0.1";
41
+ /**
42
+ * The earlier version of this specification that this one declares it
43
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
44
+ * `null`. Only the direct declaration — follow the chain with
45
+ * `extendsChain` / `readForSpec`.
46
+ */
47
+ export declare const EXTENDS: string | null;
48
+ /**
49
+ * Why this version is deprecated, or `null` while it is current. A
50
+ * superseded or retired version is still supported, and is withdrawn from
51
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
52
+ * Versions").
53
+ */
54
+ export declare const DEPRECATION: string | null;
55
+ /** Stable alias for this specification's request payload shape. */
56
+ export type Payload = VTCBadgesClaimsListPayload;
57
+ /** Trust Task response type URI (request type URI + "#response"). */
58
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/badges/claims/list/0.1#response";
59
+ /** Stable alias for this specification's success-response payload shape. */
60
+ export type Response = VTCBadgesClaimsListResponsePayload;
61
+ /**
62
+ * This specification's payload schema, as a value.
63
+ *
64
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
65
+ * rather than only as a `.json` file because TypeScript types are erased
66
+ * at runtime: without a schema a consumer has nothing to validate, and
67
+ * every REQUIRED payload member is optional in practice. Cross-file
68
+ * `$ref`s are already inlined, so it needs no resolver.
69
+ */
70
+ export declare const PAYLOAD_SCHEMA: {
71
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
72
+ readonly $id: "https://trusttasks.org/spec/vtc/badges/claims/list/0.1";
73
+ readonly title: "VTC Badges — Claims — List — payload";
74
+ readonly description: "A badge's claim codes, as its owners and administrators see them: never a code. The outer document members are owned by the framework — SPEC §6.3.";
75
+ readonly type: "object";
76
+ readonly additionalProperties: false;
77
+ readonly required: readonly ["badgeId"];
78
+ readonly properties: {
79
+ readonly badgeId: {
80
+ readonly $ref: "#/$defs/BadgeId";
81
+ };
82
+ readonly cursor: {
83
+ readonly type: "string";
84
+ readonly minLength: 1;
85
+ readonly maxLength: 1024;
86
+ readonly description: "An opaque continuation token from a previous response's `nextCursor`, bound to the caller and the badge; a responder MUST NOT accept a cursor it did not issue.";
87
+ };
88
+ readonly limit: {
89
+ readonly type: "integer";
90
+ readonly minimum: 1;
91
+ readonly maximum: 200;
92
+ readonly description: "The most items to return, at most 200; the responder chooses a default (50) and MAY return fewer.";
93
+ };
94
+ readonly ext: {
95
+ readonly $ref: "#/$defs/Ext";
96
+ };
97
+ };
98
+ readonly $defs: {
99
+ readonly Response: {
100
+ readonly $anchor: "response";
101
+ readonly title: "VTC Badges — Claims — List — response payload";
102
+ readonly description: "The success response to a vtc/badges/claims/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/list/0.1#response.";
103
+ readonly type: "object";
104
+ readonly additionalProperties: false;
105
+ readonly required: readonly ["items"];
106
+ readonly properties: {
107
+ readonly items: {
108
+ readonly type: "array";
109
+ readonly maxItems: 200;
110
+ readonly description: "Newest `createdAt` first.";
111
+ readonly items: {
112
+ readonly $ref: "#/$defs/ClaimCode";
113
+ };
114
+ };
115
+ readonly nextCursor: {
116
+ readonly type: "string";
117
+ readonly maxLength: 1024;
118
+ readonly description: "Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`.";
119
+ };
120
+ readonly ext: {
121
+ readonly $ref: "#/$defs/Ext";
122
+ };
123
+ };
124
+ };
125
+ readonly Ext: {
126
+ readonly title: "Ext";
127
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
128
+ readonly type: "object";
129
+ readonly minProperties: 1;
130
+ readonly additionalProperties: true;
131
+ readonly propertyNames: {
132
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
133
+ };
134
+ };
135
+ readonly ClaimCode: {
136
+ readonly title: "ClaimCode";
137
+ readonly description: "A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).";
138
+ readonly type: "object";
139
+ readonly additionalProperties: false;
140
+ readonly required: readonly ["claimId", "badgeId", "label", "validUntil", "limit", "claims", "state", "createdAt"];
141
+ readonly properties: {
142
+ readonly claimId: {
143
+ readonly $ref: "#/$defs/ClaimId";
144
+ };
145
+ readonly badgeId: {
146
+ readonly $ref: "#/$defs/BadgeId";
147
+ };
148
+ readonly label: {
149
+ readonly type: "string";
150
+ readonly minLength: 1;
151
+ readonly maxLength: 120;
152
+ readonly description: "What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it.";
153
+ };
154
+ readonly validUntil: {
155
+ readonly type: "string";
156
+ readonly format: "date-time";
157
+ readonly description: "After this the code admits no one.";
158
+ };
159
+ readonly limit: {
160
+ readonly type: "integer";
161
+ readonly minimum: 1;
162
+ readonly maximum: 10000;
163
+ readonly description: "How many claims the code admits.";
164
+ };
165
+ readonly claims: {
166
+ readonly type: "integer";
167
+ readonly minimum: 0;
168
+ readonly description: "How many members have redeemed it.";
169
+ };
170
+ readonly state: {
171
+ readonly type: "string";
172
+ readonly enum: readonly ["active", "withdrawn"];
173
+ readonly description: "`withdrawn` once its issuer withdrew it or the badge was retired. A code past `validUntil` or out of claims stays `active` and admits no one.";
174
+ };
175
+ readonly createdAt: {
176
+ readonly type: "string";
177
+ readonly format: "date-time";
178
+ };
179
+ readonly createdBy: {
180
+ readonly $ref: "#/$defs/EntryId";
181
+ readonly description: "The issuer's entry, where they have one; the giver of every award the code admits.";
182
+ };
183
+ };
184
+ };
185
+ readonly BadgeId: {
186
+ readonly title: "BadgeId";
187
+ readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
188
+ readonly type: "string";
189
+ readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
190
+ };
191
+ readonly ClaimId: {
192
+ readonly title: "ClaimId";
193
+ readonly description: "Opaque identifier of a claim code's record: `bcl_` followed by 16 to 64 base64url characters. Random; never the code itself, which the community keeps only as a digest (VTI-BDG-025).";
194
+ readonly type: "string";
195
+ readonly pattern: "^bcl_[A-Za-z0-9_-]{16,64}$";
196
+ };
197
+ readonly EntryId: {
198
+ readonly title: "EntryId";
199
+ readonly 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.";
200
+ readonly type: "string";
201
+ readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
202
+ };
203
+ };
204
+ };
205
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
206
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
207
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
208
+ readonly $ref: "#/$defs/Response";
209
+ readonly $defs: {
210
+ readonly Response: {
211
+ readonly $anchor: "response";
212
+ readonly title: "VTC Badges — Claims — List — response payload";
213
+ readonly description: "The success response to a vtc/badges/claims/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/list/0.1#response.";
214
+ readonly type: "object";
215
+ readonly additionalProperties: false;
216
+ readonly required: readonly ["items"];
217
+ readonly properties: {
218
+ readonly items: {
219
+ readonly type: "array";
220
+ readonly maxItems: 200;
221
+ readonly description: "Newest `createdAt` first.";
222
+ readonly items: {
223
+ readonly $ref: "#/$defs/ClaimCode";
224
+ };
225
+ };
226
+ readonly nextCursor: {
227
+ readonly type: "string";
228
+ readonly maxLength: 1024;
229
+ readonly description: "Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`.";
230
+ };
231
+ readonly ext: {
232
+ readonly $ref: "#/$defs/Ext";
233
+ };
234
+ };
235
+ };
236
+ readonly Ext: {
237
+ readonly title: "Ext";
238
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
239
+ readonly type: "object";
240
+ readonly minProperties: 1;
241
+ readonly additionalProperties: true;
242
+ readonly propertyNames: {
243
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
244
+ };
245
+ };
246
+ readonly ClaimCode: {
247
+ readonly title: "ClaimCode";
248
+ readonly description: "A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).";
249
+ readonly type: "object";
250
+ readonly additionalProperties: false;
251
+ readonly required: readonly ["claimId", "badgeId", "label", "validUntil", "limit", "claims", "state", "createdAt"];
252
+ readonly properties: {
253
+ readonly claimId: {
254
+ readonly $ref: "#/$defs/ClaimId";
255
+ };
256
+ readonly badgeId: {
257
+ readonly $ref: "#/$defs/BadgeId";
258
+ };
259
+ readonly label: {
260
+ readonly type: "string";
261
+ readonly minLength: 1;
262
+ readonly maxLength: 120;
263
+ readonly description: "What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it.";
264
+ };
265
+ readonly validUntil: {
266
+ readonly type: "string";
267
+ readonly format: "date-time";
268
+ readonly description: "After this the code admits no one.";
269
+ };
270
+ readonly limit: {
271
+ readonly type: "integer";
272
+ readonly minimum: 1;
273
+ readonly maximum: 10000;
274
+ readonly description: "How many claims the code admits.";
275
+ };
276
+ readonly claims: {
277
+ readonly type: "integer";
278
+ readonly minimum: 0;
279
+ readonly description: "How many members have redeemed it.";
280
+ };
281
+ readonly state: {
282
+ readonly type: "string";
283
+ readonly enum: readonly ["active", "withdrawn"];
284
+ readonly description: "`withdrawn` once its issuer withdrew it or the badge was retired. A code past `validUntil` or out of claims stays `active` and admits no one.";
285
+ };
286
+ readonly createdAt: {
287
+ readonly type: "string";
288
+ readonly format: "date-time";
289
+ };
290
+ readonly createdBy: {
291
+ readonly $ref: "#/$defs/EntryId";
292
+ readonly description: "The issuer's entry, where they have one; the giver of every award the code admits.";
293
+ };
294
+ };
295
+ };
296
+ readonly BadgeId: {
297
+ readonly title: "BadgeId";
298
+ readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
299
+ readonly type: "string";
300
+ readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
301
+ };
302
+ readonly ClaimId: {
303
+ readonly title: "ClaimId";
304
+ readonly description: "Opaque identifier of a claim code's record: `bcl_` followed by 16 to 64 base64url characters. Random; never the code itself, which the community keeps only as a digest (VTI-BDG-025).";
305
+ readonly type: "string";
306
+ readonly pattern: "^bcl_[A-Za-z0-9_-]{16,64}$";
307
+ };
308
+ readonly EntryId: {
309
+ readonly title: "EntryId";
310
+ readonly 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.";
311
+ readonly type: "string";
312
+ readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
313
+ };
314
+ };
315
+ };
316
+ /**
317
+ * SPEC.md §7.2 policy for the request variant, from this specification's
318
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
319
+ * per-specification and cannot be derived from the document alone, and
320
+ * item 2 needs the schema this carries.
321
+ */
322
+ export declare const SPEC: {
323
+ readonly typeUri: "https://trusttasks.org/spec/vtc/badges/claims/list/0.1";
324
+ readonly isBearer: false;
325
+ readonly isProofRequired: true;
326
+ readonly isRecipientRequired: true;
327
+ readonly isIssuedAtRequired: false;
328
+ readonly payloadSchema: {
329
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
330
+ readonly $id: "https://trusttasks.org/spec/vtc/badges/claims/list/0.1";
331
+ readonly title: "VTC Badges — Claims — List — payload";
332
+ readonly description: "A badge's claim codes, as its owners and administrators see them: never a code. The outer document members are owned by the framework — SPEC §6.3.";
333
+ readonly type: "object";
334
+ readonly additionalProperties: false;
335
+ readonly required: readonly ["badgeId"];
336
+ readonly properties: {
337
+ readonly badgeId: {
338
+ readonly $ref: "#/$defs/BadgeId";
339
+ };
340
+ readonly cursor: {
341
+ readonly type: "string";
342
+ readonly minLength: 1;
343
+ readonly maxLength: 1024;
344
+ readonly description: "An opaque continuation token from a previous response's `nextCursor`, bound to the caller and the badge; a responder MUST NOT accept a cursor it did not issue.";
345
+ };
346
+ readonly limit: {
347
+ readonly type: "integer";
348
+ readonly minimum: 1;
349
+ readonly maximum: 200;
350
+ readonly description: "The most items to return, at most 200; the responder chooses a default (50) and MAY return fewer.";
351
+ };
352
+ readonly ext: {
353
+ readonly $ref: "#/$defs/Ext";
354
+ };
355
+ };
356
+ readonly $defs: {
357
+ readonly Response: {
358
+ readonly $anchor: "response";
359
+ readonly title: "VTC Badges — Claims — List — response payload";
360
+ readonly description: "The success response to a vtc/badges/claims/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/list/0.1#response.";
361
+ readonly type: "object";
362
+ readonly additionalProperties: false;
363
+ readonly required: readonly ["items"];
364
+ readonly properties: {
365
+ readonly items: {
366
+ readonly type: "array";
367
+ readonly maxItems: 200;
368
+ readonly description: "Newest `createdAt` first.";
369
+ readonly items: {
370
+ readonly $ref: "#/$defs/ClaimCode";
371
+ };
372
+ };
373
+ readonly nextCursor: {
374
+ readonly type: "string";
375
+ readonly maxLength: 1024;
376
+ readonly description: "Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`.";
377
+ };
378
+ readonly ext: {
379
+ readonly $ref: "#/$defs/Ext";
380
+ };
381
+ };
382
+ };
383
+ readonly Ext: {
384
+ readonly title: "Ext";
385
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
386
+ readonly type: "object";
387
+ readonly minProperties: 1;
388
+ readonly additionalProperties: true;
389
+ readonly propertyNames: {
390
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
391
+ };
392
+ };
393
+ readonly ClaimCode: {
394
+ readonly title: "ClaimCode";
395
+ readonly description: "A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).";
396
+ readonly type: "object";
397
+ readonly additionalProperties: false;
398
+ readonly required: readonly ["claimId", "badgeId", "label", "validUntil", "limit", "claims", "state", "createdAt"];
399
+ readonly properties: {
400
+ readonly claimId: {
401
+ readonly $ref: "#/$defs/ClaimId";
402
+ };
403
+ readonly badgeId: {
404
+ readonly $ref: "#/$defs/BadgeId";
405
+ };
406
+ readonly label: {
407
+ readonly type: "string";
408
+ readonly minLength: 1;
409
+ readonly maxLength: 120;
410
+ readonly description: "What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it.";
411
+ };
412
+ readonly validUntil: {
413
+ readonly type: "string";
414
+ readonly format: "date-time";
415
+ readonly description: "After this the code admits no one.";
416
+ };
417
+ readonly limit: {
418
+ readonly type: "integer";
419
+ readonly minimum: 1;
420
+ readonly maximum: 10000;
421
+ readonly description: "How many claims the code admits.";
422
+ };
423
+ readonly claims: {
424
+ readonly type: "integer";
425
+ readonly minimum: 0;
426
+ readonly description: "How many members have redeemed it.";
427
+ };
428
+ readonly state: {
429
+ readonly type: "string";
430
+ readonly enum: readonly ["active", "withdrawn"];
431
+ readonly description: "`withdrawn` once its issuer withdrew it or the badge was retired. A code past `validUntil` or out of claims stays `active` and admits no one.";
432
+ };
433
+ readonly createdAt: {
434
+ readonly type: "string";
435
+ readonly format: "date-time";
436
+ };
437
+ readonly createdBy: {
438
+ readonly $ref: "#/$defs/EntryId";
439
+ readonly description: "The issuer's entry, where they have one; the giver of every award the code admits.";
440
+ };
441
+ };
442
+ };
443
+ readonly BadgeId: {
444
+ readonly title: "BadgeId";
445
+ readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
446
+ readonly type: "string";
447
+ readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
448
+ };
449
+ readonly ClaimId: {
450
+ readonly title: "ClaimId";
451
+ readonly description: "Opaque identifier of a claim code's record: `bcl_` followed by 16 to 64 base64url characters. Random; never the code itself, which the community keeps only as a digest (VTI-BDG-025).";
452
+ readonly type: "string";
453
+ readonly pattern: "^bcl_[A-Za-z0-9_-]{16,64}$";
454
+ };
455
+ readonly EntryId: {
456
+ readonly title: "EntryId";
457
+ readonly 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.";
458
+ readonly type: "string";
459
+ readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
460
+ };
461
+ };
462
+ };
463
+ };
464
+ /**
465
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
466
+ * tracks the *issuer* party's requirement because a response swaps the
467
+ * parties (§7.3 item 5).
468
+ */
469
+ export declare const RESPONSE_SPEC: {
470
+ readonly typeUri: "https://trusttasks.org/spec/vtc/badges/claims/list/0.1#response";
471
+ readonly isBearer: false;
472
+ readonly isProofRequired: true;
473
+ readonly isRecipientRequired: true;
474
+ readonly isIssuedAtRequired: false;
475
+ readonly payloadSchema: {
476
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
477
+ readonly $ref: "#/$defs/Response";
478
+ readonly $defs: {
479
+ readonly Response: {
480
+ readonly $anchor: "response";
481
+ readonly title: "VTC Badges — Claims — List — response payload";
482
+ readonly description: "The success response to a vtc/badges/claims/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/list/0.1#response.";
483
+ readonly type: "object";
484
+ readonly additionalProperties: false;
485
+ readonly required: readonly ["items"];
486
+ readonly properties: {
487
+ readonly items: {
488
+ readonly type: "array";
489
+ readonly maxItems: 200;
490
+ readonly description: "Newest `createdAt` first.";
491
+ readonly items: {
492
+ readonly $ref: "#/$defs/ClaimCode";
493
+ };
494
+ };
495
+ readonly nextCursor: {
496
+ readonly type: "string";
497
+ readonly maxLength: 1024;
498
+ readonly description: "Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`.";
499
+ };
500
+ readonly ext: {
501
+ readonly $ref: "#/$defs/Ext";
502
+ };
503
+ };
504
+ };
505
+ readonly Ext: {
506
+ readonly title: "Ext";
507
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
508
+ readonly type: "object";
509
+ readonly minProperties: 1;
510
+ readonly additionalProperties: true;
511
+ readonly propertyNames: {
512
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
513
+ };
514
+ };
515
+ readonly ClaimCode: {
516
+ readonly title: "ClaimCode";
517
+ readonly description: "A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).";
518
+ readonly type: "object";
519
+ readonly additionalProperties: false;
520
+ readonly required: readonly ["claimId", "badgeId", "label", "validUntil", "limit", "claims", "state", "createdAt"];
521
+ readonly properties: {
522
+ readonly claimId: {
523
+ readonly $ref: "#/$defs/ClaimId";
524
+ };
525
+ readonly badgeId: {
526
+ readonly $ref: "#/$defs/BadgeId";
527
+ };
528
+ readonly label: {
529
+ readonly type: "string";
530
+ readonly minLength: 1;
531
+ readonly maxLength: 120;
532
+ readonly description: "What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it.";
533
+ };
534
+ readonly validUntil: {
535
+ readonly type: "string";
536
+ readonly format: "date-time";
537
+ readonly description: "After this the code admits no one.";
538
+ };
539
+ readonly limit: {
540
+ readonly type: "integer";
541
+ readonly minimum: 1;
542
+ readonly maximum: 10000;
543
+ readonly description: "How many claims the code admits.";
544
+ };
545
+ readonly claims: {
546
+ readonly type: "integer";
547
+ readonly minimum: 0;
548
+ readonly description: "How many members have redeemed it.";
549
+ };
550
+ readonly state: {
551
+ readonly type: "string";
552
+ readonly enum: readonly ["active", "withdrawn"];
553
+ readonly description: "`withdrawn` once its issuer withdrew it or the badge was retired. A code past `validUntil` or out of claims stays `active` and admits no one.";
554
+ };
555
+ readonly createdAt: {
556
+ readonly type: "string";
557
+ readonly format: "date-time";
558
+ };
559
+ readonly createdBy: {
560
+ readonly $ref: "#/$defs/EntryId";
561
+ readonly description: "The issuer's entry, where they have one; the giver of every award the code admits.";
562
+ };
563
+ };
564
+ };
565
+ readonly BadgeId: {
566
+ readonly title: "BadgeId";
567
+ readonly description: "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).";
568
+ readonly type: "string";
569
+ readonly pattern: "^bdg_[A-Za-z0-9_-]{16,64}$";
570
+ };
571
+ readonly ClaimId: {
572
+ readonly title: "ClaimId";
573
+ readonly description: "Opaque identifier of a claim code's record: `bcl_` followed by 16 to 64 base64url characters. Random; never the code itself, which the community keeps only as a digest (VTI-BDG-025).";
574
+ readonly type: "string";
575
+ readonly pattern: "^bcl_[A-Za-z0-9_-]{16,64}$";
576
+ };
577
+ readonly EntryId: {
578
+ readonly title: "EntryId";
579
+ readonly 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.";
580
+ readonly type: "string";
581
+ readonly pattern: "^dir_[A-Za-z0-9_-]{16,64}$";
582
+ };
583
+ };
584
+ };
585
+ };
586
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/badges/claims/list/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAGtG;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD;;;;OAIG;IACH,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;AAE1D,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,wDAAiE,CAAC;AAE1F;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,GAAG,IAAW,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,GAAG,IAAW,CAAC;AAE/C,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAEjD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,iEAA0E,CAAC;AAE5G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,kCAAkC,CAAC;AAE1D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2H1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}