@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,1011 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/boards/ideas/withdraw/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/boards/ideas/withdraw/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/ideas/withdraw/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/ideas/withdraw/0.1",
|
|
35
|
+
"title": "VTC Boards — Ideas — Withdraw — payload",
|
|
36
|
+
"description": "A proposer withdraws their idea while it is still proposed. The outer document members are owned by the framework — SPEC §6.3.",
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": [
|
|
40
|
+
"ideaId"
|
|
41
|
+
],
|
|
42
|
+
"properties": {
|
|
43
|
+
"ideaId": {
|
|
44
|
+
"$ref": "#/$defs/IdeaId"
|
|
45
|
+
},
|
|
46
|
+
"ext": {
|
|
47
|
+
"$ref": "#/$defs/Ext"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"$defs": {
|
|
51
|
+
"Response": {
|
|
52
|
+
"$anchor": "response",
|
|
53
|
+
"title": "VTC Boards — Ideas — Withdraw — response payload",
|
|
54
|
+
"description": "The success response to a vtc/boards/ideas/withdraw/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/ideas/withdraw/0.1#response.",
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": [
|
|
58
|
+
"idea"
|
|
59
|
+
],
|
|
60
|
+
"properties": {
|
|
61
|
+
"idea": {
|
|
62
|
+
"$ref": "#/$defs/Idea"
|
|
63
|
+
},
|
|
64
|
+
"ext": {
|
|
65
|
+
"$ref": "#/$defs/Ext"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"Ext": {
|
|
70
|
+
"title": "Ext",
|
|
71
|
+
"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.",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"minProperties": 1,
|
|
74
|
+
"additionalProperties": true,
|
|
75
|
+
"propertyNames": {
|
|
76
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"Idea": {
|
|
80
|
+
"title": "Idea",
|
|
81
|
+
"description": "An idea as one caller may see it.",
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": [
|
|
85
|
+
"ideaId",
|
|
86
|
+
"boardId",
|
|
87
|
+
"state",
|
|
88
|
+
"title",
|
|
89
|
+
"description",
|
|
90
|
+
"proposer",
|
|
91
|
+
"proposedAt",
|
|
92
|
+
"noteCount"
|
|
93
|
+
],
|
|
94
|
+
"properties": {
|
|
95
|
+
"ideaId": {
|
|
96
|
+
"$ref": "#/$defs/IdeaId"
|
|
97
|
+
},
|
|
98
|
+
"boardId": {
|
|
99
|
+
"$ref": "#/$defs/BoardId"
|
|
100
|
+
},
|
|
101
|
+
"state": {
|
|
102
|
+
"$ref": "#/$defs/IdeaState"
|
|
103
|
+
},
|
|
104
|
+
"title": {
|
|
105
|
+
"$ref": "#/$defs/IdeaTitle"
|
|
106
|
+
},
|
|
107
|
+
"description": {
|
|
108
|
+
"$ref": "#/$defs/IdeaDescription"
|
|
109
|
+
},
|
|
110
|
+
"format": {
|
|
111
|
+
"$ref": "#/$defs/IdeaFormat"
|
|
112
|
+
},
|
|
113
|
+
"topic": {
|
|
114
|
+
"$ref": "#/$defs/Topic"
|
|
115
|
+
},
|
|
116
|
+
"proposer": {
|
|
117
|
+
"$ref": "#/$defs/Author"
|
|
118
|
+
},
|
|
119
|
+
"proposedAt": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"format": "date-time"
|
|
122
|
+
},
|
|
123
|
+
"noteCount": {
|
|
124
|
+
"type": "integer",
|
|
125
|
+
"minimum": 0,
|
|
126
|
+
"description": "Notes on the idea the caller may read."
|
|
127
|
+
},
|
|
128
|
+
"election": {
|
|
129
|
+
"$ref": "#/$defs/IdeaElection",
|
|
130
|
+
"description": "Present once an election was opened for the idea."
|
|
131
|
+
},
|
|
132
|
+
"opening": {
|
|
133
|
+
"$ref": "#/$defs/IdeaOpening"
|
|
134
|
+
},
|
|
135
|
+
"decision": {
|
|
136
|
+
"$ref": "#/$defs/IdeaDecision",
|
|
137
|
+
"description": "Present in `declined`, `merged`, `selected` and `notSelected`."
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"IdeaDecision": {
|
|
142
|
+
"title": "IdeaDecision",
|
|
143
|
+
"description": "A facilitator's decision on an idea: declining or merging it (VTI-BRD-013), or selecting it or not (VTI-BRD-040). The deciding facilitator is not named to the audience.",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"required": [
|
|
147
|
+
"decidedAt"
|
|
148
|
+
],
|
|
149
|
+
"properties": {
|
|
150
|
+
"decidedAt": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"format": "date-time"
|
|
153
|
+
},
|
|
154
|
+
"reason": {
|
|
155
|
+
"$ref": "#/$defs/Reason"
|
|
156
|
+
},
|
|
157
|
+
"mergedInto": {
|
|
158
|
+
"$ref": "#/$defs/IdeaId",
|
|
159
|
+
"description": "Present exactly when the idea is `merged`."
|
|
160
|
+
},
|
|
161
|
+
"slotId": {
|
|
162
|
+
"$ref": "#/$defs/Key",
|
|
163
|
+
"description": "A `selected` idea's place in the board's timetable, where it has one."
|
|
164
|
+
},
|
|
165
|
+
"departsFromRule": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"description": "`selected` or `notSelected` only: whether the facilitator said the decision departs from the board's `selectionRule` (VTI-BRD-041); `reason` then says why."
|
|
168
|
+
},
|
|
169
|
+
"ownIdea": {
|
|
170
|
+
"const": true,
|
|
171
|
+
"description": "Present when a facilitator decided their own idea because no other facilitator existed (VTI-BRD-013)."
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"IdeaId": {
|
|
176
|
+
"title": "IdeaId",
|
|
177
|
+
"description": "Opaque identifier of an idea: `ida_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
178
|
+
"type": "string",
|
|
179
|
+
"pattern": "^ida_[A-Za-z0-9_-]{16,64}$"
|
|
180
|
+
},
|
|
181
|
+
"Reason": {
|
|
182
|
+
"title": "Reason",
|
|
183
|
+
"type": "string",
|
|
184
|
+
"minLength": 1,
|
|
185
|
+
"maxLength": 500,
|
|
186
|
+
"description": "A facilitator's stated reason, shown to the board's audience with the decision it explains. Plain text."
|
|
187
|
+
},
|
|
188
|
+
"Key": {
|
|
189
|
+
"title": "Key",
|
|
190
|
+
"description": "A question or option key, unique within its manifest or question.",
|
|
191
|
+
"type": "string",
|
|
192
|
+
"pattern": "^[A-Za-z0-9._-]{1,64}$"
|
|
193
|
+
},
|
|
194
|
+
"IdeaOpening": {
|
|
195
|
+
"title": "IdeaOpening",
|
|
196
|
+
"description": "Shown to facilitators only: an accepted idea whose election the ballot box has not yet registered, so the idea is still `proposed` (VTI-BRD-031). `refusal` is the ballot box's or community's refusal of the last attempt, after which the idea is no longer being opened.",
|
|
197
|
+
"type": "object",
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"required": [
|
|
200
|
+
"electionId",
|
|
201
|
+
"startedAt"
|
|
202
|
+
],
|
|
203
|
+
"properties": {
|
|
204
|
+
"electionId": {
|
|
205
|
+
"$ref": "#/$defs/ElectionId"
|
|
206
|
+
},
|
|
207
|
+
"startedAt": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"format": "date-time",
|
|
210
|
+
"description": "When the facilitator accepted the idea."
|
|
211
|
+
},
|
|
212
|
+
"refusal": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"additionalProperties": false,
|
|
215
|
+
"required": [
|
|
216
|
+
"code",
|
|
217
|
+
"refusedAt"
|
|
218
|
+
],
|
|
219
|
+
"properties": {
|
|
220
|
+
"code": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"minLength": 1,
|
|
223
|
+
"maxLength": 200
|
|
224
|
+
},
|
|
225
|
+
"refusedAt": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"format": "date-time"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"ElectionId": {
|
|
234
|
+
"title": "ElectionId",
|
|
235
|
+
"description": "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.",
|
|
236
|
+
"type": "string",
|
|
237
|
+
"pattern": "^[A-Za-z0-9._-]{1,128}$"
|
|
238
|
+
},
|
|
239
|
+
"IdeaElection": {
|
|
240
|
+
"title": "IdeaElection",
|
|
241
|
+
"description": "An idea's election as a board shows it (VTI-BRD-033): never who took a ticket or cast a ballot.",
|
|
242
|
+
"type": "object",
|
|
243
|
+
"additionalProperties": false,
|
|
244
|
+
"required": [
|
|
245
|
+
"electionId",
|
|
246
|
+
"state"
|
|
247
|
+
],
|
|
248
|
+
"properties": {
|
|
249
|
+
"electionId": {
|
|
250
|
+
"$ref": "#/$defs/ElectionId"
|
|
251
|
+
},
|
|
252
|
+
"state": {
|
|
253
|
+
"$ref": "#/$defs/ElectionState"
|
|
254
|
+
},
|
|
255
|
+
"ballotsOnBoard": {
|
|
256
|
+
"type": "integer",
|
|
257
|
+
"minimum": 0,
|
|
258
|
+
"description": "The ballot box's latest board head's ballot count, where its board is public (VTI-VOT-052); absent otherwise. Counts ballots, not voters, where a later ballot replaces an earlier one."
|
|
259
|
+
},
|
|
260
|
+
"boardHeadIssuedAt": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"format": "date-time",
|
|
263
|
+
"description": "When the head `ballotsOnBoard` was read from was issued."
|
|
264
|
+
},
|
|
265
|
+
"result": {
|
|
266
|
+
"$ref": "#/$defs/ElectionResult",
|
|
267
|
+
"description": "Present once the election is tallied."
|
|
268
|
+
},
|
|
269
|
+
"certified": {
|
|
270
|
+
"type": "boolean",
|
|
271
|
+
"description": "Present with `result`: whether the community certified it (VTI-VOT-071)."
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"ElectionResult": {
|
|
276
|
+
"title": "ElectionResult",
|
|
277
|
+
"description": "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).",
|
|
278
|
+
"type": "object",
|
|
279
|
+
"additionalProperties": false,
|
|
280
|
+
"required": [
|
|
281
|
+
"electionId",
|
|
282
|
+
"manifestDigest",
|
|
283
|
+
"ballotsCounted",
|
|
284
|
+
"questions",
|
|
285
|
+
"head"
|
|
286
|
+
],
|
|
287
|
+
"properties": {
|
|
288
|
+
"electionId": {
|
|
289
|
+
"$ref": "#/$defs/ElectionId"
|
|
290
|
+
},
|
|
291
|
+
"manifestDigest": {
|
|
292
|
+
"$ref": "#/$defs/DigestMultibase"
|
|
293
|
+
},
|
|
294
|
+
"ballotsCounted": {
|
|
295
|
+
"type": "integer",
|
|
296
|
+
"minimum": 0
|
|
297
|
+
},
|
|
298
|
+
"questions": {
|
|
299
|
+
"type": "array",
|
|
300
|
+
"items": {
|
|
301
|
+
"$ref": "#/$defs/QuestionResult"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"head": {
|
|
305
|
+
"$ref": "#/$defs/BoardHead",
|
|
306
|
+
"description": "The head of the board as it stood at close: the result counts exactly its entries."
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"BoardHead": {
|
|
311
|
+
"title": "BoardHead",
|
|
312
|
+
"description": "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.",
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"required": [
|
|
316
|
+
"electionId",
|
|
317
|
+
"treeSize",
|
|
318
|
+
"rootHash",
|
|
319
|
+
"issuedAt"
|
|
320
|
+
],
|
|
321
|
+
"properties": {
|
|
322
|
+
"electionId": {
|
|
323
|
+
"$ref": "#/$defs/ElectionId"
|
|
324
|
+
},
|
|
325
|
+
"treeSize": {
|
|
326
|
+
"type": "integer",
|
|
327
|
+
"minimum": 0
|
|
328
|
+
},
|
|
329
|
+
"rootHash": {
|
|
330
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
331
|
+
"description": "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash."
|
|
332
|
+
},
|
|
333
|
+
"issuedAt": {
|
|
334
|
+
"type": "string",
|
|
335
|
+
"format": "date-time"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"DigestMultibase": {
|
|
340
|
+
"title": "DigestMultibase",
|
|
341
|
+
"description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
|
|
342
|
+
"type": "string",
|
|
343
|
+
"minLength": 16,
|
|
344
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
345
|
+
"examples": [
|
|
346
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
"QuestionResult": {
|
|
350
|
+
"title": "QuestionResult",
|
|
351
|
+
"description": "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.",
|
|
352
|
+
"type": "object",
|
|
353
|
+
"additionalProperties": false,
|
|
354
|
+
"required": [
|
|
355
|
+
"question",
|
|
356
|
+
"abstained"
|
|
357
|
+
],
|
|
358
|
+
"properties": {
|
|
359
|
+
"question": {
|
|
360
|
+
"$ref": "#/$defs/Key"
|
|
361
|
+
},
|
|
362
|
+
"abstained": {
|
|
363
|
+
"type": "integer",
|
|
364
|
+
"minimum": 0
|
|
365
|
+
},
|
|
366
|
+
"choice": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"propertyNames": {
|
|
369
|
+
"$ref": "#/$defs/Key"
|
|
370
|
+
},
|
|
371
|
+
"additionalProperties": {
|
|
372
|
+
"type": "integer",
|
|
373
|
+
"minimum": 0
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"ranking": {
|
|
377
|
+
"type": "object",
|
|
378
|
+
"propertyNames": {
|
|
379
|
+
"$ref": "#/$defs/Key"
|
|
380
|
+
},
|
|
381
|
+
"additionalProperties": {
|
|
382
|
+
"type": "array",
|
|
383
|
+
"items": {
|
|
384
|
+
"type": "integer",
|
|
385
|
+
"minimum": 0
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"score": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"propertyNames": {
|
|
392
|
+
"$ref": "#/$defs/Key"
|
|
393
|
+
},
|
|
394
|
+
"additionalProperties": {
|
|
395
|
+
"type": "object",
|
|
396
|
+
"additionalProperties": false,
|
|
397
|
+
"required": [
|
|
398
|
+
"sum",
|
|
399
|
+
"count"
|
|
400
|
+
],
|
|
401
|
+
"properties": {
|
|
402
|
+
"sum": {
|
|
403
|
+
"type": "integer"
|
|
404
|
+
},
|
|
405
|
+
"count": {
|
|
406
|
+
"type": "integer",
|
|
407
|
+
"minimum": 0
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"text": {
|
|
413
|
+
"type": "array",
|
|
414
|
+
"items": {
|
|
415
|
+
"type": "string",
|
|
416
|
+
"maxLength": 4096
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"withheld": {
|
|
420
|
+
"type": "boolean"
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"ElectionState": {
|
|
425
|
+
"title": "ElectionState",
|
|
426
|
+
"type": "string",
|
|
427
|
+
"enum": [
|
|
428
|
+
"registered",
|
|
429
|
+
"registration",
|
|
430
|
+
"voting",
|
|
431
|
+
"closed",
|
|
432
|
+
"tallied",
|
|
433
|
+
"cancelled"
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
"Author": {
|
|
437
|
+
"title": "Author",
|
|
438
|
+
"description": "Who proposed an idea or wrote a note, as the board's audience sees them. `entryId` is their directory entry, which survives a rotation of their DID; `name` is their directory display name as this caller may see it, absent where the directory withholds it. A departed member is shown as `formerMember: true` with neither (VTI-BRD-060).",
|
|
439
|
+
"type": "object",
|
|
440
|
+
"additionalProperties": false,
|
|
441
|
+
"properties": {
|
|
442
|
+
"entryId": {
|
|
443
|
+
"$ref": "#/$defs/EntryId"
|
|
444
|
+
},
|
|
445
|
+
"name": {
|
|
446
|
+
"type": "string",
|
|
447
|
+
"minLength": 1,
|
|
448
|
+
"maxLength": 200
|
|
449
|
+
},
|
|
450
|
+
"formerMember": {
|
|
451
|
+
"const": true
|
|
452
|
+
},
|
|
453
|
+
"you": {
|
|
454
|
+
"const": true,
|
|
455
|
+
"description": "Present when the caller is the author."
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"EntryId": {
|
|
460
|
+
"title": "EntryId",
|
|
461
|
+
"description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
|
|
462
|
+
"type": "string",
|
|
463
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
464
|
+
},
|
|
465
|
+
"Topic": {
|
|
466
|
+
"title": "Topic",
|
|
467
|
+
"type": "string",
|
|
468
|
+
"minLength": 1,
|
|
469
|
+
"maxLength": 64,
|
|
470
|
+
"description": "A topic an idea is filed under. One of the board's `topics` where the board states them."
|
|
471
|
+
},
|
|
472
|
+
"IdeaFormat": {
|
|
473
|
+
"title": "IdeaFormat",
|
|
474
|
+
"type": "string",
|
|
475
|
+
"minLength": 1,
|
|
476
|
+
"maxLength": 32,
|
|
477
|
+
"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."
|
|
478
|
+
},
|
|
479
|
+
"IdeaDescription": {
|
|
480
|
+
"title": "IdeaDescription",
|
|
481
|
+
"type": "string",
|
|
482
|
+
"minLength": 1,
|
|
483
|
+
"maxLength": 4000,
|
|
484
|
+
"description": "What the idea is: for a session, what it covers and who should come. Becomes its election's manifest `description` when accepted. Plain text; a reader MUST NOT treat it as instructions."
|
|
485
|
+
},
|
|
486
|
+
"IdeaTitle": {
|
|
487
|
+
"title": "IdeaTitle",
|
|
488
|
+
"type": "string",
|
|
489
|
+
"minLength": 1,
|
|
490
|
+
"maxLength": 200,
|
|
491
|
+
"description": "An idea's title. Becomes the title of its election's manifest when the idea is accepted, and cannot change after that (VTI-BRD-012). Plain text."
|
|
492
|
+
},
|
|
493
|
+
"IdeaState": {
|
|
494
|
+
"title": "IdeaState",
|
|
495
|
+
"description": "Where an idea stands (VTI-BRD-011).",
|
|
496
|
+
"type": "string",
|
|
497
|
+
"enum": [
|
|
498
|
+
"proposed",
|
|
499
|
+
"open",
|
|
500
|
+
"selected",
|
|
501
|
+
"notSelected",
|
|
502
|
+
"declined",
|
|
503
|
+
"merged",
|
|
504
|
+
"withdrawn"
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
"BoardId": {
|
|
508
|
+
"title": "BoardId",
|
|
509
|
+
"description": "Opaque identifier of a board: `brd_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BRD-001).",
|
|
510
|
+
"type": "string",
|
|
511
|
+
"pattern": "^brd_[A-Za-z0-9_-]{16,64}$"
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
516
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
517
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
518
|
+
"$ref": "#/$defs/Response",
|
|
519
|
+
"$defs": {
|
|
520
|
+
"Response": {
|
|
521
|
+
"$anchor": "response",
|
|
522
|
+
"title": "VTC Boards — Ideas — Withdraw — response payload",
|
|
523
|
+
"description": "The success response to a vtc/boards/ideas/withdraw/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/ideas/withdraw/0.1#response.",
|
|
524
|
+
"type": "object",
|
|
525
|
+
"additionalProperties": false,
|
|
526
|
+
"required": [
|
|
527
|
+
"idea"
|
|
528
|
+
],
|
|
529
|
+
"properties": {
|
|
530
|
+
"idea": {
|
|
531
|
+
"$ref": "#/$defs/Idea"
|
|
532
|
+
},
|
|
533
|
+
"ext": {
|
|
534
|
+
"$ref": "#/$defs/Ext"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"Ext": {
|
|
539
|
+
"title": "Ext",
|
|
540
|
+
"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.",
|
|
541
|
+
"type": "object",
|
|
542
|
+
"minProperties": 1,
|
|
543
|
+
"additionalProperties": true,
|
|
544
|
+
"propertyNames": {
|
|
545
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"Idea": {
|
|
549
|
+
"title": "Idea",
|
|
550
|
+
"description": "An idea as one caller may see it.",
|
|
551
|
+
"type": "object",
|
|
552
|
+
"additionalProperties": false,
|
|
553
|
+
"required": [
|
|
554
|
+
"ideaId",
|
|
555
|
+
"boardId",
|
|
556
|
+
"state",
|
|
557
|
+
"title",
|
|
558
|
+
"description",
|
|
559
|
+
"proposer",
|
|
560
|
+
"proposedAt",
|
|
561
|
+
"noteCount"
|
|
562
|
+
],
|
|
563
|
+
"properties": {
|
|
564
|
+
"ideaId": {
|
|
565
|
+
"$ref": "#/$defs/IdeaId"
|
|
566
|
+
},
|
|
567
|
+
"boardId": {
|
|
568
|
+
"$ref": "#/$defs/BoardId"
|
|
569
|
+
},
|
|
570
|
+
"state": {
|
|
571
|
+
"$ref": "#/$defs/IdeaState"
|
|
572
|
+
},
|
|
573
|
+
"title": {
|
|
574
|
+
"$ref": "#/$defs/IdeaTitle"
|
|
575
|
+
},
|
|
576
|
+
"description": {
|
|
577
|
+
"$ref": "#/$defs/IdeaDescription"
|
|
578
|
+
},
|
|
579
|
+
"format": {
|
|
580
|
+
"$ref": "#/$defs/IdeaFormat"
|
|
581
|
+
},
|
|
582
|
+
"topic": {
|
|
583
|
+
"$ref": "#/$defs/Topic"
|
|
584
|
+
},
|
|
585
|
+
"proposer": {
|
|
586
|
+
"$ref": "#/$defs/Author"
|
|
587
|
+
},
|
|
588
|
+
"proposedAt": {
|
|
589
|
+
"type": "string",
|
|
590
|
+
"format": "date-time"
|
|
591
|
+
},
|
|
592
|
+
"noteCount": {
|
|
593
|
+
"type": "integer",
|
|
594
|
+
"minimum": 0,
|
|
595
|
+
"description": "Notes on the idea the caller may read."
|
|
596
|
+
},
|
|
597
|
+
"election": {
|
|
598
|
+
"$ref": "#/$defs/IdeaElection",
|
|
599
|
+
"description": "Present once an election was opened for the idea."
|
|
600
|
+
},
|
|
601
|
+
"opening": {
|
|
602
|
+
"$ref": "#/$defs/IdeaOpening"
|
|
603
|
+
},
|
|
604
|
+
"decision": {
|
|
605
|
+
"$ref": "#/$defs/IdeaDecision",
|
|
606
|
+
"description": "Present in `declined`, `merged`, `selected` and `notSelected`."
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
"IdeaDecision": {
|
|
611
|
+
"title": "IdeaDecision",
|
|
612
|
+
"description": "A facilitator's decision on an idea: declining or merging it (VTI-BRD-013), or selecting it or not (VTI-BRD-040). The deciding facilitator is not named to the audience.",
|
|
613
|
+
"type": "object",
|
|
614
|
+
"additionalProperties": false,
|
|
615
|
+
"required": [
|
|
616
|
+
"decidedAt"
|
|
617
|
+
],
|
|
618
|
+
"properties": {
|
|
619
|
+
"decidedAt": {
|
|
620
|
+
"type": "string",
|
|
621
|
+
"format": "date-time"
|
|
622
|
+
},
|
|
623
|
+
"reason": {
|
|
624
|
+
"$ref": "#/$defs/Reason"
|
|
625
|
+
},
|
|
626
|
+
"mergedInto": {
|
|
627
|
+
"$ref": "#/$defs/IdeaId",
|
|
628
|
+
"description": "Present exactly when the idea is `merged`."
|
|
629
|
+
},
|
|
630
|
+
"slotId": {
|
|
631
|
+
"$ref": "#/$defs/Key",
|
|
632
|
+
"description": "A `selected` idea's place in the board's timetable, where it has one."
|
|
633
|
+
},
|
|
634
|
+
"departsFromRule": {
|
|
635
|
+
"type": "boolean",
|
|
636
|
+
"description": "`selected` or `notSelected` only: whether the facilitator said the decision departs from the board's `selectionRule` (VTI-BRD-041); `reason` then says why."
|
|
637
|
+
},
|
|
638
|
+
"ownIdea": {
|
|
639
|
+
"const": true,
|
|
640
|
+
"description": "Present when a facilitator decided their own idea because no other facilitator existed (VTI-BRD-013)."
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"IdeaId": {
|
|
645
|
+
"title": "IdeaId",
|
|
646
|
+
"description": "Opaque identifier of an idea: `ida_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
647
|
+
"type": "string",
|
|
648
|
+
"pattern": "^ida_[A-Za-z0-9_-]{16,64}$"
|
|
649
|
+
},
|
|
650
|
+
"Reason": {
|
|
651
|
+
"title": "Reason",
|
|
652
|
+
"type": "string",
|
|
653
|
+
"minLength": 1,
|
|
654
|
+
"maxLength": 500,
|
|
655
|
+
"description": "A facilitator's stated reason, shown to the board's audience with the decision it explains. Plain text."
|
|
656
|
+
},
|
|
657
|
+
"Key": {
|
|
658
|
+
"title": "Key",
|
|
659
|
+
"description": "A question or option key, unique within its manifest or question.",
|
|
660
|
+
"type": "string",
|
|
661
|
+
"pattern": "^[A-Za-z0-9._-]{1,64}$"
|
|
662
|
+
},
|
|
663
|
+
"IdeaOpening": {
|
|
664
|
+
"title": "IdeaOpening",
|
|
665
|
+
"description": "Shown to facilitators only: an accepted idea whose election the ballot box has not yet registered, so the idea is still `proposed` (VTI-BRD-031). `refusal` is the ballot box's or community's refusal of the last attempt, after which the idea is no longer being opened.",
|
|
666
|
+
"type": "object",
|
|
667
|
+
"additionalProperties": false,
|
|
668
|
+
"required": [
|
|
669
|
+
"electionId",
|
|
670
|
+
"startedAt"
|
|
671
|
+
],
|
|
672
|
+
"properties": {
|
|
673
|
+
"electionId": {
|
|
674
|
+
"$ref": "#/$defs/ElectionId"
|
|
675
|
+
},
|
|
676
|
+
"startedAt": {
|
|
677
|
+
"type": "string",
|
|
678
|
+
"format": "date-time",
|
|
679
|
+
"description": "When the facilitator accepted the idea."
|
|
680
|
+
},
|
|
681
|
+
"refusal": {
|
|
682
|
+
"type": "object",
|
|
683
|
+
"additionalProperties": false,
|
|
684
|
+
"required": [
|
|
685
|
+
"code",
|
|
686
|
+
"refusedAt"
|
|
687
|
+
],
|
|
688
|
+
"properties": {
|
|
689
|
+
"code": {
|
|
690
|
+
"type": "string",
|
|
691
|
+
"minLength": 1,
|
|
692
|
+
"maxLength": 200
|
|
693
|
+
},
|
|
694
|
+
"refusedAt": {
|
|
695
|
+
"type": "string",
|
|
696
|
+
"format": "date-time"
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
"ElectionId": {
|
|
703
|
+
"title": "ElectionId",
|
|
704
|
+
"description": "An election's identifier, unique within its community. A closed alphabet: it appears in the ticket class label `voter/<electionId>` and is framed into every hash a cast is bound to.",
|
|
705
|
+
"type": "string",
|
|
706
|
+
"pattern": "^[A-Za-z0-9._-]{1,128}$"
|
|
707
|
+
},
|
|
708
|
+
"IdeaElection": {
|
|
709
|
+
"title": "IdeaElection",
|
|
710
|
+
"description": "An idea's election as a board shows it (VTI-BRD-033): never who took a ticket or cast a ballot.",
|
|
711
|
+
"type": "object",
|
|
712
|
+
"additionalProperties": false,
|
|
713
|
+
"required": [
|
|
714
|
+
"electionId",
|
|
715
|
+
"state"
|
|
716
|
+
],
|
|
717
|
+
"properties": {
|
|
718
|
+
"electionId": {
|
|
719
|
+
"$ref": "#/$defs/ElectionId"
|
|
720
|
+
},
|
|
721
|
+
"state": {
|
|
722
|
+
"$ref": "#/$defs/ElectionState"
|
|
723
|
+
},
|
|
724
|
+
"ballotsOnBoard": {
|
|
725
|
+
"type": "integer",
|
|
726
|
+
"minimum": 0,
|
|
727
|
+
"description": "The ballot box's latest board head's ballot count, where its board is public (VTI-VOT-052); absent otherwise. Counts ballots, not voters, where a later ballot replaces an earlier one."
|
|
728
|
+
},
|
|
729
|
+
"boardHeadIssuedAt": {
|
|
730
|
+
"type": "string",
|
|
731
|
+
"format": "date-time",
|
|
732
|
+
"description": "When the head `ballotsOnBoard` was read from was issued."
|
|
733
|
+
},
|
|
734
|
+
"result": {
|
|
735
|
+
"$ref": "#/$defs/ElectionResult",
|
|
736
|
+
"description": "Present once the election is tallied."
|
|
737
|
+
},
|
|
738
|
+
"certified": {
|
|
739
|
+
"type": "boolean",
|
|
740
|
+
"description": "Present with `result`: whether the community certified it (VTI-VOT-071)."
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
"ElectionResult": {
|
|
745
|
+
"title": "ElectionResult",
|
|
746
|
+
"description": "An election's result, computable by anyone who can read its board from the board and the registration alone (VTI-VOT-070).",
|
|
747
|
+
"type": "object",
|
|
748
|
+
"additionalProperties": false,
|
|
749
|
+
"required": [
|
|
750
|
+
"electionId",
|
|
751
|
+
"manifestDigest",
|
|
752
|
+
"ballotsCounted",
|
|
753
|
+
"questions",
|
|
754
|
+
"head"
|
|
755
|
+
],
|
|
756
|
+
"properties": {
|
|
757
|
+
"electionId": {
|
|
758
|
+
"$ref": "#/$defs/ElectionId"
|
|
759
|
+
},
|
|
760
|
+
"manifestDigest": {
|
|
761
|
+
"$ref": "#/$defs/DigestMultibase"
|
|
762
|
+
},
|
|
763
|
+
"ballotsCounted": {
|
|
764
|
+
"type": "integer",
|
|
765
|
+
"minimum": 0
|
|
766
|
+
},
|
|
767
|
+
"questions": {
|
|
768
|
+
"type": "array",
|
|
769
|
+
"items": {
|
|
770
|
+
"$ref": "#/$defs/QuestionResult"
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
"head": {
|
|
774
|
+
"$ref": "#/$defs/BoardHead",
|
|
775
|
+
"description": "The head of the board as it stood at close: the result counts exactly its entries."
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
"BoardHead": {
|
|
780
|
+
"title": "BoardHead",
|
|
781
|
+
"description": "A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a document the ballot box signs; whoever keeps a head keeps that whole document.",
|
|
782
|
+
"type": "object",
|
|
783
|
+
"additionalProperties": false,
|
|
784
|
+
"required": [
|
|
785
|
+
"electionId",
|
|
786
|
+
"treeSize",
|
|
787
|
+
"rootHash",
|
|
788
|
+
"issuedAt"
|
|
789
|
+
],
|
|
790
|
+
"properties": {
|
|
791
|
+
"electionId": {
|
|
792
|
+
"$ref": "#/$defs/ElectionId"
|
|
793
|
+
},
|
|
794
|
+
"treeSize": {
|
|
795
|
+
"type": "integer",
|
|
796
|
+
"minimum": 0
|
|
797
|
+
},
|
|
798
|
+
"rootHash": {
|
|
799
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
800
|
+
"description": "The RFC 9162 Merkle tree hash (SHA-256) of the first `treeSize` entries, as a multihash."
|
|
801
|
+
},
|
|
802
|
+
"issuedAt": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"format": "date-time"
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
"DigestMultibase": {
|
|
809
|
+
"title": "DigestMultibase",
|
|
810
|
+
"description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
|
|
811
|
+
"type": "string",
|
|
812
|
+
"minLength": 16,
|
|
813
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
814
|
+
"examples": [
|
|
815
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
816
|
+
]
|
|
817
|
+
},
|
|
818
|
+
"QuestionResult": {
|
|
819
|
+
"title": "QuestionResult",
|
|
820
|
+
"description": "One question's totals. `choice`: selections per option. `ranking`: per option, how many ballots placed it at each position (index 0 = first). `score`: per option, the sum and the number of ballots that scored it. `text`: the answers, in board order, withheld (`withheld: true`) below the manifest's `textReleaseThreshold`. `abstained` counts ballots that left the question unanswered.",
|
|
821
|
+
"type": "object",
|
|
822
|
+
"additionalProperties": false,
|
|
823
|
+
"required": [
|
|
824
|
+
"question",
|
|
825
|
+
"abstained"
|
|
826
|
+
],
|
|
827
|
+
"properties": {
|
|
828
|
+
"question": {
|
|
829
|
+
"$ref": "#/$defs/Key"
|
|
830
|
+
},
|
|
831
|
+
"abstained": {
|
|
832
|
+
"type": "integer",
|
|
833
|
+
"minimum": 0
|
|
834
|
+
},
|
|
835
|
+
"choice": {
|
|
836
|
+
"type": "object",
|
|
837
|
+
"propertyNames": {
|
|
838
|
+
"$ref": "#/$defs/Key"
|
|
839
|
+
},
|
|
840
|
+
"additionalProperties": {
|
|
841
|
+
"type": "integer",
|
|
842
|
+
"minimum": 0
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
"ranking": {
|
|
846
|
+
"type": "object",
|
|
847
|
+
"propertyNames": {
|
|
848
|
+
"$ref": "#/$defs/Key"
|
|
849
|
+
},
|
|
850
|
+
"additionalProperties": {
|
|
851
|
+
"type": "array",
|
|
852
|
+
"items": {
|
|
853
|
+
"type": "integer",
|
|
854
|
+
"minimum": 0
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
"score": {
|
|
859
|
+
"type": "object",
|
|
860
|
+
"propertyNames": {
|
|
861
|
+
"$ref": "#/$defs/Key"
|
|
862
|
+
},
|
|
863
|
+
"additionalProperties": {
|
|
864
|
+
"type": "object",
|
|
865
|
+
"additionalProperties": false,
|
|
866
|
+
"required": [
|
|
867
|
+
"sum",
|
|
868
|
+
"count"
|
|
869
|
+
],
|
|
870
|
+
"properties": {
|
|
871
|
+
"sum": {
|
|
872
|
+
"type": "integer"
|
|
873
|
+
},
|
|
874
|
+
"count": {
|
|
875
|
+
"type": "integer",
|
|
876
|
+
"minimum": 0
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
"text": {
|
|
882
|
+
"type": "array",
|
|
883
|
+
"items": {
|
|
884
|
+
"type": "string",
|
|
885
|
+
"maxLength": 4096
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
"withheld": {
|
|
889
|
+
"type": "boolean"
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
"ElectionState": {
|
|
894
|
+
"title": "ElectionState",
|
|
895
|
+
"type": "string",
|
|
896
|
+
"enum": [
|
|
897
|
+
"registered",
|
|
898
|
+
"registration",
|
|
899
|
+
"voting",
|
|
900
|
+
"closed",
|
|
901
|
+
"tallied",
|
|
902
|
+
"cancelled"
|
|
903
|
+
]
|
|
904
|
+
},
|
|
905
|
+
"Author": {
|
|
906
|
+
"title": "Author",
|
|
907
|
+
"description": "Who proposed an idea or wrote a note, as the board's audience sees them. `entryId` is their directory entry, which survives a rotation of their DID; `name` is their directory display name as this caller may see it, absent where the directory withholds it. A departed member is shown as `formerMember: true` with neither (VTI-BRD-060).",
|
|
908
|
+
"type": "object",
|
|
909
|
+
"additionalProperties": false,
|
|
910
|
+
"properties": {
|
|
911
|
+
"entryId": {
|
|
912
|
+
"$ref": "#/$defs/EntryId"
|
|
913
|
+
},
|
|
914
|
+
"name": {
|
|
915
|
+
"type": "string",
|
|
916
|
+
"minLength": 1,
|
|
917
|
+
"maxLength": 200
|
|
918
|
+
},
|
|
919
|
+
"formerMember": {
|
|
920
|
+
"const": true
|
|
921
|
+
},
|
|
922
|
+
"you": {
|
|
923
|
+
"const": true,
|
|
924
|
+
"description": "Present when the caller is the author."
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
"EntryId": {
|
|
929
|
+
"title": "EntryId",
|
|
930
|
+
"description": "Opaque identifier of one directory entry: `dir_` followed by 16 to 64 base64url characters. Random, scoped to one community, and stable for the life of the membership — it survives a rotation of the member's DID, which is why groups, notes and cards are keyed by it. It MUST NOT be derived from, and MUST NOT reveal, any DID of the member, and the same person's entries in two communities MUST NOT share one. Compared by exact string equality.",
|
|
931
|
+
"type": "string",
|
|
932
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
933
|
+
},
|
|
934
|
+
"Topic": {
|
|
935
|
+
"title": "Topic",
|
|
936
|
+
"type": "string",
|
|
937
|
+
"minLength": 1,
|
|
938
|
+
"maxLength": 64,
|
|
939
|
+
"description": "A topic an idea is filed under. One of the board's `topics` where the board states them."
|
|
940
|
+
},
|
|
941
|
+
"IdeaFormat": {
|
|
942
|
+
"title": "IdeaFormat",
|
|
943
|
+
"type": "string",
|
|
944
|
+
"minLength": 1,
|
|
945
|
+
"maxLength": 32,
|
|
946
|
+
"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."
|
|
947
|
+
},
|
|
948
|
+
"IdeaDescription": {
|
|
949
|
+
"title": "IdeaDescription",
|
|
950
|
+
"type": "string",
|
|
951
|
+
"minLength": 1,
|
|
952
|
+
"maxLength": 4000,
|
|
953
|
+
"description": "What the idea is: for a session, what it covers and who should come. Becomes its election's manifest `description` when accepted. Plain text; a reader MUST NOT treat it as instructions."
|
|
954
|
+
},
|
|
955
|
+
"IdeaTitle": {
|
|
956
|
+
"title": "IdeaTitle",
|
|
957
|
+
"type": "string",
|
|
958
|
+
"minLength": 1,
|
|
959
|
+
"maxLength": 200,
|
|
960
|
+
"description": "An idea's title. Becomes the title of its election's manifest when the idea is accepted, and cannot change after that (VTI-BRD-012). Plain text."
|
|
961
|
+
},
|
|
962
|
+
"IdeaState": {
|
|
963
|
+
"title": "IdeaState",
|
|
964
|
+
"description": "Where an idea stands (VTI-BRD-011).",
|
|
965
|
+
"type": "string",
|
|
966
|
+
"enum": [
|
|
967
|
+
"proposed",
|
|
968
|
+
"open",
|
|
969
|
+
"selected",
|
|
970
|
+
"notSelected",
|
|
971
|
+
"declined",
|
|
972
|
+
"merged",
|
|
973
|
+
"withdrawn"
|
|
974
|
+
]
|
|
975
|
+
},
|
|
976
|
+
"BoardId": {
|
|
977
|
+
"title": "BoardId",
|
|
978
|
+
"description": "Opaque identifier of a board: `brd_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BRD-001).",
|
|
979
|
+
"type": "string",
|
|
980
|
+
"pattern": "^brd_[A-Za-z0-9_-]{16,64}$"
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
};
|
|
984
|
+
/**
|
|
985
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
986
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
987
|
+
* per-specification and cannot be derived from the document alone, and
|
|
988
|
+
* item 2 needs the schema this carries.
|
|
989
|
+
*/
|
|
990
|
+
export const SPEC = {
|
|
991
|
+
typeUri: TYPE_URI,
|
|
992
|
+
isBearer: false,
|
|
993
|
+
isProofRequired: true,
|
|
994
|
+
isRecipientRequired: true,
|
|
995
|
+
isIssuedAtRequired: true,
|
|
996
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
997
|
+
};
|
|
998
|
+
/**
|
|
999
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
1000
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
1001
|
+
* parties (§7.3 item 5).
|
|
1002
|
+
*/
|
|
1003
|
+
export const RESPONSE_SPEC = {
|
|
1004
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
1005
|
+
isBearer: false,
|
|
1006
|
+
isProofRequired: true,
|
|
1007
|
+
isRecipientRequired: true,
|
|
1008
|
+
isIssuedAtRequired: true,
|
|
1009
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
1010
|
+
};
|
|
1011
|
+
//# sourceMappingURL=payload.js.map
|