@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.
Files changed (75) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/_shared/components.d.ts +4 -4
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +4 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +4 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/keys/create/0.1/payload.d.ts +8 -8
  9. package/dist/keys/create/0.1/payload.d.ts.map +1 -1
  10. package/dist/keys/create/0.1/payload.js +8 -4
  11. package/dist/keys/create/0.1/payload.js.map +1 -1
  12. package/dist/keys/derive-and-sign/0.1/payload.d.ts +16 -16
  13. package/dist/keys/derive-and-sign/0.1/payload.d.ts.map +1 -1
  14. package/dist/keys/derive-and-sign/0.1/payload.js +16 -8
  15. package/dist/keys/derive-and-sign/0.1/payload.js.map +1 -1
  16. package/dist/keys/derive-and-sign-document/0.1/payload.d.ts +8 -8
  17. package/dist/keys/derive-and-sign-document/0.1/payload.d.ts.map +1 -1
  18. package/dist/keys/derive-and-sign-document/0.1/payload.js +8 -4
  19. package/dist/keys/derive-and-sign-document/0.1/payload.js.map +1 -1
  20. package/dist/keys/export-secret/0.1/payload.d.ts +8 -8
  21. package/dist/keys/export-secret/0.1/payload.d.ts.map +1 -1
  22. package/dist/keys/export-secret/0.1/payload.js +8 -4
  23. package/dist/keys/export-secret/0.1/payload.js.map +1 -1
  24. package/dist/keys/import/0.1/payload.d.ts +8 -8
  25. package/dist/keys/import/0.1/payload.d.ts.map +1 -1
  26. package/dist/keys/import/0.1/payload.js +8 -4
  27. package/dist/keys/import/0.1/payload.js.map +1 -1
  28. package/dist/keys/list/0.1/payload.d.ts +8 -8
  29. package/dist/keys/list/0.1/payload.d.ts.map +1 -1
  30. package/dist/keys/list/0.1/payload.js +8 -4
  31. package/dist/keys/list/0.1/payload.js.map +1 -1
  32. package/dist/keys/set-exportability/0.1/payload.d.ts +8 -8
  33. package/dist/keys/set-exportability/0.1/payload.d.ts.map +1 -1
  34. package/dist/keys/set-exportability/0.1/payload.js +8 -4
  35. package/dist/keys/set-exportability/0.1/payload.js.map +1 -1
  36. package/dist/keys/show/0.1/payload.d.ts +8 -8
  37. package/dist/keys/show/0.1/payload.d.ts.map +1 -1
  38. package/dist/keys/show/0.1/payload.js +8 -4
  39. package/dist/keys/show/0.1/payload.js.map +1 -1
  40. package/dist/keys/sign/0.1/payload.d.ts +8 -8
  41. package/dist/keys/sign/0.1/payload.d.ts.map +1 -1
  42. package/dist/keys/sign/0.1/payload.js +8 -4
  43. package/dist/keys/sign/0.1/payload.js.map +1 -1
  44. package/dist/vtc/registry/records/list/0.1/payload.d.ts +576 -0
  45. package/dist/vtc/registry/records/list/0.1/payload.d.ts.map +1 -0
  46. package/dist/vtc/registry/records/list/0.1/payload.js +312 -0
  47. package/dist/vtc/registry/records/list/0.1/payload.js.map +1 -0
  48. package/dist/vtc/registry/sync-jobs/discard/0.1/payload.d.ts +254 -0
  49. package/dist/vtc/registry/sync-jobs/discard/0.1/payload.d.ts.map +1 -0
  50. package/dist/vtc/registry/sync-jobs/discard/0.1/payload.js +145 -0
  51. package/dist/vtc/registry/sync-jobs/discard/0.1/payload.js.map +1 -0
  52. package/dist/vtc/registry/sync-jobs/list/0.1/payload.d.ts +584 -0
  53. package/dist/vtc/registry/sync-jobs/list/0.1/payload.d.ts.map +1 -0
  54. package/dist/vtc/registry/sync-jobs/list/0.1/payload.js +343 -0
  55. package/dist/vtc/registry/sync-jobs/list/0.1/payload.js.map +1 -0
  56. package/dist/vtc/registry/sync-jobs/retry/0.1/payload.d.ts +474 -0
  57. package/dist/vtc/registry/sync-jobs/retry/0.1/payload.d.ts.map +1 -0
  58. package/dist/vtc/registry/sync-jobs/retry/0.1/payload.js +269 -0
  59. package/dist/vtc/registry/sync-jobs/retry/0.1/payload.js.map +1 -0
  60. package/package.json +1 -1
  61. package/src/_shared/components.ts +4 -4
  62. package/src/index.ts +4 -0
  63. package/src/keys/create/0.1/payload.ts +8 -4
  64. package/src/keys/derive-and-sign/0.1/payload.ts +16 -8
  65. package/src/keys/derive-and-sign-document/0.1/payload.ts +8 -4
  66. package/src/keys/export-secret/0.1/payload.ts +8 -4
  67. package/src/keys/import/0.1/payload.ts +8 -4
  68. package/src/keys/list/0.1/payload.ts +8 -4
  69. package/src/keys/set-exportability/0.1/payload.ts +8 -4
  70. package/src/keys/show/0.1/payload.ts +8 -4
  71. package/src/keys/sign/0.1/payload.ts +8 -4
  72. package/src/vtc/registry/records/list/0.1/payload.ts +407 -0
  73. package/src/vtc/registry/sync-jobs/discard/0.1/payload.ts +184 -0
  74. package/src/vtc/registry/sync-jobs/list/0.1/payload.ts +433 -0
  75. package/src/vtc/registry/sync-jobs/retry/0.1/payload.ts +331 -0
@@ -0,0 +1,331 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/registry/sync-jobs/retry/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Requeue an abandoned trust-registry reconciliation job so the community's reconciler dispatches it again.
11
+ */
12
+ export type VTCRegistrySyncJobsRetryPayload = {
13
+ /**
14
+ * The single job to requeue, from `vtc/registry/sync-jobs/list`.
15
+ */
16
+ jobId?: string;
17
+ /**
18
+ * Requeue every job in the terminal `failed` state. Spelled as its own member rather than an absent `jobId` so that a client bug which drops the identifier cannot silently become a bulk operation.
19
+ */
20
+ allFailed?: true;
21
+ ext?: Ext;
22
+ } & {
23
+ [k: string]: unknown | undefined;
24
+ };
25
+
26
+ export interface VTCRegistrySyncJobsRetryResponsePayload {
27
+ /**
28
+ * Jobs now scheduled for dispatch. Empty is a valid answer and is not an error.
29
+ */
30
+ requeued: Requeued[];
31
+ /**
32
+ * Jobs the maintainer declined to requeue, each with why. Reported rather than failing the task, so a bulk retry is not defeated by one ineligible row.
33
+ */
34
+ skipped: Skipped[];
35
+ ext?: Ext;
36
+ }
37
+ export interface Requeued {
38
+ jobId: string;
39
+ /**
40
+ * The member whose record the requeued job carries.
41
+ */
42
+ memberDid?: string;
43
+ ext?: Ext;
44
+ }
45
+ export interface Skipped {
46
+ jobId: string;
47
+ /**
48
+ * `notFailed` — the reconciler still owns the job, so requeueing it would dispatch the same mutation twice. `notFound` — no such job; it may already have been retried, discarded, or swept.
49
+ */
50
+ reason: "notFailed" | "notFound";
51
+ ext?: Ext;
52
+ }
53
+
54
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
55
+ export type { Ext };
56
+
57
+ /** Trust Task type URI. */
58
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/registry/sync-jobs/retry/0.1" as const;
59
+
60
+ /** Stable alias for this specification's request payload shape. */
61
+ export type Payload = VTCRegistrySyncJobsRetryPayload;
62
+
63
+ /** Trust Task response type URI (request type URI + "#response"). */
64
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/registry/sync-jobs/retry/0.1#response" as const;
65
+
66
+ /** Stable alias for this specification's success-response payload shape. */
67
+ export type Response = VTCRegistrySyncJobsRetryResponsePayload;
68
+
69
+ /**
70
+ * This specification's payload schema, as a value.
71
+ *
72
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
73
+ * rather than only as a `.json` file because TypeScript types are erased
74
+ * at runtime: without a schema a consumer has nothing to validate, and
75
+ * every REQUIRED payload member is optional in practice. Cross-file
76
+ * `$ref`s are already inlined, so it needs no resolver.
77
+ */
78
+ export const PAYLOAD_SCHEMA = {
79
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
80
+ "$id": "https://trusttasks.org/spec/vtc/registry/sync-jobs/retry/0.1",
81
+ "title": "VTC Registry Sync Jobs Retry — payload",
82
+ "description": "Requeue an abandoned trust-registry reconciliation job so the community's reconciler dispatches it again.",
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "oneOf": [
86
+ {
87
+ "required": [
88
+ "jobId"
89
+ ],
90
+ "not": {
91
+ "required": [
92
+ "allFailed"
93
+ ]
94
+ }
95
+ },
96
+ {
97
+ "required": [
98
+ "allFailed"
99
+ ],
100
+ "not": {
101
+ "required": [
102
+ "jobId"
103
+ ]
104
+ }
105
+ }
106
+ ],
107
+ "properties": {
108
+ "jobId": {
109
+ "type": "string",
110
+ "minLength": 1,
111
+ "description": "The single job to requeue, from `vtc/registry/sync-jobs/list`."
112
+ },
113
+ "allFailed": {
114
+ "type": "boolean",
115
+ "const": true,
116
+ "description": "Requeue every job in the terminal `failed` state. Spelled as its own member rather than an absent `jobId` so that a client bug which drops the identifier cannot silently become a bulk operation."
117
+ },
118
+ "ext": {
119
+ "$ref": "#/$defs/Ext"
120
+ }
121
+ },
122
+ "$defs": {
123
+ "Requeued": {
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": [
127
+ "jobId"
128
+ ],
129
+ "properties": {
130
+ "jobId": {
131
+ "type": "string",
132
+ "minLength": 1
133
+ },
134
+ "memberDid": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "description": "The member whose record the requeued job carries."
138
+ },
139
+ "ext": {
140
+ "$ref": "#/$defs/Ext"
141
+ }
142
+ }
143
+ },
144
+ "Skipped": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "jobId",
149
+ "reason"
150
+ ],
151
+ "properties": {
152
+ "jobId": {
153
+ "type": "string",
154
+ "minLength": 1
155
+ },
156
+ "reason": {
157
+ "type": "string",
158
+ "enum": [
159
+ "notFailed",
160
+ "notFound"
161
+ ],
162
+ "description": "`notFailed` — the reconciler still owns the job, so requeueing it would dispatch the same mutation twice. `notFound` — no such job; it may already have been retried, discarded, or swept."
163
+ },
164
+ "ext": {
165
+ "$ref": "#/$defs/Ext"
166
+ }
167
+ }
168
+ },
169
+ "Response": {
170
+ "$anchor": "response",
171
+ "title": "VTC Registry Sync Jobs Retry — response payload",
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "requeued",
176
+ "skipped"
177
+ ],
178
+ "properties": {
179
+ "requeued": {
180
+ "type": "array",
181
+ "items": {
182
+ "$ref": "#/$defs/Requeued"
183
+ },
184
+ "description": "Jobs now scheduled for dispatch. Empty is a valid answer and is not an error."
185
+ },
186
+ "skipped": {
187
+ "type": "array",
188
+ "items": {
189
+ "$ref": "#/$defs/Skipped"
190
+ },
191
+ "description": "Jobs the maintainer declined to requeue, each with why. Reported rather than failing the task, so a bulk retry is not defeated by one ineligible row."
192
+ },
193
+ "ext": {
194
+ "$ref": "#/$defs/Ext"
195
+ }
196
+ }
197
+ },
198
+ "Ext": {
199
+ "title": "Ext",
200
+ "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.",
201
+ "type": "object",
202
+ "minProperties": 1,
203
+ "additionalProperties": true,
204
+ "propertyNames": {
205
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
206
+ }
207
+ }
208
+ }
209
+ } as const;
210
+
211
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
212
+ export const RESPONSE_PAYLOAD_SCHEMA = {
213
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
214
+ "$ref": "#/$defs/Response",
215
+ "$defs": {
216
+ "Requeued": {
217
+ "type": "object",
218
+ "additionalProperties": false,
219
+ "required": [
220
+ "jobId"
221
+ ],
222
+ "properties": {
223
+ "jobId": {
224
+ "type": "string",
225
+ "minLength": 1
226
+ },
227
+ "memberDid": {
228
+ "type": "string",
229
+ "minLength": 1,
230
+ "description": "The member whose record the requeued job carries."
231
+ },
232
+ "ext": {
233
+ "$ref": "#/$defs/Ext"
234
+ }
235
+ }
236
+ },
237
+ "Skipped": {
238
+ "type": "object",
239
+ "additionalProperties": false,
240
+ "required": [
241
+ "jobId",
242
+ "reason"
243
+ ],
244
+ "properties": {
245
+ "jobId": {
246
+ "type": "string",
247
+ "minLength": 1
248
+ },
249
+ "reason": {
250
+ "type": "string",
251
+ "enum": [
252
+ "notFailed",
253
+ "notFound"
254
+ ],
255
+ "description": "`notFailed` — the reconciler still owns the job, so requeueing it would dispatch the same mutation twice. `notFound` — no such job; it may already have been retried, discarded, or swept."
256
+ },
257
+ "ext": {
258
+ "$ref": "#/$defs/Ext"
259
+ }
260
+ }
261
+ },
262
+ "Response": {
263
+ "$anchor": "response",
264
+ "title": "VTC Registry Sync Jobs Retry — response payload",
265
+ "type": "object",
266
+ "additionalProperties": false,
267
+ "required": [
268
+ "requeued",
269
+ "skipped"
270
+ ],
271
+ "properties": {
272
+ "requeued": {
273
+ "type": "array",
274
+ "items": {
275
+ "$ref": "#/$defs/Requeued"
276
+ },
277
+ "description": "Jobs now scheduled for dispatch. Empty is a valid answer and is not an error."
278
+ },
279
+ "skipped": {
280
+ "type": "array",
281
+ "items": {
282
+ "$ref": "#/$defs/Skipped"
283
+ },
284
+ "description": "Jobs the maintainer declined to requeue, each with why. Reported rather than failing the task, so a bulk retry is not defeated by one ineligible row."
285
+ },
286
+ "ext": {
287
+ "$ref": "#/$defs/Ext"
288
+ }
289
+ }
290
+ },
291
+ "Ext": {
292
+ "title": "Ext",
293
+ "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.",
294
+ "type": "object",
295
+ "minProperties": 1,
296
+ "additionalProperties": true,
297
+ "propertyNames": {
298
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
299
+ }
300
+ }
301
+ }
302
+ } as const;
303
+
304
+ /**
305
+ * SPEC.md §7.2 policy for the request variant, from this specification's
306
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
307
+ * per-specification and cannot be derived from the document alone, and
308
+ * item 2 needs the schema this carries.
309
+ */
310
+ export const SPEC = {
311
+ typeUri: TYPE_URI,
312
+ isBearer: false,
313
+ isProofRequired: true,
314
+ isRecipientRequired: true,
315
+ isIssuedAtRequired: true,
316
+ payloadSchema: PAYLOAD_SCHEMA,
317
+ } as const;
318
+
319
+ /**
320
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
321
+ * tracks the *issuer* party's requirement because a response swaps the
322
+ * parties (§7.3 item 5).
323
+ */
324
+ export const RESPONSE_SPEC = {
325
+ typeUri: RESPONSE_TYPE_URI,
326
+ isBearer: false,
327
+ isProofRequired: true,
328
+ isRecipientRequired: true,
329
+ isIssuedAtRequired: true,
330
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
331
+ } as const;