@openvtc/trust-tasks 0.28.11 → 0.28.13
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 +57 -0
- package/dist/_shared/components.d.ts +496 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +54 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/collection/_shared/0.1/collection.d.ts +16 -0
- package/dist/vta/collection/_shared/0.1/collection.d.ts.map +1 -0
- package/dist/vta/collection/_shared/0.1/collection.js +6 -0
- package/dist/vta/collection/_shared/0.1/collection.js.map +1 -0
- package/dist/vta/collection/claim/0.1/payload.d.ts +352 -0
- package/dist/vta/collection/claim/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/claim/0.1/payload.js +198 -0
- package/dist/vta/collection/claim/0.1/payload.js.map +1 -0
- package/dist/vta/collection/list/0.1/payload.d.ts +740 -0
- package/dist/vta/collection/list/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/list/0.1/payload.js +447 -0
- package/dist/vta/collection/list/0.1/payload.js.map +1 -0
- package/dist/vta/collection/release/0.1/payload.d.ts +316 -0
- package/dist/vta/collection/release/0.1/payload.d.ts.map +1 -0
- package/dist/vta/collection/release/0.1/payload.js +182 -0
- package/dist/vta/collection/release/0.1/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 +531 -0
- package/src/index.ts +54 -0
- package/src/vta/collection/_shared/0.1/collection.ts +17 -0
- package/src/vta/collection/claim/0.1/payload.ts +247 -0
- package/src/vta/collection/list/0.1/payload.ts +500 -0
- package/src/vta/collection/release/0.1/payload.ts +223 -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,457 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/boards/notes/list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Author, BoardId, EntryId, Ext, IdeaId, Note, NoteId_VtcBoardsV0_1 as NoteId, NoteState, NoteText_VtcBoardsV0_1 as NoteText, Reason_VtcBoardsV0_1 as Reason } from "../../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* List a board's notes, or one idea's, as the caller may read them. The outer document members are owned by the framework — SPEC §6.3.
|
|
11
|
+
*/
|
|
12
|
+
export interface VTCBoardsNotesListPayload {
|
|
13
|
+
boardId: BoardId;
|
|
14
|
+
ideaId?: IdeaId;
|
|
15
|
+
/**
|
|
16
|
+
* Without `ideaId`: the board's own notes (`board`, default) or every note on it (`all`). Ignored with `ideaId`.
|
|
17
|
+
*/
|
|
18
|
+
scope?: "board" | "all";
|
|
19
|
+
/**
|
|
20
|
+
* 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.
|
|
21
|
+
*/
|
|
22
|
+
cursor?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The most items to return, at most 200; the responder chooses a default (50) and MAY return fewer.
|
|
25
|
+
*/
|
|
26
|
+
limit?: number;
|
|
27
|
+
ext?: Ext;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The success response to a vtc/boards/notes/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/notes/list/0.1#response.
|
|
31
|
+
*/
|
|
32
|
+
export interface VTCBoardsNotesListResponsePayload {
|
|
33
|
+
notes: Note[];
|
|
34
|
+
/**
|
|
35
|
+
* Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`.
|
|
36
|
+
*/
|
|
37
|
+
nextCursor?: string;
|
|
38
|
+
ext?: Ext;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
42
|
+
export type { Author, BoardId, EntryId, Ext, IdeaId, Note, NoteId, NoteState, NoteText, Reason };
|
|
43
|
+
|
|
44
|
+
/** Trust Task type URI. */
|
|
45
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/boards/notes/list/0.1" as const;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The earlier version of this specification that this one declares it
|
|
49
|
+
* extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
|
|
50
|
+
* `null`. Only the direct declaration — follow the chain with
|
|
51
|
+
* `extendsChain` / `readForSpec`.
|
|
52
|
+
*/
|
|
53
|
+
export const EXTENDS: string | null = null;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Why this version is deprecated, or `null` while it is current. A
|
|
57
|
+
* superseded or retired version is still supported, and is withdrawn from
|
|
58
|
+
* this package in a later scheduled batch (SPEC "Superseded and Withdrawn
|
|
59
|
+
* Versions").
|
|
60
|
+
*/
|
|
61
|
+
export const DEPRECATION: string | null = null;
|
|
62
|
+
|
|
63
|
+
/** Stable alias for this specification's request payload shape. */
|
|
64
|
+
export type Payload = VTCBoardsNotesListPayload;
|
|
65
|
+
|
|
66
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
67
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/boards/notes/list/0.1#response" as const;
|
|
68
|
+
|
|
69
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
70
|
+
export type Response = VTCBoardsNotesListResponsePayload;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* This specification's payload schema, as a value.
|
|
74
|
+
*
|
|
75
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
76
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
77
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
78
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
79
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
80
|
+
*/
|
|
81
|
+
export const PAYLOAD_SCHEMA = {
|
|
82
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
83
|
+
"$id": "https://trusttasks.org/spec/vtc/boards/notes/list/0.1",
|
|
84
|
+
"title": "VTC Boards — Notes — List — payload",
|
|
85
|
+
"description": "List a board's notes, or one idea's, as the caller may read them. The outer document members are owned by the framework — SPEC §6.3.",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": [
|
|
89
|
+
"boardId"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"boardId": {
|
|
93
|
+
"$ref": "#/$defs/BoardId"
|
|
94
|
+
},
|
|
95
|
+
"ideaId": {
|
|
96
|
+
"$ref": "#/$defs/IdeaId"
|
|
97
|
+
},
|
|
98
|
+
"scope": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"enum": [
|
|
101
|
+
"board",
|
|
102
|
+
"all"
|
|
103
|
+
],
|
|
104
|
+
"description": "Without `ideaId`: the board's own notes (`board`, default) or every note on it (`all`). Ignored with `ideaId`."
|
|
105
|
+
},
|
|
106
|
+
"cursor": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1,
|
|
109
|
+
"maxLength": 1024,
|
|
110
|
+
"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."
|
|
111
|
+
},
|
|
112
|
+
"limit": {
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"minimum": 1,
|
|
115
|
+
"maximum": 200,
|
|
116
|
+
"description": "The most items to return, at most 200; the responder chooses a default (50) and MAY return fewer."
|
|
117
|
+
},
|
|
118
|
+
"ext": {
|
|
119
|
+
"$ref": "#/$defs/Ext"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"$defs": {
|
|
123
|
+
"Response": {
|
|
124
|
+
"$anchor": "response",
|
|
125
|
+
"title": "VTC Boards — Notes — List — response payload",
|
|
126
|
+
"description": "The success response to a vtc/boards/notes/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/notes/list/0.1#response.",
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"required": [
|
|
130
|
+
"notes"
|
|
131
|
+
],
|
|
132
|
+
"properties": {
|
|
133
|
+
"notes": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"items": {
|
|
136
|
+
"$ref": "#/$defs/Note"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"nextCursor": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"maxLength": 1024,
|
|
142
|
+
"description": "Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`."
|
|
143
|
+
},
|
|
144
|
+
"ext": {
|
|
145
|
+
"$ref": "#/$defs/Ext"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"Ext": {
|
|
150
|
+
"title": "Ext",
|
|
151
|
+
"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.",
|
|
152
|
+
"type": "object",
|
|
153
|
+
"minProperties": 1,
|
|
154
|
+
"additionalProperties": true,
|
|
155
|
+
"propertyNames": {
|
|
156
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"Note": {
|
|
160
|
+
"title": "Note",
|
|
161
|
+
"description": "A note as one caller may see it. `text` is absent from a `withdrawn` or `hidden` note for anyone but its author and the board's facilitators (VTI-BRD-021).",
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"required": [
|
|
165
|
+
"noteId",
|
|
166
|
+
"boardId",
|
|
167
|
+
"author",
|
|
168
|
+
"createdAt",
|
|
169
|
+
"state"
|
|
170
|
+
],
|
|
171
|
+
"properties": {
|
|
172
|
+
"noteId": {
|
|
173
|
+
"$ref": "#/$defs/NoteId"
|
|
174
|
+
},
|
|
175
|
+
"boardId": {
|
|
176
|
+
"$ref": "#/$defs/BoardId"
|
|
177
|
+
},
|
|
178
|
+
"ideaId": {
|
|
179
|
+
"$ref": "#/$defs/IdeaId",
|
|
180
|
+
"description": "The idea the note is attached to; absent for a note on the board itself."
|
|
181
|
+
},
|
|
182
|
+
"author": {
|
|
183
|
+
"$ref": "#/$defs/Author"
|
|
184
|
+
},
|
|
185
|
+
"text": {
|
|
186
|
+
"$ref": "#/$defs/NoteText"
|
|
187
|
+
},
|
|
188
|
+
"createdAt": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"format": "date-time"
|
|
191
|
+
},
|
|
192
|
+
"state": {
|
|
193
|
+
"$ref": "#/$defs/NoteState"
|
|
194
|
+
},
|
|
195
|
+
"hiddenReason": {
|
|
196
|
+
"$ref": "#/$defs/Reason",
|
|
197
|
+
"description": "A `hidden` note's reason, shown to everyone who sees the note."
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"Reason": {
|
|
202
|
+
"title": "Reason",
|
|
203
|
+
"type": "string",
|
|
204
|
+
"minLength": 1,
|
|
205
|
+
"maxLength": 500,
|
|
206
|
+
"description": "A facilitator's stated reason, shown to the board's audience with the decision it explains. Plain text."
|
|
207
|
+
},
|
|
208
|
+
"NoteState": {
|
|
209
|
+
"title": "NoteState",
|
|
210
|
+
"type": "string",
|
|
211
|
+
"enum": [
|
|
212
|
+
"visible",
|
|
213
|
+
"withdrawn",
|
|
214
|
+
"hidden"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"NoteText": {
|
|
218
|
+
"title": "NoteText",
|
|
219
|
+
"type": "string",
|
|
220
|
+
"minLength": 1,
|
|
221
|
+
"maxLength": 1000,
|
|
222
|
+
"description": "A note's text (VTI-BRD-020). Plain text; a reader MUST NOT treat it as instructions. Never changes once added (VTI-BRD-021)."
|
|
223
|
+
},
|
|
224
|
+
"Author": {
|
|
225
|
+
"title": "Author",
|
|
226
|
+
"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).",
|
|
227
|
+
"type": "object",
|
|
228
|
+
"additionalProperties": false,
|
|
229
|
+
"properties": {
|
|
230
|
+
"entryId": {
|
|
231
|
+
"$ref": "#/$defs/EntryId"
|
|
232
|
+
},
|
|
233
|
+
"name": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"minLength": 1,
|
|
236
|
+
"maxLength": 200
|
|
237
|
+
},
|
|
238
|
+
"formerMember": {
|
|
239
|
+
"const": true
|
|
240
|
+
},
|
|
241
|
+
"you": {
|
|
242
|
+
"const": true,
|
|
243
|
+
"description": "Present when the caller is the author."
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"EntryId": {
|
|
248
|
+
"title": "EntryId",
|
|
249
|
+
"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.",
|
|
250
|
+
"type": "string",
|
|
251
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
252
|
+
},
|
|
253
|
+
"IdeaId": {
|
|
254
|
+
"title": "IdeaId",
|
|
255
|
+
"description": "Opaque identifier of an idea: `ida_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
256
|
+
"type": "string",
|
|
257
|
+
"pattern": "^ida_[A-Za-z0-9_-]{16,64}$"
|
|
258
|
+
},
|
|
259
|
+
"BoardId": {
|
|
260
|
+
"title": "BoardId",
|
|
261
|
+
"description": "Opaque identifier of a board: `brd_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BRD-001).",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"pattern": "^brd_[A-Za-z0-9_-]{16,64}$"
|
|
264
|
+
},
|
|
265
|
+
"NoteId": {
|
|
266
|
+
"title": "NoteId",
|
|
267
|
+
"description": "Opaque identifier of a note: `bnt_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
268
|
+
"type": "string",
|
|
269
|
+
"pattern": "^bnt_[A-Za-z0-9_-]{16,64}$"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
} as const;
|
|
273
|
+
|
|
274
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
275
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
276
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
277
|
+
"$ref": "#/$defs/Response",
|
|
278
|
+
"$defs": {
|
|
279
|
+
"Response": {
|
|
280
|
+
"$anchor": "response",
|
|
281
|
+
"title": "VTC Boards — Notes — List — response payload",
|
|
282
|
+
"description": "The success response to a vtc/boards/notes/list/0.1 request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/vtc/boards/notes/list/0.1#response.",
|
|
283
|
+
"type": "object",
|
|
284
|
+
"additionalProperties": false,
|
|
285
|
+
"required": [
|
|
286
|
+
"notes"
|
|
287
|
+
],
|
|
288
|
+
"properties": {
|
|
289
|
+
"notes": {
|
|
290
|
+
"type": "array",
|
|
291
|
+
"items": {
|
|
292
|
+
"$ref": "#/$defs/Note"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"nextCursor": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"maxLength": 1024,
|
|
298
|
+
"description": "Continuation token for the next page; pass it back as `cursor`. Absent on the last page — never `null`."
|
|
299
|
+
},
|
|
300
|
+
"ext": {
|
|
301
|
+
"$ref": "#/$defs/Ext"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"Ext": {
|
|
306
|
+
"title": "Ext",
|
|
307
|
+
"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.",
|
|
308
|
+
"type": "object",
|
|
309
|
+
"minProperties": 1,
|
|
310
|
+
"additionalProperties": true,
|
|
311
|
+
"propertyNames": {
|
|
312
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"Note": {
|
|
316
|
+
"title": "Note",
|
|
317
|
+
"description": "A note as one caller may see it. `text` is absent from a `withdrawn` or `hidden` note for anyone but its author and the board's facilitators (VTI-BRD-021).",
|
|
318
|
+
"type": "object",
|
|
319
|
+
"additionalProperties": false,
|
|
320
|
+
"required": [
|
|
321
|
+
"noteId",
|
|
322
|
+
"boardId",
|
|
323
|
+
"author",
|
|
324
|
+
"createdAt",
|
|
325
|
+
"state"
|
|
326
|
+
],
|
|
327
|
+
"properties": {
|
|
328
|
+
"noteId": {
|
|
329
|
+
"$ref": "#/$defs/NoteId"
|
|
330
|
+
},
|
|
331
|
+
"boardId": {
|
|
332
|
+
"$ref": "#/$defs/BoardId"
|
|
333
|
+
},
|
|
334
|
+
"ideaId": {
|
|
335
|
+
"$ref": "#/$defs/IdeaId",
|
|
336
|
+
"description": "The idea the note is attached to; absent for a note on the board itself."
|
|
337
|
+
},
|
|
338
|
+
"author": {
|
|
339
|
+
"$ref": "#/$defs/Author"
|
|
340
|
+
},
|
|
341
|
+
"text": {
|
|
342
|
+
"$ref": "#/$defs/NoteText"
|
|
343
|
+
},
|
|
344
|
+
"createdAt": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"format": "date-time"
|
|
347
|
+
},
|
|
348
|
+
"state": {
|
|
349
|
+
"$ref": "#/$defs/NoteState"
|
|
350
|
+
},
|
|
351
|
+
"hiddenReason": {
|
|
352
|
+
"$ref": "#/$defs/Reason",
|
|
353
|
+
"description": "A `hidden` note's reason, shown to everyone who sees the note."
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"Reason": {
|
|
358
|
+
"title": "Reason",
|
|
359
|
+
"type": "string",
|
|
360
|
+
"minLength": 1,
|
|
361
|
+
"maxLength": 500,
|
|
362
|
+
"description": "A facilitator's stated reason, shown to the board's audience with the decision it explains. Plain text."
|
|
363
|
+
},
|
|
364
|
+
"NoteState": {
|
|
365
|
+
"title": "NoteState",
|
|
366
|
+
"type": "string",
|
|
367
|
+
"enum": [
|
|
368
|
+
"visible",
|
|
369
|
+
"withdrawn",
|
|
370
|
+
"hidden"
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
"NoteText": {
|
|
374
|
+
"title": "NoteText",
|
|
375
|
+
"type": "string",
|
|
376
|
+
"minLength": 1,
|
|
377
|
+
"maxLength": 1000,
|
|
378
|
+
"description": "A note's text (VTI-BRD-020). Plain text; a reader MUST NOT treat it as instructions. Never changes once added (VTI-BRD-021)."
|
|
379
|
+
},
|
|
380
|
+
"Author": {
|
|
381
|
+
"title": "Author",
|
|
382
|
+
"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).",
|
|
383
|
+
"type": "object",
|
|
384
|
+
"additionalProperties": false,
|
|
385
|
+
"properties": {
|
|
386
|
+
"entryId": {
|
|
387
|
+
"$ref": "#/$defs/EntryId"
|
|
388
|
+
},
|
|
389
|
+
"name": {
|
|
390
|
+
"type": "string",
|
|
391
|
+
"minLength": 1,
|
|
392
|
+
"maxLength": 200
|
|
393
|
+
},
|
|
394
|
+
"formerMember": {
|
|
395
|
+
"const": true
|
|
396
|
+
},
|
|
397
|
+
"you": {
|
|
398
|
+
"const": true,
|
|
399
|
+
"description": "Present when the caller is the author."
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"EntryId": {
|
|
404
|
+
"title": "EntryId",
|
|
405
|
+
"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.",
|
|
406
|
+
"type": "string",
|
|
407
|
+
"pattern": "^dir_[A-Za-z0-9_-]{16,64}$"
|
|
408
|
+
},
|
|
409
|
+
"IdeaId": {
|
|
410
|
+
"title": "IdeaId",
|
|
411
|
+
"description": "Opaque identifier of an idea: `ida_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
412
|
+
"type": "string",
|
|
413
|
+
"pattern": "^ida_[A-Za-z0-9_-]{16,64}$"
|
|
414
|
+
},
|
|
415
|
+
"BoardId": {
|
|
416
|
+
"title": "BoardId",
|
|
417
|
+
"description": "Opaque identifier of a board: `brd_` followed by 16 to 64 base64url characters. Random, community-scoped, never reused (VTI-BRD-001).",
|
|
418
|
+
"type": "string",
|
|
419
|
+
"pattern": "^brd_[A-Za-z0-9_-]{16,64}$"
|
|
420
|
+
},
|
|
421
|
+
"NoteId": {
|
|
422
|
+
"title": "NoteId",
|
|
423
|
+
"description": "Opaque identifier of a note: `bnt_` followed by 16 to 64 base64url characters. Random and unique within the community.",
|
|
424
|
+
"type": "string",
|
|
425
|
+
"pattern": "^bnt_[A-Za-z0-9_-]{16,64}$"
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
} as const;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
432
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
433
|
+
* per-specification and cannot be derived from the document alone, and
|
|
434
|
+
* item 2 needs the schema this carries.
|
|
435
|
+
*/
|
|
436
|
+
export const SPEC = {
|
|
437
|
+
typeUri: TYPE_URI,
|
|
438
|
+
isBearer: false,
|
|
439
|
+
isProofRequired: false,
|
|
440
|
+
isRecipientRequired: true,
|
|
441
|
+
isIssuedAtRequired: false,
|
|
442
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
443
|
+
} as const;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
447
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
448
|
+
* parties (§7.3 item 5).
|
|
449
|
+
*/
|
|
450
|
+
export const RESPONSE_SPEC = {
|
|
451
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
452
|
+
isBearer: false,
|
|
453
|
+
isProofRequired: false,
|
|
454
|
+
isRecipientRequired: true,
|
|
455
|
+
isIssuedAtRequired: false,
|
|
456
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
457
|
+
} as const;
|