@openvtc/trust-tasks 0.16.8 → 0.16.10
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 +285 -0
- package/dist/_shared/components.d.ts +206 -7
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +6 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +6 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +6 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +6 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/persona/_shared/0.1/persona-record.d.ts +22 -0
- package/dist/persona/_shared/0.1/persona-record.d.ts.map +1 -0
- package/dist/persona/_shared/0.1/persona-record.js +6 -0
- package/dist/persona/_shared/0.1/persona-record.js.map +1 -0
- package/dist/persona/attribute/delete/1.0/payload.d.ts +351 -0
- package/dist/persona/attribute/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/delete/1.0/payload.js +188 -0
- package/dist/persona/attribute/delete/1.0/payload.js.map +1 -0
- package/dist/persona/attribute/list/1.0/payload.d.ts +895 -0
- package/dist/persona/attribute/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/list/1.0/payload.js +532 -0
- package/dist/persona/attribute/list/1.0/payload.js.map +1 -0
- package/dist/persona/attribute/put/1.0/payload.d.ts +829 -0
- package/dist/persona/attribute/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/attribute/put/1.0/payload.js +487 -0
- package/dist/persona/attribute/put/1.0/payload.js.map +1 -0
- package/dist/persona/binding/get/1.0/payload.d.ts +382 -0
- package/dist/persona/binding/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/binding/get/1.0/payload.js +206 -0
- package/dist/persona/binding/get/1.0/payload.js.map +1 -0
- package/dist/persona/binding/list/1.0/payload.d.ts +387 -0
- package/dist/persona/binding/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/binding/list/1.0/payload.js +210 -0
- package/dist/persona/binding/list/1.0/payload.js.map +1 -0
- package/dist/persona/binding/set/1.0/payload.d.ts +545 -0
- package/dist/persona/binding/set/1.0/payload.d.ts.map +1 -0
- package/dist/persona/binding/set/1.0/payload.js +302 -0
- package/dist/persona/binding/set/1.0/payload.js.map +1 -0
- package/dist/persona/contact/delete/1.0/payload.d.ts +313 -0
- package/dist/persona/contact/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/contact/delete/1.0/payload.js +174 -0
- package/dist/persona/contact/delete/1.0/payload.js.map +1 -0
- package/dist/persona/contact/get/1.0/payload.d.ts +1027 -0
- package/dist/persona/contact/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/contact/get/1.0/payload.js +606 -0
- package/dist/persona/contact/get/1.0/payload.js.map +1 -0
- package/dist/persona/contact/list/1.0/payload.d.ts +490 -0
- package/dist/persona/contact/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/contact/list/1.0/payload.js +262 -0
- package/dist/persona/contact/list/1.0/payload.js.map +1 -0
- package/dist/persona/contact/put/1.0/payload.d.ts +885 -0
- package/dist/persona/contact/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/contact/put/1.0/payload.js +518 -0
- package/dist/persona/contact/put/1.0/payload.js.map +1 -0
- package/dist/persona/correlation/analyze/1.0/payload.d.ts +648 -0
- package/dist/persona/correlation/analyze/1.0/payload.d.ts.map +1 -0
- package/dist/persona/correlation/analyze/1.0/payload.js +338 -0
- package/dist/persona/correlation/analyze/1.0/payload.js.map +1 -0
- package/dist/persona/disclosure/history/1.0/payload.d.ts +639 -0
- package/dist/persona/disclosure/history/1.0/payload.d.ts.map +1 -0
- package/dist/persona/disclosure/history/1.0/payload.js +339 -0
- package/dist/persona/disclosure/history/1.0/payload.js.map +1 -0
- package/dist/persona/disclosure/present/1.0/payload.d.ts +400 -0
- package/dist/persona/disclosure/present/1.0/payload.d.ts.map +1 -0
- package/dist/persona/disclosure/present/1.0/payload.js +211 -0
- package/dist/persona/disclosure/present/1.0/payload.js.map +1 -0
- package/dist/persona/disclosure/preview/1.0/payload.d.ts +858 -0
- package/dist/persona/disclosure/preview/1.0/payload.d.ts.map +1 -0
- package/dist/persona/disclosure/preview/1.0/payload.js +480 -0
- package/dist/persona/disclosure/preview/1.0/payload.js.map +1 -0
- package/dist/persona/local/binding/set/1.0/payload.d.ts +394 -0
- package/dist/persona/local/binding/set/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/binding/set/1.0/payload.js +226 -0
- package/dist/persona/local/binding/set/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/delete/1.0/payload.d.ts +311 -0
- package/dist/persona/local/profile/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/profile/delete/1.0/payload.js +173 -0
- package/dist/persona/local/profile/delete/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/get/1.0/payload.d.ts +368 -0
- package/dist/persona/local/profile/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/profile/get/1.0/payload.js +210 -0
- package/dist/persona/local/profile/get/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/list/1.0/payload.d.ts +387 -0
- package/dist/persona/local/profile/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/profile/list/1.0/payload.js +214 -0
- package/dist/persona/local/profile/list/1.0/payload.js.map +1 -0
- package/dist/persona/local/profile/put/1.0/payload.d.ts +545 -0
- package/dist/persona/local/profile/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/local/profile/put/1.0/payload.js +315 -0
- package/dist/persona/local/profile/put/1.0/payload.js.map +1 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts +350 -0
- package/dist/persona/profile/delete/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/delete/1.0/payload.js +189 -0
- package/dist/persona/profile/delete/1.0/payload.js.map +1 -0
- package/dist/persona/profile/get/1.0/payload.d.ts +1307 -0
- package/dist/persona/profile/get/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/get/1.0/payload.js +804 -0
- package/dist/persona/profile/get/1.0/payload.js.map +1 -0
- package/dist/persona/profile/list/1.0/payload.d.ts +1120 -0
- package/dist/persona/profile/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/list/1.0/payload.js +680 -0
- package/dist/persona/profile/list/1.0/payload.js.map +1 -0
- package/dist/persona/profile/put/1.0/payload.d.ts +1115 -0
- package/dist/persona/profile/put/1.0/payload.d.ts.map +1 -0
- package/dist/persona/profile/put/1.0/payload.js +675 -0
- package/dist/persona/profile/put/1.0/payload.js.map +1 -0
- package/dist/persona/renderers/list/1.0/payload.d.ts +362 -0
- package/dist/persona/renderers/list/1.0/payload.d.ts.map +1 -0
- package/dist/persona/renderers/list/1.0/payload.js +197 -0
- package/dist/persona/renderers/list/1.0/payload.js.map +1 -0
- package/dist/rooms/keys/commit/0.1/payload.d.ts +266 -0
- package/dist/rooms/keys/commit/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/commit/0.1/payload.js +146 -0
- package/dist/rooms/keys/commit/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts +272 -0
- package/dist/rooms/keys/key-package/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/key-package/0.1/payload.js +147 -0
- package/dist/rooms/keys/key-package/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts +276 -0
- package/dist/rooms/keys/welcome/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/welcome/0.1/payload.js +148 -0
- package/dist/rooms/keys/welcome/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/claim/0.1/payload.d.ts +391 -0
- package/dist/rooms/owner/claim/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/claim/0.1/payload.js +214 -0
- package/dist/rooms/owner/claim/0.1/payload.js.map +1 -0
- package/dist/rooms/owner/transfer/0.1/payload.d.ts +391 -0
- package/dist/rooms/owner/transfer/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/owner/transfer/0.1/payload.js +214 -0
- package/dist/rooms/owner/transfer/0.1/payload.js.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts +500 -0
- package/dist/rooms/records/curate/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/records/curate/0.1/payload.js +277 -0
- package/dist/rooms/records/curate/0.1/payload.js.map +1 -0
- package/dist/vta/_shared/0.1/app-state-record.d.ts +1 -1
- package/dist/vta/_shared/0.1/app-state-record.d.ts.map +1 -1
- package/dist/vta/app-state/delete/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/delete/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/get/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/get/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/get-many/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/get-many/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/list/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/list/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/put/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/put/1.0/payload.d.ts.map +1 -1
- package/dist/vta/app-state/put-many/1.0/payload.d.ts +1 -1
- package/dist/vta/app-state/put-many/1.0/payload.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +217 -7
- package/src/device/list/0.1/payload.ts +6 -2
- package/src/device/list/0.2/payload.ts +6 -2
- package/src/device/register/0.1/payload.ts +6 -2
- package/src/device/register/0.2/payload.ts +6 -2
- package/src/index.ts +31 -0
- package/src/persona/_shared/0.1/persona-record.ts +23 -0
- package/src/persona/attribute/delete/1.0/payload.ts +238 -0
- package/src/persona/attribute/list/1.0/payload.ts +590 -0
- package/src/persona/attribute/put/1.0/payload.ts +559 -0
- package/src/persona/binding/get/1.0/payload.ts +257 -0
- package/src/persona/binding/list/1.0/payload.ts +260 -0
- package/src/persona/binding/set/1.0/payload.ts +370 -0
- package/src/persona/contact/delete/1.0/payload.ts +216 -0
- package/src/persona/contact/get/1.0/payload.ts +662 -0
- package/src/persona/contact/list/1.0/payload.ts +323 -0
- package/src/persona/contact/put/1.0/payload.ts +580 -0
- package/src/persona/correlation/analyze/1.0/payload.ts +466 -0
- package/src/persona/disclosure/history/1.0/payload.ts +415 -0
- package/src/persona/disclosure/present/1.0/payload.ts +274 -0
- package/src/persona/disclosure/preview/1.0/payload.ts +597 -0
- package/src/persona/local/binding/set/1.0/payload.ts +267 -0
- package/src/persona/local/profile/delete/1.0/payload.ts +215 -0
- package/src/persona/local/profile/get/1.0/payload.ts +251 -0
- package/src/persona/local/profile/list/1.0/payload.ts +260 -0
- package/src/persona/local/profile/put/1.0/payload.ts +373 -0
- package/src/persona/profile/delete/1.0/payload.ts +236 -0
- package/src/persona/profile/get/1.0/payload.ts +846 -0
- package/src/persona/profile/list/1.0/payload.ts +723 -0
- package/src/persona/profile/put/1.0/payload.ts +741 -0
- package/src/persona/renderers/list/1.0/payload.ts +248 -0
- package/src/rooms/keys/commit/0.1/payload.ts +195 -0
- package/src/rooms/keys/key-package/0.1/payload.ts +196 -0
- package/src/rooms/keys/welcome/0.1/payload.ts +201 -0
- package/src/rooms/owner/claim/0.1/payload.ts +268 -0
- package/src/rooms/owner/transfer/0.1/payload.ts +268 -0
- package/src/rooms/records/curate/0.1/payload.ts +357 -0
- package/src/vta/_shared/0.1/app-state-record.ts +1 -1
- package/src/vta/app-state/delete/1.0/payload.ts +1 -1
- package/src/vta/app-state/get/1.0/payload.ts +1 -1
- package/src/vta/app-state/get-many/1.0/payload.ts +1 -1
- package/src/vta/app-state/list/1.0/payload.ts +1 -1
- package/src/vta/app-state/put/1.0/payload.ts +1 -1
- package/src/vta/app-state/put-many/1.0/payload.ts +1 -1
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/binding/set/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ExpectedVersion_PersonaV0_1 as ExpectedVersion, Ext, Ulid, Version_PersonaV0_1 as Version } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Assign a profile to a persona DID within a context, or clear the assignment. This is the step that pushes a composition across the context boundary: the maintainer materialises the profile into the context, and a context never reaches back the other way.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaBindingSetPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The context the persona lives in. The binding is context-scoped even though the profile it names is not.
|
|
15
|
+
*/
|
|
16
|
+
contextId: string;
|
|
17
|
+
/**
|
|
18
|
+
* The persona being bound.
|
|
19
|
+
*/
|
|
20
|
+
personaDid: string;
|
|
21
|
+
/**
|
|
22
|
+
* The profile to bind, or null to clear. Null is a first-class value and not an omission: a persona with no profile is a legitimate, common state — a throwaway identity that presents nothing — and the schema says so rather than leaving a consumer to infer it from an absent member.
|
|
23
|
+
*/
|
|
24
|
+
profileId?: Ulid | null;
|
|
25
|
+
/**
|
|
26
|
+
* Attributes the holder opts into publishing on the persona's own DID document or equivalent public surface. Empty by default and MUST remain empty unless explicitly set: everything else is a per-verifier projection, and a published value is one document every relying party sees identically — a permanent correlation point the rest of this family exists to avoid.
|
|
27
|
+
*
|
|
28
|
+
* @maxItems 32
|
|
29
|
+
*/
|
|
30
|
+
publicEntries?: Ulid[];
|
|
31
|
+
expectedVersion?: ExpectedVersion;
|
|
32
|
+
ext?: Ext;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Success response to persona/binding/set. Type https://trusttasks.org/spec/persona/binding/set/1.0#response.
|
|
36
|
+
*/
|
|
37
|
+
export interface PersonaBindingSetResponsePayload {
|
|
38
|
+
contextId: string;
|
|
39
|
+
personaDid: string;
|
|
40
|
+
profileId?: Ulid | null;
|
|
41
|
+
version: Version;
|
|
42
|
+
/**
|
|
43
|
+
* How many claims were materialised into the context by this binding. A count, so the holder can see that a push happened and how large it was without the response restating the values.
|
|
44
|
+
*/
|
|
45
|
+
materialisedClaimCount?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Advisory. Correlation is scored HERE as well as at composition, because composing is hypothetical and binding is when a value actually crosses into a context. Binding one profile to a second persona is reported at `high` unconditionally: that act makes the two personas the same person by construction.
|
|
48
|
+
*/
|
|
49
|
+
correlation?: {
|
|
50
|
+
severity: "none" | "low" | "high";
|
|
51
|
+
/**
|
|
52
|
+
* How many other personas are bound to this same profile. A count, not identifiers.
|
|
53
|
+
*/
|
|
54
|
+
alsoBoundPersonaCount?: number;
|
|
55
|
+
};
|
|
56
|
+
boundAt: string;
|
|
57
|
+
ext?: Ext;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
61
|
+
export type { ExpectedVersion, Ext, Ulid, Version };
|
|
62
|
+
|
|
63
|
+
/** Trust Task type URI. */
|
|
64
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/binding/set/1.0" as const;
|
|
65
|
+
|
|
66
|
+
/** Stable alias for this specification's request payload shape. */
|
|
67
|
+
export type Payload = PersonaBindingSetPayload;
|
|
68
|
+
|
|
69
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
70
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/binding/set/1.0#response" as const;
|
|
71
|
+
|
|
72
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
73
|
+
export type Response = PersonaBindingSetResponsePayload;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* This specification's payload schema, as a value.
|
|
77
|
+
*
|
|
78
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
79
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
80
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
81
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
82
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
83
|
+
*/
|
|
84
|
+
export const PAYLOAD_SCHEMA = {
|
|
85
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
86
|
+
"$id": "https://trusttasks.org/spec/persona/binding/set/1.0",
|
|
87
|
+
"title": "Persona Binding Set — payload",
|
|
88
|
+
"description": "Assign a profile to a persona DID within a context, or clear the assignment. This is the step that pushes a composition across the context boundary: the maintainer materialises the profile into the context, and a context never reaches back the other way.",
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": [
|
|
92
|
+
"contextId",
|
|
93
|
+
"personaDid"
|
|
94
|
+
],
|
|
95
|
+
"properties": {
|
|
96
|
+
"contextId": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"description": "The context the persona lives in. The binding is context-scoped even though the profile it names is not."
|
|
100
|
+
},
|
|
101
|
+
"personaDid": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"minLength": 1,
|
|
104
|
+
"maxLength": 2048,
|
|
105
|
+
"description": "The persona being bound."
|
|
106
|
+
},
|
|
107
|
+
"profileId": {
|
|
108
|
+
"oneOf": [
|
|
109
|
+
{
|
|
110
|
+
"$ref": "#/$defs/Ulid"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "null"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"description": "The profile to bind, or null to clear. Null is a first-class value and not an omission: a persona with no profile is a legitimate, common state — a throwaway identity that presents nothing — and the schema says so rather than leaving a consumer to infer it from an absent member."
|
|
117
|
+
},
|
|
118
|
+
"publicEntries": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"maxItems": 32,
|
|
121
|
+
"items": {
|
|
122
|
+
"$ref": "#/$defs/Ulid"
|
|
123
|
+
},
|
|
124
|
+
"description": "Attributes the holder opts into publishing on the persona's own DID document or equivalent public surface. Empty by default and MUST remain empty unless explicitly set: everything else is a per-verifier projection, and a published value is one document every relying party sees identically — a permanent correlation point the rest of this family exists to avoid."
|
|
125
|
+
},
|
|
126
|
+
"expectedVersion": {
|
|
127
|
+
"$ref": "#/$defs/ExpectedVersion"
|
|
128
|
+
},
|
|
129
|
+
"ext": {
|
|
130
|
+
"$ref": "#/$defs/Ext"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"$defs": {
|
|
134
|
+
"Response": {
|
|
135
|
+
"$anchor": "response",
|
|
136
|
+
"title": "Persona Binding Set — response payload",
|
|
137
|
+
"description": "Success response to persona/binding/set. Type https://trusttasks.org/spec/persona/binding/set/1.0#response.",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"required": [
|
|
141
|
+
"contextId",
|
|
142
|
+
"personaDid",
|
|
143
|
+
"version",
|
|
144
|
+
"boundAt"
|
|
145
|
+
],
|
|
146
|
+
"properties": {
|
|
147
|
+
"contextId": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"minLength": 1
|
|
150
|
+
},
|
|
151
|
+
"personaDid": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"minLength": 1
|
|
154
|
+
},
|
|
155
|
+
"profileId": {
|
|
156
|
+
"oneOf": [
|
|
157
|
+
{
|
|
158
|
+
"$ref": "#/$defs/Ulid"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "null"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"version": {
|
|
166
|
+
"$ref": "#/$defs/Version"
|
|
167
|
+
},
|
|
168
|
+
"materialisedClaimCount": {
|
|
169
|
+
"type": "integer",
|
|
170
|
+
"minimum": 0,
|
|
171
|
+
"description": "How many claims were materialised into the context by this binding. A count, so the holder can see that a push happened and how large it was without the response restating the values."
|
|
172
|
+
},
|
|
173
|
+
"correlation": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"additionalProperties": false,
|
|
176
|
+
"required": [
|
|
177
|
+
"severity"
|
|
178
|
+
],
|
|
179
|
+
"description": "Advisory. Correlation is scored HERE as well as at composition, because composing is hypothetical and binding is when a value actually crosses into a context. Binding one profile to a second persona is reported at `high` unconditionally: that act makes the two personas the same person by construction.",
|
|
180
|
+
"properties": {
|
|
181
|
+
"severity": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"enum": [
|
|
184
|
+
"none",
|
|
185
|
+
"low",
|
|
186
|
+
"high"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"alsoBoundPersonaCount": {
|
|
190
|
+
"type": "integer",
|
|
191
|
+
"minimum": 0,
|
|
192
|
+
"description": "How many other personas are bound to this same profile. A count, not identifiers."
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"boundAt": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"format": "date-time"
|
|
199
|
+
},
|
|
200
|
+
"ext": {
|
|
201
|
+
"$ref": "#/$defs/Ext"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"Ext": {
|
|
206
|
+
"title": "Ext",
|
|
207
|
+
"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.",
|
|
208
|
+
"type": "object",
|
|
209
|
+
"minProperties": 1,
|
|
210
|
+
"additionalProperties": true,
|
|
211
|
+
"propertyNames": {
|
|
212
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"Version": {
|
|
216
|
+
"title": "Version",
|
|
217
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
218
|
+
"type": "integer",
|
|
219
|
+
"minimum": 1
|
|
220
|
+
},
|
|
221
|
+
"Ulid": {
|
|
222
|
+
"title": "Ulid",
|
|
223
|
+
"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.",
|
|
224
|
+
"type": "string",
|
|
225
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
226
|
+
},
|
|
227
|
+
"ExpectedVersion": {
|
|
228
|
+
"title": "ExpectedVersion",
|
|
229
|
+
"description": "Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.",
|
|
230
|
+
"type": "integer",
|
|
231
|
+
"minimum": 0
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
} as const;
|
|
235
|
+
|
|
236
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
237
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
238
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
239
|
+
"$ref": "#/$defs/Response",
|
|
240
|
+
"$defs": {
|
|
241
|
+
"Response": {
|
|
242
|
+
"$anchor": "response",
|
|
243
|
+
"title": "Persona Binding Set — response payload",
|
|
244
|
+
"description": "Success response to persona/binding/set. Type https://trusttasks.org/spec/persona/binding/set/1.0#response.",
|
|
245
|
+
"type": "object",
|
|
246
|
+
"additionalProperties": false,
|
|
247
|
+
"required": [
|
|
248
|
+
"contextId",
|
|
249
|
+
"personaDid",
|
|
250
|
+
"version",
|
|
251
|
+
"boundAt"
|
|
252
|
+
],
|
|
253
|
+
"properties": {
|
|
254
|
+
"contextId": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"minLength": 1
|
|
257
|
+
},
|
|
258
|
+
"personaDid": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"minLength": 1
|
|
261
|
+
},
|
|
262
|
+
"profileId": {
|
|
263
|
+
"oneOf": [
|
|
264
|
+
{
|
|
265
|
+
"$ref": "#/$defs/Ulid"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"type": "null"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"version": {
|
|
273
|
+
"$ref": "#/$defs/Version"
|
|
274
|
+
},
|
|
275
|
+
"materialisedClaimCount": {
|
|
276
|
+
"type": "integer",
|
|
277
|
+
"minimum": 0,
|
|
278
|
+
"description": "How many claims were materialised into the context by this binding. A count, so the holder can see that a push happened and how large it was without the response restating the values."
|
|
279
|
+
},
|
|
280
|
+
"correlation": {
|
|
281
|
+
"type": "object",
|
|
282
|
+
"additionalProperties": false,
|
|
283
|
+
"required": [
|
|
284
|
+
"severity"
|
|
285
|
+
],
|
|
286
|
+
"description": "Advisory. Correlation is scored HERE as well as at composition, because composing is hypothetical and binding is when a value actually crosses into a context. Binding one profile to a second persona is reported at `high` unconditionally: that act makes the two personas the same person by construction.",
|
|
287
|
+
"properties": {
|
|
288
|
+
"severity": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"enum": [
|
|
291
|
+
"none",
|
|
292
|
+
"low",
|
|
293
|
+
"high"
|
|
294
|
+
]
|
|
295
|
+
},
|
|
296
|
+
"alsoBoundPersonaCount": {
|
|
297
|
+
"type": "integer",
|
|
298
|
+
"minimum": 0,
|
|
299
|
+
"description": "How many other personas are bound to this same profile. A count, not identifiers."
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"boundAt": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"format": "date-time"
|
|
306
|
+
},
|
|
307
|
+
"ext": {
|
|
308
|
+
"$ref": "#/$defs/Ext"
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"Ext": {
|
|
313
|
+
"title": "Ext",
|
|
314
|
+
"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.",
|
|
315
|
+
"type": "object",
|
|
316
|
+
"minProperties": 1,
|
|
317
|
+
"additionalProperties": true,
|
|
318
|
+
"propertyNames": {
|
|
319
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"Version": {
|
|
323
|
+
"title": "Version",
|
|
324
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
325
|
+
"type": "integer",
|
|
326
|
+
"minimum": 1
|
|
327
|
+
},
|
|
328
|
+
"Ulid": {
|
|
329
|
+
"title": "Ulid",
|
|
330
|
+
"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.",
|
|
331
|
+
"type": "string",
|
|
332
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
333
|
+
},
|
|
334
|
+
"ExpectedVersion": {
|
|
335
|
+
"title": "ExpectedVersion",
|
|
336
|
+
"description": "Optimistic-concurrency precondition. A positive value requires the record's current `version` to equal it exactly; zero means create-only and applies only when no live record exists at the address.",
|
|
337
|
+
"type": "integer",
|
|
338
|
+
"minimum": 0
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
} as const;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
345
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
346
|
+
* per-specification and cannot be derived from the document alone, and
|
|
347
|
+
* item 2 needs the schema this carries.
|
|
348
|
+
*/
|
|
349
|
+
export const SPEC = {
|
|
350
|
+
typeUri: TYPE_URI,
|
|
351
|
+
isBearer: false,
|
|
352
|
+
isProofRequired: true,
|
|
353
|
+
isRecipientRequired: true,
|
|
354
|
+
isIssuedAtRequired: true,
|
|
355
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
356
|
+
} as const;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
360
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
361
|
+
* parties (§7.3 item 5).
|
|
362
|
+
*/
|
|
363
|
+
export const RESPONSE_SPEC = {
|
|
364
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
365
|
+
isBearer: false,
|
|
366
|
+
isProofRequired: true,
|
|
367
|
+
isRecipientRequired: true,
|
|
368
|
+
isIssuedAtRequired: true,
|
|
369
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
370
|
+
} as const;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/contact/delete/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, Ulid } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Remove a contact and every revision of it.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaContactDeletePayload {
|
|
13
|
+
contextId: string;
|
|
14
|
+
contactId: Ulid;
|
|
15
|
+
ext?: Ext;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Success response to persona/contact/delete. Type https://trusttasks.org/spec/persona/contact/delete/1.0#response. Deleting an absent contact is a success carrying existed: false, which is what makes a repeated delete converge.
|
|
19
|
+
*/
|
|
20
|
+
export interface PersonaContactDeleteResponsePayload {
|
|
21
|
+
contactId: Ulid;
|
|
22
|
+
existed: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* How many revisions went with it, so a holder deleting a long history is told the size of what they removed.
|
|
25
|
+
*/
|
|
26
|
+
revisionsRemoved?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Revisions NOT removed because a disclosure record still references them. A maintainer that keeps such revisions MUST report the count rather than let the holder believe the deletion was total — an incomplete erasure the holder thinks is complete is worse than one they know about.
|
|
29
|
+
*/
|
|
30
|
+
retainedForDisclosure?: number;
|
|
31
|
+
ext?: Ext;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
35
|
+
export type { Ext, Ulid };
|
|
36
|
+
|
|
37
|
+
/** Trust Task type URI. */
|
|
38
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/contact/delete/1.0" as const;
|
|
39
|
+
|
|
40
|
+
/** Stable alias for this specification's request payload shape. */
|
|
41
|
+
export type Payload = PersonaContactDeletePayload;
|
|
42
|
+
|
|
43
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
44
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/contact/delete/1.0#response" as const;
|
|
45
|
+
|
|
46
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
47
|
+
export type Response = PersonaContactDeleteResponsePayload;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* This specification's payload schema, as a value.
|
|
51
|
+
*
|
|
52
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
53
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
54
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
55
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
56
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
57
|
+
*/
|
|
58
|
+
export const PAYLOAD_SCHEMA = {
|
|
59
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
60
|
+
"$id": "https://trusttasks.org/spec/persona/contact/delete/1.0",
|
|
61
|
+
"title": "Persona Contact Delete — payload",
|
|
62
|
+
"description": "Remove a contact and every revision of it.",
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": [
|
|
66
|
+
"contextId",
|
|
67
|
+
"contactId"
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"contextId": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"minLength": 1
|
|
73
|
+
},
|
|
74
|
+
"contactId": {
|
|
75
|
+
"$ref": "#/$defs/Ulid"
|
|
76
|
+
},
|
|
77
|
+
"ext": {
|
|
78
|
+
"$ref": "#/$defs/Ext"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"$defs": {
|
|
82
|
+
"Response": {
|
|
83
|
+
"$anchor": "response",
|
|
84
|
+
"title": "Persona Contact Delete — response payload",
|
|
85
|
+
"description": "Success response to persona/contact/delete. Type https://trusttasks.org/spec/persona/contact/delete/1.0#response. Deleting an absent contact is a success carrying existed: false, which is what makes a repeated delete converge.",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": [
|
|
89
|
+
"contactId",
|
|
90
|
+
"existed"
|
|
91
|
+
],
|
|
92
|
+
"properties": {
|
|
93
|
+
"contactId": {
|
|
94
|
+
"$ref": "#/$defs/Ulid"
|
|
95
|
+
},
|
|
96
|
+
"existed": {
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
},
|
|
99
|
+
"revisionsRemoved": {
|
|
100
|
+
"type": "integer",
|
|
101
|
+
"minimum": 0,
|
|
102
|
+
"description": "How many revisions went with it, so a holder deleting a long history is told the size of what they removed."
|
|
103
|
+
},
|
|
104
|
+
"retainedForDisclosure": {
|
|
105
|
+
"type": "integer",
|
|
106
|
+
"minimum": 0,
|
|
107
|
+
"description": "Revisions NOT removed because a disclosure record still references them. A maintainer that keeps such revisions MUST report the count rather than let the holder believe the deletion was total — an incomplete erasure the holder thinks is complete is worse than one they know about."
|
|
108
|
+
},
|
|
109
|
+
"ext": {
|
|
110
|
+
"$ref": "#/$defs/Ext"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"Ext": {
|
|
115
|
+
"title": "Ext",
|
|
116
|
+
"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.",
|
|
117
|
+
"type": "object",
|
|
118
|
+
"minProperties": 1,
|
|
119
|
+
"additionalProperties": true,
|
|
120
|
+
"propertyNames": {
|
|
121
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"Ulid": {
|
|
125
|
+
"title": "Ulid",
|
|
126
|
+
"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.",
|
|
127
|
+
"type": "string",
|
|
128
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
} as const;
|
|
132
|
+
|
|
133
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
134
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
135
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
136
|
+
"$ref": "#/$defs/Response",
|
|
137
|
+
"$defs": {
|
|
138
|
+
"Response": {
|
|
139
|
+
"$anchor": "response",
|
|
140
|
+
"title": "Persona Contact Delete — response payload",
|
|
141
|
+
"description": "Success response to persona/contact/delete. Type https://trusttasks.org/spec/persona/contact/delete/1.0#response. Deleting an absent contact is a success carrying existed: false, which is what makes a repeated delete converge.",
|
|
142
|
+
"type": "object",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"required": [
|
|
145
|
+
"contactId",
|
|
146
|
+
"existed"
|
|
147
|
+
],
|
|
148
|
+
"properties": {
|
|
149
|
+
"contactId": {
|
|
150
|
+
"$ref": "#/$defs/Ulid"
|
|
151
|
+
},
|
|
152
|
+
"existed": {
|
|
153
|
+
"type": "boolean"
|
|
154
|
+
},
|
|
155
|
+
"revisionsRemoved": {
|
|
156
|
+
"type": "integer",
|
|
157
|
+
"minimum": 0,
|
|
158
|
+
"description": "How many revisions went with it, so a holder deleting a long history is told the size of what they removed."
|
|
159
|
+
},
|
|
160
|
+
"retainedForDisclosure": {
|
|
161
|
+
"type": "integer",
|
|
162
|
+
"minimum": 0,
|
|
163
|
+
"description": "Revisions NOT removed because a disclosure record still references them. A maintainer that keeps such revisions MUST report the count rather than let the holder believe the deletion was total — an incomplete erasure the holder thinks is complete is worse than one they know about."
|
|
164
|
+
},
|
|
165
|
+
"ext": {
|
|
166
|
+
"$ref": "#/$defs/Ext"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"Ext": {
|
|
171
|
+
"title": "Ext",
|
|
172
|
+
"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.",
|
|
173
|
+
"type": "object",
|
|
174
|
+
"minProperties": 1,
|
|
175
|
+
"additionalProperties": true,
|
|
176
|
+
"propertyNames": {
|
|
177
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"Ulid": {
|
|
181
|
+
"title": "Ulid",
|
|
182
|
+
"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.",
|
|
183
|
+
"type": "string",
|
|
184
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
} as const;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
191
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
192
|
+
* per-specification and cannot be derived from the document alone, and
|
|
193
|
+
* item 2 needs the schema this carries.
|
|
194
|
+
*/
|
|
195
|
+
export const SPEC = {
|
|
196
|
+
typeUri: TYPE_URI,
|
|
197
|
+
isBearer: false,
|
|
198
|
+
isProofRequired: true,
|
|
199
|
+
isRecipientRequired: true,
|
|
200
|
+
isIssuedAtRequired: true,
|
|
201
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
202
|
+
} as const;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
206
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
207
|
+
* parties (§7.3 item 5).
|
|
208
|
+
*/
|
|
209
|
+
export const RESPONSE_SPEC = {
|
|
210
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
211
|
+
isBearer: false,
|
|
212
|
+
isProofRequired: true,
|
|
213
|
+
isRecipientRequired: true,
|
|
214
|
+
isIssuedAtRequired: true,
|
|
215
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
216
|
+
} as const;
|