@openvtc/trust-tasks 0.28.19 → 0.28.21

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 (78) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/dist/_shared/components.d.ts +16 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/auth/step-up/requests/show/0.1/payload.d.ts +458 -0
  5. package/dist/auth/step-up/requests/show/0.1/payload.d.ts.map +1 -0
  6. package/dist/auth/step-up/requests/show/0.1/payload.js +261 -0
  7. package/dist/auth/step-up/requests/show/0.1/payload.js.map +1 -0
  8. package/dist/index.d.ts +9 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +9 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/vtc/badges/_shared/0.1/badge.d.ts +1 -1
  13. package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -1
  14. package/dist/vtc/badges/awards/list/0.1/payload.d.ts +118 -6
  15. package/dist/vtc/badges/awards/list/0.1/payload.d.ts.map +1 -1
  16. package/dist/vtc/badges/awards/list/0.1/payload.js +64 -2
  17. package/dist/vtc/badges/awards/list/0.1/payload.js.map +1 -1
  18. package/dist/vtc/badges/awards/offer/0.1/payload.d.ts +118 -6
  19. package/dist/vtc/badges/awards/offer/0.1/payload.d.ts.map +1 -1
  20. package/dist/vtc/badges/awards/offer/0.1/payload.js +64 -2
  21. package/dist/vtc/badges/awards/offer/0.1/payload.js.map +1 -1
  22. package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts +118 -6
  23. package/dist/vtc/badges/awards/revoke/0.1/payload.d.ts.map +1 -1
  24. package/dist/vtc/badges/awards/revoke/0.1/payload.js +64 -2
  25. package/dist/vtc/badges/awards/revoke/0.1/payload.js.map +1 -1
  26. package/dist/vtc/badges/awards/share/0.1/payload.d.ts +701 -0
  27. package/dist/vtc/badges/awards/share/0.1/payload.d.ts.map +1 -0
  28. package/dist/vtc/badges/awards/share/0.1/payload.js +406 -0
  29. package/dist/vtc/badges/awards/share/0.1/payload.js.map +1 -0
  30. package/dist/vtc/badges/awards/unshare/0.1/payload.d.ts +701 -0
  31. package/dist/vtc/badges/awards/unshare/0.1/payload.d.ts.map +1 -0
  32. package/dist/vtc/badges/awards/unshare/0.1/payload.js +406 -0
  33. package/dist/vtc/badges/awards/unshare/0.1/payload.js.map +1 -0
  34. package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts +118 -6
  35. package/dist/vtc/badges/awards/withdraw/0.1/payload.d.ts.map +1 -1
  36. package/dist/vtc/badges/awards/withdraw/0.1/payload.js +64 -2
  37. package/dist/vtc/badges/awards/withdraw/0.1/payload.js.map +1 -1
  38. package/dist/vtc/badges/kudos/give/0.1/payload.d.ts +118 -6
  39. package/dist/vtc/badges/kudos/give/0.1/payload.d.ts.map +1 -1
  40. package/dist/vtc/badges/kudos/give/0.1/payload.js +64 -2
  41. package/dist/vtc/badges/kudos/give/0.1/payload.js.map +1 -1
  42. package/dist/vtc/badges/kudos/list/0.1/payload.d.ts +118 -6
  43. package/dist/vtc/badges/kudos/list/0.1/payload.d.ts.map +1 -1
  44. package/dist/vtc/badges/kudos/list/0.1/payload.js +64 -2
  45. package/dist/vtc/badges/kudos/list/0.1/payload.js.map +1 -1
  46. package/dist/vtc/badges/mine/accept/0.1/payload.d.ts +118 -6
  47. package/dist/vtc/badges/mine/accept/0.1/payload.d.ts.map +1 -1
  48. package/dist/vtc/badges/mine/accept/0.1/payload.js +64 -2
  49. package/dist/vtc/badges/mine/accept/0.1/payload.js.map +1 -1
  50. package/dist/vtc/badges/mine/decline/0.1/payload.d.ts +118 -6
  51. package/dist/vtc/badges/mine/decline/0.1/payload.d.ts.map +1 -1
  52. package/dist/vtc/badges/mine/decline/0.1/payload.js +64 -2
  53. package/dist/vtc/badges/mine/decline/0.1/payload.js.map +1 -1
  54. package/dist/vtc/badges/mine/list/0.1/payload.d.ts +118 -6
  55. package/dist/vtc/badges/mine/list/0.1/payload.d.ts.map +1 -1
  56. package/dist/vtc/badges/mine/list/0.1/payload.js +64 -2
  57. package/dist/vtc/badges/mine/list/0.1/payload.js.map +1 -1
  58. package/dist/vtc/badges/show/0.1/payload.d.ts +472 -26
  59. package/dist/vtc/badges/show/0.1/payload.d.ts.map +1 -1
  60. package/dist/vtc/badges/show/0.1/payload.js +264 -12
  61. package/dist/vtc/badges/show/0.1/payload.js.map +1 -1
  62. package/package.json +1 -1
  63. package/src/_shared/components.ts +16 -1
  64. package/src/auth/step-up/requests/show/0.1/payload.ts +317 -0
  65. package/src/index.ts +9 -0
  66. package/src/vtc/badges/_shared/0.1/badge.ts +1 -1
  67. package/src/vtc/badges/awards/list/0.1/payload.ts +66 -4
  68. package/src/vtc/badges/awards/offer/0.1/payload.ts +66 -4
  69. package/src/vtc/badges/awards/revoke/0.1/payload.ts +66 -4
  70. package/src/vtc/badges/awards/share/0.1/payload.ts +446 -0
  71. package/src/vtc/badges/awards/unshare/0.1/payload.ts +446 -0
  72. package/src/vtc/badges/awards/withdraw/0.1/payload.ts +66 -4
  73. package/src/vtc/badges/kudos/give/0.1/payload.ts +66 -4
  74. package/src/vtc/badges/kudos/list/0.1/payload.ts +66 -4
  75. package/src/vtc/badges/mine/accept/0.1/payload.ts +66 -4
  76. package/src/vtc/badges/mine/decline/0.1/payload.ts +66 -4
  77. package/src/vtc/badges/mine/list/0.1/payload.ts +66 -4
  78. package/src/vtc/badges/show/0.1/payload.ts +272 -14
@@ -0,0 +1,446 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/badges/awards/unshare/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Award, AwardId, AwardNote, AwardShare, AwardState, BadgeId, EntryId, Ext, GroupCredentialId } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Stop showing an award outside the community: its public locations answer nothing from now on. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCBadgesAwardsUnsharePayload {
13
+ /**
14
+ * An award of the signer's. One not shared is answered as it is.
15
+ */
16
+ awardId: AwardId;
17
+ ext?: Ext;
18
+ }
19
+ /**
20
+ * The success response to a vtc/badges/awards/unshare/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1#response.
21
+ */
22
+ export interface VTCBadgesAwardsUnshareResponsePayload {
23
+ /**
24
+ * The award as it now stands, without `shared`.
25
+ */
26
+ award: Award;
27
+ ext?: Ext;
28
+ }
29
+
30
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
31
+ export type { Award, AwardId, AwardNote, AwardShare, AwardState, BadgeId, EntryId, Ext, GroupCredentialId };
32
+
33
+ /** Trust Task type URI. */
34
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1" as const;
35
+
36
+ /**
37
+ * The earlier version of this specification that this one declares it
38
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
39
+ * `null`. Only the direct declaration — follow the chain with
40
+ * `extendsChain` / `readForSpec`.
41
+ */
42
+ export const EXTENDS: string | null = null;
43
+
44
+ /**
45
+ * Why this version is deprecated, or `null` while it is current. A
46
+ * superseded or retired version is still supported, and is withdrawn from
47
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
48
+ * Versions").
49
+ */
50
+ export const DEPRECATION: string | null = null;
51
+
52
+ /** Stable alias for this specification's request payload shape. */
53
+ export type Payload = VTCBadgesAwardsUnsharePayload;
54
+
55
+ /** Trust Task response type URI (request type URI + "#response"). */
56
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1#response" as const;
57
+
58
+ /** Stable alias for this specification's success-response payload shape. */
59
+ export type Response = VTCBadgesAwardsUnshareResponsePayload;
60
+
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 const PAYLOAD_SCHEMA = {
71
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
72
+ "$id": "https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1",
73
+ "title": "VTC Badges — Awards — Unshare — payload",
74
+ "description": "Stop showing an award outside the community: its public locations answer nothing from now on. The outer document members are owned by the framework — SPEC §6.3.",
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": [
78
+ "awardId"
79
+ ],
80
+ "properties": {
81
+ "awardId": {
82
+ "$ref": "#/$defs/AwardId",
83
+ "description": "An award of the signer's. One not shared is answered as it is."
84
+ },
85
+ "ext": {
86
+ "$ref": "#/$defs/Ext"
87
+ }
88
+ },
89
+ "$defs": {
90
+ "Response": {
91
+ "$anchor": "response",
92
+ "title": "VTC Badges — Awards — Unshare — response payload",
93
+ "description": "The success response to a vtc/badges/awards/unshare/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1#response.",
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": [
97
+ "award"
98
+ ],
99
+ "properties": {
100
+ "award": {
101
+ "$ref": "#/$defs/Award",
102
+ "description": "The award as it now stands, without `shared`."
103
+ },
104
+ "ext": {
105
+ "$ref": "#/$defs/Ext"
106
+ }
107
+ }
108
+ },
109
+ "Ext": {
110
+ "title": "Ext",
111
+ "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.",
112
+ "type": "object",
113
+ "minProperties": 1,
114
+ "additionalProperties": true,
115
+ "propertyNames": {
116
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
117
+ }
118
+ },
119
+ "Award": {
120
+ "title": "Award",
121
+ "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).",
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": [
125
+ "awardId",
126
+ "badgeId",
127
+ "entryId",
128
+ "state",
129
+ "offeredAt"
130
+ ],
131
+ "properties": {
132
+ "awardId": {
133
+ "$ref": "#/$defs/AwardId"
134
+ },
135
+ "badgeId": {
136
+ "$ref": "#/$defs/BadgeId"
137
+ },
138
+ "entryId": {
139
+ "$ref": "#/$defs/EntryId",
140
+ "description": "The recipient."
141
+ },
142
+ "givenBy": {
143
+ "$ref": "#/$defs/EntryId"
144
+ },
145
+ "note": {
146
+ "$ref": "#/$defs/AwardNote"
147
+ },
148
+ "state": {
149
+ "$ref": "#/$defs/AwardState"
150
+ },
151
+ "offeredAt": {
152
+ "type": "string",
153
+ "format": "date-time"
154
+ },
155
+ "decidedAt": {
156
+ "type": "string",
157
+ "format": "date-time",
158
+ "description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
159
+ },
160
+ "expiresAt": {
161
+ "type": "string",
162
+ "format": "date-time",
163
+ "description": "When an unanswered offer lapses, where the community expires offers."
164
+ },
165
+ "credentialId": {
166
+ "$ref": "#/$defs/GroupCredentialId"
167
+ },
168
+ "shared": {
169
+ "$ref": "#/$defs/AwardShare"
170
+ },
171
+ "ext": {
172
+ "$ref": "#/$defs/Ext"
173
+ }
174
+ }
175
+ },
176
+ "AwardShare": {
177
+ "title": "AwardShare",
178
+ "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).",
179
+ "type": "object",
180
+ "additionalProperties": false,
181
+ "required": [
182
+ "verificationUrl",
183
+ "since"
184
+ ],
185
+ "properties": {
186
+ "verificationUrl": {
187
+ "type": "string",
188
+ "format": "uri",
189
+ "maxLength": 2048,
190
+ "description": "The public location that answers the credential and a verification of it."
191
+ },
192
+ "bakedImageUrl": {
193
+ "type": "string",
194
+ "format": "uri",
195
+ "maxLength": 2048,
196
+ "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."
197
+ },
198
+ "since": {
199
+ "type": "string",
200
+ "format": "date-time"
201
+ }
202
+ }
203
+ },
204
+ "AwardState": {
205
+ "title": "AwardState",
206
+ "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).",
207
+ "type": "string",
208
+ "enum": [
209
+ "offered",
210
+ "accepted",
211
+ "declined",
212
+ "withdrawn",
213
+ "expired",
214
+ "revoked"
215
+ ]
216
+ },
217
+ "AwardNote": {
218
+ "title": "AwardNote",
219
+ "type": "string",
220
+ "minLength": 1,
221
+ "maxLength": 500,
222
+ "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)."
223
+ },
224
+ "BadgeId": {
225
+ "title": "BadgeId",
226
+ "description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
227
+ "type": "string",
228
+ "pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
229
+ },
230
+ "AwardId": {
231
+ "title": "AwardId",
232
+ "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.",
233
+ "type": "string",
234
+ "pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
235
+ },
236
+ "GroupCredentialId": {
237
+ "title": "GroupCredentialId",
238
+ "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.",
239
+ "type": "string",
240
+ "minLength": 1,
241
+ "maxLength": 512
242
+ },
243
+ "EntryId": {
244
+ "title": "EntryId",
245
+ "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.",
246
+ "type": "string",
247
+ "pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
248
+ }
249
+ }
250
+ } as const;
251
+
252
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
253
+ export const RESPONSE_PAYLOAD_SCHEMA = {
254
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
255
+ "$ref": "#/$defs/Response",
256
+ "$defs": {
257
+ "Response": {
258
+ "$anchor": "response",
259
+ "title": "VTC Badges — Awards — Unshare — response payload",
260
+ "description": "The success response to a vtc/badges/awards/unshare/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/awards/unshare/0.1#response.",
261
+ "type": "object",
262
+ "additionalProperties": false,
263
+ "required": [
264
+ "award"
265
+ ],
266
+ "properties": {
267
+ "award": {
268
+ "$ref": "#/$defs/Award",
269
+ "description": "The award as it now stands, without `shared`."
270
+ },
271
+ "ext": {
272
+ "$ref": "#/$defs/Ext"
273
+ }
274
+ }
275
+ },
276
+ "Ext": {
277
+ "title": "Ext",
278
+ "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.",
279
+ "type": "object",
280
+ "minProperties": 1,
281
+ "additionalProperties": true,
282
+ "propertyNames": {
283
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
284
+ }
285
+ },
286
+ "Award": {
287
+ "title": "Award",
288
+ "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).",
289
+ "type": "object",
290
+ "additionalProperties": false,
291
+ "required": [
292
+ "awardId",
293
+ "badgeId",
294
+ "entryId",
295
+ "state",
296
+ "offeredAt"
297
+ ],
298
+ "properties": {
299
+ "awardId": {
300
+ "$ref": "#/$defs/AwardId"
301
+ },
302
+ "badgeId": {
303
+ "$ref": "#/$defs/BadgeId"
304
+ },
305
+ "entryId": {
306
+ "$ref": "#/$defs/EntryId",
307
+ "description": "The recipient."
308
+ },
309
+ "givenBy": {
310
+ "$ref": "#/$defs/EntryId"
311
+ },
312
+ "note": {
313
+ "$ref": "#/$defs/AwardNote"
314
+ },
315
+ "state": {
316
+ "$ref": "#/$defs/AwardState"
317
+ },
318
+ "offeredAt": {
319
+ "type": "string",
320
+ "format": "date-time"
321
+ },
322
+ "decidedAt": {
323
+ "type": "string",
324
+ "format": "date-time",
325
+ "description": "When the recipient accepted or declined, the giver withdrew, the offer expired, or the award was revoked."
326
+ },
327
+ "expiresAt": {
328
+ "type": "string",
329
+ "format": "date-time",
330
+ "description": "When an unanswered offer lapses, where the community expires offers."
331
+ },
332
+ "credentialId": {
333
+ "$ref": "#/$defs/GroupCredentialId"
334
+ },
335
+ "shared": {
336
+ "$ref": "#/$defs/AwardShare"
337
+ },
338
+ "ext": {
339
+ "$ref": "#/$defs/Ext"
340
+ }
341
+ }
342
+ },
343
+ "AwardShare": {
344
+ "title": "AwardShare",
345
+ "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).",
346
+ "type": "object",
347
+ "additionalProperties": false,
348
+ "required": [
349
+ "verificationUrl",
350
+ "since"
351
+ ],
352
+ "properties": {
353
+ "verificationUrl": {
354
+ "type": "string",
355
+ "format": "uri",
356
+ "maxLength": 2048,
357
+ "description": "The public location that answers the credential and a verification of it."
358
+ },
359
+ "bakedImageUrl": {
360
+ "type": "string",
361
+ "format": "uri",
362
+ "maxLength": 2048,
363
+ "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."
364
+ },
365
+ "since": {
366
+ "type": "string",
367
+ "format": "date-time"
368
+ }
369
+ }
370
+ },
371
+ "AwardState": {
372
+ "title": "AwardState",
373
+ "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).",
374
+ "type": "string",
375
+ "enum": [
376
+ "offered",
377
+ "accepted",
378
+ "declined",
379
+ "withdrawn",
380
+ "expired",
381
+ "revoked"
382
+ ]
383
+ },
384
+ "AwardNote": {
385
+ "title": "AwardNote",
386
+ "type": "string",
387
+ "minLength": 1,
388
+ "maxLength": 500,
389
+ "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)."
390
+ },
391
+ "BadgeId": {
392
+ "title": "BadgeId",
393
+ "description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
394
+ "type": "string",
395
+ "pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
396
+ },
397
+ "AwardId": {
398
+ "title": "AwardId",
399
+ "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.",
400
+ "type": "string",
401
+ "pattern": "^awd_[A-Za-z0-9_-]{16,64}$"
402
+ },
403
+ "GroupCredentialId": {
404
+ "title": "GroupCredentialId",
405
+ "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.",
406
+ "type": "string",
407
+ "minLength": 1,
408
+ "maxLength": 512
409
+ },
410
+ "EntryId": {
411
+ "title": "EntryId",
412
+ "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.",
413
+ "type": "string",
414
+ "pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
415
+ }
416
+ }
417
+ } as const;
418
+
419
+ /**
420
+ * SPEC.md §7.2 policy for the request variant, from this specification's
421
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
422
+ * per-specification and cannot be derived from the document alone, and
423
+ * item 2 needs the schema this carries.
424
+ */
425
+ export const SPEC = {
426
+ typeUri: TYPE_URI,
427
+ isBearer: false,
428
+ isProofRequired: true,
429
+ isRecipientRequired: true,
430
+ isIssuedAtRequired: true,
431
+ payloadSchema: PAYLOAD_SCHEMA,
432
+ } as const;
433
+
434
+ /**
435
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
436
+ * tracks the *issuer* party's requirement because a response swaps the
437
+ * parties (§7.3 item 5).
438
+ */
439
+ export const RESPONSE_SPEC = {
440
+ typeUri: RESPONSE_TYPE_URI,
441
+ isBearer: false,
442
+ isProofRequired: true,
443
+ isRecipientRequired: true,
444
+ isIssuedAtRequired: true,
445
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
446
+ } as const;
@@ -3,7 +3,7 @@
3
3
  * Source: specs/vtc/badges/awards/withdraw/0.1/payload.schema.json
4
4
  */
5
5
 
6
- import type { Award, AwardId, AwardNote, AwardState, BadgeId, EntryId, Ext, GroupCredentialId } from "../../../../../_shared/components.js";
6
+ import type { Award, AwardId, AwardNote, AwardShare, AwardState, BadgeId, EntryId, Ext, GroupCredentialId } from "../../../../../_shared/components.js";
7
7
 
8
8
 
9
9
  /**
@@ -32,7 +32,7 @@ export interface VTCBadgesAwardsWithdrawResponsePayload {
32
32
  }
33
33
 
34
34
  /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
35
- export type { Award, AwardId, AwardNote, AwardState, BadgeId, EntryId, Ext, GroupCredentialId };
35
+ export type { Award, AwardId, AwardNote, AwardShare, AwardState, BadgeId, EntryId, Ext, GroupCredentialId };
36
36
 
37
37
  /** Trust Task type URI. */
38
38
  export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/awards/withdraw/0.1" as const;
@@ -129,7 +129,7 @@ export const PAYLOAD_SCHEMA = {
129
129
  },
130
130
  "Award": {
131
131
  "title": "Award",
132
- "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.",
132
+ "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).",
133
133
  "type": "object",
134
134
  "additionalProperties": false,
135
135
  "required": [
@@ -176,11 +176,42 @@ export const PAYLOAD_SCHEMA = {
176
176
  "credentialId": {
177
177
  "$ref": "#/$defs/GroupCredentialId"
178
178
  },
179
+ "shared": {
180
+ "$ref": "#/$defs/AwardShare"
181
+ },
179
182
  "ext": {
180
183
  "$ref": "#/$defs/Ext"
181
184
  }
182
185
  }
183
186
  },
187
+ "AwardShare": {
188
+ "title": "AwardShare",
189
+ "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).",
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": [
193
+ "verificationUrl",
194
+ "since"
195
+ ],
196
+ "properties": {
197
+ "verificationUrl": {
198
+ "type": "string",
199
+ "format": "uri",
200
+ "maxLength": 2048,
201
+ "description": "The public location that answers the credential and a verification of it."
202
+ },
203
+ "bakedImageUrl": {
204
+ "type": "string",
205
+ "format": "uri",
206
+ "maxLength": 2048,
207
+ "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."
208
+ },
209
+ "since": {
210
+ "type": "string",
211
+ "format": "date-time"
212
+ }
213
+ }
214
+ },
184
215
  "AwardState": {
185
216
  "title": "AwardState",
186
217
  "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).",
@@ -265,7 +296,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
265
296
  },
266
297
  "Award": {
267
298
  "title": "Award",
268
- "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.",
299
+ "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).",
269
300
  "type": "object",
270
301
  "additionalProperties": false,
271
302
  "required": [
@@ -312,11 +343,42 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
312
343
  "credentialId": {
313
344
  "$ref": "#/$defs/GroupCredentialId"
314
345
  },
346
+ "shared": {
347
+ "$ref": "#/$defs/AwardShare"
348
+ },
315
349
  "ext": {
316
350
  "$ref": "#/$defs/Ext"
317
351
  }
318
352
  }
319
353
  },
354
+ "AwardShare": {
355
+ "title": "AwardShare",
356
+ "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).",
357
+ "type": "object",
358
+ "additionalProperties": false,
359
+ "required": [
360
+ "verificationUrl",
361
+ "since"
362
+ ],
363
+ "properties": {
364
+ "verificationUrl": {
365
+ "type": "string",
366
+ "format": "uri",
367
+ "maxLength": 2048,
368
+ "description": "The public location that answers the credential and a verification of it."
369
+ },
370
+ "bakedImageUrl": {
371
+ "type": "string",
372
+ "format": "uri",
373
+ "maxLength": 2048,
374
+ "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."
375
+ },
376
+ "since": {
377
+ "type": "string",
378
+ "format": "date-time"
379
+ }
380
+ }
381
+ },
320
382
  "AwardState": {
321
383
  "title": "AwardState",
322
384
  "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).",