@openvtc/trust-tasks 0.19.16 → 0.19.18
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/_runtime/consume.d.ts +1 -1
- package/dist/_runtime/consume.js +2 -2
- package/dist/_shared/components.d.ts +8 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/attribute/promote/1.0/payload.d.ts +506 -0
- package/dist/persona/attribute/promote/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/promote/1.0/payload.js +263 -0
- package/dist/persona/attribute/promote/1.0/payload.js.map +1 -0
- package/dist/persona/binding/get/1.0/payload.d.ts +24 -0
- package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/get/1.0/payload.js +10 -0
- package/dist/persona/binding/get/1.0/payload.js.map +1 -1
- package/dist/persona/binding/list/1.0/payload.d.ts +24 -0
- package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/list/1.0/payload.js +10 -0
- package/dist/persona/binding/list/1.0/payload.js.map +1 -1
- package/dist/persona/binding/set/1.0/payload.d.ts +38 -0
- package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -1
- package/dist/persona/binding/set/1.0/payload.js +15 -0
- package/dist/persona/binding/set/1.0/payload.js.map +1 -1
- package/dist/persona/local/binding/set/1.0/payload.d.ts +14 -0
- package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -1
- package/dist/persona/local/binding/set/1.0/payload.js +5 -0
- package/dist/persona/local/binding/set/1.0/payload.js.map +1 -1
- package/dist/persona/profile/compose/1.0/payload.d.ts +951 -0
- package/dist/persona/profile/compose/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/compose/1.0/payload.js +526 -0
- package/dist/persona/profile/compose/1.0/payload.js.map +1 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts +71 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/delete/1.0/payload.js +38 -0
- package/dist/persona/profile/delete/1.0/payload.js.map +1 -1
- package/dist/persona/profile/get/1.0/payload.d.ts +115 -0
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/get/1.0/payload.js +66 -0
- package/dist/persona/profile/get/1.0/payload.js.map +1 -1
- package/dist/persona/profile/list/1.0/payload.d.ts +58 -0
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -1
- package/dist/persona/profile/list/1.0/payload.js +33 -0
- package/dist/persona/profile/list/1.0/payload.js.map +1 -1
- package/dist/persona/profile/reinstate/1.0/payload.d.ts +325 -0
- package/dist/persona/profile/reinstate/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/reinstate/1.0/payload.js +181 -0
- package/dist/persona/profile/reinstate/1.0/payload.js.map +1 -0
- package/dist/persona/profile/retire/1.0/payload.d.ts +436 -0
- package/dist/persona/profile/retire/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/retire/1.0/payload.js +238 -0
- package/dist/persona/profile/retire/1.0/payload.js.map +1 -0
- package/dist/trust-task-control/0.1/payload.d.ts +19 -19
- package/dist/trust-task-control/0.1/payload.js +7 -7
- package/dist/trust-task-discovery/0.1/payload.d.ts +3 -3
- package/dist/trust-task-discovery/0.1/payload.js +1 -1
- package/dist/trust-task-discovery/0.2/payload.d.ts +368 -0
- package/dist/trust-task-discovery/0.2/payload.d.ts.map +1 -0
- package/dist/trust-task-discovery/0.2/payload.js +186 -0
- package/dist/trust-task-discovery/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_runtime/consume.ts +2 -2
- package/src/_shared/components.ts +8 -0
- package/src/index.ts +5 -0
- package/src/persona/attribute/promote/1.0/payload.ts +344 -0
- package/src/persona/binding/get/1.0/payload.ts +14 -0
- package/src/persona/binding/list/1.0/payload.ts +14 -0
- package/src/persona/binding/set/1.0/payload.ts +23 -0
- package/src/persona/local/binding/set/1.0/payload.ts +9 -0
- package/src/persona/profile/compose/1.0/payload.ts +641 -0
- package/src/persona/profile/delete/1.0/payload.ts +45 -0
- package/src/persona/profile/get/1.0/payload.ts +73 -0
- package/src/persona/profile/list/1.0/payload.ts +37 -0
- package/src/persona/profile/reinstate/1.0/payload.ts +219 -0
- package/src/persona/profile/retire/1.0/payload.ts +289 -0
- package/src/trust-task-control/0.1/payload.ts +12 -12
- package/src/trust-task-discovery/0.1/payload.ts +2 -2
- package/src/trust-task-discovery/0.2/payload.ts +286 -0
|
@@ -0,0 +1,951 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/profile/compose/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { ClaimType, Ext, Slot, Ulid, ValueType, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* One claim of the face being composed: a value typed now, or an attribute the holder already keeps.
|
|
8
|
+
*/
|
|
9
|
+
export type ComposeClaim = NewClaim | HeldClaim;
|
|
10
|
+
/**
|
|
11
|
+
* Compose a face for one context, where it is needed, from values typed now and attributes already held — and optionally wear it there in the same act. Local by default: a value typed here stays in this context unless the holder says it should be reusable. Where the face lives follows from what it carries, so there is no scope parameter to get wrong.
|
|
12
|
+
*/
|
|
13
|
+
export interface PersonaProfileComposePayload {
|
|
14
|
+
/**
|
|
15
|
+
* The context the face is composed for. A face whose every claim is local lives in this context and nowhere else; a face carrying any pool claim lives above contexts, and is bound into this one when `personaDid` is given.
|
|
16
|
+
*/
|
|
17
|
+
contextId: string;
|
|
18
|
+
/**
|
|
19
|
+
* The holder's name for the face. Never disclosed; what a context may call the face is `label`.
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* Ordered; the order is display order.
|
|
24
|
+
*
|
|
25
|
+
* @minItems 1
|
|
26
|
+
* @maxItems 64
|
|
27
|
+
*/
|
|
28
|
+
claims: [ComposeClaim, ...ComposeClaim[]];
|
|
29
|
+
/**
|
|
30
|
+
* Wear the new face as this persona in `contextId`, in the same act. Omit to compose without wearing it.
|
|
31
|
+
*/
|
|
32
|
+
personaDid?: string;
|
|
33
|
+
/**
|
|
34
|
+
* What the context may call the face, as on persona/binding/set. Meaningful only with `personaDid`; a maintainer MUST refuse it without one rather than drop it.
|
|
35
|
+
*/
|
|
36
|
+
label?: string;
|
|
37
|
+
ext?: Ext;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A value the holder types now. Self-asserted: a value typed at this step has no issuer behind it, and a claim that could carry a provenance here would let a typed value present as attested.
|
|
41
|
+
*/
|
|
42
|
+
export interface NewClaim {
|
|
43
|
+
type: ClaimType;
|
|
44
|
+
valueType: ValueType;
|
|
45
|
+
value: unknown;
|
|
46
|
+
/**
|
|
47
|
+
* The holder's note to self for this value. Never disclosed.
|
|
48
|
+
*/
|
|
49
|
+
label?: string;
|
|
50
|
+
slot?: Slot;
|
|
51
|
+
/**
|
|
52
|
+
* `local` (the default) keeps the value in this face alone: it is carried inline and enters no pool, so no other face can come to present it by accident. `pool` makes it reusable — the maintainer references a self-asserted pool attribute holding exactly this type and value, creating one when none exists.
|
|
53
|
+
*/
|
|
54
|
+
share?: "local" | "pool";
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* An attribute already in the holder's pool, presented live.
|
|
58
|
+
*/
|
|
59
|
+
export interface HeldClaim {
|
|
60
|
+
attributeId: Ulid;
|
|
61
|
+
slot?: Slot;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Success response to persona/profile/compose. Type https://trusttasks.org/spec/persona/profile/compose/1.0#response.
|
|
65
|
+
*/
|
|
66
|
+
export interface PersonaProfileComposeResponsePayload {
|
|
67
|
+
profileId: Ulid;
|
|
68
|
+
/**
|
|
69
|
+
* Where the face lives. `local`: in `contextId` only, readable through persona/local/profile/get. `pool`: above contexts, readable through persona/profile/get, and able to be worn in other contexts later.
|
|
70
|
+
*/
|
|
71
|
+
scope: "local" | "pool";
|
|
72
|
+
version: Version;
|
|
73
|
+
/**
|
|
74
|
+
* For each `share: pool` claim, in request order, the pool attribute the face now references and whether this compose created it. `created: false` means the holder already kept exactly this value, and the face now shares it with whatever else presents it. Absent when no claim was pooled.
|
|
75
|
+
*
|
|
76
|
+
* @maxItems 64
|
|
77
|
+
*/
|
|
78
|
+
pooled?: {
|
|
79
|
+
attributeId: Ulid;
|
|
80
|
+
created: boolean;
|
|
81
|
+
}[];
|
|
82
|
+
/**
|
|
83
|
+
* Present when `personaDid` was given: the face is now worn there.
|
|
84
|
+
*/
|
|
85
|
+
binding?: {
|
|
86
|
+
personaDid: string;
|
|
87
|
+
version: Version;
|
|
88
|
+
/**
|
|
89
|
+
* How many other personas in this context wear this face. Always zero for a face this task just created; present for parity with persona/binding/set.
|
|
90
|
+
*/
|
|
91
|
+
alsoBoundPersonaCount?: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Advisory, as on persona/profile/put: how many of the face's claims present a value another face also presents. A count; identifiers come from persona/correlation/analyze. The write has applied.
|
|
95
|
+
*/
|
|
96
|
+
correlation?: {
|
|
97
|
+
severity: "none" | "low" | "high";
|
|
98
|
+
sharedAttributeCount?: number;
|
|
99
|
+
};
|
|
100
|
+
ext?: Ext;
|
|
101
|
+
}
|
|
102
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
103
|
+
export type { ClaimType, Ext, Slot, Ulid, ValueType, Version };
|
|
104
|
+
/** Trust Task type URI. */
|
|
105
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/persona/profile/compose/1.0";
|
|
106
|
+
/** Stable alias for this specification's request payload shape. */
|
|
107
|
+
export type Payload = PersonaProfileComposePayload;
|
|
108
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
109
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/persona/profile/compose/1.0#response";
|
|
110
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
111
|
+
export type Response = PersonaProfileComposeResponsePayload;
|
|
112
|
+
/**
|
|
113
|
+
* This specification's payload schema, as a value.
|
|
114
|
+
*
|
|
115
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
116
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
117
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
118
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
119
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
120
|
+
*/
|
|
121
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
122
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
123
|
+
readonly $id: "https://trusttasks.org/spec/persona/profile/compose/1.0";
|
|
124
|
+
readonly title: "Persona Profile Compose — payload";
|
|
125
|
+
readonly description: "Compose a face for one context, where it is needed, from values typed now and attributes already held — and optionally wear it there in the same act. Local by default: a value typed here stays in this context unless the holder says it should be reusable. Where the face lives follows from what it carries, so there is no scope parameter to get wrong.";
|
|
126
|
+
readonly type: "object";
|
|
127
|
+
readonly additionalProperties: false;
|
|
128
|
+
readonly required: readonly ["contextId", "name", "claims"];
|
|
129
|
+
readonly properties: {
|
|
130
|
+
readonly contextId: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
readonly minLength: 1;
|
|
133
|
+
readonly description: "The context the face is composed for. A face whose every claim is local lives in this context and nowhere else; a face carrying any pool claim lives above contexts, and is bound into this one when `personaDid` is given.";
|
|
134
|
+
};
|
|
135
|
+
readonly name: {
|
|
136
|
+
readonly type: "string";
|
|
137
|
+
readonly minLength: 1;
|
|
138
|
+
readonly maxLength: 128;
|
|
139
|
+
readonly description: "The holder's name for the face. Never disclosed; what a context may call the face is `label`.";
|
|
140
|
+
};
|
|
141
|
+
readonly claims: {
|
|
142
|
+
readonly type: "array";
|
|
143
|
+
readonly minItems: 1;
|
|
144
|
+
readonly maxItems: 64;
|
|
145
|
+
readonly items: {
|
|
146
|
+
readonly $ref: "#/$defs/ComposeClaim";
|
|
147
|
+
};
|
|
148
|
+
readonly description: "Ordered; the order is display order.";
|
|
149
|
+
};
|
|
150
|
+
readonly personaDid: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
readonly minLength: 1;
|
|
153
|
+
readonly maxLength: 2048;
|
|
154
|
+
readonly description: "Wear the new face as this persona in `contextId`, in the same act. Omit to compose without wearing it.";
|
|
155
|
+
};
|
|
156
|
+
readonly label: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
readonly minLength: 1;
|
|
159
|
+
readonly maxLength: 128;
|
|
160
|
+
readonly description: "What the context may call the face, as on persona/binding/set. Meaningful only with `personaDid`; a maintainer MUST refuse it without one rather than drop it.";
|
|
161
|
+
};
|
|
162
|
+
readonly ext: {
|
|
163
|
+
readonly $ref: "#/$defs/Ext";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly $defs: {
|
|
167
|
+
readonly ComposeClaim: {
|
|
168
|
+
readonly title: "ComposeClaim";
|
|
169
|
+
readonly description: "One claim of the face being composed: a value typed now, or an attribute the holder already keeps.";
|
|
170
|
+
readonly oneOf: readonly [{
|
|
171
|
+
readonly $ref: "#/$defs/NewClaim";
|
|
172
|
+
}, {
|
|
173
|
+
readonly $ref: "#/$defs/HeldClaim";
|
|
174
|
+
}];
|
|
175
|
+
};
|
|
176
|
+
readonly NewClaim: {
|
|
177
|
+
readonly title: "NewClaim";
|
|
178
|
+
readonly description: "A value the holder types now. Self-asserted: a value typed at this step has no issuer behind it, and a claim that could carry a provenance here would let a typed value present as attested.";
|
|
179
|
+
readonly type: "object";
|
|
180
|
+
readonly additionalProperties: false;
|
|
181
|
+
readonly required: readonly ["type", "valueType", "value"];
|
|
182
|
+
readonly properties: {
|
|
183
|
+
readonly type: {
|
|
184
|
+
readonly $ref: "#/$defs/ClaimType";
|
|
185
|
+
};
|
|
186
|
+
readonly valueType: {
|
|
187
|
+
readonly $ref: "#/$defs/ValueType";
|
|
188
|
+
};
|
|
189
|
+
readonly value: {};
|
|
190
|
+
readonly label: {
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
readonly maxLength: 128;
|
|
193
|
+
readonly description: "The holder's note to self for this value. Never disclosed.";
|
|
194
|
+
};
|
|
195
|
+
readonly slot: {
|
|
196
|
+
readonly $ref: "#/$defs/Slot";
|
|
197
|
+
};
|
|
198
|
+
readonly share: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
readonly enum: readonly ["local", "pool"];
|
|
201
|
+
readonly default: "local";
|
|
202
|
+
readonly description: "`local` (the default) keeps the value in this face alone: it is carried inline and enters no pool, so no other face can come to present it by accident. `pool` makes it reusable — the maintainer references a self-asserted pool attribute holding exactly this type and value, creating one when none exists.";
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
readonly HeldClaim: {
|
|
207
|
+
readonly title: "HeldClaim";
|
|
208
|
+
readonly description: "An attribute already in the holder's pool, presented live.";
|
|
209
|
+
readonly type: "object";
|
|
210
|
+
readonly additionalProperties: false;
|
|
211
|
+
readonly required: readonly ["attributeId"];
|
|
212
|
+
readonly properties: {
|
|
213
|
+
readonly attributeId: {
|
|
214
|
+
readonly $ref: "#/$defs/Ulid";
|
|
215
|
+
};
|
|
216
|
+
readonly slot: {
|
|
217
|
+
readonly $ref: "#/$defs/Slot";
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
readonly Response: {
|
|
222
|
+
readonly $anchor: "response";
|
|
223
|
+
readonly title: "Persona Profile Compose — response payload";
|
|
224
|
+
readonly description: "Success response to persona/profile/compose. Type https://trusttasks.org/spec/persona/profile/compose/1.0#response.";
|
|
225
|
+
readonly type: "object";
|
|
226
|
+
readonly additionalProperties: false;
|
|
227
|
+
readonly required: readonly ["profileId", "scope", "version"];
|
|
228
|
+
readonly properties: {
|
|
229
|
+
readonly profileId: {
|
|
230
|
+
readonly $ref: "#/$defs/Ulid";
|
|
231
|
+
};
|
|
232
|
+
readonly scope: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
readonly enum: readonly ["local", "pool"];
|
|
235
|
+
readonly description: "Where the face lives. `local`: in `contextId` only, readable through persona/local/profile/get. `pool`: above contexts, readable through persona/profile/get, and able to be worn in other contexts later.";
|
|
236
|
+
};
|
|
237
|
+
readonly version: {
|
|
238
|
+
readonly $ref: "#/$defs/Version";
|
|
239
|
+
};
|
|
240
|
+
readonly pooled: {
|
|
241
|
+
readonly type: "array";
|
|
242
|
+
readonly maxItems: 64;
|
|
243
|
+
readonly description: "For each `share: pool` claim, in request order, the pool attribute the face now references and whether this compose created it. `created: false` means the holder already kept exactly this value, and the face now shares it with whatever else presents it. Absent when no claim was pooled.";
|
|
244
|
+
readonly items: {
|
|
245
|
+
readonly type: "object";
|
|
246
|
+
readonly additionalProperties: false;
|
|
247
|
+
readonly required: readonly ["attributeId", "created"];
|
|
248
|
+
readonly properties: {
|
|
249
|
+
readonly attributeId: {
|
|
250
|
+
readonly $ref: "#/$defs/Ulid";
|
|
251
|
+
};
|
|
252
|
+
readonly created: {
|
|
253
|
+
readonly type: "boolean";
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
readonly binding: {
|
|
259
|
+
readonly type: "object";
|
|
260
|
+
readonly additionalProperties: false;
|
|
261
|
+
readonly required: readonly ["personaDid", "version"];
|
|
262
|
+
readonly description: "Present when `personaDid` was given: the face is now worn there.";
|
|
263
|
+
readonly properties: {
|
|
264
|
+
readonly personaDid: {
|
|
265
|
+
readonly type: "string";
|
|
266
|
+
readonly minLength: 1;
|
|
267
|
+
};
|
|
268
|
+
readonly version: {
|
|
269
|
+
readonly $ref: "#/$defs/Version";
|
|
270
|
+
};
|
|
271
|
+
readonly alsoBoundPersonaCount: {
|
|
272
|
+
readonly type: "integer";
|
|
273
|
+
readonly minimum: 0;
|
|
274
|
+
readonly description: "How many other personas in this context wear this face. Always zero for a face this task just created; present for parity with persona/binding/set.";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly correlation: {
|
|
279
|
+
readonly type: "object";
|
|
280
|
+
readonly additionalProperties: false;
|
|
281
|
+
readonly required: readonly ["severity"];
|
|
282
|
+
readonly description: "Advisory, as on persona/profile/put: how many of the face's claims present a value another face also presents. A count; identifiers come from persona/correlation/analyze. The write has applied.";
|
|
283
|
+
readonly properties: {
|
|
284
|
+
readonly severity: {
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
readonly enum: readonly ["none", "low", "high"];
|
|
287
|
+
};
|
|
288
|
+
readonly sharedAttributeCount: {
|
|
289
|
+
readonly type: "integer";
|
|
290
|
+
readonly minimum: 0;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
readonly ext: {
|
|
295
|
+
readonly $ref: "#/$defs/Ext";
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
readonly Ext: {
|
|
300
|
+
readonly title: "Ext";
|
|
301
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
302
|
+
readonly type: "object";
|
|
303
|
+
readonly minProperties: 1;
|
|
304
|
+
readonly additionalProperties: true;
|
|
305
|
+
readonly propertyNames: {
|
|
306
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
readonly Version: {
|
|
310
|
+
readonly title: "Version";
|
|
311
|
+
readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
|
|
312
|
+
readonly type: "integer";
|
|
313
|
+
readonly minimum: 1;
|
|
314
|
+
};
|
|
315
|
+
readonly Ulid: {
|
|
316
|
+
readonly title: "Ulid";
|
|
317
|
+
readonly 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.";
|
|
318
|
+
readonly type: "string";
|
|
319
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
320
|
+
};
|
|
321
|
+
readonly Slot: {
|
|
322
|
+
readonly title: "Slot";
|
|
323
|
+
readonly type: "string";
|
|
324
|
+
readonly pattern: "^[a-z][A-Za-z0-9]{0,31}$";
|
|
325
|
+
readonly 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.";
|
|
326
|
+
};
|
|
327
|
+
readonly ValueType: {
|
|
328
|
+
readonly title: "ValueType";
|
|
329
|
+
readonly 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
|
+
readonly type: "string";
|
|
331
|
+
readonly enum: readonly ["string", "number", "boolean", "date", "object"];
|
|
332
|
+
};
|
|
333
|
+
readonly ClaimType: {
|
|
334
|
+
readonly title: "ClaimType";
|
|
335
|
+
readonly 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.";
|
|
336
|
+
readonly type: "string";
|
|
337
|
+
readonly minLength: 1;
|
|
338
|
+
readonly maxLength: 128;
|
|
339
|
+
readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
344
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
345
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
346
|
+
readonly $ref: "#/$defs/Response";
|
|
347
|
+
readonly $defs: {
|
|
348
|
+
readonly ComposeClaim: {
|
|
349
|
+
readonly title: "ComposeClaim";
|
|
350
|
+
readonly description: "One claim of the face being composed: a value typed now, or an attribute the holder already keeps.";
|
|
351
|
+
readonly oneOf: readonly [{
|
|
352
|
+
readonly $ref: "#/$defs/NewClaim";
|
|
353
|
+
}, {
|
|
354
|
+
readonly $ref: "#/$defs/HeldClaim";
|
|
355
|
+
}];
|
|
356
|
+
};
|
|
357
|
+
readonly NewClaim: {
|
|
358
|
+
readonly title: "NewClaim";
|
|
359
|
+
readonly description: "A value the holder types now. Self-asserted: a value typed at this step has no issuer behind it, and a claim that could carry a provenance here would let a typed value present as attested.";
|
|
360
|
+
readonly type: "object";
|
|
361
|
+
readonly additionalProperties: false;
|
|
362
|
+
readonly required: readonly ["type", "valueType", "value"];
|
|
363
|
+
readonly properties: {
|
|
364
|
+
readonly type: {
|
|
365
|
+
readonly $ref: "#/$defs/ClaimType";
|
|
366
|
+
};
|
|
367
|
+
readonly valueType: {
|
|
368
|
+
readonly $ref: "#/$defs/ValueType";
|
|
369
|
+
};
|
|
370
|
+
readonly value: {};
|
|
371
|
+
readonly label: {
|
|
372
|
+
readonly type: "string";
|
|
373
|
+
readonly maxLength: 128;
|
|
374
|
+
readonly description: "The holder's note to self for this value. Never disclosed.";
|
|
375
|
+
};
|
|
376
|
+
readonly slot: {
|
|
377
|
+
readonly $ref: "#/$defs/Slot";
|
|
378
|
+
};
|
|
379
|
+
readonly share: {
|
|
380
|
+
readonly type: "string";
|
|
381
|
+
readonly enum: readonly ["local", "pool"];
|
|
382
|
+
readonly default: "local";
|
|
383
|
+
readonly description: "`local` (the default) keeps the value in this face alone: it is carried inline and enters no pool, so no other face can come to present it by accident. `pool` makes it reusable — the maintainer references a self-asserted pool attribute holding exactly this type and value, creating one when none exists.";
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
readonly HeldClaim: {
|
|
388
|
+
readonly title: "HeldClaim";
|
|
389
|
+
readonly description: "An attribute already in the holder's pool, presented live.";
|
|
390
|
+
readonly type: "object";
|
|
391
|
+
readonly additionalProperties: false;
|
|
392
|
+
readonly required: readonly ["attributeId"];
|
|
393
|
+
readonly properties: {
|
|
394
|
+
readonly attributeId: {
|
|
395
|
+
readonly $ref: "#/$defs/Ulid";
|
|
396
|
+
};
|
|
397
|
+
readonly slot: {
|
|
398
|
+
readonly $ref: "#/$defs/Slot";
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
readonly Response: {
|
|
403
|
+
readonly $anchor: "response";
|
|
404
|
+
readonly title: "Persona Profile Compose — response payload";
|
|
405
|
+
readonly description: "Success response to persona/profile/compose. Type https://trusttasks.org/spec/persona/profile/compose/1.0#response.";
|
|
406
|
+
readonly type: "object";
|
|
407
|
+
readonly additionalProperties: false;
|
|
408
|
+
readonly required: readonly ["profileId", "scope", "version"];
|
|
409
|
+
readonly properties: {
|
|
410
|
+
readonly profileId: {
|
|
411
|
+
readonly $ref: "#/$defs/Ulid";
|
|
412
|
+
};
|
|
413
|
+
readonly scope: {
|
|
414
|
+
readonly type: "string";
|
|
415
|
+
readonly enum: readonly ["local", "pool"];
|
|
416
|
+
readonly description: "Where the face lives. `local`: in `contextId` only, readable through persona/local/profile/get. `pool`: above contexts, readable through persona/profile/get, and able to be worn in other contexts later.";
|
|
417
|
+
};
|
|
418
|
+
readonly version: {
|
|
419
|
+
readonly $ref: "#/$defs/Version";
|
|
420
|
+
};
|
|
421
|
+
readonly pooled: {
|
|
422
|
+
readonly type: "array";
|
|
423
|
+
readonly maxItems: 64;
|
|
424
|
+
readonly description: "For each `share: pool` claim, in request order, the pool attribute the face now references and whether this compose created it. `created: false` means the holder already kept exactly this value, and the face now shares it with whatever else presents it. Absent when no claim was pooled.";
|
|
425
|
+
readonly items: {
|
|
426
|
+
readonly type: "object";
|
|
427
|
+
readonly additionalProperties: false;
|
|
428
|
+
readonly required: readonly ["attributeId", "created"];
|
|
429
|
+
readonly properties: {
|
|
430
|
+
readonly attributeId: {
|
|
431
|
+
readonly $ref: "#/$defs/Ulid";
|
|
432
|
+
};
|
|
433
|
+
readonly created: {
|
|
434
|
+
readonly type: "boolean";
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
readonly binding: {
|
|
440
|
+
readonly type: "object";
|
|
441
|
+
readonly additionalProperties: false;
|
|
442
|
+
readonly required: readonly ["personaDid", "version"];
|
|
443
|
+
readonly description: "Present when `personaDid` was given: the face is now worn there.";
|
|
444
|
+
readonly properties: {
|
|
445
|
+
readonly personaDid: {
|
|
446
|
+
readonly type: "string";
|
|
447
|
+
readonly minLength: 1;
|
|
448
|
+
};
|
|
449
|
+
readonly version: {
|
|
450
|
+
readonly $ref: "#/$defs/Version";
|
|
451
|
+
};
|
|
452
|
+
readonly alsoBoundPersonaCount: {
|
|
453
|
+
readonly type: "integer";
|
|
454
|
+
readonly minimum: 0;
|
|
455
|
+
readonly description: "How many other personas in this context wear this face. Always zero for a face this task just created; present for parity with persona/binding/set.";
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
readonly correlation: {
|
|
460
|
+
readonly type: "object";
|
|
461
|
+
readonly additionalProperties: false;
|
|
462
|
+
readonly required: readonly ["severity"];
|
|
463
|
+
readonly description: "Advisory, as on persona/profile/put: how many of the face's claims present a value another face also presents. A count; identifiers come from persona/correlation/analyze. The write has applied.";
|
|
464
|
+
readonly properties: {
|
|
465
|
+
readonly severity: {
|
|
466
|
+
readonly type: "string";
|
|
467
|
+
readonly enum: readonly ["none", "low", "high"];
|
|
468
|
+
};
|
|
469
|
+
readonly sharedAttributeCount: {
|
|
470
|
+
readonly type: "integer";
|
|
471
|
+
readonly minimum: 0;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
readonly ext: {
|
|
476
|
+
readonly $ref: "#/$defs/Ext";
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
readonly Ext: {
|
|
481
|
+
readonly title: "Ext";
|
|
482
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
483
|
+
readonly type: "object";
|
|
484
|
+
readonly minProperties: 1;
|
|
485
|
+
readonly additionalProperties: true;
|
|
486
|
+
readonly propertyNames: {
|
|
487
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
readonly Version: {
|
|
491
|
+
readonly title: "Version";
|
|
492
|
+
readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
|
|
493
|
+
readonly type: "integer";
|
|
494
|
+
readonly minimum: 1;
|
|
495
|
+
};
|
|
496
|
+
readonly Ulid: {
|
|
497
|
+
readonly title: "Ulid";
|
|
498
|
+
readonly 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.";
|
|
499
|
+
readonly type: "string";
|
|
500
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
501
|
+
};
|
|
502
|
+
readonly Slot: {
|
|
503
|
+
readonly title: "Slot";
|
|
504
|
+
readonly type: "string";
|
|
505
|
+
readonly pattern: "^[a-z][A-Za-z0-9]{0,31}$";
|
|
506
|
+
readonly 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.";
|
|
507
|
+
};
|
|
508
|
+
readonly ValueType: {
|
|
509
|
+
readonly title: "ValueType";
|
|
510
|
+
readonly 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.";
|
|
511
|
+
readonly type: "string";
|
|
512
|
+
readonly enum: readonly ["string", "number", "boolean", "date", "object"];
|
|
513
|
+
};
|
|
514
|
+
readonly ClaimType: {
|
|
515
|
+
readonly title: "ClaimType";
|
|
516
|
+
readonly 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.";
|
|
517
|
+
readonly type: "string";
|
|
518
|
+
readonly minLength: 1;
|
|
519
|
+
readonly maxLength: 128;
|
|
520
|
+
readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
|
|
521
|
+
};
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
526
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
527
|
+
* per-specification and cannot be derived from the document alone, and
|
|
528
|
+
* item 2 needs the schema this carries.
|
|
529
|
+
*/
|
|
530
|
+
export declare const SPEC: {
|
|
531
|
+
readonly typeUri: "https://trusttasks.org/spec/persona/profile/compose/1.0";
|
|
532
|
+
readonly isBearer: false;
|
|
533
|
+
readonly isProofRequired: true;
|
|
534
|
+
readonly isRecipientRequired: true;
|
|
535
|
+
readonly isIssuedAtRequired: true;
|
|
536
|
+
readonly payloadSchema: {
|
|
537
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
538
|
+
readonly $id: "https://trusttasks.org/spec/persona/profile/compose/1.0";
|
|
539
|
+
readonly title: "Persona Profile Compose — payload";
|
|
540
|
+
readonly description: "Compose a face for one context, where it is needed, from values typed now and attributes already held — and optionally wear it there in the same act. Local by default: a value typed here stays in this context unless the holder says it should be reusable. Where the face lives follows from what it carries, so there is no scope parameter to get wrong.";
|
|
541
|
+
readonly type: "object";
|
|
542
|
+
readonly additionalProperties: false;
|
|
543
|
+
readonly required: readonly ["contextId", "name", "claims"];
|
|
544
|
+
readonly properties: {
|
|
545
|
+
readonly contextId: {
|
|
546
|
+
readonly type: "string";
|
|
547
|
+
readonly minLength: 1;
|
|
548
|
+
readonly description: "The context the face is composed for. A face whose every claim is local lives in this context and nowhere else; a face carrying any pool claim lives above contexts, and is bound into this one when `personaDid` is given.";
|
|
549
|
+
};
|
|
550
|
+
readonly name: {
|
|
551
|
+
readonly type: "string";
|
|
552
|
+
readonly minLength: 1;
|
|
553
|
+
readonly maxLength: 128;
|
|
554
|
+
readonly description: "The holder's name for the face. Never disclosed; what a context may call the face is `label`.";
|
|
555
|
+
};
|
|
556
|
+
readonly claims: {
|
|
557
|
+
readonly type: "array";
|
|
558
|
+
readonly minItems: 1;
|
|
559
|
+
readonly maxItems: 64;
|
|
560
|
+
readonly items: {
|
|
561
|
+
readonly $ref: "#/$defs/ComposeClaim";
|
|
562
|
+
};
|
|
563
|
+
readonly description: "Ordered; the order is display order.";
|
|
564
|
+
};
|
|
565
|
+
readonly personaDid: {
|
|
566
|
+
readonly type: "string";
|
|
567
|
+
readonly minLength: 1;
|
|
568
|
+
readonly maxLength: 2048;
|
|
569
|
+
readonly description: "Wear the new face as this persona in `contextId`, in the same act. Omit to compose without wearing it.";
|
|
570
|
+
};
|
|
571
|
+
readonly label: {
|
|
572
|
+
readonly type: "string";
|
|
573
|
+
readonly minLength: 1;
|
|
574
|
+
readonly maxLength: 128;
|
|
575
|
+
readonly description: "What the context may call the face, as on persona/binding/set. Meaningful only with `personaDid`; a maintainer MUST refuse it without one rather than drop it.";
|
|
576
|
+
};
|
|
577
|
+
readonly ext: {
|
|
578
|
+
readonly $ref: "#/$defs/Ext";
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
readonly $defs: {
|
|
582
|
+
readonly ComposeClaim: {
|
|
583
|
+
readonly title: "ComposeClaim";
|
|
584
|
+
readonly description: "One claim of the face being composed: a value typed now, or an attribute the holder already keeps.";
|
|
585
|
+
readonly oneOf: readonly [{
|
|
586
|
+
readonly $ref: "#/$defs/NewClaim";
|
|
587
|
+
}, {
|
|
588
|
+
readonly $ref: "#/$defs/HeldClaim";
|
|
589
|
+
}];
|
|
590
|
+
};
|
|
591
|
+
readonly NewClaim: {
|
|
592
|
+
readonly title: "NewClaim";
|
|
593
|
+
readonly description: "A value the holder types now. Self-asserted: a value typed at this step has no issuer behind it, and a claim that could carry a provenance here would let a typed value present as attested.";
|
|
594
|
+
readonly type: "object";
|
|
595
|
+
readonly additionalProperties: false;
|
|
596
|
+
readonly required: readonly ["type", "valueType", "value"];
|
|
597
|
+
readonly properties: {
|
|
598
|
+
readonly type: {
|
|
599
|
+
readonly $ref: "#/$defs/ClaimType";
|
|
600
|
+
};
|
|
601
|
+
readonly valueType: {
|
|
602
|
+
readonly $ref: "#/$defs/ValueType";
|
|
603
|
+
};
|
|
604
|
+
readonly value: {};
|
|
605
|
+
readonly label: {
|
|
606
|
+
readonly type: "string";
|
|
607
|
+
readonly maxLength: 128;
|
|
608
|
+
readonly description: "The holder's note to self for this value. Never disclosed.";
|
|
609
|
+
};
|
|
610
|
+
readonly slot: {
|
|
611
|
+
readonly $ref: "#/$defs/Slot";
|
|
612
|
+
};
|
|
613
|
+
readonly share: {
|
|
614
|
+
readonly type: "string";
|
|
615
|
+
readonly enum: readonly ["local", "pool"];
|
|
616
|
+
readonly default: "local";
|
|
617
|
+
readonly description: "`local` (the default) keeps the value in this face alone: it is carried inline and enters no pool, so no other face can come to present it by accident. `pool` makes it reusable — the maintainer references a self-asserted pool attribute holding exactly this type and value, creating one when none exists.";
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
readonly HeldClaim: {
|
|
622
|
+
readonly title: "HeldClaim";
|
|
623
|
+
readonly description: "An attribute already in the holder's pool, presented live.";
|
|
624
|
+
readonly type: "object";
|
|
625
|
+
readonly additionalProperties: false;
|
|
626
|
+
readonly required: readonly ["attributeId"];
|
|
627
|
+
readonly properties: {
|
|
628
|
+
readonly attributeId: {
|
|
629
|
+
readonly $ref: "#/$defs/Ulid";
|
|
630
|
+
};
|
|
631
|
+
readonly slot: {
|
|
632
|
+
readonly $ref: "#/$defs/Slot";
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
readonly Response: {
|
|
637
|
+
readonly $anchor: "response";
|
|
638
|
+
readonly title: "Persona Profile Compose — response payload";
|
|
639
|
+
readonly description: "Success response to persona/profile/compose. Type https://trusttasks.org/spec/persona/profile/compose/1.0#response.";
|
|
640
|
+
readonly type: "object";
|
|
641
|
+
readonly additionalProperties: false;
|
|
642
|
+
readonly required: readonly ["profileId", "scope", "version"];
|
|
643
|
+
readonly properties: {
|
|
644
|
+
readonly profileId: {
|
|
645
|
+
readonly $ref: "#/$defs/Ulid";
|
|
646
|
+
};
|
|
647
|
+
readonly scope: {
|
|
648
|
+
readonly type: "string";
|
|
649
|
+
readonly enum: readonly ["local", "pool"];
|
|
650
|
+
readonly description: "Where the face lives. `local`: in `contextId` only, readable through persona/local/profile/get. `pool`: above contexts, readable through persona/profile/get, and able to be worn in other contexts later.";
|
|
651
|
+
};
|
|
652
|
+
readonly version: {
|
|
653
|
+
readonly $ref: "#/$defs/Version";
|
|
654
|
+
};
|
|
655
|
+
readonly pooled: {
|
|
656
|
+
readonly type: "array";
|
|
657
|
+
readonly maxItems: 64;
|
|
658
|
+
readonly description: "For each `share: pool` claim, in request order, the pool attribute the face now references and whether this compose created it. `created: false` means the holder already kept exactly this value, and the face now shares it with whatever else presents it. Absent when no claim was pooled.";
|
|
659
|
+
readonly items: {
|
|
660
|
+
readonly type: "object";
|
|
661
|
+
readonly additionalProperties: false;
|
|
662
|
+
readonly required: readonly ["attributeId", "created"];
|
|
663
|
+
readonly properties: {
|
|
664
|
+
readonly attributeId: {
|
|
665
|
+
readonly $ref: "#/$defs/Ulid";
|
|
666
|
+
};
|
|
667
|
+
readonly created: {
|
|
668
|
+
readonly type: "boolean";
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
readonly binding: {
|
|
674
|
+
readonly type: "object";
|
|
675
|
+
readonly additionalProperties: false;
|
|
676
|
+
readonly required: readonly ["personaDid", "version"];
|
|
677
|
+
readonly description: "Present when `personaDid` was given: the face is now worn there.";
|
|
678
|
+
readonly properties: {
|
|
679
|
+
readonly personaDid: {
|
|
680
|
+
readonly type: "string";
|
|
681
|
+
readonly minLength: 1;
|
|
682
|
+
};
|
|
683
|
+
readonly version: {
|
|
684
|
+
readonly $ref: "#/$defs/Version";
|
|
685
|
+
};
|
|
686
|
+
readonly alsoBoundPersonaCount: {
|
|
687
|
+
readonly type: "integer";
|
|
688
|
+
readonly minimum: 0;
|
|
689
|
+
readonly description: "How many other personas in this context wear this face. Always zero for a face this task just created; present for parity with persona/binding/set.";
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
readonly correlation: {
|
|
694
|
+
readonly type: "object";
|
|
695
|
+
readonly additionalProperties: false;
|
|
696
|
+
readonly required: readonly ["severity"];
|
|
697
|
+
readonly description: "Advisory, as on persona/profile/put: how many of the face's claims present a value another face also presents. A count; identifiers come from persona/correlation/analyze. The write has applied.";
|
|
698
|
+
readonly properties: {
|
|
699
|
+
readonly severity: {
|
|
700
|
+
readonly type: "string";
|
|
701
|
+
readonly enum: readonly ["none", "low", "high"];
|
|
702
|
+
};
|
|
703
|
+
readonly sharedAttributeCount: {
|
|
704
|
+
readonly type: "integer";
|
|
705
|
+
readonly minimum: 0;
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
readonly ext: {
|
|
710
|
+
readonly $ref: "#/$defs/Ext";
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
readonly Ext: {
|
|
715
|
+
readonly title: "Ext";
|
|
716
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
717
|
+
readonly type: "object";
|
|
718
|
+
readonly minProperties: 1;
|
|
719
|
+
readonly additionalProperties: true;
|
|
720
|
+
readonly propertyNames: {
|
|
721
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
readonly Version: {
|
|
725
|
+
readonly title: "Version";
|
|
726
|
+
readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
|
|
727
|
+
readonly type: "integer";
|
|
728
|
+
readonly minimum: 1;
|
|
729
|
+
};
|
|
730
|
+
readonly Ulid: {
|
|
731
|
+
readonly title: "Ulid";
|
|
732
|
+
readonly 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.";
|
|
733
|
+
readonly type: "string";
|
|
734
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
735
|
+
};
|
|
736
|
+
readonly Slot: {
|
|
737
|
+
readonly title: "Slot";
|
|
738
|
+
readonly type: "string";
|
|
739
|
+
readonly pattern: "^[a-z][A-Za-z0-9]{0,31}$";
|
|
740
|
+
readonly 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.";
|
|
741
|
+
};
|
|
742
|
+
readonly ValueType: {
|
|
743
|
+
readonly title: "ValueType";
|
|
744
|
+
readonly 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.";
|
|
745
|
+
readonly type: "string";
|
|
746
|
+
readonly enum: readonly ["string", "number", "boolean", "date", "object"];
|
|
747
|
+
};
|
|
748
|
+
readonly ClaimType: {
|
|
749
|
+
readonly title: "ClaimType";
|
|
750
|
+
readonly 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.";
|
|
751
|
+
readonly type: "string";
|
|
752
|
+
readonly minLength: 1;
|
|
753
|
+
readonly maxLength: 128;
|
|
754
|
+
readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
|
|
755
|
+
};
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
};
|
|
759
|
+
/**
|
|
760
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
761
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
762
|
+
* parties (§7.3 item 5).
|
|
763
|
+
*/
|
|
764
|
+
export declare const RESPONSE_SPEC: {
|
|
765
|
+
readonly typeUri: "https://trusttasks.org/spec/persona/profile/compose/1.0#response";
|
|
766
|
+
readonly isBearer: false;
|
|
767
|
+
readonly isProofRequired: true;
|
|
768
|
+
readonly isRecipientRequired: true;
|
|
769
|
+
readonly isIssuedAtRequired: true;
|
|
770
|
+
readonly payloadSchema: {
|
|
771
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
772
|
+
readonly $ref: "#/$defs/Response";
|
|
773
|
+
readonly $defs: {
|
|
774
|
+
readonly ComposeClaim: {
|
|
775
|
+
readonly title: "ComposeClaim";
|
|
776
|
+
readonly description: "One claim of the face being composed: a value typed now, or an attribute the holder already keeps.";
|
|
777
|
+
readonly oneOf: readonly [{
|
|
778
|
+
readonly $ref: "#/$defs/NewClaim";
|
|
779
|
+
}, {
|
|
780
|
+
readonly $ref: "#/$defs/HeldClaim";
|
|
781
|
+
}];
|
|
782
|
+
};
|
|
783
|
+
readonly NewClaim: {
|
|
784
|
+
readonly title: "NewClaim";
|
|
785
|
+
readonly description: "A value the holder types now. Self-asserted: a value typed at this step has no issuer behind it, and a claim that could carry a provenance here would let a typed value present as attested.";
|
|
786
|
+
readonly type: "object";
|
|
787
|
+
readonly additionalProperties: false;
|
|
788
|
+
readonly required: readonly ["type", "valueType", "value"];
|
|
789
|
+
readonly properties: {
|
|
790
|
+
readonly type: {
|
|
791
|
+
readonly $ref: "#/$defs/ClaimType";
|
|
792
|
+
};
|
|
793
|
+
readonly valueType: {
|
|
794
|
+
readonly $ref: "#/$defs/ValueType";
|
|
795
|
+
};
|
|
796
|
+
readonly value: {};
|
|
797
|
+
readonly label: {
|
|
798
|
+
readonly type: "string";
|
|
799
|
+
readonly maxLength: 128;
|
|
800
|
+
readonly description: "The holder's note to self for this value. Never disclosed.";
|
|
801
|
+
};
|
|
802
|
+
readonly slot: {
|
|
803
|
+
readonly $ref: "#/$defs/Slot";
|
|
804
|
+
};
|
|
805
|
+
readonly share: {
|
|
806
|
+
readonly type: "string";
|
|
807
|
+
readonly enum: readonly ["local", "pool"];
|
|
808
|
+
readonly default: "local";
|
|
809
|
+
readonly description: "`local` (the default) keeps the value in this face alone: it is carried inline and enters no pool, so no other face can come to present it by accident. `pool` makes it reusable — the maintainer references a self-asserted pool attribute holding exactly this type and value, creating one when none exists.";
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
readonly HeldClaim: {
|
|
814
|
+
readonly title: "HeldClaim";
|
|
815
|
+
readonly description: "An attribute already in the holder's pool, presented live.";
|
|
816
|
+
readonly type: "object";
|
|
817
|
+
readonly additionalProperties: false;
|
|
818
|
+
readonly required: readonly ["attributeId"];
|
|
819
|
+
readonly properties: {
|
|
820
|
+
readonly attributeId: {
|
|
821
|
+
readonly $ref: "#/$defs/Ulid";
|
|
822
|
+
};
|
|
823
|
+
readonly slot: {
|
|
824
|
+
readonly $ref: "#/$defs/Slot";
|
|
825
|
+
};
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
readonly Response: {
|
|
829
|
+
readonly $anchor: "response";
|
|
830
|
+
readonly title: "Persona Profile Compose — response payload";
|
|
831
|
+
readonly description: "Success response to persona/profile/compose. Type https://trusttasks.org/spec/persona/profile/compose/1.0#response.";
|
|
832
|
+
readonly type: "object";
|
|
833
|
+
readonly additionalProperties: false;
|
|
834
|
+
readonly required: readonly ["profileId", "scope", "version"];
|
|
835
|
+
readonly properties: {
|
|
836
|
+
readonly profileId: {
|
|
837
|
+
readonly $ref: "#/$defs/Ulid";
|
|
838
|
+
};
|
|
839
|
+
readonly scope: {
|
|
840
|
+
readonly type: "string";
|
|
841
|
+
readonly enum: readonly ["local", "pool"];
|
|
842
|
+
readonly description: "Where the face lives. `local`: in `contextId` only, readable through persona/local/profile/get. `pool`: above contexts, readable through persona/profile/get, and able to be worn in other contexts later.";
|
|
843
|
+
};
|
|
844
|
+
readonly version: {
|
|
845
|
+
readonly $ref: "#/$defs/Version";
|
|
846
|
+
};
|
|
847
|
+
readonly pooled: {
|
|
848
|
+
readonly type: "array";
|
|
849
|
+
readonly maxItems: 64;
|
|
850
|
+
readonly description: "For each `share: pool` claim, in request order, the pool attribute the face now references and whether this compose created it. `created: false` means the holder already kept exactly this value, and the face now shares it with whatever else presents it. Absent when no claim was pooled.";
|
|
851
|
+
readonly items: {
|
|
852
|
+
readonly type: "object";
|
|
853
|
+
readonly additionalProperties: false;
|
|
854
|
+
readonly required: readonly ["attributeId", "created"];
|
|
855
|
+
readonly properties: {
|
|
856
|
+
readonly attributeId: {
|
|
857
|
+
readonly $ref: "#/$defs/Ulid";
|
|
858
|
+
};
|
|
859
|
+
readonly created: {
|
|
860
|
+
readonly type: "boolean";
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
readonly binding: {
|
|
866
|
+
readonly type: "object";
|
|
867
|
+
readonly additionalProperties: false;
|
|
868
|
+
readonly required: readonly ["personaDid", "version"];
|
|
869
|
+
readonly description: "Present when `personaDid` was given: the face is now worn there.";
|
|
870
|
+
readonly properties: {
|
|
871
|
+
readonly personaDid: {
|
|
872
|
+
readonly type: "string";
|
|
873
|
+
readonly minLength: 1;
|
|
874
|
+
};
|
|
875
|
+
readonly version: {
|
|
876
|
+
readonly $ref: "#/$defs/Version";
|
|
877
|
+
};
|
|
878
|
+
readonly alsoBoundPersonaCount: {
|
|
879
|
+
readonly type: "integer";
|
|
880
|
+
readonly minimum: 0;
|
|
881
|
+
readonly description: "How many other personas in this context wear this face. Always zero for a face this task just created; present for parity with persona/binding/set.";
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
};
|
|
885
|
+
readonly correlation: {
|
|
886
|
+
readonly type: "object";
|
|
887
|
+
readonly additionalProperties: false;
|
|
888
|
+
readonly required: readonly ["severity"];
|
|
889
|
+
readonly description: "Advisory, as on persona/profile/put: how many of the face's claims present a value another face also presents. A count; identifiers come from persona/correlation/analyze. The write has applied.";
|
|
890
|
+
readonly properties: {
|
|
891
|
+
readonly severity: {
|
|
892
|
+
readonly type: "string";
|
|
893
|
+
readonly enum: readonly ["none", "low", "high"];
|
|
894
|
+
};
|
|
895
|
+
readonly sharedAttributeCount: {
|
|
896
|
+
readonly type: "integer";
|
|
897
|
+
readonly minimum: 0;
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
readonly ext: {
|
|
902
|
+
readonly $ref: "#/$defs/Ext";
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
};
|
|
906
|
+
readonly Ext: {
|
|
907
|
+
readonly title: "Ext";
|
|
908
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
909
|
+
readonly type: "object";
|
|
910
|
+
readonly minProperties: 1;
|
|
911
|
+
readonly additionalProperties: true;
|
|
912
|
+
readonly propertyNames: {
|
|
913
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
readonly Version: {
|
|
917
|
+
readonly title: "Version";
|
|
918
|
+
readonly description: "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.";
|
|
919
|
+
readonly type: "integer";
|
|
920
|
+
readonly minimum: 1;
|
|
921
|
+
};
|
|
922
|
+
readonly Ulid: {
|
|
923
|
+
readonly title: "Ulid";
|
|
924
|
+
readonly 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.";
|
|
925
|
+
readonly type: "string";
|
|
926
|
+
readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
|
|
927
|
+
};
|
|
928
|
+
readonly Slot: {
|
|
929
|
+
readonly title: "Slot";
|
|
930
|
+
readonly type: "string";
|
|
931
|
+
readonly pattern: "^[a-z][A-Za-z0-9]{0,31}$";
|
|
932
|
+
readonly 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.";
|
|
933
|
+
};
|
|
934
|
+
readonly ValueType: {
|
|
935
|
+
readonly title: "ValueType";
|
|
936
|
+
readonly 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.";
|
|
937
|
+
readonly type: "string";
|
|
938
|
+
readonly enum: readonly ["string", "number", "boolean", "date", "object"];
|
|
939
|
+
};
|
|
940
|
+
readonly ClaimType: {
|
|
941
|
+
readonly title: "ClaimType";
|
|
942
|
+
readonly 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.";
|
|
943
|
+
readonly type: "string";
|
|
944
|
+
readonly minLength: 1;
|
|
945
|
+
readonly maxLength: 128;
|
|
946
|
+
readonly pattern: "^(x:)?[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$";
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
//# sourceMappingURL=payload.d.ts.map
|