@openvtc/trust-tasks 0.28.16 → 0.28.17
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 +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/networks/preview/0.1/payload.d.ts +696 -0
- package/dist/vtc/networks/preview/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/networks/preview/0.1/payload.js +376 -0
- package/dist/vtc/networks/preview/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/vtc/networks/preview/0.1/payload.ts +483 -0
|
@@ -0,0 +1,696 @@
|
|
|
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
|
+
import type { Ext } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* 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.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCNetworksPreviewPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The network's API base, as the network's administrators gave it.
|
|
12
|
+
*/
|
|
13
|
+
url: string;
|
|
14
|
+
/**
|
|
15
|
+
* The DID the administrator expects at `url`. When present, the community refuses if the network found there answers as another DID.
|
|
16
|
+
*/
|
|
17
|
+
network?: string;
|
|
18
|
+
ext?: Ext;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The network, as the community found it at `url`, and where the community stands with it.
|
|
22
|
+
*/
|
|
23
|
+
export interface VTCNetworksPreviewResponsePayload {
|
|
24
|
+
/**
|
|
25
|
+
* The DID the network at `url` answers as.
|
|
26
|
+
*/
|
|
27
|
+
network: string;
|
|
28
|
+
/**
|
|
29
|
+
* The URL the network was read at.
|
|
30
|
+
*/
|
|
31
|
+
url: string;
|
|
32
|
+
/**
|
|
33
|
+
* The network's name, from its profile.
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* The network's description, from its profile.
|
|
38
|
+
*/
|
|
39
|
+
description?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The network's identified owner (VTI-VTN-002), from its profile.
|
|
42
|
+
*/
|
|
43
|
+
owner?: string;
|
|
44
|
+
framework?: Framework;
|
|
45
|
+
/**
|
|
46
|
+
* The roles the network asks members to register a group for. `vtc/networks/join` must assign a group to each one marked `required`.
|
|
47
|
+
*
|
|
48
|
+
* @maxItems 64
|
|
49
|
+
*/
|
|
50
|
+
roles: Role[];
|
|
51
|
+
/**
|
|
52
|
+
* `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.
|
|
53
|
+
*/
|
|
54
|
+
listed: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 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`.
|
|
57
|
+
*/
|
|
58
|
+
entryState?: "listed" | "acknowledged" | "repudiated" | "suspended";
|
|
59
|
+
/**
|
|
60
|
+
* Why `listed` is `false`, in words for an administrator.
|
|
61
|
+
*/
|
|
62
|
+
notListedReason?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The community's own record of the membership, when it holds one (`vtc/networks/show`).
|
|
65
|
+
*/
|
|
66
|
+
membershipState?: "acknowledged" | "repudiated" | "departed";
|
|
67
|
+
ext?: Ext;
|
|
68
|
+
}
|
|
69
|
+
export interface Framework {
|
|
70
|
+
/**
|
|
71
|
+
* The network's governance framework.
|
|
72
|
+
*/
|
|
73
|
+
iri: string;
|
|
74
|
+
/**
|
|
75
|
+
* The framework version the network operates under.
|
|
76
|
+
*/
|
|
77
|
+
version: string;
|
|
78
|
+
}
|
|
79
|
+
export interface Role {
|
|
80
|
+
/**
|
|
81
|
+
* The role's name, as `vtc/networks/join` assigns a group to it.
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the network admits a member only once a group is registered for this role.
|
|
86
|
+
*/
|
|
87
|
+
required: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* What the network uses the role for.
|
|
90
|
+
*/
|
|
91
|
+
description?: string;
|
|
92
|
+
}
|
|
93
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
94
|
+
export type { Ext };
|
|
95
|
+
/** Trust Task type URI. */
|
|
96
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/networks/preview/0.1";
|
|
97
|
+
/**
|
|
98
|
+
* The earlier version of this specification that this one declares it
|
|
99
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
100
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
101
|
+
* `extendsChain` / `readForSpec`.
|
|
102
|
+
*/
|
|
103
|
+
export declare const EXTENDS: string | null;
|
|
104
|
+
/**
|
|
105
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
106
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
107
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
108
|
+
* Versions").
|
|
109
|
+
*/
|
|
110
|
+
export declare const DEPRECATION: string | null;
|
|
111
|
+
/** Stable alias for this specification's request payload shape. */
|
|
112
|
+
export type Payload = VTCNetworksPreviewPayload;
|
|
113
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
114
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/networks/preview/0.1#response";
|
|
115
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
116
|
+
export type Response = VTCNetworksPreviewResponsePayload;
|
|
117
|
+
/**
|
|
118
|
+
* This specification's payload schema, as a value.
|
|
119
|
+
*
|
|
120
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
121
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
122
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
123
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
124
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
125
|
+
*/
|
|
126
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
127
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
128
|
+
readonly $id: "https://trusttasks.org/spec/vtc/networks/preview/0.1";
|
|
129
|
+
readonly title: "VTC Networks — Preview — payload";
|
|
130
|
+
readonly 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.";
|
|
131
|
+
readonly type: "object";
|
|
132
|
+
readonly additionalProperties: false;
|
|
133
|
+
readonly required: readonly ["url"];
|
|
134
|
+
readonly properties: {
|
|
135
|
+
readonly url: {
|
|
136
|
+
readonly type: "string";
|
|
137
|
+
readonly format: "uri";
|
|
138
|
+
readonly maxLength: 2048;
|
|
139
|
+
readonly description: "The network's API base, as the network's administrators gave it.";
|
|
140
|
+
};
|
|
141
|
+
readonly network: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
144
|
+
readonly maxLength: 2048;
|
|
145
|
+
readonly description: "The DID the administrator expects at `url`. When present, the community refuses if the network found there answers as another DID.";
|
|
146
|
+
};
|
|
147
|
+
readonly ext: {
|
|
148
|
+
readonly $ref: "#/$defs/Ext";
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly $defs: {
|
|
152
|
+
readonly Role: {
|
|
153
|
+
readonly type: "object";
|
|
154
|
+
readonly additionalProperties: false;
|
|
155
|
+
readonly required: readonly ["name", "required"];
|
|
156
|
+
readonly properties: {
|
|
157
|
+
readonly name: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly minLength: 1;
|
|
160
|
+
readonly maxLength: 64;
|
|
161
|
+
readonly description: "The role's name, as `vtc/networks/join` assigns a group to it.";
|
|
162
|
+
};
|
|
163
|
+
readonly required: {
|
|
164
|
+
readonly type: "boolean";
|
|
165
|
+
readonly description: "Whether the network admits a member only once a group is registered for this role.";
|
|
166
|
+
};
|
|
167
|
+
readonly description: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
readonly maxLength: 1024;
|
|
170
|
+
readonly description: "What the network uses the role for.";
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly Framework: {
|
|
175
|
+
readonly type: "object";
|
|
176
|
+
readonly additionalProperties: false;
|
|
177
|
+
readonly required: readonly ["iri", "version"];
|
|
178
|
+
readonly properties: {
|
|
179
|
+
readonly iri: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
readonly maxLength: 2048;
|
|
182
|
+
readonly description: "The network's governance framework.";
|
|
183
|
+
};
|
|
184
|
+
readonly version: {
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
readonly maxLength: 64;
|
|
187
|
+
readonly description: "The framework version the network operates under.";
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
readonly Response: {
|
|
192
|
+
readonly $anchor: "response";
|
|
193
|
+
readonly title: "VTC Networks — Preview — response payload";
|
|
194
|
+
readonly description: "The network, as the community found it at `url`, and where the community stands with it.";
|
|
195
|
+
readonly type: "object";
|
|
196
|
+
readonly additionalProperties: false;
|
|
197
|
+
readonly required: readonly ["network", "url", "name", "roles", "listed"];
|
|
198
|
+
readonly properties: {
|
|
199
|
+
readonly network: {
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
202
|
+
readonly maxLength: 2048;
|
|
203
|
+
readonly description: "The DID the network at `url` answers as.";
|
|
204
|
+
};
|
|
205
|
+
readonly url: {
|
|
206
|
+
readonly type: "string";
|
|
207
|
+
readonly format: "uri";
|
|
208
|
+
readonly maxLength: 2048;
|
|
209
|
+
readonly description: "The URL the network was read at.";
|
|
210
|
+
};
|
|
211
|
+
readonly name: {
|
|
212
|
+
readonly type: "string";
|
|
213
|
+
readonly maxLength: 256;
|
|
214
|
+
readonly description: "The network's name, from its profile.";
|
|
215
|
+
};
|
|
216
|
+
readonly description: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
readonly maxLength: 4096;
|
|
219
|
+
readonly description: "The network's description, from its profile.";
|
|
220
|
+
};
|
|
221
|
+
readonly owner: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
readonly maxLength: 512;
|
|
224
|
+
readonly description: "The network's identified owner (VTI-VTN-002), from its profile.";
|
|
225
|
+
};
|
|
226
|
+
readonly framework: {
|
|
227
|
+
readonly $ref: "#/$defs/Framework";
|
|
228
|
+
};
|
|
229
|
+
readonly roles: {
|
|
230
|
+
readonly type: "array";
|
|
231
|
+
readonly maxItems: 64;
|
|
232
|
+
readonly items: {
|
|
233
|
+
readonly $ref: "#/$defs/Role";
|
|
234
|
+
};
|
|
235
|
+
readonly description: "The roles the network asks members to register a group for. `vtc/networks/join` must assign a group to each one marked `required`.";
|
|
236
|
+
};
|
|
237
|
+
readonly listed: {
|
|
238
|
+
readonly type: "boolean";
|
|
239
|
+
readonly 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.";
|
|
240
|
+
};
|
|
241
|
+
readonly entryState: {
|
|
242
|
+
readonly type: "string";
|
|
243
|
+
readonly enum: readonly ["listed", "acknowledged", "repudiated", "suspended"];
|
|
244
|
+
readonly 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`.";
|
|
245
|
+
};
|
|
246
|
+
readonly notListedReason: {
|
|
247
|
+
readonly type: "string";
|
|
248
|
+
readonly maxLength: 1024;
|
|
249
|
+
readonly description: "Why `listed` is `false`, in words for an administrator.";
|
|
250
|
+
};
|
|
251
|
+
readonly membershipState: {
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
readonly enum: readonly ["acknowledged", "repudiated", "departed"];
|
|
254
|
+
readonly description: "The community's own record of the membership, when it holds one (`vtc/networks/show`).";
|
|
255
|
+
};
|
|
256
|
+
readonly ext: {
|
|
257
|
+
readonly $ref: "#/$defs/Ext";
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
readonly Ext: {
|
|
262
|
+
readonly title: "Ext";
|
|
263
|
+
readonly 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.";
|
|
264
|
+
readonly type: "object";
|
|
265
|
+
readonly minProperties: 1;
|
|
266
|
+
readonly additionalProperties: true;
|
|
267
|
+
readonly propertyNames: {
|
|
268
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
274
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
275
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
276
|
+
readonly $ref: "#/$defs/Response";
|
|
277
|
+
readonly $defs: {
|
|
278
|
+
readonly Role: {
|
|
279
|
+
readonly type: "object";
|
|
280
|
+
readonly additionalProperties: false;
|
|
281
|
+
readonly required: readonly ["name", "required"];
|
|
282
|
+
readonly properties: {
|
|
283
|
+
readonly name: {
|
|
284
|
+
readonly type: "string";
|
|
285
|
+
readonly minLength: 1;
|
|
286
|
+
readonly maxLength: 64;
|
|
287
|
+
readonly description: "The role's name, as `vtc/networks/join` assigns a group to it.";
|
|
288
|
+
};
|
|
289
|
+
readonly required: {
|
|
290
|
+
readonly type: "boolean";
|
|
291
|
+
readonly description: "Whether the network admits a member only once a group is registered for this role.";
|
|
292
|
+
};
|
|
293
|
+
readonly description: {
|
|
294
|
+
readonly type: "string";
|
|
295
|
+
readonly maxLength: 1024;
|
|
296
|
+
readonly description: "What the network uses the role for.";
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
readonly Framework: {
|
|
301
|
+
readonly type: "object";
|
|
302
|
+
readonly additionalProperties: false;
|
|
303
|
+
readonly required: readonly ["iri", "version"];
|
|
304
|
+
readonly properties: {
|
|
305
|
+
readonly iri: {
|
|
306
|
+
readonly type: "string";
|
|
307
|
+
readonly maxLength: 2048;
|
|
308
|
+
readonly description: "The network's governance framework.";
|
|
309
|
+
};
|
|
310
|
+
readonly version: {
|
|
311
|
+
readonly type: "string";
|
|
312
|
+
readonly maxLength: 64;
|
|
313
|
+
readonly description: "The framework version the network operates under.";
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
readonly Response: {
|
|
318
|
+
readonly $anchor: "response";
|
|
319
|
+
readonly title: "VTC Networks — Preview — response payload";
|
|
320
|
+
readonly description: "The network, as the community found it at `url`, and where the community stands with it.";
|
|
321
|
+
readonly type: "object";
|
|
322
|
+
readonly additionalProperties: false;
|
|
323
|
+
readonly required: readonly ["network", "url", "name", "roles", "listed"];
|
|
324
|
+
readonly properties: {
|
|
325
|
+
readonly network: {
|
|
326
|
+
readonly type: "string";
|
|
327
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
328
|
+
readonly maxLength: 2048;
|
|
329
|
+
readonly description: "The DID the network at `url` answers as.";
|
|
330
|
+
};
|
|
331
|
+
readonly url: {
|
|
332
|
+
readonly type: "string";
|
|
333
|
+
readonly format: "uri";
|
|
334
|
+
readonly maxLength: 2048;
|
|
335
|
+
readonly description: "The URL the network was read at.";
|
|
336
|
+
};
|
|
337
|
+
readonly name: {
|
|
338
|
+
readonly type: "string";
|
|
339
|
+
readonly maxLength: 256;
|
|
340
|
+
readonly description: "The network's name, from its profile.";
|
|
341
|
+
};
|
|
342
|
+
readonly description: {
|
|
343
|
+
readonly type: "string";
|
|
344
|
+
readonly maxLength: 4096;
|
|
345
|
+
readonly description: "The network's description, from its profile.";
|
|
346
|
+
};
|
|
347
|
+
readonly owner: {
|
|
348
|
+
readonly type: "string";
|
|
349
|
+
readonly maxLength: 512;
|
|
350
|
+
readonly description: "The network's identified owner (VTI-VTN-002), from its profile.";
|
|
351
|
+
};
|
|
352
|
+
readonly framework: {
|
|
353
|
+
readonly $ref: "#/$defs/Framework";
|
|
354
|
+
};
|
|
355
|
+
readonly roles: {
|
|
356
|
+
readonly type: "array";
|
|
357
|
+
readonly maxItems: 64;
|
|
358
|
+
readonly items: {
|
|
359
|
+
readonly $ref: "#/$defs/Role";
|
|
360
|
+
};
|
|
361
|
+
readonly description: "The roles the network asks members to register a group for. `vtc/networks/join` must assign a group to each one marked `required`.";
|
|
362
|
+
};
|
|
363
|
+
readonly listed: {
|
|
364
|
+
readonly type: "boolean";
|
|
365
|
+
readonly 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.";
|
|
366
|
+
};
|
|
367
|
+
readonly entryState: {
|
|
368
|
+
readonly type: "string";
|
|
369
|
+
readonly enum: readonly ["listed", "acknowledged", "repudiated", "suspended"];
|
|
370
|
+
readonly 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`.";
|
|
371
|
+
};
|
|
372
|
+
readonly notListedReason: {
|
|
373
|
+
readonly type: "string";
|
|
374
|
+
readonly maxLength: 1024;
|
|
375
|
+
readonly description: "Why `listed` is `false`, in words for an administrator.";
|
|
376
|
+
};
|
|
377
|
+
readonly membershipState: {
|
|
378
|
+
readonly type: "string";
|
|
379
|
+
readonly enum: readonly ["acknowledged", "repudiated", "departed"];
|
|
380
|
+
readonly description: "The community's own record of the membership, when it holds one (`vtc/networks/show`).";
|
|
381
|
+
};
|
|
382
|
+
readonly ext: {
|
|
383
|
+
readonly $ref: "#/$defs/Ext";
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
readonly Ext: {
|
|
388
|
+
readonly title: "Ext";
|
|
389
|
+
readonly 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.";
|
|
390
|
+
readonly type: "object";
|
|
391
|
+
readonly minProperties: 1;
|
|
392
|
+
readonly additionalProperties: true;
|
|
393
|
+
readonly propertyNames: {
|
|
394
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
/**
|
|
400
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
401
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
402
|
+
* per-specification and cannot be derived from the document alone, and
|
|
403
|
+
* item 2 needs the schema this carries.
|
|
404
|
+
*/
|
|
405
|
+
export declare const SPEC: {
|
|
406
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/networks/preview/0.1";
|
|
407
|
+
readonly isBearer: false;
|
|
408
|
+
readonly isProofRequired: true;
|
|
409
|
+
readonly isRecipientRequired: true;
|
|
410
|
+
readonly isIssuedAtRequired: false;
|
|
411
|
+
readonly payloadSchema: {
|
|
412
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
413
|
+
readonly $id: "https://trusttasks.org/spec/vtc/networks/preview/0.1";
|
|
414
|
+
readonly title: "VTC Networks — Preview — payload";
|
|
415
|
+
readonly 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.";
|
|
416
|
+
readonly type: "object";
|
|
417
|
+
readonly additionalProperties: false;
|
|
418
|
+
readonly required: readonly ["url"];
|
|
419
|
+
readonly properties: {
|
|
420
|
+
readonly url: {
|
|
421
|
+
readonly type: "string";
|
|
422
|
+
readonly format: "uri";
|
|
423
|
+
readonly maxLength: 2048;
|
|
424
|
+
readonly description: "The network's API base, as the network's administrators gave it.";
|
|
425
|
+
};
|
|
426
|
+
readonly network: {
|
|
427
|
+
readonly type: "string";
|
|
428
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
429
|
+
readonly maxLength: 2048;
|
|
430
|
+
readonly description: "The DID the administrator expects at `url`. When present, the community refuses if the network found there answers as another DID.";
|
|
431
|
+
};
|
|
432
|
+
readonly ext: {
|
|
433
|
+
readonly $ref: "#/$defs/Ext";
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
readonly $defs: {
|
|
437
|
+
readonly Role: {
|
|
438
|
+
readonly type: "object";
|
|
439
|
+
readonly additionalProperties: false;
|
|
440
|
+
readonly required: readonly ["name", "required"];
|
|
441
|
+
readonly properties: {
|
|
442
|
+
readonly name: {
|
|
443
|
+
readonly type: "string";
|
|
444
|
+
readonly minLength: 1;
|
|
445
|
+
readonly maxLength: 64;
|
|
446
|
+
readonly description: "The role's name, as `vtc/networks/join` assigns a group to it.";
|
|
447
|
+
};
|
|
448
|
+
readonly required: {
|
|
449
|
+
readonly type: "boolean";
|
|
450
|
+
readonly description: "Whether the network admits a member only once a group is registered for this role.";
|
|
451
|
+
};
|
|
452
|
+
readonly description: {
|
|
453
|
+
readonly type: "string";
|
|
454
|
+
readonly maxLength: 1024;
|
|
455
|
+
readonly description: "What the network uses the role for.";
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
readonly Framework: {
|
|
460
|
+
readonly type: "object";
|
|
461
|
+
readonly additionalProperties: false;
|
|
462
|
+
readonly required: readonly ["iri", "version"];
|
|
463
|
+
readonly properties: {
|
|
464
|
+
readonly iri: {
|
|
465
|
+
readonly type: "string";
|
|
466
|
+
readonly maxLength: 2048;
|
|
467
|
+
readonly description: "The network's governance framework.";
|
|
468
|
+
};
|
|
469
|
+
readonly version: {
|
|
470
|
+
readonly type: "string";
|
|
471
|
+
readonly maxLength: 64;
|
|
472
|
+
readonly description: "The framework version the network operates under.";
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
readonly Response: {
|
|
477
|
+
readonly $anchor: "response";
|
|
478
|
+
readonly title: "VTC Networks — Preview — response payload";
|
|
479
|
+
readonly description: "The network, as the community found it at `url`, and where the community stands with it.";
|
|
480
|
+
readonly type: "object";
|
|
481
|
+
readonly additionalProperties: false;
|
|
482
|
+
readonly required: readonly ["network", "url", "name", "roles", "listed"];
|
|
483
|
+
readonly properties: {
|
|
484
|
+
readonly network: {
|
|
485
|
+
readonly type: "string";
|
|
486
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
487
|
+
readonly maxLength: 2048;
|
|
488
|
+
readonly description: "The DID the network at `url` answers as.";
|
|
489
|
+
};
|
|
490
|
+
readonly url: {
|
|
491
|
+
readonly type: "string";
|
|
492
|
+
readonly format: "uri";
|
|
493
|
+
readonly maxLength: 2048;
|
|
494
|
+
readonly description: "The URL the network was read at.";
|
|
495
|
+
};
|
|
496
|
+
readonly name: {
|
|
497
|
+
readonly type: "string";
|
|
498
|
+
readonly maxLength: 256;
|
|
499
|
+
readonly description: "The network's name, from its profile.";
|
|
500
|
+
};
|
|
501
|
+
readonly description: {
|
|
502
|
+
readonly type: "string";
|
|
503
|
+
readonly maxLength: 4096;
|
|
504
|
+
readonly description: "The network's description, from its profile.";
|
|
505
|
+
};
|
|
506
|
+
readonly owner: {
|
|
507
|
+
readonly type: "string";
|
|
508
|
+
readonly maxLength: 512;
|
|
509
|
+
readonly description: "The network's identified owner (VTI-VTN-002), from its profile.";
|
|
510
|
+
};
|
|
511
|
+
readonly framework: {
|
|
512
|
+
readonly $ref: "#/$defs/Framework";
|
|
513
|
+
};
|
|
514
|
+
readonly roles: {
|
|
515
|
+
readonly type: "array";
|
|
516
|
+
readonly maxItems: 64;
|
|
517
|
+
readonly items: {
|
|
518
|
+
readonly $ref: "#/$defs/Role";
|
|
519
|
+
};
|
|
520
|
+
readonly description: "The roles the network asks members to register a group for. `vtc/networks/join` must assign a group to each one marked `required`.";
|
|
521
|
+
};
|
|
522
|
+
readonly listed: {
|
|
523
|
+
readonly type: "boolean";
|
|
524
|
+
readonly 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.";
|
|
525
|
+
};
|
|
526
|
+
readonly entryState: {
|
|
527
|
+
readonly type: "string";
|
|
528
|
+
readonly enum: readonly ["listed", "acknowledged", "repudiated", "suspended"];
|
|
529
|
+
readonly 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`.";
|
|
530
|
+
};
|
|
531
|
+
readonly notListedReason: {
|
|
532
|
+
readonly type: "string";
|
|
533
|
+
readonly maxLength: 1024;
|
|
534
|
+
readonly description: "Why `listed` is `false`, in words for an administrator.";
|
|
535
|
+
};
|
|
536
|
+
readonly membershipState: {
|
|
537
|
+
readonly type: "string";
|
|
538
|
+
readonly enum: readonly ["acknowledged", "repudiated", "departed"];
|
|
539
|
+
readonly description: "The community's own record of the membership, when it holds one (`vtc/networks/show`).";
|
|
540
|
+
};
|
|
541
|
+
readonly ext: {
|
|
542
|
+
readonly $ref: "#/$defs/Ext";
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
readonly Ext: {
|
|
547
|
+
readonly title: "Ext";
|
|
548
|
+
readonly 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.";
|
|
549
|
+
readonly type: "object";
|
|
550
|
+
readonly minProperties: 1;
|
|
551
|
+
readonly additionalProperties: true;
|
|
552
|
+
readonly propertyNames: {
|
|
553
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
561
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
562
|
+
* parties (§7.3 item 5).
|
|
563
|
+
*/
|
|
564
|
+
export declare const RESPONSE_SPEC: {
|
|
565
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/networks/preview/0.1#response";
|
|
566
|
+
readonly isBearer: false;
|
|
567
|
+
readonly isProofRequired: true;
|
|
568
|
+
readonly isRecipientRequired: true;
|
|
569
|
+
readonly isIssuedAtRequired: false;
|
|
570
|
+
readonly payloadSchema: {
|
|
571
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
572
|
+
readonly $ref: "#/$defs/Response";
|
|
573
|
+
readonly $defs: {
|
|
574
|
+
readonly Role: {
|
|
575
|
+
readonly type: "object";
|
|
576
|
+
readonly additionalProperties: false;
|
|
577
|
+
readonly required: readonly ["name", "required"];
|
|
578
|
+
readonly properties: {
|
|
579
|
+
readonly name: {
|
|
580
|
+
readonly type: "string";
|
|
581
|
+
readonly minLength: 1;
|
|
582
|
+
readonly maxLength: 64;
|
|
583
|
+
readonly description: "The role's name, as `vtc/networks/join` assigns a group to it.";
|
|
584
|
+
};
|
|
585
|
+
readonly required: {
|
|
586
|
+
readonly type: "boolean";
|
|
587
|
+
readonly description: "Whether the network admits a member only once a group is registered for this role.";
|
|
588
|
+
};
|
|
589
|
+
readonly description: {
|
|
590
|
+
readonly type: "string";
|
|
591
|
+
readonly maxLength: 1024;
|
|
592
|
+
readonly description: "What the network uses the role for.";
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
readonly Framework: {
|
|
597
|
+
readonly type: "object";
|
|
598
|
+
readonly additionalProperties: false;
|
|
599
|
+
readonly required: readonly ["iri", "version"];
|
|
600
|
+
readonly properties: {
|
|
601
|
+
readonly iri: {
|
|
602
|
+
readonly type: "string";
|
|
603
|
+
readonly maxLength: 2048;
|
|
604
|
+
readonly description: "The network's governance framework.";
|
|
605
|
+
};
|
|
606
|
+
readonly version: {
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
readonly maxLength: 64;
|
|
609
|
+
readonly description: "The framework version the network operates under.";
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
readonly Response: {
|
|
614
|
+
readonly $anchor: "response";
|
|
615
|
+
readonly title: "VTC Networks — Preview — response payload";
|
|
616
|
+
readonly description: "The network, as the community found it at `url`, and where the community stands with it.";
|
|
617
|
+
readonly type: "object";
|
|
618
|
+
readonly additionalProperties: false;
|
|
619
|
+
readonly required: readonly ["network", "url", "name", "roles", "listed"];
|
|
620
|
+
readonly properties: {
|
|
621
|
+
readonly network: {
|
|
622
|
+
readonly type: "string";
|
|
623
|
+
readonly pattern: "^did:[a-z0-9]+:.+$";
|
|
624
|
+
readonly maxLength: 2048;
|
|
625
|
+
readonly description: "The DID the network at `url` answers as.";
|
|
626
|
+
};
|
|
627
|
+
readonly url: {
|
|
628
|
+
readonly type: "string";
|
|
629
|
+
readonly format: "uri";
|
|
630
|
+
readonly maxLength: 2048;
|
|
631
|
+
readonly description: "The URL the network was read at.";
|
|
632
|
+
};
|
|
633
|
+
readonly name: {
|
|
634
|
+
readonly type: "string";
|
|
635
|
+
readonly maxLength: 256;
|
|
636
|
+
readonly description: "The network's name, from its profile.";
|
|
637
|
+
};
|
|
638
|
+
readonly description: {
|
|
639
|
+
readonly type: "string";
|
|
640
|
+
readonly maxLength: 4096;
|
|
641
|
+
readonly description: "The network's description, from its profile.";
|
|
642
|
+
};
|
|
643
|
+
readonly owner: {
|
|
644
|
+
readonly type: "string";
|
|
645
|
+
readonly maxLength: 512;
|
|
646
|
+
readonly description: "The network's identified owner (VTI-VTN-002), from its profile.";
|
|
647
|
+
};
|
|
648
|
+
readonly framework: {
|
|
649
|
+
readonly $ref: "#/$defs/Framework";
|
|
650
|
+
};
|
|
651
|
+
readonly roles: {
|
|
652
|
+
readonly type: "array";
|
|
653
|
+
readonly maxItems: 64;
|
|
654
|
+
readonly items: {
|
|
655
|
+
readonly $ref: "#/$defs/Role";
|
|
656
|
+
};
|
|
657
|
+
readonly description: "The roles the network asks members to register a group for. `vtc/networks/join` must assign a group to each one marked `required`.";
|
|
658
|
+
};
|
|
659
|
+
readonly listed: {
|
|
660
|
+
readonly type: "boolean";
|
|
661
|
+
readonly 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.";
|
|
662
|
+
};
|
|
663
|
+
readonly entryState: {
|
|
664
|
+
readonly type: "string";
|
|
665
|
+
readonly enum: readonly ["listed", "acknowledged", "repudiated", "suspended"];
|
|
666
|
+
readonly 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`.";
|
|
667
|
+
};
|
|
668
|
+
readonly notListedReason: {
|
|
669
|
+
readonly type: "string";
|
|
670
|
+
readonly maxLength: 1024;
|
|
671
|
+
readonly description: "Why `listed` is `false`, in words for an administrator.";
|
|
672
|
+
};
|
|
673
|
+
readonly membershipState: {
|
|
674
|
+
readonly type: "string";
|
|
675
|
+
readonly enum: readonly ["acknowledged", "repudiated", "departed"];
|
|
676
|
+
readonly description: "The community's own record of the membership, when it holds one (`vtc/networks/show`).";
|
|
677
|
+
};
|
|
678
|
+
readonly ext: {
|
|
679
|
+
readonly $ref: "#/$defs/Ext";
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
readonly Ext: {
|
|
684
|
+
readonly title: "Ext";
|
|
685
|
+
readonly 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.";
|
|
686
|
+
readonly type: "object";
|
|
687
|
+
readonly minProperties: 1;
|
|
688
|
+
readonly additionalProperties: true;
|
|
689
|
+
readonly propertyNames: {
|
|
690
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
//# sourceMappingURL=payload.d.ts.map
|