@openvtc/trust-tasks 0.28.15 → 0.28.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/index.d.ts +18 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +18 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/vta/pcs/voter/read/0.1/payload.d.ts +4 -4
  7. package/dist/vta/pcs/voter/read/0.1/payload.js +1 -1
  8. package/dist/vta/pcs/voter/read/0.2/payload.d.ts +4 -4
  9. package/dist/vta/pcs/voter/read/0.2/payload.js +1 -1
  10. package/dist/vta/pcs/voter/read/0.3/payload.d.ts +4 -4
  11. package/dist/vta/pcs/voter/read/0.3/payload.js +1 -1
  12. package/dist/vta/pcs/voter/read/0.4/payload.d.ts +4 -4
  13. package/dist/vta/pcs/voter/read/0.4/payload.js +1 -1
  14. package/dist/vta/pcs/voter/read/0.5/payload.d.ts +4 -4
  15. package/dist/vta/pcs/voter/read/0.5/payload.js +1 -1
  16. package/dist/vta/pcs/voter/read/0.6/payload.d.ts +14 -2
  17. package/dist/vta/pcs/voter/read/0.6/payload.d.ts.map +1 -1
  18. package/dist/vta/pcs/voter/read/0.6/payload.js +1 -1
  19. package/dist/vta/pcs/voter/read/0.6/payload.js.map +1 -1
  20. package/dist/vta/pcs/voter/read/0.7/payload.d.ts +561 -0
  21. package/dist/vta/pcs/voter/read/0.7/payload.d.ts.map +1 -0
  22. package/dist/vta/pcs/voter/read/0.7/payload.js +315 -0
  23. package/dist/vta/pcs/voter/read/0.7/payload.js.map +1 -0
  24. package/dist/vta/pcs/voter/receipts/list/0.1/payload.d.ts +359 -0
  25. package/dist/vta/pcs/voter/receipts/list/0.1/payload.d.ts.map +1 -0
  26. package/dist/vta/pcs/voter/receipts/list/0.1/payload.js +203 -0
  27. package/dist/vta/pcs/voter/receipts/list/0.1/payload.js.map +1 -0
  28. package/dist/vtc/boards/facilitators/add/0.1/payload.d.ts +351 -0
  29. package/dist/vtc/boards/facilitators/add/0.1/payload.d.ts.map +1 -0
  30. package/dist/vtc/boards/facilitators/add/0.1/payload.js +198 -0
  31. package/dist/vtc/boards/facilitators/add/0.1/payload.js.map +1 -0
  32. package/dist/vtc/boards/facilitators/list/0.1/payload.d.ts +448 -0
  33. package/dist/vtc/boards/facilitators/list/0.1/payload.d.ts.map +1 -0
  34. package/dist/vtc/boards/facilitators/list/0.1/payload.js +245 -0
  35. package/dist/vtc/boards/facilitators/list/0.1/payload.js.map +1 -0
  36. package/dist/vtc/boards/facilitators/remove/0.1/payload.d.ts +351 -0
  37. package/dist/vtc/boards/facilitators/remove/0.1/payload.d.ts.map +1 -0
  38. package/dist/vtc/boards/facilitators/remove/0.1/payload.js +198 -0
  39. package/dist/vtc/boards/facilitators/remove/0.1/payload.js.map +1 -0
  40. package/dist/vtc/networks/preview/0.1/payload.d.ts +696 -0
  41. package/dist/vtc/networks/preview/0.1/payload.d.ts.map +1 -0
  42. package/dist/vtc/networks/preview/0.1/payload.js +376 -0
  43. package/dist/vtc/networks/preview/0.1/payload.js.map +1 -0
  44. package/package.json +1 -1
  45. package/src/index.ts +18 -0
  46. package/src/vta/pcs/voter/read/0.1/payload.ts +5 -5
  47. package/src/vta/pcs/voter/read/0.2/payload.ts +5 -5
  48. package/src/vta/pcs/voter/read/0.3/payload.ts +5 -5
  49. package/src/vta/pcs/voter/read/0.4/payload.ts +5 -5
  50. package/src/vta/pcs/voter/read/0.5/payload.ts +5 -5
  51. package/src/vta/pcs/voter/read/0.6/payload.ts +15 -3
  52. package/src/vta/pcs/voter/read/0.7/payload.ts +404 -0
  53. package/src/vta/pcs/voter/receipts/list/0.1/payload.ts +255 -0
  54. package/src/vtc/boards/facilitators/add/0.1/payload.ts +246 -0
  55. package/src/vtc/boards/facilitators/list/0.1/payload.ts +306 -0
  56. package/src/vtc/boards/facilitators/remove/0.1/payload.ts +246 -0
  57. package/src/vtc/networks/preview/0.1/payload.ts +483 -0
@@ -0,0 +1,255 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/voter/receipts/list/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { ElectionId, Ext } from "../../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A voter's client asks its VTA for the receipts it keeps for one election, whole and exactly as received, so that after voting closes the client can fetch each cast's inclusion proof from the ballot box and hand it, with the head the community kept at close, to vta/pcs/voter/receipt (VTI-VOT-053). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTAPCSVoterReceiptsListPayload {
13
+ /**
14
+ * The context the voter belongs to.
15
+ */
16
+ contextId: string;
17
+ /**
18
+ * The community's DID.
19
+ */
20
+ community: string;
21
+ electionId: ElectionId;
22
+ ext?: Ext;
23
+ }
24
+ /**
25
+ * The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.
26
+ */
27
+ export interface VTAPCSVoterReceiptsListResponsePayload {
28
+ electionId: ElectionId;
29
+ /**
30
+ * The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof.
31
+ */
32
+ ballotBox: string;
33
+ /**
34
+ * Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.
35
+ *
36
+ * @maxItems 64
37
+ */
38
+ receipts: {}[];
39
+ ext?: Ext;
40
+ }
41
+
42
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
43
+ export type { ElectionId, Ext };
44
+
45
+ /** Trust Task type URI. */
46
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1" as const;
47
+
48
+ /**
49
+ * The earlier version of this specification that this one declares it
50
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
51
+ * `null`. Only the direct declaration — follow the chain with
52
+ * `extendsChain` / `readForSpec`.
53
+ */
54
+ export const EXTENDS: string | null = null;
55
+
56
+ /**
57
+ * Why this version is deprecated, or `null` while it is current. A
58
+ * superseded or retired version is still supported, and is withdrawn from
59
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
60
+ * Versions").
61
+ */
62
+ export const DEPRECATION: string | null = null;
63
+
64
+ /** Stable alias for this specification's request payload shape. */
65
+ export type Payload = VTAPCSVoterReceiptsListPayload;
66
+
67
+ /** Trust Task response type URI (request type URI + "#response"). */
68
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response" as const;
69
+
70
+ /** Stable alias for this specification's success-response payload shape. */
71
+ export type Response = VTAPCSVoterReceiptsListResponsePayload;
72
+
73
+ /**
74
+ * This specification's payload schema, as a value.
75
+ *
76
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
77
+ * rather than only as a `.json` file because TypeScript types are erased
78
+ * at runtime: without a schema a consumer has nothing to validate, and
79
+ * every REQUIRED payload member is optional in practice. Cross-file
80
+ * `$ref`s are already inlined, so it needs no resolver.
81
+ */
82
+ export const PAYLOAD_SCHEMA = {
83
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
84
+ "$id": "https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1",
85
+ "title": "VTA PCS — Voter Receipts — List — payload",
86
+ "description": "A voter's client asks its VTA for the receipts it keeps for one election, whole and exactly as received, so that after voting closes the client can fetch each cast's inclusion proof from the ballot box and hand it, with the head the community kept at close, to vta/pcs/voter/receipt (VTI-VOT-053). The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": [
90
+ "contextId",
91
+ "community",
92
+ "electionId"
93
+ ],
94
+ "properties": {
95
+ "contextId": {
96
+ "type": "string",
97
+ "minLength": 1,
98
+ "maxLength": 256,
99
+ "description": "The context the voter belongs to."
100
+ },
101
+ "community": {
102
+ "type": "string",
103
+ "minLength": 1,
104
+ "maxLength": 2048,
105
+ "description": "The community's DID."
106
+ },
107
+ "electionId": {
108
+ "$ref": "#/$defs/ElectionId"
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext"
112
+ }
113
+ },
114
+ "$defs": {
115
+ "Response": {
116
+ "$anchor": "response",
117
+ "title": "VTA PCS — Voter Receipts — List — response payload",
118
+ "description": "The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.",
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "required": [
122
+ "electionId",
123
+ "ballotBox",
124
+ "receipts"
125
+ ],
126
+ "properties": {
127
+ "electionId": {
128
+ "$ref": "#/$defs/ElectionId"
129
+ },
130
+ "ballotBox": {
131
+ "type": "string",
132
+ "minLength": 1,
133
+ "maxLength": 2048,
134
+ "pattern": "^did:",
135
+ "description": "The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof."
136
+ },
137
+ "receipts": {
138
+ "type": "array",
139
+ "maxItems": 64,
140
+ "description": "Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.",
141
+ "items": {
142
+ "type": "object"
143
+ }
144
+ },
145
+ "ext": {
146
+ "$ref": "#/$defs/Ext"
147
+ }
148
+ }
149
+ },
150
+ "Ext": {
151
+ "title": "Ext",
152
+ "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.",
153
+ "type": "object",
154
+ "minProperties": 1,
155
+ "additionalProperties": true,
156
+ "propertyNames": {
157
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
158
+ }
159
+ },
160
+ "ElectionId": {
161
+ "title": "ElectionId",
162
+ "description": "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.",
163
+ "type": "string",
164
+ "pattern": "^[A-Za-z0-9._-]{1,128}$"
165
+ }
166
+ }
167
+ } as const;
168
+
169
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
170
+ export const RESPONSE_PAYLOAD_SCHEMA = {
171
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
172
+ "$ref": "#/$defs/Response",
173
+ "$defs": {
174
+ "Response": {
175
+ "$anchor": "response",
176
+ "title": "VTA PCS — Voter Receipts — List — response payload",
177
+ "description": "The success response to a vta/pcs/voter/receipts/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vta/pcs/voter/receipts/list/0.1#response.",
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": [
181
+ "electionId",
182
+ "ballotBox",
183
+ "receipts"
184
+ ],
185
+ "properties": {
186
+ "electionId": {
187
+ "$ref": "#/$defs/ElectionId"
188
+ },
189
+ "ballotBox": {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "maxLength": 2048,
193
+ "pattern": "^did:",
194
+ "description": "The ballot box the engine recorded at vta/pcs/voter/register: the DID every receipt is signed by, and the one to ask for each cast's inclusion proof."
195
+ },
196
+ "receipts": {
197
+ "type": "array",
198
+ "maxItems": 64,
199
+ "description": "Every receipt the engine keeps for the election, in the order it kept them: one per cast the ballot box admitted, a revote's beside the cast it replaced. Each is the ballot box's signed voting/ballot/cast/0.1 or voting/ballot/cast-encrypted/0.1 #response document, whole and exactly as received — its `receiptToken` included, which on a private board is what authorizes the inclusion read. Empty when no receipt was kept.",
200
+ "items": {
201
+ "type": "object"
202
+ }
203
+ },
204
+ "ext": {
205
+ "$ref": "#/$defs/Ext"
206
+ }
207
+ }
208
+ },
209
+ "Ext": {
210
+ "title": "Ext",
211
+ "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
+ "type": "object",
213
+ "minProperties": 1,
214
+ "additionalProperties": true,
215
+ "propertyNames": {
216
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
217
+ }
218
+ },
219
+ "ElectionId": {
220
+ "title": "ElectionId",
221
+ "description": "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.",
222
+ "type": "string",
223
+ "pattern": "^[A-Za-z0-9._-]{1,128}$"
224
+ }
225
+ }
226
+ } as const;
227
+
228
+ /**
229
+ * SPEC.md §7.2 policy for the request variant, from this specification's
230
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
231
+ * per-specification and cannot be derived from the document alone, and
232
+ * item 2 needs the schema this carries.
233
+ */
234
+ export const SPEC = {
235
+ typeUri: TYPE_URI,
236
+ isBearer: false,
237
+ isProofRequired: true,
238
+ isRecipientRequired: true,
239
+ isIssuedAtRequired: false,
240
+ payloadSchema: PAYLOAD_SCHEMA,
241
+ } as const;
242
+
243
+ /**
244
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
245
+ * tracks the *issuer* party's requirement because a response swaps the
246
+ * parties (§7.3 item 5).
247
+ */
248
+ export const RESPONSE_SPEC = {
249
+ typeUri: RESPONSE_TYPE_URI,
250
+ isBearer: false,
251
+ isProofRequired: false,
252
+ isRecipientRequired: true,
253
+ isIssuedAtRequired: false,
254
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
255
+ } as const;
@@ -0,0 +1,246 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/boards/facilitators/add/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { BoardId, EntryId, Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A facilitator of a board appoints an active member a facilitator of that board: an access-control resource grant of `vtc.boards.manage` qualified to the board (VTI-BRD-090). The outer document members are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface VTCBoardsFacilitatorsAddPayload {
13
+ boardId: BoardId;
14
+ /**
15
+ * The member appointed.
16
+ */
17
+ entryId: EntryId;
18
+ /**
19
+ * Why, recorded with the change. Plain text.
20
+ */
21
+ reason?: string;
22
+ ext?: Ext;
23
+ }
24
+ /**
25
+ * The success response to a vtc/boards/facilitators/add/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/facilitators/add/0.1#response. The board's appointed facilitators after the appointment.
26
+ */
27
+ export interface VTCBoardsFacilitatorsAddResponsePayload {
28
+ boardId: BoardId;
29
+ /**
30
+ * The board's appointed facilitators after the change, by entry: entries holding `vtc.boards.manage` qualified to this board, read from the access-control list. Holders of the capability unqualified or through a role are not listed (VTI-BRD-093).
31
+ *
32
+ * @maxItems 256
33
+ */
34
+ facilitators: EntryId[];
35
+ ext?: Ext;
36
+ }
37
+
38
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
39
+ export type { BoardId, EntryId, Ext };
40
+
41
+ /** Trust Task type URI. */
42
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/boards/facilitators/add/0.1" as const;
43
+
44
+ /**
45
+ * The earlier version of this specification that this one declares it
46
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
47
+ * `null`. Only the direct declaration — follow the chain with
48
+ * `extendsChain` / `readForSpec`.
49
+ */
50
+ export const EXTENDS: string | null = null;
51
+
52
+ /**
53
+ * Why this version is deprecated, or `null` while it is current. A
54
+ * superseded or retired version is still supported, and is withdrawn from
55
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
56
+ * Versions").
57
+ */
58
+ export const DEPRECATION: string | null = null;
59
+
60
+ /** Stable alias for this specification's request payload shape. */
61
+ export type Payload = VTCBoardsFacilitatorsAddPayload;
62
+
63
+ /** Trust Task response type URI (request type URI + "#response"). */
64
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/boards/facilitators/add/0.1#response" as const;
65
+
66
+ /** Stable alias for this specification's success-response payload shape. */
67
+ export type Response = VTCBoardsFacilitatorsAddResponsePayload;
68
+
69
+ /**
70
+ * This specification's payload schema, as a value.
71
+ *
72
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
73
+ * rather than only as a `.json` file because TypeScript types are erased
74
+ * at runtime: without a schema a consumer has nothing to validate, and
75
+ * every REQUIRED payload member is optional in practice. Cross-file
76
+ * `$ref`s are already inlined, so it needs no resolver.
77
+ */
78
+ export const PAYLOAD_SCHEMA = {
79
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
80
+ "$id": "https://trusttasks.org/spec/vtc/boards/facilitators/add/0.1",
81
+ "title": "VTC Boards — Facilitators — Add — payload",
82
+ "description": "A facilitator of a board appoints an active member a facilitator of that board: an access-control resource grant of `vtc.boards.manage` qualified to the board (VTI-BRD-090). The outer document members are owned by the framework — SPEC §6.3.",
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "boardId",
87
+ "entryId"
88
+ ],
89
+ "properties": {
90
+ "boardId": {
91
+ "$ref": "#/$defs/BoardId"
92
+ },
93
+ "entryId": {
94
+ "$ref": "#/$defs/EntryId",
95
+ "description": "The member appointed."
96
+ },
97
+ "reason": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "maxLength": 1024,
101
+ "description": "Why, recorded with the change. Plain text."
102
+ },
103
+ "ext": {
104
+ "$ref": "#/$defs/Ext"
105
+ }
106
+ },
107
+ "$defs": {
108
+ "Response": {
109
+ "$anchor": "response",
110
+ "title": "VTC Boards — Facilitators — Add — response payload",
111
+ "description": "The success response to a vtc/boards/facilitators/add/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/facilitators/add/0.1#response. The board's appointed facilitators after the appointment.",
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "boardId",
116
+ "facilitators"
117
+ ],
118
+ "properties": {
119
+ "boardId": {
120
+ "$ref": "#/$defs/BoardId"
121
+ },
122
+ "facilitators": {
123
+ "type": "array",
124
+ "maxItems": 256,
125
+ "uniqueItems": true,
126
+ "items": {
127
+ "$ref": "#/$defs/EntryId"
128
+ },
129
+ "description": "The board's appointed facilitators after the change, by entry: entries holding `vtc.boards.manage` qualified to this board, read from the access-control list. Holders of the capability unqualified or through a role are not listed (VTI-BRD-093)."
130
+ },
131
+ "ext": {
132
+ "$ref": "#/$defs/Ext"
133
+ }
134
+ }
135
+ },
136
+ "Ext": {
137
+ "title": "Ext",
138
+ "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.",
139
+ "type": "object",
140
+ "minProperties": 1,
141
+ "additionalProperties": true,
142
+ "propertyNames": {
143
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
144
+ }
145
+ },
146
+ "EntryId": {
147
+ "title": "EntryId",
148
+ "description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
149
+ "type": "string",
150
+ "pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
151
+ },
152
+ "BoardId": {
153
+ "title": "BoardId",
154
+ "description": "Opaque identifier of a board: `brd_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BRD-001).",
155
+ "type": "string",
156
+ "pattern": "^brd_[A-Za-z0-9_-]{16,64}$"
157
+ }
158
+ }
159
+ } as const;
160
+
161
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
162
+ export const RESPONSE_PAYLOAD_SCHEMA = {
163
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
164
+ "$ref": "#/$defs/Response",
165
+ "$defs": {
166
+ "Response": {
167
+ "$anchor": "response",
168
+ "title": "VTC Boards — Facilitators — Add — response payload",
169
+ "description": "The success response to a vtc/boards/facilitators/add/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/facilitators/add/0.1#response. The board's appointed facilitators after the appointment.",
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": [
173
+ "boardId",
174
+ "facilitators"
175
+ ],
176
+ "properties": {
177
+ "boardId": {
178
+ "$ref": "#/$defs/BoardId"
179
+ },
180
+ "facilitators": {
181
+ "type": "array",
182
+ "maxItems": 256,
183
+ "uniqueItems": true,
184
+ "items": {
185
+ "$ref": "#/$defs/EntryId"
186
+ },
187
+ "description": "The board's appointed facilitators after the change, by entry: entries holding `vtc.boards.manage` qualified to this board, read from the access-control list. Holders of the capability unqualified or through a role are not listed (VTI-BRD-093)."
188
+ },
189
+ "ext": {
190
+ "$ref": "#/$defs/Ext"
191
+ }
192
+ }
193
+ },
194
+ "Ext": {
195
+ "title": "Ext",
196
+ "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.",
197
+ "type": "object",
198
+ "minProperties": 1,
199
+ "additionalProperties": true,
200
+ "propertyNames": {
201
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
202
+ }
203
+ },
204
+ "EntryId": {
205
+ "title": "EntryId",
206
+ "description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
207
+ "type": "string",
208
+ "pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
209
+ },
210
+ "BoardId": {
211
+ "title": "BoardId",
212
+ "description": "Opaque identifier of a board: `brd_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BRD-001).",
213
+ "type": "string",
214
+ "pattern": "^brd_[A-Za-z0-9_-]{16,64}$"
215
+ }
216
+ }
217
+ } as const;
218
+
219
+ /**
220
+ * SPEC.md §7.2 policy for the request variant, from this specification's
221
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
222
+ * per-specification and cannot be derived from the document alone, and
223
+ * item 2 needs the schema this carries.
224
+ */
225
+ export const SPEC = {
226
+ typeUri: TYPE_URI,
227
+ isBearer: false,
228
+ isProofRequired: true,
229
+ isRecipientRequired: true,
230
+ isIssuedAtRequired: true,
231
+ payloadSchema: PAYLOAD_SCHEMA,
232
+ } as const;
233
+
234
+ /**
235
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
236
+ * tracks the *issuer* party's requirement because a response swaps the
237
+ * parties (§7.3 item 5).
238
+ */
239
+ export const RESPONSE_SPEC = {
240
+ typeUri: RESPONSE_TYPE_URI,
241
+ isBearer: false,
242
+ isProofRequired: true,
243
+ isRecipientRequired: true,
244
+ isIssuedAtRequired: true,
245
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
246
+ } as const;