@openvtc/trust-tasks 0.19.3 → 0.19.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +209 -0
  2. package/dist/_shared/components.d.ts +298 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +14 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +14 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/vetting/_shared/0.1/identity-vetting.d.ts +11 -0
  9. package/dist/vetting/_shared/0.1/identity-vetting.d.ts.map +1 -0
  10. package/dist/vetting/_shared/0.1/identity-vetting.js +6 -0
  11. package/dist/vetting/_shared/0.1/identity-vetting.js.map +1 -0
  12. package/dist/vetting/_shared/0.1/vetting-card.d.ts +16 -0
  13. package/dist/vetting/_shared/0.1/vetting-card.d.ts.map +1 -0
  14. package/dist/vetting/_shared/0.1/vetting-card.js +6 -0
  15. package/dist/vetting/_shared/0.1/vetting-card.js.map +1 -0
  16. package/dist/vetting/_shared/0.1/vetting.d.ts +16 -0
  17. package/dist/vetting/_shared/0.1/vetting.d.ts.map +1 -0
  18. package/dist/vetting/_shared/0.1/vetting.js +6 -0
  19. package/dist/vetting/_shared/0.1/vetting.js.map +1 -0
  20. package/dist/vetting/decline/0.1/payload.d.ts +138 -0
  21. package/dist/vetting/decline/0.1/payload.d.ts.map +1 -0
  22. package/dist/vetting/decline/0.1/payload.js +81 -0
  23. package/dist/vetting/decline/0.1/payload.js.map +1 -0
  24. package/dist/vetting/request/0.1/payload.d.ts +1188 -0
  25. package/dist/vetting/request/0.1/payload.d.ts.map +1 -0
  26. package/dist/vetting/request/0.1/payload.js +596 -0
  27. package/dist/vetting/request/0.1/payload.js.map +1 -0
  28. package/dist/vetting/session/0.1/payload.d.ts +978 -0
  29. package/dist/vetting/session/0.1/payload.d.ts.map +1 -0
  30. package/dist/vetting/session/0.1/payload.js +570 -0
  31. package/dist/vetting/session/0.1/payload.js.map +1 -0
  32. package/dist/vta/webvh/dids/realign-keys/1.0/payload.d.ts +484 -0
  33. package/dist/vta/webvh/dids/realign-keys/1.0/payload.d.ts.map +1 -0
  34. package/dist/vta/webvh/dids/realign-keys/1.0/payload.js +259 -0
  35. package/dist/vta/webvh/dids/realign-keys/1.0/payload.js.map +1 -0
  36. package/dist/vtc/_shared/0.1/vetter-profile.d.ts +16 -0
  37. package/dist/vtc/_shared/0.1/vetter-profile.d.ts.map +1 -0
  38. package/dist/vtc/_shared/0.1/vetter-profile.js +6 -0
  39. package/dist/vtc/_shared/0.1/vetter-profile.js.map +1 -0
  40. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts +1294 -0
  41. package/dist/vtc/join-requests/manifest/0.2/payload.d.ts.map +1 -0
  42. package/dist/vtc/join-requests/manifest/0.2/payload.js +667 -0
  43. package/dist/vtc/join-requests/manifest/0.2/payload.js.map +1 -0
  44. package/dist/vtc/vetting/revoke-statement/0.1/payload.d.ts +299 -0
  45. package/dist/vtc/vetting/revoke-statement/0.1/payload.d.ts.map +1 -0
  46. package/dist/vtc/vetting/revoke-statement/0.1/payload.js +172 -0
  47. package/dist/vtc/vetting/revoke-statement/0.1/payload.js.map +1 -0
  48. package/dist/vtc/vetting/vetters/grant/0.1/payload.d.ts +337 -0
  49. package/dist/vtc/vetting/vetters/grant/0.1/payload.d.ts.map +1 -0
  50. package/dist/vtc/vetting/vetters/grant/0.1/payload.js +183 -0
  51. package/dist/vtc/vetting/vetters/grant/0.1/payload.js.map +1 -0
  52. package/dist/vtc/vetting/vetters/list/0.1/payload.d.ts +1257 -0
  53. package/dist/vtc/vetting/vetters/list/0.1/payload.d.ts.map +1 -0
  54. package/dist/vtc/vetting/vetters/list/0.1/payload.js +597 -0
  55. package/dist/vtc/vetting/vetters/list/0.1/payload.js.map +1 -0
  56. package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts +970 -0
  57. package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts.map +1 -0
  58. package/dist/vtc/vetting/vetters/profile/0.1/payload.js +463 -0
  59. package/dist/vtc/vetting/vetters/profile/0.1/payload.js.map +1 -0
  60. package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts +240 -0
  61. package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts.map +1 -0
  62. package/dist/vtc/vetting/vetters/resend/0.1/payload.js +137 -0
  63. package/dist/vtc/vetting/vetters/resend/0.1/payload.js.map +1 -0
  64. package/package.json +1 -1
  65. package/src/_shared/components.ts +318 -0
  66. package/src/index.ts +14 -0
  67. package/src/vetting/_shared/0.1/identity-vetting.ts +11 -0
  68. package/src/vetting/_shared/0.1/vetting-card.ts +17 -0
  69. package/src/vetting/_shared/0.1/vetting.ts +17 -0
  70. package/src/vetting/decline/0.1/payload.ts +111 -0
  71. package/src/vetting/request/0.1/payload.ts +799 -0
  72. package/src/vetting/session/0.1/payload.ts +629 -0
  73. package/src/vta/webvh/dids/realign-keys/1.0/payload.ts +332 -0
  74. package/src/vtc/_shared/0.1/vetter-profile.ts +17 -0
  75. package/src/vtc/join-requests/manifest/0.2/payload.ts +815 -0
  76. package/src/vtc/vetting/revoke-statement/0.1/payload.ts +218 -0
  77. package/src/vtc/vetting/vetters/grant/0.1/payload.ts +237 -0
  78. package/src/vtc/vetting/vetters/list/0.1/payload.ts +816 -0
  79. package/src/vtc/vetting/vetters/profile/0.1/payload.ts +647 -0
  80. package/src/vtc/vetting/vetters/resend/0.1/payload.ts +174 -0
@@ -0,0 +1,337 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/vetting/vetters/grant/0.1/payload.schema.json
4
+ */
5
+ import type { Ext } from "../../../../../_shared/components.js";
6
+ /**
7
+ * A community administrator makes a member a vetter. The community issues the member a revocable `CommunityRole` endorsement credential for the `vetter` role, delivers it over credential-exchange/issue, and returns the identifiers and validity of the grant. A member who already holds a live grant gets that grant back unchanged.
8
+ */
9
+ export interface VTCVettingVettersGrantPayload {
10
+ /**
11
+ * The member DID to grant the vetter role to — the subject of the role credential, and the DID the vetter signs statements with.
12
+ */
13
+ memberDid: string;
14
+ /**
15
+ * OPTIONAL. How long the role credential is valid, from issuance: at least one day, at most two years. Absent: 31536000 (365 days). Ignored when the member already holds a live grant.
16
+ */
17
+ validitySeconds?: number;
18
+ ext?: Ext;
19
+ }
20
+ /**
21
+ * The grant — newly issued, or the member's existing live grant.
22
+ */
23
+ export interface VTCVettingVettersGrantResponsePayload {
24
+ /**
25
+ * The community's endorsement record for this grant — the identifier vtc/endorsements/revoke takes.
26
+ */
27
+ endorsementId: string;
28
+ /**
29
+ * The `id` of the role credential, a URI.
30
+ */
31
+ credentialId: string;
32
+ /**
33
+ * The role credential's `validFrom`.
34
+ */
35
+ validFrom: string;
36
+ /**
37
+ * The role credential's `validUntil`.
38
+ */
39
+ validUntil: string;
40
+ ext?: Ext;
41
+ }
42
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
43
+ export type { Ext };
44
+ /** Trust Task type URI. */
45
+ export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/vetting/vetters/grant/0.1";
46
+ /** Stable alias for this specification's request payload shape. */
47
+ export type Payload = VTCVettingVettersGrantPayload;
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/vetting/vetters/grant/0.1#response";
50
+ /** Stable alias for this specification's success-response payload shape. */
51
+ export type Response = VTCVettingVettersGrantResponsePayload;
52
+ /**
53
+ * This specification's payload schema, as a value.
54
+ *
55
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
56
+ * rather than only as a `.json` file because TypeScript types are erased
57
+ * at runtime: without a schema a consumer has nothing to validate, and
58
+ * every REQUIRED payload member is optional in practice. Cross-file
59
+ * `$ref`s are already inlined, so it needs no resolver.
60
+ */
61
+ export declare const PAYLOAD_SCHEMA: {
62
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
63
+ readonly $id: "https://trusttasks.org/spec/vtc/vetting/vetters/grant/0.1";
64
+ readonly title: "VTC Vetting — Vetters Grant — payload";
65
+ readonly description: "A community administrator makes a member a vetter. The community issues the member a revocable `CommunityRole` endorsement credential for the `vetter` role, delivers it over credential-exchange/issue, and returns the identifiers and validity of the grant. A member who already holds a live grant gets that grant back unchanged.";
66
+ readonly type: "object";
67
+ readonly additionalProperties: false;
68
+ readonly required: readonly ["memberDid"];
69
+ readonly properties: {
70
+ readonly memberDid: {
71
+ readonly type: "string";
72
+ readonly pattern: "^did:";
73
+ readonly description: "The member DID to grant the vetter role to — the subject of the role credential, and the DID the vetter signs statements with.";
74
+ };
75
+ readonly validitySeconds: {
76
+ readonly type: "integer";
77
+ readonly minimum: 86400;
78
+ readonly maximum: 63072000;
79
+ readonly description: "OPTIONAL. How long the role credential is valid, from issuance: at least one day, at most two years. Absent: 31536000 (365 days). Ignored when the member already holds a live grant.";
80
+ };
81
+ readonly ext: {
82
+ readonly $ref: "#/$defs/Ext";
83
+ };
84
+ };
85
+ readonly $defs: {
86
+ readonly Response: {
87
+ readonly $anchor: "response";
88
+ readonly title: "VTC Vetting — Vetters Grant — response payload";
89
+ readonly description: "The grant — newly issued, or the member's existing live grant.";
90
+ readonly type: "object";
91
+ readonly additionalProperties: false;
92
+ readonly required: readonly ["endorsementId", "credentialId", "validFrom", "validUntil"];
93
+ readonly properties: {
94
+ readonly endorsementId: {
95
+ readonly type: "string";
96
+ readonly minLength: 1;
97
+ readonly maxLength: 128;
98
+ readonly description: "The community's endorsement record for this grant — the identifier vtc/endorsements/revoke takes.";
99
+ };
100
+ readonly credentialId: {
101
+ readonly type: "string";
102
+ readonly minLength: 1;
103
+ readonly maxLength: 512;
104
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:\\S+$";
105
+ readonly description: "The `id` of the role credential, a URI.";
106
+ };
107
+ readonly validFrom: {
108
+ readonly type: "string";
109
+ readonly format: "date-time";
110
+ readonly description: "The role credential's `validFrom`.";
111
+ };
112
+ readonly validUntil: {
113
+ readonly type: "string";
114
+ readonly format: "date-time";
115
+ readonly description: "The role credential's `validUntil`.";
116
+ };
117
+ readonly ext: {
118
+ readonly $ref: "#/$defs/Ext";
119
+ };
120
+ };
121
+ };
122
+ readonly Ext: {
123
+ readonly title: "Ext";
124
+ 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.";
125
+ readonly type: "object";
126
+ readonly minProperties: 1;
127
+ readonly additionalProperties: true;
128
+ readonly propertyNames: {
129
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
130
+ };
131
+ };
132
+ };
133
+ };
134
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
135
+ export declare const RESPONSE_PAYLOAD_SCHEMA: {
136
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
137
+ readonly $ref: "#/$defs/Response";
138
+ readonly $defs: {
139
+ readonly Response: {
140
+ readonly $anchor: "response";
141
+ readonly title: "VTC Vetting — Vetters Grant — response payload";
142
+ readonly description: "The grant — newly issued, or the member's existing live grant.";
143
+ readonly type: "object";
144
+ readonly additionalProperties: false;
145
+ readonly required: readonly ["endorsementId", "credentialId", "validFrom", "validUntil"];
146
+ readonly properties: {
147
+ readonly endorsementId: {
148
+ readonly type: "string";
149
+ readonly minLength: 1;
150
+ readonly maxLength: 128;
151
+ readonly description: "The community's endorsement record for this grant — the identifier vtc/endorsements/revoke takes.";
152
+ };
153
+ readonly credentialId: {
154
+ readonly type: "string";
155
+ readonly minLength: 1;
156
+ readonly maxLength: 512;
157
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:\\S+$";
158
+ readonly description: "The `id` of the role credential, a URI.";
159
+ };
160
+ readonly validFrom: {
161
+ readonly type: "string";
162
+ readonly format: "date-time";
163
+ readonly description: "The role credential's `validFrom`.";
164
+ };
165
+ readonly validUntil: {
166
+ readonly type: "string";
167
+ readonly format: "date-time";
168
+ readonly description: "The role credential's `validUntil`.";
169
+ };
170
+ readonly ext: {
171
+ readonly $ref: "#/$defs/Ext";
172
+ };
173
+ };
174
+ };
175
+ readonly Ext: {
176
+ readonly title: "Ext";
177
+ 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.";
178
+ readonly type: "object";
179
+ readonly minProperties: 1;
180
+ readonly additionalProperties: true;
181
+ readonly propertyNames: {
182
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
183
+ };
184
+ };
185
+ };
186
+ };
187
+ /**
188
+ * SPEC.md §7.2 policy for the request variant, from this specification's
189
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
190
+ * per-specification and cannot be derived from the document alone, and
191
+ * item 2 needs the schema this carries.
192
+ */
193
+ export declare const SPEC: {
194
+ readonly typeUri: "https://trusttasks.org/spec/vtc/vetting/vetters/grant/0.1";
195
+ readonly isBearer: false;
196
+ readonly isProofRequired: true;
197
+ readonly isRecipientRequired: true;
198
+ readonly isIssuedAtRequired: true;
199
+ readonly payloadSchema: {
200
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
201
+ readonly $id: "https://trusttasks.org/spec/vtc/vetting/vetters/grant/0.1";
202
+ readonly title: "VTC Vetting — Vetters Grant — payload";
203
+ readonly description: "A community administrator makes a member a vetter. The community issues the member a revocable `CommunityRole` endorsement credential for the `vetter` role, delivers it over credential-exchange/issue, and returns the identifiers and validity of the grant. A member who already holds a live grant gets that grant back unchanged.";
204
+ readonly type: "object";
205
+ readonly additionalProperties: false;
206
+ readonly required: readonly ["memberDid"];
207
+ readonly properties: {
208
+ readonly memberDid: {
209
+ readonly type: "string";
210
+ readonly pattern: "^did:";
211
+ readonly description: "The member DID to grant the vetter role to — the subject of the role credential, and the DID the vetter signs statements with.";
212
+ };
213
+ readonly validitySeconds: {
214
+ readonly type: "integer";
215
+ readonly minimum: 86400;
216
+ readonly maximum: 63072000;
217
+ readonly description: "OPTIONAL. How long the role credential is valid, from issuance: at least one day, at most two years. Absent: 31536000 (365 days). Ignored when the member already holds a live grant.";
218
+ };
219
+ readonly ext: {
220
+ readonly $ref: "#/$defs/Ext";
221
+ };
222
+ };
223
+ readonly $defs: {
224
+ readonly Response: {
225
+ readonly $anchor: "response";
226
+ readonly title: "VTC Vetting — Vetters Grant — response payload";
227
+ readonly description: "The grant — newly issued, or the member's existing live grant.";
228
+ readonly type: "object";
229
+ readonly additionalProperties: false;
230
+ readonly required: readonly ["endorsementId", "credentialId", "validFrom", "validUntil"];
231
+ readonly properties: {
232
+ readonly endorsementId: {
233
+ readonly type: "string";
234
+ readonly minLength: 1;
235
+ readonly maxLength: 128;
236
+ readonly description: "The community's endorsement record for this grant — the identifier vtc/endorsements/revoke takes.";
237
+ };
238
+ readonly credentialId: {
239
+ readonly type: "string";
240
+ readonly minLength: 1;
241
+ readonly maxLength: 512;
242
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:\\S+$";
243
+ readonly description: "The `id` of the role credential, a URI.";
244
+ };
245
+ readonly validFrom: {
246
+ readonly type: "string";
247
+ readonly format: "date-time";
248
+ readonly description: "The role credential's `validFrom`.";
249
+ };
250
+ readonly validUntil: {
251
+ readonly type: "string";
252
+ readonly format: "date-time";
253
+ readonly description: "The role credential's `validUntil`.";
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
+ /**
274
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
275
+ * tracks the *issuer* party's requirement because a response swaps the
276
+ * parties (§7.3 item 5).
277
+ */
278
+ export declare const RESPONSE_SPEC: {
279
+ readonly typeUri: "https://trusttasks.org/spec/vtc/vetting/vetters/grant/0.1#response";
280
+ readonly isBearer: false;
281
+ readonly isProofRequired: true;
282
+ readonly isRecipientRequired: true;
283
+ readonly isIssuedAtRequired: true;
284
+ readonly payloadSchema: {
285
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
286
+ readonly $ref: "#/$defs/Response";
287
+ readonly $defs: {
288
+ readonly Response: {
289
+ readonly $anchor: "response";
290
+ readonly title: "VTC Vetting — Vetters Grant — response payload";
291
+ readonly description: "The grant — newly issued, or the member's existing live grant.";
292
+ readonly type: "object";
293
+ readonly additionalProperties: false;
294
+ readonly required: readonly ["endorsementId", "credentialId", "validFrom", "validUntil"];
295
+ readonly properties: {
296
+ readonly endorsementId: {
297
+ readonly type: "string";
298
+ readonly minLength: 1;
299
+ readonly maxLength: 128;
300
+ readonly description: "The community's endorsement record for this grant — the identifier vtc/endorsements/revoke takes.";
301
+ };
302
+ readonly credentialId: {
303
+ readonly type: "string";
304
+ readonly minLength: 1;
305
+ readonly maxLength: 512;
306
+ readonly pattern: "^[a-zA-Z][a-zA-Z0-9+.-]*:\\S+$";
307
+ readonly description: "The `id` of the role credential, a URI.";
308
+ };
309
+ readonly validFrom: {
310
+ readonly type: "string";
311
+ readonly format: "date-time";
312
+ readonly description: "The role credential's `validFrom`.";
313
+ };
314
+ readonly validUntil: {
315
+ readonly type: "string";
316
+ readonly format: "date-time";
317
+ readonly description: "The role credential's `validUntil`.";
318
+ };
319
+ readonly ext: {
320
+ readonly $ref: "#/$defs/Ext";
321
+ };
322
+ };
323
+ };
324
+ readonly Ext: {
325
+ readonly title: "Ext";
326
+ 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.";
327
+ readonly type: "object";
328
+ readonly minProperties: 1;
329
+ readonly additionalProperties: true;
330
+ readonly propertyNames: {
331
+ readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
332
+ };
333
+ };
334
+ };
335
+ };
336
+ };
337
+ //# sourceMappingURL=payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/vetting/vetters/grant/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAGhE;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,2DAAoE,CAAC;AAE7F,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,6BAA6B,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,oEAA6E,CAAC;AAE/G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,qCAAqC,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
@@ -0,0 +1,183 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/vetting/vetters/grant/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/grant/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/grant/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/vetting/vetters/grant/0.1",
21
+ "title": "VTC Vetting — Vetters Grant — payload",
22
+ "description": "A community administrator makes a member a vetter. The community issues the member a revocable `CommunityRole` endorsement credential for the `vetter` role, delivers it over credential-exchange/issue, and returns the identifiers and validity of the grant. A member who already holds a live grant gets that grant back unchanged.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "memberDid"
27
+ ],
28
+ "properties": {
29
+ "memberDid": {
30
+ "type": "string",
31
+ "pattern": "^did:",
32
+ "description": "The member DID to grant the vetter role to — the subject of the role credential, and the DID the vetter signs statements with."
33
+ },
34
+ "validitySeconds": {
35
+ "type": "integer",
36
+ "minimum": 86400,
37
+ "maximum": 63072000,
38
+ "description": "OPTIONAL. How long the role credential is valid, from issuance: at least one day, at most two years. Absent: 31536000 (365 days). Ignored when the member already holds a live grant."
39
+ },
40
+ "ext": {
41
+ "$ref": "#/$defs/Ext"
42
+ }
43
+ },
44
+ "$defs": {
45
+ "Response": {
46
+ "$anchor": "response",
47
+ "title": "VTC Vetting — Vetters Grant — response payload",
48
+ "description": "The grant — newly issued, or the member's existing live grant.",
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": [
52
+ "endorsementId",
53
+ "credentialId",
54
+ "validFrom",
55
+ "validUntil"
56
+ ],
57
+ "properties": {
58
+ "endorsementId": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "maxLength": 128,
62
+ "description": "The community's endorsement record for this grant — the identifier vtc/endorsements/revoke takes."
63
+ },
64
+ "credentialId": {
65
+ "type": "string",
66
+ "minLength": 1,
67
+ "maxLength": 512,
68
+ "pattern": "^[a-zA-Z][a-zA-Z0-9+.-]*:\\S+$",
69
+ "description": "The `id` of the role credential, a URI."
70
+ },
71
+ "validFrom": {
72
+ "type": "string",
73
+ "format": "date-time",
74
+ "description": "The role credential's `validFrom`."
75
+ },
76
+ "validUntil": {
77
+ "type": "string",
78
+ "format": "date-time",
79
+ "description": "The role credential's `validUntil`."
80
+ },
81
+ "ext": {
82
+ "$ref": "#/$defs/Ext"
83
+ }
84
+ }
85
+ },
86
+ "Ext": {
87
+ "title": "Ext",
88
+ "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.",
89
+ "type": "object",
90
+ "minProperties": 1,
91
+ "additionalProperties": true,
92
+ "propertyNames": {
93
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
94
+ }
95
+ }
96
+ }
97
+ };
98
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
99
+ export const RESPONSE_PAYLOAD_SCHEMA = {
100
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
101
+ "$ref": "#/$defs/Response",
102
+ "$defs": {
103
+ "Response": {
104
+ "$anchor": "response",
105
+ "title": "VTC Vetting — Vetters Grant — response payload",
106
+ "description": "The grant — newly issued, or the member's existing live grant.",
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "required": [
110
+ "endorsementId",
111
+ "credentialId",
112
+ "validFrom",
113
+ "validUntil"
114
+ ],
115
+ "properties": {
116
+ "endorsementId": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 128,
120
+ "description": "The community's endorsement record for this grant — the identifier vtc/endorsements/revoke takes."
121
+ },
122
+ "credentialId": {
123
+ "type": "string",
124
+ "minLength": 1,
125
+ "maxLength": 512,
126
+ "pattern": "^[a-zA-Z][a-zA-Z0-9+.-]*:\\S+$",
127
+ "description": "The `id` of the role credential, a URI."
128
+ },
129
+ "validFrom": {
130
+ "type": "string",
131
+ "format": "date-time",
132
+ "description": "The role credential's `validFrom`."
133
+ },
134
+ "validUntil": {
135
+ "type": "string",
136
+ "format": "date-time",
137
+ "description": "The role credential's `validUntil`."
138
+ },
139
+ "ext": {
140
+ "$ref": "#/$defs/Ext"
141
+ }
142
+ }
143
+ },
144
+ "Ext": {
145
+ "title": "Ext",
146
+ "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.",
147
+ "type": "object",
148
+ "minProperties": 1,
149
+ "additionalProperties": true,
150
+ "propertyNames": {
151
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
152
+ }
153
+ }
154
+ }
155
+ };
156
+ /**
157
+ * SPEC.md §7.2 policy for the request variant, from this specification's
158
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
159
+ * per-specification and cannot be derived from the document alone, and
160
+ * item 2 needs the schema this carries.
161
+ */
162
+ export const SPEC = {
163
+ typeUri: TYPE_URI,
164
+ isBearer: false,
165
+ isProofRequired: true,
166
+ isRecipientRequired: true,
167
+ isIssuedAtRequired: true,
168
+ payloadSchema: PAYLOAD_SCHEMA,
169
+ };
170
+ /**
171
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
172
+ * tracks the *issuer* party's requirement because a response swaps the
173
+ * parties (§7.3 item 5).
174
+ */
175
+ export const RESPONSE_SPEC = {
176
+ typeUri: RESPONSE_TYPE_URI,
177
+ isBearer: false,
178
+ isProofRequired: true,
179
+ isRecipientRequired: true,
180
+ isIssuedAtRequired: true,
181
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
182
+ };
183
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../../src/vtc/vetting/vetters/grant/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6CH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,2DAAoE,CAAC;AAK7F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,oEAA6E,CAAC;AAK/G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,8CAA8C;IACzD,KAAK,EAAE,2DAA2D;IAClE,OAAO,EAAE,uCAAuC;IAChD,aAAa,EAAE,yUAAyU;IACxV,MAAM,EAAE,QAAQ;IAChB,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE;QACV,WAAW;KACZ;IACD,YAAY,EAAE;QACZ,WAAW,EAAE;YACX,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,OAAO;YAClB,aAAa,EAAE,gIAAgI;S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