@openvtc/trust-tasks 0.27.6 → 0.27.7

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.
Files changed (97) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +16 -13
  3. package/dist/_runtime/consume.d.ts +2 -2
  4. package/dist/_runtime/consume.js +2 -2
  5. package/dist/_shared/components.d.ts +29 -0
  6. package/dist/_shared/components.d.ts.map +1 -1
  7. package/dist/index.d.ts +7 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +7 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/registry/_shared/0.2/registry.d.ts +16 -0
  12. package/dist/registry/_shared/0.2/registry.d.ts.map +1 -0
  13. package/dist/registry/_shared/0.2/registry.js +6 -0
  14. package/dist/registry/_shared/0.2/registry.js.map +1 -0
  15. package/dist/registry/authorization/0.1/payload.d.ts +13 -2
  16. package/dist/registry/authorization/0.1/payload.d.ts.map +1 -1
  17. package/dist/registry/authorization/0.1/payload.js +1 -1
  18. package/dist/registry/authorization/0.1/payload.js.map +1 -1
  19. package/dist/registry/authorization/0.2/payload.d.ts +494 -0
  20. package/dist/registry/authorization/0.2/payload.d.ts.map +1 -0
  21. package/dist/registry/authorization/0.2/payload.js +270 -0
  22. package/dist/registry/authorization/0.2/payload.js.map +1 -0
  23. package/dist/registry/did/rotate/0.1/payload.d.ts +13 -2
  24. package/dist/registry/did/rotate/0.1/payload.d.ts.map +1 -1
  25. package/dist/registry/did/rotate/0.1/payload.js +1 -1
  26. package/dist/registry/did/rotate/0.1/payload.js.map +1 -1
  27. package/dist/registry/did/rotate/0.2/payload.d.ts +292 -0
  28. package/dist/registry/did/rotate/0.2/payload.d.ts.map +1 -0
  29. package/dist/registry/did/rotate/0.2/payload.js +167 -0
  30. package/dist/registry/did/rotate/0.2/payload.js.map +1 -0
  31. package/dist/registry/recognition/0.1/payload.d.ts +13 -2
  32. package/dist/registry/recognition/0.1/payload.d.ts.map +1 -1
  33. package/dist/registry/recognition/0.1/payload.js +1 -1
  34. package/dist/registry/recognition/0.1/payload.js.map +1 -1
  35. package/dist/registry/recognition/0.2/payload.d.ts +494 -0
  36. package/dist/registry/recognition/0.2/payload.d.ts.map +1 -0
  37. package/dist/registry/recognition/0.2/payload.js +270 -0
  38. package/dist/registry/recognition/0.2/payload.js.map +1 -0
  39. package/dist/registry/record/create/0.1/payload.d.ts +4 -4
  40. package/dist/registry/record/create/0.1/payload.js +1 -1
  41. package/dist/registry/record/delete/0.1/payload.d.ts +13 -2
  42. package/dist/registry/record/delete/0.1/payload.d.ts.map +1 -1
  43. package/dist/registry/record/delete/0.1/payload.js +1 -1
  44. package/dist/registry/record/delete/0.1/payload.js.map +1 -1
  45. package/dist/registry/record/delete/0.2/payload.d.ts +278 -0
  46. package/dist/registry/record/delete/0.2/payload.d.ts.map +1 -0
  47. package/dist/registry/record/delete/0.2/payload.js +165 -0
  48. package/dist/registry/record/delete/0.2/payload.js.map +1 -0
  49. package/dist/registry/record/list/0.1/payload.d.ts +4 -4
  50. package/dist/registry/record/list/0.1/payload.js +1 -1
  51. package/dist/registry/record/put/0.1/payload.d.ts +4 -4
  52. package/dist/registry/record/put/0.1/payload.js +1 -1
  53. package/dist/registry/record/put/0.2/payload.d.ts +13 -2
  54. package/dist/registry/record/put/0.2/payload.d.ts.map +1 -1
  55. package/dist/registry/record/put/0.2/payload.js +1 -1
  56. package/dist/registry/record/put/0.2/payload.js.map +1 -1
  57. package/dist/registry/record/put/0.3/payload.d.ts +497 -0
  58. package/dist/registry/record/put/0.3/payload.d.ts.map +1 -0
  59. package/dist/registry/record/put/0.3/payload.js +289 -0
  60. package/dist/registry/record/put/0.3/payload.js.map +1 -0
  61. package/dist/registry/record/query/0.1/payload.d.ts +4 -4
  62. package/dist/registry/record/query/0.1/payload.js +1 -1
  63. package/dist/registry/record/query/0.2/payload.d.ts +13 -2
  64. package/dist/registry/record/query/0.2/payload.d.ts.map +1 -1
  65. package/dist/registry/record/query/0.2/payload.js +1 -1
  66. package/dist/registry/record/query/0.2/payload.js.map +1 -1
  67. package/dist/registry/record/query/0.3/payload.d.ts +540 -0
  68. package/dist/registry/record/query/0.3/payload.d.ts.map +1 -0
  69. package/dist/registry/record/query/0.3/payload.js +299 -0
  70. package/dist/registry/record/query/0.3/payload.js.map +1 -0
  71. package/dist/registry/record/read/0.1/payload.d.ts +4 -4
  72. package/dist/registry/record/read/0.1/payload.js +1 -1
  73. package/dist/registry/record/update/0.1/payload.d.ts +4 -4
  74. package/dist/registry/record/update/0.1/payload.js +1 -1
  75. package/package.json +1 -1
  76. package/src/_runtime/consume.ts +2 -2
  77. package/src/_shared/components.ts +29 -0
  78. package/src/index.ts +7 -0
  79. package/src/registry/_shared/0.2/registry.ts +17 -0
  80. package/src/registry/authorization/0.1/payload.ts +14 -3
  81. package/src/registry/authorization/0.2/payload.ts +337 -0
  82. package/src/registry/did/rotate/0.1/payload.ts +14 -3
  83. package/src/registry/did/rotate/0.2/payload.ts +216 -0
  84. package/src/registry/recognition/0.1/payload.ts +14 -3
  85. package/src/registry/recognition/0.2/payload.ts +337 -0
  86. package/src/registry/record/create/0.1/payload.ts +5 -5
  87. package/src/registry/record/delete/0.1/payload.ts +14 -3
  88. package/src/registry/record/delete/0.2/payload.ts +206 -0
  89. package/src/registry/record/list/0.1/payload.ts +5 -5
  90. package/src/registry/record/put/0.1/payload.ts +5 -5
  91. package/src/registry/record/put/0.2/payload.ts +14 -3
  92. package/src/registry/record/put/0.3/payload.ts +335 -0
  93. package/src/registry/record/query/0.1/payload.ts +5 -5
  94. package/src/registry/record/query/0.2/payload.ts +14 -3
  95. package/src/registry/record/query/0.3/payload.ts +360 -0
  96. package/src/registry/record/read/0.1/payload.ts +5 -5
  97. package/src/registry/record/update/0.1/payload.ts +5 -5
@@ -0,0 +1,337 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/registry/recognition/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Ext, QueryContext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * TRQP v2.0 recognition query: ask a trust registry whether an entity is recognised by an authority for a given action+resource, evaluated as of `context.time` (or the registry's current time) against the matching record's validity window. Members are lowerCamelCase per the registry naming convention; a registry serving the plain HTTP TRQP binding maps them to TRQP's snake_case field names (`entityId` ↔ `entity_id`, `evaluatedAt` ↔ `time_evaluated`, and so on) at that binding.
11
+ */
12
+ export interface RegistryRecognitionPayload {
13
+ /**
14
+ * Identifier of the entity being tested for recognition.
15
+ */
16
+ entityId: string;
17
+ /**
18
+ * Identifier of the authority being queried to recognise the entity.
19
+ */
20
+ authorityId: string;
21
+ /**
22
+ * The action the query is checking recognition for.
23
+ */
24
+ action: string;
25
+ /**
26
+ * The resource the query is checking recognition for.
27
+ */
28
+ resource: string;
29
+ context?: QueryContext;
30
+ ext?: Ext;
31
+ }
32
+ export interface RegistryRecognitionResponsePayload {
33
+ entityId: string;
34
+ authorityId: string;
35
+ action: string;
36
+ resource: string;
37
+ /**
38
+ * True if the action+resource has been recognised, false otherwise.
39
+ */
40
+ recognized: boolean;
41
+ /**
42
+ * Server time the query was evaluated at, per the endpoint clock.
43
+ */
44
+ evaluatedAt: string;
45
+ /**
46
+ * The requested server time, echoed from the request `context.time` when supplied.
47
+ */
48
+ asOf?: string;
49
+ /**
50
+ * Additional human-readable detail about the recognition response.
51
+ */
52
+ message?: string;
53
+ context?: QueryContext;
54
+ ext?: Ext;
55
+ }
56
+
57
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
58
+ export type { Ext, QueryContext };
59
+
60
+ /** Trust Task type URI. */
61
+ export const TYPE_URI = "https://trusttasks.org/spec/registry/recognition/0.2" as const;
62
+
63
+ /**
64
+ * The earlier version of this specification that this one declares it
65
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
66
+ * `null`. Only the direct declaration — follow the chain with
67
+ * `extendsChain` / `readForSpec`.
68
+ */
69
+ export const EXTENDS: string | null = null;
70
+
71
+ /**
72
+ * Why this version is deprecated, or `null` while it is current. A
73
+ * superseded or retired version is still supported, and is withdrawn from
74
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
75
+ * Versions").
76
+ */
77
+ export const DEPRECATION: string | null = null;
78
+
79
+ /** Stable alias for this specification's request payload shape. */
80
+ export type Payload = RegistryRecognitionPayload;
81
+
82
+ /** Trust Task response type URI (request type URI + "#response"). */
83
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/recognition/0.2#response" as const;
84
+
85
+ /** Stable alias for this specification's success-response payload shape. */
86
+ export type Response = RegistryRecognitionResponsePayload;
87
+
88
+ /**
89
+ * This specification's payload schema, as a value.
90
+ *
91
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
92
+ * rather than only as a `.json` file because TypeScript types are erased
93
+ * at runtime: without a schema a consumer has nothing to validate, and
94
+ * every REQUIRED payload member is optional in practice. Cross-file
95
+ * `$ref`s are already inlined, so it needs no resolver.
96
+ */
97
+ export const PAYLOAD_SCHEMA = {
98
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
99
+ "$id": "https://trusttasks.org/spec/registry/recognition/0.2",
100
+ "title": "Registry Recognition — payload",
101
+ "description": "TRQP v2.0 recognition query: ask a trust registry whether an entity is recognised by an authority for a given action+resource, evaluated as of `context.time` (or the registry's current time) against the matching record's validity window. Members are lowerCamelCase per the registry naming convention; a registry serving the plain HTTP TRQP binding maps them to TRQP's snake_case field names (`entityId` ↔ `entity_id`, `evaluatedAt` ↔ `time_evaluated`, and so on) at that binding.",
102
+ "type": "object",
103
+ "additionalProperties": false,
104
+ "required": [
105
+ "entityId",
106
+ "authorityId",
107
+ "action",
108
+ "resource"
109
+ ],
110
+ "properties": {
111
+ "entityId": {
112
+ "type": "string",
113
+ "description": "Identifier of the entity being tested for recognition."
114
+ },
115
+ "authorityId": {
116
+ "type": "string",
117
+ "description": "Identifier of the authority being queried to recognise the entity."
118
+ },
119
+ "action": {
120
+ "type": "string",
121
+ "description": "The action the query is checking recognition for."
122
+ },
123
+ "resource": {
124
+ "type": "string",
125
+ "description": "The resource the query is checking recognition for."
126
+ },
127
+ "context": {
128
+ "$ref": "#/$defs/QueryContext"
129
+ },
130
+ "ext": {
131
+ "$ref": "#/$defs/Ext"
132
+ }
133
+ },
134
+ "$defs": {
135
+ "Response": {
136
+ "$anchor": "response",
137
+ "title": "Registry Recognition — response payload",
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "entityId",
142
+ "authorityId",
143
+ "action",
144
+ "resource",
145
+ "recognized",
146
+ "evaluatedAt"
147
+ ],
148
+ "properties": {
149
+ "entityId": {
150
+ "type": "string"
151
+ },
152
+ "authorityId": {
153
+ "type": "string"
154
+ },
155
+ "action": {
156
+ "type": "string"
157
+ },
158
+ "resource": {
159
+ "type": "string"
160
+ },
161
+ "recognized": {
162
+ "type": "boolean",
163
+ "description": "True if the action+resource has been recognised, false otherwise."
164
+ },
165
+ "evaluatedAt": {
166
+ "type": "string",
167
+ "format": "date-time",
168
+ "description": "Server time the query was evaluated at, per the endpoint clock."
169
+ },
170
+ "asOf": {
171
+ "type": "string",
172
+ "format": "date-time",
173
+ "description": "The requested server time, echoed from the request `context.time` when supplied."
174
+ },
175
+ "message": {
176
+ "type": "string",
177
+ "maxLength": 1024,
178
+ "description": "Additional human-readable detail about the recognition response."
179
+ },
180
+ "context": {
181
+ "$ref": "#/$defs/QueryContext"
182
+ },
183
+ "ext": {
184
+ "$ref": "#/$defs/Ext"
185
+ }
186
+ }
187
+ },
188
+ "Ext": {
189
+ "title": "Ext",
190
+ "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.",
191
+ "type": "object",
192
+ "minProperties": 1,
193
+ "additionalProperties": true,
194
+ "propertyNames": {
195
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
196
+ }
197
+ },
198
+ "QueryContext": {
199
+ "title": "QueryContext",
200
+ "type": "object",
201
+ "description": "Optional TRQP query context. `time` requests evaluation as of a given instant; `locator` is an authority-defined hint for locating records.",
202
+ "properties": {
203
+ "time": {
204
+ "type": "string",
205
+ "format": "date-time",
206
+ "description": "Evaluate the query as of this RFC3339 (Z offset) instant. Blank/absent uses current server time."
207
+ },
208
+ "locator": {
209
+ "type": "string",
210
+ "description": "Optional hint for systems that need extra information to locate the records in question (authorization queries)."
211
+ }
212
+ },
213
+ "additionalProperties": {
214
+ "type": "string"
215
+ }
216
+ }
217
+ }
218
+ } as const;
219
+
220
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
221
+ export const RESPONSE_PAYLOAD_SCHEMA = {
222
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
223
+ "$ref": "#/$defs/Response",
224
+ "$defs": {
225
+ "Response": {
226
+ "$anchor": "response",
227
+ "title": "Registry Recognition — response payload",
228
+ "type": "object",
229
+ "additionalProperties": false,
230
+ "required": [
231
+ "entityId",
232
+ "authorityId",
233
+ "action",
234
+ "resource",
235
+ "recognized",
236
+ "evaluatedAt"
237
+ ],
238
+ "properties": {
239
+ "entityId": {
240
+ "type": "string"
241
+ },
242
+ "authorityId": {
243
+ "type": "string"
244
+ },
245
+ "action": {
246
+ "type": "string"
247
+ },
248
+ "resource": {
249
+ "type": "string"
250
+ },
251
+ "recognized": {
252
+ "type": "boolean",
253
+ "description": "True if the action+resource has been recognised, false otherwise."
254
+ },
255
+ "evaluatedAt": {
256
+ "type": "string",
257
+ "format": "date-time",
258
+ "description": "Server time the query was evaluated at, per the endpoint clock."
259
+ },
260
+ "asOf": {
261
+ "type": "string",
262
+ "format": "date-time",
263
+ "description": "The requested server time, echoed from the request `context.time` when supplied."
264
+ },
265
+ "message": {
266
+ "type": "string",
267
+ "maxLength": 1024,
268
+ "description": "Additional human-readable detail about the recognition response."
269
+ },
270
+ "context": {
271
+ "$ref": "#/$defs/QueryContext"
272
+ },
273
+ "ext": {
274
+ "$ref": "#/$defs/Ext"
275
+ }
276
+ }
277
+ },
278
+ "Ext": {
279
+ "title": "Ext",
280
+ "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.",
281
+ "type": "object",
282
+ "minProperties": 1,
283
+ "additionalProperties": true,
284
+ "propertyNames": {
285
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
286
+ }
287
+ },
288
+ "QueryContext": {
289
+ "title": "QueryContext",
290
+ "type": "object",
291
+ "description": "Optional TRQP query context. `time` requests evaluation as of a given instant; `locator` is an authority-defined hint for locating records.",
292
+ "properties": {
293
+ "time": {
294
+ "type": "string",
295
+ "format": "date-time",
296
+ "description": "Evaluate the query as of this RFC3339 (Z offset) instant. Blank/absent uses current server time."
297
+ },
298
+ "locator": {
299
+ "type": "string",
300
+ "description": "Optional hint for systems that need extra information to locate the records in question (authorization queries)."
301
+ }
302
+ },
303
+ "additionalProperties": {
304
+ "type": "string"
305
+ }
306
+ }
307
+ }
308
+ } as const;
309
+
310
+ /**
311
+ * SPEC.md §7.2 policy for the request variant, from this specification's
312
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
313
+ * per-specification and cannot be derived from the document alone, and
314
+ * item 2 needs the schema this carries.
315
+ */
316
+ export const SPEC = {
317
+ typeUri: TYPE_URI,
318
+ isBearer: false,
319
+ isProofRequired: false,
320
+ isRecipientRequired: true,
321
+ isIssuedAtRequired: false,
322
+ payloadSchema: PAYLOAD_SCHEMA,
323
+ } as const;
324
+
325
+ /**
326
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
327
+ * tracks the *issuer* party's requirement because a response swaps the
328
+ * parties (§7.3 item 5).
329
+ */
330
+ export const RESPONSE_SPEC = {
331
+ typeUri: RESPONSE_TYPE_URI,
332
+ isBearer: false,
333
+ isProofRequired: false,
334
+ isRecipientRequired: true,
335
+ isIssuedAtRequired: false,
336
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
337
+ } as const;
@@ -9,13 +9,13 @@ import type { Ext, RecordType, TrustRecord } from "../../../../_shared/component
9
9
  /**
10
10
  * An administrator asks a trust registry to create a new trust record (a recognition or authorization assertion). Idempotent per record key (entity+authority+action+resource); creating an existing key is an error.
11
11
  *
12
- * @deprecated retired; use registry/record/put/0.2
12
+ * @deprecated retired; use registry/record/put/0.3
13
13
  */
14
14
  export interface RegistryRecordCreatePayload {
15
15
  record: TrustRecord;
16
16
  ext?: Ext;
17
17
  }
18
- /** @deprecated retired; use registry/record/put/0.2 */
18
+ /** @deprecated retired; use registry/record/put/0.3 */
19
19
  export interface RegistryRecordCreateResponsePayload {
20
20
  /**
21
21
  * Whether the record was created.
@@ -48,12 +48,12 @@ export const EXTENDS: string | null = null;
48
48
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
49
49
  * Versions").
50
50
  */
51
- export const DEPRECATION: string | null = "retired; use registry/record/put/0.2";
51
+ export const DEPRECATION: string | null = "retired; use registry/record/put/0.3";
52
52
 
53
53
  /**
54
54
  * Stable alias for this specification's request payload shape.
55
55
  *
56
- * @deprecated retired; use registry/record/put/0.2
56
+ * @deprecated retired; use registry/record/put/0.3
57
57
  */
58
58
  export type Payload = RegistryRecordCreatePayload;
59
59
 
@@ -63,7 +63,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/record/cr
63
63
  /**
64
64
  * Stable alias for this specification's success-response payload shape.
65
65
  *
66
- * @deprecated retired; use registry/record/put/0.2
66
+ * @deprecated retired; use registry/record/put/0.3
67
67
  */
68
68
  export type Response = RegistryRecordCreateResponsePayload;
69
69
 
@@ -8,6 +8,8 @@ import type { Ext } from "../../../../_shared/components.js";
8
8
 
9
9
  /**
10
10
  * An administrator asks a trust registry to delete the trust record identified by the four TRQP identifiers.
11
+ *
12
+ * @deprecated superseded by registry/record/delete/0.2
11
13
  */
12
14
  export interface RegistryRecordDeletePayload {
13
15
  entity_id: string;
@@ -16,6 +18,7 @@ export interface RegistryRecordDeletePayload {
16
18
  resource: string;
17
19
  ext?: Ext;
18
20
  }
21
+ /** @deprecated superseded by registry/record/delete/0.2 */
19
22
  export interface RegistryRecordDeleteResponsePayload {
20
23
  /**
21
24
  * Whether the record was deleted.
@@ -48,15 +51,23 @@ export const EXTENDS: string | null = null;
48
51
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
49
52
  * Versions").
50
53
  */
51
- export const DEPRECATION: string | null = null;
54
+ export const DEPRECATION: string | null = "superseded by registry/record/delete/0.2";
52
55
 
53
- /** Stable alias for this specification's request payload shape. */
56
+ /**
57
+ * Stable alias for this specification's request payload shape.
58
+ *
59
+ * @deprecated superseded by registry/record/delete/0.2
60
+ */
54
61
  export type Payload = RegistryRecordDeletePayload;
55
62
 
56
63
  /** Trust Task response type URI (request type URI + "#response"). */
57
64
  export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/record/delete/0.1#response" as const;
58
65
 
59
- /** Stable alias for this specification's success-response payload shape. */
66
+ /**
67
+ * Stable alias for this specification's success-response payload shape.
68
+ *
69
+ * @deprecated superseded by registry/record/delete/0.2
70
+ */
60
71
  export type Response = RegistryRecordDeleteResponsePayload;
61
72
 
62
73
  /**
@@ -0,0 +1,206 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/registry/record/delete/0.2/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An administrator asks a trust registry to delete the trust record identified by the four TRQP identifiers.
11
+ */
12
+ export interface RegistryRecordDeletePayload {
13
+ entityId: string;
14
+ authorityId: string;
15
+ action: string;
16
+ resource: string;
17
+ ext?: Ext;
18
+ }
19
+ export interface RegistryRecordDeleteResponsePayload {
20
+ /**
21
+ * Whether the record was deleted.
22
+ */
23
+ ok: boolean;
24
+ /**
25
+ * Optional human-readable detail.
26
+ */
27
+ message?: string;
28
+ ext?: Ext;
29
+ }
30
+
31
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
32
+ export type { Ext };
33
+
34
+ /** Trust Task type URI. */
35
+ export const TYPE_URI = "https://trusttasks.org/spec/registry/record/delete/0.2" as const;
36
+
37
+ /**
38
+ * The earlier version of this specification that this one declares it
39
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
40
+ * `null`. Only the direct declaration — follow the chain with
41
+ * `extendsChain` / `readForSpec`.
42
+ */
43
+ export const EXTENDS: string | null = null;
44
+
45
+ /**
46
+ * Why this version is deprecated, or `null` while it is current. A
47
+ * superseded or retired version is still supported, and is withdrawn from
48
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
49
+ * Versions").
50
+ */
51
+ export const DEPRECATION: string | null = null;
52
+
53
+ /** Stable alias for this specification's request payload shape. */
54
+ export type Payload = RegistryRecordDeletePayload;
55
+
56
+ /** Trust Task response type URI (request type URI + "#response"). */
57
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/record/delete/0.2#response" as const;
58
+
59
+ /** Stable alias for this specification's success-response payload shape. */
60
+ export type Response = RegistryRecordDeleteResponsePayload;
61
+
62
+ /**
63
+ * This specification's payload schema, as a value.
64
+ *
65
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
66
+ * rather than only as a `.json` file because TypeScript types are erased
67
+ * at runtime: without a schema a consumer has nothing to validate, and
68
+ * every REQUIRED payload member is optional in practice. Cross-file
69
+ * `$ref`s are already inlined, so it needs no resolver.
70
+ */
71
+ export const PAYLOAD_SCHEMA = {
72
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
73
+ "$id": "https://trusttasks.org/spec/registry/record/delete/0.2",
74
+ "title": "Registry Record Delete — payload",
75
+ "description": "An administrator asks a trust registry to delete the trust record identified by the four TRQP identifiers.",
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": [
79
+ "entityId",
80
+ "authorityId",
81
+ "action",
82
+ "resource"
83
+ ],
84
+ "properties": {
85
+ "entityId": {
86
+ "type": "string"
87
+ },
88
+ "authorityId": {
89
+ "type": "string"
90
+ },
91
+ "action": {
92
+ "type": "string"
93
+ },
94
+ "resource": {
95
+ "type": "string"
96
+ },
97
+ "ext": {
98
+ "$ref": "#/$defs/Ext"
99
+ }
100
+ },
101
+ "$defs": {
102
+ "Response": {
103
+ "$anchor": "response",
104
+ "title": "Registry Record Delete — response payload",
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": [
108
+ "ok"
109
+ ],
110
+ "properties": {
111
+ "ok": {
112
+ "type": "boolean",
113
+ "description": "Whether the record was deleted."
114
+ },
115
+ "message": {
116
+ "type": "string",
117
+ "maxLength": 1024,
118
+ "description": "Optional human-readable detail."
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
+ }
136
+ } as const;
137
+
138
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
139
+ export const RESPONSE_PAYLOAD_SCHEMA = {
140
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
141
+ "$ref": "#/$defs/Response",
142
+ "$defs": {
143
+ "Response": {
144
+ "$anchor": "response",
145
+ "title": "Registry Record Delete — response payload",
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": [
149
+ "ok"
150
+ ],
151
+ "properties": {
152
+ "ok": {
153
+ "type": "boolean",
154
+ "description": "Whether the record was deleted."
155
+ },
156
+ "message": {
157
+ "type": "string",
158
+ "maxLength": 1024,
159
+ "description": "Optional human-readable detail."
160
+ },
161
+ "ext": {
162
+ "$ref": "#/$defs/Ext"
163
+ }
164
+ }
165
+ },
166
+ "Ext": {
167
+ "title": "Ext",
168
+ "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.",
169
+ "type": "object",
170
+ "minProperties": 1,
171
+ "additionalProperties": true,
172
+ "propertyNames": {
173
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
174
+ }
175
+ }
176
+ }
177
+ } as const;
178
+
179
+ /**
180
+ * SPEC.md §7.2 policy for the request variant, from this specification's
181
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
182
+ * per-specification and cannot be derived from the document alone, and
183
+ * item 2 needs the schema this carries.
184
+ */
185
+ export const SPEC = {
186
+ typeUri: TYPE_URI,
187
+ isBearer: false,
188
+ isProofRequired: true,
189
+ isRecipientRequired: true,
190
+ isIssuedAtRequired: true,
191
+ payloadSchema: PAYLOAD_SCHEMA,
192
+ } as const;
193
+
194
+ /**
195
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
196
+ * tracks the *issuer* party's requirement because a response swaps the
197
+ * parties (§7.3 item 5).
198
+ */
199
+ export const RESPONSE_SPEC = {
200
+ typeUri: RESPONSE_TYPE_URI,
201
+ isBearer: false,
202
+ isProofRequired: true,
203
+ isRecipientRequired: true,
204
+ isIssuedAtRequired: true,
205
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
206
+ } as const;
@@ -9,12 +9,12 @@ import type { Ext, RecordType, TrustRecord } from "../../../../_shared/component
9
9
  /**
10
10
  * An administrator lists all trust records held by the registry.
11
11
  *
12
- * @deprecated retired; use registry/record/query/0.2
12
+ * @deprecated retired; use registry/record/query/0.3
13
13
  */
14
14
  export interface RegistryRecordListPayload {
15
15
  ext?: Ext;
16
16
  }
17
- /** @deprecated retired; use registry/record/query/0.2 */
17
+ /** @deprecated retired; use registry/record/query/0.3 */
18
18
  export interface RegistryRecordListResponsePayload {
19
19
  /**
20
20
  * All trust records held by the registry.
@@ -43,12 +43,12 @@ export const EXTENDS: string | null = null;
43
43
  * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
44
44
  * Versions").
45
45
  */
46
- export const DEPRECATION: string | null = "retired; use registry/record/query/0.2";
46
+ export const DEPRECATION: string | null = "retired; use registry/record/query/0.3";
47
47
 
48
48
  /**
49
49
  * Stable alias for this specification's request payload shape.
50
50
  *
51
- * @deprecated retired; use registry/record/query/0.2
51
+ * @deprecated retired; use registry/record/query/0.3
52
52
  */
53
53
  export type Payload = RegistryRecordListPayload;
54
54
 
@@ -58,7 +58,7 @@ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/record/li
58
58
  /**
59
59
  * Stable alias for this specification's success-response payload shape.
60
60
  *
61
- * @deprecated retired; use registry/record/query/0.2
61
+ * @deprecated retired; use registry/record/query/0.3
62
62
  */
63
63
  export type Response = RegistryRecordListResponsePayload;
64
64