@openvtc/trust-tasks 0.28.12 → 0.28.14

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 (101) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/_shared/components.d.ts +458 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +43 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +43 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/process-attestation/0.1/payload.d.ts +73 -7
  9. package/dist/process-attestation/0.1/payload.d.ts.map +1 -1
  10. package/dist/process-attestation/0.1/payload.js +40 -6
  11. package/dist/process-attestation/0.1/payload.js.map +1 -1
  12. package/dist/trust-task-discovery/0.1/payload.d.ts +4 -4
  13. package/dist/trust-task-discovery/0.1/payload.js +1 -1
  14. package/dist/trust-task-discovery/0.2/payload.d.ts +4 -4
  15. package/dist/trust-task-discovery/0.2/payload.js +1 -1
  16. package/dist/trust-task-discovery/0.3/payload.d.ts +14 -2
  17. package/dist/trust-task-discovery/0.3/payload.d.ts.map +1 -1
  18. package/dist/trust-task-discovery/0.3/payload.js +1 -1
  19. package/dist/trust-task-discovery/0.3/payload.js.map +1 -1
  20. package/dist/trust-task-discovery/0.4/payload.d.ts +521 -0
  21. package/dist/trust-task-discovery/0.4/payload.d.ts.map +1 -0
  22. package/dist/trust-task-discovery/0.4/payload.js +266 -0
  23. package/dist/trust-task-discovery/0.4/payload.js.map +1 -0
  24. package/dist/vtc/boards/_shared/0.1/board.d.ts +22 -0
  25. package/dist/vtc/boards/_shared/0.1/board.d.ts.map +1 -0
  26. package/dist/vtc/boards/_shared/0.1/board.js +6 -0
  27. package/dist/vtc/boards/_shared/0.1/board.js.map +1 -0
  28. package/dist/vtc/boards/create/0.1/payload.d.ts +2402 -0
  29. package/dist/vtc/boards/create/0.1/payload.d.ts.map +1 -0
  30. package/dist/vtc/boards/create/0.1/payload.js +1349 -0
  31. package/dist/vtc/boards/create/0.1/payload.js.map +1 -0
  32. package/dist/vtc/boards/ideas/decide/0.1/payload.d.ts +1781 -0
  33. package/dist/vtc/boards/ideas/decide/0.1/payload.d.ts.map +1 -0
  34. package/dist/vtc/boards/ideas/decide/0.1/payload.js +1028 -0
  35. package/dist/vtc/boards/ideas/decide/0.1/payload.js.map +1 -0
  36. package/dist/vtc/boards/ideas/propose/0.1/payload.d.ts +1781 -0
  37. package/dist/vtc/boards/ideas/propose/0.1/payload.d.ts.map +1 -0
  38. package/dist/vtc/boards/ideas/propose/0.1/payload.js +1025 -0
  39. package/dist/vtc/boards/ideas/propose/0.1/payload.js.map +1 -0
  40. package/dist/vtc/boards/ideas/select/0.1/payload.d.ts +1788 -0
  41. package/dist/vtc/boards/ideas/select/0.1/payload.d.ts.map +1 -0
  42. package/dist/vtc/boards/ideas/select/0.1/payload.js +1029 -0
  43. package/dist/vtc/boards/ideas/select/0.1/payload.js.map +1 -0
  44. package/dist/vtc/boards/ideas/update/0.1/payload.d.ts +1781 -0
  45. package/dist/vtc/boards/ideas/update/0.1/payload.d.ts.map +1 -0
  46. package/dist/vtc/boards/ideas/update/0.1/payload.js +1023 -0
  47. package/dist/vtc/boards/ideas/update/0.1/payload.js.map +1 -0
  48. package/dist/vtc/boards/ideas/withdraw/0.1/payload.d.ts +1753 -0
  49. package/dist/vtc/boards/ideas/withdraw/0.1/payload.d.ts.map +1 -0
  50. package/dist/vtc/boards/ideas/withdraw/0.1/payload.js +1011 -0
  51. package/dist/vtc/boards/ideas/withdraw/0.1/payload.js.map +1 -0
  52. package/dist/vtc/boards/list/0.1/payload.d.ts +2267 -0
  53. package/dist/vtc/boards/list/0.1/payload.d.ts.map +1 -0
  54. package/dist/vtc/boards/list/0.1/payload.js +1326 -0
  55. package/dist/vtc/boards/list/0.1/payload.js.map +1 -0
  56. package/dist/vtc/boards/notes/add/0.1/payload.d.ts +655 -0
  57. package/dist/vtc/boards/notes/add/0.1/payload.d.ts.map +1 -0
  58. package/dist/vtc/boards/notes/add/0.1/payload.js +374 -0
  59. package/dist/vtc/boards/notes/add/0.1/payload.js.map +1 -0
  60. package/dist/vtc/boards/notes/hide/0.1/payload.d.ts +657 -0
  61. package/dist/vtc/boards/notes/hide/0.1/payload.d.ts.map +1 -0
  62. package/dist/vtc/boards/notes/hide/0.1/payload.js +378 -0
  63. package/dist/vtc/boards/notes/hide/0.1/payload.js.map +1 -0
  64. package/dist/vtc/boards/notes/list/0.1/payload.d.ts +730 -0
  65. package/dist/vtc/boards/notes/list/0.1/payload.d.ts.map +1 -0
  66. package/dist/vtc/boards/notes/list/0.1/payload.js +406 -0
  67. package/dist/vtc/boards/notes/list/0.1/payload.js.map +1 -0
  68. package/dist/vtc/boards/notes/withdraw/0.1/payload.d.ts +641 -0
  69. package/dist/vtc/boards/notes/withdraw/0.1/payload.d.ts.map +1 -0
  70. package/dist/vtc/boards/notes/withdraw/0.1/payload.js +367 -0
  71. package/dist/vtc/boards/notes/withdraw/0.1/payload.js.map +1 -0
  72. package/dist/vtc/boards/show/0.1/payload.d.ts +3713 -0
  73. package/dist/vtc/boards/show/0.1/payload.d.ts.map +1 -0
  74. package/dist/vtc/boards/show/0.1/payload.js +2160 -0
  75. package/dist/vtc/boards/show/0.1/payload.js.map +1 -0
  76. package/dist/vtc/boards/update/0.1/payload.d.ts +2423 -0
  77. package/dist/vtc/boards/update/0.1/payload.d.ts.map +1 -0
  78. package/dist/vtc/boards/update/0.1/payload.js +1356 -0
  79. package/dist/vtc/boards/update/0.1/payload.js.map +1 -0
  80. package/package.json +1 -1
  81. package/src/_shared/components.ts +493 -0
  82. package/src/index.ts +43 -0
  83. package/src/process-attestation/0.1/payload.ts +53 -9
  84. package/src/trust-task-discovery/0.1/payload.ts +5 -5
  85. package/src/trust-task-discovery/0.2/payload.ts +5 -5
  86. package/src/trust-task-discovery/0.3/payload.ts +15 -3
  87. package/src/trust-task-discovery/0.4/payload.ts +387 -0
  88. package/src/vtc/boards/_shared/0.1/board.ts +23 -0
  89. package/src/vtc/boards/create/0.1/payload.ts +1517 -0
  90. package/src/vtc/boards/ideas/decide/0.1/payload.ts +1068 -0
  91. package/src/vtc/boards/ideas/propose/0.1/payload.ts +1063 -0
  92. package/src/vtc/boards/ideas/select/0.1/payload.ts +1070 -0
  93. package/src/vtc/boards/ideas/update/0.1/payload.ts +1061 -0
  94. package/src/vtc/boards/ideas/withdraw/0.1/payload.ts +1045 -0
  95. package/src/vtc/boards/list/0.1/payload.ts +1376 -0
  96. package/src/vtc/boards/notes/add/0.1/payload.ts +410 -0
  97. package/src/vtc/boards/notes/hide/0.1/payload.ts +414 -0
  98. package/src/vtc/boards/notes/list/0.1/payload.ts +457 -0
  99. package/src/vtc/boards/notes/withdraw/0.1/payload.ts +401 -0
  100. package/src/vtc/boards/show/0.1/payload.ts +2212 -0
  101. package/src/vtc/boards/update/0.1/payload.ts +1529 -0
@@ -0,0 +1,1326 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/boards/list/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/boards/list/0.1";
7
+ /**
8
+ * The earlier version of this specification that this one declares it
9
+ * extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
10
+ * `null`. Only the direct declaration — follow the chain with
11
+ * `extendsChain` / `readForSpec`.
12
+ */
13
+ export const EXTENDS = null;
14
+ /**
15
+ * Why this version is deprecated, or `null` while it is current. A
16
+ * superseded or retired version is still supported, and is withdrawn from
17
+ * this package in a later scheduled batch (SPEC "Superseded and Withdrawn
18
+ * Versions").
19
+ */
20
+ export const DEPRECATION = null;
21
+ /** Trust Task response type URI (request type URI + "#response"). */
22
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/boards/list/0.1#response";
23
+ /**
24
+ * This specification's payload schema, as a value.
25
+ *
26
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
27
+ * rather than only as a `.json` file because TypeScript types are erased
28
+ * at runtime: without a schema a consumer has nothing to validate, and
29
+ * every REQUIRED payload member is optional in practice. Cross-file
30
+ * `$ref`s are already inlined, so it needs no resolver.
31
+ */
32
+ export const PAYLOAD_SCHEMA = {
33
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
34
+ "$id": "https://trusttasks.org/spec/vtc/boards/list/0.1",
35
+ "title": "VTC Boards — List — payload",
36
+ "description": "List the boards the caller may see: those whose audience admits them, and every board they facilitate. The outer document members are owned by the framework — SPEC §6.3.",
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "status": {
41
+ "$ref": "#/$defs/BoardStatus"
42
+ },
43
+ "includeArchived": {
44
+ "type": "boolean",
45
+ "description": "Default true. False hides archived boards from facilitators too."
46
+ },
47
+ "cursor": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 1024,
51
+ "description": "An opaque continuation token from a previous response's `nextCursor`, bound to the caller and the filters; a responder MUST NOT accept a cursor it did not issue."
52
+ },
53
+ "limit": {
54
+ "type": "integer",
55
+ "minimum": 1,
56
+ "maximum": 200,
57
+ "description": "The most items to return, at most 200; the responder chooses a default (50) and MAY return fewer."
58
+ },
59
+ "ext": {
60
+ "$ref": "#/$defs/Ext"
61
+ }
62
+ },
63
+ "$defs": {
64
+ "Response": {
65
+ "$anchor": "response",
66
+ "title": "VTC Boards — List — response payload",
67
+ "description": "The success response to a vtc/boards/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/list/0.1#response.",
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "boards"
72
+ ],
73
+ "properties": {
74
+ "boards": {
75
+ "type": "array",
76
+ "items": {
77
+ "$ref": "#/$defs/Board"
78
+ }
79
+ },
80
+ "nextCursor": {
81
+ "type": "string",
82
+ "maxLength": 1024,
83
+ "description": "Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`."
84
+ },
85
+ "ext": {
86
+ "$ref": "#/$defs/Ext"
87
+ }
88
+ }
89
+ },
90
+ "Ext": {
91
+ "title": "Ext",
92
+ "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.",
93
+ "type": "object",
94
+ "minProperties": 1,
95
+ "additionalProperties": true,
96
+ "propertyNames": {
97
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
98
+ }
99
+ },
100
+ "Board": {
101
+ "title": "Board",
102
+ "description": "A board as one caller may see it.",
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": [
106
+ "boardId",
107
+ "title",
108
+ "status",
109
+ "audience",
110
+ "proposals",
111
+ "voting",
112
+ "template",
113
+ "createdAt",
114
+ "facilitator",
115
+ "ideaCounts"
116
+ ],
117
+ "properties": {
118
+ "boardId": {
119
+ "$ref": "#/$defs/BoardId"
120
+ },
121
+ "title": {
122
+ "$ref": "#/$defs/BoardTitle"
123
+ },
124
+ "description": {
125
+ "$ref": "#/$defs/BoardDescription"
126
+ },
127
+ "status": {
128
+ "$ref": "#/$defs/BoardStatus"
129
+ },
130
+ "audience": {
131
+ "$ref": "#/$defs/BoardAudience"
132
+ },
133
+ "proposals": {
134
+ "$ref": "#/$defs/Window",
135
+ "description": "When ideas are taken (VTI-BRD-010)."
136
+ },
137
+ "voting": {
138
+ "$ref": "#/$defs/Window",
139
+ "description": "When every idea's election takes ballots. Opens after `proposals` opens and closes after it closes (VTI-BRD-001)."
140
+ },
141
+ "topics": {
142
+ "type": "array",
143
+ "maxItems": 32,
144
+ "uniqueItems": true,
145
+ "items": {
146
+ "$ref": "#/$defs/Topic"
147
+ }
148
+ },
149
+ "formats": {
150
+ "type": "array",
151
+ "maxItems": 16,
152
+ "uniqueItems": true,
153
+ "items": {
154
+ "$ref": "#/$defs/IdeaFormat"
155
+ }
156
+ },
157
+ "maxIdeasPerMember": {
158
+ "type": "integer",
159
+ "minimum": 1,
160
+ "maximum": 100,
161
+ "description": "The most ideas one member may have on the board that are not `withdrawn` or `declined`. Absent: no limit beyond the community's own."
162
+ },
163
+ "selectionRule": {
164
+ "type": "string",
165
+ "minLength": 1,
166
+ "maxLength": 500,
167
+ "description": "How facilitators intend to select, in plain words (VTI-BRD-041), e.g. \"The twelve ideas the most members would attend\"."
168
+ },
169
+ "timetable": {
170
+ "type": "array",
171
+ "maxItems": 256,
172
+ "items": {
173
+ "$ref": "#/$defs/Slot"
174
+ }
175
+ },
176
+ "template": {
177
+ "$ref": "#/$defs/ElectionTemplate"
178
+ },
179
+ "createdAt": {
180
+ "type": "string",
181
+ "format": "date-time"
182
+ },
183
+ "facilitator": {
184
+ "type": "boolean",
185
+ "description": "Whether the caller facilitates this board."
186
+ },
187
+ "ideaCounts": {
188
+ "type": "object",
189
+ "additionalProperties": false,
190
+ "description": "How many of the board's ideas are in each state the caller may see.",
191
+ "properties": {
192
+ "proposed": {
193
+ "type": "integer",
194
+ "minimum": 0
195
+ },
196
+ "open": {
197
+ "type": "integer",
198
+ "minimum": 0
199
+ },
200
+ "selected": {
201
+ "type": "integer",
202
+ "minimum": 0
203
+ },
204
+ "notSelected": {
205
+ "type": "integer",
206
+ "minimum": 0
207
+ },
208
+ "declined": {
209
+ "type": "integer",
210
+ "minimum": 0
211
+ },
212
+ "merged": {
213
+ "type": "integer",
214
+ "minimum": 0
215
+ },
216
+ "withdrawn": {
217
+ "type": "integer",
218
+ "minimum": 0
219
+ }
220
+ }
221
+ }
222
+ }
223
+ },
224
+ "ElectionTemplate": {
225
+ "title": "ElectionTemplate",
226
+ "description": "Every member of an idea's election manifest that the board fixes (VTI-BRD-030). When a facilitator accepts an idea the community completes it: `electionId` (naming the board and the idea), `community`, `title` and `description` from the idea, `registrationOpensAt` and `votingOpensAt` from the board's voting window's `opensAt` or the acceptance, whichever is later, `votingClosesAt` from its `closesAt`, `roll` from the board's audience (rule `members`, or a credential roll naming the group), and `binding: false`. A board's template is never binding, and so has no `binding` member.",
227
+ "type": "object",
228
+ "additionalProperties": false,
229
+ "required": [
230
+ "questions",
231
+ "secrecy",
232
+ "revote",
233
+ "board",
234
+ "ballotBox",
235
+ "allowEarlyClose",
236
+ "resultsBeforeClose",
237
+ "textReleaseThreshold"
238
+ ],
239
+ "properties": {
240
+ "questions": {
241
+ "type": "array",
242
+ "minItems": 1,
243
+ "maxItems": 16,
244
+ "items": {
245
+ "$ref": "#/$defs/Question"
246
+ }
247
+ },
248
+ "secrecy": {
249
+ "$ref": "#/$defs/SecrecyLevel"
250
+ },
251
+ "revote": {
252
+ "$ref": "#/$defs/Revote"
253
+ },
254
+ "board": {
255
+ "type": "object",
256
+ "additionalProperties": false,
257
+ "required": [
258
+ "visibility",
259
+ "auditors"
260
+ ],
261
+ "description": "The ballot box's board for each idea's election, as a manifest states it (VTI-VOT-052). `public` lets a board show each idea's ballot count while voting is open (VTI-BRD-033).",
262
+ "properties": {
263
+ "visibility": {
264
+ "$ref": "#/$defs/BoardVisibility"
265
+ },
266
+ "auditors": {
267
+ "type": "array",
268
+ "uniqueItems": true,
269
+ "items": {
270
+ "type": "string",
271
+ "minLength": 1,
272
+ "maxLength": 2048
273
+ }
274
+ }
275
+ }
276
+ },
277
+ "ballotBox": {
278
+ "type": "string",
279
+ "minLength": 1,
280
+ "maxLength": 2048,
281
+ "description": "The DID of the voting service every idea's election is registered with; one on the community's list (VTI-VOT-082)."
282
+ },
283
+ "trustees": {
284
+ "$ref": "#/$defs/Trustees"
285
+ },
286
+ "allowEarlyClose": {
287
+ "type": "boolean"
288
+ },
289
+ "resultsBeforeClose": {
290
+ "type": "boolean",
291
+ "description": "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061). A board SHOULD set it false (VTI-BRD-033)."
292
+ },
293
+ "textReleaseThreshold": {
294
+ "type": "integer",
295
+ "minimum": 1,
296
+ "description": "Counted ballots required before any text answer is disclosed (VTI-VOT-065); SHOULD be at least 10."
297
+ }
298
+ }
299
+ },
300
+ "Trustees": {
301
+ "title": "Trustees",
302
+ "description": "The trustees of a sealed or tallied-encrypted election and the number of them decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be one.",
303
+ "type": "object",
304
+ "additionalProperties": false,
305
+ "required": [
306
+ "dids",
307
+ "threshold"
308
+ ],
309
+ "properties": {
310
+ "dids": {
311
+ "type": "array",
312
+ "minItems": 2,
313
+ "items": {
314
+ "type": "string",
315
+ "minLength": 1,
316
+ "maxLength": 2048
317
+ },
318
+ "uniqueItems": true
319
+ },
320
+ "threshold": {
321
+ "type": "integer",
322
+ "minimum": 2
323
+ }
324
+ }
325
+ },
326
+ "BoardVisibility": {
327
+ "title": "BoardVisibility",
328
+ "description": "`public`: anyone reads the board. `private`: the community, the auditors the manifest names and, for one cast's inclusion, the holder of its receipt (VTI-VOT-052).",
329
+ "type": "string",
330
+ "enum": [
331
+ "public",
332
+ "private"
333
+ ]
334
+ },
335
+ "Revote": {
336
+ "title": "Revote",
337
+ "description": "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).",
338
+ "type": "string",
339
+ "enum": [
340
+ "replace",
341
+ "refuse"
342
+ ]
343
+ },
344
+ "SecrecyLevel": {
345
+ "title": "SecrecyLevel",
346
+ "description": "`open`: ballots are recorded on the board as cast. `sealed`: ballots are encrypted to a jointly generated election key and decrypted after voting closes. `talliedEncrypted`: ballots are encrypted and only the totals are ever decrypted (VTI-VOT-060). The encrypted levels are cast with `voting/ballot/cast-encrypted/0.1`, under an election key the trustees generate with `voting/trustees/*` (CONVENTIONS §9).",
347
+ "type": "string",
348
+ "enum": [
349
+ "open",
350
+ "sealed",
351
+ "talliedEncrypted"
352
+ ]
353
+ },
354
+ "Question": {
355
+ "title": "Question",
356
+ "description": "One question. Tagged union over `type`.",
357
+ "oneOf": [
358
+ {
359
+ "title": "ChoiceQuestion",
360
+ "description": "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.",
361
+ "type": "object",
362
+ "additionalProperties": false,
363
+ "required": [
364
+ "key",
365
+ "type",
366
+ "options",
367
+ "minSelections",
368
+ "maxSelections",
369
+ "optional"
370
+ ],
371
+ "properties": {
372
+ "key": {
373
+ "$ref": "#/$defs/Key"
374
+ },
375
+ "type": {
376
+ "const": "choice"
377
+ },
378
+ "text": {
379
+ "type": "string",
380
+ "maxLength": 2048
381
+ },
382
+ "options": {
383
+ "type": "array",
384
+ "minItems": 2,
385
+ "maxItems": 256,
386
+ "items": {
387
+ "$ref": "#/$defs/QuestionOption"
388
+ }
389
+ },
390
+ "minSelections": {
391
+ "type": "integer",
392
+ "minimum": 0
393
+ },
394
+ "maxSelections": {
395
+ "type": "integer",
396
+ "minimum": 1
397
+ },
398
+ "optional": {
399
+ "type": "boolean"
400
+ }
401
+ }
402
+ },
403
+ {
404
+ "title": "RankingQuestion",
405
+ "description": "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.",
406
+ "type": "object",
407
+ "additionalProperties": false,
408
+ "required": [
409
+ "key",
410
+ "type",
411
+ "options",
412
+ "partial",
413
+ "optional"
414
+ ],
415
+ "properties": {
416
+ "key": {
417
+ "$ref": "#/$defs/Key"
418
+ },
419
+ "type": {
420
+ "const": "ranking"
421
+ },
422
+ "text": {
423
+ "type": "string",
424
+ "maxLength": 2048
425
+ },
426
+ "options": {
427
+ "type": "array",
428
+ "minItems": 2,
429
+ "maxItems": 64,
430
+ "items": {
431
+ "$ref": "#/$defs/QuestionOption"
432
+ }
433
+ },
434
+ "partial": {
435
+ "type": "boolean"
436
+ },
437
+ "optional": {
438
+ "type": "boolean"
439
+ }
440
+ }
441
+ },
442
+ {
443
+ "title": "ScoreQuestion",
444
+ "description": "Give each option an integer score within [min, max].",
445
+ "type": "object",
446
+ "additionalProperties": false,
447
+ "required": [
448
+ "key",
449
+ "type",
450
+ "options",
451
+ "min",
452
+ "max",
453
+ "optional"
454
+ ],
455
+ "properties": {
456
+ "key": {
457
+ "$ref": "#/$defs/Key"
458
+ },
459
+ "type": {
460
+ "const": "score"
461
+ },
462
+ "text": {
463
+ "type": "string",
464
+ "maxLength": 2048
465
+ },
466
+ "options": {
467
+ "type": "array",
468
+ "minItems": 1,
469
+ "maxItems": 256,
470
+ "items": {
471
+ "$ref": "#/$defs/QuestionOption"
472
+ }
473
+ },
474
+ "min": {
475
+ "type": "integer"
476
+ },
477
+ "max": {
478
+ "type": "integer"
479
+ },
480
+ "optional": {
481
+ "type": "boolean"
482
+ }
483
+ }
484
+ },
485
+ {
486
+ "title": "TextQuestion",
487
+ "description": "Free text of at most `maxLength` characters.",
488
+ "type": "object",
489
+ "additionalProperties": false,
490
+ "required": [
491
+ "key",
492
+ "type",
493
+ "maxLength",
494
+ "optional"
495
+ ],
496
+ "properties": {
497
+ "key": {
498
+ "$ref": "#/$defs/Key"
499
+ },
500
+ "type": {
501
+ "const": "text"
502
+ },
503
+ "text": {
504
+ "type": "string",
505
+ "maxLength": 2048
506
+ },
507
+ "maxLength": {
508
+ "type": "integer",
509
+ "minimum": 1,
510
+ "maximum": 4096
511
+ },
512
+ "optional": {
513
+ "type": "boolean"
514
+ }
515
+ }
516
+ }
517
+ ]
518
+ },
519
+ "Key": {
520
+ "title": "Key",
521
+ "description": "A question or option key, unique within its manifest or question.",
522
+ "type": "string",
523
+ "pattern": "^[A-Za-z0-9._-]{1,64}$"
524
+ },
525
+ "QuestionOption": {
526
+ "title": "QuestionOption",
527
+ "type": "object",
528
+ "additionalProperties": false,
529
+ "required": [
530
+ "key"
531
+ ],
532
+ "properties": {
533
+ "key": {
534
+ "$ref": "#/$defs/Key"
535
+ },
536
+ "label": {
537
+ "type": "string",
538
+ "maxLength": 512,
539
+ "description": "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014)."
540
+ }
541
+ }
542
+ },
543
+ "Slot": {
544
+ "title": "Slot",
545
+ "description": "One place in a board's timetable that a selected idea can be put in (VTI-BRD-040): a place (`label`, e.g. a room) and a time.",
546
+ "type": "object",
547
+ "additionalProperties": false,
548
+ "required": [
549
+ "slotId",
550
+ "label",
551
+ "startsAt",
552
+ "endsAt"
553
+ ],
554
+ "properties": {
555
+ "slotId": {
556
+ "$ref": "#/$defs/Key"
557
+ },
558
+ "label": {
559
+ "type": "string",
560
+ "minLength": 1,
561
+ "maxLength": 100
562
+ },
563
+ "startsAt": {
564
+ "type": "string",
565
+ "format": "date-time"
566
+ },
567
+ "endsAt": {
568
+ "type": "string",
569
+ "format": "date-time"
570
+ }
571
+ }
572
+ },
573
+ "IdeaFormat": {
574
+ "title": "IdeaFormat",
575
+ "type": "string",
576
+ "minLength": 1,
577
+ "maxLength": 32,
578
+ "description": "What kind of idea it is (for an unconference: `Discussion`, `Talk`, `Workshop`, `Demo`). One of the board's `formats` where the board states them."
579
+ },
580
+ "Topic": {
581
+ "title": "Topic",
582
+ "type": "string",
583
+ "minLength": 1,
584
+ "maxLength": 64,
585
+ "description": "A topic an idea is filed under. One of the board's `topics` where the board states them."
586
+ },
587
+ "Window": {
588
+ "title": "Window",
589
+ "description": "A period, open from `opensAt` until `closesAt`. `closesAt` is after `opensAt` (a consumer check; JSON Schema cannot compare them).",
590
+ "type": "object",
591
+ "additionalProperties": false,
592
+ "required": [
593
+ "opensAt",
594
+ "closesAt"
595
+ ],
596
+ "properties": {
597
+ "opensAt": {
598
+ "type": "string",
599
+ "format": "date-time"
600
+ },
601
+ "closesAt": {
602
+ "type": "string",
603
+ "format": "date-time"
604
+ }
605
+ }
606
+ },
607
+ "BoardAudience": {
608
+ "title": "BoardAudience",
609
+ "description": "Who may see and use a board (VTI-BRD-003): every active member of the community (`members`), or the members of one community group (`group`, with `groupId`). Facilitators always see the board.",
610
+ "oneOf": [
611
+ {
612
+ "type": "object",
613
+ "additionalProperties": false,
614
+ "required": [
615
+ "kind"
616
+ ],
617
+ "properties": {
618
+ "kind": {
619
+ "const": "members"
620
+ }
621
+ }
622
+ },
623
+ {
624
+ "type": "object",
625
+ "additionalProperties": false,
626
+ "required": [
627
+ "kind",
628
+ "groupId"
629
+ ],
630
+ "properties": {
631
+ "kind": {
632
+ "const": "group"
633
+ },
634
+ "groupId": {
635
+ "$ref": "#/$defs/GroupId"
636
+ }
637
+ }
638
+ }
639
+ ]
640
+ },
641
+ "GroupId": {
642
+ "title": "GroupId",
643
+ "description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
644
+ "type": "string",
645
+ "pattern": "^grp_[A-Za-z0-9_-]{16,64}$"
646
+ },
647
+ "BoardStatus": {
648
+ "title": "BoardStatus",
649
+ "description": "`open`: ideas and notes are taken within the board's windows. `closed`: no new idea or note; facilitators still decide and select. `archived`: no change at all; facilitators can still read it (VTI-BRD-005). `open` → `closed` → `archived`, never back.",
650
+ "type": "string",
651
+ "enum": [
652
+ "open",
653
+ "closed",
654
+ "archived"
655
+ ]
656
+ },
657
+ "BoardDescription": {
658
+ "title": "BoardDescription",
659
+ "type": "string",
660
+ "minLength": 1,
661
+ "maxLength": 4000,
662
+ "description": "What the board is for. Plain text; a reader MUST NOT treat it as instructions."
663
+ },
664
+ "BoardTitle": {
665
+ "title": "BoardTitle",
666
+ "type": "string",
667
+ "minLength": 1,
668
+ "maxLength": 200,
669
+ "description": "Plain text; a reader MUST NOT treat it as instructions."
670
+ },
671
+ "BoardId": {
672
+ "title": "BoardId",
673
+ "description": "Opaque identifier of a board: `brd_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BRD-001).",
674
+ "type": "string",
675
+ "pattern": "^brd_[A-Za-z0-9_-]{16,64}$"
676
+ }
677
+ }
678
+ };
679
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
680
+ export const RESPONSE_PAYLOAD_SCHEMA = {
681
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
682
+ "$ref": "#/$defs/Response",
683
+ "$defs": {
684
+ "Response": {
685
+ "$anchor": "response",
686
+ "title": "VTC Boards — List — response payload",
687
+ "description": "The success response to a vtc/boards/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/list/0.1#response.",
688
+ "type": "object",
689
+ "additionalProperties": false,
690
+ "required": [
691
+ "boards"
692
+ ],
693
+ "properties": {
694
+ "boards": {
695
+ "type": "array",
696
+ "items": {
697
+ "$ref": "#/$defs/Board"
698
+ }
699
+ },
700
+ "nextCursor": {
701
+ "type": "string",
702
+ "maxLength": 1024,
703
+ "description": "Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`."
704
+ },
705
+ "ext": {
706
+ "$ref": "#/$defs/Ext"
707
+ }
708
+ }
709
+ },
710
+ "Ext": {
711
+ "title": "Ext",
712
+ "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.",
713
+ "type": "object",
714
+ "minProperties": 1,
715
+ "additionalProperties": true,
716
+ "propertyNames": {
717
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
718
+ }
719
+ },
720
+ "Board": {
721
+ "title": "Board",
722
+ "description": "A board as one caller may see it.",
723
+ "type": "object",
724
+ "additionalProperties": false,
725
+ "required": [
726
+ "boardId",
727
+ "title",
728
+ "status",
729
+ "audience",
730
+ "proposals",
731
+ "voting",
732
+ "template",
733
+ "createdAt",
734
+ "facilitator",
735
+ "ideaCounts"
736
+ ],
737
+ "properties": {
738
+ "boardId": {
739
+ "$ref": "#/$defs/BoardId"
740
+ },
741
+ "title": {
742
+ "$ref": "#/$defs/BoardTitle"
743
+ },
744
+ "description": {
745
+ "$ref": "#/$defs/BoardDescription"
746
+ },
747
+ "status": {
748
+ "$ref": "#/$defs/BoardStatus"
749
+ },
750
+ "audience": {
751
+ "$ref": "#/$defs/BoardAudience"
752
+ },
753
+ "proposals": {
754
+ "$ref": "#/$defs/Window",
755
+ "description": "When ideas are taken (VTI-BRD-010)."
756
+ },
757
+ "voting": {
758
+ "$ref": "#/$defs/Window",
759
+ "description": "When every idea's election takes ballots. Opens after `proposals` opens and closes after it closes (VTI-BRD-001)."
760
+ },
761
+ "topics": {
762
+ "type": "array",
763
+ "maxItems": 32,
764
+ "uniqueItems": true,
765
+ "items": {
766
+ "$ref": "#/$defs/Topic"
767
+ }
768
+ },
769
+ "formats": {
770
+ "type": "array",
771
+ "maxItems": 16,
772
+ "uniqueItems": true,
773
+ "items": {
774
+ "$ref": "#/$defs/IdeaFormat"
775
+ }
776
+ },
777
+ "maxIdeasPerMember": {
778
+ "type": "integer",
779
+ "minimum": 1,
780
+ "maximum": 100,
781
+ "description": "The most ideas one member may have on the board that are not `withdrawn` or `declined`. Absent: no limit beyond the community's own."
782
+ },
783
+ "selectionRule": {
784
+ "type": "string",
785
+ "minLength": 1,
786
+ "maxLength": 500,
787
+ "description": "How facilitators intend to select, in plain words (VTI-BRD-041), e.g. \"The twelve ideas the most members would attend\"."
788
+ },
789
+ "timetable": {
790
+ "type": "array",
791
+ "maxItems": 256,
792
+ "items": {
793
+ "$ref": "#/$defs/Slot"
794
+ }
795
+ },
796
+ "template": {
797
+ "$ref": "#/$defs/ElectionTemplate"
798
+ },
799
+ "createdAt": {
800
+ "type": "string",
801
+ "format": "date-time"
802
+ },
803
+ "facilitator": {
804
+ "type": "boolean",
805
+ "description": "Whether the caller facilitates this board."
806
+ },
807
+ "ideaCounts": {
808
+ "type": "object",
809
+ "additionalProperties": false,
810
+ "description": "How many of the board's ideas are in each state the caller may see.",
811
+ "properties": {
812
+ "proposed": {
813
+ "type": "integer",
814
+ "minimum": 0
815
+ },
816
+ "open": {
817
+ "type": "integer",
818
+ "minimum": 0
819
+ },
820
+ "selected": {
821
+ "type": "integer",
822
+ "minimum": 0
823
+ },
824
+ "notSelected": {
825
+ "type": "integer",
826
+ "minimum": 0
827
+ },
828
+ "declined": {
829
+ "type": "integer",
830
+ "minimum": 0
831
+ },
832
+ "merged": {
833
+ "type": "integer",
834
+ "minimum": 0
835
+ },
836
+ "withdrawn": {
837
+ "type": "integer",
838
+ "minimum": 0
839
+ }
840
+ }
841
+ }
842
+ }
843
+ },
844
+ "ElectionTemplate": {
845
+ "title": "ElectionTemplate",
846
+ "description": "Every member of an idea's election manifest that the board fixes (VTI-BRD-030). When a facilitator accepts an idea the community completes it: `electionId` (naming the board and the idea), `community`, `title` and `description` from the idea, `registrationOpensAt` and `votingOpensAt` from the board's voting window's `opensAt` or the acceptance, whichever is later, `votingClosesAt` from its `closesAt`, `roll` from the board's audience (rule `members`, or a credential roll naming the group), and `binding: false`. A board's template is never binding, and so has no `binding` member.",
847
+ "type": "object",
848
+ "additionalProperties": false,
849
+ "required": [
850
+ "questions",
851
+ "secrecy",
852
+ "revote",
853
+ "board",
854
+ "ballotBox",
855
+ "allowEarlyClose",
856
+ "resultsBeforeClose",
857
+ "textReleaseThreshold"
858
+ ],
859
+ "properties": {
860
+ "questions": {
861
+ "type": "array",
862
+ "minItems": 1,
863
+ "maxItems": 16,
864
+ "items": {
865
+ "$ref": "#/$defs/Question"
866
+ }
867
+ },
868
+ "secrecy": {
869
+ "$ref": "#/$defs/SecrecyLevel"
870
+ },
871
+ "revote": {
872
+ "$ref": "#/$defs/Revote"
873
+ },
874
+ "board": {
875
+ "type": "object",
876
+ "additionalProperties": false,
877
+ "required": [
878
+ "visibility",
879
+ "auditors"
880
+ ],
881
+ "description": "The ballot box's board for each idea's election, as a manifest states it (VTI-VOT-052). `public` lets a board show each idea's ballot count while voting is open (VTI-BRD-033).",
882
+ "properties": {
883
+ "visibility": {
884
+ "$ref": "#/$defs/BoardVisibility"
885
+ },
886
+ "auditors": {
887
+ "type": "array",
888
+ "uniqueItems": true,
889
+ "items": {
890
+ "type": "string",
891
+ "minLength": 1,
892
+ "maxLength": 2048
893
+ }
894
+ }
895
+ }
896
+ },
897
+ "ballotBox": {
898
+ "type": "string",
899
+ "minLength": 1,
900
+ "maxLength": 2048,
901
+ "description": "The DID of the voting service every idea's election is registered with; one on the community's list (VTI-VOT-082)."
902
+ },
903
+ "trustees": {
904
+ "$ref": "#/$defs/Trustees"
905
+ },
906
+ "allowEarlyClose": {
907
+ "type": "boolean"
908
+ },
909
+ "resultsBeforeClose": {
910
+ "type": "boolean",
911
+ "description": "Open elections only: whether running totals may be read while voting is open (VTI-VOT-061). A board SHOULD set it false (VTI-BRD-033)."
912
+ },
913
+ "textReleaseThreshold": {
914
+ "type": "integer",
915
+ "minimum": 1,
916
+ "description": "Counted ballots required before any text answer is disclosed (VTI-VOT-065); SHOULD be at least 10."
917
+ }
918
+ }
919
+ },
920
+ "Trustees": {
921
+ "title": "Trustees",
922
+ "description": "The trustees of a sealed or tallied-encrypted election and the number of them decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be one.",
923
+ "type": "object",
924
+ "additionalProperties": false,
925
+ "required": [
926
+ "dids",
927
+ "threshold"
928
+ ],
929
+ "properties": {
930
+ "dids": {
931
+ "type": "array",
932
+ "minItems": 2,
933
+ "items": {
934
+ "type": "string",
935
+ "minLength": 1,
936
+ "maxLength": 2048
937
+ },
938
+ "uniqueItems": true
939
+ },
940
+ "threshold": {
941
+ "type": "integer",
942
+ "minimum": 2
943
+ }
944
+ }
945
+ },
946
+ "BoardVisibility": {
947
+ "title": "BoardVisibility",
948
+ "description": "`public`: anyone reads the board. `private`: the community, the auditors the manifest names and, for one cast's inclusion, the holder of its receipt (VTI-VOT-052).",
949
+ "type": "string",
950
+ "enum": [
951
+ "public",
952
+ "private"
953
+ ]
954
+ },
955
+ "Revote": {
956
+ "title": "Revote",
957
+ "description": "What a later, different ballot under one ticket does: `replace` the earlier one, or be refused (`refuse`) (VTI-VOT-041).",
958
+ "type": "string",
959
+ "enum": [
960
+ "replace",
961
+ "refuse"
962
+ ]
963
+ },
964
+ "SecrecyLevel": {
965
+ "title": "SecrecyLevel",
966
+ "description": "`open`: ballots are recorded on the board as cast. `sealed`: ballots are encrypted to a jointly generated election key and decrypted after voting closes. `talliedEncrypted`: ballots are encrypted and only the totals are ever decrypted (VTI-VOT-060). The encrypted levels are cast with `voting/ballot/cast-encrypted/0.1`, under an election key the trustees generate with `voting/trustees/*` (CONVENTIONS §9).",
967
+ "type": "string",
968
+ "enum": [
969
+ "open",
970
+ "sealed",
971
+ "talliedEncrypted"
972
+ ]
973
+ },
974
+ "Question": {
975
+ "title": "Question",
976
+ "description": "One question. Tagged union over `type`.",
977
+ "oneOf": [
978
+ {
979
+ "title": "ChoiceQuestion",
980
+ "description": "Select between `minSelections` and `maxSelections` of `options`. A yes/no/abstain motion is a choice of exactly one of three.",
981
+ "type": "object",
982
+ "additionalProperties": false,
983
+ "required": [
984
+ "key",
985
+ "type",
986
+ "options",
987
+ "minSelections",
988
+ "maxSelections",
989
+ "optional"
990
+ ],
991
+ "properties": {
992
+ "key": {
993
+ "$ref": "#/$defs/Key"
994
+ },
995
+ "type": {
996
+ "const": "choice"
997
+ },
998
+ "text": {
999
+ "type": "string",
1000
+ "maxLength": 2048
1001
+ },
1002
+ "options": {
1003
+ "type": "array",
1004
+ "minItems": 2,
1005
+ "maxItems": 256,
1006
+ "items": {
1007
+ "$ref": "#/$defs/QuestionOption"
1008
+ }
1009
+ },
1010
+ "minSelections": {
1011
+ "type": "integer",
1012
+ "minimum": 0
1013
+ },
1014
+ "maxSelections": {
1015
+ "type": "integer",
1016
+ "minimum": 1
1017
+ },
1018
+ "optional": {
1019
+ "type": "boolean"
1020
+ }
1021
+ }
1022
+ },
1023
+ {
1024
+ "title": "RankingQuestion",
1025
+ "description": "Order `options`; a ballot ranks every option or, when `partial` is true, a prefix of them.",
1026
+ "type": "object",
1027
+ "additionalProperties": false,
1028
+ "required": [
1029
+ "key",
1030
+ "type",
1031
+ "options",
1032
+ "partial",
1033
+ "optional"
1034
+ ],
1035
+ "properties": {
1036
+ "key": {
1037
+ "$ref": "#/$defs/Key"
1038
+ },
1039
+ "type": {
1040
+ "const": "ranking"
1041
+ },
1042
+ "text": {
1043
+ "type": "string",
1044
+ "maxLength": 2048
1045
+ },
1046
+ "options": {
1047
+ "type": "array",
1048
+ "minItems": 2,
1049
+ "maxItems": 64,
1050
+ "items": {
1051
+ "$ref": "#/$defs/QuestionOption"
1052
+ }
1053
+ },
1054
+ "partial": {
1055
+ "type": "boolean"
1056
+ },
1057
+ "optional": {
1058
+ "type": "boolean"
1059
+ }
1060
+ }
1061
+ },
1062
+ {
1063
+ "title": "ScoreQuestion",
1064
+ "description": "Give each option an integer score within [min, max].",
1065
+ "type": "object",
1066
+ "additionalProperties": false,
1067
+ "required": [
1068
+ "key",
1069
+ "type",
1070
+ "options",
1071
+ "min",
1072
+ "max",
1073
+ "optional"
1074
+ ],
1075
+ "properties": {
1076
+ "key": {
1077
+ "$ref": "#/$defs/Key"
1078
+ },
1079
+ "type": {
1080
+ "const": "score"
1081
+ },
1082
+ "text": {
1083
+ "type": "string",
1084
+ "maxLength": 2048
1085
+ },
1086
+ "options": {
1087
+ "type": "array",
1088
+ "minItems": 1,
1089
+ "maxItems": 256,
1090
+ "items": {
1091
+ "$ref": "#/$defs/QuestionOption"
1092
+ }
1093
+ },
1094
+ "min": {
1095
+ "type": "integer"
1096
+ },
1097
+ "max": {
1098
+ "type": "integer"
1099
+ },
1100
+ "optional": {
1101
+ "type": "boolean"
1102
+ }
1103
+ }
1104
+ },
1105
+ {
1106
+ "title": "TextQuestion",
1107
+ "description": "Free text of at most `maxLength` characters.",
1108
+ "type": "object",
1109
+ "additionalProperties": false,
1110
+ "required": [
1111
+ "key",
1112
+ "type",
1113
+ "maxLength",
1114
+ "optional"
1115
+ ],
1116
+ "properties": {
1117
+ "key": {
1118
+ "$ref": "#/$defs/Key"
1119
+ },
1120
+ "type": {
1121
+ "const": "text"
1122
+ },
1123
+ "text": {
1124
+ "type": "string",
1125
+ "maxLength": 2048
1126
+ },
1127
+ "maxLength": {
1128
+ "type": "integer",
1129
+ "minimum": 1,
1130
+ "maximum": 4096
1131
+ },
1132
+ "optional": {
1133
+ "type": "boolean"
1134
+ }
1135
+ }
1136
+ }
1137
+ ]
1138
+ },
1139
+ "Key": {
1140
+ "title": "Key",
1141
+ "description": "A question or option key, unique within its manifest or question.",
1142
+ "type": "string",
1143
+ "pattern": "^[A-Za-z0-9._-]{1,64}$"
1144
+ },
1145
+ "QuestionOption": {
1146
+ "title": "QuestionOption",
1147
+ "type": "object",
1148
+ "additionalProperties": false,
1149
+ "required": [
1150
+ "key"
1151
+ ],
1152
+ "properties": {
1153
+ "key": {
1154
+ "$ref": "#/$defs/Key"
1155
+ },
1156
+ "label": {
1157
+ "type": "string",
1158
+ "maxLength": 512,
1159
+ "description": "Display text. Absent from a manifest registered with a ballot box that holds no question text (VTI-VOT-014)."
1160
+ }
1161
+ }
1162
+ },
1163
+ "Slot": {
1164
+ "title": "Slot",
1165
+ "description": "One place in a board's timetable that a selected idea can be put in (VTI-BRD-040): a place (`label`, e.g. a room) and a time.",
1166
+ "type": "object",
1167
+ "additionalProperties": false,
1168
+ "required": [
1169
+ "slotId",
1170
+ "label",
1171
+ "startsAt",
1172
+ "endsAt"
1173
+ ],
1174
+ "properties": {
1175
+ "slotId": {
1176
+ "$ref": "#/$defs/Key"
1177
+ },
1178
+ "label": {
1179
+ "type": "string",
1180
+ "minLength": 1,
1181
+ "maxLength": 100
1182
+ },
1183
+ "startsAt": {
1184
+ "type": "string",
1185
+ "format": "date-time"
1186
+ },
1187
+ "endsAt": {
1188
+ "type": "string",
1189
+ "format": "date-time"
1190
+ }
1191
+ }
1192
+ },
1193
+ "IdeaFormat": {
1194
+ "title": "IdeaFormat",
1195
+ "type": "string",
1196
+ "minLength": 1,
1197
+ "maxLength": 32,
1198
+ "description": "What kind of idea it is (for an unconference: `Discussion`, `Talk`, `Workshop`, `Demo`). One of the board's `formats` where the board states them."
1199
+ },
1200
+ "Topic": {
1201
+ "title": "Topic",
1202
+ "type": "string",
1203
+ "minLength": 1,
1204
+ "maxLength": 64,
1205
+ "description": "A topic an idea is filed under. One of the board's `topics` where the board states them."
1206
+ },
1207
+ "Window": {
1208
+ "title": "Window",
1209
+ "description": "A period, open from `opensAt` until `closesAt`. `closesAt` is after `opensAt` (a consumer check; JSON Schema cannot compare them).",
1210
+ "type": "object",
1211
+ "additionalProperties": false,
1212
+ "required": [
1213
+ "opensAt",
1214
+ "closesAt"
1215
+ ],
1216
+ "properties": {
1217
+ "opensAt": {
1218
+ "type": "string",
1219
+ "format": "date-time"
1220
+ },
1221
+ "closesAt": {
1222
+ "type": "string",
1223
+ "format": "date-time"
1224
+ }
1225
+ }
1226
+ },
1227
+ "BoardAudience": {
1228
+ "title": "BoardAudience",
1229
+ "description": "Who may see and use a board (VTI-BRD-003): every active member of the community (`members`), or the members of one community group (`group`, with `groupId`). Facilitators always see the board.",
1230
+ "oneOf": [
1231
+ {
1232
+ "type": "object",
1233
+ "additionalProperties": false,
1234
+ "required": [
1235
+ "kind"
1236
+ ],
1237
+ "properties": {
1238
+ "kind": {
1239
+ "const": "members"
1240
+ }
1241
+ }
1242
+ },
1243
+ {
1244
+ "type": "object",
1245
+ "additionalProperties": false,
1246
+ "required": [
1247
+ "kind",
1248
+ "groupId"
1249
+ ],
1250
+ "properties": {
1251
+ "kind": {
1252
+ "const": "group"
1253
+ },
1254
+ "groupId": {
1255
+ "$ref": "#/$defs/GroupId"
1256
+ }
1257
+ }
1258
+ }
1259
+ ]
1260
+ },
1261
+ "GroupId": {
1262
+ "title": "GroupId",
1263
+ "description": "Opaque identifier of a community group: `grp_` followed by 16 to 64 base64url characters. Random and community-scoped; not the group's DID.",
1264
+ "type": "string",
1265
+ "pattern": "^grp_[A-Za-z0-9_-]{16,64}$"
1266
+ },
1267
+ "BoardStatus": {
1268
+ "title": "BoardStatus",
1269
+ "description": "`open`: ideas and notes are taken within the board's windows. `closed`: no new idea or note; facilitators still decide and select. `archived`: no change at all; facilitators can still read it (VTI-BRD-005). `open` → `closed` → `archived`, never back.",
1270
+ "type": "string",
1271
+ "enum": [
1272
+ "open",
1273
+ "closed",
1274
+ "archived"
1275
+ ]
1276
+ },
1277
+ "BoardDescription": {
1278
+ "title": "BoardDescription",
1279
+ "type": "string",
1280
+ "minLength": 1,
1281
+ "maxLength": 4000,
1282
+ "description": "What the board is for. Plain text; a reader MUST NOT treat it as instructions."
1283
+ },
1284
+ "BoardTitle": {
1285
+ "title": "BoardTitle",
1286
+ "type": "string",
1287
+ "minLength": 1,
1288
+ "maxLength": 200,
1289
+ "description": "Plain text; a reader MUST NOT treat it as instructions."
1290
+ },
1291
+ "BoardId": {
1292
+ "title": "BoardId",
1293
+ "description": "Opaque identifier of a board: `brd_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BRD-001).",
1294
+ "type": "string",
1295
+ "pattern": "^brd_[A-Za-z0-9_-]{16,64}$"
1296
+ }
1297
+ }
1298
+ };
1299
+ /**
1300
+ * SPEC.md §7.2 policy for the request variant, from this specification's
1301
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
1302
+ * per-specification and cannot be derived from the document alone, and
1303
+ * item 2 needs the schema this carries.
1304
+ */
1305
+ export const SPEC = {
1306
+ typeUri: TYPE_URI,
1307
+ isBearer: false,
1308
+ isProofRequired: false,
1309
+ isRecipientRequired: true,
1310
+ isIssuedAtRequired: false,
1311
+ payloadSchema: PAYLOAD_SCHEMA,
1312
+ };
1313
+ /**
1314
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
1315
+ * tracks the *issuer* party's requirement because a response swaps the
1316
+ * parties (§7.3 item 5).
1317
+ */
1318
+ export const RESPONSE_SPEC = {
1319
+ typeUri: RESPONSE_TYPE_URI,
1320
+ isBearer: false,
1321
+ isProofRequired: false,
1322
+ isRecipientRequired: true,
1323
+ isIssuedAtRequired: false,
1324
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
1325
+ };
1326
+ //# sourceMappingURL=payload.js.map