@openvtc/trust-tasks 0.19.18 → 0.19.20
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 +4 -0
- package/dist/_shared/components.d.ts +38 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -1
- package/dist/persona/attribute/list/1.0/payload.d.ts +124 -4
- package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/attribute/list/1.0/payload.js +72 -2
- package/dist/persona/attribute/list/1.0/payload.js.map +1 -1
- package/dist/persona/attribute/put/1.0/payload.d.ts +110 -4
- package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/attribute/put/1.0/payload.js +62 -2
- package/dist/persona/attribute/put/1.0/payload.js.map +1 -1
- package/dist/persona/binding/set/1.0/payload.d.ts +6 -6
- package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/set/1.0/payload.js +2 -3
- package/dist/persona/binding/set/1.0/payload.js.map +1 -1
- package/dist/persona/contact/get/1.0/payload.d.ts +84 -4
- package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/contact/get/1.0/payload.js +52 -2
- package/dist/persona/contact/get/1.0/payload.js.map +1 -1
- package/dist/persona/contact/put/1.0/payload.d.ts +84 -4
- package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/contact/put/1.0/payload.js +52 -2
- package/dist/persona/contact/put/1.0/payload.js.map +1 -1
- package/dist/persona/disclosure/preview/1.0/payload.d.ts +5 -5
- package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -1
- package/dist/persona/disclosure/preview/1.0/payload.js +4 -2
- package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -1
- package/dist/persona/profile/compose/1.0/payload.d.ts +31 -3
- package/dist/persona/profile/compose/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/compose/1.0/payload.js +11 -1
- package/dist/persona/profile/compose/1.0/payload.js.map +1 -1
- package/dist/persona/profile/get/1.0/payload.d.ts +230 -6
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/get/1.0/payload.js +140 -2
- package/dist/persona/profile/get/1.0/payload.js.map +1 -1
- package/dist/persona/profile/list/1.0/payload.d.ts +230 -6
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/list/1.0/payload.js +140 -2
- package/dist/persona/profile/list/1.0/payload.js.map +1 -1
- package/dist/persona/profile/put/1.0/payload.d.ts +230 -6
- package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/put/1.0/payload.js +138 -2
- package/dist/persona/profile/put/1.0/payload.js.map +1 -1
- package/dist/persona/profile/timeline/1.0/payload.d.ts +588 -0
- package/dist/persona/profile/timeline/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/timeline/1.0/payload.js +322 -0
- package/dist/persona/profile/timeline/1.0/payload.js.map +1 -0
- package/dist/persona/profile/usage/1.0/payload.d.ts +533 -0
- package/dist/persona/profile/usage/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/usage/1.0/payload.js +302 -0
- package/dist/persona/profile/usage/1.0/payload.js.map +1 -0
- package/dist/vtc/invitations/deliver/0.1/payload.d.ts +318 -0
- package/dist/vtc/invitations/deliver/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/invitations/deliver/0.1/payload.js +183 -0
- package/dist/vtc/invitations/deliver/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +41 -0
- package/src/index.ts +3 -0
- package/src/persona/_shared/0.1/persona-record.ts +1 -1
- package/src/persona/attribute/list/1.0/payload.ts +72 -2
- package/src/persona/attribute/put/1.0/payload.ts +68 -2
- package/src/persona/binding/set/1.0/payload.ts +4 -5
- package/src/persona/contact/get/1.0/payload.ts +52 -2
- package/src/persona/contact/put/1.0/payload.ts +52 -2
- package/src/persona/disclosure/preview/1.0/payload.ts +5 -3
- package/src/persona/profile/compose/1.0/payload.ts +20 -2
- package/src/persona/profile/get/1.0/payload.ts +142 -4
- package/src/persona/profile/list/1.0/payload.ts +142 -4
- package/src/persona/profile/put/1.0/payload.ts +144 -4
- package/src/persona/profile/timeline/1.0/payload.ts +402 -0
- package/src/persona/profile/usage/1.0/payload.ts +354 -0
- package/src/vtc/invitations/deliver/0.1/payload.ts +234 -0
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/profile/timeline/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ClaimType, Ext, Ulid, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* What one face has done, in order: composed, worn and taken off, what it told whom, when a value it shows changed, retired and reinstated. Types, versions, contexts and parties — never a value, never one of the holder's private labels.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaProfileTimelinePayload {
|
|
13
|
+
profileId: Ulid;
|
|
14
|
+
/**
|
|
15
|
+
* The context of a context-local face. Omit for a pool face.
|
|
16
|
+
*/
|
|
17
|
+
contextId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Only events at or after this time.
|
|
20
|
+
*/
|
|
21
|
+
since?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Opaque continuation token from a prior response. A producer MUST NOT construct or parse one.
|
|
24
|
+
*/
|
|
25
|
+
cursor?: string;
|
|
26
|
+
limit?: number;
|
|
27
|
+
ext?: Ext;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Success response to persona/profile/timeline. Type https://trusttasks.org/spec/persona/profile/timeline/1.0#response. Oldest first.
|
|
31
|
+
*/
|
|
32
|
+
export interface PersonaProfileTimelineResponsePayload {
|
|
33
|
+
profileId: Ulid;
|
|
34
|
+
/**
|
|
35
|
+
* @maxItems 500
|
|
36
|
+
*/
|
|
37
|
+
events: TimelineEvent[];
|
|
38
|
+
/**
|
|
39
|
+
* Present when more events follow. Absent at the end — a producer MUST NOT infer the end from a short page.
|
|
40
|
+
*/
|
|
41
|
+
nextCursor?: string;
|
|
42
|
+
ext?: Ext;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* One thing that happened to a face. Which members are present depends on `kind`; none carries a value or a private label.
|
|
46
|
+
*/
|
|
47
|
+
export interface TimelineEvent {
|
|
48
|
+
at: string;
|
|
49
|
+
/**
|
|
50
|
+
* `composed` — the face was made. `worn` / `unworn` — a persona began or stopped wearing it in a context. `expired` — a binding's `until` passed. `disclosed` — it told a party something (`verifierDid`, `claimTypes`). `valueChanged` — a value it shows changed (`claimTypes`, `version`). `promoted` — it moved from one context into the pool. `retired` / `reinstated`.
|
|
51
|
+
*/
|
|
52
|
+
kind:
|
|
53
|
+
| "composed"
|
|
54
|
+
| "worn"
|
|
55
|
+
| "unworn"
|
|
56
|
+
| "expired"
|
|
57
|
+
| "disclosed"
|
|
58
|
+
| "valueChanged"
|
|
59
|
+
| "promoted"
|
|
60
|
+
| "retired"
|
|
61
|
+
| "reinstated";
|
|
62
|
+
contextId?: string;
|
|
63
|
+
personaDid?: string;
|
|
64
|
+
verifierDid?: string;
|
|
65
|
+
/**
|
|
66
|
+
* @maxItems 64
|
|
67
|
+
*/
|
|
68
|
+
claimTypes?: ClaimType[];
|
|
69
|
+
version?: Version;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
73
|
+
export type { ClaimType, Ext, Ulid, Version };
|
|
74
|
+
|
|
75
|
+
/** Trust Task type URI. */
|
|
76
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/profile/timeline/1.0" as const;
|
|
77
|
+
|
|
78
|
+
/** Stable alias for this specification's request payload shape. */
|
|
79
|
+
export type Payload = PersonaProfileTimelinePayload;
|
|
80
|
+
|
|
81
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
82
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/profile/timeline/1.0#response" as const;
|
|
83
|
+
|
|
84
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
85
|
+
export type Response = PersonaProfileTimelineResponsePayload;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* This specification's payload schema, as a value.
|
|
89
|
+
*
|
|
90
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
91
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
92
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
93
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
94
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
95
|
+
*/
|
|
96
|
+
export const PAYLOAD_SCHEMA = {
|
|
97
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
98
|
+
"$id": "https://trusttasks.org/spec/persona/profile/timeline/1.0",
|
|
99
|
+
"title": "Persona Profile Timeline — payload",
|
|
100
|
+
"description": "What one face has done, in order: composed, worn and taken off, what it told whom, when a value it shows changed, retired and reinstated. Types, versions, contexts and parties — never a value, never one of the holder's private labels.",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": [
|
|
104
|
+
"profileId"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"profileId": {
|
|
108
|
+
"$ref": "#/$defs/Ulid"
|
|
109
|
+
},
|
|
110
|
+
"contextId": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1,
|
|
113
|
+
"description": "The context of a context-local face. Omit for a pool face."
|
|
114
|
+
},
|
|
115
|
+
"since": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"format": "date-time",
|
|
118
|
+
"description": "Only events at or after this time."
|
|
119
|
+
},
|
|
120
|
+
"cursor": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"maxLength": 4096,
|
|
123
|
+
"description": "Opaque continuation token from a prior response. A producer MUST NOT construct or parse one."
|
|
124
|
+
},
|
|
125
|
+
"limit": {
|
|
126
|
+
"type": "integer",
|
|
127
|
+
"minimum": 1,
|
|
128
|
+
"maximum": 500,
|
|
129
|
+
"default": 100
|
|
130
|
+
},
|
|
131
|
+
"ext": {
|
|
132
|
+
"$ref": "#/$defs/Ext"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"$defs": {
|
|
136
|
+
"TimelineEvent": {
|
|
137
|
+
"title": "TimelineEvent",
|
|
138
|
+
"description": "One thing that happened to a face. Which members are present depends on `kind`; none carries a value or a private label.",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"required": [
|
|
142
|
+
"at",
|
|
143
|
+
"kind"
|
|
144
|
+
],
|
|
145
|
+
"properties": {
|
|
146
|
+
"at": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"format": "date-time"
|
|
149
|
+
},
|
|
150
|
+
"kind": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"enum": [
|
|
153
|
+
"composed",
|
|
154
|
+
"worn",
|
|
155
|
+
"unworn",
|
|
156
|
+
"expired",
|
|
157
|
+
"disclosed",
|
|
158
|
+
"valueChanged",
|
|
159
|
+
"promoted",
|
|
160
|
+
"retired",
|
|
161
|
+
"reinstated"
|
|
162
|
+
],
|
|
163
|
+
"description": "`composed` — the face was made. `worn` / `unworn` — a persona began or stopped wearing it in a context. `expired` — a binding's `until` passed. `disclosed` — it told a party something (`verifierDid`, `claimTypes`). `valueChanged` — a value it shows changed (`claimTypes`, `version`). `promoted` — it moved from one context into the pool. `retired` / `reinstated`."
|
|
164
|
+
},
|
|
165
|
+
"contextId": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"minLength": 1
|
|
168
|
+
},
|
|
169
|
+
"personaDid": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"minLength": 1
|
|
172
|
+
},
|
|
173
|
+
"verifierDid": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"minLength": 1
|
|
176
|
+
},
|
|
177
|
+
"claimTypes": {
|
|
178
|
+
"type": "array",
|
|
179
|
+
"maxItems": 64,
|
|
180
|
+
"items": {
|
|
181
|
+
"$ref": "#/$defs/ClaimType"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"version": {
|
|
185
|
+
"$ref": "#/$defs/Version"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"Response": {
|
|
190
|
+
"$anchor": "response",
|
|
191
|
+
"title": "Persona Profile Timeline — response payload",
|
|
192
|
+
"description": "Success response to persona/profile/timeline. Type https://trusttasks.org/spec/persona/profile/timeline/1.0#response. Oldest first.",
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": false,
|
|
195
|
+
"required": [
|
|
196
|
+
"profileId",
|
|
197
|
+
"events"
|
|
198
|
+
],
|
|
199
|
+
"properties": {
|
|
200
|
+
"profileId": {
|
|
201
|
+
"$ref": "#/$defs/Ulid"
|
|
202
|
+
},
|
|
203
|
+
"events": {
|
|
204
|
+
"type": "array",
|
|
205
|
+
"maxItems": 500,
|
|
206
|
+
"items": {
|
|
207
|
+
"$ref": "#/$defs/TimelineEvent"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"nextCursor": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"maxLength": 4096,
|
|
213
|
+
"description": "Present when more events follow. Absent at the end — a producer MUST NOT infer the end from a short page."
|
|
214
|
+
},
|
|
215
|
+
"ext": {
|
|
216
|
+
"$ref": "#/$defs/Ext"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"Ext": {
|
|
221
|
+
"title": "Ext",
|
|
222
|
+
"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.",
|
|
223
|
+
"type": "object",
|
|
224
|
+
"minProperties": 1,
|
|
225
|
+
"additionalProperties": true,
|
|
226
|
+
"propertyNames": {
|
|
227
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"Ulid": {
|
|
231
|
+
"title": "Ulid",
|
|
232
|
+
"description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
|
|
233
|
+
"type": "string",
|
|
234
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
235
|
+
},
|
|
236
|
+
"Version": {
|
|
237
|
+
"title": "Version",
|
|
238
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
239
|
+
"type": "integer",
|
|
240
|
+
"minimum": 1
|
|
241
|
+
},
|
|
242
|
+
"ClaimType": {
|
|
243
|
+
"title": "ClaimType",
|
|
244
|
+
"description": "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.",
|
|
245
|
+
"type": "string",
|
|
246
|
+
"minLength": 1,
|
|
247
|
+
"maxLength": 128,
|
|
248
|
+
"pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
} as const;
|
|
252
|
+
|
|
253
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
254
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
255
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
256
|
+
"$ref": "#/$defs/Response",
|
|
257
|
+
"$defs": {
|
|
258
|
+
"TimelineEvent": {
|
|
259
|
+
"title": "TimelineEvent",
|
|
260
|
+
"description": "One thing that happened to a face. Which members are present depends on `kind`; none carries a value or a private label.",
|
|
261
|
+
"type": "object",
|
|
262
|
+
"additionalProperties": false,
|
|
263
|
+
"required": [
|
|
264
|
+
"at",
|
|
265
|
+
"kind"
|
|
266
|
+
],
|
|
267
|
+
"properties": {
|
|
268
|
+
"at": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"format": "date-time"
|
|
271
|
+
},
|
|
272
|
+
"kind": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"enum": [
|
|
275
|
+
"composed",
|
|
276
|
+
"worn",
|
|
277
|
+
"unworn",
|
|
278
|
+
"expired",
|
|
279
|
+
"disclosed",
|
|
280
|
+
"valueChanged",
|
|
281
|
+
"promoted",
|
|
282
|
+
"retired",
|
|
283
|
+
"reinstated"
|
|
284
|
+
],
|
|
285
|
+
"description": "`composed` — the face was made. `worn` / `unworn` — a persona began or stopped wearing it in a context. `expired` — a binding's `until` passed. `disclosed` — it told a party something (`verifierDid`, `claimTypes`). `valueChanged` — a value it shows changed (`claimTypes`, `version`). `promoted` — it moved from one context into the pool. `retired` / `reinstated`."
|
|
286
|
+
},
|
|
287
|
+
"contextId": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"minLength": 1
|
|
290
|
+
},
|
|
291
|
+
"personaDid": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"minLength": 1
|
|
294
|
+
},
|
|
295
|
+
"verifierDid": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"minLength": 1
|
|
298
|
+
},
|
|
299
|
+
"claimTypes": {
|
|
300
|
+
"type": "array",
|
|
301
|
+
"maxItems": 64,
|
|
302
|
+
"items": {
|
|
303
|
+
"$ref": "#/$defs/ClaimType"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"version": {
|
|
307
|
+
"$ref": "#/$defs/Version"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"Response": {
|
|
312
|
+
"$anchor": "response",
|
|
313
|
+
"title": "Persona Profile Timeline — response payload",
|
|
314
|
+
"description": "Success response to persona/profile/timeline. Type https://trusttasks.org/spec/persona/profile/timeline/1.0#response. Oldest first.",
|
|
315
|
+
"type": "object",
|
|
316
|
+
"additionalProperties": false,
|
|
317
|
+
"required": [
|
|
318
|
+
"profileId",
|
|
319
|
+
"events"
|
|
320
|
+
],
|
|
321
|
+
"properties": {
|
|
322
|
+
"profileId": {
|
|
323
|
+
"$ref": "#/$defs/Ulid"
|
|
324
|
+
},
|
|
325
|
+
"events": {
|
|
326
|
+
"type": "array",
|
|
327
|
+
"maxItems": 500,
|
|
328
|
+
"items": {
|
|
329
|
+
"$ref": "#/$defs/TimelineEvent"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"nextCursor": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"maxLength": 4096,
|
|
335
|
+
"description": "Present when more events follow. Absent at the end — a producer MUST NOT infer the end from a short page."
|
|
336
|
+
},
|
|
337
|
+
"ext": {
|
|
338
|
+
"$ref": "#/$defs/Ext"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"Ext": {
|
|
343
|
+
"title": "Ext",
|
|
344
|
+
"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.",
|
|
345
|
+
"type": "object",
|
|
346
|
+
"minProperties": 1,
|
|
347
|
+
"additionalProperties": true,
|
|
348
|
+
"propertyNames": {
|
|
349
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"Ulid": {
|
|
353
|
+
"title": "Ulid",
|
|
354
|
+
"description": "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.",
|
|
355
|
+
"type": "string",
|
|
356
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
357
|
+
},
|
|
358
|
+
"Version": {
|
|
359
|
+
"title": "Version",
|
|
360
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
361
|
+
"type": "integer",
|
|
362
|
+
"minimum": 1
|
|
363
|
+
},
|
|
364
|
+
"ClaimType": {
|
|
365
|
+
"title": "ClaimType",
|
|
366
|
+
"description": "The vocabulary token naming what a value IS — `name.legal`, `phone.mobile`, `address.postal`, `person.birthDate`. Dotted, most-general segment first, so that a consumer with no knowledge of the specific token can still group by its prefix.\n\nThe token is the maintainer's own; no external vocabulary is primary. External vocabularies (vCard/jCard, OIDC standard claims, schema.org) are mappings applied at PRESENTATION by a renderer, not at rest, so that a query written in any of them can be matched without the store having to live inside any one of them.\n\nThe `x:` prefix is an open extension namespace and is not decoration. The closest prior art — Windows CardSpace's self-issued card — supported exactly fifteen predefined claim types with no extensibility, and that is the specific way it failed the requirement a holder actually has. An `x:` attribute stores, composes, binds and discloses exactly like a known one; it renders generically and matches only an explicit query.",
|
|
367
|
+
"type": "string",
|
|
368
|
+
"minLength": 1,
|
|
369
|
+
"maxLength": 128,
|
|
370
|
+
"pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
} as const;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
377
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
378
|
+
* per-specification and cannot be derived from the document alone, and
|
|
379
|
+
* item 2 needs the schema this carries.
|
|
380
|
+
*/
|
|
381
|
+
export const SPEC = {
|
|
382
|
+
typeUri: TYPE_URI,
|
|
383
|
+
isBearer: false,
|
|
384
|
+
isProofRequired: false,
|
|
385
|
+
isRecipientRequired: true,
|
|
386
|
+
isIssuedAtRequired: false,
|
|
387
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
388
|
+
} as const;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
392
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
393
|
+
* parties (§7.3 item 5).
|
|
394
|
+
*/
|
|
395
|
+
export const RESPONSE_SPEC = {
|
|
396
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
397
|
+
isBearer: false,
|
|
398
|
+
isProofRequired: false,
|
|
399
|
+
isRecipientRequired: true,
|
|
400
|
+
isIssuedAtRequired: false,
|
|
401
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
402
|
+
} as const;
|