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