@openvtc/trust-tasks 0.17.8 → 0.17.9

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.
@@ -0,0 +1,310 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/facet/delete/1.0/payload.schema.json
4
+ */
5
+ import type { ExpectedVersion_PersonaV0_1 as ExpectedVersion, Ext, Ulid } from "../../../../_shared/components.js";
6
+ /**
7
+ * Delete one facet. The faces and attributes that belonged to it are untouched — a facet is a way of arranging what the holder keeps, never a container for it.
8
+ */
9
+ export interface PersonaFacetDeletePayload {
10
+ facetId: Ulid;
11
+ /**
12
+ * Optional precondition. Supply the version a prior read returned to refuse a delete against a facet that has changed since it was looked at.
13
+ */
14
+ expectedVersion?: ExpectedVersion;
15
+ ext?: Ext;
16
+ }
17
+ /**
18
+ * Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.
19
+ */
20
+ export interface PersonaFacetDeleteResponsePayload {
21
+ /**
22
+ * False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first.
23
+ */
24
+ existed: boolean;
25
+ /**
26
+ * How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'.
27
+ */
28
+ releasedFaces?: number;
29
+ ext?: Ext;
30
+ }
31
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
32
+ export type { ExpectedVersion, Ext, Ulid };
33
+ /** Trust Task type URI. */
34
+ export declare const TYPE_URI: "https://trusttasks.org/spec/persona/facet/delete/1.0";
35
+ /** Stable alias for this specification's request payload shape. */
36
+ export type Payload = PersonaFacetDeletePayload;
37
+ /** Trust Task response type URI (request type URI + "#response"). */
38
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/persona/facet/delete/1.0#response";
39
+ /** Stable alias for this specification's success-response payload shape. */
40
+ export type Response = PersonaFacetDeleteResponsePayload;
41
+ /**
42
+ * This specification's payload schema, as a value.
43
+ *
44
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
45
+ * rather than only as a `.json` file because TypeScript types are erased
46
+ * at runtime: without a schema a consumer has nothing to validate, and
47
+ * every REQUIRED payload member is optional in practice. Cross-file
48
+ * `$ref`s are already inlined, so it needs no resolver.
49
+ */
50
+ export declare const PAYLOAD_SCHEMA: {
51
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
52
+ readonly $id: "https://trusttasks.org/spec/persona/facet/delete/1.0";
53
+ readonly title: "Persona — Facet Delete — payload";
54
+ readonly description: "Delete one facet. The faces and attributes that belonged to it are untouched — a facet is a way of arranging what the holder keeps, never a container for it.";
55
+ readonly type: "object";
56
+ readonly additionalProperties: false;
57
+ readonly required: readonly ["facetId"];
58
+ readonly properties: {
59
+ readonly facetId: {
60
+ readonly $ref: "#/$defs/Ulid";
61
+ };
62
+ readonly expectedVersion: {
63
+ readonly $ref: "#/$defs/ExpectedVersion";
64
+ readonly description: "Optional precondition. Supply the version a prior read returned to refuse a delete against a facet that has changed since it was looked at.";
65
+ };
66
+ readonly ext: {
67
+ readonly $ref: "#/$defs/Ext";
68
+ };
69
+ };
70
+ readonly $defs: {
71
+ readonly Response: {
72
+ readonly $anchor: "response";
73
+ readonly title: "Persona Facet Delete — response payload";
74
+ readonly description: "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.";
75
+ readonly type: "object";
76
+ readonly additionalProperties: false;
77
+ readonly required: readonly ["existed"];
78
+ readonly properties: {
79
+ readonly existed: {
80
+ readonly type: "boolean";
81
+ readonly description: "False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first.";
82
+ };
83
+ readonly releasedFaces: {
84
+ readonly type: "integer";
85
+ readonly minimum: 0;
86
+ readonly description: "How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'.";
87
+ };
88
+ readonly ext: {
89
+ readonly $ref: "#/$defs/Ext";
90
+ };
91
+ };
92
+ };
93
+ readonly Ext: {
94
+ readonly title: "Ext";
95
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
96
+ readonly type: "object";
97
+ readonly minProperties: 1;
98
+ readonly additionalProperties: true;
99
+ readonly propertyNames: {
100
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
101
+ };
102
+ };
103
+ readonly ExpectedVersion: {
104
+ readonly title: "ExpectedVersion";
105
+ readonly 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.";
106
+ readonly type: "integer";
107
+ readonly minimum: 0;
108
+ };
109
+ readonly Ulid: {
110
+ readonly title: "Ulid";
111
+ readonly description: "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.";
112
+ readonly type: "string";
113
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
114
+ };
115
+ };
116
+ };
117
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
118
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
119
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
120
+ readonly $ref: "#/$defs/Response";
121
+ readonly $defs: {
122
+ readonly Response: {
123
+ readonly $anchor: "response";
124
+ readonly title: "Persona Facet Delete — response payload";
125
+ readonly description: "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.";
126
+ readonly type: "object";
127
+ readonly additionalProperties: false;
128
+ readonly required: readonly ["existed"];
129
+ readonly properties: {
130
+ readonly existed: {
131
+ readonly type: "boolean";
132
+ readonly description: "False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first.";
133
+ };
134
+ readonly releasedFaces: {
135
+ readonly type: "integer";
136
+ readonly minimum: 0;
137
+ readonly description: "How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'.";
138
+ };
139
+ readonly ext: {
140
+ readonly $ref: "#/$defs/Ext";
141
+ };
142
+ };
143
+ };
144
+ readonly Ext: {
145
+ readonly title: "Ext";
146
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
147
+ readonly type: "object";
148
+ readonly minProperties: 1;
149
+ readonly additionalProperties: true;
150
+ readonly propertyNames: {
151
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
152
+ };
153
+ };
154
+ readonly ExpectedVersion: {
155
+ readonly title: "ExpectedVersion";
156
+ readonly 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.";
157
+ readonly type: "integer";
158
+ readonly minimum: 0;
159
+ };
160
+ readonly Ulid: {
161
+ readonly title: "Ulid";
162
+ readonly description: "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.";
163
+ readonly type: "string";
164
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
165
+ };
166
+ };
167
+ };
168
+ /**
169
+ * SPEC.md §7.2 policy for the request variant, from this specification's
170
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
171
+ * per-specification and cannot be derived from the document alone, and
172
+ * item 2 needs the schema this carries.
173
+ */
174
+ export declare const SPEC: {
175
+ readonly typeUri: "https://trusttasks.org/spec/persona/facet/delete/1.0";
176
+ readonly isBearer: false;
177
+ readonly isProofRequired: true;
178
+ readonly isRecipientRequired: true;
179
+ readonly isIssuedAtRequired: true;
180
+ readonly payloadSchema: {
181
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
182
+ readonly $id: "https://trusttasks.org/spec/persona/facet/delete/1.0";
183
+ readonly title: "Persona — Facet Delete — payload";
184
+ readonly description: "Delete one facet. The faces and attributes that belonged to it are untouched — a facet is a way of arranging what the holder keeps, never a container for it.";
185
+ readonly type: "object";
186
+ readonly additionalProperties: false;
187
+ readonly required: readonly ["facetId"];
188
+ readonly properties: {
189
+ readonly facetId: {
190
+ readonly $ref: "#/$defs/Ulid";
191
+ };
192
+ readonly expectedVersion: {
193
+ readonly $ref: "#/$defs/ExpectedVersion";
194
+ readonly description: "Optional precondition. Supply the version a prior read returned to refuse a delete against a facet that has changed since it was looked at.";
195
+ };
196
+ readonly ext: {
197
+ readonly $ref: "#/$defs/Ext";
198
+ };
199
+ };
200
+ readonly $defs: {
201
+ readonly Response: {
202
+ readonly $anchor: "response";
203
+ readonly title: "Persona Facet Delete — response payload";
204
+ readonly description: "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.";
205
+ readonly type: "object";
206
+ readonly additionalProperties: false;
207
+ readonly required: readonly ["existed"];
208
+ readonly properties: {
209
+ readonly existed: {
210
+ readonly type: "boolean";
211
+ readonly description: "False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first.";
212
+ };
213
+ readonly releasedFaces: {
214
+ readonly type: "integer";
215
+ readonly minimum: 0;
216
+ readonly description: "How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'.";
217
+ };
218
+ readonly ext: {
219
+ readonly $ref: "#/$defs/Ext";
220
+ };
221
+ };
222
+ };
223
+ readonly Ext: {
224
+ readonly title: "Ext";
225
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
226
+ readonly type: "object";
227
+ readonly minProperties: 1;
228
+ readonly additionalProperties: true;
229
+ readonly propertyNames: {
230
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
231
+ };
232
+ };
233
+ readonly ExpectedVersion: {
234
+ readonly title: "ExpectedVersion";
235
+ readonly 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.";
236
+ readonly type: "integer";
237
+ readonly minimum: 0;
238
+ };
239
+ readonly Ulid: {
240
+ readonly title: "Ulid";
241
+ readonly description: "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.";
242
+ readonly type: "string";
243
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
244
+ };
245
+ };
246
+ };
247
+ };
248
+ /**
249
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
250
+ * tracks the *issuer* party's requirement because a response swaps the
251
+ * parties (§7.3 item 5).
252
+ */
253
+ export declare const RESPONSE_SPEC: {
254
+ readonly typeUri: "https://trusttasks.org/spec/persona/facet/delete/1.0#response";
255
+ readonly isBearer: false;
256
+ readonly isProofRequired: true;
257
+ readonly isRecipientRequired: true;
258
+ readonly isIssuedAtRequired: true;
259
+ readonly payloadSchema: {
260
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
261
+ readonly $ref: "#/$defs/Response";
262
+ readonly $defs: {
263
+ readonly Response: {
264
+ readonly $anchor: "response";
265
+ readonly title: "Persona Facet Delete — response payload";
266
+ readonly description: "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.";
267
+ readonly type: "object";
268
+ readonly additionalProperties: false;
269
+ readonly required: readonly ["existed"];
270
+ readonly properties: {
271
+ readonly existed: {
272
+ readonly type: "boolean";
273
+ readonly description: "False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first.";
274
+ };
275
+ readonly releasedFaces: {
276
+ readonly type: "integer";
277
+ readonly minimum: 0;
278
+ readonly description: "How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'.";
279
+ };
280
+ readonly ext: {
281
+ readonly $ref: "#/$defs/Ext";
282
+ };
283
+ };
284
+ };
285
+ readonly Ext: {
286
+ readonly title: "Ext";
287
+ readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
288
+ readonly type: "object";
289
+ readonly minProperties: 1;
290
+ readonly additionalProperties: true;
291
+ readonly propertyNames: {
292
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
293
+ };
294
+ };
295
+ readonly ExpectedVersion: {
296
+ readonly title: "ExpectedVersion";
297
+ readonly 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.";
298
+ readonly type: "integer";
299
+ readonly minimum: 0;
300
+ };
301
+ readonly Ulid: {
302
+ readonly title: "Ulid";
303
+ readonly description: "A ULID in Crockford base32, uppercase. Used for `attributeId` and `profileId`. Chosen over a UUID because the leading 48 bits are a timestamp, so a key-ordered scan of the store is also creation-ordered and a `list` needs no secondary sort. Server-assigned on create; a producer MAY supply one to make a create idempotent, and a maintainer MUST reject a supplied value that already exists rather than silently overwriting.";
304
+ readonly type: "string";
305
+ readonly pattern: "^[0-9A-HJKMNP-TV-Z]{26}$";
306
+ };
307
+ };
308
+ };
309
+ };
310
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/persona/facet/delete/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,2BAA2B,IAAI,eAAe,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAC;AAGnH;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,IAAI,CAAC;IACd;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,eAAe,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAE3C,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,sDAA+D,CAAC;AAExF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,yBAAyB,CAAC;AAEhD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,+DAAwE,CAAC;AAE1G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAEzD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,169 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/persona/facet/delete/1.0/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/persona/facet/delete/1.0";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/persona/facet/delete/1.0#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/persona/facet/delete/1.0",
21
+ "title": "Persona — Facet Delete — payload",
22
+ "description": "Delete one facet. The faces and attributes that belonged to it are untouched — a facet is a way of arranging what the holder keeps, never a container for it.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "facetId"
27
+ ],
28
+ "properties": {
29
+ "facetId": {
30
+ "$ref": "#/$defs/Ulid"
31
+ },
32
+ "expectedVersion": {
33
+ "$ref": "#/$defs/ExpectedVersion",
34
+ "description": "Optional precondition. Supply the version a prior read returned to refuse a delete against a facet that has changed since it was looked at."
35
+ },
36
+ "ext": {
37
+ "$ref": "#/$defs/Ext"
38
+ }
39
+ },
40
+ "$defs": {
41
+ "Response": {
42
+ "$anchor": "response",
43
+ "title": "Persona Facet Delete — response payload",
44
+ "description": "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.",
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": [
48
+ "existed"
49
+ ],
50
+ "properties": {
51
+ "existed": {
52
+ "type": "boolean",
53
+ "description": "False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first."
54
+ },
55
+ "releasedFaces": {
56
+ "type": "integer",
57
+ "minimum": 0,
58
+ "description": "How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'."
59
+ },
60
+ "ext": {
61
+ "$ref": "#/$defs/Ext"
62
+ }
63
+ }
64
+ },
65
+ "Ext": {
66
+ "title": "Ext",
67
+ "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.",
68
+ "type": "object",
69
+ "minProperties": 1,
70
+ "additionalProperties": true,
71
+ "propertyNames": {
72
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
73
+ }
74
+ },
75
+ "ExpectedVersion": {
76
+ "title": "ExpectedVersion",
77
+ "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.",
78
+ "type": "integer",
79
+ "minimum": 0
80
+ },
81
+ "Ulid": {
82
+ "title": "Ulid",
83
+ "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.",
84
+ "type": "string",
85
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
86
+ }
87
+ }
88
+ };
89
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
90
+ export const RESPONSE_PAYLOAD_SCHEMA = {
91
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
92
+ "$ref": "#/$defs/Response",
93
+ "$defs": {
94
+ "Response": {
95
+ "$anchor": "response",
96
+ "title": "Persona Facet Delete — response payload",
97
+ "description": "Success response to persona/facet/delete. Type https://trusttasks.org/spec/persona/facet/delete/1.0#response.",
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "existed"
102
+ ],
103
+ "properties": {
104
+ "existed": {
105
+ "type": "boolean",
106
+ "description": "False when there was nothing to delete. A successful no-op rather than an error: a producer retrying after a lost response must be able to reach the state it wanted without having to tell a second delete apart from a first."
107
+ },
108
+ "releasedFaces": {
109
+ "type": "integer",
110
+ "minimum": 0,
111
+ "description": "How many profiles no longer belong to any facet as a result. Nothing was deleted and nothing changed about them — this is the count a consumer needs to say what the screen will look like afterwards, which is the honest end of a sentence that would otherwise read only 'deleted'."
112
+ },
113
+ "ext": {
114
+ "$ref": "#/$defs/Ext"
115
+ }
116
+ }
117
+ },
118
+ "Ext": {
119
+ "title": "Ext",
120
+ "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.",
121
+ "type": "object",
122
+ "minProperties": 1,
123
+ "additionalProperties": true,
124
+ "propertyNames": {
125
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
126
+ }
127
+ },
128
+ "ExpectedVersion": {
129
+ "title": "ExpectedVersion",
130
+ "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.",
131
+ "type": "integer",
132
+ "minimum": 0
133
+ },
134
+ "Ulid": {
135
+ "title": "Ulid",
136
+ "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.",
137
+ "type": "string",
138
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
139
+ }
140
+ }
141
+ };
142
+ /**
143
+ * SPEC.md §7.2 policy for the request variant, from this specification's
144
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
145
+ * per-specification and cannot be derived from the document alone, and
146
+ * item 2 needs the schema this carries.
147
+ */
148
+ export const SPEC = {
149
+ typeUri: TYPE_URI,
150
+ isBearer: false,
151
+ isProofRequired: true,
152
+ isRecipientRequired: true,
153
+ isIssuedAtRequired: true,
154
+ payloadSchema: PAYLOAD_SCHEMA,
155
+ };
156
+ /**
157
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
158
+ * tracks the *issuer* party's requirement because a response swaps the
159
+ * parties (§7.3 item 5).
160
+ */
161
+ export const RESPONSE_SPEC = {
162
+ typeUri: RESPONSE_TYPE_URI,
163
+ isBearer: false,
164
+ isProofRequired: true,
165
+ isRecipientRequired: true,
166
+ isIssuedAtRequired: true,
167
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
168
+ };
169
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/persona/facet/delete/1.0/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,sDAA+D,CAAC;AAKxF,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,+DAAwE,CAAC;AAK1G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,sDAAsD;IAC7D,OAAO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