@openvtc/trust-tasks 0.28.16 → 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 (42) hide show
  1. package/CHANGELOG.md +43 -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 +15 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +15 -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/vtc/networks/preview/0.1/payload.d.ts +696 -0
  22. package/dist/vtc/networks/preview/0.1/payload.d.ts.map +1 -0
  23. package/dist/vtc/networks/preview/0.1/payload.js +376 -0
  24. package/dist/vtc/networks/preview/0.1/payload.js.map +1 -0
  25. package/dist/vtn/registry/check/0.1/payload.d.ts +528 -0
  26. package/dist/vtn/registry/check/0.1/payload.d.ts.map +1 -0
  27. package/dist/vtn/registry/check/0.1/payload.js +282 -0
  28. package/dist/vtn/registry/check/0.1/payload.js.map +1 -0
  29. package/dist/vtn/registry/status/0.1/payload.d.ts +736 -0
  30. package/dist/vtn/registry/status/0.1/payload.d.ts.map +1 -0
  31. package/dist/vtn/registry/status/0.1/payload.js +421 -0
  32. package/dist/vtn/registry/status/0.1/payload.js.map +1 -0
  33. package/package.json +1 -1
  34. package/src/_shared/components.ts +26 -1
  35. package/src/index.ts +15 -0
  36. package/src/vta/collection/_shared/0.1/collection.ts +2 -2
  37. package/src/vta/collection/list/0.1/payload.ts +2 -2
  38. package/src/vta/collection/settings/set/0.1/payload.ts +319 -0
  39. package/src/vta/collection/settings/show/0.1/payload.ts +296 -0
  40. package/src/vtc/networks/preview/0.1/payload.ts +483 -0
  41. package/src/vtn/registry/check/0.1/payload.ts +365 -0
  42. package/src/vtn/registry/status/0.1/payload.ts +502 -0
@@ -0,0 +1,483 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/networks/preview/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * Read a network before joining it: what it says about itself, the roles it requires a group for, and whether it lists the community. The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCNetworksPreviewPayload {
13
+ /**
14
+ * The network's API base, as the network's administrators gave it.
15
+ */
16
+ url: string;
17
+ /**
18
+ * The DID the administrator expects at `url`. When present, the community refuses if the network found there answers as another DID.
19
+ */
20
+ network?: string;
21
+ ext?: Ext;
22
+ }
23
+ /**
24
+ * The network, as the community found it at `url`, and where the community stands with it.
25
+ */
26
+ export interface VTCNetworksPreviewResponsePayload {
27
+ /**
28
+ * The DID the network at `url` answers as.
29
+ */
30
+ network: string;
31
+ /**
32
+ * The URL the network was read at.
33
+ */
34
+ url: string;
35
+ /**
36
+ * The network's name, from its profile.
37
+ */
38
+ name: string;
39
+ /**
40
+ * The network's description, from its profile.
41
+ */
42
+ description?: string;
43
+ /**
44
+ * The network's identified owner (VTI-VTN-002), from its profile.
45
+ */
46
+ owner?: string;
47
+ framework?: Framework;
48
+ /**
49
+ * The roles the network asks members to register a group for. `vtc/networks/join` must assign a group to each one marked `required`.
50
+ *
51
+ * @maxItems 64
52
+ */
53
+ roles: Role[];
54
+ /**
55
+ * `true` only when the network holds an entry for the community whose listing verifies as the network's and lists the community as a community.
56
+ */
57
+ listed: boolean;
58
+ /**
59
+ * The network's state for the community's entry, when it holds a published one: `listed` (not yet acknowledged), `acknowledged` (a member), `repudiated` (the community rejected the listing) or `suspended`.
60
+ */
61
+ entryState?: "listed" | "acknowledged" | "repudiated" | "suspended";
62
+ /**
63
+ * Why `listed` is `false`, in words for an administrator.
64
+ */
65
+ notListedReason?: string;
66
+ /**
67
+ * The community's own record of the membership, when it holds one (`vtc/networks/show`).
68
+ */
69
+ membershipState?: "acknowledged" | "repudiated" | "departed";
70
+ ext?: Ext;
71
+ }
72
+ export interface Framework {
73
+ /**
74
+ * The network's governance framework.
75
+ */
76
+ iri: string;
77
+ /**
78
+ * The framework version the network operates under.
79
+ */
80
+ version: string;
81
+ }
82
+ export interface Role {
83
+ /**
84
+ * The role's name, as `vtc/networks/join` assigns a group to it.
85
+ */
86
+ name: string;
87
+ /**
88
+ * Whether the network admits a member only once a group is registered for this role.
89
+ */
90
+ required: boolean;
91
+ /**
92
+ * What the network uses the role for.
93
+ */
94
+ description?: string;
95
+ }
96
+
97
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
98
+ export type { Ext };
99
+
100
+ /** Trust Task type URI. */
101
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/networks/preview/0.1" as const;
102
+
103
+ /**
104
+ * The earlier version of this specification that this one declares it
105
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
106
+ * `null`. Only the direct declaration — follow the chain with
107
+ * `extendsChain` / `readForSpec`.
108
+ */
109
+ export const EXTENDS: string | null = null;
110
+
111
+ /**
112
+ * Why this version is deprecated, or `null` while it is current. A
113
+ * superseded or retired version is still supported, and is withdrawn from
114
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
115
+ * Versions").
116
+ */
117
+ export const DEPRECATION: string | null = null;
118
+
119
+ /** Stable alias for this specification's request payload shape. */
120
+ export type Payload = VTCNetworksPreviewPayload;
121
+
122
+ /** Trust Task response type URI (request type URI + "#response"). */
123
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/networks/preview/0.1#response" as const;
124
+
125
+ /** Stable alias for this specification's success-response payload shape. */
126
+ export type Response = VTCNetworksPreviewResponsePayload;
127
+
128
+ /**
129
+ * This specification's payload schema, as a value.
130
+ *
131
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
132
+ * rather than only as a `.json` file because TypeScript types are erased
133
+ * at runtime: without a schema a consumer has nothing to validate, and
134
+ * every REQUIRED payload member is optional in practice. Cross-file
135
+ * `$ref`s are already inlined, so it needs no resolver.
136
+ */
137
+ export const PAYLOAD_SCHEMA = {
138
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
139
+ "$id": "https://trusttasks.org/spec/vtc/networks/preview/0.1",
140
+ "title": "VTC Networks — Preview — payload",
141
+ "description": "Read a network before joining it: what it says about itself, the roles it requires a group for, and whether it lists the community. The outer document members are owned by the framework — SPEC §6.3.",
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "required": [
145
+ "url"
146
+ ],
147
+ "properties": {
148
+ "url": {
149
+ "type": "string",
150
+ "format": "uri",
151
+ "maxLength": 2048,
152
+ "description": "The network's API base, as the network's administrators gave it."
153
+ },
154
+ "network": {
155
+ "type": "string",
156
+ "pattern": "^did:[a-z0-9]+:.+$",
157
+ "maxLength": 2048,
158
+ "description": "The DID the administrator expects at `url`. When present, the community refuses if the network found there answers as another DID."
159
+ },
160
+ "ext": {
161
+ "$ref": "#/$defs/Ext"
162
+ }
163
+ },
164
+ "$defs": {
165
+ "Role": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "required": [
169
+ "name",
170
+ "required"
171
+ ],
172
+ "properties": {
173
+ "name": {
174
+ "type": "string",
175
+ "minLength": 1,
176
+ "maxLength": 64,
177
+ "description": "The role's name, as `vtc/networks/join` assigns a group to it."
178
+ },
179
+ "required": {
180
+ "type": "boolean",
181
+ "description": "Whether the network admits a member only once a group is registered for this role."
182
+ },
183
+ "description": {
184
+ "type": "string",
185
+ "maxLength": 1024,
186
+ "description": "What the network uses the role for."
187
+ }
188
+ }
189
+ },
190
+ "Framework": {
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": [
194
+ "iri",
195
+ "version"
196
+ ],
197
+ "properties": {
198
+ "iri": {
199
+ "type": "string",
200
+ "maxLength": 2048,
201
+ "description": "The network's governance framework."
202
+ },
203
+ "version": {
204
+ "type": "string",
205
+ "maxLength": 64,
206
+ "description": "The framework version the network operates under."
207
+ }
208
+ }
209
+ },
210
+ "Response": {
211
+ "$anchor": "response",
212
+ "title": "VTC Networks — Preview — response payload",
213
+ "description": "The network, as the community found it at `url`, and where the community stands with it.",
214
+ "type": "object",
215
+ "additionalProperties": false,
216
+ "required": [
217
+ "network",
218
+ "url",
219
+ "name",
220
+ "roles",
221
+ "listed"
222
+ ],
223
+ "properties": {
224
+ "network": {
225
+ "type": "string",
226
+ "pattern": "^did:[a-z0-9]+:.+$",
227
+ "maxLength": 2048,
228
+ "description": "The DID the network at `url` answers as."
229
+ },
230
+ "url": {
231
+ "type": "string",
232
+ "format": "uri",
233
+ "maxLength": 2048,
234
+ "description": "The URL the network was read at."
235
+ },
236
+ "name": {
237
+ "type": "string",
238
+ "maxLength": 256,
239
+ "description": "The network's name, from its profile."
240
+ },
241
+ "description": {
242
+ "type": "string",
243
+ "maxLength": 4096,
244
+ "description": "The network's description, from its profile."
245
+ },
246
+ "owner": {
247
+ "type": "string",
248
+ "maxLength": 512,
249
+ "description": "The network's identified owner (VTI-VTN-002), from its profile."
250
+ },
251
+ "framework": {
252
+ "$ref": "#/$defs/Framework"
253
+ },
254
+ "roles": {
255
+ "type": "array",
256
+ "maxItems": 64,
257
+ "items": {
258
+ "$ref": "#/$defs/Role"
259
+ },
260
+ "description": "The roles the network asks members to register a group for. `vtc/networks/join` must assign a group to each one marked `required`."
261
+ },
262
+ "listed": {
263
+ "type": "boolean",
264
+ "description": "`true` only when the network holds an entry for the community whose listing verifies as the network's and lists the community as a community."
265
+ },
266
+ "entryState": {
267
+ "type": "string",
268
+ "enum": [
269
+ "listed",
270
+ "acknowledged",
271
+ "repudiated",
272
+ "suspended"
273
+ ],
274
+ "description": "The network's state for the community's entry, when it holds a published one: `listed` (not yet acknowledged), `acknowledged` (a member), `repudiated` (the community rejected the listing) or `suspended`."
275
+ },
276
+ "notListedReason": {
277
+ "type": "string",
278
+ "maxLength": 1024,
279
+ "description": "Why `listed` is `false`, in words for an administrator."
280
+ },
281
+ "membershipState": {
282
+ "type": "string",
283
+ "enum": [
284
+ "acknowledged",
285
+ "repudiated",
286
+ "departed"
287
+ ],
288
+ "description": "The community's own record of the membership, when it holds one (`vtc/networks/show`)."
289
+ },
290
+ "ext": {
291
+ "$ref": "#/$defs/Ext"
292
+ }
293
+ }
294
+ },
295
+ "Ext": {
296
+ "title": "Ext",
297
+ "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.",
298
+ "type": "object",
299
+ "minProperties": 1,
300
+ "additionalProperties": true,
301
+ "propertyNames": {
302
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
303
+ }
304
+ }
305
+ }
306
+ } as const;
307
+
308
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
309
+ export const RESPONSE_PAYLOAD_SCHEMA = {
310
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
311
+ "$ref": "#/$defs/Response",
312
+ "$defs": {
313
+ "Role": {
314
+ "type": "object",
315
+ "additionalProperties": false,
316
+ "required": [
317
+ "name",
318
+ "required"
319
+ ],
320
+ "properties": {
321
+ "name": {
322
+ "type": "string",
323
+ "minLength": 1,
324
+ "maxLength": 64,
325
+ "description": "The role's name, as `vtc/networks/join` assigns a group to it."
326
+ },
327
+ "required": {
328
+ "type": "boolean",
329
+ "description": "Whether the network admits a member only once a group is registered for this role."
330
+ },
331
+ "description": {
332
+ "type": "string",
333
+ "maxLength": 1024,
334
+ "description": "What the network uses the role for."
335
+ }
336
+ }
337
+ },
338
+ "Framework": {
339
+ "type": "object",
340
+ "additionalProperties": false,
341
+ "required": [
342
+ "iri",
343
+ "version"
344
+ ],
345
+ "properties": {
346
+ "iri": {
347
+ "type": "string",
348
+ "maxLength": 2048,
349
+ "description": "The network's governance framework."
350
+ },
351
+ "version": {
352
+ "type": "string",
353
+ "maxLength": 64,
354
+ "description": "The framework version the network operates under."
355
+ }
356
+ }
357
+ },
358
+ "Response": {
359
+ "$anchor": "response",
360
+ "title": "VTC Networks — Preview — response payload",
361
+ "description": "The network, as the community found it at `url`, and where the community stands with it.",
362
+ "type": "object",
363
+ "additionalProperties": false,
364
+ "required": [
365
+ "network",
366
+ "url",
367
+ "name",
368
+ "roles",
369
+ "listed"
370
+ ],
371
+ "properties": {
372
+ "network": {
373
+ "type": "string",
374
+ "pattern": "^did:[a-z0-9]+:.+$",
375
+ "maxLength": 2048,
376
+ "description": "The DID the network at `url` answers as."
377
+ },
378
+ "url": {
379
+ "type": "string",
380
+ "format": "uri",
381
+ "maxLength": 2048,
382
+ "description": "The URL the network was read at."
383
+ },
384
+ "name": {
385
+ "type": "string",
386
+ "maxLength": 256,
387
+ "description": "The network's name, from its profile."
388
+ },
389
+ "description": {
390
+ "type": "string",
391
+ "maxLength": 4096,
392
+ "description": "The network's description, from its profile."
393
+ },
394
+ "owner": {
395
+ "type": "string",
396
+ "maxLength": 512,
397
+ "description": "The network's identified owner (VTI-VTN-002), from its profile."
398
+ },
399
+ "framework": {
400
+ "$ref": "#/$defs/Framework"
401
+ },
402
+ "roles": {
403
+ "type": "array",
404
+ "maxItems": 64,
405
+ "items": {
406
+ "$ref": "#/$defs/Role"
407
+ },
408
+ "description": "The roles the network asks members to register a group for. `vtc/networks/join` must assign a group to each one marked `required`."
409
+ },
410
+ "listed": {
411
+ "type": "boolean",
412
+ "description": "`true` only when the network holds an entry for the community whose listing verifies as the network's and lists the community as a community."
413
+ },
414
+ "entryState": {
415
+ "type": "string",
416
+ "enum": [
417
+ "listed",
418
+ "acknowledged",
419
+ "repudiated",
420
+ "suspended"
421
+ ],
422
+ "description": "The network's state for the community's entry, when it holds a published one: `listed` (not yet acknowledged), `acknowledged` (a member), `repudiated` (the community rejected the listing) or `suspended`."
423
+ },
424
+ "notListedReason": {
425
+ "type": "string",
426
+ "maxLength": 1024,
427
+ "description": "Why `listed` is `false`, in words for an administrator."
428
+ },
429
+ "membershipState": {
430
+ "type": "string",
431
+ "enum": [
432
+ "acknowledged",
433
+ "repudiated",
434
+ "departed"
435
+ ],
436
+ "description": "The community's own record of the membership, when it holds one (`vtc/networks/show`)."
437
+ },
438
+ "ext": {
439
+ "$ref": "#/$defs/Ext"
440
+ }
441
+ }
442
+ },
443
+ "Ext": {
444
+ "title": "Ext",
445
+ "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.",
446
+ "type": "object",
447
+ "minProperties": 1,
448
+ "additionalProperties": true,
449
+ "propertyNames": {
450
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
451
+ }
452
+ }
453
+ }
454
+ } as const;
455
+
456
+ /**
457
+ * SPEC.md §7.2 policy for the request variant, from this specification's
458
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
459
+ * per-specification and cannot be derived from the document alone, and
460
+ * item 2 needs the schema this carries.
461
+ */
462
+ export const SPEC = {
463
+ typeUri: TYPE_URI,
464
+ isBearer: false,
465
+ isProofRequired: true,
466
+ isRecipientRequired: true,
467
+ isIssuedAtRequired: false,
468
+ payloadSchema: PAYLOAD_SCHEMA,
469
+ } as const;
470
+
471
+ /**
472
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
473
+ * tracks the *issuer* party's requirement because a response swaps the
474
+ * parties (§7.3 item 5).
475
+ */
476
+ export const RESPONSE_SPEC = {
477
+ typeUri: RESPONSE_TYPE_URI,
478
+ isBearer: false,
479
+ isProofRequired: true,
480
+ isRecipientRequired: true,
481
+ isIssuedAtRequired: false,
482
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
483
+ } as const;