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