@openvtc/trust-tasks 0.19.13 → 0.19.14
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 +2 -0
- package/dist/_shared/components.d.ts +41 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -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 +140 -24
- package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/attribute/list/1.0/payload.js +76 -12
- package/dist/persona/attribute/list/1.0/payload.js.map +1 -1
- package/dist/persona/attribute/purge-version/1.0/payload.d.ts +413 -0
- package/dist/persona/attribute/purge-version/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/purge-version/1.0/payload.js +223 -0
- package/dist/persona/attribute/purge-version/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/put/1.0/payload.d.ts +33 -2
- package/dist/persona/local/profile/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/local/profile/put/1.0/payload.js +15 -0
- package/dist/persona/local/profile/put/1.0/payload.js.map +1 -1
- package/dist/persona/profile/get/1.0/payload.d.ts +94 -6
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/get/1.0/payload.js +46 -2
- package/dist/persona/profile/get/1.0/payload.js.map +1 -1
- package/dist/persona/profile/list/1.0/payload.d.ts +78 -6
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/list/1.0/payload.js +38 -2
- package/dist/persona/profile/list/1.0/payload.js.map +1 -1
- package/dist/persona/profile/put/1.0/payload.d.ts +78 -6
- package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/put/1.0/payload.js +38 -2
- package/dist/persona/profile/put/1.0/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +41 -0
- package/src/index.ts +1 -0
- package/src/persona/_shared/0.1/persona-record.ts +1 -1
- package/src/persona/attribute/list/1.0/payload.ts +76 -12
- package/src/persona/attribute/purge-version/1.0/payload.ts +277 -0
- package/src/persona/local/profile/put/1.0/payload.ts +18 -2
- package/src/persona/profile/get/1.0/payload.ts +48 -4
- package/src/persona/profile/list/1.0/payload.ts +40 -4
- package/src/persona/profile/put/1.0/payload.ts +40 -4
|
@@ -223,6 +223,38 @@ export const PAYLOAD_SCHEMA = {
|
|
|
223
223
|
"version": {
|
|
224
224
|
"$ref": "#/$defs/Version"
|
|
225
225
|
},
|
|
226
|
+
"retainedVersions": {
|
|
227
|
+
"type": "array",
|
|
228
|
+
"maxItems": 64,
|
|
229
|
+
"description": "Earlier versions of this attribute the maintainer still holds, and why. A maintainer that keeps a replaced value to serve `pinVersion` MUST list it here: a holder who overwrote a value may reasonably believe it gone, and this is how they learn otherwise. Values are not included — the holder reads one through the profile that pins it, or removes it with persona/attribute/purge-version. Absent when none are held.",
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": [
|
|
234
|
+
"version",
|
|
235
|
+
"pinnedBy"
|
|
236
|
+
],
|
|
237
|
+
"properties": {
|
|
238
|
+
"version": {
|
|
239
|
+
"$ref": "#/$defs/Version"
|
|
240
|
+
},
|
|
241
|
+
"updatedAt": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"format": "date-time",
|
|
244
|
+
"description": "When this version was written."
|
|
245
|
+
},
|
|
246
|
+
"pinnedBy": {
|
|
247
|
+
"type": "array",
|
|
248
|
+
"minItems": 1,
|
|
249
|
+
"maxItems": 256,
|
|
250
|
+
"items": {
|
|
251
|
+
"$ref": "#/$defs/Ulid"
|
|
252
|
+
},
|
|
253
|
+
"description": "The profiles pinning this version — the reason it is kept. A version no profile pins is not retained."
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
226
258
|
"createdAt": {
|
|
227
259
|
"type": "string",
|
|
228
260
|
"format": "date-time"
|
|
@@ -233,6 +265,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
233
265
|
}
|
|
234
266
|
}
|
|
235
267
|
},
|
|
268
|
+
"Ulid": {
|
|
269
|
+
"title": "Ulid",
|
|
270
|
+
"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.",
|
|
271
|
+
"type": "string",
|
|
272
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
273
|
+
},
|
|
236
274
|
"Version": {
|
|
237
275
|
"title": "Version",
|
|
238
276
|
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
@@ -363,12 +401,6 @@ export const PAYLOAD_SCHEMA = {
|
|
|
363
401
|
"minLength": 1,
|
|
364
402
|
"maxLength": 128,
|
|
365
403
|
"pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
|
|
366
|
-
},
|
|
367
|
-
"Ulid": {
|
|
368
|
-
"title": "Ulid",
|
|
369
|
-
"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.",
|
|
370
|
-
"type": "string",
|
|
371
|
-
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
372
404
|
}
|
|
373
405
|
}
|
|
374
406
|
} as const;
|
|
@@ -475,6 +507,38 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
475
507
|
"version": {
|
|
476
508
|
"$ref": "#/$defs/Version"
|
|
477
509
|
},
|
|
510
|
+
"retainedVersions": {
|
|
511
|
+
"type": "array",
|
|
512
|
+
"maxItems": 64,
|
|
513
|
+
"description": "Earlier versions of this attribute the maintainer still holds, and why. A maintainer that keeps a replaced value to serve `pinVersion` MUST list it here: a holder who overwrote a value may reasonably believe it gone, and this is how they learn otherwise. Values are not included — the holder reads one through the profile that pins it, or removes it with persona/attribute/purge-version. Absent when none are held.",
|
|
514
|
+
"items": {
|
|
515
|
+
"type": "object",
|
|
516
|
+
"additionalProperties": false,
|
|
517
|
+
"required": [
|
|
518
|
+
"version",
|
|
519
|
+
"pinnedBy"
|
|
520
|
+
],
|
|
521
|
+
"properties": {
|
|
522
|
+
"version": {
|
|
523
|
+
"$ref": "#/$defs/Version"
|
|
524
|
+
},
|
|
525
|
+
"updatedAt": {
|
|
526
|
+
"type": "string",
|
|
527
|
+
"format": "date-time",
|
|
528
|
+
"description": "When this version was written."
|
|
529
|
+
},
|
|
530
|
+
"pinnedBy": {
|
|
531
|
+
"type": "array",
|
|
532
|
+
"minItems": 1,
|
|
533
|
+
"maxItems": 256,
|
|
534
|
+
"items": {
|
|
535
|
+
"$ref": "#/$defs/Ulid"
|
|
536
|
+
},
|
|
537
|
+
"description": "The profiles pinning this version — the reason it is kept. A version no profile pins is not retained."
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
},
|
|
478
542
|
"createdAt": {
|
|
479
543
|
"type": "string",
|
|
480
544
|
"format": "date-time"
|
|
@@ -485,6 +549,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
485
549
|
}
|
|
486
550
|
}
|
|
487
551
|
},
|
|
552
|
+
"Ulid": {
|
|
553
|
+
"title": "Ulid",
|
|
554
|
+
"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.",
|
|
555
|
+
"type": "string",
|
|
556
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
557
|
+
},
|
|
488
558
|
"Version": {
|
|
489
559
|
"title": "Version",
|
|
490
560
|
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
@@ -615,12 +685,6 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
615
685
|
"minLength": 1,
|
|
616
686
|
"maxLength": 128,
|
|
617
687
|
"pattern": "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$"
|
|
618
|
-
},
|
|
619
|
-
"Ulid": {
|
|
620
|
-
"title": "Ulid",
|
|
621
|
-
"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.",
|
|
622
|
-
"type": "string",
|
|
623
|
-
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
624
688
|
}
|
|
625
689
|
}
|
|
626
690
|
} as const;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/attribute/purge-version/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, Ulid, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Permanently remove earlier versions of one attribute that the maintainer kept because a profile pins them. The holder's override on retention: after a name change, the old name is kept only while something needs it, and this is how the holder says nothing does.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaAttributePurgeVersionPayload {
|
|
13
|
+
attributeId: Ulid;
|
|
14
|
+
/**
|
|
15
|
+
* The retained versions to remove. Omit to remove every retained version of the attribute. The current version is never removed by this task — that is persona/attribute/delete.
|
|
16
|
+
*
|
|
17
|
+
* @minItems 1
|
|
18
|
+
* @maxItems 64
|
|
19
|
+
*/
|
|
20
|
+
versions?: [Version, ...Version[]];
|
|
21
|
+
ext?: Ext;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Success response to persona/attribute/purge-version. Type https://trusttasks.org/spec/persona/attribute/purge-version/1.0#response. Purging a version that is not held is a success that purges nothing, so a repeated purge converges.
|
|
25
|
+
*/
|
|
26
|
+
export interface PersonaAttributePurgeVersionResponsePayload {
|
|
27
|
+
attributeId: Ulid;
|
|
28
|
+
/**
|
|
29
|
+
* The versions actually removed. Empty when none named was held.
|
|
30
|
+
*
|
|
31
|
+
* @maxItems 64
|
|
32
|
+
*/
|
|
33
|
+
purged: Version[];
|
|
34
|
+
/**
|
|
35
|
+
* Profiles that pinned a purged version and now present that entry as stale — which is to say, disclose nothing for it until the holder repins or edits them. Named because a purge that quietly shortened what three faces present is the surprise this family exists to prevent. Absent when none did.
|
|
36
|
+
*
|
|
37
|
+
* @maxItems 256
|
|
38
|
+
*/
|
|
39
|
+
stalePins?: {
|
|
40
|
+
profileId: Ulid;
|
|
41
|
+
pinVersion: Version;
|
|
42
|
+
}[];
|
|
43
|
+
ext?: Ext;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
47
|
+
export type { Ext, Ulid, Version };
|
|
48
|
+
|
|
49
|
+
/** Trust Task type URI. */
|
|
50
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/attribute/purge-version/1.0" as const;
|
|
51
|
+
|
|
52
|
+
/** Stable alias for this specification's request payload shape. */
|
|
53
|
+
export type Payload = PersonaAttributePurgeVersionPayload;
|
|
54
|
+
|
|
55
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
56
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/attribute/purge-version/1.0#response" as const;
|
|
57
|
+
|
|
58
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
59
|
+
export type Response = PersonaAttributePurgeVersionResponsePayload;
|
|
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/persona/attribute/purge-version/1.0",
|
|
73
|
+
"title": "Persona Attribute Purge Version — payload",
|
|
74
|
+
"description": "Permanently remove earlier versions of one attribute that the maintainer kept because a profile pins them. The holder's override on retention: after a name change, the old name is kept only while something needs it, and this is how the holder says nothing does.",
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": [
|
|
78
|
+
"attributeId"
|
|
79
|
+
],
|
|
80
|
+
"properties": {
|
|
81
|
+
"attributeId": {
|
|
82
|
+
"$ref": "#/$defs/Ulid"
|
|
83
|
+
},
|
|
84
|
+
"versions": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"minItems": 1,
|
|
87
|
+
"maxItems": 64,
|
|
88
|
+
"uniqueItems": true,
|
|
89
|
+
"items": {
|
|
90
|
+
"$ref": "#/$defs/Version"
|
|
91
|
+
},
|
|
92
|
+
"description": "The retained versions to remove. Omit to remove every retained version of the attribute. The current version is never removed by this task — that is persona/attribute/delete."
|
|
93
|
+
},
|
|
94
|
+
"ext": {
|
|
95
|
+
"$ref": "#/$defs/Ext"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"$defs": {
|
|
99
|
+
"Response": {
|
|
100
|
+
"$anchor": "response",
|
|
101
|
+
"title": "Persona Attribute Purge Version — response payload",
|
|
102
|
+
"description": "Success response to persona/attribute/purge-version. Type https://trusttasks.org/spec/persona/attribute/purge-version/1.0#response. Purging a version that is not held is a success that purges nothing, so a repeated purge converges.",
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": [
|
|
106
|
+
"attributeId",
|
|
107
|
+
"purged"
|
|
108
|
+
],
|
|
109
|
+
"properties": {
|
|
110
|
+
"attributeId": {
|
|
111
|
+
"$ref": "#/$defs/Ulid"
|
|
112
|
+
},
|
|
113
|
+
"purged": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"maxItems": 64,
|
|
116
|
+
"items": {
|
|
117
|
+
"$ref": "#/$defs/Version"
|
|
118
|
+
},
|
|
119
|
+
"description": "The versions actually removed. Empty when none named was held."
|
|
120
|
+
},
|
|
121
|
+
"stalePins": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"maxItems": 256,
|
|
124
|
+
"description": "Profiles that pinned a purged version and now present that entry as stale — which is to say, disclose nothing for it until the holder repins or edits them. Named because a purge that quietly shortened what three faces present is the surprise this family exists to prevent. Absent when none did.",
|
|
125
|
+
"items": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"required": [
|
|
129
|
+
"profileId",
|
|
130
|
+
"pinVersion"
|
|
131
|
+
],
|
|
132
|
+
"properties": {
|
|
133
|
+
"profileId": {
|
|
134
|
+
"$ref": "#/$defs/Ulid"
|
|
135
|
+
},
|
|
136
|
+
"pinVersion": {
|
|
137
|
+
"$ref": "#/$defs/Version"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"ext": {
|
|
143
|
+
"$ref": "#/$defs/Ext"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"Ext": {
|
|
148
|
+
"title": "Ext",
|
|
149
|
+
"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.",
|
|
150
|
+
"type": "object",
|
|
151
|
+
"minProperties": 1,
|
|
152
|
+
"additionalProperties": true,
|
|
153
|
+
"propertyNames": {
|
|
154
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"Version": {
|
|
158
|
+
"title": "Version",
|
|
159
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
160
|
+
"type": "integer",
|
|
161
|
+
"minimum": 1
|
|
162
|
+
},
|
|
163
|
+
"Ulid": {
|
|
164
|
+
"title": "Ulid",
|
|
165
|
+
"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.",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
} as const;
|
|
171
|
+
|
|
172
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
173
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
174
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
175
|
+
"$ref": "#/$defs/Response",
|
|
176
|
+
"$defs": {
|
|
177
|
+
"Response": {
|
|
178
|
+
"$anchor": "response",
|
|
179
|
+
"title": "Persona Attribute Purge Version — response payload",
|
|
180
|
+
"description": "Success response to persona/attribute/purge-version. Type https://trusttasks.org/spec/persona/attribute/purge-version/1.0#response. Purging a version that is not held is a success that purges nothing, so a repeated purge converges.",
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"required": [
|
|
184
|
+
"attributeId",
|
|
185
|
+
"purged"
|
|
186
|
+
],
|
|
187
|
+
"properties": {
|
|
188
|
+
"attributeId": {
|
|
189
|
+
"$ref": "#/$defs/Ulid"
|
|
190
|
+
},
|
|
191
|
+
"purged": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"maxItems": 64,
|
|
194
|
+
"items": {
|
|
195
|
+
"$ref": "#/$defs/Version"
|
|
196
|
+
},
|
|
197
|
+
"description": "The versions actually removed. Empty when none named was held."
|
|
198
|
+
},
|
|
199
|
+
"stalePins": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"maxItems": 256,
|
|
202
|
+
"description": "Profiles that pinned a purged version and now present that entry as stale — which is to say, disclose nothing for it until the holder repins or edits them. Named because a purge that quietly shortened what three faces present is the surprise this family exists to prevent. Absent when none did.",
|
|
203
|
+
"items": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"required": [
|
|
207
|
+
"profileId",
|
|
208
|
+
"pinVersion"
|
|
209
|
+
],
|
|
210
|
+
"properties": {
|
|
211
|
+
"profileId": {
|
|
212
|
+
"$ref": "#/$defs/Ulid"
|
|
213
|
+
},
|
|
214
|
+
"pinVersion": {
|
|
215
|
+
"$ref": "#/$defs/Version"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"ext": {
|
|
221
|
+
"$ref": "#/$defs/Ext"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"Ext": {
|
|
226
|
+
"title": "Ext",
|
|
227
|
+
"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.",
|
|
228
|
+
"type": "object",
|
|
229
|
+
"minProperties": 1,
|
|
230
|
+
"additionalProperties": true,
|
|
231
|
+
"propertyNames": {
|
|
232
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"Version": {
|
|
236
|
+
"title": "Version",
|
|
237
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
238
|
+
"type": "integer",
|
|
239
|
+
"minimum": 1
|
|
240
|
+
},
|
|
241
|
+
"Ulid": {
|
|
242
|
+
"title": "Ulid",
|
|
243
|
+
"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.",
|
|
244
|
+
"type": "string",
|
|
245
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
} as const;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
252
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
253
|
+
* per-specification and cannot be derived from the document alone, and
|
|
254
|
+
* item 2 needs the schema this carries.
|
|
255
|
+
*/
|
|
256
|
+
export const SPEC = {
|
|
257
|
+
typeUri: TYPE_URI,
|
|
258
|
+
isBearer: false,
|
|
259
|
+
isProofRequired: true,
|
|
260
|
+
isRecipientRequired: true,
|
|
261
|
+
isIssuedAtRequired: true,
|
|
262
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
263
|
+
} as const;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
267
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
268
|
+
* parties (§7.3 item 5).
|
|
269
|
+
*/
|
|
270
|
+
export const RESPONSE_SPEC = {
|
|
271
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
272
|
+
isBearer: false,
|
|
273
|
+
isProofRequired: true,
|
|
274
|
+
isRecipientRequired: true,
|
|
275
|
+
isIssuedAtRequired: true,
|
|
276
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
277
|
+
} as const;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/persona/local/profile/put/1.0/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { ClaimType, ExpectedVersion_PersonaV0_1 as ExpectedVersion, Ext, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../../_shared/components.js";
|
|
6
|
+
import type { ClaimType, ExpectedVersion_PersonaV0_1 as ExpectedVersion, Ext, Slot, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -32,6 +32,7 @@ export interface PersonaLocalProfilePutPayload {
|
|
|
32
32
|
value: unknown;
|
|
33
33
|
label?: string;
|
|
34
34
|
};
|
|
35
|
+
slot?: Slot;
|
|
35
36
|
}[];
|
|
36
37
|
expectedVersion?: ExpectedVersion;
|
|
37
38
|
ext?: Ext;
|
|
@@ -57,7 +58,7 @@ export interface PersonaLocalProfilePutResponsePayload {
|
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
60
|
-
export type { ClaimType, ExpectedVersion, Ext, Ulid, ValueType, Version };
|
|
61
|
+
export type { ClaimType, ExpectedVersion, Ext, Slot, Ulid, ValueType, Version };
|
|
61
62
|
|
|
62
63
|
/** Trust Task type URI. */
|
|
63
64
|
export const TYPE_URI = "https://trusttasks.org/spec/persona/local/profile/put/1.0" as const;
|
|
@@ -138,6 +139,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
138
139
|
"maxLength": 128
|
|
139
140
|
}
|
|
140
141
|
}
|
|
142
|
+
},
|
|
143
|
+
"slot": {
|
|
144
|
+
"$ref": "#/$defs/Slot"
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
}
|
|
@@ -226,6 +230,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
226
230
|
"type": "integer",
|
|
227
231
|
"minimum": 0
|
|
228
232
|
},
|
|
233
|
+
"Slot": {
|
|
234
|
+
"title": "Slot",
|
|
235
|
+
"type": "string",
|
|
236
|
+
"pattern": "^[a-z][A-Za-z0-9]{0,31}$",
|
|
237
|
+
"description": "A role a profile entry plays within its profile, so a consumer can find it without guessing from its claim type. A profile MAY hold several entries of one type — a legal name and a display name, two phone numbers — and only a slot says which answers a given question. Unique within a profile.\n\nWell-known slots:\n\n- `displayName` — what this face calls itself. The entry a consumer renders as the face's name to anyone it is shown to. Distinct from the profile's own `name`, which is the holder's private label and never disclosed.\n- `primaryEmail`, `primaryPhone`, `primaryAddress` — the entry to use where a counterparty asks for one of a kind and the profile holds several.\n- `avatar` — the image this face presents.\n\nOther values are the holder's or the producer's own and carry no meaning a maintainer interprets."
|
|
238
|
+
},
|
|
229
239
|
"ValueType": {
|
|
230
240
|
"title": "ValueType",
|
|
231
241
|
"description": "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.",
|
|
@@ -330,6 +340,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
330
340
|
"type": "integer",
|
|
331
341
|
"minimum": 0
|
|
332
342
|
},
|
|
343
|
+
"Slot": {
|
|
344
|
+
"title": "Slot",
|
|
345
|
+
"type": "string",
|
|
346
|
+
"pattern": "^[a-z][A-Za-z0-9]{0,31}$",
|
|
347
|
+
"description": "A role a profile entry plays within its profile, so a consumer can find it without guessing from its claim type. A profile MAY hold several entries of one type — a legal name and a display name, two phone numbers — and only a slot says which answers a given question. Unique within a profile.\n\nWell-known slots:\n\n- `displayName` — what this face calls itself. The entry a consumer renders as the face's name to anyone it is shown to. Distinct from the profile's own `name`, which is the holder's private label and never disclosed.\n- `primaryEmail`, `primaryPhone`, `primaryAddress` — the entry to use where a counterparty asks for one of a kind and the profile holds several.\n- `avatar` — the image this face presents.\n\nOther values are the holder's or the producer's own and carry no meaning a maintainer interprets."
|
|
348
|
+
},
|
|
333
349
|
"ValueType": {
|
|
334
350
|
"title": "ValueType",
|
|
335
351
|
"description": "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/persona/profile/get/1.0/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { ClaimType, Ext, Profile, ProfileEntry, ProofRung, Provenance, ResolvedClaim, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
|
|
6
|
+
import type { ClaimType, Ext, Profile, ProfileEntry, ProofRung, Provenance, ResolvedClaim, Slot, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -34,7 +34,7 @@ export interface PersonaProfileGetResponsePayload {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
37
|
-
export type { ClaimType, Ext, Profile, ProfileEntry, ProofRung, Provenance, ResolvedClaim, Ulid, ValueType, Version };
|
|
37
|
+
export type { ClaimType, Ext, Profile, ProfileEntry, ProofRung, Provenance, ResolvedClaim, Slot, Ulid, ValueType, Version };
|
|
38
38
|
|
|
39
39
|
/** Trust Task type URI. */
|
|
40
40
|
export const TYPE_URI = "https://trusttasks.org/spec/persona/profile/get/1.0" as const;
|
|
@@ -146,6 +146,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
146
146
|
"maxLength": 128,
|
|
147
147
|
"description": "The holder's own words, from the override where one is given and from the pool attribute otherwise. Never disclosed to a verifier."
|
|
148
148
|
},
|
|
149
|
+
"slot": {
|
|
150
|
+
"$ref": "#/$defs/Slot",
|
|
151
|
+
"description": "The slot of the entry this claim resolved from, where it has one."
|
|
152
|
+
},
|
|
149
153
|
"provenance": {
|
|
150
154
|
"$ref": "#/$defs/Provenance"
|
|
151
155
|
},
|
|
@@ -268,6 +272,12 @@ export const PAYLOAD_SCHEMA = {
|
|
|
268
272
|
"whole"
|
|
269
273
|
]
|
|
270
274
|
},
|
|
275
|
+
"Slot": {
|
|
276
|
+
"title": "Slot",
|
|
277
|
+
"type": "string",
|
|
278
|
+
"pattern": "^[a-z][A-Za-z0-9]{0,31}$",
|
|
279
|
+
"description": "A role a profile entry plays within its profile, so a consumer can find it without guessing from its claim type. A profile MAY hold several entries of one type — a legal name and a display name, two phone numbers — and only a slot says which answers a given question. Unique within a profile.\n\nWell-known slots:\n\n- `displayName` — what this face calls itself. The entry a consumer renders as the face's name to anyone it is shown to. Distinct from the profile's own `name`, which is the holder's private label and never disclosed.\n- `primaryEmail`, `primaryPhone`, `primaryAddress` — the entry to use where a counterparty asks for one of a kind and the profile holds several.\n- `avatar` — the image this face presents.\n\nOther values are the holder's or the producer's own and carry no meaning a maintainer interprets."
|
|
280
|
+
},
|
|
271
281
|
"ValueType": {
|
|
272
282
|
"title": "ValueType",
|
|
273
283
|
"description": "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.",
|
|
@@ -347,7 +357,7 @@ export const PAYLOAD_SCHEMA = {
|
|
|
347
357
|
},
|
|
348
358
|
"ProfileEntry": {
|
|
349
359
|
"title": "ProfileEntry",
|
|
350
|
-
"description": "One line of a profile, in exactly one of four forms. Together they are the whole of a profile's flexibility, and each exists for a case the others handle badly.\n\n`{ref}` — use the pool attribute, live. Editing the pool updates every profile that references it, which is the point.\n\n`{ref, pinVersion}` — use the value as it was at that version. For a profile that must keep presenting the value a counterparty already verified.\n\n`{ref, override}` — the same fact, a different value here. (\"In the gaming profile my display name is different.\")\n\n`{inline}` — a value that never enters the pool, and so never leaks into another profile.\n\nOmission is exclusion; there is no removal marker.",
|
|
360
|
+
"description": "One line of a profile, in exactly one of four forms. Together they are the whole of a profile's flexibility, and each exists for a case the others handle badly.\n\n`{ref}` — use the pool attribute, live. Editing the pool updates every profile that references it, which is the point.\n\n`{ref, pinVersion}` — use the value as it was at that version. For a profile that must keep presenting the value a counterparty already verified.\n\n`{ref, override}` — the same fact, a different value here. (\"In the gaming profile my display name is different.\")\n\n`{inline}` — a value that never enters the pool, and so never leaks into another profile.\n\nOmission is exclusion; there is no removal marker.\n\nAny form MAY carry a `slot` naming the role the entry plays in the profile — see `Slot`. A maintainer MUST refuse a profile in which two entries carry the same slot: a slot exists to answer one question with one entry.",
|
|
351
361
|
"type": "object",
|
|
352
362
|
"oneOf": [
|
|
353
363
|
{
|
|
@@ -358,6 +368,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
358
368
|
"properties": {
|
|
359
369
|
"ref": {
|
|
360
370
|
"$ref": "#/$defs/Ulid"
|
|
371
|
+
},
|
|
372
|
+
"slot": {
|
|
373
|
+
"$ref": "#/$defs/Slot"
|
|
361
374
|
}
|
|
362
375
|
}
|
|
363
376
|
},
|
|
@@ -373,6 +386,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
373
386
|
},
|
|
374
387
|
"pinVersion": {
|
|
375
388
|
"$ref": "#/$defs/Version"
|
|
389
|
+
},
|
|
390
|
+
"slot": {
|
|
391
|
+
"$ref": "#/$defs/Slot"
|
|
376
392
|
}
|
|
377
393
|
}
|
|
378
394
|
},
|
|
@@ -400,6 +416,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
400
416
|
}
|
|
401
417
|
},
|
|
402
418
|
"description": "Replaces the pool attribute's value for this profile only. `type`, `valueType` and `provenance` are inherited from the referenced attribute and MUST NOT be overridden — an override that changed provenance would let a self-asserted value present as attested."
|
|
419
|
+
},
|
|
420
|
+
"slot": {
|
|
421
|
+
"$ref": "#/$defs/Slot"
|
|
403
422
|
}
|
|
404
423
|
}
|
|
405
424
|
},
|
|
@@ -434,6 +453,9 @@ export const PAYLOAD_SCHEMA = {
|
|
|
434
453
|
"$ref": "#/$defs/Provenance"
|
|
435
454
|
}
|
|
436
455
|
}
|
|
456
|
+
},
|
|
457
|
+
"slot": {
|
|
458
|
+
"$ref": "#/$defs/Slot"
|
|
437
459
|
}
|
|
438
460
|
}
|
|
439
461
|
}
|
|
@@ -512,6 +534,10 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
512
534
|
"maxLength": 128,
|
|
513
535
|
"description": "The holder's own words, from the override where one is given and from the pool attribute otherwise. Never disclosed to a verifier."
|
|
514
536
|
},
|
|
537
|
+
"slot": {
|
|
538
|
+
"$ref": "#/$defs/Slot",
|
|
539
|
+
"description": "The slot of the entry this claim resolved from, where it has one."
|
|
540
|
+
},
|
|
515
541
|
"provenance": {
|
|
516
542
|
"$ref": "#/$defs/Provenance"
|
|
517
543
|
},
|
|
@@ -634,6 +660,12 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
634
660
|
"whole"
|
|
635
661
|
]
|
|
636
662
|
},
|
|
663
|
+
"Slot": {
|
|
664
|
+
"title": "Slot",
|
|
665
|
+
"type": "string",
|
|
666
|
+
"pattern": "^[a-z][A-Za-z0-9]{0,31}$",
|
|
667
|
+
"description": "A role a profile entry plays within its profile, so a consumer can find it without guessing from its claim type. A profile MAY hold several entries of one type — a legal name and a display name, two phone numbers — and only a slot says which answers a given question. Unique within a profile.\n\nWell-known slots:\n\n- `displayName` — what this face calls itself. The entry a consumer renders as the face's name to anyone it is shown to. Distinct from the profile's own `name`, which is the holder's private label and never disclosed.\n- `primaryEmail`, `primaryPhone`, `primaryAddress` — the entry to use where a counterparty asks for one of a kind and the profile holds several.\n- `avatar` — the image this face presents.\n\nOther values are the holder's or the producer's own and carry no meaning a maintainer interprets."
|
|
668
|
+
},
|
|
637
669
|
"ValueType": {
|
|
638
670
|
"title": "ValueType",
|
|
639
671
|
"description": "The JSON shape of `value`, declared so that a consumer can render and compare without guessing. The maintainer validates that `value` agrees with this member and does nothing further: it does NOT validate a phone number against a phone-number grammar. That is a producer's affordance, and a store that grows opinions about the contents of its records eventually blocks its consumer's release.",
|
|
@@ -713,7 +745,7 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
713
745
|
},
|
|
714
746
|
"ProfileEntry": {
|
|
715
747
|
"title": "ProfileEntry",
|
|
716
|
-
"description": "One line of a profile, in exactly one of four forms. Together they are the whole of a profile's flexibility, and each exists for a case the others handle badly.\n\n`{ref}` — use the pool attribute, live. Editing the pool updates every profile that references it, which is the point.\n\n`{ref, pinVersion}` — use the value as it was at that version. For a profile that must keep presenting the value a counterparty already verified.\n\n`{ref, override}` — the same fact, a different value here. (\"In the gaming profile my display name is different.\")\n\n`{inline}` — a value that never enters the pool, and so never leaks into another profile.\n\nOmission is exclusion; there is no removal marker.",
|
|
748
|
+
"description": "One line of a profile, in exactly one of four forms. Together they are the whole of a profile's flexibility, and each exists for a case the others handle badly.\n\n`{ref}` — use the pool attribute, live. Editing the pool updates every profile that references it, which is the point.\n\n`{ref, pinVersion}` — use the value as it was at that version. For a profile that must keep presenting the value a counterparty already verified.\n\n`{ref, override}` — the same fact, a different value here. (\"In the gaming profile my display name is different.\")\n\n`{inline}` — a value that never enters the pool, and so never leaks into another profile.\n\nOmission is exclusion; there is no removal marker.\n\nAny form MAY carry a `slot` naming the role the entry plays in the profile — see `Slot`. A maintainer MUST refuse a profile in which two entries carry the same slot: a slot exists to answer one question with one entry.",
|
|
717
749
|
"type": "object",
|
|
718
750
|
"oneOf": [
|
|
719
751
|
{
|
|
@@ -724,6 +756,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
724
756
|
"properties": {
|
|
725
757
|
"ref": {
|
|
726
758
|
"$ref": "#/$defs/Ulid"
|
|
759
|
+
},
|
|
760
|
+
"slot": {
|
|
761
|
+
"$ref": "#/$defs/Slot"
|
|
727
762
|
}
|
|
728
763
|
}
|
|
729
764
|
},
|
|
@@ -739,6 +774,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
739
774
|
},
|
|
740
775
|
"pinVersion": {
|
|
741
776
|
"$ref": "#/$defs/Version"
|
|
777
|
+
},
|
|
778
|
+
"slot": {
|
|
779
|
+
"$ref": "#/$defs/Slot"
|
|
742
780
|
}
|
|
743
781
|
}
|
|
744
782
|
},
|
|
@@ -766,6 +804,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
766
804
|
}
|
|
767
805
|
},
|
|
768
806
|
"description": "Replaces the pool attribute's value for this profile only. `type`, `valueType` and `provenance` are inherited from the referenced attribute and MUST NOT be overridden — an override that changed provenance would let a self-asserted value present as attested."
|
|
807
|
+
},
|
|
808
|
+
"slot": {
|
|
809
|
+
"$ref": "#/$defs/Slot"
|
|
769
810
|
}
|
|
770
811
|
}
|
|
771
812
|
},
|
|
@@ -800,6 +841,9 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
800
841
|
"$ref": "#/$defs/Provenance"
|
|
801
842
|
}
|
|
802
843
|
}
|
|
844
|
+
},
|
|
845
|
+
"slot": {
|
|
846
|
+
"$ref": "#/$defs/Slot"
|
|
803
847
|
}
|
|
804
848
|
}
|
|
805
849
|
}
|