@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.
- package/CHANGELOG.md +9 -0
- package/dist/_shared/components.d.ts +48 -4
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts +1 -1
- package/dist/vtc/badges/_shared/0.1/badge.d.ts.map +1 -1
- package/dist/vtc/badges/claims/create/0.1/payload.d.ts +595 -0
- package/dist/vtc/badges/claims/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/create/0.1/payload.js +345 -0
- package/dist/vtc/badges/claims/create/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/list/0.1/payload.d.ts +586 -0
- package/dist/vtc/badges/claims/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/list/0.1/payload.js +335 -0
- package/dist/vtc/badges/claims/list/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts +720 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.js +417 -0
- package/dist/vtc/badges/claims/redeem/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts +512 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.js +305 -0
- package/dist/vtc/badges/claims/withdraw/0.1/payload.js.map +1 -0
- package/dist/vtc/badges/create/0.1/payload.d.ts +40 -16
- package/dist/vtc/badges/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/create/0.1/payload.js +28 -8
- package/dist/vtc/badges/create/0.1/payload.js.map +1 -1
- package/dist/vtc/badges/promote/0.1/payload.d.ts +40 -16
- package/dist/vtc/badges/promote/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/badges/promote/0.1/payload.js +28 -8
- package/dist/vtc/badges/promote/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/create/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/create/0.1/payload.js +28 -8
- package/dist/vtc/groups/create/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.1/payload.js +28 -8
- package/dist/vtc/groups/list/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.d.ts +40 -16
- package/dist/vtc/groups/list/0.2/payload.d.ts.map +1 -1
- package/dist/vtc/groups/list/0.2/payload.js +28 -8
- package/dist/vtc/groups/list/0.2/payload.js.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/show/0.1/payload.js +28 -8
- package/dist/vtc/groups/show/0.1/payload.js.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.d.ts +40 -16
- package/dist/vtc/groups/update/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/groups/update/0.1/payload.js +28 -8
- package/dist/vtc/groups/update/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +48 -4
- package/src/index.ts +12 -0
- package/src/vtc/badges/_shared/0.1/badge.ts +1 -1
- package/src/vtc/badges/claims/create/0.1/payload.ts +395 -0
- package/src/vtc/badges/claims/list/0.1/payload.ts +386 -0
- package/src/vtc/badges/claims/redeem/0.1/payload.ts +454 -0
- package/src/vtc/badges/claims/withdraw/0.1/payload.ts +342 -0
- package/src/vtc/badges/create/0.1/payload.ts +28 -8
- package/src/vtc/badges/promote/0.1/payload.ts +28 -8
- package/src/vtc/groups/create/0.1/payload.ts +28 -8
- package/src/vtc/groups/list/0.1/payload.ts +28 -8
- package/src/vtc/groups/list/0.2/payload.ts +28 -8
- package/src/vtc/groups/show/0.1/payload.ts +28 -8
- package/src/vtc/groups/update/0.1/payload.ts +28 -8
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/badges/claims/create/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { BadgeId, ClaimCode, ClaimId, ClaimSecret, EntryId, Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Issue a claim code for a community badge: the community answers the code, once. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCBadgesClaimsCreatePayload {
|
|
13
|
+
badgeId: BadgeId;
|
|
14
|
+
/**
|
|
15
|
+
* What the code is for — the event, say.
|
|
16
|
+
*/
|
|
17
|
+
label: string;
|
|
18
|
+
/**
|
|
19
|
+
* After this the code admits no one. At most 90 days ahead.
|
|
20
|
+
*/
|
|
21
|
+
validUntil: string;
|
|
22
|
+
/**
|
|
23
|
+
* How many claims the code admits.
|
|
24
|
+
*/
|
|
25
|
+
limit: number;
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The success response to a vtc/badges/claims/create/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/create/0.1#response.
|
|
30
|
+
*/
|
|
31
|
+
export interface VTCBadgesClaimsCreateResponsePayload {
|
|
32
|
+
claim: ClaimCode;
|
|
33
|
+
/**
|
|
34
|
+
* The code, answered this once. The community keeps only its digest.
|
|
35
|
+
*/
|
|
36
|
+
code: ClaimSecret;
|
|
37
|
+
ext?: Ext;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
41
|
+
export type { BadgeId, ClaimCode, ClaimId, ClaimSecret, EntryId, Ext };
|
|
42
|
+
|
|
43
|
+
/** Trust Task type URI. */
|
|
44
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/badges/claims/create/0.1" as const;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The earlier version of this specification that this one declares it
|
|
48
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
49
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
50
|
+
* `extendsChain` / `readForSpec`.
|
|
51
|
+
*/
|
|
52
|
+
export const EXTENDS: string | null = null;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
56
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
57
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
58
|
+
* Versions").
|
|
59
|
+
*/
|
|
60
|
+
export const DEPRECATION: string | null = null;
|
|
61
|
+
|
|
62
|
+
/** Stable alias for this specification's request payload shape. */
|
|
63
|
+
export type Payload = VTCBadgesClaimsCreatePayload;
|
|
64
|
+
|
|
65
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
66
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/badges/claims/create/0.1#response" as const;
|
|
67
|
+
|
|
68
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
69
|
+
export type Response = VTCBadgesClaimsCreateResponsePayload;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* This specification's payload schema, as a value.
|
|
73
|
+
*
|
|
74
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
75
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
76
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
77
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
78
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
79
|
+
*/
|
|
80
|
+
export const PAYLOAD_SCHEMA = {
|
|
81
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
82
|
+
"$id": "https://trusttasks.org/spec/vtc/badges/claims/create/0.1",
|
|
83
|
+
"title": "VTC Badges — Claims — Create — payload",
|
|
84
|
+
"description": "Issue a claim code for a community badge: the community answers the code, once. The outer document members are owned by the framework — SPEC §6.3.",
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": [
|
|
88
|
+
"badgeId",
|
|
89
|
+
"label",
|
|
90
|
+
"validUntil",
|
|
91
|
+
"limit"
|
|
92
|
+
],
|
|
93
|
+
"properties": {
|
|
94
|
+
"badgeId": {
|
|
95
|
+
"$ref": "#/$defs/BadgeId"
|
|
96
|
+
},
|
|
97
|
+
"label": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1,
|
|
100
|
+
"maxLength": 120,
|
|
101
|
+
"description": "What the code is for — the event, say."
|
|
102
|
+
},
|
|
103
|
+
"validUntil": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"format": "date-time",
|
|
106
|
+
"description": "After this the code admits no one. At most 90 days ahead."
|
|
107
|
+
},
|
|
108
|
+
"limit": {
|
|
109
|
+
"type": "integer",
|
|
110
|
+
"minimum": 1,
|
|
111
|
+
"maximum": 10000,
|
|
112
|
+
"description": "How many claims the code admits."
|
|
113
|
+
},
|
|
114
|
+
"ext": {
|
|
115
|
+
"$ref": "#/$defs/Ext"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"$defs": {
|
|
119
|
+
"Response": {
|
|
120
|
+
"$anchor": "response",
|
|
121
|
+
"title": "VTC Badges — Claims — Create — response payload",
|
|
122
|
+
"description": "The success response to a vtc/badges/claims/create/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/create/0.1#response.",
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"required": [
|
|
126
|
+
"claim",
|
|
127
|
+
"code"
|
|
128
|
+
],
|
|
129
|
+
"properties": {
|
|
130
|
+
"claim": {
|
|
131
|
+
"$ref": "#/$defs/ClaimCode"
|
|
132
|
+
},
|
|
133
|
+
"code": {
|
|
134
|
+
"$ref": "#/$defs/ClaimSecret",
|
|
135
|
+
"description": "The code, answered this once. The community keeps only its digest."
|
|
136
|
+
},
|
|
137
|
+
"ext": {
|
|
138
|
+
"$ref": "#/$defs/Ext"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"Ext": {
|
|
143
|
+
"title": "Ext",
|
|
144
|
+
"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.",
|
|
145
|
+
"type": "object",
|
|
146
|
+
"minProperties": 1,
|
|
147
|
+
"additionalProperties": true,
|
|
148
|
+
"propertyNames": {
|
|
149
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"ClaimSecret": {
|
|
153
|
+
"title": "ClaimSecret",
|
|
154
|
+
"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).",
|
|
155
|
+
"type": "string",
|
|
156
|
+
"pattern": "^[A-Za-z0-9_-]{22,64}$"
|
|
157
|
+
},
|
|
158
|
+
"ClaimCode": {
|
|
159
|
+
"title": "ClaimCode",
|
|
160
|
+
"description": "A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).",
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"required": [
|
|
164
|
+
"claimId",
|
|
165
|
+
"badgeId",
|
|
166
|
+
"label",
|
|
167
|
+
"validUntil",
|
|
168
|
+
"limit",
|
|
169
|
+
"claims",
|
|
170
|
+
"state",
|
|
171
|
+
"createdAt"
|
|
172
|
+
],
|
|
173
|
+
"properties": {
|
|
174
|
+
"claimId": {
|
|
175
|
+
"$ref": "#/$defs/ClaimId"
|
|
176
|
+
},
|
|
177
|
+
"badgeId": {
|
|
178
|
+
"$ref": "#/$defs/BadgeId"
|
|
179
|
+
},
|
|
180
|
+
"label": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"minLength": 1,
|
|
183
|
+
"maxLength": 120,
|
|
184
|
+
"description": "What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it."
|
|
185
|
+
},
|
|
186
|
+
"validUntil": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"format": "date-time",
|
|
189
|
+
"description": "After this the code admits no one."
|
|
190
|
+
},
|
|
191
|
+
"limit": {
|
|
192
|
+
"type": "integer",
|
|
193
|
+
"minimum": 1,
|
|
194
|
+
"maximum": 10000,
|
|
195
|
+
"description": "How many claims the code admits."
|
|
196
|
+
},
|
|
197
|
+
"claims": {
|
|
198
|
+
"type": "integer",
|
|
199
|
+
"minimum": 0,
|
|
200
|
+
"description": "How many members have redeemed it."
|
|
201
|
+
},
|
|
202
|
+
"state": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"enum": [
|
|
205
|
+
"active",
|
|
206
|
+
"withdrawn"
|
|
207
|
+
],
|
|
208
|
+
"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."
|
|
209
|
+
},
|
|
210
|
+
"createdAt": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"format": "date-time"
|
|
213
|
+
},
|
|
214
|
+
"createdBy": {
|
|
215
|
+
"$ref": "#/$defs/EntryId",
|
|
216
|
+
"description": "The issuer's entry, where they have one; the giver of every award the code admits."
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"BadgeId": {
|
|
221
|
+
"title": "BadgeId",
|
|
222
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
223
|
+
"type": "string",
|
|
224
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
225
|
+
},
|
|
226
|
+
"ClaimId": {
|
|
227
|
+
"title": "ClaimId",
|
|
228
|
+
"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).",
|
|
229
|
+
"type": "string",
|
|
230
|
+
"pattern": "^bcl_[A-Za-z0-9_-]{16,64}$"
|
|
231
|
+
},
|
|
232
|
+
"EntryId": {
|
|
233
|
+
"title": "EntryId",
|
|
234
|
+
"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.",
|
|
235
|
+
"type": "string",
|
|
236
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
} as const;
|
|
240
|
+
|
|
241
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
242
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
243
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
244
|
+
"$ref": "#/$defs/Response",
|
|
245
|
+
"$defs": {
|
|
246
|
+
"Response": {
|
|
247
|
+
"$anchor": "response",
|
|
248
|
+
"title": "VTC Badges — Claims — Create — response payload",
|
|
249
|
+
"description": "The success response to a vtc/badges/claims/create/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/badges/claims/create/0.1#response.",
|
|
250
|
+
"type": "object",
|
|
251
|
+
"additionalProperties": false,
|
|
252
|
+
"required": [
|
|
253
|
+
"claim",
|
|
254
|
+
"code"
|
|
255
|
+
],
|
|
256
|
+
"properties": {
|
|
257
|
+
"claim": {
|
|
258
|
+
"$ref": "#/$defs/ClaimCode"
|
|
259
|
+
},
|
|
260
|
+
"code": {
|
|
261
|
+
"$ref": "#/$defs/ClaimSecret",
|
|
262
|
+
"description": "The code, answered this once. The community keeps only its digest."
|
|
263
|
+
},
|
|
264
|
+
"ext": {
|
|
265
|
+
"$ref": "#/$defs/Ext"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"Ext": {
|
|
270
|
+
"title": "Ext",
|
|
271
|
+
"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.",
|
|
272
|
+
"type": "object",
|
|
273
|
+
"minProperties": 1,
|
|
274
|
+
"additionalProperties": true,
|
|
275
|
+
"propertyNames": {
|
|
276
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"ClaimSecret": {
|
|
280
|
+
"title": "ClaimSecret",
|
|
281
|
+
"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).",
|
|
282
|
+
"type": "string",
|
|
283
|
+
"pattern": "^[A-Za-z0-9_-]{22,64}$"
|
|
284
|
+
},
|
|
285
|
+
"ClaimCode": {
|
|
286
|
+
"title": "ClaimCode",
|
|
287
|
+
"description": "A claim code's record, as the badge's owners and administrators see it: never the code (VTI-BDG-027).",
|
|
288
|
+
"type": "object",
|
|
289
|
+
"additionalProperties": false,
|
|
290
|
+
"required": [
|
|
291
|
+
"claimId",
|
|
292
|
+
"badgeId",
|
|
293
|
+
"label",
|
|
294
|
+
"validUntil",
|
|
295
|
+
"limit",
|
|
296
|
+
"claims",
|
|
297
|
+
"state",
|
|
298
|
+
"createdAt"
|
|
299
|
+
],
|
|
300
|
+
"properties": {
|
|
301
|
+
"claimId": {
|
|
302
|
+
"$ref": "#/$defs/ClaimId"
|
|
303
|
+
},
|
|
304
|
+
"badgeId": {
|
|
305
|
+
"$ref": "#/$defs/BadgeId"
|
|
306
|
+
},
|
|
307
|
+
"label": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"minLength": 1,
|
|
310
|
+
"maxLength": 120,
|
|
311
|
+
"description": "What the code is for — the event, say — shown to the badge's owners. Never shown to whoever redeems it."
|
|
312
|
+
},
|
|
313
|
+
"validUntil": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"format": "date-time",
|
|
316
|
+
"description": "After this the code admits no one."
|
|
317
|
+
},
|
|
318
|
+
"limit": {
|
|
319
|
+
"type": "integer",
|
|
320
|
+
"minimum": 1,
|
|
321
|
+
"maximum": 10000,
|
|
322
|
+
"description": "How many claims the code admits."
|
|
323
|
+
},
|
|
324
|
+
"claims": {
|
|
325
|
+
"type": "integer",
|
|
326
|
+
"minimum": 0,
|
|
327
|
+
"description": "How many members have redeemed it."
|
|
328
|
+
},
|
|
329
|
+
"state": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"enum": [
|
|
332
|
+
"active",
|
|
333
|
+
"withdrawn"
|
|
334
|
+
],
|
|
335
|
+
"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."
|
|
336
|
+
},
|
|
337
|
+
"createdAt": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"format": "date-time"
|
|
340
|
+
},
|
|
341
|
+
"createdBy": {
|
|
342
|
+
"$ref": "#/$defs/EntryId",
|
|
343
|
+
"description": "The issuer's entry, where they have one; the giver of every award the code admits."
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"BadgeId": {
|
|
348
|
+
"title": "BadgeId",
|
|
349
|
+
"description": "Opaque identifier of a badge: `bdg_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BDG-001).",
|
|
350
|
+
"type": "string",
|
|
351
|
+
"pattern": "^bdg_[A-Za-z0-9_-]{16,64}$"
|
|
352
|
+
},
|
|
353
|
+
"ClaimId": {
|
|
354
|
+
"title": "ClaimId",
|
|
355
|
+
"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).",
|
|
356
|
+
"type": "string",
|
|
357
|
+
"pattern": "^bcl_[A-Za-z0-9_-]{16,64}$"
|
|
358
|
+
},
|
|
359
|
+
"EntryId": {
|
|
360
|
+
"title": "EntryId",
|
|
361
|
+
"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.",
|
|
362
|
+
"type": "string",
|
|
363
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
} as const;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
370
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
371
|
+
* per-specification and cannot be derived from the document alone, and
|
|
372
|
+
* item 2 needs the schema this carries.
|
|
373
|
+
*/
|
|
374
|
+
export const SPEC = {
|
|
375
|
+
typeUri: TYPE_URI,
|
|
376
|
+
isBearer: false,
|
|
377
|
+
isProofRequired: true,
|
|
378
|
+
isRecipientRequired: true,
|
|
379
|
+
isIssuedAtRequired: true,
|
|
380
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
381
|
+
} as const;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
385
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
386
|
+
* parties (§7.3 item 5).
|
|
387
|
+
*/
|
|
388
|
+
export const RESPONSE_SPEC = {
|
|
389
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
390
|
+
isBearer: false,
|
|
391
|
+
isProofRequired: true,
|
|
392
|
+
isRecipientRequired: true,
|
|
393
|
+
isIssuedAtRequired: true,
|
|
394
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
395
|
+
} as const;
|