@openvtc/trust-tasks 0.16.9 → 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 +149 -0
- package/dist/_shared/components.d.ts +204 -5
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -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/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/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 +211 -5
- package/src/index.ts +27 -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/owner/claim/0.1/payload.ts +268 -0
- package/src/rooms/owner/transfer/0.1/payload.ts +268 -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,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/persona/attribute/delete/1.0/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ExpectedVersion_PersonaV0_1 as ExpectedVersion, Ext, Ulid } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Remove one attribute from the holder's pool. Refused by default while any profile still references it, because a silent removal would change what those profiles present without the holder having said so.
|
|
11
|
+
*/
|
|
12
|
+
export interface PersonaAttributeDeletePayload {
|
|
13
|
+
attributeId: Ulid;
|
|
14
|
+
/**
|
|
15
|
+
* When false (the default) a referenced attribute is refused, and the error names the referring profiles so the holder can decide. When true the attribute is removed and every referring profile entry is removed with it. Cascade is the destructive option and is therefore never the default: deleting one fact and silently changing what three profiles disclose is exactly the surprise this family exists to prevent.
|
|
16
|
+
*/
|
|
17
|
+
cascade?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Optional precondition, so a delete cannot race a concurrent edit the holder has not seen.
|
|
20
|
+
*/
|
|
21
|
+
expectedVersion?: ExpectedVersion;
|
|
22
|
+
ext?: Ext;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Success response to persona/attribute/delete. Type https://trusttasks.org/spec/persona/attribute/delete/1.0#response. Deleting an attribute that is already absent is a success carrying `existed: false`, which is what makes a repeated delete converge.
|
|
26
|
+
*/
|
|
27
|
+
export interface PersonaAttributeDeleteResponsePayload {
|
|
28
|
+
attributeId: Ulid;
|
|
29
|
+
/**
|
|
30
|
+
* False when no live attribute was present. A repeat delete returns false and deliberately does NOT take a new counter value — had it done so, every consumer watching the store would see a change that did not happen, and delete could not be safely retried.
|
|
31
|
+
*/
|
|
32
|
+
existed: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Profiles whose entries were removed by a cascading delete. Present only when `cascade` was true and something was removed; a holder is owed the list of what their one action changed.
|
|
35
|
+
*
|
|
36
|
+
* @maxItems 256
|
|
37
|
+
*/
|
|
38
|
+
removedFromProfiles?: Ulid[];
|
|
39
|
+
ext?: Ext;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
43
|
+
export type { ExpectedVersion, Ext, Ulid };
|
|
44
|
+
|
|
45
|
+
/** Trust Task type URI. */
|
|
46
|
+
export const TYPE_URI = "https://trusttasks.org/spec/persona/attribute/delete/1.0" as const;
|
|
47
|
+
|
|
48
|
+
/** Stable alias for this specification's request payload shape. */
|
|
49
|
+
export type Payload = PersonaAttributeDeletePayload;
|
|
50
|
+
|
|
51
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
52
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/attribute/delete/1.0#response" as const;
|
|
53
|
+
|
|
54
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
55
|
+
export type Response = PersonaAttributeDeleteResponsePayload;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* This specification's payload schema, as a value.
|
|
59
|
+
*
|
|
60
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
61
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
62
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
63
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
64
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
65
|
+
*/
|
|
66
|
+
export const PAYLOAD_SCHEMA = {
|
|
67
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
68
|
+
"$id": "https://trusttasks.org/spec/persona/attribute/delete/1.0",
|
|
69
|
+
"title": "Persona Attribute Delete — payload",
|
|
70
|
+
"description": "Remove one attribute from the holder's pool. Refused by default while any profile still references it, because a silent removal would change what those profiles present without the holder having said so.",
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": [
|
|
74
|
+
"attributeId"
|
|
75
|
+
],
|
|
76
|
+
"properties": {
|
|
77
|
+
"attributeId": {
|
|
78
|
+
"$ref": "#/$defs/Ulid"
|
|
79
|
+
},
|
|
80
|
+
"cascade": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"default": false,
|
|
83
|
+
"description": "When false (the default) a referenced attribute is refused, and the error names the referring profiles so the holder can decide. When true the attribute is removed and every referring profile entry is removed with it. Cascade is the destructive option and is therefore never the default: deleting one fact and silently changing what three profiles disclose is exactly the surprise this family exists to prevent."
|
|
84
|
+
},
|
|
85
|
+
"expectedVersion": {
|
|
86
|
+
"$ref": "#/$defs/ExpectedVersion",
|
|
87
|
+
"description": "Optional precondition, so a delete cannot race a concurrent edit the holder has not seen."
|
|
88
|
+
},
|
|
89
|
+
"ext": {
|
|
90
|
+
"$ref": "#/$defs/Ext"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"$defs": {
|
|
94
|
+
"Response": {
|
|
95
|
+
"$anchor": "response",
|
|
96
|
+
"title": "Persona Attribute Delete — response payload",
|
|
97
|
+
"description": "Success response to persona/attribute/delete. Type https://trusttasks.org/spec/persona/attribute/delete/1.0#response. Deleting an attribute that is already absent is a success carrying `existed: false`, which is what makes a repeated delete converge.",
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": [
|
|
101
|
+
"attributeId",
|
|
102
|
+
"existed"
|
|
103
|
+
],
|
|
104
|
+
"properties": {
|
|
105
|
+
"attributeId": {
|
|
106
|
+
"$ref": "#/$defs/Ulid"
|
|
107
|
+
},
|
|
108
|
+
"existed": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"description": "False when no live attribute was present. A repeat delete returns false and deliberately does NOT take a new counter value — had it done so, every consumer watching the store would see a change that did not happen, and delete could not be safely retried."
|
|
111
|
+
},
|
|
112
|
+
"removedFromProfiles": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"maxItems": 256,
|
|
115
|
+
"items": {
|
|
116
|
+
"$ref": "#/$defs/Ulid"
|
|
117
|
+
},
|
|
118
|
+
"description": "Profiles whose entries were removed by a cascading delete. Present only when `cascade` was true and something was removed; a holder is owed the list of what their one action changed."
|
|
119
|
+
},
|
|
120
|
+
"ext": {
|
|
121
|
+
"$ref": "#/$defs/Ext"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"Ext": {
|
|
126
|
+
"title": "Ext",
|
|
127
|
+
"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.",
|
|
128
|
+
"type": "object",
|
|
129
|
+
"minProperties": 1,
|
|
130
|
+
"additionalProperties": true,
|
|
131
|
+
"propertyNames": {
|
|
132
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"Ulid": {
|
|
136
|
+
"title": "Ulid",
|
|
137
|
+
"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.",
|
|
138
|
+
"type": "string",
|
|
139
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
140
|
+
},
|
|
141
|
+
"ExpectedVersion": {
|
|
142
|
+
"title": "ExpectedVersion",
|
|
143
|
+
"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.",
|
|
144
|
+
"type": "integer",
|
|
145
|
+
"minimum": 0
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
} as const;
|
|
149
|
+
|
|
150
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
151
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
152
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
153
|
+
"$ref": "#/$defs/Response",
|
|
154
|
+
"$defs": {
|
|
155
|
+
"Response": {
|
|
156
|
+
"$anchor": "response",
|
|
157
|
+
"title": "Persona Attribute Delete — response payload",
|
|
158
|
+
"description": "Success response to persona/attribute/delete. Type https://trusttasks.org/spec/persona/attribute/delete/1.0#response. Deleting an attribute that is already absent is a success carrying `existed: false`, which is what makes a repeated delete converge.",
|
|
159
|
+
"type": "object",
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"required": [
|
|
162
|
+
"attributeId",
|
|
163
|
+
"existed"
|
|
164
|
+
],
|
|
165
|
+
"properties": {
|
|
166
|
+
"attributeId": {
|
|
167
|
+
"$ref": "#/$defs/Ulid"
|
|
168
|
+
},
|
|
169
|
+
"existed": {
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"description": "False when no live attribute was present. A repeat delete returns false and deliberately does NOT take a new counter value — had it done so, every consumer watching the store would see a change that did not happen, and delete could not be safely retried."
|
|
172
|
+
},
|
|
173
|
+
"removedFromProfiles": {
|
|
174
|
+
"type": "array",
|
|
175
|
+
"maxItems": 256,
|
|
176
|
+
"items": {
|
|
177
|
+
"$ref": "#/$defs/Ulid"
|
|
178
|
+
},
|
|
179
|
+
"description": "Profiles whose entries were removed by a cascading delete. Present only when `cascade` was true and something was removed; a holder is owed the list of what their one action changed."
|
|
180
|
+
},
|
|
181
|
+
"ext": {
|
|
182
|
+
"$ref": "#/$defs/Ext"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"Ext": {
|
|
187
|
+
"title": "Ext",
|
|
188
|
+
"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.",
|
|
189
|
+
"type": "object",
|
|
190
|
+
"minProperties": 1,
|
|
191
|
+
"additionalProperties": true,
|
|
192
|
+
"propertyNames": {
|
|
193
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"Ulid": {
|
|
197
|
+
"title": "Ulid",
|
|
198
|
+
"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.",
|
|
199
|
+
"type": "string",
|
|
200
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
201
|
+
},
|
|
202
|
+
"ExpectedVersion": {
|
|
203
|
+
"title": "ExpectedVersion",
|
|
204
|
+
"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.",
|
|
205
|
+
"type": "integer",
|
|
206
|
+
"minimum": 0
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
} as const;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
213
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
214
|
+
* per-specification and cannot be derived from the document alone, and
|
|
215
|
+
* item 2 needs the schema this carries.
|
|
216
|
+
*/
|
|
217
|
+
export const SPEC = {
|
|
218
|
+
typeUri: TYPE_URI,
|
|
219
|
+
isBearer: false,
|
|
220
|
+
isProofRequired: true,
|
|
221
|
+
isRecipientRequired: true,
|
|
222
|
+
isIssuedAtRequired: true,
|
|
223
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
224
|
+
} as const;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
228
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
229
|
+
* parties (§7.3 item 5).
|
|
230
|
+
*/
|
|
231
|
+
export const RESPONSE_SPEC = {
|
|
232
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
233
|
+
isBearer: false,
|
|
234
|
+
isProofRequired: true,
|
|
235
|
+
isRecipientRequired: true,
|
|
236
|
+
isIssuedAtRequired: true,
|
|
237
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
238
|
+
} as const;
|