@openvtc/trust-tasks 0.12.11 → 0.12.13
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/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/_shared/0.1/ceremony.d.ts +11 -0
- package/dist/vtc/_shared/0.1/ceremony.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/ceremony.js +6 -0
- package/dist/vtc/_shared/0.1/ceremony.js.map +1 -0
- package/dist/vtc/auth/recognise/0.2/payload.d.ts +326 -0
- package/dist/vtc/auth/recognise/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/auth/recognise/0.2/payload.js +185 -0
- package/dist/vtc/auth/recognise/0.2/payload.js.map +1 -0
- package/dist/vtc/join-requests/submit/0.2/payload.d.ts +605 -0
- package/dist/vtc/join-requests/submit/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/submit/0.2/payload.js +311 -0
- package/dist/vtc/join-requests/submit/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/vtc/_shared/0.1/ceremony.ts +11 -0
- package/src/vtc/auth/recognise/0.2/payload.ts +231 -0
- package/src/vtc/join-requests/submit/0.2/payload.ts +409 -0
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/join-requests/submit/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* What the policy decided.
|
|
7
|
+
*
|
|
8
|
+
* `allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.
|
|
9
|
+
*
|
|
10
|
+
* The four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act.
|
|
11
|
+
*/
|
|
12
|
+
export type VerdictEffect = "allow" | "deny" | "refer" | "requestMore";
|
|
13
|
+
export interface VTCJoinRequestsSubmitPayload {
|
|
14
|
+
/**
|
|
15
|
+
* The applicant's W3C Verifiable Presentation (opaque here), satisfying the community's join policy. The applicant DID is the document proof's signer — not a payload field.
|
|
16
|
+
*/
|
|
17
|
+
vp: {};
|
|
18
|
+
/**
|
|
19
|
+
* Whether the applicant consents to trust-registry publication.
|
|
20
|
+
*/
|
|
21
|
+
registryConsent?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Opaque applicant-supplied extension bag.
|
|
24
|
+
*/
|
|
25
|
+
extensions?: {};
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 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.
|
|
30
|
+
*/
|
|
31
|
+
export interface Ext {
|
|
32
|
+
[k: string]: unknown | undefined;
|
|
33
|
+
}
|
|
34
|
+
export interface VTCJoinRequestsSubmitResponsePayload {
|
|
35
|
+
/**
|
|
36
|
+
* Id of the created join request (a UUID).
|
|
37
|
+
*/
|
|
38
|
+
requestId: string;
|
|
39
|
+
verdict: Verdict;
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* What the community decided about this submission.
|
|
44
|
+
*
|
|
45
|
+
* `0.1` returned `status: "pending"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all.
|
|
46
|
+
*/
|
|
47
|
+
export interface Verdict {
|
|
48
|
+
effect: VerdictEffect;
|
|
49
|
+
with: VerdictWith;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The effect-dependent detail of a verdict.
|
|
53
|
+
*
|
|
54
|
+
* Every member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.
|
|
55
|
+
*/
|
|
56
|
+
export interface VerdictWith {
|
|
57
|
+
/**
|
|
58
|
+
* The granted local role. `allow` only.
|
|
59
|
+
*/
|
|
60
|
+
role?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Conditions attached to the grant. `allow` only.
|
|
63
|
+
*/
|
|
64
|
+
obligations?: {};
|
|
65
|
+
/**
|
|
66
|
+
* Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only.
|
|
67
|
+
*/
|
|
68
|
+
bundleRef?: {};
|
|
69
|
+
/**
|
|
70
|
+
* Stable refusal code, safe to branch on. `deny` only.
|
|
71
|
+
*/
|
|
72
|
+
code?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Elaboration in prose, when the decider gave one. `deny` and `refer`.
|
|
75
|
+
*/
|
|
76
|
+
reason?: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only.
|
|
79
|
+
*/
|
|
80
|
+
queue?: string;
|
|
81
|
+
/**
|
|
82
|
+
* What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only.
|
|
83
|
+
*/
|
|
84
|
+
needs?: string[];
|
|
85
|
+
/**
|
|
86
|
+
* A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only.
|
|
87
|
+
*/
|
|
88
|
+
presentationDefinition?: {};
|
|
89
|
+
}
|
|
90
|
+
/** Trust Task type URI. */
|
|
91
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/join-requests/submit/0.2";
|
|
92
|
+
/** Stable alias for this specification's request payload shape. */
|
|
93
|
+
export type Payload = VTCJoinRequestsSubmitPayload;
|
|
94
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
95
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/join-requests/submit/0.2#response";
|
|
96
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
97
|
+
export type Response = VTCJoinRequestsSubmitResponsePayload;
|
|
98
|
+
/**
|
|
99
|
+
* This specification's payload schema, as a value.
|
|
100
|
+
*
|
|
101
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
102
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
103
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
104
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
105
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
106
|
+
*/
|
|
107
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
108
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
109
|
+
readonly $id: "https://trusttasks.org/spec/vtc/join-requests/submit/0.2";
|
|
110
|
+
readonly title: "VTC Join-Requests Submit — payload";
|
|
111
|
+
readonly type: "object";
|
|
112
|
+
readonly additionalProperties: false;
|
|
113
|
+
readonly required: readonly ["vp"];
|
|
114
|
+
readonly properties: {
|
|
115
|
+
readonly vp: {
|
|
116
|
+
readonly type: "object";
|
|
117
|
+
readonly description: "The applicant's W3C Verifiable Presentation (opaque here), satisfying the community's join policy. The applicant DID is the document proof's signer — not a payload field.";
|
|
118
|
+
};
|
|
119
|
+
readonly registryConsent: {
|
|
120
|
+
readonly type: "boolean";
|
|
121
|
+
readonly description: "Whether the applicant consents to trust-registry publication.";
|
|
122
|
+
};
|
|
123
|
+
readonly extensions: {
|
|
124
|
+
readonly type: "object";
|
|
125
|
+
readonly description: "Opaque applicant-supplied extension bag.";
|
|
126
|
+
};
|
|
127
|
+
readonly ext: {
|
|
128
|
+
readonly $ref: "#/$defs/Ext";
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
readonly $defs: {
|
|
132
|
+
readonly Response: {
|
|
133
|
+
readonly $anchor: "response";
|
|
134
|
+
readonly title: "VTC Join-Requests Submit — response payload";
|
|
135
|
+
readonly type: "object";
|
|
136
|
+
readonly additionalProperties: false;
|
|
137
|
+
readonly required: readonly ["requestId", "verdict"];
|
|
138
|
+
readonly properties: {
|
|
139
|
+
readonly requestId: {
|
|
140
|
+
readonly type: "string";
|
|
141
|
+
readonly minLength: 1;
|
|
142
|
+
readonly description: "Id of the created join request (a UUID).";
|
|
143
|
+
};
|
|
144
|
+
readonly verdict: {
|
|
145
|
+
readonly $ref: "#/$defs/Verdict";
|
|
146
|
+
readonly description: "What the community decided about this submission.\n\n`0.1` returned `status: \"pending\"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all.";
|
|
147
|
+
};
|
|
148
|
+
readonly ext: {
|
|
149
|
+
readonly $ref: "#/$defs/Ext";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
readonly Ext: {
|
|
154
|
+
readonly title: "Ext";
|
|
155
|
+
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.";
|
|
156
|
+
readonly type: "object";
|
|
157
|
+
readonly minProperties: 1;
|
|
158
|
+
readonly additionalProperties: true;
|
|
159
|
+
readonly propertyNames: {
|
|
160
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly Verdict: {
|
|
164
|
+
readonly $anchor: "verdict";
|
|
165
|
+
readonly title: "Verdict";
|
|
166
|
+
readonly type: "object";
|
|
167
|
+
readonly additionalProperties: false;
|
|
168
|
+
readonly required: readonly ["effect", "with"];
|
|
169
|
+
readonly description: "A ceremony decision: the effect, plus its effect-dependent detail.";
|
|
170
|
+
readonly properties: {
|
|
171
|
+
readonly effect: {
|
|
172
|
+
readonly $ref: "#/$defs/VerdictEffect";
|
|
173
|
+
};
|
|
174
|
+
readonly with: {
|
|
175
|
+
readonly $ref: "#/$defs/VerdictWith";
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly VerdictWith: {
|
|
180
|
+
readonly $anchor: "verdictWith";
|
|
181
|
+
readonly title: "VerdictWith";
|
|
182
|
+
readonly type: "object";
|
|
183
|
+
readonly additionalProperties: false;
|
|
184
|
+
readonly description: "The effect-dependent detail of a verdict.\n\nEvery member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.";
|
|
185
|
+
readonly properties: {
|
|
186
|
+
readonly role: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly minLength: 1;
|
|
189
|
+
readonly description: "The granted local role. `allow` only.";
|
|
190
|
+
};
|
|
191
|
+
readonly obligations: {
|
|
192
|
+
readonly type: "object";
|
|
193
|
+
readonly description: "Conditions attached to the grant. `allow` only.";
|
|
194
|
+
};
|
|
195
|
+
readonly bundleRef: {
|
|
196
|
+
readonly type: "object";
|
|
197
|
+
readonly description: "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only.";
|
|
198
|
+
};
|
|
199
|
+
readonly code: {
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
readonly minLength: 1;
|
|
202
|
+
readonly description: "Stable refusal code, safe to branch on. `deny` only.";
|
|
203
|
+
};
|
|
204
|
+
readonly reason: {
|
|
205
|
+
readonly type: readonly ["string", "null"];
|
|
206
|
+
readonly description: "Elaboration in prose, when the decider gave one. `deny` and `refer`.";
|
|
207
|
+
};
|
|
208
|
+
readonly queue: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly minLength: 1;
|
|
211
|
+
readonly description: "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only.";
|
|
212
|
+
};
|
|
213
|
+
readonly needs: {
|
|
214
|
+
readonly type: "array";
|
|
215
|
+
readonly items: {
|
|
216
|
+
readonly type: "string";
|
|
217
|
+
readonly minLength: 1;
|
|
218
|
+
};
|
|
219
|
+
readonly description: "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only.";
|
|
220
|
+
};
|
|
221
|
+
readonly presentationDefinition: {
|
|
222
|
+
readonly type: "object";
|
|
223
|
+
readonly description: "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only.";
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
readonly VerdictEffect: {
|
|
228
|
+
readonly $anchor: "verdictEffect";
|
|
229
|
+
readonly title: "VerdictEffect";
|
|
230
|
+
readonly type: "string";
|
|
231
|
+
readonly enum: readonly ["allow", "deny", "refer", "requestMore"];
|
|
232
|
+
readonly description: "What the policy decided.\n\n`allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.\n\nThe four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act.";
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
237
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
238
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
239
|
+
readonly $ref: "#/$defs/Response";
|
|
240
|
+
readonly $defs: {
|
|
241
|
+
readonly Response: {
|
|
242
|
+
readonly $anchor: "response";
|
|
243
|
+
readonly title: "VTC Join-Requests Submit — response payload";
|
|
244
|
+
readonly type: "object";
|
|
245
|
+
readonly additionalProperties: false;
|
|
246
|
+
readonly required: readonly ["requestId", "verdict"];
|
|
247
|
+
readonly properties: {
|
|
248
|
+
readonly requestId: {
|
|
249
|
+
readonly type: "string";
|
|
250
|
+
readonly minLength: 1;
|
|
251
|
+
readonly description: "Id of the created join request (a UUID).";
|
|
252
|
+
};
|
|
253
|
+
readonly verdict: {
|
|
254
|
+
readonly $ref: "#/$defs/Verdict";
|
|
255
|
+
readonly description: "What the community decided about this submission.\n\n`0.1` returned `status: \"pending\"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all.";
|
|
256
|
+
};
|
|
257
|
+
readonly ext: {
|
|
258
|
+
readonly $ref: "#/$defs/Ext";
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
readonly Ext: {
|
|
263
|
+
readonly title: "Ext";
|
|
264
|
+
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.";
|
|
265
|
+
readonly type: "object";
|
|
266
|
+
readonly minProperties: 1;
|
|
267
|
+
readonly additionalProperties: true;
|
|
268
|
+
readonly propertyNames: {
|
|
269
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly Verdict: {
|
|
273
|
+
readonly $anchor: "verdict";
|
|
274
|
+
readonly title: "Verdict";
|
|
275
|
+
readonly type: "object";
|
|
276
|
+
readonly additionalProperties: false;
|
|
277
|
+
readonly required: readonly ["effect", "with"];
|
|
278
|
+
readonly description: "A ceremony decision: the effect, plus its effect-dependent detail.";
|
|
279
|
+
readonly properties: {
|
|
280
|
+
readonly effect: {
|
|
281
|
+
readonly $ref: "#/$defs/VerdictEffect";
|
|
282
|
+
};
|
|
283
|
+
readonly with: {
|
|
284
|
+
readonly $ref: "#/$defs/VerdictWith";
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
readonly VerdictWith: {
|
|
289
|
+
readonly $anchor: "verdictWith";
|
|
290
|
+
readonly title: "VerdictWith";
|
|
291
|
+
readonly type: "object";
|
|
292
|
+
readonly additionalProperties: false;
|
|
293
|
+
readonly description: "The effect-dependent detail of a verdict.\n\nEvery member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.";
|
|
294
|
+
readonly properties: {
|
|
295
|
+
readonly role: {
|
|
296
|
+
readonly type: "string";
|
|
297
|
+
readonly minLength: 1;
|
|
298
|
+
readonly description: "The granted local role. `allow` only.";
|
|
299
|
+
};
|
|
300
|
+
readonly obligations: {
|
|
301
|
+
readonly type: "object";
|
|
302
|
+
readonly description: "Conditions attached to the grant. `allow` only.";
|
|
303
|
+
};
|
|
304
|
+
readonly bundleRef: {
|
|
305
|
+
readonly type: "object";
|
|
306
|
+
readonly description: "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only.";
|
|
307
|
+
};
|
|
308
|
+
readonly code: {
|
|
309
|
+
readonly type: "string";
|
|
310
|
+
readonly minLength: 1;
|
|
311
|
+
readonly description: "Stable refusal code, safe to branch on. `deny` only.";
|
|
312
|
+
};
|
|
313
|
+
readonly reason: {
|
|
314
|
+
readonly type: readonly ["string", "null"];
|
|
315
|
+
readonly description: "Elaboration in prose, when the decider gave one. `deny` and `refer`.";
|
|
316
|
+
};
|
|
317
|
+
readonly queue: {
|
|
318
|
+
readonly type: "string";
|
|
319
|
+
readonly minLength: 1;
|
|
320
|
+
readonly description: "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only.";
|
|
321
|
+
};
|
|
322
|
+
readonly needs: {
|
|
323
|
+
readonly type: "array";
|
|
324
|
+
readonly items: {
|
|
325
|
+
readonly type: "string";
|
|
326
|
+
readonly minLength: 1;
|
|
327
|
+
};
|
|
328
|
+
readonly description: "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only.";
|
|
329
|
+
};
|
|
330
|
+
readonly presentationDefinition: {
|
|
331
|
+
readonly type: "object";
|
|
332
|
+
readonly description: "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only.";
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
readonly VerdictEffect: {
|
|
337
|
+
readonly $anchor: "verdictEffect";
|
|
338
|
+
readonly title: "VerdictEffect";
|
|
339
|
+
readonly type: "string";
|
|
340
|
+
readonly enum: readonly ["allow", "deny", "refer", "requestMore"];
|
|
341
|
+
readonly description: "What the policy decided.\n\n`allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.\n\nThe four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act.";
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
347
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
348
|
+
* per-specification and cannot be derived from the document alone, and
|
|
349
|
+
* item 2 needs the schema this carries.
|
|
350
|
+
*/
|
|
351
|
+
export declare const SPEC: {
|
|
352
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/join-requests/submit/0.2";
|
|
353
|
+
readonly isBearer: false;
|
|
354
|
+
readonly isProofRequired: true;
|
|
355
|
+
readonly isRecipientRequired: true;
|
|
356
|
+
readonly payloadSchema: {
|
|
357
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
358
|
+
readonly $id: "https://trusttasks.org/spec/vtc/join-requests/submit/0.2";
|
|
359
|
+
readonly title: "VTC Join-Requests Submit — payload";
|
|
360
|
+
readonly type: "object";
|
|
361
|
+
readonly additionalProperties: false;
|
|
362
|
+
readonly required: readonly ["vp"];
|
|
363
|
+
readonly properties: {
|
|
364
|
+
readonly vp: {
|
|
365
|
+
readonly type: "object";
|
|
366
|
+
readonly description: "The applicant's W3C Verifiable Presentation (opaque here), satisfying the community's join policy. The applicant DID is the document proof's signer — not a payload field.";
|
|
367
|
+
};
|
|
368
|
+
readonly registryConsent: {
|
|
369
|
+
readonly type: "boolean";
|
|
370
|
+
readonly description: "Whether the applicant consents to trust-registry publication.";
|
|
371
|
+
};
|
|
372
|
+
readonly extensions: {
|
|
373
|
+
readonly type: "object";
|
|
374
|
+
readonly description: "Opaque applicant-supplied extension bag.";
|
|
375
|
+
};
|
|
376
|
+
readonly ext: {
|
|
377
|
+
readonly $ref: "#/$defs/Ext";
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
readonly $defs: {
|
|
381
|
+
readonly Response: {
|
|
382
|
+
readonly $anchor: "response";
|
|
383
|
+
readonly title: "VTC Join-Requests Submit — response payload";
|
|
384
|
+
readonly type: "object";
|
|
385
|
+
readonly additionalProperties: false;
|
|
386
|
+
readonly required: readonly ["requestId", "verdict"];
|
|
387
|
+
readonly properties: {
|
|
388
|
+
readonly requestId: {
|
|
389
|
+
readonly type: "string";
|
|
390
|
+
readonly minLength: 1;
|
|
391
|
+
readonly description: "Id of the created join request (a UUID).";
|
|
392
|
+
};
|
|
393
|
+
readonly verdict: {
|
|
394
|
+
readonly $ref: "#/$defs/Verdict";
|
|
395
|
+
readonly description: "What the community decided about this submission.\n\n`0.1` returned `status: \"pending\"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all.";
|
|
396
|
+
};
|
|
397
|
+
readonly ext: {
|
|
398
|
+
readonly $ref: "#/$defs/Ext";
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
readonly Ext: {
|
|
403
|
+
readonly title: "Ext";
|
|
404
|
+
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.";
|
|
405
|
+
readonly type: "object";
|
|
406
|
+
readonly minProperties: 1;
|
|
407
|
+
readonly additionalProperties: true;
|
|
408
|
+
readonly propertyNames: {
|
|
409
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
readonly Verdict: {
|
|
413
|
+
readonly $anchor: "verdict";
|
|
414
|
+
readonly title: "Verdict";
|
|
415
|
+
readonly type: "object";
|
|
416
|
+
readonly additionalProperties: false;
|
|
417
|
+
readonly required: readonly ["effect", "with"];
|
|
418
|
+
readonly description: "A ceremony decision: the effect, plus its effect-dependent detail.";
|
|
419
|
+
readonly properties: {
|
|
420
|
+
readonly effect: {
|
|
421
|
+
readonly $ref: "#/$defs/VerdictEffect";
|
|
422
|
+
};
|
|
423
|
+
readonly with: {
|
|
424
|
+
readonly $ref: "#/$defs/VerdictWith";
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
readonly VerdictWith: {
|
|
429
|
+
readonly $anchor: "verdictWith";
|
|
430
|
+
readonly title: "VerdictWith";
|
|
431
|
+
readonly type: "object";
|
|
432
|
+
readonly additionalProperties: false;
|
|
433
|
+
readonly description: "The effect-dependent detail of a verdict.\n\nEvery member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.";
|
|
434
|
+
readonly properties: {
|
|
435
|
+
readonly role: {
|
|
436
|
+
readonly type: "string";
|
|
437
|
+
readonly minLength: 1;
|
|
438
|
+
readonly description: "The granted local role. `allow` only.";
|
|
439
|
+
};
|
|
440
|
+
readonly obligations: {
|
|
441
|
+
readonly type: "object";
|
|
442
|
+
readonly description: "Conditions attached to the grant. `allow` only.";
|
|
443
|
+
};
|
|
444
|
+
readonly bundleRef: {
|
|
445
|
+
readonly type: "object";
|
|
446
|
+
readonly description: "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only.";
|
|
447
|
+
};
|
|
448
|
+
readonly code: {
|
|
449
|
+
readonly type: "string";
|
|
450
|
+
readonly minLength: 1;
|
|
451
|
+
readonly description: "Stable refusal code, safe to branch on. `deny` only.";
|
|
452
|
+
};
|
|
453
|
+
readonly reason: {
|
|
454
|
+
readonly type: readonly ["string", "null"];
|
|
455
|
+
readonly description: "Elaboration in prose, when the decider gave one. `deny` and `refer`.";
|
|
456
|
+
};
|
|
457
|
+
readonly queue: {
|
|
458
|
+
readonly type: "string";
|
|
459
|
+
readonly minLength: 1;
|
|
460
|
+
readonly description: "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only.";
|
|
461
|
+
};
|
|
462
|
+
readonly needs: {
|
|
463
|
+
readonly type: "array";
|
|
464
|
+
readonly items: {
|
|
465
|
+
readonly type: "string";
|
|
466
|
+
readonly minLength: 1;
|
|
467
|
+
};
|
|
468
|
+
readonly description: "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only.";
|
|
469
|
+
};
|
|
470
|
+
readonly presentationDefinition: {
|
|
471
|
+
readonly type: "object";
|
|
472
|
+
readonly description: "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only.";
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
readonly VerdictEffect: {
|
|
477
|
+
readonly $anchor: "verdictEffect";
|
|
478
|
+
readonly title: "VerdictEffect";
|
|
479
|
+
readonly type: "string";
|
|
480
|
+
readonly enum: readonly ["allow", "deny", "refer", "requestMore"];
|
|
481
|
+
readonly description: "What the policy decided.\n\n`allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.\n\nThe four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act.";
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
488
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
489
|
+
* parties (§7.3 item 5).
|
|
490
|
+
*/
|
|
491
|
+
export declare const RESPONSE_SPEC: {
|
|
492
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/join-requests/submit/0.2#response";
|
|
493
|
+
readonly isBearer: false;
|
|
494
|
+
readonly isProofRequired: true;
|
|
495
|
+
readonly isRecipientRequired: true;
|
|
496
|
+
readonly payloadSchema: {
|
|
497
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
498
|
+
readonly $ref: "#/$defs/Response";
|
|
499
|
+
readonly $defs: {
|
|
500
|
+
readonly Response: {
|
|
501
|
+
readonly $anchor: "response";
|
|
502
|
+
readonly title: "VTC Join-Requests Submit — response payload";
|
|
503
|
+
readonly type: "object";
|
|
504
|
+
readonly additionalProperties: false;
|
|
505
|
+
readonly required: readonly ["requestId", "verdict"];
|
|
506
|
+
readonly properties: {
|
|
507
|
+
readonly requestId: {
|
|
508
|
+
readonly type: "string";
|
|
509
|
+
readonly minLength: 1;
|
|
510
|
+
readonly description: "Id of the created join request (a UUID).";
|
|
511
|
+
};
|
|
512
|
+
readonly verdict: {
|
|
513
|
+
readonly $ref: "#/$defs/Verdict";
|
|
514
|
+
readonly description: "What the community decided about this submission.\n\n`0.1` returned `status: \"pending\"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all.";
|
|
515
|
+
};
|
|
516
|
+
readonly ext: {
|
|
517
|
+
readonly $ref: "#/$defs/Ext";
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
readonly Ext: {
|
|
522
|
+
readonly title: "Ext";
|
|
523
|
+
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.";
|
|
524
|
+
readonly type: "object";
|
|
525
|
+
readonly minProperties: 1;
|
|
526
|
+
readonly additionalProperties: true;
|
|
527
|
+
readonly propertyNames: {
|
|
528
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
readonly Verdict: {
|
|
532
|
+
readonly $anchor: "verdict";
|
|
533
|
+
readonly title: "Verdict";
|
|
534
|
+
readonly type: "object";
|
|
535
|
+
readonly additionalProperties: false;
|
|
536
|
+
readonly required: readonly ["effect", "with"];
|
|
537
|
+
readonly description: "A ceremony decision: the effect, plus its effect-dependent detail.";
|
|
538
|
+
readonly properties: {
|
|
539
|
+
readonly effect: {
|
|
540
|
+
readonly $ref: "#/$defs/VerdictEffect";
|
|
541
|
+
};
|
|
542
|
+
readonly with: {
|
|
543
|
+
readonly $ref: "#/$defs/VerdictWith";
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
readonly VerdictWith: {
|
|
548
|
+
readonly $anchor: "verdictWith";
|
|
549
|
+
readonly title: "VerdictWith";
|
|
550
|
+
readonly type: "object";
|
|
551
|
+
readonly additionalProperties: false;
|
|
552
|
+
readonly description: "The effect-dependent detail of a verdict.\n\nEvery member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.";
|
|
553
|
+
readonly properties: {
|
|
554
|
+
readonly role: {
|
|
555
|
+
readonly type: "string";
|
|
556
|
+
readonly minLength: 1;
|
|
557
|
+
readonly description: "The granted local role. `allow` only.";
|
|
558
|
+
};
|
|
559
|
+
readonly obligations: {
|
|
560
|
+
readonly type: "object";
|
|
561
|
+
readonly description: "Conditions attached to the grant. `allow` only.";
|
|
562
|
+
};
|
|
563
|
+
readonly bundleRef: {
|
|
564
|
+
readonly type: "object";
|
|
565
|
+
readonly description: "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only.";
|
|
566
|
+
};
|
|
567
|
+
readonly code: {
|
|
568
|
+
readonly type: "string";
|
|
569
|
+
readonly minLength: 1;
|
|
570
|
+
readonly description: "Stable refusal code, safe to branch on. `deny` only.";
|
|
571
|
+
};
|
|
572
|
+
readonly reason: {
|
|
573
|
+
readonly type: readonly ["string", "null"];
|
|
574
|
+
readonly description: "Elaboration in prose, when the decider gave one. `deny` and `refer`.";
|
|
575
|
+
};
|
|
576
|
+
readonly queue: {
|
|
577
|
+
readonly type: "string";
|
|
578
|
+
readonly minLength: 1;
|
|
579
|
+
readonly description: "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only.";
|
|
580
|
+
};
|
|
581
|
+
readonly needs: {
|
|
582
|
+
readonly type: "array";
|
|
583
|
+
readonly items: {
|
|
584
|
+
readonly type: "string";
|
|
585
|
+
readonly minLength: 1;
|
|
586
|
+
};
|
|
587
|
+
readonly description: "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only.";
|
|
588
|
+
};
|
|
589
|
+
readonly presentationDefinition: {
|
|
590
|
+
readonly type: "object";
|
|
591
|
+
readonly description: "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only.";
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
readonly VerdictEffect: {
|
|
596
|
+
readonly $anchor: "verdictEffect";
|
|
597
|
+
readonly title: "VerdictEffect";
|
|
598
|
+
readonly type: "string";
|
|
599
|
+
readonly enum: readonly ["allow", "deny", "refer", "requestMore"];
|
|
600
|
+
readonly description: "What the policy decided.\n\n`allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.\n\nThe four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act.";
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vtc/join-requests/submit/0.2/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;AAEvE,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,EAAE,EAAE,EAAE,CAAC;IACP;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AACD,MAAM,WAAW,oCAAoC;IACnD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC;CACnB;AACD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,EAAE,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,EAAE,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,sBAAsB,CAAC,EAAE,EAAE,CAAC;CAC7B;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,0DAAmE,CAAC;AAE5F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,4BAA4B,CAAC;AAEnD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,mEAA4E,CAAC;AAE9G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,oCAAoC,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgJjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyH1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhB,CAAC"}
|