@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,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/local/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
|
+
* Bind a context-local profile to a persona in the same context. Safely context-callable — unlike persona/binding/set — precisely because both objects it names live below the boundary and neither reaches the holder's pool.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaLocalBindingSetPayload {
|
|
13
|
+
contextId: string;
|
|
14
|
+
personaDid: string;
|
|
15
|
+
/**
|
|
16
|
+
* A LOCAL profile, or null to clear. A maintainer MUST refuse an identifier that names a pool profile: honouring it would let a context-scoped caller bind the holder's composition, which is the one escalation the whole boundary exists to prevent.
|
|
17
|
+
*/
|
|
18
|
+
profileId?: Ulid | null;
|
|
19
|
+
expectedVersion?: ExpectedVersion;
|
|
20
|
+
ext?: Ext;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Success response to persona/local/binding/set. Type https://trusttasks.org/spec/persona/local/binding/set/1.0#response.
|
|
24
|
+
*/
|
|
25
|
+
export interface PersonaLocalBindingSetResponsePayload {
|
|
26
|
+
contextId: string;
|
|
27
|
+
personaDid: string;
|
|
28
|
+
profileId?: Ulid | null;
|
|
29
|
+
version: Version;
|
|
30
|
+
ext?: Ext;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
34
|
+
export type { ExpectedVersion, Ext, Ulid, Version };
|
|
35
|
+
|
|
36
|
+
/** Trust Task type URI. */
|
|
37
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/local/binding/set/1.0" as const;
|
|
38
|
+
|
|
39
|
+
/** Stable alias for this specification's request payload shape. */
|
|
40
|
+
export type Payload = PersonaLocalBindingSetPayload;
|
|
41
|
+
|
|
42
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
43
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/local/binding/set/1.0#response" as const;
|
|
44
|
+
|
|
45
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
46
|
+
export type Response = PersonaLocalBindingSetResponsePayload;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* This specification's payload schema, as a value.
|
|
50
|
+
*
|
|
51
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
52
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
53
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
54
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
55
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
56
|
+
*/
|
|
57
|
+
export const PAYLOAD_SCHEMA = {
|
|
58
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
59
|
+
"$id": "https://trusttasks.org/spec/persona/local/binding/set/1.0",
|
|
60
|
+
"title": "Persona Local Binding Set — payload",
|
|
61
|
+
"description": "Bind a context-local profile to a persona in the same context. Safely context-callable — unlike persona/binding/set — precisely because both objects it names live below the boundary and neither reaches the holder's pool.",
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": [
|
|
65
|
+
"contextId",
|
|
66
|
+
"personaDid"
|
|
67
|
+
],
|
|
68
|
+
"properties": {
|
|
69
|
+
"contextId": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1
|
|
72
|
+
},
|
|
73
|
+
"personaDid": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1,
|
|
76
|
+
"maxLength": 2048
|
|
77
|
+
},
|
|
78
|
+
"profileId": {
|
|
79
|
+
"oneOf": [
|
|
80
|
+
{
|
|
81
|
+
"$ref": "#/$defs/Ulid"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "null"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"description": "A LOCAL profile, or null to clear. A maintainer MUST refuse an identifier that names a pool profile: honouring it would let a context-scoped caller bind the holder's composition, which is the one escalation the whole boundary exists to prevent."
|
|
88
|
+
},
|
|
89
|
+
"expectedVersion": {
|
|
90
|
+
"$ref": "#/$defs/ExpectedVersion"
|
|
91
|
+
},
|
|
92
|
+
"ext": {
|
|
93
|
+
"$ref": "#/$defs/Ext"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"$defs": {
|
|
97
|
+
"Response": {
|
|
98
|
+
"$anchor": "response",
|
|
99
|
+
"title": "Persona Local Binding Set — response payload",
|
|
100
|
+
"description": "Success response to persona/local/binding/set. Type https://trusttasks.org/spec/persona/local/binding/set/1.0#response.",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": [
|
|
104
|
+
"contextId",
|
|
105
|
+
"personaDid",
|
|
106
|
+
"version"
|
|
107
|
+
],
|
|
108
|
+
"properties": {
|
|
109
|
+
"contextId": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"minLength": 1
|
|
112
|
+
},
|
|
113
|
+
"personaDid": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1
|
|
116
|
+
},
|
|
117
|
+
"profileId": {
|
|
118
|
+
"oneOf": [
|
|
119
|
+
{
|
|
120
|
+
"$ref": "#/$defs/Ulid"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "null"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"version": {
|
|
128
|
+
"$ref": "#/$defs/Version"
|
|
129
|
+
},
|
|
130
|
+
"ext": {
|
|
131
|
+
"$ref": "#/$defs/Ext"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"Ext": {
|
|
136
|
+
"title": "Ext",
|
|
137
|
+
"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.",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"minProperties": 1,
|
|
140
|
+
"additionalProperties": true,
|
|
141
|
+
"propertyNames": {
|
|
142
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"Version": {
|
|
146
|
+
"title": "Version",
|
|
147
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
148
|
+
"type": "integer",
|
|
149
|
+
"minimum": 1
|
|
150
|
+
},
|
|
151
|
+
"Ulid": {
|
|
152
|
+
"title": "Ulid",
|
|
153
|
+
"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.",
|
|
154
|
+
"type": "string",
|
|
155
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
156
|
+
},
|
|
157
|
+
"ExpectedVersion": {
|
|
158
|
+
"title": "ExpectedVersion",
|
|
159
|
+
"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.",
|
|
160
|
+
"type": "integer",
|
|
161
|
+
"minimum": 0
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
} as const;
|
|
165
|
+
|
|
166
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
167
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
168
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
169
|
+
"$ref": "#/$defs/Response",
|
|
170
|
+
"$defs": {
|
|
171
|
+
"Response": {
|
|
172
|
+
"$anchor": "response",
|
|
173
|
+
"title": "Persona Local Binding Set — response payload",
|
|
174
|
+
"description": "Success response to persona/local/binding/set. Type https://trusttasks.org/spec/persona/local/binding/set/1.0#response.",
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": [
|
|
178
|
+
"contextId",
|
|
179
|
+
"personaDid",
|
|
180
|
+
"version"
|
|
181
|
+
],
|
|
182
|
+
"properties": {
|
|
183
|
+
"contextId": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"minLength": 1
|
|
186
|
+
},
|
|
187
|
+
"personaDid": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"minLength": 1
|
|
190
|
+
},
|
|
191
|
+
"profileId": {
|
|
192
|
+
"oneOf": [
|
|
193
|
+
{
|
|
194
|
+
"$ref": "#/$defs/Ulid"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "null"
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"version": {
|
|
202
|
+
"$ref": "#/$defs/Version"
|
|
203
|
+
},
|
|
204
|
+
"ext": {
|
|
205
|
+
"$ref": "#/$defs/Ext"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"Ext": {
|
|
210
|
+
"title": "Ext",
|
|
211
|
+
"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.",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"minProperties": 1,
|
|
214
|
+
"additionalProperties": true,
|
|
215
|
+
"propertyNames": {
|
|
216
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"Version": {
|
|
220
|
+
"title": "Version",
|
|
221
|
+
"description": "A value of the store's monotonic write counter. Server-assigned; a producer never chooses one.",
|
|
222
|
+
"type": "integer",
|
|
223
|
+
"minimum": 1
|
|
224
|
+
},
|
|
225
|
+
"Ulid": {
|
|
226
|
+
"title": "Ulid",
|
|
227
|
+
"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.",
|
|
228
|
+
"type": "string",
|
|
229
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
230
|
+
},
|
|
231
|
+
"ExpectedVersion": {
|
|
232
|
+
"title": "ExpectedVersion",
|
|
233
|
+
"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.",
|
|
234
|
+
"type": "integer",
|
|
235
|
+
"minimum": 0
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
} as const;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
242
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
243
|
+
* per-specification and cannot be derived from the document alone, and
|
|
244
|
+
* item 2 needs the schema this carries.
|
|
245
|
+
*/
|
|
246
|
+
export const SPEC = {
|
|
247
|
+
typeUri: TYPE_URI,
|
|
248
|
+
isBearer: false,
|
|
249
|
+
isProofRequired: true,
|
|
250
|
+
isRecipientRequired: true,
|
|
251
|
+
isIssuedAtRequired: true,
|
|
252
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
253
|
+
} as const;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
257
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
258
|
+
* parties (§7.3 item 5).
|
|
259
|
+
*/
|
|
260
|
+
export const RESPONSE_SPEC = {
|
|
261
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
262
|
+
isBearer: false,
|
|
263
|
+
isProofRequired: true,
|
|
264
|
+
isRecipientRequired: true,
|
|
265
|
+
isIssuedAtRequired: true,
|
|
266
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
267
|
+
} as const;
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/local/profile/delete/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, Ulid } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Remove one context-local profile.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaLocalProfileDeletePayload {
|
|
13
|
+
contextId: string;
|
|
14
|
+
profileId: Ulid;
|
|
15
|
+
/**
|
|
16
|
+
* Clear any local binding to it. Refused without this while bound, for the same reason a pool profile is: a persona that silently stopped presenting anything is a failure discovered from the other side.
|
|
17
|
+
*/
|
|
18
|
+
unbind?: boolean;
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Success response to persona/local/profile/delete. Type https://trusttasks.org/spec/persona/local/profile/delete/1.0#response.
|
|
23
|
+
*/
|
|
24
|
+
export interface PersonaLocalProfileDeleteResponsePayload {
|
|
25
|
+
profileId: Ulid;
|
|
26
|
+
existed: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* @maxItems 64
|
|
29
|
+
*/
|
|
30
|
+
unboundPersonas?: string[];
|
|
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/local/profile/delete/1.0" as const;
|
|
39
|
+
|
|
40
|
+
/** Stable alias for this specification's request payload shape. */
|
|
41
|
+
export type Payload = PersonaLocalProfileDeletePayload;
|
|
42
|
+
|
|
43
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
44
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/local/profile/delete/1.0#response" as const;
|
|
45
|
+
|
|
46
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
47
|
+
export type Response = PersonaLocalProfileDeleteResponsePayload;
|
|
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/local/profile/delete/1.0",
|
|
61
|
+
"title": "Persona Local Profile Delete — payload",
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"properties": {
|
|
65
|
+
"contextId": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 1
|
|
68
|
+
},
|
|
69
|
+
"profileId": {
|
|
70
|
+
"$ref": "#/$defs/Ulid"
|
|
71
|
+
},
|
|
72
|
+
"unbind": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"default": false,
|
|
75
|
+
"description": "Clear any local binding to it. Refused without this while bound, for the same reason a pool profile is: a persona that silently stopped presenting anything is a failure discovered from the other side."
|
|
76
|
+
},
|
|
77
|
+
"ext": {
|
|
78
|
+
"$ref": "#/$defs/Ext"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"$defs": {
|
|
82
|
+
"Response": {
|
|
83
|
+
"required": [
|
|
84
|
+
"profileId",
|
|
85
|
+
"existed"
|
|
86
|
+
],
|
|
87
|
+
"properties": {
|
|
88
|
+
"profileId": {
|
|
89
|
+
"$ref": "#/$defs/Ulid"
|
|
90
|
+
},
|
|
91
|
+
"existed": {
|
|
92
|
+
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"unboundPersonas": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"maxItems": 64,
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"ext": {
|
|
102
|
+
"$ref": "#/$defs/Ext"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"$anchor": "response",
|
|
106
|
+
"title": "Persona Local Profile Delete — response payload",
|
|
107
|
+
"description": "Success response to persona/local/profile/delete. Type https://trusttasks.org/spec/persona/local/profile/delete/1.0#response.",
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false
|
|
110
|
+
},
|
|
111
|
+
"Ext": {
|
|
112
|
+
"title": "Ext",
|
|
113
|
+
"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.",
|
|
114
|
+
"type": "object",
|
|
115
|
+
"minProperties": 1,
|
|
116
|
+
"additionalProperties": true,
|
|
117
|
+
"propertyNames": {
|
|
118
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"Ulid": {
|
|
122
|
+
"title": "Ulid",
|
|
123
|
+
"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.",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"description": "Remove one context-local profile.",
|
|
129
|
+
"required": [
|
|
130
|
+
"contextId",
|
|
131
|
+
"profileId"
|
|
132
|
+
]
|
|
133
|
+
} as const;
|
|
134
|
+
|
|
135
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
136
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
137
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
138
|
+
"$ref": "#/$defs/Response",
|
|
139
|
+
"$defs": {
|
|
140
|
+
"Response": {
|
|
141
|
+
"required": [
|
|
142
|
+
"profileId",
|
|
143
|
+
"existed"
|
|
144
|
+
],
|
|
145
|
+
"properties": {
|
|
146
|
+
"profileId": {
|
|
147
|
+
"$ref": "#/$defs/Ulid"
|
|
148
|
+
},
|
|
149
|
+
"existed": {
|
|
150
|
+
"type": "boolean"
|
|
151
|
+
},
|
|
152
|
+
"unboundPersonas": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"maxItems": 64,
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"ext": {
|
|
160
|
+
"$ref": "#/$defs/Ext"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"$anchor": "response",
|
|
164
|
+
"title": "Persona Local Profile Delete — response payload",
|
|
165
|
+
"description": "Success response to persona/local/profile/delete. Type https://trusttasks.org/spec/persona/local/profile/delete/1.0#response.",
|
|
166
|
+
"type": "object",
|
|
167
|
+
"additionalProperties": false
|
|
168
|
+
},
|
|
169
|
+
"Ext": {
|
|
170
|
+
"title": "Ext",
|
|
171
|
+
"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.",
|
|
172
|
+
"type": "object",
|
|
173
|
+
"minProperties": 1,
|
|
174
|
+
"additionalProperties": true,
|
|
175
|
+
"propertyNames": {
|
|
176
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"Ulid": {
|
|
180
|
+
"title": "Ulid",
|
|
181
|
+
"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.",
|
|
182
|
+
"type": "string",
|
|
183
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
} as const;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
190
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
191
|
+
* per-specification and cannot be derived from the document alone, and
|
|
192
|
+
* item 2 needs the schema this carries.
|
|
193
|
+
*/
|
|
194
|
+
export const SPEC = {
|
|
195
|
+
typeUri: TYPE_URI,
|
|
196
|
+
isBearer: false,
|
|
197
|
+
isProofRequired: true,
|
|
198
|
+
isRecipientRequired: true,
|
|
199
|
+
isIssuedAtRequired: true,
|
|
200
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
201
|
+
} as const;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
205
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
206
|
+
* parties (§7.3 item 5).
|
|
207
|
+
*/
|
|
208
|
+
export const RESPONSE_SPEC = {
|
|
209
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
210
|
+
isBearer: false,
|
|
211
|
+
isProofRequired: true,
|
|
212
|
+
isRecipientRequired: true,
|
|
213
|
+
isIssuedAtRequired: true,
|
|
214
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
215
|
+
} as const;
|