@openvtc/trust-tasks 0.28.17 → 0.28.18

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 (37) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/_shared/components.d.ts +26 -1
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +12 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +12 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/vta/collection/_shared/0.1/collection.d.ts +2 -2
  9. package/dist/vta/collection/_shared/0.1/collection.d.ts.map +1 -1
  10. package/dist/vta/collection/list/0.1/payload.d.ts +4 -4
  11. package/dist/vta/collection/list/0.1/payload.js +2 -2
  12. package/dist/vta/collection/list/0.1/payload.js.map +1 -1
  13. package/dist/vta/collection/settings/set/0.1/payload.d.ts +469 -0
  14. package/dist/vta/collection/settings/set/0.1/payload.d.ts.map +1 -0
  15. package/dist/vta/collection/settings/set/0.1/payload.js +275 -0
  16. package/dist/vta/collection/settings/set/0.1/payload.js.map +1 -0
  17. package/dist/vta/collection/settings/show/0.1/payload.d.ts +437 -0
  18. package/dist/vta/collection/settings/show/0.1/payload.d.ts.map +1 -0
  19. package/dist/vta/collection/settings/show/0.1/payload.js +260 -0
  20. package/dist/vta/collection/settings/show/0.1/payload.js.map +1 -0
  21. package/dist/vtn/registry/check/0.1/payload.d.ts +528 -0
  22. package/dist/vtn/registry/check/0.1/payload.d.ts.map +1 -0
  23. package/dist/vtn/registry/check/0.1/payload.js +282 -0
  24. package/dist/vtn/registry/check/0.1/payload.js.map +1 -0
  25. package/dist/vtn/registry/status/0.1/payload.d.ts +736 -0
  26. package/dist/vtn/registry/status/0.1/payload.d.ts.map +1 -0
  27. package/dist/vtn/registry/status/0.1/payload.js +421 -0
  28. package/dist/vtn/registry/status/0.1/payload.js.map +1 -0
  29. package/package.json +1 -1
  30. package/src/_shared/components.ts +26 -1
  31. package/src/index.ts +12 -0
  32. package/src/vta/collection/_shared/0.1/collection.ts +2 -2
  33. package/src/vta/collection/list/0.1/payload.ts +2 -2
  34. package/src/vta/collection/settings/set/0.1/payload.ts +319 -0
  35. package/src/vta/collection/settings/show/0.1/payload.ts +296 -0
  36. package/src/vtn/registry/check/0.1/payload.ts +365 -0
  37. package/src/vtn/registry/status/0.1/payload.ts +502 -0
@@ -0,0 +1,502 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtn/registry/status/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Did_VtnV0_1 as Did, Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * An administrator's request for how the network's membership stands in its trust registry. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTNRegistryStatusPayload {
13
+ ext?: Ext;
14
+ }
15
+ export interface VTNRegistryStatusResponsePayload {
16
+ registry: Did;
17
+ authority: Did;
18
+ resource: string;
19
+ actions: {
20
+ member: string;
21
+ listed: string;
22
+ };
23
+ publishes: "members" | "membersAndListed";
24
+ writer: string;
25
+ connected: boolean;
26
+ lastSync?: Sync;
27
+ reachable: boolean;
28
+ records?: Row[];
29
+ reason?: string;
30
+ ext?: Ext;
31
+ }
32
+ export interface Sync {
33
+ /**
34
+ * When the reconcile ran.
35
+ */
36
+ reconciledAt?: string;
37
+ /**
38
+ * Records the entries project.
39
+ */
40
+ expected: number;
41
+ /**
42
+ * Records written, by party.
43
+ */
44
+ put: string[];
45
+ /**
46
+ * Records deleted, as `party action`.
47
+ */
48
+ deleted: string[];
49
+ /**
50
+ * Writes that failed, as `party: why`.
51
+ */
52
+ failed: string[];
53
+ /**
54
+ * Why nothing could be written at all, when so.
55
+ */
56
+ blocked?: string;
57
+ }
58
+ export interface Row {
59
+ did: Did;
60
+ /**
61
+ * The action the entries project, if any.
62
+ */
63
+ projected?: string;
64
+ /**
65
+ * The action the registry holds, if any.
66
+ */
67
+ held?: string;
68
+ result: "ok" | "missing" | "stale" | "wrong";
69
+ }
70
+
71
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
72
+ export type { Did, Ext };
73
+
74
+ /** Trust Task type URI. */
75
+ export const TYPE_URI = "https://trusttasks.org/spec/vtn/registry/status/0.1" as const;
76
+
77
+ /**
78
+ * The earlier version of this specification that this one declares it
79
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
80
+ * `null`. Only the direct declaration — follow the chain with
81
+ * `extendsChain` / `readForSpec`.
82
+ */
83
+ export const EXTENDS: string | null = null;
84
+
85
+ /**
86
+ * Why this version is deprecated, or `null` while it is current. A
87
+ * superseded or retired version is still supported, and is withdrawn from
88
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
89
+ * Versions").
90
+ */
91
+ export const DEPRECATION: string | null = null;
92
+
93
+ /** Stable alias for this specification's request payload shape. */
94
+ export type Payload = VTNRegistryStatusPayload;
95
+
96
+ /** Trust Task response type URI (request type URI + "#response"). */
97
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtn/registry/status/0.1#response" as const;
98
+
99
+ /** Stable alias for this specification's success-response payload shape. */
100
+ export type Response = VTNRegistryStatusResponsePayload;
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/vtn/registry/status/0.1",
114
+ "title": "VTN Registry — Status — payload",
115
+ "description": "An administrator's request for how the network's membership stands in its trust registry. The outer document members are owned by the framework — SPEC §6.3.",
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "properties": {
119
+ "ext": {
120
+ "$ref": "#/$defs/Ext"
121
+ }
122
+ },
123
+ "$defs": {
124
+ "Sync": {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": [
128
+ "expected",
129
+ "put",
130
+ "deleted",
131
+ "failed"
132
+ ],
133
+ "properties": {
134
+ "reconciledAt": {
135
+ "type": "string",
136
+ "format": "date-time",
137
+ "description": "When the reconcile ran."
138
+ },
139
+ "expected": {
140
+ "type": "integer",
141
+ "minimum": 0,
142
+ "description": "Records the entries project."
143
+ },
144
+ "put": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "string"
148
+ },
149
+ "description": "Records written, by party."
150
+ },
151
+ "deleted": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "string"
155
+ },
156
+ "description": "Records deleted, as `party action`."
157
+ },
158
+ "failed": {
159
+ "type": "array",
160
+ "items": {
161
+ "type": "string"
162
+ },
163
+ "description": "Writes that failed, as `party: why`."
164
+ },
165
+ "blocked": {
166
+ "type": "string",
167
+ "description": "Why nothing could be written at all, when so."
168
+ }
169
+ }
170
+ },
171
+ "Row": {
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "did",
176
+ "result"
177
+ ],
178
+ "properties": {
179
+ "did": {
180
+ "$ref": "#/$defs/Did"
181
+ },
182
+ "projected": {
183
+ "type": "string",
184
+ "description": "The action the entries project, if any."
185
+ },
186
+ "held": {
187
+ "type": "string",
188
+ "description": "The action the registry holds, if any."
189
+ },
190
+ "result": {
191
+ "enum": [
192
+ "ok",
193
+ "missing",
194
+ "stale",
195
+ "wrong"
196
+ ]
197
+ }
198
+ }
199
+ },
200
+ "Response": {
201
+ "$anchor": "response",
202
+ "title": "VTN Registry — Status — response payload",
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "required": [
206
+ "registry",
207
+ "authority",
208
+ "resource",
209
+ "actions",
210
+ "publishes",
211
+ "writer",
212
+ "connected",
213
+ "reachable"
214
+ ],
215
+ "properties": {
216
+ "registry": {
217
+ "$ref": "#/$defs/Did"
218
+ },
219
+ "authority": {
220
+ "$ref": "#/$defs/Did"
221
+ },
222
+ "resource": {
223
+ "type": "string",
224
+ "minLength": 1
225
+ },
226
+ "actions": {
227
+ "type": "object",
228
+ "additionalProperties": false,
229
+ "required": [
230
+ "member",
231
+ "listed"
232
+ ],
233
+ "properties": {
234
+ "member": {
235
+ "type": "string",
236
+ "minLength": 1
237
+ },
238
+ "listed": {
239
+ "type": "string",
240
+ "minLength": 1
241
+ }
242
+ }
243
+ },
244
+ "publishes": {
245
+ "enum": [
246
+ "members",
247
+ "membersAndListed"
248
+ ]
249
+ },
250
+ "writer": {
251
+ "type": "string",
252
+ "maxLength": 1024
253
+ },
254
+ "connected": {
255
+ "type": "boolean"
256
+ },
257
+ "lastSync": {
258
+ "$ref": "#/$defs/Sync"
259
+ },
260
+ "reachable": {
261
+ "type": "boolean"
262
+ },
263
+ "records": {
264
+ "type": "array",
265
+ "items": {
266
+ "$ref": "#/$defs/Row"
267
+ }
268
+ },
269
+ "reason": {
270
+ "type": "string",
271
+ "maxLength": 1024
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
+ "Did": {
289
+ "type": "string",
290
+ "pattern": "^did:[a-z0-9]+:.+$",
291
+ "maxLength": 2048,
292
+ "description": "A DID."
293
+ }
294
+ }
295
+ } as const;
296
+
297
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
298
+ export const RESPONSE_PAYLOAD_SCHEMA = {
299
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
300
+ "$ref": "#/$defs/Response",
301
+ "$defs": {
302
+ "Sync": {
303
+ "type": "object",
304
+ "additionalProperties": false,
305
+ "required": [
306
+ "expected",
307
+ "put",
308
+ "deleted",
309
+ "failed"
310
+ ],
311
+ "properties": {
312
+ "reconciledAt": {
313
+ "type": "string",
314
+ "format": "date-time",
315
+ "description": "When the reconcile ran."
316
+ },
317
+ "expected": {
318
+ "type": "integer",
319
+ "minimum": 0,
320
+ "description": "Records the entries project."
321
+ },
322
+ "put": {
323
+ "type": "array",
324
+ "items": {
325
+ "type": "string"
326
+ },
327
+ "description": "Records written, by party."
328
+ },
329
+ "deleted": {
330
+ "type": "array",
331
+ "items": {
332
+ "type": "string"
333
+ },
334
+ "description": "Records deleted, as `party action`."
335
+ },
336
+ "failed": {
337
+ "type": "array",
338
+ "items": {
339
+ "type": "string"
340
+ },
341
+ "description": "Writes that failed, as `party: why`."
342
+ },
343
+ "blocked": {
344
+ "type": "string",
345
+ "description": "Why nothing could be written at all, when so."
346
+ }
347
+ }
348
+ },
349
+ "Row": {
350
+ "type": "object",
351
+ "additionalProperties": false,
352
+ "required": [
353
+ "did",
354
+ "result"
355
+ ],
356
+ "properties": {
357
+ "did": {
358
+ "$ref": "#/$defs/Did"
359
+ },
360
+ "projected": {
361
+ "type": "string",
362
+ "description": "The action the entries project, if any."
363
+ },
364
+ "held": {
365
+ "type": "string",
366
+ "description": "The action the registry holds, if any."
367
+ },
368
+ "result": {
369
+ "enum": [
370
+ "ok",
371
+ "missing",
372
+ "stale",
373
+ "wrong"
374
+ ]
375
+ }
376
+ }
377
+ },
378
+ "Response": {
379
+ "$anchor": "response",
380
+ "title": "VTN Registry — Status — response payload",
381
+ "type": "object",
382
+ "additionalProperties": false,
383
+ "required": [
384
+ "registry",
385
+ "authority",
386
+ "resource",
387
+ "actions",
388
+ "publishes",
389
+ "writer",
390
+ "connected",
391
+ "reachable"
392
+ ],
393
+ "properties": {
394
+ "registry": {
395
+ "$ref": "#/$defs/Did"
396
+ },
397
+ "authority": {
398
+ "$ref": "#/$defs/Did"
399
+ },
400
+ "resource": {
401
+ "type": "string",
402
+ "minLength": 1
403
+ },
404
+ "actions": {
405
+ "type": "object",
406
+ "additionalProperties": false,
407
+ "required": [
408
+ "member",
409
+ "listed"
410
+ ],
411
+ "properties": {
412
+ "member": {
413
+ "type": "string",
414
+ "minLength": 1
415
+ },
416
+ "listed": {
417
+ "type": "string",
418
+ "minLength": 1
419
+ }
420
+ }
421
+ },
422
+ "publishes": {
423
+ "enum": [
424
+ "members",
425
+ "membersAndListed"
426
+ ]
427
+ },
428
+ "writer": {
429
+ "type": "string",
430
+ "maxLength": 1024
431
+ },
432
+ "connected": {
433
+ "type": "boolean"
434
+ },
435
+ "lastSync": {
436
+ "$ref": "#/$defs/Sync"
437
+ },
438
+ "reachable": {
439
+ "type": "boolean"
440
+ },
441
+ "records": {
442
+ "type": "array",
443
+ "items": {
444
+ "$ref": "#/$defs/Row"
445
+ }
446
+ },
447
+ "reason": {
448
+ "type": "string",
449
+ "maxLength": 1024
450
+ },
451
+ "ext": {
452
+ "$ref": "#/$defs/Ext"
453
+ }
454
+ }
455
+ },
456
+ "Ext": {
457
+ "title": "Ext",
458
+ "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.",
459
+ "type": "object",
460
+ "minProperties": 1,
461
+ "additionalProperties": true,
462
+ "propertyNames": {
463
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
464
+ }
465
+ },
466
+ "Did": {
467
+ "type": "string",
468
+ "pattern": "^did:[a-z0-9]+:.+$",
469
+ "maxLength": 2048,
470
+ "description": "A DID."
471
+ }
472
+ }
473
+ } as const;
474
+
475
+ /**
476
+ * SPEC.md §7.2 policy for the request variant, from this specification's
477
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
478
+ * per-specification and cannot be derived from the document alone, and
479
+ * item 2 needs the schema this carries.
480
+ */
481
+ export const SPEC = {
482
+ typeUri: TYPE_URI,
483
+ isBearer: false,
484
+ isProofRequired: true,
485
+ isRecipientRequired: true,
486
+ isIssuedAtRequired: false,
487
+ payloadSchema: PAYLOAD_SCHEMA,
488
+ } as const;
489
+
490
+ /**
491
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
492
+ * tracks the *issuer* party's requirement because a response swaps the
493
+ * parties (§7.3 item 5).
494
+ */
495
+ export const RESPONSE_SPEC = {
496
+ typeUri: RESPONSE_TYPE_URI,
497
+ isBearer: false,
498
+ isProofRequired: true,
499
+ isRecipientRequired: true,
500
+ isIssuedAtRequired: false,
501
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
502
+ } as const;