@openvtc/trust-tasks 0.27.6 → 0.27.8
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 +41 -0
- package/README.md +16 -13
- package/dist/_runtime/consume.d.ts +2 -2
- package/dist/_runtime/consume.js +2 -2
- package/dist/_runtime/extends.d.ts +20 -1
- package/dist/_runtime/extends.d.ts.map +1 -1
- package/dist/_runtime/extends.js +39 -3
- package/dist/_runtime/extends.js.map +1 -1
- package/dist/_runtime/index.d.ts +1 -1
- package/dist/_runtime/index.d.ts.map +1 -1
- package/dist/_runtime/index.js +1 -1
- package/dist/_runtime/index.js.map +1 -1
- package/dist/_shared/components.d.ts +29 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/registry/_shared/0.2/registry.d.ts +16 -0
- package/dist/registry/_shared/0.2/registry.d.ts.map +1 -0
- package/dist/registry/_shared/0.2/registry.js +6 -0
- package/dist/registry/_shared/0.2/registry.js.map +1 -0
- package/dist/registry/authorization/0.1/payload.d.ts +13 -2
- package/dist/registry/authorization/0.1/payload.d.ts.map +1 -1
- package/dist/registry/authorization/0.1/payload.js +1 -1
- package/dist/registry/authorization/0.1/payload.js.map +1 -1
- package/dist/registry/authorization/0.2/payload.d.ts +494 -0
- package/dist/registry/authorization/0.2/payload.d.ts.map +1 -0
- package/dist/registry/authorization/0.2/payload.js +270 -0
- package/dist/registry/authorization/0.2/payload.js.map +1 -0
- package/dist/registry/did/rotate/0.1/payload.d.ts +13 -2
- package/dist/registry/did/rotate/0.1/payload.d.ts.map +1 -1
- package/dist/registry/did/rotate/0.1/payload.js +1 -1
- package/dist/registry/did/rotate/0.1/payload.js.map +1 -1
- package/dist/registry/did/rotate/0.2/payload.d.ts +292 -0
- package/dist/registry/did/rotate/0.2/payload.d.ts.map +1 -0
- package/dist/registry/did/rotate/0.2/payload.js +167 -0
- package/dist/registry/did/rotate/0.2/payload.js.map +1 -0
- package/dist/registry/recognition/0.1/payload.d.ts +13 -2
- package/dist/registry/recognition/0.1/payload.d.ts.map +1 -1
- package/dist/registry/recognition/0.1/payload.js +1 -1
- package/dist/registry/recognition/0.1/payload.js.map +1 -1
- package/dist/registry/recognition/0.2/payload.d.ts +494 -0
- package/dist/registry/recognition/0.2/payload.d.ts.map +1 -0
- package/dist/registry/recognition/0.2/payload.js +270 -0
- package/dist/registry/recognition/0.2/payload.js.map +1 -0
- package/dist/registry/record/create/0.1/payload.d.ts +4 -4
- package/dist/registry/record/create/0.1/payload.js +1 -1
- package/dist/registry/record/delete/0.1/payload.d.ts +13 -2
- package/dist/registry/record/delete/0.1/payload.d.ts.map +1 -1
- package/dist/registry/record/delete/0.1/payload.js +1 -1
- package/dist/registry/record/delete/0.1/payload.js.map +1 -1
- package/dist/registry/record/delete/0.2/payload.d.ts +278 -0
- package/dist/registry/record/delete/0.2/payload.d.ts.map +1 -0
- package/dist/registry/record/delete/0.2/payload.js +165 -0
- package/dist/registry/record/delete/0.2/payload.js.map +1 -0
- package/dist/registry/record/list/0.1/payload.d.ts +4 -4
- package/dist/registry/record/list/0.1/payload.js +1 -1
- package/dist/registry/record/put/0.1/payload.d.ts +4 -4
- package/dist/registry/record/put/0.1/payload.js +1 -1
- package/dist/registry/record/put/0.2/payload.d.ts +13 -2
- package/dist/registry/record/put/0.2/payload.d.ts.map +1 -1
- package/dist/registry/record/put/0.2/payload.js +1 -1
- package/dist/registry/record/put/0.2/payload.js.map +1 -1
- package/dist/registry/record/put/0.3/payload.d.ts +497 -0
- package/dist/registry/record/put/0.3/payload.d.ts.map +1 -0
- package/dist/registry/record/put/0.3/payload.js +289 -0
- package/dist/registry/record/put/0.3/payload.js.map +1 -0
- package/dist/registry/record/query/0.1/payload.d.ts +4 -4
- package/dist/registry/record/query/0.1/payload.js +1 -1
- package/dist/registry/record/query/0.2/payload.d.ts +13 -2
- package/dist/registry/record/query/0.2/payload.d.ts.map +1 -1
- package/dist/registry/record/query/0.2/payload.js +1 -1
- package/dist/registry/record/query/0.2/payload.js.map +1 -1
- package/dist/registry/record/query/0.3/payload.d.ts +540 -0
- package/dist/registry/record/query/0.3/payload.d.ts.map +1 -0
- package/dist/registry/record/query/0.3/payload.js +299 -0
- package/dist/registry/record/query/0.3/payload.js.map +1 -0
- package/dist/registry/record/read/0.1/payload.d.ts +4 -4
- package/dist/registry/record/read/0.1/payload.js +1 -1
- package/dist/registry/record/update/0.1/payload.d.ts +4 -4
- package/dist/registry/record/update/0.1/payload.js +1 -1
- package/package.json +5 -1
- package/src/_runtime/consume.ts +2 -2
- package/src/_runtime/extends.ts +41 -4
- package/src/_runtime/index.ts +1 -0
- package/src/_shared/components.ts +29 -0
- package/src/index.ts +7 -0
- package/src/registry/_shared/0.2/registry.ts +17 -0
- package/src/registry/authorization/0.1/payload.ts +14 -3
- package/src/registry/authorization/0.2/payload.ts +337 -0
- package/src/registry/did/rotate/0.1/payload.ts +14 -3
- package/src/registry/did/rotate/0.2/payload.ts +216 -0
- package/src/registry/recognition/0.1/payload.ts +14 -3
- package/src/registry/recognition/0.2/payload.ts +337 -0
- package/src/registry/record/create/0.1/payload.ts +5 -5
- package/src/registry/record/delete/0.1/payload.ts +14 -3
- package/src/registry/record/delete/0.2/payload.ts +206 -0
- package/src/registry/record/list/0.1/payload.ts +5 -5
- package/src/registry/record/put/0.1/payload.ts +5 -5
- package/src/registry/record/put/0.2/payload.ts +14 -3
- package/src/registry/record/put/0.3/payload.ts +335 -0
- package/src/registry/record/query/0.1/payload.ts +5 -5
- package/src/registry/record/query/0.2/payload.ts +14 -3
- package/src/registry/record/query/0.3/payload.ts +360 -0
- package/src/registry/record/read/0.1/payload.ts +5 -5
- 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/authorization/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext, QueryContext } from "../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* TRQP v2.0 authorization query: ask a trust registry whether an entity is authorized 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 RegistryAuthorizationPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Identifier of the entity being tested for authorization.
|
|
15
|
+
*/
|
|
16
|
+
entityId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Identifier of the authority being queried.
|
|
19
|
+
*/
|
|
20
|
+
authorityId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The action the query is checking authorization for.
|
|
23
|
+
*/
|
|
24
|
+
action: string;
|
|
25
|
+
/**
|
|
26
|
+
* The resource the query is checking authorization for.
|
|
27
|
+
*/
|
|
28
|
+
resource: string;
|
|
29
|
+
context?: QueryContext;
|
|
30
|
+
ext?: Ext;
|
|
31
|
+
}
|
|
32
|
+
export interface RegistryAuthorizationResponsePayload {
|
|
33
|
+
entityId: string;
|
|
34
|
+
authorityId: string;
|
|
35
|
+
action: string;
|
|
36
|
+
resource: string;
|
|
37
|
+
/**
|
|
38
|
+
* True if the action+resource authorization has been confirmed, false otherwise.
|
|
39
|
+
*/
|
|
40
|
+
authorized: 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 authorization 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/authorization/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 = RegistryAuthorizationPayload;
|
|
81
|
+
|
|
82
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
83
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/authorization/0.2#response" as const;
|
|
84
|
+
|
|
85
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
86
|
+
export type Response = RegistryAuthorizationResponsePayload;
|
|
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/authorization/0.2",
|
|
100
|
+
"title": "Registry Authorization — payload",
|
|
101
|
+
"description": "TRQP v2.0 authorization query: ask a trust registry whether an entity is authorized 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 authorization."
|
|
114
|
+
},
|
|
115
|
+
"authorityId": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "Identifier of the authority being queried."
|
|
118
|
+
},
|
|
119
|
+
"action": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"description": "The action the query is checking authorization for."
|
|
122
|
+
},
|
|
123
|
+
"resource": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "The resource the query is checking authorization 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 Authorization — response payload",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"required": [
|
|
141
|
+
"entityId",
|
|
142
|
+
"authorityId",
|
|
143
|
+
"action",
|
|
144
|
+
"resource",
|
|
145
|
+
"authorized",
|
|
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
|
+
"authorized": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"description": "True if the action+resource authorization has been confirmed, 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 authorization 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 Authorization — response payload",
|
|
228
|
+
"type": "object",
|
|
229
|
+
"additionalProperties": false,
|
|
230
|
+
"required": [
|
|
231
|
+
"entityId",
|
|
232
|
+
"authorityId",
|
|
233
|
+
"action",
|
|
234
|
+
"resource",
|
|
235
|
+
"authorized",
|
|
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
|
+
"authorized": {
|
|
252
|
+
"type": "boolean",
|
|
253
|
+
"description": "True if the action+resource authorization has been confirmed, 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 authorization 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;
|
|
@@ -8,6 +8,8 @@ import type { Ext } from "../../../../_shared/components.js";
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* An administrator asks a trust registry to rotate the keys of the registry's own agent-managed did:webvh in place, preserving the DID while refreshing its key material. Field names are snake_case, frozen from the pre-existing deployed wire form this specification documents (matching the registry/* family convention).
|
|
11
|
+
*
|
|
12
|
+
* @deprecated superseded by registry/did/rotate/0.2
|
|
11
13
|
*/
|
|
12
14
|
export interface RegistryDIDRotatePayload {
|
|
13
15
|
/**
|
|
@@ -20,6 +22,7 @@ export interface RegistryDIDRotatePayload {
|
|
|
20
22
|
label?: string;
|
|
21
23
|
ext?: Ext;
|
|
22
24
|
}
|
|
25
|
+
/** @deprecated superseded by registry/did/rotate/0.2 */
|
|
23
26
|
export interface RegistryDIDRotateResponsePayload {
|
|
24
27
|
/**
|
|
25
28
|
* The DID whose keys were rotated.
|
|
@@ -56,15 +59,23 @@ export const EXTENDS: string | null = null;
|
|
|
56
59
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
57
60
|
* Versions").
|
|
58
61
|
*/
|
|
59
|
-
export const DEPRECATION: string | null =
|
|
62
|
+
export const DEPRECATION: string | null = "superseded by registry/did/rotate/0.2";
|
|
60
63
|
|
|
61
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Stable alias for this specification's request payload shape.
|
|
66
|
+
*
|
|
67
|
+
* @deprecated superseded by registry/did/rotate/0.2
|
|
68
|
+
*/
|
|
62
69
|
export type Payload = RegistryDIDRotatePayload;
|
|
63
70
|
|
|
64
71
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
65
72
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/did/rotate/0.1#response" as const;
|
|
66
73
|
|
|
67
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Stable alias for this specification's success-response payload shape.
|
|
76
|
+
*
|
|
77
|
+
* @deprecated superseded by registry/did/rotate/0.2
|
|
78
|
+
*/
|
|
68
79
|
export type Response = RegistryDIDRotateResponsePayload;
|
|
69
80
|
|
|
70
81
|
/**
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/registry/did/rotate/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 rotate the keys of the registry's own agent-managed did:webvh in place, preserving the DID while refreshing its key material. Members are lowerCamelCase, as throughout the registry/* family.
|
|
11
|
+
*/
|
|
12
|
+
export interface RegistryDIDRotatePayload {
|
|
13
|
+
/**
|
|
14
|
+
* Override the number of pre-rotation key commitments published for the new key set. Absent: the managing agent's default.
|
|
15
|
+
*/
|
|
16
|
+
preRotationCount?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Operator-facing audit label for the rotation.
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
ext?: Ext;
|
|
22
|
+
}
|
|
23
|
+
export interface RegistryDIDRotateResponsePayload {
|
|
24
|
+
/**
|
|
25
|
+
* The DID whose keys were rotated.
|
|
26
|
+
*/
|
|
27
|
+
did: string;
|
|
28
|
+
/**
|
|
29
|
+
* The DID's SCID after rotation.
|
|
30
|
+
*/
|
|
31
|
+
newScid: string;
|
|
32
|
+
/**
|
|
33
|
+
* The did:webvh log's new versionId after rotation.
|
|
34
|
+
*/
|
|
35
|
+
newVersionId: string;
|
|
36
|
+
ext?: Ext;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
40
|
+
export type { Ext };
|
|
41
|
+
|
|
42
|
+
/** Trust Task type URI. */
|
|
43
|
+
export const TYPE_URI = "https://trusttasks.org/spec/registry/did/rotate/0.2" as const;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The earlier version of this specification that this one declares it
|
|
47
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
48
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
49
|
+
* `extendsChain` / `readForSpec`.
|
|
50
|
+
*/
|
|
51
|
+
export const EXTENDS: string | null = null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
55
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
56
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
57
|
+
* Versions").
|
|
58
|
+
*/
|
|
59
|
+
export const DEPRECATION: string | null = null;
|
|
60
|
+
|
|
61
|
+
/** Stable alias for this specification's request payload shape. */
|
|
62
|
+
export type Payload = RegistryDIDRotatePayload;
|
|
63
|
+
|
|
64
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
65
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/did/rotate/0.2#response" as const;
|
|
66
|
+
|
|
67
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
68
|
+
export type Response = RegistryDIDRotateResponsePayload;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* This specification's payload schema, as a value.
|
|
72
|
+
*
|
|
73
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
74
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
75
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
76
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
77
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
78
|
+
*/
|
|
79
|
+
export const PAYLOAD_SCHEMA = {
|
|
80
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
81
|
+
"$id": "https://trusttasks.org/spec/registry/did/rotate/0.2",
|
|
82
|
+
"title": "Registry DID Rotate — payload",
|
|
83
|
+
"description": "An administrator asks a trust registry to rotate the keys of the registry's own agent-managed did:webvh in place, preserving the DID while refreshing its key material. Members are lowerCamelCase, as throughout the registry/* family.",
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {
|
|
87
|
+
"preRotationCount": {
|
|
88
|
+
"type": "integer",
|
|
89
|
+
"minimum": 0,
|
|
90
|
+
"description": "Override the number of pre-rotation key commitments published for the new key set. Absent: the managing agent's default."
|
|
91
|
+
},
|
|
92
|
+
"label": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"maxLength": 256,
|
|
95
|
+
"description": "Operator-facing audit label for the rotation."
|
|
96
|
+
},
|
|
97
|
+
"ext": {
|
|
98
|
+
"$ref": "#/$defs/Ext"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"$defs": {
|
|
102
|
+
"Response": {
|
|
103
|
+
"$anchor": "response",
|
|
104
|
+
"title": "Registry DID Rotate — response payload",
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": [
|
|
108
|
+
"did",
|
|
109
|
+
"newScid",
|
|
110
|
+
"newVersionId"
|
|
111
|
+
],
|
|
112
|
+
"properties": {
|
|
113
|
+
"did": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "The DID whose keys were rotated."
|
|
116
|
+
},
|
|
117
|
+
"newScid": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"description": "The DID's SCID after rotation."
|
|
120
|
+
},
|
|
121
|
+
"newVersionId": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "The did:webvh log's new versionId after rotation."
|
|
124
|
+
},
|
|
125
|
+
"ext": {
|
|
126
|
+
"$ref": "#/$defs/Ext"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"Ext": {
|
|
131
|
+
"title": "Ext",
|
|
132
|
+
"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.",
|
|
133
|
+
"type": "object",
|
|
134
|
+
"minProperties": 1,
|
|
135
|
+
"additionalProperties": true,
|
|
136
|
+
"propertyNames": {
|
|
137
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
} as const;
|
|
142
|
+
|
|
143
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
144
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
145
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
146
|
+
"$ref": "#/$defs/Response",
|
|
147
|
+
"$defs": {
|
|
148
|
+
"Response": {
|
|
149
|
+
"$anchor": "response",
|
|
150
|
+
"title": "Registry DID Rotate — response payload",
|
|
151
|
+
"type": "object",
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"required": [
|
|
154
|
+
"did",
|
|
155
|
+
"newScid",
|
|
156
|
+
"newVersionId"
|
|
157
|
+
],
|
|
158
|
+
"properties": {
|
|
159
|
+
"did": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"description": "The DID whose keys were rotated."
|
|
162
|
+
},
|
|
163
|
+
"newScid": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"description": "The DID's SCID after rotation."
|
|
166
|
+
},
|
|
167
|
+
"newVersionId": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"description": "The did:webvh log's new versionId after rotation."
|
|
170
|
+
},
|
|
171
|
+
"ext": {
|
|
172
|
+
"$ref": "#/$defs/Ext"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"Ext": {
|
|
177
|
+
"title": "Ext",
|
|
178
|
+
"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.",
|
|
179
|
+
"type": "object",
|
|
180
|
+
"minProperties": 1,
|
|
181
|
+
"additionalProperties": true,
|
|
182
|
+
"propertyNames": {
|
|
183
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
} as const;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
191
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
192
|
+
* per-specification and cannot be derived from the document alone, and
|
|
193
|
+
* item 2 needs the schema this carries.
|
|
194
|
+
*/
|
|
195
|
+
export const SPEC = {
|
|
196
|
+
typeUri: TYPE_URI,
|
|
197
|
+
isBearer: false,
|
|
198
|
+
isProofRequired: true,
|
|
199
|
+
isRecipientRequired: true,
|
|
200
|
+
isIssuedAtRequired: true,
|
|
201
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
202
|
+
} as const;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
206
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
207
|
+
* parties (§7.3 item 5).
|
|
208
|
+
*/
|
|
209
|
+
export const RESPONSE_SPEC = {
|
|
210
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
211
|
+
isBearer: false,
|
|
212
|
+
isProofRequired: true,
|
|
213
|
+
isRecipientRequired: true,
|
|
214
|
+
isIssuedAtRequired: true,
|
|
215
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
216
|
+
} as const;
|
|
@@ -8,6 +8,8 @@ import type { Ext, QueryContext } from "../../../_shared/components.js";
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* TRQP v2.0 recognition query: ask a trust registry whether an entity is recognised by an authority for a given action+resource. Field names are verbatim from the TRQP recognition request/response schemas so the same payload serves the plain HTTP TRQP binding and the Trust Task binding.
|
|
11
|
+
*
|
|
12
|
+
* @deprecated superseded by registry/recognition/0.2
|
|
11
13
|
*/
|
|
12
14
|
export interface RegistryRecognitionPayload {
|
|
13
15
|
/**
|
|
@@ -29,6 +31,7 @@ export interface RegistryRecognitionPayload {
|
|
|
29
31
|
context?: QueryContext;
|
|
30
32
|
ext?: Ext;
|
|
31
33
|
}
|
|
34
|
+
/** @deprecated superseded by registry/recognition/0.2 */
|
|
32
35
|
export interface RegistryRecognitionResponsePayload {
|
|
33
36
|
entity_id: string;
|
|
34
37
|
authority_id: string;
|
|
@@ -74,15 +77,23 @@ export const EXTENDS: string | null = null;
|
|
|
74
77
|
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
75
78
|
* Versions").
|
|
76
79
|
*/
|
|
77
|
-
export const DEPRECATION: string | null =
|
|
80
|
+
export const DEPRECATION: string | null = "superseded by registry/recognition/0.2";
|
|
78
81
|
|
|
79
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Stable alias for this specification's request payload shape.
|
|
84
|
+
*
|
|
85
|
+
* @deprecated superseded by registry/recognition/0.2
|
|
86
|
+
*/
|
|
80
87
|
export type Payload = RegistryRecognitionPayload;
|
|
81
88
|
|
|
82
89
|
/** Trust Task response type URI (request type URI + "#response"). */
|
|
83
90
|
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/registry/recognition/0.1#response" as const;
|
|
84
91
|
|
|
85
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* Stable alias for this specification's success-response payload shape.
|
|
94
|
+
*
|
|
95
|
+
* @deprecated superseded by registry/recognition/0.2
|
|
96
|
+
*/
|
|
86
97
|
export type Response = RegistryRecognitionResponsePayload;
|
|
87
98
|
|
|
88
99
|
/**
|