@openvtc/trust-tasks 0.19.5 → 0.19.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.
- package/CHANGELOG.md +102 -0
- package/dist/_shared/components.d.ts +4 -4
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/keys/create/0.1/payload.d.ts +8 -8
- package/dist/keys/create/0.1/payload.d.ts.map +1 -1
- package/dist/keys/create/0.1/payload.js +8 -4
- package/dist/keys/create/0.1/payload.js.map +1 -1
- package/dist/keys/derive-and-sign/0.1/payload.d.ts +16 -16
- package/dist/keys/derive-and-sign/0.1/payload.d.ts.map +1 -1
- package/dist/keys/derive-and-sign/0.1/payload.js +16 -8
- package/dist/keys/derive-and-sign/0.1/payload.js.map +1 -1
- package/dist/keys/derive-and-sign-document/0.1/payload.d.ts +8 -8
- package/dist/keys/derive-and-sign-document/0.1/payload.d.ts.map +1 -1
- package/dist/keys/derive-and-sign-document/0.1/payload.js +8 -4
- package/dist/keys/derive-and-sign-document/0.1/payload.js.map +1 -1
- package/dist/keys/export-secret/0.1/payload.d.ts +8 -8
- package/dist/keys/export-secret/0.1/payload.d.ts.map +1 -1
- package/dist/keys/export-secret/0.1/payload.js +8 -4
- package/dist/keys/export-secret/0.1/payload.js.map +1 -1
- package/dist/keys/import/0.1/payload.d.ts +8 -8
- package/dist/keys/import/0.1/payload.d.ts.map +1 -1
- package/dist/keys/import/0.1/payload.js +8 -4
- package/dist/keys/import/0.1/payload.js.map +1 -1
- package/dist/keys/list/0.1/payload.d.ts +8 -8
- package/dist/keys/list/0.1/payload.d.ts.map +1 -1
- package/dist/keys/list/0.1/payload.js +8 -4
- package/dist/keys/list/0.1/payload.js.map +1 -1
- package/dist/keys/set-exportability/0.1/payload.d.ts +8 -8
- package/dist/keys/set-exportability/0.1/payload.d.ts.map +1 -1
- package/dist/keys/set-exportability/0.1/payload.js +8 -4
- package/dist/keys/set-exportability/0.1/payload.js.map +1 -1
- package/dist/keys/show/0.1/payload.d.ts +8 -8
- package/dist/keys/show/0.1/payload.d.ts.map +1 -1
- package/dist/keys/show/0.1/payload.js +8 -4
- package/dist/keys/show/0.1/payload.js.map +1 -1
- package/dist/keys/sign/0.1/payload.d.ts +8 -8
- package/dist/keys/sign/0.1/payload.d.ts.map +1 -1
- package/dist/keys/sign/0.1/payload.js +8 -4
- package/dist/keys/sign/0.1/payload.js.map +1 -1
- package/dist/vtc/registry/records/list/0.1/payload.d.ts +576 -0
- package/dist/vtc/registry/records/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/registry/records/list/0.1/payload.js +312 -0
- package/dist/vtc/registry/records/list/0.1/payload.js.map +1 -0
- package/dist/vtc/registry/sync-jobs/discard/0.1/payload.d.ts +254 -0
- package/dist/vtc/registry/sync-jobs/discard/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/registry/sync-jobs/discard/0.1/payload.js +145 -0
- package/dist/vtc/registry/sync-jobs/discard/0.1/payload.js.map +1 -0
- package/dist/vtc/registry/sync-jobs/list/0.1/payload.d.ts +584 -0
- package/dist/vtc/registry/sync-jobs/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/registry/sync-jobs/list/0.1/payload.js +343 -0
- package/dist/vtc/registry/sync-jobs/list/0.1/payload.js.map +1 -0
- package/dist/vtc/registry/sync-jobs/retry/0.1/payload.d.ts +474 -0
- package/dist/vtc/registry/sync-jobs/retry/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/registry/sync-jobs/retry/0.1/payload.js +269 -0
- package/dist/vtc/registry/sync-jobs/retry/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +4 -4
- package/src/index.ts +4 -0
- package/src/keys/create/0.1/payload.ts +8 -4
- package/src/keys/derive-and-sign/0.1/payload.ts +16 -8
- package/src/keys/derive-and-sign-document/0.1/payload.ts +8 -4
- package/src/keys/export-secret/0.1/payload.ts +8 -4
- package/src/keys/import/0.1/payload.ts +8 -4
- package/src/keys/list/0.1/payload.ts +8 -4
- package/src/keys/set-exportability/0.1/payload.ts +8 -4
- package/src/keys/show/0.1/payload.ts +8 -4
- package/src/keys/sign/0.1/payload.ts +8 -4
- package/src/vtc/registry/records/list/0.1/payload.ts +407 -0
- package/src/vtc/registry/sync-jobs/discard/0.1/payload.ts +184 -0
- package/src/vtc/registry/sync-jobs/list/0.1/payload.ts +433 -0
- package/src/vtc/registry/sync-jobs/retry/0.1/payload.ts +331 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/registry/records/list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface VTCRegistryRecordsListPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Filter to records about this entity.
|
|
12
|
+
*/
|
|
13
|
+
entityId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Filter to records asserted by this authority.
|
|
16
|
+
*/
|
|
17
|
+
authorityId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Filter to records for this action.
|
|
20
|
+
*/
|
|
21
|
+
action?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Filter to records for this resource.
|
|
24
|
+
*/
|
|
25
|
+
resource?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Which view to enumerate. Defaults to `registry`.
|
|
28
|
+
*/
|
|
29
|
+
source?: "registry" | "local";
|
|
30
|
+
/**
|
|
31
|
+
* Opaque continuation token from a previous page's `nextCursor`.
|
|
32
|
+
*/
|
|
33
|
+
cursor?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Page size; the maintainer clamps to 1..=200 (default 50).
|
|
36
|
+
*/
|
|
37
|
+
limit?: number;
|
|
38
|
+
ext?: Ext;
|
|
39
|
+
}
|
|
40
|
+
export interface VTCRegistryRecordsListResponsePayload {
|
|
41
|
+
/**
|
|
42
|
+
* The matching records, in the maintainer's stable enumeration order.
|
|
43
|
+
*/
|
|
44
|
+
items: Record[];
|
|
45
|
+
/**
|
|
46
|
+
* Which view these items came from, echoed so a consumer never has to infer it from the request it thinks it sent.
|
|
47
|
+
*/
|
|
48
|
+
source: "registry" | "local";
|
|
49
|
+
/**
|
|
50
|
+
* Continuation token for the next page, or null when this is the last.
|
|
51
|
+
*/
|
|
52
|
+
nextCursor?: string | null;
|
|
53
|
+
ext?: Ext;
|
|
54
|
+
}
|
|
55
|
+
export interface Record {
|
|
56
|
+
/**
|
|
57
|
+
* The entity the record is about.
|
|
58
|
+
*/
|
|
59
|
+
entityId: string;
|
|
60
|
+
/**
|
|
61
|
+
* The authority asserting it.
|
|
62
|
+
*/
|
|
63
|
+
authorityId: string;
|
|
64
|
+
/**
|
|
65
|
+
* The action the assertion covers.
|
|
66
|
+
*/
|
|
67
|
+
action: string;
|
|
68
|
+
/**
|
|
69
|
+
* The resource the assertion covers.
|
|
70
|
+
*/
|
|
71
|
+
resource: string;
|
|
72
|
+
/**
|
|
73
|
+
* Record discriminator, as the trust registry states it.
|
|
74
|
+
*/
|
|
75
|
+
recordType: string;
|
|
76
|
+
/**
|
|
77
|
+
* Present on recognition records: whether the action+resource is recognised. Absent on other record types — absent is not `false`.
|
|
78
|
+
*/
|
|
79
|
+
recognized?: boolean | null;
|
|
80
|
+
/**
|
|
81
|
+
* Present on authorization records: whether the action+resource authorization is confirmed. Absent on other record types — absent is not `false`.
|
|
82
|
+
*/
|
|
83
|
+
authorized?: boolean | null;
|
|
84
|
+
ext?: Ext;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
88
|
+
export type { Ext };
|
|
89
|
+
|
|
90
|
+
/** Trust Task type URI. */
|
|
91
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/registry/records/list/0.1" as const;
|
|
92
|
+
|
|
93
|
+
/** Stable alias for this specification's request payload shape. */
|
|
94
|
+
export type Payload = VTCRegistryRecordsListPayload;
|
|
95
|
+
|
|
96
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
97
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/registry/records/list/0.1#response" as const;
|
|
98
|
+
|
|
99
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
100
|
+
export type Response = VTCRegistryRecordsListResponsePayload;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* This specification's payload schema, as a value.
|
|
104
|
+
*
|
|
105
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
106
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
107
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
108
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
109
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
110
|
+
*/
|
|
111
|
+
export const PAYLOAD_SCHEMA = {
|
|
112
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
113
|
+
"$id": "https://trusttasks.org/spec/vtc/registry/records/list/0.1",
|
|
114
|
+
"title": "VTC Registry Records List — payload",
|
|
115
|
+
"type": "object",
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"properties": {
|
|
118
|
+
"entityId": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"minLength": 1,
|
|
121
|
+
"description": "Filter to records about this entity."
|
|
122
|
+
},
|
|
123
|
+
"authorityId": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"minLength": 1,
|
|
126
|
+
"description": "Filter to records asserted by this authority."
|
|
127
|
+
},
|
|
128
|
+
"action": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"minLength": 1,
|
|
131
|
+
"description": "Filter to records for this action."
|
|
132
|
+
},
|
|
133
|
+
"resource": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1,
|
|
136
|
+
"description": "Filter to records for this resource."
|
|
137
|
+
},
|
|
138
|
+
"source": {
|
|
139
|
+
"$ref": "#/$defs/Source",
|
|
140
|
+
"description": "Which view to enumerate. Defaults to `registry`."
|
|
141
|
+
},
|
|
142
|
+
"cursor": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "Opaque continuation token from a previous page's `nextCursor`."
|
|
145
|
+
},
|
|
146
|
+
"limit": {
|
|
147
|
+
"type": "integer",
|
|
148
|
+
"minimum": 1,
|
|
149
|
+
"maximum": 200,
|
|
150
|
+
"description": "Page size; the maintainer clamps to 1..=200 (default 50)."
|
|
151
|
+
},
|
|
152
|
+
"ext": {
|
|
153
|
+
"$ref": "#/$defs/Ext"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"$defs": {
|
|
157
|
+
"Source": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"enum": [
|
|
160
|
+
"registry",
|
|
161
|
+
"local"
|
|
162
|
+
],
|
|
163
|
+
"description": "`registry` enumerates the trust registry itself; `local` enumerates the community's own record of what it published. They are different questions and a consumer MUST NOT treat one as a cache of the other."
|
|
164
|
+
},
|
|
165
|
+
"Record": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"additionalProperties": false,
|
|
168
|
+
"required": [
|
|
169
|
+
"entityId",
|
|
170
|
+
"authorityId",
|
|
171
|
+
"action",
|
|
172
|
+
"resource",
|
|
173
|
+
"recordType"
|
|
174
|
+
],
|
|
175
|
+
"properties": {
|
|
176
|
+
"entityId": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"minLength": 1,
|
|
179
|
+
"description": "The entity the record is about."
|
|
180
|
+
},
|
|
181
|
+
"authorityId": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1,
|
|
184
|
+
"description": "The authority asserting it."
|
|
185
|
+
},
|
|
186
|
+
"action": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"minLength": 1,
|
|
189
|
+
"description": "The action the assertion covers."
|
|
190
|
+
},
|
|
191
|
+
"resource": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"minLength": 1,
|
|
194
|
+
"description": "The resource the assertion covers."
|
|
195
|
+
},
|
|
196
|
+
"recordType": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"minLength": 1,
|
|
199
|
+
"description": "Record discriminator, as the trust registry states it."
|
|
200
|
+
},
|
|
201
|
+
"recognized": {
|
|
202
|
+
"type": [
|
|
203
|
+
"boolean",
|
|
204
|
+
"null"
|
|
205
|
+
],
|
|
206
|
+
"description": "Present on recognition records: whether the action+resource is recognised. Absent on other record types — absent is not `false`."
|
|
207
|
+
},
|
|
208
|
+
"authorized": {
|
|
209
|
+
"type": [
|
|
210
|
+
"boolean",
|
|
211
|
+
"null"
|
|
212
|
+
],
|
|
213
|
+
"description": "Present on authorization records: whether the action+resource authorization is confirmed. Absent on other record types — absent is not `false`."
|
|
214
|
+
},
|
|
215
|
+
"ext": {
|
|
216
|
+
"$ref": "#/$defs/Ext"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"Response": {
|
|
221
|
+
"$anchor": "response",
|
|
222
|
+
"title": "VTC Registry Records List — response payload",
|
|
223
|
+
"type": "object",
|
|
224
|
+
"additionalProperties": false,
|
|
225
|
+
"required": [
|
|
226
|
+
"items",
|
|
227
|
+
"source"
|
|
228
|
+
],
|
|
229
|
+
"properties": {
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "array",
|
|
232
|
+
"items": {
|
|
233
|
+
"$ref": "#/$defs/Record"
|
|
234
|
+
},
|
|
235
|
+
"description": "The matching records, in the maintainer's stable enumeration order."
|
|
236
|
+
},
|
|
237
|
+
"source": {
|
|
238
|
+
"$ref": "#/$defs/Source",
|
|
239
|
+
"description": "Which view these items came from, echoed so a consumer never has to infer it from the request it thinks it sent."
|
|
240
|
+
},
|
|
241
|
+
"nextCursor": {
|
|
242
|
+
"type": [
|
|
243
|
+
"string",
|
|
244
|
+
"null"
|
|
245
|
+
],
|
|
246
|
+
"description": "Continuation token for the next page, or null when this is the last."
|
|
247
|
+
},
|
|
248
|
+
"ext": {
|
|
249
|
+
"$ref": "#/$defs/Ext"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"Ext": {
|
|
254
|
+
"title": "Ext",
|
|
255
|
+
"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.",
|
|
256
|
+
"type": "object",
|
|
257
|
+
"minProperties": 1,
|
|
258
|
+
"additionalProperties": true,
|
|
259
|
+
"propertyNames": {
|
|
260
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
} as const;
|
|
265
|
+
|
|
266
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
267
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
268
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
269
|
+
"$ref": "#/$defs/Response",
|
|
270
|
+
"$defs": {
|
|
271
|
+
"Source": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"enum": [
|
|
274
|
+
"registry",
|
|
275
|
+
"local"
|
|
276
|
+
],
|
|
277
|
+
"description": "`registry` enumerates the trust registry itself; `local` enumerates the community's own record of what it published. They are different questions and a consumer MUST NOT treat one as a cache of the other."
|
|
278
|
+
},
|
|
279
|
+
"Record": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"additionalProperties": false,
|
|
282
|
+
"required": [
|
|
283
|
+
"entityId",
|
|
284
|
+
"authorityId",
|
|
285
|
+
"action",
|
|
286
|
+
"resource",
|
|
287
|
+
"recordType"
|
|
288
|
+
],
|
|
289
|
+
"properties": {
|
|
290
|
+
"entityId": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"minLength": 1,
|
|
293
|
+
"description": "The entity the record is about."
|
|
294
|
+
},
|
|
295
|
+
"authorityId": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"minLength": 1,
|
|
298
|
+
"description": "The authority asserting it."
|
|
299
|
+
},
|
|
300
|
+
"action": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"minLength": 1,
|
|
303
|
+
"description": "The action the assertion covers."
|
|
304
|
+
},
|
|
305
|
+
"resource": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"minLength": 1,
|
|
308
|
+
"description": "The resource the assertion covers."
|
|
309
|
+
},
|
|
310
|
+
"recordType": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"minLength": 1,
|
|
313
|
+
"description": "Record discriminator, as the trust registry states it."
|
|
314
|
+
},
|
|
315
|
+
"recognized": {
|
|
316
|
+
"type": [
|
|
317
|
+
"boolean",
|
|
318
|
+
"null"
|
|
319
|
+
],
|
|
320
|
+
"description": "Present on recognition records: whether the action+resource is recognised. Absent on other record types — absent is not `false`."
|
|
321
|
+
},
|
|
322
|
+
"authorized": {
|
|
323
|
+
"type": [
|
|
324
|
+
"boolean",
|
|
325
|
+
"null"
|
|
326
|
+
],
|
|
327
|
+
"description": "Present on authorization records: whether the action+resource authorization is confirmed. Absent on other record types — absent is not `false`."
|
|
328
|
+
},
|
|
329
|
+
"ext": {
|
|
330
|
+
"$ref": "#/$defs/Ext"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"Response": {
|
|
335
|
+
"$anchor": "response",
|
|
336
|
+
"title": "VTC Registry Records List — response payload",
|
|
337
|
+
"type": "object",
|
|
338
|
+
"additionalProperties": false,
|
|
339
|
+
"required": [
|
|
340
|
+
"items",
|
|
341
|
+
"source"
|
|
342
|
+
],
|
|
343
|
+
"properties": {
|
|
344
|
+
"items": {
|
|
345
|
+
"type": "array",
|
|
346
|
+
"items": {
|
|
347
|
+
"$ref": "#/$defs/Record"
|
|
348
|
+
},
|
|
349
|
+
"description": "The matching records, in the maintainer's stable enumeration order."
|
|
350
|
+
},
|
|
351
|
+
"source": {
|
|
352
|
+
"$ref": "#/$defs/Source",
|
|
353
|
+
"description": "Which view these items came from, echoed so a consumer never has to infer it from the request it thinks it sent."
|
|
354
|
+
},
|
|
355
|
+
"nextCursor": {
|
|
356
|
+
"type": [
|
|
357
|
+
"string",
|
|
358
|
+
"null"
|
|
359
|
+
],
|
|
360
|
+
"description": "Continuation token for the next page, or null when this is the last."
|
|
361
|
+
},
|
|
362
|
+
"ext": {
|
|
363
|
+
"$ref": "#/$defs/Ext"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"Ext": {
|
|
368
|
+
"title": "Ext",
|
|
369
|
+
"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.",
|
|
370
|
+
"type": "object",
|
|
371
|
+
"minProperties": 1,
|
|
372
|
+
"additionalProperties": true,
|
|
373
|
+
"propertyNames": {
|
|
374
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
} as const;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
382
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
383
|
+
* per-specification and cannot be derived from the document alone, and
|
|
384
|
+
* item 2 needs the schema this carries.
|
|
385
|
+
*/
|
|
386
|
+
export const SPEC = {
|
|
387
|
+
typeUri: TYPE_URI,
|
|
388
|
+
isBearer: false,
|
|
389
|
+
isProofRequired: false,
|
|
390
|
+
isRecipientRequired: true,
|
|
391
|
+
isIssuedAtRequired: false,
|
|
392
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
393
|
+
} as const;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
397
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
398
|
+
* parties (§7.3 item 5).
|
|
399
|
+
*/
|
|
400
|
+
export const RESPONSE_SPEC = {
|
|
401
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
402
|
+
isBearer: false,
|
|
403
|
+
isProofRequired: false,
|
|
404
|
+
isRecipientRequired: true,
|
|
405
|
+
isIssuedAtRequired: false,
|
|
406
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
407
|
+
} as const;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/registry/sync-jobs/discard/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Delete an abandoned trust-registry reconciliation job without dispatching it. The registry's record for that member is left exactly as it is.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCRegistrySyncJobsDiscardPayload {
|
|
13
|
+
/**
|
|
14
|
+
* The job to delete, from `vtc/registry/sync-jobs/list`. Required and single: discard is irreversible, so there is deliberately no bulk form.
|
|
15
|
+
*/
|
|
16
|
+
jobId: string;
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
export interface VTCRegistrySyncJobsDiscardResponsePayload {
|
|
20
|
+
/**
|
|
21
|
+
* The deleted job, echoed.
|
|
22
|
+
*/
|
|
23
|
+
jobId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The member whose pending change was dropped. Returned because the caller is discarding by identifier and this names what it actually cost.
|
|
26
|
+
*/
|
|
27
|
+
memberDid: 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/vtc/registry/sync-jobs/discard/0.1" as const;
|
|
36
|
+
|
|
37
|
+
/** Stable alias for this specification's request payload shape. */
|
|
38
|
+
export type Payload = VTCRegistrySyncJobsDiscardPayload;
|
|
39
|
+
|
|
40
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
41
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/registry/sync-jobs/discard/0.1#response" as const;
|
|
42
|
+
|
|
43
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
44
|
+
export type Response = VTCRegistrySyncJobsDiscardResponsePayload;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* This specification's payload schema, as a value.
|
|
48
|
+
*
|
|
49
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
50
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
51
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
52
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
53
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
54
|
+
*/
|
|
55
|
+
export const PAYLOAD_SCHEMA = {
|
|
56
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
57
|
+
"$id": "https://trusttasks.org/spec/vtc/registry/sync-jobs/discard/0.1",
|
|
58
|
+
"title": "VTC Registry Sync Jobs Discard — payload",
|
|
59
|
+
"description": "Delete an abandoned trust-registry reconciliation job without dispatching it. The registry's record for that member is left exactly as it is.",
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": [
|
|
63
|
+
"jobId"
|
|
64
|
+
],
|
|
65
|
+
"properties": {
|
|
66
|
+
"jobId": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"description": "The job to delete, from `vtc/registry/sync-jobs/list`. Required and single: discard is irreversible, so there is deliberately no bulk form."
|
|
70
|
+
},
|
|
71
|
+
"ext": {
|
|
72
|
+
"$ref": "#/$defs/Ext"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"$defs": {
|
|
76
|
+
"Response": {
|
|
77
|
+
"$anchor": "response",
|
|
78
|
+
"title": "VTC Registry Sync Jobs Discard — response payload",
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"required": [
|
|
82
|
+
"jobId",
|
|
83
|
+
"memberDid"
|
|
84
|
+
],
|
|
85
|
+
"properties": {
|
|
86
|
+
"jobId": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"description": "The deleted job, echoed."
|
|
90
|
+
},
|
|
91
|
+
"memberDid": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"description": "The member whose pending change was dropped. Returned because the caller is discarding by identifier and this names what it actually cost."
|
|
95
|
+
},
|
|
96
|
+
"ext": {
|
|
97
|
+
"$ref": "#/$defs/Ext"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"Ext": {
|
|
102
|
+
"title": "Ext",
|
|
103
|
+
"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.",
|
|
104
|
+
"type": "object",
|
|
105
|
+
"minProperties": 1,
|
|
106
|
+
"additionalProperties": true,
|
|
107
|
+
"propertyNames": {
|
|
108
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} as const;
|
|
113
|
+
|
|
114
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
115
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
116
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
117
|
+
"$ref": "#/$defs/Response",
|
|
118
|
+
"$defs": {
|
|
119
|
+
"Response": {
|
|
120
|
+
"$anchor": "response",
|
|
121
|
+
"title": "VTC Registry Sync Jobs Discard — response payload",
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": [
|
|
125
|
+
"jobId",
|
|
126
|
+
"memberDid"
|
|
127
|
+
],
|
|
128
|
+
"properties": {
|
|
129
|
+
"jobId": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"minLength": 1,
|
|
132
|
+
"description": "The deleted job, echoed."
|
|
133
|
+
},
|
|
134
|
+
"memberDid": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"minLength": 1,
|
|
137
|
+
"description": "The member whose pending change was dropped. Returned because the caller is discarding by identifier and this names what it actually cost."
|
|
138
|
+
},
|
|
139
|
+
"ext": {
|
|
140
|
+
"$ref": "#/$defs/Ext"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"Ext": {
|
|
145
|
+
"title": "Ext",
|
|
146
|
+
"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
|
+
"type": "object",
|
|
148
|
+
"minProperties": 1,
|
|
149
|
+
"additionalProperties": true,
|
|
150
|
+
"propertyNames": {
|
|
151
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
} as const;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
159
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
160
|
+
* per-specification and cannot be derived from the document alone, and
|
|
161
|
+
* item 2 needs the schema this carries.
|
|
162
|
+
*/
|
|
163
|
+
export const SPEC = {
|
|
164
|
+
typeUri: TYPE_URI,
|
|
165
|
+
isBearer: false,
|
|
166
|
+
isProofRequired: true,
|
|
167
|
+
isRecipientRequired: true,
|
|
168
|
+
isIssuedAtRequired: true,
|
|
169
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
170
|
+
} as const;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
174
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
175
|
+
* parties (§7.3 item 5).
|
|
176
|
+
*/
|
|
177
|
+
export const RESPONSE_SPEC = {
|
|
178
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
179
|
+
isBearer: false,
|
|
180
|
+
isProofRequired: true,
|
|
181
|
+
isRecipientRequired: true,
|
|
182
|
+
isIssuedAtRequired: true,
|
|
183
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
184
|
+
} as const;
|