@openvtc/trust-tasks 0.19.10 → 0.19.12

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.
@@ -0,0 +1,319 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/join-requests/supplement/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/supplement/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/supplement/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/vtc/join-requests/supplement/0.1",
21
+ "title": "VTC Join-Requests Supplement — payload",
22
+ "description": "The evidence an applicant offers in answer to a community's request for more, against the join request they already have open. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "vp"
27
+ ],
28
+ "properties": {
29
+ "vp": {
30
+ "type": "object",
31
+ "description": "The Verifiable Presentation satisfying the `presentationDefinition` the community returned when it deferred. It REPLACES the presentation on the request rather than adding to it, so it carries everything the community requires and not only the shortfall — see the spec's Definitions."
32
+ },
33
+ "requestId": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "description": "The request to supplement. OPTIONAL: an applicant whose submit response was lost never received one, and the consumer then resolves the request from the authenticated applicant. A consumer given this value MUST prefer it over inferring the request from the caller."
37
+ },
38
+ "extensions": {
39
+ "type": "object",
40
+ "description": "An opaque bag the community stores verbatim and this task does not interpret. Replaces the bag on the request on the same terms as `vp`."
41
+ },
42
+ "ext": {
43
+ "$ref": "#/$defs/Ext"
44
+ }
45
+ },
46
+ "$defs": {
47
+ "Response": {
48
+ "$anchor": "response",
49
+ "title": "VTC Join-Requests Supplement — response payload",
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": [
53
+ "requestId",
54
+ "verdict"
55
+ ],
56
+ "description": "The community's fresh decision on the re-presented evidence. Failures use trust-task-error, not this shape.",
57
+ "properties": {
58
+ "requestId": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "description": "The request that was re-decided (a UUID). Returned even when the request omitted it, so an applicant who used the id-less form learns which request they answered."
62
+ },
63
+ "verdict": {
64
+ "$ref": "#/$defs/Verdict",
65
+ "description": "What the community decided on the new evidence, in the same shape `vtc/join-requests/submit` returns. MAY be any outcome a submission can produce, including a further request for more evidence and including a refusal."
66
+ },
67
+ "ext": {
68
+ "$ref": "#/$defs/Ext"
69
+ }
70
+ }
71
+ },
72
+ "Ext": {
73
+ "title": "Ext",
74
+ "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.",
75
+ "type": "object",
76
+ "minProperties": 1,
77
+ "additionalProperties": true,
78
+ "propertyNames": {
79
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
80
+ }
81
+ },
82
+ "Verdict": {
83
+ "$anchor": "verdict",
84
+ "title": "Verdict",
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "effect",
89
+ "with"
90
+ ],
91
+ "description": "A ceremony decision: the effect, plus its effect-dependent detail.",
92
+ "properties": {
93
+ "effect": {
94
+ "$ref": "#/$defs/VerdictEffect"
95
+ },
96
+ "with": {
97
+ "$ref": "#/$defs/VerdictWith"
98
+ }
99
+ }
100
+ },
101
+ "VerdictWith": {
102
+ "$anchor": "verdictWith",
103
+ "title": "VerdictWith",
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "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.",
107
+ "properties": {
108
+ "role": {
109
+ "type": "string",
110
+ "minLength": 1,
111
+ "description": "The granted local role. `allow` only."
112
+ },
113
+ "obligations": {
114
+ "type": "object",
115
+ "description": "Conditions attached to the grant. `allow` only."
116
+ },
117
+ "bundleRef": {
118
+ "type": "object",
119
+ "description": "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only."
120
+ },
121
+ "code": {
122
+ "type": "string",
123
+ "minLength": 1,
124
+ "description": "Stable refusal code, safe to branch on. `deny` only."
125
+ },
126
+ "reason": {
127
+ "type": [
128
+ "string",
129
+ "null"
130
+ ],
131
+ "maxLength": 1024,
132
+ "description": "Elaboration in prose, when the decider gave one. `deny` and `refer`."
133
+ },
134
+ "queue": {
135
+ "type": "string",
136
+ "minLength": 1,
137
+ "description": "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only."
138
+ },
139
+ "needs": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "string",
143
+ "minLength": 1
144
+ },
145
+ "description": "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only."
146
+ },
147
+ "presentationDefinition": {
148
+ "type": "object",
149
+ "description": "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only."
150
+ }
151
+ }
152
+ },
153
+ "VerdictEffect": {
154
+ "$anchor": "verdictEffect",
155
+ "title": "VerdictEffect",
156
+ "type": "string",
157
+ "enum": [
158
+ "allow",
159
+ "deny",
160
+ "refer",
161
+ "requestMore"
162
+ ],
163
+ "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."
164
+ }
165
+ }
166
+ };
167
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
168
+ export const RESPONSE_PAYLOAD_SCHEMA = {
169
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
170
+ "$ref": "#/$defs/Response",
171
+ "$defs": {
172
+ "Response": {
173
+ "$anchor": "response",
174
+ "title": "VTC Join-Requests Supplement — response payload",
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": [
178
+ "requestId",
179
+ "verdict"
180
+ ],
181
+ "description": "The community's fresh decision on the re-presented evidence. Failures use trust-task-error, not this shape.",
182
+ "properties": {
183
+ "requestId": {
184
+ "type": "string",
185
+ "minLength": 1,
186
+ "description": "The request that was re-decided (a UUID). Returned even when the request omitted it, so an applicant who used the id-less form learns which request they answered."
187
+ },
188
+ "verdict": {
189
+ "$ref": "#/$defs/Verdict",
190
+ "description": "What the community decided on the new evidence, in the same shape `vtc/join-requests/submit` returns. MAY be any outcome a submission can produce, including a further request for more evidence and including a refusal."
191
+ },
192
+ "ext": {
193
+ "$ref": "#/$defs/Ext"
194
+ }
195
+ }
196
+ },
197
+ "Ext": {
198
+ "title": "Ext",
199
+ "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.",
200
+ "type": "object",
201
+ "minProperties": 1,
202
+ "additionalProperties": true,
203
+ "propertyNames": {
204
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
205
+ }
206
+ },
207
+ "Verdict": {
208
+ "$anchor": "verdict",
209
+ "title": "Verdict",
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "required": [
213
+ "effect",
214
+ "with"
215
+ ],
216
+ "description": "A ceremony decision: the effect, plus its effect-dependent detail.",
217
+ "properties": {
218
+ "effect": {
219
+ "$ref": "#/$defs/VerdictEffect"
220
+ },
221
+ "with": {
222
+ "$ref": "#/$defs/VerdictWith"
223
+ }
224
+ }
225
+ },
226
+ "VerdictWith": {
227
+ "$anchor": "verdictWith",
228
+ "title": "VerdictWith",
229
+ "type": "object",
230
+ "additionalProperties": false,
231
+ "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.",
232
+ "properties": {
233
+ "role": {
234
+ "type": "string",
235
+ "minLength": 1,
236
+ "description": "The granted local role. `allow` only."
237
+ },
238
+ "obligations": {
239
+ "type": "object",
240
+ "description": "Conditions attached to the grant. `allow` only."
241
+ },
242
+ "bundleRef": {
243
+ "type": "object",
244
+ "description": "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only."
245
+ },
246
+ "code": {
247
+ "type": "string",
248
+ "minLength": 1,
249
+ "description": "Stable refusal code, safe to branch on. `deny` only."
250
+ },
251
+ "reason": {
252
+ "type": [
253
+ "string",
254
+ "null"
255
+ ],
256
+ "maxLength": 1024,
257
+ "description": "Elaboration in prose, when the decider gave one. `deny` and `refer`."
258
+ },
259
+ "queue": {
260
+ "type": "string",
261
+ "minLength": 1,
262
+ "description": "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only."
263
+ },
264
+ "needs": {
265
+ "type": "array",
266
+ "items": {
267
+ "type": "string",
268
+ "minLength": 1
269
+ },
270
+ "description": "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only."
271
+ },
272
+ "presentationDefinition": {
273
+ "type": "object",
274
+ "description": "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only."
275
+ }
276
+ }
277
+ },
278
+ "VerdictEffect": {
279
+ "$anchor": "verdictEffect",
280
+ "title": "VerdictEffect",
281
+ "type": "string",
282
+ "enum": [
283
+ "allow",
284
+ "deny",
285
+ "refer",
286
+ "requestMore"
287
+ ],
288
+ "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."
289
+ }
290
+ }
291
+ };
292
+ /**
293
+ * SPEC.md §7.2 policy for the request variant, from this specification's
294
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
295
+ * per-specification and cannot be derived from the document alone, and
296
+ * item 2 needs the schema this carries.
297
+ */
298
+ export const SPEC = {
299
+ typeUri: TYPE_URI,
300
+ isBearer: false,
301
+ isProofRequired: true,
302
+ isRecipientRequired: true,
303
+ isIssuedAtRequired: true,
304
+ payloadSchema: PAYLOAD_SCHEMA,
305
+ };
306
+ /**
307
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
308
+ * tracks the *issuer* party's requirement because a response swaps the
309
+ * parties (§7.3 item 5).
310
+ */
311
+ export const RESPONSE_SPEC = {
312
+ typeUri: RESPONSE_TYPE_URI,
313
+ isBearer: false,
314
+ isProofRequired: false,
315
+ isRecipientRequired: true,
316
+ isIssuedAtRequired: true,
317
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
318
+ };
319
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vtc/join-requests/supplement/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,8DAAuE,CAAC;AAKhG,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,uEAAgF,CAAC;AAKlH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,8DAA8D;IACrE,OAAO,EAAE,wCAAwC;IACjD,aAAa,EAAE,6PAA6P;IAC5Q,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,IAAI;KACL;IACD,YAAY,EAAE;QACZ,IAAI,EAAE;YACJ,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,6RAA6R;SAC7S;QACD,WAAW,EAAE;YACX,MAAM,EAAE,QAAQ;YAChB,WAAW,EAAE,CAAC;YACd,aAAa,EAAE,0QAA0Q;SAC1R;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,QAAQ;YAChB,aAAa,EAAE,0IAA0I;SAC1J;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa;SACtB;KACF;IACD,OAAO,EAAE;QACP,UAAU,EAAE;YACV,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,iDAAiD;YAC1D,MAAM,EAAE,QAAQ;YAChB,sBAAsB,EAAE,KAAK;YAC7B,UAAU,EAAE;gBACV,WAAW;gBACX,SAAS;aACV;YACD,aAAa,EAAE,6GAA6G;YAC5H,YAAY,EAAE;gBACZ,WAAW,EAAE;oBACX,MAAM,EAAE,QAAQ;oBAChB,WAAW,EAAE,CAAC;oBACd,aAAa,EAAE,oKAAoK;iBACpL;gBACD,SAAS,EAAE;oBACT,MAAM,EAAE,iBA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gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,OAAO;oBACf,OAAO,EAAE;wBACP,MAAM,EAAE,QAAQ;wBAChB,WAAW,EAAE,CAAC;qBACf;oBACD,aAAa,EAAE,uHAAuH;iBACvI;gBACD,wBAAwB,EAAE;oBACxB,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,mIAAmI;iBACnJ;aACF;SACF;QACD,eAAe,EAAE;YACf,SAAS,EAAE,eAAe;YAC1B,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,OAAO;gBACP,MAAM;gBACN,OAAO;gBACP,aAAa;aACd;YACD,aAAa,EAAE,6kBAA6kB;SAC7lB;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
@@ -0,0 +1,273 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/join-requests/withdraw/0.1/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../_shared/components.js";
6
+ /**
7
+ * What an applicant sends to close their own open join request. Every member is optional: the authenticated issuer identifies the applicant, and a community that allows at most one open request per applicant can resolve the request from that alone. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
8
+ */
9
+ export interface VTCJoinRequestsWithdrawPayload {
10
+ /**
11
+ * The request to withdraw. Optional: an applicant whose submit response was lost never received an id, and the id-less form — resolved from the authenticated applicant's own identifier — is the only one available to them. Supply it when you have it; a consumer that has it MUST prefer it over inferring the request from the caller.
12
+ */
13
+ requestId?: string;
14
+ /**
15
+ * Free text for the humans who will read the community's record of this withdrawal — a vetter who attested, or a maintainer mid-review. A consumer MUST NOT interpret it or branch on its content. A producer MUST NOT put credentials, secrets, or personal data about anyone other than the applicant into it.
16
+ */
17
+ reason?: string;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * Confirms which request was closed. Failures use trust-task-error, not this shape.
22
+ */
23
+ export interface VTCJoinRequestsWithdrawResponsePayload {
24
+ /**
25
+ * The request that was withdrawn. Returned even when the request omitted it, so an applicant who used the id-less form learns which request they closed.
26
+ */
27
+ requestId: string;
28
+ /**
29
+ * The request's state after the withdrawal. Always `withdrawn`; returned rather than implied so the response is self-describing to a reader holding only this document.
30
+ */
31
+ status: "withdrawn";
32
+ ext?: Ext;
33
+ }
34
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
35
+ export type { Ext };
36
+ /** Trust Task type URI. */
37
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/join-requests/withdraw/0.1";
38
+ /** Stable alias for this specification's request payload shape. */
39
+ export type Payload = VTCJoinRequestsWithdrawPayload;
40
+ /** Trust Task response type URI (request type URI + "#response"). */
41
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/join-requests/withdraw/0.1#response";
42
+ /** Stable alias for this specification's success-response payload shape. */
43
+ export type Response = VTCJoinRequestsWithdrawResponsePayload;
44
+ /**
45
+ * This specification's payload schema, as a value.
46
+ *
47
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
48
+ * rather than only as a `.json` file because TypeScript types are erased
49
+ * at runtime: without a schema a consumer has nothing to validate, and
50
+ * every REQUIRED payload member is optional in practice. Cross-file
51
+ * `$ref`s are already inlined, so it needs no resolver.
52
+ */
53
+ export declare const PAYLOAD_SCHEMA: {
54
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
55
+ readonly $id: "https://trusttasks.org/spec/vtc/join-requests/withdraw/0.1";
56
+ readonly title: "VTC Join-Requests — Withdraw — payload";
57
+ readonly description: "What an applicant sends to close their own open join request. Every member is optional: the authenticated issuer identifies the applicant, and a community that allows at most one open request per applicant can resolve the request from that alone. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
58
+ readonly type: "object";
59
+ readonly additionalProperties: false;
60
+ readonly properties: {
61
+ readonly requestId: {
62
+ readonly type: "string";
63
+ readonly minLength: 1;
64
+ readonly description: "The request to withdraw. Optional: an applicant whose submit response was lost never received an id, and the id-less form — resolved from the authenticated applicant's own identifier — is the only one available to them. Supply it when you have it; a consumer that has it MUST prefer it over inferring the request from the caller.";
65
+ };
66
+ readonly reason: {
67
+ readonly type: "string";
68
+ readonly maxLength: 1024;
69
+ readonly description: "Free text for the humans who will read the community's record of this withdrawal — a vetter who attested, or a maintainer mid-review. A consumer MUST NOT interpret it or branch on its content. A producer MUST NOT put credentials, secrets, or personal data about anyone other than the applicant into it.";
70
+ };
71
+ readonly ext: {
72
+ readonly $ref: "#/$defs/Ext";
73
+ };
74
+ };
75
+ readonly $defs: {
76
+ readonly Response: {
77
+ readonly $anchor: "response";
78
+ readonly title: "VTC Join-Requests — Withdraw — response payload";
79
+ readonly type: "object";
80
+ readonly additionalProperties: false;
81
+ readonly required: readonly ["requestId", "status"];
82
+ readonly description: "Confirms which request was closed. Failures use trust-task-error, not this shape.";
83
+ readonly properties: {
84
+ readonly requestId: {
85
+ readonly type: "string";
86
+ readonly minLength: 1;
87
+ readonly description: "The request that was withdrawn. Returned even when the request omitted it, so an applicant who used the id-less form learns which request they closed.";
88
+ };
89
+ readonly status: {
90
+ readonly type: "string";
91
+ readonly enum: readonly ["withdrawn"];
92
+ readonly description: "The request's state after the withdrawal. Always `withdrawn`; returned rather than implied so the response is self-describing to a reader holding only this document.";
93
+ };
94
+ readonly ext: {
95
+ readonly $ref: "#/$defs/Ext";
96
+ };
97
+ };
98
+ };
99
+ readonly Ext: {
100
+ readonly title: "Ext";
101
+ 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.";
102
+ readonly type: "object";
103
+ readonly minProperties: 1;
104
+ readonly additionalProperties: true;
105
+ readonly propertyNames: {
106
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
107
+ };
108
+ };
109
+ };
110
+ };
111
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
112
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
113
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
114
+ readonly $ref: "#/$defs/Response";
115
+ readonly $defs: {
116
+ readonly Response: {
117
+ readonly $anchor: "response";
118
+ readonly title: "VTC Join-Requests — Withdraw — response payload";
119
+ readonly type: "object";
120
+ readonly additionalProperties: false;
121
+ readonly required: readonly ["requestId", "status"];
122
+ readonly description: "Confirms which request was closed. Failures use trust-task-error, not this shape.";
123
+ readonly properties: {
124
+ readonly requestId: {
125
+ readonly type: "string";
126
+ readonly minLength: 1;
127
+ readonly description: "The request that was withdrawn. Returned even when the request omitted it, so an applicant who used the id-less form learns which request they closed.";
128
+ };
129
+ readonly status: {
130
+ readonly type: "string";
131
+ readonly enum: readonly ["withdrawn"];
132
+ readonly description: "The request's state after the withdrawal. Always `withdrawn`; returned rather than implied so the response is self-describing to a reader holding only this document.";
133
+ };
134
+ readonly ext: {
135
+ readonly $ref: "#/$defs/Ext";
136
+ };
137
+ };
138
+ };
139
+ readonly Ext: {
140
+ readonly title: "Ext";
141
+ 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.";
142
+ readonly type: "object";
143
+ readonly minProperties: 1;
144
+ readonly additionalProperties: true;
145
+ readonly propertyNames: {
146
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
147
+ };
148
+ };
149
+ };
150
+ };
151
+ /**
152
+ * SPEC.md §7.2 policy for the request variant, from this specification's
153
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
154
+ * per-specification and cannot be derived from the document alone, and
155
+ * item 2 needs the schema this carries.
156
+ */
157
+ export declare const SPEC: {
158
+ readonly typeUri: "https://trusttasks.org/spec/vtc/join-requests/withdraw/0.1";
159
+ readonly isBearer: false;
160
+ readonly isProofRequired: true;
161
+ readonly isRecipientRequired: true;
162
+ readonly isIssuedAtRequired: true;
163
+ readonly payloadSchema: {
164
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
165
+ readonly $id: "https://trusttasks.org/spec/vtc/join-requests/withdraw/0.1";
166
+ readonly title: "VTC Join-Requests — Withdraw — payload";
167
+ readonly description: "What an applicant sends to close their own open join request. Every member is optional: the authenticated issuer identifies the applicant, and a community that allows at most one open request per applicant can resolve the request from that alone. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
168
+ readonly type: "object";
169
+ readonly additionalProperties: false;
170
+ readonly properties: {
171
+ readonly requestId: {
172
+ readonly type: "string";
173
+ readonly minLength: 1;
174
+ readonly description: "The request to withdraw. Optional: an applicant whose submit response was lost never received an id, and the id-less form — resolved from the authenticated applicant's own identifier — is the only one available to them. Supply it when you have it; a consumer that has it MUST prefer it over inferring the request from the caller.";
175
+ };
176
+ readonly reason: {
177
+ readonly type: "string";
178
+ readonly maxLength: 1024;
179
+ readonly description: "Free text for the humans who will read the community's record of this withdrawal — a vetter who attested, or a maintainer mid-review. A consumer MUST NOT interpret it or branch on its content. A producer MUST NOT put credentials, secrets, or personal data about anyone other than the applicant into it.";
180
+ };
181
+ readonly ext: {
182
+ readonly $ref: "#/$defs/Ext";
183
+ };
184
+ };
185
+ readonly $defs: {
186
+ readonly Response: {
187
+ readonly $anchor: "response";
188
+ readonly title: "VTC Join-Requests — Withdraw — response payload";
189
+ readonly type: "object";
190
+ readonly additionalProperties: false;
191
+ readonly required: readonly ["requestId", "status"];
192
+ readonly description: "Confirms which request was closed. Failures use trust-task-error, not this shape.";
193
+ readonly properties: {
194
+ readonly requestId: {
195
+ readonly type: "string";
196
+ readonly minLength: 1;
197
+ readonly description: "The request that was withdrawn. Returned even when the request omitted it, so an applicant who used the id-less form learns which request they closed.";
198
+ };
199
+ readonly status: {
200
+ readonly type: "string";
201
+ readonly enum: readonly ["withdrawn"];
202
+ readonly description: "The request's state after the withdrawal. Always `withdrawn`; returned rather than implied so the response is self-describing to a reader holding only this document.";
203
+ };
204
+ readonly ext: {
205
+ readonly $ref: "#/$defs/Ext";
206
+ };
207
+ };
208
+ };
209
+ readonly Ext: {
210
+ readonly title: "Ext";
211
+ 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.";
212
+ readonly type: "object";
213
+ readonly minProperties: 1;
214
+ readonly additionalProperties: true;
215
+ readonly propertyNames: {
216
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
217
+ };
218
+ };
219
+ };
220
+ };
221
+ };
222
+ /**
223
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
224
+ * tracks the *issuer* party's requirement because a response swaps the
225
+ * parties (§7.3 item 5).
226
+ */
227
+ export declare const RESPONSE_SPEC: {
228
+ readonly typeUri: "https://trusttasks.org/spec/vtc/join-requests/withdraw/0.1#response";
229
+ readonly isBearer: false;
230
+ readonly isProofRequired: false;
231
+ readonly isRecipientRequired: true;
232
+ readonly isIssuedAtRequired: true;
233
+ readonly payloadSchema: {
234
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
235
+ readonly $ref: "#/$defs/Response";
236
+ readonly $defs: {
237
+ readonly Response: {
238
+ readonly $anchor: "response";
239
+ readonly title: "VTC Join-Requests — Withdraw — response payload";
240
+ readonly type: "object";
241
+ readonly additionalProperties: false;
242
+ readonly required: readonly ["requestId", "status"];
243
+ readonly description: "Confirms which request was closed. Failures use trust-task-error, not this shape.";
244
+ readonly properties: {
245
+ readonly requestId: {
246
+ readonly type: "string";
247
+ readonly minLength: 1;
248
+ readonly description: "The request that was withdrawn. Returned even when the request omitted it, so an applicant who used the id-less form learns which request they closed.";
249
+ };
250
+ readonly status: {
251
+ readonly type: "string";
252
+ readonly enum: readonly ["withdrawn"];
253
+ readonly description: "The request's state after the withdrawal. Always `withdrawn`; returned rather than implied so the response is self-describing to a reader holding only this document.";
254
+ };
255
+ readonly ext: {
256
+ readonly $ref: "#/$defs/Ext";
257
+ };
258
+ };
259
+ };
260
+ readonly Ext: {
261
+ readonly title: "Ext";
262
+ 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.";
263
+ readonly type: "object";
264
+ readonly minProperties: 1;
265
+ readonly additionalProperties: true;
266
+ readonly propertyNames: {
267
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
268
+ };
269
+ };
270
+ };
271
+ };
272
+ };
273
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vtc/join-requests/withdraw/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACrD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE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