@semiont/core 0.5.2 → 0.5.4
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/dist/annotation-assembly.d.ts +54 -0
- package/dist/annotation-assembly.d.ts.map +1 -0
- package/dist/annotation-types.d.ts +30 -0
- package/dist/annotation-types.d.ts.map +1 -0
- package/dist/annotation-utils.d.ts +43 -0
- package/dist/annotation-utils.d.ts.map +1 -0
- package/dist/auth-types.d.ts +8 -0
- package/dist/auth-types.d.ts.map +1 -0
- package/dist/branded-types.d.ts +70 -0
- package/dist/branded-types.d.ts.map +1 -0
- package/dist/bridged-channels.d.ts +18 -0
- package/dist/bridged-channels.d.ts.map +1 -0
- package/dist/bus-log.d.ts +25 -0
- package/dist/bus-log.d.ts.map +1 -0
- package/dist/bus-protocol.d.ts +510 -0
- package/dist/bus-protocol.d.ts.map +1 -0
- package/dist/{config.types-oPv3Ajk-.d.ts → config/config.types.d.ts} +25 -23
- package/dist/config/config.types.d.ts.map +1 -0
- package/dist/config/configuration-error.d.ts +17 -0
- package/dist/config/configuration-error.d.ts.map +1 -0
- package/dist/config/environment-validator.d.ts +28 -0
- package/dist/config/environment-validator.d.ts.map +1 -0
- package/dist/config/node-config-loader.d.ts +4 -74
- package/dist/config/node-config-loader.d.ts.map +1 -0
- package/dist/config/platform-types.d.ts +26 -0
- package/dist/config/platform-types.d.ts.map +1 -0
- package/dist/config/toml-loader.d.ts +59 -0
- package/dist/config/toml-loader.d.ts.map +1 -0
- package/dist/did-utils.d.ts +76 -0
- package/dist/did-utils.d.ts.map +1 -0
- package/dist/errors.d.ts +48 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/event-base.d.ts +70 -0
- package/dist/event-base.d.ts.map +1 -0
- package/dist/event-bus.d.ts +141 -0
- package/dist/event-bus.d.ts.map +1 -0
- package/dist/event-utils.d.ts +43 -0
- package/dist/event-utils.d.ts.map +1 -0
- package/dist/fuzzy-anchor.d.ts +81 -0
- package/dist/fuzzy-anchor.d.ts.map +1 -0
- package/dist/graph.d.ts +44 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/id-generation.d.ts +8 -0
- package/dist/id-generation.d.ts.map +1 -0
- package/dist/identifiers.d.ts +24 -0
- package/dist/identifiers.d.ts.map +1 -0
- package/dist/index.d.ts +59 -5961
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -20
- package/dist/index.js.map +1 -1
- package/dist/locales.d.ts +31 -0
- package/dist/locales.d.ts.map +1 -0
- package/dist/logger.d.ts +56 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/mime-utils.d.ts +38 -0
- package/dist/mime-utils.d.ts.map +1 -0
- package/dist/operators/burst-buffer.d.ts +61 -0
- package/dist/operators/burst-buffer.d.ts.map +1 -0
- package/dist/payload-types.d.ts +16 -0
- package/dist/payload-types.d.ts.map +1 -0
- package/dist/persisted-events.d.ts +76 -0
- package/dist/persisted-events.d.ts.map +1 -0
- package/dist/project.d.ts +69 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/resource-types.d.ts +15 -0
- package/dist/resource-types.d.ts.map +1 -0
- package/dist/resource-utils.d.ts +97 -0
- package/dist/resource-utils.d.ts.map +1 -0
- package/dist/serialize-per-key.d.ts +51 -0
- package/dist/serialize-per-key.d.ts.map +1 -0
- package/dist/svg-utils.d.ts +44 -0
- package/dist/svg-utils.d.ts.map +1 -0
- package/dist/tag-schemas.d.ts +27 -0
- package/dist/tag-schemas.d.ts.map +1 -0
- package/dist/text-context.d.ts +85 -0
- package/dist/text-context.d.ts.map +1 -0
- package/dist/text-encoding.d.ts +34 -0
- package/dist/text-encoding.d.ts.map +1 -0
- package/dist/transport.d.ts +274 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/type-guards.d.ts +44 -0
- package/dist/type-guards.d.ts.map +1 -0
- package/dist/types.d.ts +3517 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/validation.d.ts +57 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/web-annotation-utils.d.ts +154 -0
- package/dist/web-annotation-utils.d.ts.map +1 -0
- package/package.json +3 -3
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,3517 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/api/health": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Health Check
|
|
15
|
+
* @description Check if the API is operational and database is connected
|
|
16
|
+
*/
|
|
17
|
+
get: {
|
|
18
|
+
parameters: {
|
|
19
|
+
query?: never;
|
|
20
|
+
header?: never;
|
|
21
|
+
path?: never;
|
|
22
|
+
cookie?: never;
|
|
23
|
+
};
|
|
24
|
+
requestBody?: never;
|
|
25
|
+
responses: {
|
|
26
|
+
/** @description Health status of the API */
|
|
27
|
+
200: {
|
|
28
|
+
headers: {
|
|
29
|
+
[name: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
content: {
|
|
32
|
+
"application/json": components["schemas"]["HealthResponse"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
put?: never;
|
|
38
|
+
post?: never;
|
|
39
|
+
delete?: never;
|
|
40
|
+
options?: never;
|
|
41
|
+
head?: never;
|
|
42
|
+
patch?: never;
|
|
43
|
+
trace?: never;
|
|
44
|
+
};
|
|
45
|
+
"/api/tokens/password": {
|
|
46
|
+
parameters: {
|
|
47
|
+
query?: never;
|
|
48
|
+
header?: never;
|
|
49
|
+
path?: never;
|
|
50
|
+
cookie?: never;
|
|
51
|
+
};
|
|
52
|
+
get?: never;
|
|
53
|
+
put?: never;
|
|
54
|
+
/**
|
|
55
|
+
* Password Authentication
|
|
56
|
+
* @description Authenticate with email and password for users with password provider
|
|
57
|
+
*/
|
|
58
|
+
post: {
|
|
59
|
+
parameters: {
|
|
60
|
+
query?: never;
|
|
61
|
+
header?: never;
|
|
62
|
+
path?: never;
|
|
63
|
+
cookie?: never;
|
|
64
|
+
};
|
|
65
|
+
requestBody: {
|
|
66
|
+
content: {
|
|
67
|
+
"application/json": components["schemas"]["PasswordAuthRequest"];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
responses: {
|
|
71
|
+
/** @description Authentication successful */
|
|
72
|
+
200: {
|
|
73
|
+
headers: {
|
|
74
|
+
[name: string]: unknown;
|
|
75
|
+
};
|
|
76
|
+
content: {
|
|
77
|
+
"application/json": components["schemas"]["AuthResponse"];
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
/** @description Bad request - invalid input or OAuth user attempting password auth */
|
|
81
|
+
400: {
|
|
82
|
+
headers: {
|
|
83
|
+
[name: string]: unknown;
|
|
84
|
+
};
|
|
85
|
+
content: {
|
|
86
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
/** @description Unauthorized - invalid credentials */
|
|
90
|
+
401: {
|
|
91
|
+
headers: {
|
|
92
|
+
[name: string]: unknown;
|
|
93
|
+
};
|
|
94
|
+
content: {
|
|
95
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
/** @description Forbidden - account not active */
|
|
99
|
+
403: {
|
|
100
|
+
headers: {
|
|
101
|
+
[name: string]: unknown;
|
|
102
|
+
};
|
|
103
|
+
content: {
|
|
104
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
delete?: never;
|
|
110
|
+
options?: never;
|
|
111
|
+
head?: never;
|
|
112
|
+
patch?: never;
|
|
113
|
+
trace?: never;
|
|
114
|
+
};
|
|
115
|
+
"/api/tokens/google": {
|
|
116
|
+
parameters: {
|
|
117
|
+
query?: never;
|
|
118
|
+
header?: never;
|
|
119
|
+
path?: never;
|
|
120
|
+
cookie?: never;
|
|
121
|
+
};
|
|
122
|
+
get?: never;
|
|
123
|
+
put?: never;
|
|
124
|
+
/**
|
|
125
|
+
* Google OAuth Authentication
|
|
126
|
+
* @description Authenticate with Google OAuth access token
|
|
127
|
+
*/
|
|
128
|
+
post: {
|
|
129
|
+
parameters: {
|
|
130
|
+
query?: never;
|
|
131
|
+
header?: never;
|
|
132
|
+
path?: never;
|
|
133
|
+
cookie?: never;
|
|
134
|
+
};
|
|
135
|
+
requestBody?: {
|
|
136
|
+
content: {
|
|
137
|
+
"application/json": components["schemas"]["GoogleAuthRequest"];
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
responses: {
|
|
141
|
+
/** @description Successful authentication */
|
|
142
|
+
200: {
|
|
143
|
+
headers: {
|
|
144
|
+
[name: string]: unknown;
|
|
145
|
+
};
|
|
146
|
+
content: {
|
|
147
|
+
"application/json": components["schemas"]["AuthResponse"];
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
/** @description Invalid request or authentication failed */
|
|
151
|
+
400: {
|
|
152
|
+
headers: {
|
|
153
|
+
[name: string]: unknown;
|
|
154
|
+
};
|
|
155
|
+
content: {
|
|
156
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
delete?: never;
|
|
162
|
+
options?: never;
|
|
163
|
+
head?: never;
|
|
164
|
+
patch?: never;
|
|
165
|
+
trace?: never;
|
|
166
|
+
};
|
|
167
|
+
"/api/tokens/refresh": {
|
|
168
|
+
parameters: {
|
|
169
|
+
query?: never;
|
|
170
|
+
header?: never;
|
|
171
|
+
path?: never;
|
|
172
|
+
cookie?: never;
|
|
173
|
+
};
|
|
174
|
+
get?: never;
|
|
175
|
+
put?: never;
|
|
176
|
+
/**
|
|
177
|
+
* Refresh Access Token
|
|
178
|
+
* @description Exchange a refresh token for a new access token
|
|
179
|
+
*/
|
|
180
|
+
post: {
|
|
181
|
+
parameters: {
|
|
182
|
+
query?: never;
|
|
183
|
+
header?: never;
|
|
184
|
+
path?: never;
|
|
185
|
+
cookie?: never;
|
|
186
|
+
};
|
|
187
|
+
requestBody?: {
|
|
188
|
+
content: {
|
|
189
|
+
"application/json": components["schemas"]["TokenRefreshRequest"];
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
responses: {
|
|
193
|
+
/** @description New access token generated */
|
|
194
|
+
200: {
|
|
195
|
+
headers: {
|
|
196
|
+
[name: string]: unknown;
|
|
197
|
+
};
|
|
198
|
+
content: {
|
|
199
|
+
"application/json": components["schemas"]["TokenRefreshResponse"];
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
/** @description Invalid or expired refresh token */
|
|
203
|
+
401: {
|
|
204
|
+
headers: {
|
|
205
|
+
[name: string]: unknown;
|
|
206
|
+
};
|
|
207
|
+
content: {
|
|
208
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
delete?: never;
|
|
214
|
+
options?: never;
|
|
215
|
+
head?: never;
|
|
216
|
+
patch?: never;
|
|
217
|
+
trace?: never;
|
|
218
|
+
};
|
|
219
|
+
"/api/tokens/mcp-generate": {
|
|
220
|
+
parameters: {
|
|
221
|
+
query?: never;
|
|
222
|
+
header?: never;
|
|
223
|
+
path?: never;
|
|
224
|
+
cookie?: never;
|
|
225
|
+
};
|
|
226
|
+
get?: never;
|
|
227
|
+
put?: never;
|
|
228
|
+
/**
|
|
229
|
+
* Generate MCP Token
|
|
230
|
+
* @description Generate a short-lived token for MCP server
|
|
231
|
+
*/
|
|
232
|
+
post: {
|
|
233
|
+
parameters: {
|
|
234
|
+
query?: never;
|
|
235
|
+
header?: never;
|
|
236
|
+
path?: never;
|
|
237
|
+
cookie?: never;
|
|
238
|
+
};
|
|
239
|
+
requestBody?: never;
|
|
240
|
+
responses: {
|
|
241
|
+
/** @description MCP token generated */
|
|
242
|
+
200: {
|
|
243
|
+
headers: {
|
|
244
|
+
[name: string]: unknown;
|
|
245
|
+
};
|
|
246
|
+
content: {
|
|
247
|
+
"application/json": components["schemas"]["MCPGenerateResponse"];
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
/** @description Unauthorized */
|
|
251
|
+
401: {
|
|
252
|
+
headers: {
|
|
253
|
+
[name: string]: unknown;
|
|
254
|
+
};
|
|
255
|
+
content: {
|
|
256
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
delete?: never;
|
|
262
|
+
options?: never;
|
|
263
|
+
head?: never;
|
|
264
|
+
patch?: never;
|
|
265
|
+
trace?: never;
|
|
266
|
+
};
|
|
267
|
+
"/api/tokens/media": {
|
|
268
|
+
parameters: {
|
|
269
|
+
query?: never;
|
|
270
|
+
header?: never;
|
|
271
|
+
path?: never;
|
|
272
|
+
cookie?: never;
|
|
273
|
+
};
|
|
274
|
+
get?: never;
|
|
275
|
+
put?: never;
|
|
276
|
+
/**
|
|
277
|
+
* Generate Media Token
|
|
278
|
+
* @description Generate a short-lived, resource-scoped media token for use as a ?token= query parameter on binary resource URLs (images, PDFs). Requires session authentication.
|
|
279
|
+
*/
|
|
280
|
+
post: {
|
|
281
|
+
parameters: {
|
|
282
|
+
query?: never;
|
|
283
|
+
header?: never;
|
|
284
|
+
path?: never;
|
|
285
|
+
cookie?: never;
|
|
286
|
+
};
|
|
287
|
+
requestBody: {
|
|
288
|
+
content: {
|
|
289
|
+
"application/json": components["schemas"]["MediaTokenRequest"];
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
responses: {
|
|
293
|
+
/** @description Media token generated */
|
|
294
|
+
200: {
|
|
295
|
+
headers: {
|
|
296
|
+
[name: string]: unknown;
|
|
297
|
+
};
|
|
298
|
+
content: {
|
|
299
|
+
"application/json": components["schemas"]["MediaTokenResponse"];
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
/** @description Unauthorized */
|
|
303
|
+
401: {
|
|
304
|
+
headers: {
|
|
305
|
+
[name: string]: unknown;
|
|
306
|
+
};
|
|
307
|
+
content: {
|
|
308
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
delete?: never;
|
|
314
|
+
options?: never;
|
|
315
|
+
head?: never;
|
|
316
|
+
patch?: never;
|
|
317
|
+
trace?: never;
|
|
318
|
+
};
|
|
319
|
+
"/api/tokens/agent": {
|
|
320
|
+
parameters: {
|
|
321
|
+
query?: never;
|
|
322
|
+
header?: never;
|
|
323
|
+
path?: never;
|
|
324
|
+
cookie?: never;
|
|
325
|
+
};
|
|
326
|
+
get?: never;
|
|
327
|
+
put?: never;
|
|
328
|
+
/**
|
|
329
|
+
* Software-Agent Token Exchange
|
|
330
|
+
* @description Exchange the shared secret plus an inference (provider, model) pair for a bearer JWT issued for that agent identity. Used by worker processes that emit on behalf of one or more software peers.
|
|
331
|
+
*
|
|
332
|
+
* The issued JWT carries the agent's DID (shape `did:web:<host>:agents:<provider>:<model>`); the bus stamps that DID onto `_userId` so events the agent emits attribute to the agent rather than to a generic worker pool.
|
|
333
|
+
*/
|
|
334
|
+
post: {
|
|
335
|
+
parameters: {
|
|
336
|
+
query?: never;
|
|
337
|
+
header?: never;
|
|
338
|
+
path?: never;
|
|
339
|
+
cookie?: never;
|
|
340
|
+
};
|
|
341
|
+
requestBody: {
|
|
342
|
+
content: {
|
|
343
|
+
"application/json": {
|
|
344
|
+
/** @description The shared secret (SEMIONT_WORKER_SECRET) */
|
|
345
|
+
secret: string;
|
|
346
|
+
/** @description Inference provider (e.g. ollama, anthropic) */
|
|
347
|
+
provider: string;
|
|
348
|
+
/** @description Model identifier (e.g. gemma2:27b, claude-3-5-sonnet) */
|
|
349
|
+
model: string;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
responses: {
|
|
354
|
+
/** @description Token issued */
|
|
355
|
+
200: {
|
|
356
|
+
headers: {
|
|
357
|
+
[name: string]: unknown;
|
|
358
|
+
};
|
|
359
|
+
content: {
|
|
360
|
+
"application/json": {
|
|
361
|
+
/** @description Bearer JWT for subsequent authenticated requests */
|
|
362
|
+
token: string;
|
|
363
|
+
/** @description DID of the software-agent identity the token is acting as */
|
|
364
|
+
did: string;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
/** @description Missing or invalid request fields */
|
|
369
|
+
400: {
|
|
370
|
+
headers: {
|
|
371
|
+
[name: string]: unknown;
|
|
372
|
+
};
|
|
373
|
+
content: {
|
|
374
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
/** @description Invalid agent secret */
|
|
378
|
+
401: {
|
|
379
|
+
headers: {
|
|
380
|
+
[name: string]: unknown;
|
|
381
|
+
};
|
|
382
|
+
content: {
|
|
383
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
/** @description Agent authentication not configured */
|
|
387
|
+
503: {
|
|
388
|
+
headers: {
|
|
389
|
+
[name: string]: unknown;
|
|
390
|
+
};
|
|
391
|
+
content: {
|
|
392
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
delete?: never;
|
|
398
|
+
options?: never;
|
|
399
|
+
head?: never;
|
|
400
|
+
patch?: never;
|
|
401
|
+
trace?: never;
|
|
402
|
+
};
|
|
403
|
+
"/api/users/me": {
|
|
404
|
+
parameters: {
|
|
405
|
+
query?: never;
|
|
406
|
+
header?: never;
|
|
407
|
+
path?: never;
|
|
408
|
+
cookie?: never;
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* Get Current User
|
|
412
|
+
* @description Get information about the authenticated user
|
|
413
|
+
*/
|
|
414
|
+
get: {
|
|
415
|
+
parameters: {
|
|
416
|
+
query?: never;
|
|
417
|
+
header?: never;
|
|
418
|
+
path?: never;
|
|
419
|
+
cookie?: never;
|
|
420
|
+
};
|
|
421
|
+
requestBody?: never;
|
|
422
|
+
responses: {
|
|
423
|
+
/** @description User information */
|
|
424
|
+
200: {
|
|
425
|
+
headers: {
|
|
426
|
+
[name: string]: unknown;
|
|
427
|
+
};
|
|
428
|
+
content: {
|
|
429
|
+
"application/json": components["schemas"]["UserResponse"];
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
/** @description Unauthorized */
|
|
433
|
+
401: {
|
|
434
|
+
headers: {
|
|
435
|
+
[name: string]: unknown;
|
|
436
|
+
};
|
|
437
|
+
content: {
|
|
438
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
put?: never;
|
|
444
|
+
post?: never;
|
|
445
|
+
delete?: never;
|
|
446
|
+
options?: never;
|
|
447
|
+
head?: never;
|
|
448
|
+
patch?: never;
|
|
449
|
+
trace?: never;
|
|
450
|
+
};
|
|
451
|
+
"/api/users/accept-terms": {
|
|
452
|
+
parameters: {
|
|
453
|
+
query?: never;
|
|
454
|
+
header?: never;
|
|
455
|
+
path?: never;
|
|
456
|
+
cookie?: never;
|
|
457
|
+
};
|
|
458
|
+
get?: never;
|
|
459
|
+
put?: never;
|
|
460
|
+
/**
|
|
461
|
+
* Accept Terms
|
|
462
|
+
* @description Mark terms as accepted for the current user
|
|
463
|
+
*/
|
|
464
|
+
post: {
|
|
465
|
+
parameters: {
|
|
466
|
+
query?: never;
|
|
467
|
+
header?: never;
|
|
468
|
+
path?: never;
|
|
469
|
+
cookie?: never;
|
|
470
|
+
};
|
|
471
|
+
requestBody?: never;
|
|
472
|
+
responses: {
|
|
473
|
+
/** @description Terms accepted successfully */
|
|
474
|
+
200: {
|
|
475
|
+
headers: {
|
|
476
|
+
[name: string]: unknown;
|
|
477
|
+
};
|
|
478
|
+
content: {
|
|
479
|
+
"application/json": components["schemas"]["AcceptTermsResponse"];
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
/** @description Unauthorized */
|
|
483
|
+
401: {
|
|
484
|
+
headers: {
|
|
485
|
+
[name: string]: unknown;
|
|
486
|
+
};
|
|
487
|
+
content: {
|
|
488
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
delete?: never;
|
|
494
|
+
options?: never;
|
|
495
|
+
head?: never;
|
|
496
|
+
patch?: never;
|
|
497
|
+
trace?: never;
|
|
498
|
+
};
|
|
499
|
+
"/api/users/logout": {
|
|
500
|
+
parameters: {
|
|
501
|
+
query?: never;
|
|
502
|
+
header?: never;
|
|
503
|
+
path?: never;
|
|
504
|
+
cookie?: never;
|
|
505
|
+
};
|
|
506
|
+
get?: never;
|
|
507
|
+
put?: never;
|
|
508
|
+
/**
|
|
509
|
+
* Logout
|
|
510
|
+
* @description Logout the current user
|
|
511
|
+
*/
|
|
512
|
+
post: {
|
|
513
|
+
parameters: {
|
|
514
|
+
query?: never;
|
|
515
|
+
header?: never;
|
|
516
|
+
path?: never;
|
|
517
|
+
cookie?: never;
|
|
518
|
+
};
|
|
519
|
+
requestBody?: never;
|
|
520
|
+
responses: {
|
|
521
|
+
/** @description Logged out successfully */
|
|
522
|
+
200: {
|
|
523
|
+
headers: {
|
|
524
|
+
[name: string]: unknown;
|
|
525
|
+
};
|
|
526
|
+
content: {
|
|
527
|
+
"application/json": components["schemas"]["AcceptTermsResponse"];
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
delete?: never;
|
|
533
|
+
options?: never;
|
|
534
|
+
head?: never;
|
|
535
|
+
patch?: never;
|
|
536
|
+
trace?: never;
|
|
537
|
+
};
|
|
538
|
+
"/api/status": {
|
|
539
|
+
parameters: {
|
|
540
|
+
query?: never;
|
|
541
|
+
header?: never;
|
|
542
|
+
path?: never;
|
|
543
|
+
cookie?: never;
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Get Service Status
|
|
547
|
+
* @description Get service status and feature availability
|
|
548
|
+
*/
|
|
549
|
+
get: {
|
|
550
|
+
parameters: {
|
|
551
|
+
query?: never;
|
|
552
|
+
header?: never;
|
|
553
|
+
path?: never;
|
|
554
|
+
cookie?: never;
|
|
555
|
+
};
|
|
556
|
+
requestBody?: never;
|
|
557
|
+
responses: {
|
|
558
|
+
/** @description Service status information */
|
|
559
|
+
200: {
|
|
560
|
+
headers: {
|
|
561
|
+
[name: string]: unknown;
|
|
562
|
+
};
|
|
563
|
+
content: {
|
|
564
|
+
"application/json": components["schemas"]["StatusResponse"];
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
/** @description Unauthorized */
|
|
568
|
+
401: {
|
|
569
|
+
headers: {
|
|
570
|
+
[name: string]: unknown;
|
|
571
|
+
};
|
|
572
|
+
content: {
|
|
573
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
put?: never;
|
|
579
|
+
post?: never;
|
|
580
|
+
delete?: never;
|
|
581
|
+
options?: never;
|
|
582
|
+
head?: never;
|
|
583
|
+
patch?: never;
|
|
584
|
+
trace?: never;
|
|
585
|
+
};
|
|
586
|
+
"/api/admin/users": {
|
|
587
|
+
parameters: {
|
|
588
|
+
query?: never;
|
|
589
|
+
header?: never;
|
|
590
|
+
path?: never;
|
|
591
|
+
cookie?: never;
|
|
592
|
+
};
|
|
593
|
+
/**
|
|
594
|
+
* List All Users
|
|
595
|
+
* @description Get a list of all users (admin only)
|
|
596
|
+
*/
|
|
597
|
+
get: {
|
|
598
|
+
parameters: {
|
|
599
|
+
query?: never;
|
|
600
|
+
header?: never;
|
|
601
|
+
path?: never;
|
|
602
|
+
cookie?: never;
|
|
603
|
+
};
|
|
604
|
+
requestBody?: never;
|
|
605
|
+
responses: {
|
|
606
|
+
/** @description List of users */
|
|
607
|
+
200: {
|
|
608
|
+
headers: {
|
|
609
|
+
[name: string]: unknown;
|
|
610
|
+
};
|
|
611
|
+
content: {
|
|
612
|
+
"application/json": components["schemas"]["AdminUsersListResponse"];
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
/** @description Unauthorized */
|
|
616
|
+
401: {
|
|
617
|
+
headers: {
|
|
618
|
+
[name: string]: unknown;
|
|
619
|
+
};
|
|
620
|
+
content: {
|
|
621
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
/** @description Forbidden - Admin access required */
|
|
625
|
+
403: {
|
|
626
|
+
headers: {
|
|
627
|
+
[name: string]: unknown;
|
|
628
|
+
};
|
|
629
|
+
content: {
|
|
630
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
put?: never;
|
|
636
|
+
post?: never;
|
|
637
|
+
delete?: never;
|
|
638
|
+
options?: never;
|
|
639
|
+
head?: never;
|
|
640
|
+
patch?: never;
|
|
641
|
+
trace?: never;
|
|
642
|
+
};
|
|
643
|
+
"/api/admin/users/stats": {
|
|
644
|
+
parameters: {
|
|
645
|
+
query?: never;
|
|
646
|
+
header?: never;
|
|
647
|
+
path?: never;
|
|
648
|
+
cookie?: never;
|
|
649
|
+
};
|
|
650
|
+
/**
|
|
651
|
+
* User Statistics
|
|
652
|
+
* @description Get user statistics (admin only)
|
|
653
|
+
*/
|
|
654
|
+
get: {
|
|
655
|
+
parameters: {
|
|
656
|
+
query?: never;
|
|
657
|
+
header?: never;
|
|
658
|
+
path?: never;
|
|
659
|
+
cookie?: never;
|
|
660
|
+
};
|
|
661
|
+
requestBody?: never;
|
|
662
|
+
responses: {
|
|
663
|
+
/** @description User statistics */
|
|
664
|
+
200: {
|
|
665
|
+
headers: {
|
|
666
|
+
[name: string]: unknown;
|
|
667
|
+
};
|
|
668
|
+
content: {
|
|
669
|
+
"application/json": components["schemas"]["AdminUserStatsResponse"];
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
/** @description Unauthorized */
|
|
673
|
+
401: {
|
|
674
|
+
headers: {
|
|
675
|
+
[name: string]: unknown;
|
|
676
|
+
};
|
|
677
|
+
content: {
|
|
678
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
/** @description Forbidden - Admin access required */
|
|
682
|
+
403: {
|
|
683
|
+
headers: {
|
|
684
|
+
[name: string]: unknown;
|
|
685
|
+
};
|
|
686
|
+
content: {
|
|
687
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
put?: never;
|
|
693
|
+
post?: never;
|
|
694
|
+
delete?: never;
|
|
695
|
+
options?: never;
|
|
696
|
+
head?: never;
|
|
697
|
+
patch?: never;
|
|
698
|
+
trace?: never;
|
|
699
|
+
};
|
|
700
|
+
"/api/admin/users/{id}": {
|
|
701
|
+
parameters: {
|
|
702
|
+
query?: never;
|
|
703
|
+
header?: never;
|
|
704
|
+
path?: never;
|
|
705
|
+
cookie?: never;
|
|
706
|
+
};
|
|
707
|
+
get?: never;
|
|
708
|
+
put?: never;
|
|
709
|
+
post?: never;
|
|
710
|
+
/**
|
|
711
|
+
* Delete User
|
|
712
|
+
* @description Delete a user account (admin only, cannot delete own account)
|
|
713
|
+
*/
|
|
714
|
+
delete: {
|
|
715
|
+
parameters: {
|
|
716
|
+
query?: never;
|
|
717
|
+
header?: never;
|
|
718
|
+
path: {
|
|
719
|
+
id: string;
|
|
720
|
+
};
|
|
721
|
+
cookie?: never;
|
|
722
|
+
};
|
|
723
|
+
requestBody?: never;
|
|
724
|
+
responses: {
|
|
725
|
+
/** @description User deleted successfully */
|
|
726
|
+
200: {
|
|
727
|
+
headers: {
|
|
728
|
+
[name: string]: unknown;
|
|
729
|
+
};
|
|
730
|
+
content: {
|
|
731
|
+
"application/json": components["schemas"]["AcceptTermsResponse"];
|
|
732
|
+
};
|
|
733
|
+
};
|
|
734
|
+
/** @description Cannot delete own account */
|
|
735
|
+
400: {
|
|
736
|
+
headers: {
|
|
737
|
+
[name: string]: unknown;
|
|
738
|
+
};
|
|
739
|
+
content: {
|
|
740
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
/** @description Unauthorized */
|
|
744
|
+
401: {
|
|
745
|
+
headers: {
|
|
746
|
+
[name: string]: unknown;
|
|
747
|
+
};
|
|
748
|
+
content: {
|
|
749
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
/** @description Forbidden - Admin access required */
|
|
753
|
+
403: {
|
|
754
|
+
headers: {
|
|
755
|
+
[name: string]: unknown;
|
|
756
|
+
};
|
|
757
|
+
content: {
|
|
758
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
/** @description User not found */
|
|
762
|
+
404: {
|
|
763
|
+
headers: {
|
|
764
|
+
[name: string]: unknown;
|
|
765
|
+
};
|
|
766
|
+
content: {
|
|
767
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
};
|
|
772
|
+
options?: never;
|
|
773
|
+
head?: never;
|
|
774
|
+
/**
|
|
775
|
+
* Update User
|
|
776
|
+
* @description Update user properties (admin only)
|
|
777
|
+
*/
|
|
778
|
+
patch: {
|
|
779
|
+
parameters: {
|
|
780
|
+
query?: never;
|
|
781
|
+
header?: never;
|
|
782
|
+
path: {
|
|
783
|
+
id: string;
|
|
784
|
+
};
|
|
785
|
+
cookie?: never;
|
|
786
|
+
};
|
|
787
|
+
requestBody?: {
|
|
788
|
+
content: {
|
|
789
|
+
"application/json": components["schemas"]["UpdateUserRequest"];
|
|
790
|
+
};
|
|
791
|
+
};
|
|
792
|
+
responses: {
|
|
793
|
+
/** @description User updated successfully */
|
|
794
|
+
200: {
|
|
795
|
+
headers: {
|
|
796
|
+
[name: string]: unknown;
|
|
797
|
+
};
|
|
798
|
+
content: {
|
|
799
|
+
"application/json": components["schemas"]["AdminUpdateUserResponse"];
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
/** @description Invalid request */
|
|
803
|
+
400: {
|
|
804
|
+
headers: {
|
|
805
|
+
[name: string]: unknown;
|
|
806
|
+
};
|
|
807
|
+
content: {
|
|
808
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
/** @description Unauthorized */
|
|
812
|
+
401: {
|
|
813
|
+
headers: {
|
|
814
|
+
[name: string]: unknown;
|
|
815
|
+
};
|
|
816
|
+
content: {
|
|
817
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
/** @description Forbidden - Admin access required */
|
|
821
|
+
403: {
|
|
822
|
+
headers: {
|
|
823
|
+
[name: string]: unknown;
|
|
824
|
+
};
|
|
825
|
+
content: {
|
|
826
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
/** @description User not found */
|
|
830
|
+
404: {
|
|
831
|
+
headers: {
|
|
832
|
+
[name: string]: unknown;
|
|
833
|
+
};
|
|
834
|
+
content: {
|
|
835
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
};
|
|
840
|
+
trace?: never;
|
|
841
|
+
};
|
|
842
|
+
"/api/admin/oauth/config": {
|
|
843
|
+
parameters: {
|
|
844
|
+
query?: never;
|
|
845
|
+
header?: never;
|
|
846
|
+
path?: never;
|
|
847
|
+
cookie?: never;
|
|
848
|
+
};
|
|
849
|
+
/**
|
|
850
|
+
* Get OAuth Configuration
|
|
851
|
+
* @description Get OAuth provider configuration (admin only, read-only)
|
|
852
|
+
*/
|
|
853
|
+
get: {
|
|
854
|
+
parameters: {
|
|
855
|
+
query?: never;
|
|
856
|
+
header?: never;
|
|
857
|
+
path?: never;
|
|
858
|
+
cookie?: never;
|
|
859
|
+
};
|
|
860
|
+
requestBody?: never;
|
|
861
|
+
responses: {
|
|
862
|
+
/** @description OAuth configuration */
|
|
863
|
+
200: {
|
|
864
|
+
headers: {
|
|
865
|
+
[name: string]: unknown;
|
|
866
|
+
};
|
|
867
|
+
content: {
|
|
868
|
+
"application/json": components["schemas"]["OAuthConfigResponse"];
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
/** @description Unauthorized */
|
|
872
|
+
401: {
|
|
873
|
+
headers: {
|
|
874
|
+
[name: string]: unknown;
|
|
875
|
+
};
|
|
876
|
+
content: {
|
|
877
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
/** @description Forbidden - Admin access required */
|
|
881
|
+
403: {
|
|
882
|
+
headers: {
|
|
883
|
+
[name: string]: unknown;
|
|
884
|
+
};
|
|
885
|
+
content: {
|
|
886
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
put?: never;
|
|
892
|
+
post?: never;
|
|
893
|
+
delete?: never;
|
|
894
|
+
options?: never;
|
|
895
|
+
head?: never;
|
|
896
|
+
patch?: never;
|
|
897
|
+
trace?: never;
|
|
898
|
+
};
|
|
899
|
+
"/api/admin/exchange/backup": {
|
|
900
|
+
parameters: {
|
|
901
|
+
query?: never;
|
|
902
|
+
header?: never;
|
|
903
|
+
path?: never;
|
|
904
|
+
cookie?: never;
|
|
905
|
+
};
|
|
906
|
+
get?: never;
|
|
907
|
+
put?: never;
|
|
908
|
+
/**
|
|
909
|
+
* Backup Knowledge Base
|
|
910
|
+
* @description Create a lossless backup of the knowledge base as a streaming tar.gz archive
|
|
911
|
+
*/
|
|
912
|
+
post: {
|
|
913
|
+
parameters: {
|
|
914
|
+
query?: never;
|
|
915
|
+
header?: never;
|
|
916
|
+
path?: never;
|
|
917
|
+
cookie?: never;
|
|
918
|
+
};
|
|
919
|
+
requestBody?: never;
|
|
920
|
+
responses: {
|
|
921
|
+
/** @description Streaming backup archive */
|
|
922
|
+
200: {
|
|
923
|
+
headers: {
|
|
924
|
+
[name: string]: unknown;
|
|
925
|
+
};
|
|
926
|
+
content: {
|
|
927
|
+
"application/gzip": string;
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
/** @description Unauthorized */
|
|
931
|
+
401: {
|
|
932
|
+
headers: {
|
|
933
|
+
[name: string]: unknown;
|
|
934
|
+
};
|
|
935
|
+
content: {
|
|
936
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
/** @description Forbidden - Admin access required */
|
|
940
|
+
403: {
|
|
941
|
+
headers: {
|
|
942
|
+
[name: string]: unknown;
|
|
943
|
+
};
|
|
944
|
+
content: {
|
|
945
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
};
|
|
950
|
+
delete?: never;
|
|
951
|
+
options?: never;
|
|
952
|
+
head?: never;
|
|
953
|
+
patch?: never;
|
|
954
|
+
trace?: never;
|
|
955
|
+
};
|
|
956
|
+
"/api/admin/exchange/restore": {
|
|
957
|
+
parameters: {
|
|
958
|
+
query?: never;
|
|
959
|
+
header?: never;
|
|
960
|
+
path?: never;
|
|
961
|
+
cookie?: never;
|
|
962
|
+
};
|
|
963
|
+
get?: never;
|
|
964
|
+
put?: never;
|
|
965
|
+
/**
|
|
966
|
+
* Restore Knowledge Base
|
|
967
|
+
* @description Restore knowledge base from a backup archive. Returns SSE progress events.
|
|
968
|
+
*/
|
|
969
|
+
post: {
|
|
970
|
+
parameters: {
|
|
971
|
+
query?: never;
|
|
972
|
+
header?: never;
|
|
973
|
+
path?: never;
|
|
974
|
+
cookie?: never;
|
|
975
|
+
};
|
|
976
|
+
requestBody: {
|
|
977
|
+
content: {
|
|
978
|
+
"multipart/form-data": {
|
|
979
|
+
/**
|
|
980
|
+
* Format: binary
|
|
981
|
+
* @description Backup archive (.tar.gz)
|
|
982
|
+
*/
|
|
983
|
+
file: string;
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
responses: {
|
|
988
|
+
/** @description SSE stream of restore progress events */
|
|
989
|
+
200: {
|
|
990
|
+
headers: {
|
|
991
|
+
[name: string]: unknown;
|
|
992
|
+
};
|
|
993
|
+
content: {
|
|
994
|
+
"text/event-stream": string;
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
/** @description Invalid file format */
|
|
998
|
+
400: {
|
|
999
|
+
headers: {
|
|
1000
|
+
[name: string]: unknown;
|
|
1001
|
+
};
|
|
1002
|
+
content: {
|
|
1003
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1004
|
+
};
|
|
1005
|
+
};
|
|
1006
|
+
/** @description Unauthorized */
|
|
1007
|
+
401: {
|
|
1008
|
+
headers: {
|
|
1009
|
+
[name: string]: unknown;
|
|
1010
|
+
};
|
|
1011
|
+
content: {
|
|
1012
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1013
|
+
};
|
|
1014
|
+
};
|
|
1015
|
+
/** @description Forbidden - Admin access required */
|
|
1016
|
+
403: {
|
|
1017
|
+
headers: {
|
|
1018
|
+
[name: string]: unknown;
|
|
1019
|
+
};
|
|
1020
|
+
content: {
|
|
1021
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
delete?: never;
|
|
1027
|
+
options?: never;
|
|
1028
|
+
head?: never;
|
|
1029
|
+
patch?: never;
|
|
1030
|
+
trace?: never;
|
|
1031
|
+
};
|
|
1032
|
+
"/api/moderate/exchange/export": {
|
|
1033
|
+
parameters: {
|
|
1034
|
+
query?: never;
|
|
1035
|
+
header?: never;
|
|
1036
|
+
path?: never;
|
|
1037
|
+
cookie?: never;
|
|
1038
|
+
};
|
|
1039
|
+
get?: never;
|
|
1040
|
+
put?: never;
|
|
1041
|
+
/**
|
|
1042
|
+
* Export Knowledge Base as JSON-LD
|
|
1043
|
+
* @description Export the knowledge base as a JSON-LD Linked Data tar.gz archive
|
|
1044
|
+
*/
|
|
1045
|
+
post: {
|
|
1046
|
+
parameters: {
|
|
1047
|
+
query?: {
|
|
1048
|
+
/** @description Include archived resources in export */
|
|
1049
|
+
includeArchived?: boolean;
|
|
1050
|
+
};
|
|
1051
|
+
header?: never;
|
|
1052
|
+
path?: never;
|
|
1053
|
+
cookie?: never;
|
|
1054
|
+
};
|
|
1055
|
+
requestBody?: never;
|
|
1056
|
+
responses: {
|
|
1057
|
+
/** @description Streaming JSON-LD archive */
|
|
1058
|
+
200: {
|
|
1059
|
+
headers: {
|
|
1060
|
+
[name: string]: unknown;
|
|
1061
|
+
};
|
|
1062
|
+
content: {
|
|
1063
|
+
"application/gzip": string;
|
|
1064
|
+
};
|
|
1065
|
+
};
|
|
1066
|
+
/** @description Unauthorized */
|
|
1067
|
+
401: {
|
|
1068
|
+
headers: {
|
|
1069
|
+
[name: string]: unknown;
|
|
1070
|
+
};
|
|
1071
|
+
content: {
|
|
1072
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1073
|
+
};
|
|
1074
|
+
};
|
|
1075
|
+
/** @description Forbidden - moderator or admin role required */
|
|
1076
|
+
403: {
|
|
1077
|
+
headers: {
|
|
1078
|
+
[name: string]: unknown;
|
|
1079
|
+
};
|
|
1080
|
+
content: {
|
|
1081
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1082
|
+
};
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
delete?: never;
|
|
1087
|
+
options?: never;
|
|
1088
|
+
head?: never;
|
|
1089
|
+
patch?: never;
|
|
1090
|
+
trace?: never;
|
|
1091
|
+
};
|
|
1092
|
+
"/api/moderate/exchange/import": {
|
|
1093
|
+
parameters: {
|
|
1094
|
+
query?: never;
|
|
1095
|
+
header?: never;
|
|
1096
|
+
path?: never;
|
|
1097
|
+
cookie?: never;
|
|
1098
|
+
};
|
|
1099
|
+
get?: never;
|
|
1100
|
+
put?: never;
|
|
1101
|
+
/**
|
|
1102
|
+
* Import Knowledge Base from JSON-LD
|
|
1103
|
+
* @description Import resources from a JSON-LD Linked Data archive. Returns SSE progress events.
|
|
1104
|
+
*/
|
|
1105
|
+
post: {
|
|
1106
|
+
parameters: {
|
|
1107
|
+
query?: never;
|
|
1108
|
+
header?: never;
|
|
1109
|
+
path?: never;
|
|
1110
|
+
cookie?: never;
|
|
1111
|
+
};
|
|
1112
|
+
requestBody: {
|
|
1113
|
+
content: {
|
|
1114
|
+
"multipart/form-data": {
|
|
1115
|
+
/**
|
|
1116
|
+
* Format: binary
|
|
1117
|
+
* @description JSON-LD archive (.tar.gz)
|
|
1118
|
+
*/
|
|
1119
|
+
file: string;
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
responses: {
|
|
1124
|
+
/** @description SSE stream of import progress events */
|
|
1125
|
+
200: {
|
|
1126
|
+
headers: {
|
|
1127
|
+
[name: string]: unknown;
|
|
1128
|
+
};
|
|
1129
|
+
content: {
|
|
1130
|
+
"text/event-stream": string;
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
/** @description Invalid file format */
|
|
1134
|
+
400: {
|
|
1135
|
+
headers: {
|
|
1136
|
+
[name: string]: unknown;
|
|
1137
|
+
};
|
|
1138
|
+
content: {
|
|
1139
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
/** @description Unauthorized */
|
|
1143
|
+
401: {
|
|
1144
|
+
headers: {
|
|
1145
|
+
[name: string]: unknown;
|
|
1146
|
+
};
|
|
1147
|
+
content: {
|
|
1148
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
/** @description Forbidden - moderator or admin role required */
|
|
1152
|
+
403: {
|
|
1153
|
+
headers: {
|
|
1154
|
+
[name: string]: unknown;
|
|
1155
|
+
};
|
|
1156
|
+
content: {
|
|
1157
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1162
|
+
delete?: never;
|
|
1163
|
+
options?: never;
|
|
1164
|
+
head?: never;
|
|
1165
|
+
patch?: never;
|
|
1166
|
+
trace?: never;
|
|
1167
|
+
};
|
|
1168
|
+
"/api/cookies/consent": {
|
|
1169
|
+
parameters: {
|
|
1170
|
+
query?: never;
|
|
1171
|
+
header?: never;
|
|
1172
|
+
path?: never;
|
|
1173
|
+
cookie?: never;
|
|
1174
|
+
};
|
|
1175
|
+
/**
|
|
1176
|
+
* Get cookie consent preferences
|
|
1177
|
+
* @description Returns the current user's cookie consent preferences.
|
|
1178
|
+
*/
|
|
1179
|
+
get: {
|
|
1180
|
+
parameters: {
|
|
1181
|
+
query?: never;
|
|
1182
|
+
header?: never;
|
|
1183
|
+
path?: never;
|
|
1184
|
+
cookie?: never;
|
|
1185
|
+
};
|
|
1186
|
+
requestBody?: never;
|
|
1187
|
+
responses: {
|
|
1188
|
+
/** @description Current consent preferences */
|
|
1189
|
+
200: {
|
|
1190
|
+
headers: {
|
|
1191
|
+
[name: string]: unknown;
|
|
1192
|
+
};
|
|
1193
|
+
content: {
|
|
1194
|
+
"application/json": components["schemas"]["CookieConsentResponse"];
|
|
1195
|
+
};
|
|
1196
|
+
};
|
|
1197
|
+
/** @description Authentication required */
|
|
1198
|
+
401: {
|
|
1199
|
+
headers: {
|
|
1200
|
+
[name: string]: unknown;
|
|
1201
|
+
};
|
|
1202
|
+
content: {
|
|
1203
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
put?: never;
|
|
1209
|
+
/**
|
|
1210
|
+
* Update cookie consent preferences
|
|
1211
|
+
* @description Update the current user's cookie consent preferences. The `necessary` flag must be true — necessary cookies cannot be disabled.
|
|
1212
|
+
*/
|
|
1213
|
+
post: {
|
|
1214
|
+
parameters: {
|
|
1215
|
+
query?: never;
|
|
1216
|
+
header?: never;
|
|
1217
|
+
path?: never;
|
|
1218
|
+
cookie?: never;
|
|
1219
|
+
};
|
|
1220
|
+
requestBody: {
|
|
1221
|
+
content: {
|
|
1222
|
+
"application/json": components["schemas"]["CookieConsentRequest"];
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1225
|
+
responses: {
|
|
1226
|
+
/** @description Consent updated */
|
|
1227
|
+
200: {
|
|
1228
|
+
headers: {
|
|
1229
|
+
[name: string]: unknown;
|
|
1230
|
+
};
|
|
1231
|
+
content: {
|
|
1232
|
+
"application/json": components["schemas"]["CookieConsentResponse"];
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1235
|
+
/** @description Invalid consent data (non-boolean fields, missing fields, or necessary=false) */
|
|
1236
|
+
400: {
|
|
1237
|
+
headers: {
|
|
1238
|
+
[name: string]: unknown;
|
|
1239
|
+
};
|
|
1240
|
+
content: {
|
|
1241
|
+
"application/json": components["schemas"]["CookieConsentResponse"];
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
/** @description Authentication required */
|
|
1245
|
+
401: {
|
|
1246
|
+
headers: {
|
|
1247
|
+
[name: string]: unknown;
|
|
1248
|
+
};
|
|
1249
|
+
content: {
|
|
1250
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1251
|
+
};
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
};
|
|
1255
|
+
delete?: never;
|
|
1256
|
+
options?: never;
|
|
1257
|
+
head?: never;
|
|
1258
|
+
patch?: never;
|
|
1259
|
+
trace?: never;
|
|
1260
|
+
};
|
|
1261
|
+
"/api/cookies/export": {
|
|
1262
|
+
parameters: {
|
|
1263
|
+
query?: never;
|
|
1264
|
+
header?: never;
|
|
1265
|
+
path?: never;
|
|
1266
|
+
cookie?: never;
|
|
1267
|
+
};
|
|
1268
|
+
/**
|
|
1269
|
+
* Export cookie data (GDPR)
|
|
1270
|
+
* @description Export the current user's cookie-related data as a downloadable JSON file. Response sets `Content-Disposition: attachment; filename="cookie-data-export-<timestamp>.json"`.
|
|
1271
|
+
*/
|
|
1272
|
+
get: {
|
|
1273
|
+
parameters: {
|
|
1274
|
+
query?: never;
|
|
1275
|
+
header?: never;
|
|
1276
|
+
path?: never;
|
|
1277
|
+
cookie?: never;
|
|
1278
|
+
};
|
|
1279
|
+
requestBody?: never;
|
|
1280
|
+
responses: {
|
|
1281
|
+
/** @description User cookie data as attachment */
|
|
1282
|
+
200: {
|
|
1283
|
+
headers: {
|
|
1284
|
+
[name: string]: unknown;
|
|
1285
|
+
};
|
|
1286
|
+
content: {
|
|
1287
|
+
"application/json": components["schemas"]["CookieExportResponse"];
|
|
1288
|
+
};
|
|
1289
|
+
};
|
|
1290
|
+
/** @description Authentication required */
|
|
1291
|
+
401: {
|
|
1292
|
+
headers: {
|
|
1293
|
+
[name: string]: unknown;
|
|
1294
|
+
};
|
|
1295
|
+
content: {
|
|
1296
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
put?: never;
|
|
1302
|
+
post?: never;
|
|
1303
|
+
delete?: never;
|
|
1304
|
+
options?: never;
|
|
1305
|
+
head?: never;
|
|
1306
|
+
patch?: never;
|
|
1307
|
+
trace?: never;
|
|
1308
|
+
};
|
|
1309
|
+
"/api/tokens/mcp-setup": {
|
|
1310
|
+
parameters: {
|
|
1311
|
+
query?: never;
|
|
1312
|
+
header?: never;
|
|
1313
|
+
path?: never;
|
|
1314
|
+
cookie?: never;
|
|
1315
|
+
};
|
|
1316
|
+
/**
|
|
1317
|
+
* MCP Setup (browser-driven CLI handoff)
|
|
1318
|
+
* @description Browser flow that generates a long-lived (30 day) MCP refresh token for the authenticated user and redirects to a localhost callback URL with the token as a query parameter. Used by CLI tooling (similar to Google's OAuth CLI flow).
|
|
1319
|
+
*
|
|
1320
|
+
* The callback URL must match one of the localhost patterns (`http://localhost:<port>/...`, `http://127.0.0.1:<port>/...`, or `http://[::1]:<port>/...`).
|
|
1321
|
+
*/
|
|
1322
|
+
get: {
|
|
1323
|
+
parameters: {
|
|
1324
|
+
query: {
|
|
1325
|
+
/** @description Localhost URL to redirect to with `?token=<refresh-token>` on success. */
|
|
1326
|
+
callback: string;
|
|
1327
|
+
};
|
|
1328
|
+
header?: never;
|
|
1329
|
+
path?: never;
|
|
1330
|
+
cookie?: never;
|
|
1331
|
+
};
|
|
1332
|
+
requestBody?: never;
|
|
1333
|
+
responses: {
|
|
1334
|
+
/** @description Redirect to the callback URL with the newly-issued refresh token appended as a `?token=` query parameter. */
|
|
1335
|
+
302: {
|
|
1336
|
+
headers: {
|
|
1337
|
+
[name: string]: unknown;
|
|
1338
|
+
};
|
|
1339
|
+
content?: never;
|
|
1340
|
+
};
|
|
1341
|
+
/** @description Missing or non-localhost callback URL */
|
|
1342
|
+
400: {
|
|
1343
|
+
headers: {
|
|
1344
|
+
[name: string]: unknown;
|
|
1345
|
+
};
|
|
1346
|
+
content: {
|
|
1347
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1348
|
+
};
|
|
1349
|
+
};
|
|
1350
|
+
/** @description Authentication required */
|
|
1351
|
+
401: {
|
|
1352
|
+
headers: {
|
|
1353
|
+
[name: string]: unknown;
|
|
1354
|
+
};
|
|
1355
|
+
content: {
|
|
1356
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1357
|
+
};
|
|
1358
|
+
};
|
|
1359
|
+
/** @description Failed to generate refresh token */
|
|
1360
|
+
500: {
|
|
1361
|
+
headers: {
|
|
1362
|
+
[name: string]: unknown;
|
|
1363
|
+
};
|
|
1364
|
+
content: {
|
|
1365
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
put?: never;
|
|
1371
|
+
post?: never;
|
|
1372
|
+
delete?: never;
|
|
1373
|
+
options?: never;
|
|
1374
|
+
head?: never;
|
|
1375
|
+
patch?: never;
|
|
1376
|
+
trace?: never;
|
|
1377
|
+
};
|
|
1378
|
+
"/bus/subscribe": {
|
|
1379
|
+
parameters: {
|
|
1380
|
+
query?: never;
|
|
1381
|
+
header?: never;
|
|
1382
|
+
path?: never;
|
|
1383
|
+
cookie?: never;
|
|
1384
|
+
};
|
|
1385
|
+
/**
|
|
1386
|
+
* Subscribe to the Semiont event bus (SSE)
|
|
1387
|
+
* @description Opens a long-lived Server-Sent Events stream over which the bus delivers events matching the requested channels and scopes.
|
|
1388
|
+
*
|
|
1389
|
+
* Each SSE frame has `event: bus-event`, a JSON-encoded `data` of the form `{ channel, payload, scope? }`, and an `id` (either a persisted event id, `scope:seq`, for domain events; or an ephemeral id for job-lifecycle / result channels).
|
|
1390
|
+
*
|
|
1391
|
+
* Pass the last-received id as `Last-Event-ID` to resume — the server replays missed persisted events and emits a `bus:resume-gap` synthetic event when the gap exceeds the replay window.
|
|
1392
|
+
*/
|
|
1393
|
+
get: {
|
|
1394
|
+
parameters: {
|
|
1395
|
+
query?: {
|
|
1396
|
+
/** @description Unscoped channels to subscribe to. Repeat the parameter for multiple channels. At least one of `channel` or `scoped` is required. */
|
|
1397
|
+
channel?: string[];
|
|
1398
|
+
/** @description Resource-scoped channels to subscribe to (requires `scope`). Repeat for multiple. */
|
|
1399
|
+
scoped?: string[];
|
|
1400
|
+
/** @description Resource scope for scoped channels (typically a resourceId). */
|
|
1401
|
+
scope?: string;
|
|
1402
|
+
};
|
|
1403
|
+
header?: {
|
|
1404
|
+
/** @description Id of the last event the client received. On reconnect, the server replays persisted events after this id and emits `bus:resume-gap` if the gap exceeds the replay cap. */
|
|
1405
|
+
"Last-Event-ID"?: string;
|
|
1406
|
+
};
|
|
1407
|
+
path?: never;
|
|
1408
|
+
cookie?: never;
|
|
1409
|
+
};
|
|
1410
|
+
requestBody?: never;
|
|
1411
|
+
responses: {
|
|
1412
|
+
/** @description SSE stream opened */
|
|
1413
|
+
200: {
|
|
1414
|
+
headers: {
|
|
1415
|
+
[name: string]: unknown;
|
|
1416
|
+
};
|
|
1417
|
+
content: {
|
|
1418
|
+
"text/event-stream": components["schemas"]["EventStreamResponse"];
|
|
1419
|
+
};
|
|
1420
|
+
};
|
|
1421
|
+
/** @description No channels requested (at least one `channel` or `scoped` parameter required) */
|
|
1422
|
+
400: {
|
|
1423
|
+
headers: {
|
|
1424
|
+
[name: string]: unknown;
|
|
1425
|
+
};
|
|
1426
|
+
content: {
|
|
1427
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1430
|
+
/** @description Authentication required */
|
|
1431
|
+
401: {
|
|
1432
|
+
headers: {
|
|
1433
|
+
[name: string]: unknown;
|
|
1434
|
+
};
|
|
1435
|
+
content: {
|
|
1436
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
};
|
|
1440
|
+
};
|
|
1441
|
+
put?: never;
|
|
1442
|
+
post?: never;
|
|
1443
|
+
delete?: never;
|
|
1444
|
+
options?: never;
|
|
1445
|
+
head?: never;
|
|
1446
|
+
patch?: never;
|
|
1447
|
+
trace?: never;
|
|
1448
|
+
};
|
|
1449
|
+
"/bus/emit": {
|
|
1450
|
+
parameters: {
|
|
1451
|
+
query?: never;
|
|
1452
|
+
header?: never;
|
|
1453
|
+
path?: never;
|
|
1454
|
+
cookie?: never;
|
|
1455
|
+
};
|
|
1456
|
+
get?: never;
|
|
1457
|
+
put?: never;
|
|
1458
|
+
/**
|
|
1459
|
+
* Emit an event on the Semiont bus
|
|
1460
|
+
* @description Publishes an event to the bus. The channel name must be registered in `bus-protocol.ts` (`EventMap`); the payload is validated against the channel's schema in `CHANNEL_SCHEMAS` when one is registered.
|
|
1461
|
+
*
|
|
1462
|
+
* When `scope` is set, the event publishes on `eventBus.scope(scope)` rather than the global bus, routing it to per-resource SSE subscribers only. The authenticated user's DID is attached to the payload as `_userId` automatically.
|
|
1463
|
+
*
|
|
1464
|
+
* Returns 202 Accepted — the event is delivered to in-memory subscribers synchronously, but downstream persistence (Stower) and materialization happen asynchronously.
|
|
1465
|
+
*/
|
|
1466
|
+
post: {
|
|
1467
|
+
parameters: {
|
|
1468
|
+
query?: never;
|
|
1469
|
+
header?: never;
|
|
1470
|
+
path?: never;
|
|
1471
|
+
cookie?: never;
|
|
1472
|
+
};
|
|
1473
|
+
requestBody: {
|
|
1474
|
+
content: {
|
|
1475
|
+
"application/json": components["schemas"]["BusEmitRequest"];
|
|
1476
|
+
};
|
|
1477
|
+
};
|
|
1478
|
+
responses: {
|
|
1479
|
+
/** @description Event accepted and published to subscribers */
|
|
1480
|
+
202: {
|
|
1481
|
+
headers: {
|
|
1482
|
+
[name: string]: unknown;
|
|
1483
|
+
};
|
|
1484
|
+
content?: never;
|
|
1485
|
+
};
|
|
1486
|
+
/** @description Missing/invalid channel, payload, or scope; or payload failed schema validation for the channel */
|
|
1487
|
+
400: {
|
|
1488
|
+
headers: {
|
|
1489
|
+
[name: string]: unknown;
|
|
1490
|
+
};
|
|
1491
|
+
content: {
|
|
1492
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1493
|
+
};
|
|
1494
|
+
};
|
|
1495
|
+
/** @description Authentication required */
|
|
1496
|
+
401: {
|
|
1497
|
+
headers: {
|
|
1498
|
+
[name: string]: unknown;
|
|
1499
|
+
};
|
|
1500
|
+
content: {
|
|
1501
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1502
|
+
};
|
|
1503
|
+
};
|
|
1504
|
+
};
|
|
1505
|
+
};
|
|
1506
|
+
delete?: never;
|
|
1507
|
+
options?: never;
|
|
1508
|
+
head?: never;
|
|
1509
|
+
patch?: never;
|
|
1510
|
+
trace?: never;
|
|
1511
|
+
};
|
|
1512
|
+
"/resources": {
|
|
1513
|
+
parameters: {
|
|
1514
|
+
query?: never;
|
|
1515
|
+
header?: never;
|
|
1516
|
+
path?: never;
|
|
1517
|
+
cookie?: never;
|
|
1518
|
+
};
|
|
1519
|
+
get?: never;
|
|
1520
|
+
put?: never;
|
|
1521
|
+
/**
|
|
1522
|
+
* Create a resource
|
|
1523
|
+
* @description Upload binary content + metadata as multipart/form-data. The backend writes content to disk, then emits yield:create on the bus; Stower persists it and returns a 202 with the new resourceId. Full reconciliation happens via SSE domain events (yield:created).
|
|
1524
|
+
*
|
|
1525
|
+
* Generation workers and the /know/compose page both hit this route — bytes always travel on the HTTP wire, never on the bus.
|
|
1526
|
+
*/
|
|
1527
|
+
post: {
|
|
1528
|
+
parameters: {
|
|
1529
|
+
query?: never;
|
|
1530
|
+
header?: never;
|
|
1531
|
+
path?: never;
|
|
1532
|
+
cookie?: never;
|
|
1533
|
+
};
|
|
1534
|
+
requestBody: {
|
|
1535
|
+
content: {
|
|
1536
|
+
"multipart/form-data": {
|
|
1537
|
+
/** @description Human-readable resource name */
|
|
1538
|
+
name: string;
|
|
1539
|
+
/**
|
|
1540
|
+
* Format: binary
|
|
1541
|
+
* @description Binary content
|
|
1542
|
+
*/
|
|
1543
|
+
file: string;
|
|
1544
|
+
/** @description Media type of the content (e.g. text/plain, text/markdown, image/png) */
|
|
1545
|
+
format: string;
|
|
1546
|
+
/** @description Where the content has been / should be placed (file://... for local). If omitted, derived from name + format. */
|
|
1547
|
+
storageUri?: string;
|
|
1548
|
+
/** @description ISO 639-1 language code */
|
|
1549
|
+
language?: string;
|
|
1550
|
+
/** @description JSON-stringified array of entity type names */
|
|
1551
|
+
entityTypes?: string;
|
|
1552
|
+
/** @description For AI-generated resources: the annotation that triggered generation. Nested into generatedFrom.annotationId on the persisted event. */
|
|
1553
|
+
sourceAnnotationId?: string;
|
|
1554
|
+
/** @description For AI-generated resources: the source resource the generating annotation lives on. Nested into generatedFrom.resourceId on the persisted event. */
|
|
1555
|
+
sourceResourceId?: string;
|
|
1556
|
+
/** @description For AI-generated resources: the prompt that drove generation */
|
|
1557
|
+
generationPrompt?: string;
|
|
1558
|
+
/** @description For AI-generated resources: JSON-stringified Agent (single object or array), capturing which model/worker produced the content */
|
|
1559
|
+
generator?: string;
|
|
1560
|
+
/** @description 'true' or 'false' — whether the resource is a draft */
|
|
1561
|
+
isDraft?: string;
|
|
1562
|
+
};
|
|
1563
|
+
};
|
|
1564
|
+
};
|
|
1565
|
+
responses: {
|
|
1566
|
+
/** @description Resource accepted for creation */
|
|
1567
|
+
202: {
|
|
1568
|
+
headers: {
|
|
1569
|
+
[name: string]: unknown;
|
|
1570
|
+
};
|
|
1571
|
+
content: {
|
|
1572
|
+
"application/json": components["schemas"]["CreateResourceResponse"];
|
|
1573
|
+
};
|
|
1574
|
+
};
|
|
1575
|
+
/** @description Missing required fields (name, file, or format) */
|
|
1576
|
+
400: {
|
|
1577
|
+
headers: {
|
|
1578
|
+
[name: string]: unknown;
|
|
1579
|
+
};
|
|
1580
|
+
content: {
|
|
1581
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1582
|
+
};
|
|
1583
|
+
};
|
|
1584
|
+
/** @description Authentication required */
|
|
1585
|
+
401: {
|
|
1586
|
+
headers: {
|
|
1587
|
+
[name: string]: unknown;
|
|
1588
|
+
};
|
|
1589
|
+
content: {
|
|
1590
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1591
|
+
};
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
};
|
|
1595
|
+
delete?: never;
|
|
1596
|
+
options?: never;
|
|
1597
|
+
head?: never;
|
|
1598
|
+
patch?: never;
|
|
1599
|
+
trace?: never;
|
|
1600
|
+
};
|
|
1601
|
+
"/resources/{id}": {
|
|
1602
|
+
parameters: {
|
|
1603
|
+
query?: never;
|
|
1604
|
+
header?: never;
|
|
1605
|
+
path?: never;
|
|
1606
|
+
cookie?: never;
|
|
1607
|
+
};
|
|
1608
|
+
/**
|
|
1609
|
+
* Get a resource (content-negotiated)
|
|
1610
|
+
* @description Content negotiation via the Accept header:
|
|
1611
|
+
* - application/ld+json (default) — returns JSON-LD metadata including all annotations + inbound entity references
|
|
1612
|
+
* - text/* or image/* or application/pdf — returns the raw representation bytes
|
|
1613
|
+
*
|
|
1614
|
+
* Binary payloads flow directly from the content store; metadata payloads go through the bus gateway.
|
|
1615
|
+
*/
|
|
1616
|
+
get: {
|
|
1617
|
+
parameters: {
|
|
1618
|
+
query?: never;
|
|
1619
|
+
header?: {
|
|
1620
|
+
/** @description application/ld+json for metadata, or a text/image/pdf media type for raw content */
|
|
1621
|
+
Accept?: string;
|
|
1622
|
+
};
|
|
1623
|
+
path: {
|
|
1624
|
+
id: string;
|
|
1625
|
+
};
|
|
1626
|
+
cookie?: never;
|
|
1627
|
+
};
|
|
1628
|
+
requestBody?: never;
|
|
1629
|
+
responses: {
|
|
1630
|
+
/** @description Resource content or metadata, depending on Accept */
|
|
1631
|
+
200: {
|
|
1632
|
+
headers: {
|
|
1633
|
+
[name: string]: unknown;
|
|
1634
|
+
};
|
|
1635
|
+
content: {
|
|
1636
|
+
"application/ld+json": components["schemas"]["GetResourceResponse"];
|
|
1637
|
+
"text/plain": string;
|
|
1638
|
+
"text/markdown": string;
|
|
1639
|
+
"text/html": string;
|
|
1640
|
+
"image/*": string;
|
|
1641
|
+
"application/pdf": string;
|
|
1642
|
+
};
|
|
1643
|
+
};
|
|
1644
|
+
/** @description Resource not found */
|
|
1645
|
+
404: {
|
|
1646
|
+
headers: {
|
|
1647
|
+
[name: string]: unknown;
|
|
1648
|
+
};
|
|
1649
|
+
content: {
|
|
1650
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1651
|
+
};
|
|
1652
|
+
};
|
|
1653
|
+
/** @description Failed to retrieve resource */
|
|
1654
|
+
500: {
|
|
1655
|
+
headers: {
|
|
1656
|
+
[name: string]: unknown;
|
|
1657
|
+
};
|
|
1658
|
+
content: {
|
|
1659
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1662
|
+
/** @description Request timed out (bus gateway) */
|
|
1663
|
+
504: {
|
|
1664
|
+
headers: {
|
|
1665
|
+
[name: string]: unknown;
|
|
1666
|
+
};
|
|
1667
|
+
content: {
|
|
1668
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1671
|
+
};
|
|
1672
|
+
};
|
|
1673
|
+
put?: never;
|
|
1674
|
+
post?: never;
|
|
1675
|
+
delete?: never;
|
|
1676
|
+
options?: never;
|
|
1677
|
+
head?: never;
|
|
1678
|
+
patch?: never;
|
|
1679
|
+
trace?: never;
|
|
1680
|
+
};
|
|
1681
|
+
"/api/resources/{id}": {
|
|
1682
|
+
parameters: {
|
|
1683
|
+
query?: never;
|
|
1684
|
+
header?: never;
|
|
1685
|
+
path?: never;
|
|
1686
|
+
cookie?: never;
|
|
1687
|
+
};
|
|
1688
|
+
/**
|
|
1689
|
+
* Get raw resource content (browser-friendly alias)
|
|
1690
|
+
* @description Browser-friendly alternative to GET /resources/{id} that always returns the raw representation, never JSON-LD. Used by `<img>` / PDF.js / `<video>` tags and anywhere an httpOnly cookie is the only feasible auth vector. Behaves like GET /resources/{id} with JSON-LD stripped from the Accept header before content negotiation.
|
|
1691
|
+
*
|
|
1692
|
+
* Sets long-lived immutable Cache-Control (content is addressed by checksum upstream, so bytes never change for a given resource id).
|
|
1693
|
+
*/
|
|
1694
|
+
get: {
|
|
1695
|
+
parameters: {
|
|
1696
|
+
query?: never;
|
|
1697
|
+
header?: never;
|
|
1698
|
+
path: {
|
|
1699
|
+
id: string;
|
|
1700
|
+
};
|
|
1701
|
+
cookie?: never;
|
|
1702
|
+
};
|
|
1703
|
+
requestBody?: never;
|
|
1704
|
+
responses: {
|
|
1705
|
+
/** @description Raw representation bytes with appropriate Content-Type */
|
|
1706
|
+
200: {
|
|
1707
|
+
headers: {
|
|
1708
|
+
[name: string]: unknown;
|
|
1709
|
+
};
|
|
1710
|
+
content: {
|
|
1711
|
+
"text/plain": string;
|
|
1712
|
+
"text/markdown": string;
|
|
1713
|
+
"text/html": string;
|
|
1714
|
+
"image/*": string;
|
|
1715
|
+
"application/pdf": string;
|
|
1716
|
+
};
|
|
1717
|
+
};
|
|
1718
|
+
/** @description Resource or representation not found */
|
|
1719
|
+
404: {
|
|
1720
|
+
headers: {
|
|
1721
|
+
[name: string]: unknown;
|
|
1722
|
+
};
|
|
1723
|
+
content: {
|
|
1724
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1725
|
+
};
|
|
1726
|
+
};
|
|
1727
|
+
/** @description Failed to retrieve resource */
|
|
1728
|
+
500: {
|
|
1729
|
+
headers: {
|
|
1730
|
+
[name: string]: unknown;
|
|
1731
|
+
};
|
|
1732
|
+
content: {
|
|
1733
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
put?: never;
|
|
1739
|
+
post?: never;
|
|
1740
|
+
delete?: never;
|
|
1741
|
+
options?: never;
|
|
1742
|
+
head?: never;
|
|
1743
|
+
patch?: never;
|
|
1744
|
+
trace?: never;
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1747
|
+
export type webhooks = Record<string, never>;
|
|
1748
|
+
export interface components {
|
|
1749
|
+
schemas: {
|
|
1750
|
+
AcceptTermsResponse: {
|
|
1751
|
+
success: boolean;
|
|
1752
|
+
message: string;
|
|
1753
|
+
};
|
|
1754
|
+
AdminUpdateUserResponse: {
|
|
1755
|
+
success: boolean;
|
|
1756
|
+
user: {
|
|
1757
|
+
id: string;
|
|
1758
|
+
email: string;
|
|
1759
|
+
name: string | null;
|
|
1760
|
+
image: string | null;
|
|
1761
|
+
domain: string;
|
|
1762
|
+
provider: string;
|
|
1763
|
+
isAdmin: boolean;
|
|
1764
|
+
isActive: boolean;
|
|
1765
|
+
lastLogin: string | null;
|
|
1766
|
+
created: string;
|
|
1767
|
+
updatedAt: string;
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
AdminUsersListResponse: {
|
|
1771
|
+
success: boolean;
|
|
1772
|
+
users: {
|
|
1773
|
+
id: string;
|
|
1774
|
+
email: string;
|
|
1775
|
+
name: string | null;
|
|
1776
|
+
image: string | null;
|
|
1777
|
+
domain: string;
|
|
1778
|
+
provider: string;
|
|
1779
|
+
isAdmin: boolean;
|
|
1780
|
+
isActive: boolean;
|
|
1781
|
+
lastLogin: string | null;
|
|
1782
|
+
created: string;
|
|
1783
|
+
updatedAt: string;
|
|
1784
|
+
}[];
|
|
1785
|
+
};
|
|
1786
|
+
AdminUserStatsResponse: {
|
|
1787
|
+
success: boolean;
|
|
1788
|
+
stats: {
|
|
1789
|
+
totalUsers: number;
|
|
1790
|
+
activeUsers: number;
|
|
1791
|
+
adminUsers: number;
|
|
1792
|
+
regularUsers: number;
|
|
1793
|
+
domainBreakdown: {
|
|
1794
|
+
domain: string;
|
|
1795
|
+
count: number;
|
|
1796
|
+
}[];
|
|
1797
|
+
recentSignups: {
|
|
1798
|
+
id: string;
|
|
1799
|
+
email: string;
|
|
1800
|
+
name: string | null;
|
|
1801
|
+
created: string;
|
|
1802
|
+
}[];
|
|
1803
|
+
};
|
|
1804
|
+
};
|
|
1805
|
+
/** @description Web Annotation / W3C PROV Agent. Discriminated by @type — Person, Organization, or Software. Each branch carries fields appropriate to its kind. Software peers are first-class participants, not a sub-class of Person. */
|
|
1806
|
+
Agent: ({
|
|
1807
|
+
/** @constant */
|
|
1808
|
+
"@type": "Person";
|
|
1809
|
+
/**
|
|
1810
|
+
* Format: uri
|
|
1811
|
+
* @description DID-shaped identifier (e.g. did:web:host:users:email%40host)
|
|
1812
|
+
*/
|
|
1813
|
+
"@id"?: string;
|
|
1814
|
+
/** @description Display name */
|
|
1815
|
+
name: string;
|
|
1816
|
+
nickname?: string;
|
|
1817
|
+
email?: string;
|
|
1818
|
+
email_sha1?: string;
|
|
1819
|
+
homepage?: string;
|
|
1820
|
+
} & {
|
|
1821
|
+
[key: string]: unknown;
|
|
1822
|
+
}) | ({
|
|
1823
|
+
/** @constant */
|
|
1824
|
+
"@type": "Organization";
|
|
1825
|
+
/** Format: uri */
|
|
1826
|
+
"@id"?: string;
|
|
1827
|
+
name: string;
|
|
1828
|
+
homepage?: string;
|
|
1829
|
+
} & {
|
|
1830
|
+
[key: string]: unknown;
|
|
1831
|
+
}) | ({
|
|
1832
|
+
/** @constant */
|
|
1833
|
+
"@type": "Software";
|
|
1834
|
+
/**
|
|
1835
|
+
* Format: uri
|
|
1836
|
+
* @description DID-shaped identifier (e.g. did:web:host:agents:provider:model)
|
|
1837
|
+
*/
|
|
1838
|
+
"@id"?: string;
|
|
1839
|
+
/** @description Stable human-friendly label. Not parsed; UI composes display from structured fields. */
|
|
1840
|
+
name: string;
|
|
1841
|
+
/** @description Inference provider (e.g. ollama, anthropic) */
|
|
1842
|
+
provider?: string;
|
|
1843
|
+
/** @description Model identifier (e.g. gemma2:27b, claude-3-5-sonnet) */
|
|
1844
|
+
model?: string;
|
|
1845
|
+
/** @description Inference parameters (temperature, maxTokens, systemPrompt, etc.). Runtime metadata, not part of identity. */
|
|
1846
|
+
parameters?: {
|
|
1847
|
+
[key: string]: unknown;
|
|
1848
|
+
};
|
|
1849
|
+
} & {
|
|
1850
|
+
[key: string]: unknown;
|
|
1851
|
+
});
|
|
1852
|
+
Annotation: {
|
|
1853
|
+
/**
|
|
1854
|
+
* @description W3C Web Annotation JSON-LD context
|
|
1855
|
+
* @default http://www.w3.org/ns/anno.jsonld
|
|
1856
|
+
* @enum {string}
|
|
1857
|
+
*/
|
|
1858
|
+
"@context": "http://www.w3.org/ns/anno.jsonld";
|
|
1859
|
+
/**
|
|
1860
|
+
* @description W3C Annotation type
|
|
1861
|
+
* @default Annotation
|
|
1862
|
+
* @enum {string}
|
|
1863
|
+
*/
|
|
1864
|
+
type: "Annotation";
|
|
1865
|
+
id: string;
|
|
1866
|
+
motivation: components["schemas"]["Motivation"];
|
|
1867
|
+
/** @description W3C Web Annotation target - can be a simple IRI string (entire resource) or an object with source and optional selector (fragment) */
|
|
1868
|
+
target: string | components["schemas"]["AnnotationTarget"];
|
|
1869
|
+
/** @description W3C Web Annotation body. Optional per the W3C spec — annotations whose motivation alone is meaningful (highlighting) legitimately omit it. Present values are either a single body or a non-empty array of bodies; the prior empty-array 'stub' branch has been removed (it was a naming lie shared between highlights and never-actually-emitted stub references, and the source of the #651 reference-annotation validator bug). */
|
|
1870
|
+
body?: components["schemas"]["AnnotationBody"] | components["schemas"]["AnnotationBody"][];
|
|
1871
|
+
/** @description Web Annotation creator — the entity that initiated the annotation. For human-driven work this is a Person; for autonomous-agent work this is a Software peer. */
|
|
1872
|
+
creator?: components["schemas"]["Agent"];
|
|
1873
|
+
created?: string;
|
|
1874
|
+
modified?: string;
|
|
1875
|
+
/** @description Web Annotation generator — the SoftwareAgent that produced the annotation, when software was involved. Absent for purely manual annotations. Single object is the common case; array supports pipelines that combine multiple software peers. */
|
|
1876
|
+
generator?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
|
|
1877
|
+
/** @description PROV-O wasAttributedTo — all parties responsible for this annotation. For human-prompted AI work this combines `creator` (the Person) and `generator` (the Software). For purely manual annotations it equals `[creator]`; for autonomous-agent work it equals `[generator]` (and `creator` may be the same Software). */
|
|
1878
|
+
wasAttributedTo?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
|
|
1879
|
+
};
|
|
1880
|
+
/** @description Phase 2: Body can be TextualBody (for entity tags, descriptions) or SpecificResource (for links) */
|
|
1881
|
+
AnnotationBody: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
1882
|
+
AnnotationContextResponse: {
|
|
1883
|
+
annotation: components["schemas"]["Annotation"];
|
|
1884
|
+
context: {
|
|
1885
|
+
before?: string;
|
|
1886
|
+
selected: string;
|
|
1887
|
+
after?: string;
|
|
1888
|
+
};
|
|
1889
|
+
resource: components["schemas"]["ResourceDescriptor"];
|
|
1890
|
+
};
|
|
1891
|
+
AnnotationLLMContextResponse: {
|
|
1892
|
+
annotation: components["schemas"]["Annotation"];
|
|
1893
|
+
sourceResource: components["schemas"]["ResourceDescriptor"];
|
|
1894
|
+
targetResource?: components["schemas"]["ResourceDescriptor"] | null;
|
|
1895
|
+
/** @description Gathered context for this annotation */
|
|
1896
|
+
context?: components["schemas"]["GatheredContext"];
|
|
1897
|
+
/** @description DEPRECATED: Use 'context' instead. Legacy source context format. */
|
|
1898
|
+
sourceContext?: {
|
|
1899
|
+
before: string;
|
|
1900
|
+
selected: string;
|
|
1901
|
+
after: string;
|
|
1902
|
+
};
|
|
1903
|
+
targetContext?: {
|
|
1904
|
+
content: string;
|
|
1905
|
+
summary?: string;
|
|
1906
|
+
};
|
|
1907
|
+
suggestedResolution?: {
|
|
1908
|
+
resourceId: string;
|
|
1909
|
+
resourceName: string;
|
|
1910
|
+
confidence: number;
|
|
1911
|
+
reasoning: string;
|
|
1912
|
+
};
|
|
1913
|
+
};
|
|
1914
|
+
/** @description W3C Web Annotation target object - source is required, selector is optional */
|
|
1915
|
+
AnnotationTarget: {
|
|
1916
|
+
/** @description IRI of the resource being annotated */
|
|
1917
|
+
source: string;
|
|
1918
|
+
/** @description Optional selector to identify a specific segment of the source resource */
|
|
1919
|
+
selector?: components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"] | (components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"])[];
|
|
1920
|
+
};
|
|
1921
|
+
AuthResponse: {
|
|
1922
|
+
success: boolean;
|
|
1923
|
+
user: {
|
|
1924
|
+
id: string;
|
|
1925
|
+
email: string;
|
|
1926
|
+
name: string | null;
|
|
1927
|
+
image: string | null;
|
|
1928
|
+
domain: string;
|
|
1929
|
+
isAdmin: boolean;
|
|
1930
|
+
};
|
|
1931
|
+
/** @description Short-lived access token (1 hour). Use as Authorization: Bearer header on API calls. */
|
|
1932
|
+
token: string;
|
|
1933
|
+
/** @description Long-lived refresh token (30 days). Exchange via POST /api/tokens/refresh for a fresh access token. */
|
|
1934
|
+
refreshToken: string;
|
|
1935
|
+
isNewUser: boolean;
|
|
1936
|
+
};
|
|
1937
|
+
BrowseFilesResponse: {
|
|
1938
|
+
/** @description The directory path that was listed, relative to project root */
|
|
1939
|
+
path: string;
|
|
1940
|
+
entries: components["schemas"]["DirectoryEntry"][];
|
|
1941
|
+
};
|
|
1942
|
+
/** @description Emit an event on the Semiont bus. Channel names come from bus-protocol.ts; payload shape is validated against the channel's registered schema (CHANNEL_SCHEMAS). An optional scope routes resource-scoped broadcasts (e.g. mark:added, job:complete) to per-resource subscribers via eventBus.scope(scope); leave it unset for unscoped/global events. */
|
|
1943
|
+
BusEmitRequest: {
|
|
1944
|
+
/** @description Channel name from bus-protocol.ts EventMap */
|
|
1945
|
+
channel: string;
|
|
1946
|
+
/** @description Channel-specific payload, validated against CHANNEL_SCHEMAS */
|
|
1947
|
+
payload: {
|
|
1948
|
+
[key: string]: unknown;
|
|
1949
|
+
};
|
|
1950
|
+
/** @description Optional resource scope for broadcast channels (e.g. resourceId). Publishers only — frontends must never set this. */
|
|
1951
|
+
scope?: string;
|
|
1952
|
+
};
|
|
1953
|
+
/** @description User's cookie consent preferences. `necessary` is always true — necessary cookies cannot be disabled. Timestamps and version are stamped server-side. */
|
|
1954
|
+
CookieConsent: {
|
|
1955
|
+
/** @enum {boolean} */
|
|
1956
|
+
necessary: true;
|
|
1957
|
+
analytics: boolean;
|
|
1958
|
+
marketing: boolean;
|
|
1959
|
+
preferences: boolean;
|
|
1960
|
+
/** Format: date-time */
|
|
1961
|
+
timestamp: string;
|
|
1962
|
+
version: string;
|
|
1963
|
+
};
|
|
1964
|
+
/** @description Request body for POST /api/cookies/consent. All four preference fields must be booleans; `necessary` must be true. */
|
|
1965
|
+
CookieConsentRequest: {
|
|
1966
|
+
/** @enum {boolean} */
|
|
1967
|
+
necessary: true;
|
|
1968
|
+
analytics: boolean;
|
|
1969
|
+
marketing: boolean;
|
|
1970
|
+
preferences: boolean;
|
|
1971
|
+
};
|
|
1972
|
+
/** @description Standard envelope for cookie consent endpoints. On success `success: true` and `consent` carries the current preferences; on error `success: false` and `error` carries a human-readable message. */
|
|
1973
|
+
CookieConsentResponse: {
|
|
1974
|
+
success: boolean;
|
|
1975
|
+
consent?: components["schemas"]["CookieConsent"];
|
|
1976
|
+
error?: string;
|
|
1977
|
+
};
|
|
1978
|
+
/** @description GDPR data export of a user's cookie-related data. The response is returned as a file download (Content-Disposition: attachment). */
|
|
1979
|
+
CookieExportResponse: {
|
|
1980
|
+
user: {
|
|
1981
|
+
id: string;
|
|
1982
|
+
email: string;
|
|
1983
|
+
};
|
|
1984
|
+
consent: components["schemas"]["CookieConsent"];
|
|
1985
|
+
/** Format: date-time */
|
|
1986
|
+
exportDate: string;
|
|
1987
|
+
dataRetentionPolicy: string;
|
|
1988
|
+
};
|
|
1989
|
+
DirectoryEntry: components["schemas"]["FileEntry"] | components["schemas"]["DirEntry"];
|
|
1990
|
+
FileEntry: {
|
|
1991
|
+
/** @enum {string} */
|
|
1992
|
+
type: "file";
|
|
1993
|
+
/** @description Entry name (basename) */
|
|
1994
|
+
name: string;
|
|
1995
|
+
/** @description Path relative to project root */
|
|
1996
|
+
path: string;
|
|
1997
|
+
/** @description File size in bytes */
|
|
1998
|
+
size: number;
|
|
1999
|
+
/**
|
|
2000
|
+
* Format: date-time
|
|
2001
|
+
* @description Last modified time (ISO 8601)
|
|
2002
|
+
*/
|
|
2003
|
+
mtime: string;
|
|
2004
|
+
/** @description True if this file is a tracked resource in the Knowledge Base */
|
|
2005
|
+
tracked: boolean;
|
|
2006
|
+
/** @description Resource ID (only when tracked is true) */
|
|
2007
|
+
resourceId?: string;
|
|
2008
|
+
/** @description Entity types assigned to this resource (only when tracked is true) */
|
|
2009
|
+
entityTypes?: string[];
|
|
2010
|
+
/** @description Number of annotations on this resource (only when tracked is true) */
|
|
2011
|
+
annotationCount?: number;
|
|
2012
|
+
/** @description DID of the user who created the resource (only when tracked is true) */
|
|
2013
|
+
creator?: string;
|
|
2014
|
+
};
|
|
2015
|
+
DirEntry: {
|
|
2016
|
+
/** @enum {string} */
|
|
2017
|
+
type: "dir";
|
|
2018
|
+
/** @description Entry name (basename) */
|
|
2019
|
+
name: string;
|
|
2020
|
+
/** @description Path relative to project root */
|
|
2021
|
+
path: string;
|
|
2022
|
+
/**
|
|
2023
|
+
* Format: date-time
|
|
2024
|
+
* @description Last modified time (ISO 8601)
|
|
2025
|
+
*/
|
|
2026
|
+
mtime: string;
|
|
2027
|
+
};
|
|
2028
|
+
BodyOperationAdd: {
|
|
2029
|
+
/** @enum {string} */
|
|
2030
|
+
op: "add";
|
|
2031
|
+
item: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2032
|
+
};
|
|
2033
|
+
BodyOperationRemove: {
|
|
2034
|
+
/** @enum {string} */
|
|
2035
|
+
op: "remove";
|
|
2036
|
+
item: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2037
|
+
};
|
|
2038
|
+
BodyOperationReplace: {
|
|
2039
|
+
/** @enum {string} */
|
|
2040
|
+
op: "replace";
|
|
2041
|
+
oldItem: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2042
|
+
newItem: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2043
|
+
};
|
|
2044
|
+
CloneResourceWithTokenResponse: {
|
|
2045
|
+
/** @description Generated clone token */
|
|
2046
|
+
token: string;
|
|
2047
|
+
/** @description ISO 8601 timestamp when token expires */
|
|
2048
|
+
expiresAt: string;
|
|
2049
|
+
resource: components["schemas"]["ResourceDescriptor"];
|
|
2050
|
+
};
|
|
2051
|
+
/** @description Error response for failed bus commands. Replaces native Error objects on the EventBus so payloads are serializable and OpenAPI-typed. */
|
|
2052
|
+
CommandError: {
|
|
2053
|
+
/** @description Optional correlation id echoed from the originating command. When present, the failure event can be matched back to the specific command that failed. */
|
|
2054
|
+
correlationId?: string;
|
|
2055
|
+
/** @description Human-readable error message */
|
|
2056
|
+
message: string;
|
|
2057
|
+
/** @description Optional additional context (stack trace, field name, etc.) */
|
|
2058
|
+
details?: string;
|
|
2059
|
+
};
|
|
2060
|
+
/**
|
|
2061
|
+
* @description Content format as MIME type, optionally with charset parameter. Values include: text/plain, text/plain; charset=utf-8, text/plain; charset=iso-8859-1, text/markdown, text/markdown; charset=windows-1252, image/png, image/jpeg, application/pdf
|
|
2062
|
+
* @example text/plain; charset=utf-8
|
|
2063
|
+
*/
|
|
2064
|
+
ContentFormat: string;
|
|
2065
|
+
ContextualSummaryResponse: {
|
|
2066
|
+
summary: string;
|
|
2067
|
+
relevantFields: {
|
|
2068
|
+
[key: string]: unknown;
|
|
2069
|
+
};
|
|
2070
|
+
context: {
|
|
2071
|
+
before?: string;
|
|
2072
|
+
selected: string;
|
|
2073
|
+
after?: string;
|
|
2074
|
+
};
|
|
2075
|
+
};
|
|
2076
|
+
CreateAnnotationRequest: {
|
|
2077
|
+
motivation: components["schemas"]["Motivation"];
|
|
2078
|
+
target: {
|
|
2079
|
+
source: string;
|
|
2080
|
+
selector: components["schemas"]["TextPositionSelector"] | {
|
|
2081
|
+
/** @enum {string} */
|
|
2082
|
+
type: "TextQuoteSelector";
|
|
2083
|
+
exact: string;
|
|
2084
|
+
prefix?: string;
|
|
2085
|
+
suffix?: string;
|
|
2086
|
+
} | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"] | (components["schemas"]["TextPositionSelector"] | {
|
|
2087
|
+
/** @enum {string} */
|
|
2088
|
+
type: "TextQuoteSelector";
|
|
2089
|
+
exact: string;
|
|
2090
|
+
prefix?: string;
|
|
2091
|
+
suffix?: string;
|
|
2092
|
+
} | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"])[];
|
|
2093
|
+
};
|
|
2094
|
+
/** @description Optional body. Omit for annotations whose motivation alone is meaningful (highlighting) or whose user-supplied content is empty. Shape matches Annotation.body. */
|
|
2095
|
+
body?: components["schemas"]["AnnotationBody"] | components["schemas"]["AnnotationBody"][];
|
|
2096
|
+
};
|
|
2097
|
+
/** @description Response body for POST /resources (202 Accepted). Resource creation is asynchronous — the backend writes content to disk, emits yield:create on the bus, and returns the newly-minted resourceId immediately. Consumers watch SSE domain events (yield:created) to observe the fully-persisted state. */
|
|
2098
|
+
CreateResourceResponse: {
|
|
2099
|
+
/** @description The id of the newly-created resource. Assigned by Stower when it persists yield:create. */
|
|
2100
|
+
resourceId: string;
|
|
2101
|
+
};
|
|
2102
|
+
DeleteUserResponse: {
|
|
2103
|
+
success: boolean;
|
|
2104
|
+
message: string;
|
|
2105
|
+
};
|
|
2106
|
+
/** @description Progress payload emitted on gather:annotation-progress and gather:progress SSE channels during LLM context gathering. */
|
|
2107
|
+
GatherProgress: {
|
|
2108
|
+
message?: string;
|
|
2109
|
+
percentage?: number;
|
|
2110
|
+
};
|
|
2111
|
+
/** @description Completion payload emitted on gather:annotation-finished SSE channel. */
|
|
2112
|
+
GatherAnnotationFinished: {
|
|
2113
|
+
correlationId: string;
|
|
2114
|
+
annotationId: string;
|
|
2115
|
+
response: components["schemas"]["AnnotationLLMContextResponse"];
|
|
2116
|
+
};
|
|
2117
|
+
/** @description Completion payload emitted on gather:finished SSE channel for resource-level context gathering. */
|
|
2118
|
+
GatherFinished: {
|
|
2119
|
+
correlationId: string;
|
|
2120
|
+
resourceId: string;
|
|
2121
|
+
response: components["schemas"]["ResourceLLMContextResponse"];
|
|
2122
|
+
};
|
|
2123
|
+
/** @description Search results payload emitted on match:search-results SSE channel. */
|
|
2124
|
+
MatchSearchResult: {
|
|
2125
|
+
correlationId: string;
|
|
2126
|
+
referenceId: string;
|
|
2127
|
+
response: (components["schemas"]["ResourceDescriptor"] & {
|
|
2128
|
+
/** @description Relevance score */
|
|
2129
|
+
score?: number;
|
|
2130
|
+
/** @description Human-readable reason for the match */
|
|
2131
|
+
matchReason?: string;
|
|
2132
|
+
})[];
|
|
2133
|
+
};
|
|
2134
|
+
/** @description Error payload emitted on match:search-failed SSE channel. */
|
|
2135
|
+
MatchSearchFailed: {
|
|
2136
|
+
correlationId: string;
|
|
2137
|
+
referenceId: string;
|
|
2138
|
+
error: string;
|
|
2139
|
+
};
|
|
2140
|
+
/** @description Metadata added at persistence time. Part of every StoredEvent. Integrity is provided by git at the commit level (when gitSync is enabled), not by in-event metadata fields. */
|
|
2141
|
+
EventMetadata: {
|
|
2142
|
+
/** @description Monotonic position in the event log (ordering authority) */
|
|
2143
|
+
sequenceNumber: number;
|
|
2144
|
+
/** @description Byte offset in the JSONL file */
|
|
2145
|
+
streamPosition: number;
|
|
2146
|
+
/** @description Optional correlation id propagated from a command. Lets clients match command-result events back to the POST that initiated them. Set by EventStore.appendEvent's options when a route handler passes one through. */
|
|
2147
|
+
correlationId?: string;
|
|
2148
|
+
};
|
|
2149
|
+
/** @description Selection data for user-initiated annotations. Captures the text range and optional selector information from a user's highlight in the UI. */
|
|
2150
|
+
SelectionData: {
|
|
2151
|
+
/** @description The exact selected text */
|
|
2152
|
+
exact: string;
|
|
2153
|
+
/** @description Start character offset */
|
|
2154
|
+
start: number;
|
|
2155
|
+
/** @description End character offset */
|
|
2156
|
+
end: number;
|
|
2157
|
+
/** @description SVG selector for non-text selections (e.g. PDF regions) */
|
|
2158
|
+
svgSelector?: string;
|
|
2159
|
+
/** @description Fragment selector (e.g. page=2) */
|
|
2160
|
+
fragmentSelector?: string;
|
|
2161
|
+
/** @description Specification the fragment selector conforms to */
|
|
2162
|
+
conformsTo?: string;
|
|
2163
|
+
/** @description Text before the selection (for disambiguation) */
|
|
2164
|
+
prefix?: string;
|
|
2165
|
+
/** @description Text after the selection (for disambiguation) */
|
|
2166
|
+
suffix?: string;
|
|
2167
|
+
};
|
|
2168
|
+
/** @description A persisted domain event with metadata. Flat shape — event fields and metadata are peers. */
|
|
2169
|
+
StoredEventResponse: {
|
|
2170
|
+
/** @description Unique event ID (UUID) */
|
|
2171
|
+
id: string;
|
|
2172
|
+
/** @description Event type (flow verb name, e.g. mark:added) */
|
|
2173
|
+
type: string;
|
|
2174
|
+
/**
|
|
2175
|
+
* Format: date-time
|
|
2176
|
+
* @description When the event occurred
|
|
2177
|
+
*/
|
|
2178
|
+
timestamp: string;
|
|
2179
|
+
/** @description DID of the user who triggered the event */
|
|
2180
|
+
userId: string;
|
|
2181
|
+
/** @description Resource this event affects (absent for system events) */
|
|
2182
|
+
resourceId?: string;
|
|
2183
|
+
/** @description Event schema version */
|
|
2184
|
+
version: number;
|
|
2185
|
+
/** @description Event-type-specific payload */
|
|
2186
|
+
payload: {
|
|
2187
|
+
[key: string]: unknown;
|
|
2188
|
+
};
|
|
2189
|
+
metadata: components["schemas"]["EventMetadata"];
|
|
2190
|
+
};
|
|
2191
|
+
/** @description Wire format emitted by GET /resources/:id/events/stream. Extends StoredEventResponse with optional enrichment fields populated from the materialized view at SSE-write time. Subscribers can read the enrichment fields directly to update local caches without an additional fetch. */
|
|
2192
|
+
EnrichedResourceEvent: components["schemas"]["StoredEventResponse"] & {
|
|
2193
|
+
/** @description Populated for events that mutate an annotation (mark:added, mark:body-updated, mark:removed). Carries the post-materialization annotation as it exists in the view, so subscribers can update local caches in-place without refetching. Absent for events that don't touch annotations. */
|
|
2194
|
+
annotation?: components["schemas"]["Annotation"];
|
|
2195
|
+
};
|
|
2196
|
+
/** @description Payload for yield:created domain event */
|
|
2197
|
+
ResourceCreatedPayload: {
|
|
2198
|
+
name: string;
|
|
2199
|
+
format: components["schemas"]["ContentFormat"];
|
|
2200
|
+
/** @description SHA-256 of content */
|
|
2201
|
+
contentChecksum: string;
|
|
2202
|
+
contentByteSize?: number;
|
|
2203
|
+
entityTypes?: string[];
|
|
2204
|
+
/** @description Working-tree URI (e.g. file://docs/overview.md) */
|
|
2205
|
+
storageUri?: string;
|
|
2206
|
+
language?: string;
|
|
2207
|
+
isDraft?: boolean;
|
|
2208
|
+
generatedFrom?: {
|
|
2209
|
+
resourceId: string;
|
|
2210
|
+
annotationId: string;
|
|
2211
|
+
};
|
|
2212
|
+
generationPrompt?: string;
|
|
2213
|
+
generator?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
|
|
2214
|
+
};
|
|
2215
|
+
/** @description Payload for yield:cloned domain event */
|
|
2216
|
+
ResourceClonedPayload: {
|
|
2217
|
+
name: string;
|
|
2218
|
+
format: components["schemas"]["ContentFormat"];
|
|
2219
|
+
contentChecksum: string;
|
|
2220
|
+
contentByteSize?: number;
|
|
2221
|
+
parentResourceId: string;
|
|
2222
|
+
entityTypes?: string[];
|
|
2223
|
+
language?: string;
|
|
2224
|
+
};
|
|
2225
|
+
/** @description Payload for yield:updated domain event */
|
|
2226
|
+
ResourceUpdatedPayload: {
|
|
2227
|
+
/** @description SHA-256 of new content */
|
|
2228
|
+
contentChecksum: string;
|
|
2229
|
+
contentByteSize?: number;
|
|
2230
|
+
};
|
|
2231
|
+
/** @description Payload for yield:moved domain event */
|
|
2232
|
+
ResourceMovedPayload: {
|
|
2233
|
+
/** @description Previous file:// URI */
|
|
2234
|
+
fromUri: string;
|
|
2235
|
+
/** @description New file:// URI */
|
|
2236
|
+
toUri: string;
|
|
2237
|
+
};
|
|
2238
|
+
/** @description Payload for mark:archived domain event */
|
|
2239
|
+
ResourceArchivedPayload: {
|
|
2240
|
+
reason?: string;
|
|
2241
|
+
};
|
|
2242
|
+
/** @description Payload for mark:unarchived domain event (empty payload) */
|
|
2243
|
+
ResourceUnarchivedPayload: Record<string, never>;
|
|
2244
|
+
/** @description Payload for yield:representation-added domain event */
|
|
2245
|
+
RepresentationAddedPayload: {
|
|
2246
|
+
representation: components["schemas"]["Representation"];
|
|
2247
|
+
};
|
|
2248
|
+
/** @description Payload for yield:representation-removed domain event */
|
|
2249
|
+
RepresentationRemovedPayload: {
|
|
2250
|
+
/** @description Checksum of the representation to remove */
|
|
2251
|
+
checksum: string;
|
|
2252
|
+
};
|
|
2253
|
+
/** @description Payload for mark:added domain event */
|
|
2254
|
+
AnnotationAddedPayload: {
|
|
2255
|
+
annotation: components["schemas"]["Annotation"];
|
|
2256
|
+
/** @description SHA-256 of resource content at annotation time */
|
|
2257
|
+
contentChecksum?: string;
|
|
2258
|
+
};
|
|
2259
|
+
/** @description Payload for mark:removed domain event */
|
|
2260
|
+
AnnotationRemovedPayload: {
|
|
2261
|
+
annotationId: string;
|
|
2262
|
+
};
|
|
2263
|
+
/** @description Payload for mark:body-updated domain event */
|
|
2264
|
+
AnnotationBodyUpdatedPayload: {
|
|
2265
|
+
annotationId: string;
|
|
2266
|
+
operations: (components["schemas"]["BodyOperationAdd"] | components["schemas"]["BodyOperationRemove"] | components["schemas"]["BodyOperationReplace"])[];
|
|
2267
|
+
};
|
|
2268
|
+
/** @description Payload for frame:entity-type-added domain event (system-level, no resourceId — fan-out is global) */
|
|
2269
|
+
EntityTypeAddedPayload: {
|
|
2270
|
+
entityType: string;
|
|
2271
|
+
};
|
|
2272
|
+
/** @description Payload for frame:tag-schema-added domain event (system-level, no resourceId — fan-out is global to the KB). */
|
|
2273
|
+
TagSchemaAddedPayload: {
|
|
2274
|
+
schema: components["schemas"]["TagSchema"];
|
|
2275
|
+
};
|
|
2276
|
+
/** @description Payload for mark:entity-tag-added and mark:entity-tag-removed domain events */
|
|
2277
|
+
EntityTagChangedPayload: {
|
|
2278
|
+
entityType: string;
|
|
2279
|
+
};
|
|
2280
|
+
/**
|
|
2281
|
+
* @description Type of background job
|
|
2282
|
+
* @enum {string}
|
|
2283
|
+
*/
|
|
2284
|
+
JobType: "reference-annotation" | "generation" | "highlight-annotation" | "assessment-annotation" | "comment-annotation" | "tag-annotation";
|
|
2285
|
+
/** @description Payload for job:started domain event */
|
|
2286
|
+
JobStartedPayload: {
|
|
2287
|
+
jobId: string;
|
|
2288
|
+
jobType: components["schemas"]["JobType"];
|
|
2289
|
+
/** @description Annotation this job is attached to, when applicable */
|
|
2290
|
+
annotationId?: string;
|
|
2291
|
+
totalSteps?: number;
|
|
2292
|
+
};
|
|
2293
|
+
/** @description Payload for job:progress domain event */
|
|
2294
|
+
JobProgressPayload: {
|
|
2295
|
+
jobId: string;
|
|
2296
|
+
jobType: components["schemas"]["JobType"];
|
|
2297
|
+
percentage: number;
|
|
2298
|
+
/** @description Human-readable current step */
|
|
2299
|
+
currentStep?: string;
|
|
2300
|
+
processedSteps?: number;
|
|
2301
|
+
totalSteps?: number;
|
|
2302
|
+
/** @description For detection: entities found so far */
|
|
2303
|
+
foundCount?: number;
|
|
2304
|
+
message?: string;
|
|
2305
|
+
/** @description Full progress object for extensibility */
|
|
2306
|
+
progress?: {
|
|
2307
|
+
[key: string]: unknown;
|
|
2308
|
+
};
|
|
2309
|
+
};
|
|
2310
|
+
/** @description Payload for job:completed domain event */
|
|
2311
|
+
JobCompletedPayload: {
|
|
2312
|
+
jobId: string;
|
|
2313
|
+
jobType: components["schemas"]["JobType"];
|
|
2314
|
+
/** @description Annotation this job was attached to, when applicable */
|
|
2315
|
+
annotationId?: string;
|
|
2316
|
+
totalSteps?: number;
|
|
2317
|
+
/** @description For detection: total entities found */
|
|
2318
|
+
foundCount?: number;
|
|
2319
|
+
/** @description For generation: ID of generated resource */
|
|
2320
|
+
resultResourceId?: string;
|
|
2321
|
+
/** @description For generation: URI of annotation that triggered generation */
|
|
2322
|
+
annotationUri?: string;
|
|
2323
|
+
message?: string;
|
|
2324
|
+
/** @description Full result object for extensibility */
|
|
2325
|
+
result?: {
|
|
2326
|
+
[key: string]: unknown;
|
|
2327
|
+
};
|
|
2328
|
+
};
|
|
2329
|
+
/** @description Payload for job:failed domain event */
|
|
2330
|
+
JobFailedPayload: {
|
|
2331
|
+
jobId: string;
|
|
2332
|
+
jobType: components["schemas"]["JobType"];
|
|
2333
|
+
/** @description Annotation this job was attached to, when applicable */
|
|
2334
|
+
annotationId?: string;
|
|
2335
|
+
error: string;
|
|
2336
|
+
details?: string;
|
|
2337
|
+
};
|
|
2338
|
+
ErrorResponse: {
|
|
2339
|
+
error: string;
|
|
2340
|
+
code?: string;
|
|
2341
|
+
details?: unknown;
|
|
2342
|
+
};
|
|
2343
|
+
EventStreamResponse: {
|
|
2344
|
+
event: string;
|
|
2345
|
+
data: string;
|
|
2346
|
+
id?: string;
|
|
2347
|
+
};
|
|
2348
|
+
GetAnnotationHistoryResponse: {
|
|
2349
|
+
events: components["schemas"]["StoredEventResponse"][];
|
|
2350
|
+
total: number;
|
|
2351
|
+
annotationId: string;
|
|
2352
|
+
resourceId: string;
|
|
2353
|
+
};
|
|
2354
|
+
GetAnnotationResponse: {
|
|
2355
|
+
annotation: components["schemas"]["Annotation"];
|
|
2356
|
+
resource: components["schemas"]["ResourceDescriptor"] | null;
|
|
2357
|
+
resolvedResource: components["schemas"]["ResourceDescriptor"] | null;
|
|
2358
|
+
};
|
|
2359
|
+
GetAnnotationsResponse: {
|
|
2360
|
+
annotations: components["schemas"]["Annotation"][];
|
|
2361
|
+
/** @description Total number of annotations */
|
|
2362
|
+
total: number;
|
|
2363
|
+
/** @description Motivation filter applied (if any) */
|
|
2364
|
+
motivation?: components["schemas"]["Motivation"] | null;
|
|
2365
|
+
};
|
|
2366
|
+
GetEntityTypesResponse: {
|
|
2367
|
+
entityTypes: string[];
|
|
2368
|
+
};
|
|
2369
|
+
GetEventsResponse: {
|
|
2370
|
+
events: components["schemas"]["StoredEventResponse"][];
|
|
2371
|
+
total: number;
|
|
2372
|
+
resourceId: string;
|
|
2373
|
+
};
|
|
2374
|
+
GetReferencedByResponse: {
|
|
2375
|
+
referencedBy: {
|
|
2376
|
+
/** @description Reference annotation ID */
|
|
2377
|
+
id: string;
|
|
2378
|
+
/** @description Name of resource containing the reference */
|
|
2379
|
+
resourceName: string;
|
|
2380
|
+
target: {
|
|
2381
|
+
/** @description ID of resource containing the reference */
|
|
2382
|
+
source: string;
|
|
2383
|
+
selector: {
|
|
2384
|
+
/** @description The selected text that references this resource */
|
|
2385
|
+
exact: string;
|
|
2386
|
+
};
|
|
2387
|
+
};
|
|
2388
|
+
}[];
|
|
2389
|
+
};
|
|
2390
|
+
GetResourceByTokenResponse: {
|
|
2391
|
+
sourceResource: components["schemas"]["ResourceDescriptor"];
|
|
2392
|
+
/** @description ISO 8601 timestamp when token expires */
|
|
2393
|
+
expiresAt: string;
|
|
2394
|
+
};
|
|
2395
|
+
GetResourceResponse: {
|
|
2396
|
+
resource: components["schemas"]["ResourceDescriptor"];
|
|
2397
|
+
/** @description All annotations for the resource (highlights, references, assessments, etc.) */
|
|
2398
|
+
annotations: components["schemas"]["Annotation"][];
|
|
2399
|
+
/** @description Annotations that reference this resource from other resources */
|
|
2400
|
+
entityReferences: components["schemas"]["Annotation"][];
|
|
2401
|
+
};
|
|
2402
|
+
GetTagSchemasResponse: {
|
|
2403
|
+
tagSchemas: components["schemas"]["TagSchema"][];
|
|
2404
|
+
};
|
|
2405
|
+
GoogleAuthRequest: {
|
|
2406
|
+
access_token: string;
|
|
2407
|
+
};
|
|
2408
|
+
HealthResponse: {
|
|
2409
|
+
status: string;
|
|
2410
|
+
message: string;
|
|
2411
|
+
version: string;
|
|
2412
|
+
timestamp: string;
|
|
2413
|
+
/** @enum {string} */
|
|
2414
|
+
database: "connected" | "disconnected" | "unknown";
|
|
2415
|
+
environment: string;
|
|
2416
|
+
};
|
|
2417
|
+
JobStatusResponse: {
|
|
2418
|
+
jobId: string;
|
|
2419
|
+
/** @enum {string} */
|
|
2420
|
+
type: "reference-annotation" | "generation" | "highlight-annotation" | "assessment-annotation" | "comment-annotation" | "tag-annotation";
|
|
2421
|
+
/** @enum {string} */
|
|
2422
|
+
status: "pending" | "running" | "complete" | "failed" | "cancelled";
|
|
2423
|
+
userId: string;
|
|
2424
|
+
created: string;
|
|
2425
|
+
startedAt?: string;
|
|
2426
|
+
completedAt?: string;
|
|
2427
|
+
error?: string;
|
|
2428
|
+
progress?: unknown;
|
|
2429
|
+
result?: unknown;
|
|
2430
|
+
};
|
|
2431
|
+
ListResourcesResponse: {
|
|
2432
|
+
resources: components["schemas"]["ResourceDescriptor"][];
|
|
2433
|
+
total: number;
|
|
2434
|
+
offset: number;
|
|
2435
|
+
limit: number;
|
|
2436
|
+
};
|
|
2437
|
+
PasswordAuthRequest: {
|
|
2438
|
+
/**
|
|
2439
|
+
* Format: email
|
|
2440
|
+
* @description User email address
|
|
2441
|
+
*/
|
|
2442
|
+
email: string;
|
|
2443
|
+
/** @description User password (minimum 8 characters) */
|
|
2444
|
+
password: string;
|
|
2445
|
+
};
|
|
2446
|
+
MCPGenerateResponse: {
|
|
2447
|
+
refresh_token: string;
|
|
2448
|
+
};
|
|
2449
|
+
/**
|
|
2450
|
+
* @description Semiont-supported W3C Web Annotation motivations - https://www.w3.org/TR/annotation-vocab/#motivation
|
|
2451
|
+
* @enum {string}
|
|
2452
|
+
*/
|
|
2453
|
+
Motivation: "assessing" | "commenting" | "highlighting" | "linking" | "tagging";
|
|
2454
|
+
OAuthConfigResponse: {
|
|
2455
|
+
providers: {
|
|
2456
|
+
name: string;
|
|
2457
|
+
isConfigured: boolean;
|
|
2458
|
+
clientId: string;
|
|
2459
|
+
}[];
|
|
2460
|
+
allowedDomains: string[];
|
|
2461
|
+
};
|
|
2462
|
+
/** @description A specific, byte-addressable rendition of a resource (file/asset/variant). */
|
|
2463
|
+
Representation: {
|
|
2464
|
+
/**
|
|
2465
|
+
* Format: uri
|
|
2466
|
+
* @description Stable ID for this representation.
|
|
2467
|
+
*/
|
|
2468
|
+
"@id"?: string;
|
|
2469
|
+
/** @description Type(s), e.g., schema:MediaObject. */
|
|
2470
|
+
"@type"?: string | string[];
|
|
2471
|
+
/** @description MIME/media type (e.g., text/markdown, image/png). */
|
|
2472
|
+
mediaType: string;
|
|
2473
|
+
/** @description Working-tree URI identifying where the bytes live. Only file:// is supported (e.g. file://docs/overview.md). */
|
|
2474
|
+
storageUri?: string;
|
|
2475
|
+
filename?: string;
|
|
2476
|
+
/** @description Size of the payload in bytes. */
|
|
2477
|
+
byteSize?: number;
|
|
2478
|
+
/** @description Integrity hash (e.g., sha256:abcd…). */
|
|
2479
|
+
checksum?: string;
|
|
2480
|
+
/** @description Compression/transfer encoding if applicable. */
|
|
2481
|
+
encoding?: string;
|
|
2482
|
+
/** @description IETF BCP 47 language tag (e.g., en, es-ES). */
|
|
2483
|
+
language?: string;
|
|
2484
|
+
/** @description Pixels (images/video). */
|
|
2485
|
+
width?: number;
|
|
2486
|
+
/** @description Pixels (images/video). */
|
|
2487
|
+
height?: number;
|
|
2488
|
+
/** @description Seconds (audio/video). */
|
|
2489
|
+
duration?: number;
|
|
2490
|
+
/** Format: date-time */
|
|
2491
|
+
created?: string;
|
|
2492
|
+
/** Format: date-time */
|
|
2493
|
+
modified?: string;
|
|
2494
|
+
/** @description Profile/shape the bytes conform to (e.g., a JSON profile or SVG profile). */
|
|
2495
|
+
conformsTo?: string | string[];
|
|
2496
|
+
tags?: string[];
|
|
2497
|
+
/**
|
|
2498
|
+
* @description Semantics of this rendition relative to the resource (e.g., original, thumbnail, preview, derived).
|
|
2499
|
+
* @enum {string}
|
|
2500
|
+
*/
|
|
2501
|
+
rel?: "original" | "thumbnail" | "preview" | "optimized" | "derived" | "other";
|
|
2502
|
+
} & {
|
|
2503
|
+
[key: string]: unknown;
|
|
2504
|
+
};
|
|
2505
|
+
/** @description Metadata about a resource (1:1 with its URI). JSON-LD subject is @id. Link to concrete bytes via representations. */
|
|
2506
|
+
ResourceDescriptor: {
|
|
2507
|
+
/** @description JSON-LD context; URI, object, or array of these. */
|
|
2508
|
+
"@context": string | {
|
|
2509
|
+
[key: string]: unknown;
|
|
2510
|
+
} | (string | {
|
|
2511
|
+
[key: string]: unknown;
|
|
2512
|
+
})[];
|
|
2513
|
+
/** @description Canonical URI/URN of the resource being described. */
|
|
2514
|
+
"@id": string;
|
|
2515
|
+
/** @description Type(s) of the resource (IRIs/CURIEs via @context). */
|
|
2516
|
+
"@type"?: string | string[];
|
|
2517
|
+
name: string;
|
|
2518
|
+
description?: string;
|
|
2519
|
+
/** @description Persistent identifiers (e.g., DOI, URN). */
|
|
2520
|
+
identifier?: string | string[] | ({
|
|
2521
|
+
/** Format: uri */
|
|
2522
|
+
"@id"?: string;
|
|
2523
|
+
value?: string;
|
|
2524
|
+
scheme?: string;
|
|
2525
|
+
} & {
|
|
2526
|
+
[key: string]: unknown;
|
|
2527
|
+
});
|
|
2528
|
+
/** @description Topics (IRIs or strings). */
|
|
2529
|
+
about?: string | string[];
|
|
2530
|
+
/** @description Equivalent/authoritative references. */
|
|
2531
|
+
sameAs?: string[];
|
|
2532
|
+
isPartOf?: string[];
|
|
2533
|
+
hasPart?: string[];
|
|
2534
|
+
/** Format: uri */
|
|
2535
|
+
license?: string;
|
|
2536
|
+
version?: string;
|
|
2537
|
+
/** Format: date-time */
|
|
2538
|
+
dateCreated?: string;
|
|
2539
|
+
/** Format: date-time */
|
|
2540
|
+
dateModified?: string;
|
|
2541
|
+
/** @description W3C PROV - source resources this was derived from */
|
|
2542
|
+
wasDerivedFrom?: string | string[];
|
|
2543
|
+
/** @description W3C PROV - agents responsible for this resource */
|
|
2544
|
+
wasAttributedTo?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
|
|
2545
|
+
/** @description Software agent that produced or processed this resource (W3C Web Annotation model) */
|
|
2546
|
+
generator?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
|
|
2547
|
+
/** @description Profile/shape URI this resource description conforms to. */
|
|
2548
|
+
conformsTo?: string | string[];
|
|
2549
|
+
/** @description Convenience set summarizing media types across representations. */
|
|
2550
|
+
availableFormats?: string[];
|
|
2551
|
+
/** @description Managed or referenced byte-level renditions of this resource. */
|
|
2552
|
+
representations: components["schemas"]["Representation"] | components["schemas"]["Representation"][];
|
|
2553
|
+
/** @description Application-specific: Whether this resource is archived */
|
|
2554
|
+
archived?: boolean;
|
|
2555
|
+
/** @description Application-specific: Entity types for this resource */
|
|
2556
|
+
entityTypes?: string[];
|
|
2557
|
+
/** @description Application-specific: Whether this resource is a draft */
|
|
2558
|
+
isDraft?: boolean;
|
|
2559
|
+
/** @description Application-specific: ID of annotation that triggered generation */
|
|
2560
|
+
sourceAnnotationId?: string;
|
|
2561
|
+
/** @description Application-specific: ID of source resource for clones/derivatives */
|
|
2562
|
+
sourceResourceId?: string;
|
|
2563
|
+
/**
|
|
2564
|
+
* Format: uri
|
|
2565
|
+
* @description Original URI from a source knowledge base when this resource was imported
|
|
2566
|
+
*/
|
|
2567
|
+
originatedFrom?: string;
|
|
2568
|
+
/** @description Working-tree URI for this resource (e.g. file://docs/overview.md). Stable across updates and moves. */
|
|
2569
|
+
storageUri?: string;
|
|
2570
|
+
/** @description SHA-256 hex hash of the current content. Updated on resource.created, resource.updated, resource.cloned events. */
|
|
2571
|
+
currentChecksum?: string;
|
|
2572
|
+
} & {
|
|
2573
|
+
[key: string]: unknown;
|
|
2574
|
+
};
|
|
2575
|
+
SemanticMatch: {
|
|
2576
|
+
/** @description The chunk text that matched */
|
|
2577
|
+
text: string;
|
|
2578
|
+
/** @description Source resource ID */
|
|
2579
|
+
resourceId: string;
|
|
2580
|
+
/** @description Source annotation ID, if the match is from an annotation */
|
|
2581
|
+
annotationId?: string;
|
|
2582
|
+
/** @description Cosine similarity score (0-1) */
|
|
2583
|
+
score: number;
|
|
2584
|
+
/** @description Entity types on the matched passage */
|
|
2585
|
+
entityTypes?: string[];
|
|
2586
|
+
};
|
|
2587
|
+
ResourceLLMContextResponse: {
|
|
2588
|
+
mainResource: components["schemas"]["ResourceDescriptor"];
|
|
2589
|
+
relatedResources: components["schemas"]["ResourceDescriptor"][];
|
|
2590
|
+
annotations: components["schemas"]["Annotation"][];
|
|
2591
|
+
graph: {
|
|
2592
|
+
nodes: {
|
|
2593
|
+
id: string;
|
|
2594
|
+
type: string;
|
|
2595
|
+
label: string;
|
|
2596
|
+
metadata: {
|
|
2597
|
+
[key: string]: unknown;
|
|
2598
|
+
};
|
|
2599
|
+
}[];
|
|
2600
|
+
edges: {
|
|
2601
|
+
source: string;
|
|
2602
|
+
target: string;
|
|
2603
|
+
type: string;
|
|
2604
|
+
metadata: {
|
|
2605
|
+
[key: string]: unknown;
|
|
2606
|
+
};
|
|
2607
|
+
}[];
|
|
2608
|
+
};
|
|
2609
|
+
summary?: string;
|
|
2610
|
+
suggestedReferences?: string[];
|
|
2611
|
+
/** @description The content of the main resource (included if includeContent=true) */
|
|
2612
|
+
mainResourceContent?: string;
|
|
2613
|
+
/** @description Map of resource IDs to their content (included if includeContent=true) */
|
|
2614
|
+
relatedResourcesContent?: {
|
|
2615
|
+
[key: string]: string;
|
|
2616
|
+
};
|
|
2617
|
+
};
|
|
2618
|
+
SpecificResource: {
|
|
2619
|
+
/** @enum {string} */
|
|
2620
|
+
type: "SpecificResource";
|
|
2621
|
+
/** @description IRI of the target resource */
|
|
2622
|
+
source: string;
|
|
2623
|
+
/** @description Why this body is included */
|
|
2624
|
+
purpose?: components["schemas"]["BodyPurpose"];
|
|
2625
|
+
};
|
|
2626
|
+
StatusResponse: {
|
|
2627
|
+
status: string;
|
|
2628
|
+
version: string;
|
|
2629
|
+
features: {
|
|
2630
|
+
semanticContent: string;
|
|
2631
|
+
collaboration: string;
|
|
2632
|
+
rbac: string;
|
|
2633
|
+
};
|
|
2634
|
+
message: string;
|
|
2635
|
+
authenticatedAs?: string;
|
|
2636
|
+
/** @description Name of the knowledge base project */
|
|
2637
|
+
projectName?: string;
|
|
2638
|
+
/** @description Current git branch of the knowledge base repository */
|
|
2639
|
+
gitBranch?: string;
|
|
2640
|
+
};
|
|
2641
|
+
TextPositionSelector: {
|
|
2642
|
+
/** @enum {string} */
|
|
2643
|
+
type: "TextPositionSelector";
|
|
2644
|
+
/** @description Character offset from resource start */
|
|
2645
|
+
start: number;
|
|
2646
|
+
/** @description Character offset from resource start */
|
|
2647
|
+
end: number;
|
|
2648
|
+
};
|
|
2649
|
+
TextQuoteSelector: {
|
|
2650
|
+
/** @enum {string} */
|
|
2651
|
+
type: "TextQuoteSelector";
|
|
2652
|
+
exact: string;
|
|
2653
|
+
prefix?: string;
|
|
2654
|
+
suffix?: string;
|
|
2655
|
+
};
|
|
2656
|
+
TextualBody: {
|
|
2657
|
+
/** @enum {string} */
|
|
2658
|
+
type: "TextualBody";
|
|
2659
|
+
/** @description The text content (e.g., entity type name) */
|
|
2660
|
+
value: string;
|
|
2661
|
+
/** @description Why this body is included */
|
|
2662
|
+
purpose?: components["schemas"]["BodyPurpose"];
|
|
2663
|
+
/** @description MIME type (defaults to text/plain) */
|
|
2664
|
+
format?: string;
|
|
2665
|
+
/** @description BCP 47 language tag */
|
|
2666
|
+
language?: string;
|
|
2667
|
+
};
|
|
2668
|
+
TokenRefreshRequest: {
|
|
2669
|
+
/**
|
|
2670
|
+
* @description Refresh token obtained during login
|
|
2671
|
+
* @example eyJhbGciOiJIUzI1NiIs...
|
|
2672
|
+
*/
|
|
2673
|
+
refreshToken: string;
|
|
2674
|
+
};
|
|
2675
|
+
TokenRefreshResponse: {
|
|
2676
|
+
access_token: string;
|
|
2677
|
+
};
|
|
2678
|
+
UpdateAnnotationBodyRequest: {
|
|
2679
|
+
/** @description Resource ID containing the annotation (required for O(1) Layer 3 lookup) */
|
|
2680
|
+
resourceId: string;
|
|
2681
|
+
/** @description Array of body modification operations to apply */
|
|
2682
|
+
operations: (components["schemas"]["BodyOperationAdd"] | components["schemas"]["BodyOperationRemove"] | components["schemas"]["BodyOperationReplace"])[];
|
|
2683
|
+
};
|
|
2684
|
+
UpdateUserRequest: {
|
|
2685
|
+
isAdmin?: boolean;
|
|
2686
|
+
isActive?: boolean;
|
|
2687
|
+
name?: string;
|
|
2688
|
+
};
|
|
2689
|
+
UpdateUserResponse: {
|
|
2690
|
+
success: boolean;
|
|
2691
|
+
user: {
|
|
2692
|
+
id: string;
|
|
2693
|
+
email: string;
|
|
2694
|
+
name?: string | null;
|
|
2695
|
+
image?: string | null;
|
|
2696
|
+
domain: string;
|
|
2697
|
+
provider: string;
|
|
2698
|
+
isAdmin: boolean;
|
|
2699
|
+
isActive: boolean;
|
|
2700
|
+
lastLogin?: string | null;
|
|
2701
|
+
created: string;
|
|
2702
|
+
updatedAt: string;
|
|
2703
|
+
};
|
|
2704
|
+
};
|
|
2705
|
+
UserResponse: {
|
|
2706
|
+
id: string;
|
|
2707
|
+
email: string;
|
|
2708
|
+
name: string | null;
|
|
2709
|
+
image: string | null;
|
|
2710
|
+
domain: string;
|
|
2711
|
+
provider: string;
|
|
2712
|
+
isAdmin: boolean;
|
|
2713
|
+
isModerator: boolean;
|
|
2714
|
+
isActive: boolean;
|
|
2715
|
+
termsAcceptedAt: string | null;
|
|
2716
|
+
lastLogin: string | null;
|
|
2717
|
+
created: string;
|
|
2718
|
+
/** @description The validated JWT token string for the current session */
|
|
2719
|
+
token: string;
|
|
2720
|
+
};
|
|
2721
|
+
/** @description Emitted when an annotation receives focus for beckoning */
|
|
2722
|
+
BeckonFocusEvent: {
|
|
2723
|
+
annotationId?: string;
|
|
2724
|
+
resourceId?: string;
|
|
2725
|
+
};
|
|
2726
|
+
/** @description Emitted when an annotation is hovered over for beckoning */
|
|
2727
|
+
BeckonHoverEvent: {
|
|
2728
|
+
annotationId: string | null;
|
|
2729
|
+
};
|
|
2730
|
+
/** @description Emitted when a sparkle effect is triggered on an annotation */
|
|
2731
|
+
BeckonSparkleEvent: {
|
|
2732
|
+
annotationId: string;
|
|
2733
|
+
};
|
|
2734
|
+
/** @description Success result emitted on the bind:body-updated bus channel after bind:update-body has been applied. */
|
|
2735
|
+
BindBodyUpdated: {
|
|
2736
|
+
/** @description Correlation ID echoed from the originating bind:update-body command */
|
|
2737
|
+
correlationId: string;
|
|
2738
|
+
/** @description Branded AnnotationId of the annotation whose body was updated */
|
|
2739
|
+
annotationId: string;
|
|
2740
|
+
};
|
|
2741
|
+
/** @description Command payload sent on the bind:initiate bus channel to start a bind flow. */
|
|
2742
|
+
BindInitiateCommand: {
|
|
2743
|
+
/** @description Branded AnnotationId of the annotation being bound */
|
|
2744
|
+
annotationId: string;
|
|
2745
|
+
/** @description Branded ResourceId of the resource being bound to */
|
|
2746
|
+
resourceId: string;
|
|
2747
|
+
/** @description Default title for the bound annotation */
|
|
2748
|
+
defaultTitle: string;
|
|
2749
|
+
/** @description Entity types to associate with the annotation */
|
|
2750
|
+
entityTypes: string[];
|
|
2751
|
+
};
|
|
2752
|
+
/** @description Command payload sent on the bind:update-body bus channel to modify annotation bodies. */
|
|
2753
|
+
BindUpdateBodyCommand: {
|
|
2754
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
2755
|
+
_userId?: string;
|
|
2756
|
+
/** @description Client-supplied id used to match this command to its result event(s) on the events-stream. Generated by the route handler if absent. */
|
|
2757
|
+
correlationId: string;
|
|
2758
|
+
/** @description Branded AnnotationId of the annotation whose body is being updated */
|
|
2759
|
+
annotationId: string;
|
|
2760
|
+
/** @description Branded ResourceId of the resource the annotation belongs to */
|
|
2761
|
+
resourceId: string;
|
|
2762
|
+
/** @description List of body mutation operations to apply */
|
|
2763
|
+
operations: {
|
|
2764
|
+
/**
|
|
2765
|
+
* @description The type of body operation
|
|
2766
|
+
* @enum {string}
|
|
2767
|
+
*/
|
|
2768
|
+
op: "add" | "remove" | "replace";
|
|
2769
|
+
/** @description Body item for add operations */
|
|
2770
|
+
item?: components["schemas"]["AnnotationBody"];
|
|
2771
|
+
/** @description Previous body item for replace operations */
|
|
2772
|
+
oldItem?: components["schemas"]["AnnotationBody"];
|
|
2773
|
+
/** @description Replacement body item for replace operations */
|
|
2774
|
+
newItem?: components["schemas"]["AnnotationBody"];
|
|
2775
|
+
}[];
|
|
2776
|
+
};
|
|
2777
|
+
/**
|
|
2778
|
+
* @description W3C Web Annotation body purpose vocabulary - https://www.w3.org/TR/annotation-vocab/#motivation
|
|
2779
|
+
* @enum {string}
|
|
2780
|
+
*/
|
|
2781
|
+
BodyPurpose: "assessing" | "bookmarking" | "classifying" | "commenting" | "describing" | "editing" | "highlighting" | "identifying" | "linking" | "moderating" | "questioning" | "replying" | "tagging";
|
|
2782
|
+
/** @description Request to browse the history of an annotation */
|
|
2783
|
+
BrowseAnnotationHistoryRequest: {
|
|
2784
|
+
correlationId: string;
|
|
2785
|
+
resourceId: string;
|
|
2786
|
+
annotationId: string;
|
|
2787
|
+
};
|
|
2788
|
+
/** @description Result of browsing annotation history */
|
|
2789
|
+
BrowseAnnotationHistoryResult: {
|
|
2790
|
+
correlationId: string;
|
|
2791
|
+
response: components["schemas"]["GetAnnotationHistoryResponse"];
|
|
2792
|
+
};
|
|
2793
|
+
/** @description Request to browse a single annotation */
|
|
2794
|
+
BrowseAnnotationRequest: {
|
|
2795
|
+
correlationId: string;
|
|
2796
|
+
resourceId: string;
|
|
2797
|
+
annotationId: string;
|
|
2798
|
+
};
|
|
2799
|
+
/** @description Result of browsing a single annotation */
|
|
2800
|
+
BrowseAnnotationResult: {
|
|
2801
|
+
correlationId: string;
|
|
2802
|
+
response: components["schemas"]["GetAnnotationResponse"];
|
|
2803
|
+
};
|
|
2804
|
+
/** @description Request to get contextual text around an annotation */
|
|
2805
|
+
BrowseAnnotationContextRequest: {
|
|
2806
|
+
correlationId: string;
|
|
2807
|
+
annotationId: string;
|
|
2808
|
+
resourceId: string;
|
|
2809
|
+
contextBefore?: number;
|
|
2810
|
+
contextAfter?: number;
|
|
2811
|
+
};
|
|
2812
|
+
/** @description Request to browse annotations for a resource */
|
|
2813
|
+
BrowseAnnotationsRequest: {
|
|
2814
|
+
correlationId: string;
|
|
2815
|
+
resourceId: string;
|
|
2816
|
+
};
|
|
2817
|
+
/** @description Result of browsing annotations for a resource */
|
|
2818
|
+
BrowseAnnotationsResult: {
|
|
2819
|
+
correlationId: string;
|
|
2820
|
+
response: components["schemas"]["GetAnnotationsResponse"];
|
|
2821
|
+
};
|
|
2822
|
+
/** @description Emitted when an annotation is clicked in the browse panel */
|
|
2823
|
+
BrowseClickEvent: {
|
|
2824
|
+
annotationId: string;
|
|
2825
|
+
motivation: components["schemas"]["Motivation"];
|
|
2826
|
+
};
|
|
2827
|
+
/** @description Request to browse a directory listing */
|
|
2828
|
+
BrowseDirectoryRequest: {
|
|
2829
|
+
correlationId: string;
|
|
2830
|
+
path: string;
|
|
2831
|
+
/** @enum {string} */
|
|
2832
|
+
sort?: "name" | "mtime" | "annotationCount";
|
|
2833
|
+
};
|
|
2834
|
+
/** @description Result of browsing a directory listing */
|
|
2835
|
+
BrowseDirectoryResult: {
|
|
2836
|
+
correlationId: string;
|
|
2837
|
+
response: {
|
|
2838
|
+
path: string;
|
|
2839
|
+
entries: components["schemas"]["DirectoryEntry"][];
|
|
2840
|
+
};
|
|
2841
|
+
};
|
|
2842
|
+
/** @description Emitted when an entity type is clicked in the browse panel */
|
|
2843
|
+
BrowseEntityTypeClickedEvent: {
|
|
2844
|
+
entityType: string;
|
|
2845
|
+
};
|
|
2846
|
+
/** @description Request to browse available entity types */
|
|
2847
|
+
BrowseEntityTypesRequest: {
|
|
2848
|
+
correlationId: string;
|
|
2849
|
+
};
|
|
2850
|
+
/** @description Result of browsing entity types */
|
|
2851
|
+
BrowseEntityTypesResult: {
|
|
2852
|
+
correlationId: string;
|
|
2853
|
+
response: components["schemas"]["GetEntityTypesResponse"];
|
|
2854
|
+
};
|
|
2855
|
+
/** @description Request to browse events for a resource */
|
|
2856
|
+
BrowseEventsRequest: {
|
|
2857
|
+
correlationId: string;
|
|
2858
|
+
resourceId: string;
|
|
2859
|
+
type?: string;
|
|
2860
|
+
userId?: string;
|
|
2861
|
+
limit?: number;
|
|
2862
|
+
};
|
|
2863
|
+
/** @description Result of browsing events for a resource */
|
|
2864
|
+
BrowseEventsResult: {
|
|
2865
|
+
correlationId: string;
|
|
2866
|
+
response: components["schemas"]["GetEventsResponse"];
|
|
2867
|
+
};
|
|
2868
|
+
/** @description Emitted when navigation to an external URL is requested */
|
|
2869
|
+
BrowseExternalNavigateEvent: {
|
|
2870
|
+
url: string;
|
|
2871
|
+
resourceId?: string;
|
|
2872
|
+
};
|
|
2873
|
+
/** @description Emitted when a link is clicked in the browse panel */
|
|
2874
|
+
BrowseLinkClickedEvent: {
|
|
2875
|
+
href: string;
|
|
2876
|
+
label?: string;
|
|
2877
|
+
};
|
|
2878
|
+
/** @description Emitted when a browse panel is opened */
|
|
2879
|
+
BrowsePanelOpenEvent: {
|
|
2880
|
+
panel: string;
|
|
2881
|
+
scrollToAnnotationId?: string;
|
|
2882
|
+
motivation?: string;
|
|
2883
|
+
};
|
|
2884
|
+
/** @description Emitted when a browse panel is toggled */
|
|
2885
|
+
BrowsePanelToggleEvent: {
|
|
2886
|
+
panel: string;
|
|
2887
|
+
};
|
|
2888
|
+
/** @description Request to browse annotations that reference a resource */
|
|
2889
|
+
BrowseReferencedByRequest: {
|
|
2890
|
+
correlationId: string;
|
|
2891
|
+
resourceId: string;
|
|
2892
|
+
motivation?: string;
|
|
2893
|
+
};
|
|
2894
|
+
/** @description Result of browsing annotations that reference a resource */
|
|
2895
|
+
BrowseReferencedByResult: {
|
|
2896
|
+
correlationId: string;
|
|
2897
|
+
response: components["schemas"]["GetReferencedByResponse"];
|
|
2898
|
+
};
|
|
2899
|
+
/** @description Emitted when navigation to a reference resource is requested */
|
|
2900
|
+
BrowseReferenceNavigateEvent: {
|
|
2901
|
+
resourceId: string;
|
|
2902
|
+
};
|
|
2903
|
+
/** @description Emitted when a resource is closed in the browse panel */
|
|
2904
|
+
BrowseResourceCloseEvent: {
|
|
2905
|
+
resourceId: string;
|
|
2906
|
+
};
|
|
2907
|
+
/** @description Emitted when resources are reordered in the browse panel */
|
|
2908
|
+
BrowseResourceReorderEvent: {
|
|
2909
|
+
oldIndex: number;
|
|
2910
|
+
newIndex: number;
|
|
2911
|
+
};
|
|
2912
|
+
/** @description Request to browse a single resource */
|
|
2913
|
+
BrowseResourceRequest: {
|
|
2914
|
+
correlationId: string;
|
|
2915
|
+
resourceId: string;
|
|
2916
|
+
};
|
|
2917
|
+
/** @description Result of browsing a single resource */
|
|
2918
|
+
BrowseResourceResult: {
|
|
2919
|
+
correlationId: string;
|
|
2920
|
+
response: components["schemas"]["GetResourceResponse"];
|
|
2921
|
+
};
|
|
2922
|
+
/** @description Request to browse resources with optional filtering and pagination */
|
|
2923
|
+
BrowseResourcesRequest: {
|
|
2924
|
+
correlationId: string;
|
|
2925
|
+
search?: string;
|
|
2926
|
+
archived?: boolean;
|
|
2927
|
+
entityType?: string;
|
|
2928
|
+
offset?: number;
|
|
2929
|
+
limit?: number;
|
|
2930
|
+
};
|
|
2931
|
+
/** @description Result of browsing resources */
|
|
2932
|
+
BrowseResourcesResult: {
|
|
2933
|
+
correlationId: string;
|
|
2934
|
+
response: components["schemas"]["ListResourcesResponse"];
|
|
2935
|
+
};
|
|
2936
|
+
/** @description Emitted when the browse panel requests a router navigation */
|
|
2937
|
+
BrowseRouterPushEvent: {
|
|
2938
|
+
path: string;
|
|
2939
|
+
reason?: string;
|
|
2940
|
+
};
|
|
2941
|
+
/** @description Request to browse registered tag schemas */
|
|
2942
|
+
BrowseTagSchemasRequest: {
|
|
2943
|
+
correlationId: string;
|
|
2944
|
+
};
|
|
2945
|
+
/** @description Result of browsing tag schemas */
|
|
2946
|
+
BrowseTagSchemasResult: {
|
|
2947
|
+
correlationId: string;
|
|
2948
|
+
response: components["schemas"]["GetTagSchemasResponse"];
|
|
2949
|
+
};
|
|
2950
|
+
/** @description W3C Web Annotation FragmentSelector for media fragment identifiers (RFC 3778 for PDFs) */
|
|
2951
|
+
FragmentSelector: {
|
|
2952
|
+
/** @enum {string} */
|
|
2953
|
+
type: "FragmentSelector";
|
|
2954
|
+
/**
|
|
2955
|
+
* @description Media fragment identifier (e.g., 'page=1&viewrect=100,200,50,30' for PDF)
|
|
2956
|
+
* @example page=1&viewrect=100,200,50,30
|
|
2957
|
+
*/
|
|
2958
|
+
value: string;
|
|
2959
|
+
/**
|
|
2960
|
+
* @description URI identifying the fragment syntax specification
|
|
2961
|
+
* @example http://tools.ietf.org/rfc/rfc3778
|
|
2962
|
+
*/
|
|
2963
|
+
conformsTo?: string;
|
|
2964
|
+
};
|
|
2965
|
+
/** @description Completion payload emitted on the gather:annotation-complete bus channel when annotation context gathering finishes. */
|
|
2966
|
+
GatherAnnotationComplete: {
|
|
2967
|
+
/** @description Client-generated correlation ID to thread the response back to the originating request */
|
|
2968
|
+
correlationId: string;
|
|
2969
|
+
/** @description Branded AnnotationId of the annotation whose context was gathered */
|
|
2970
|
+
annotationId: string;
|
|
2971
|
+
/** @description The gathered annotation context */
|
|
2972
|
+
response: components["schemas"]["AnnotationLLMContextResponse"];
|
|
2973
|
+
};
|
|
2974
|
+
/** @description Request payload sent on the gather:requested bus channel to gather context for an annotation. */
|
|
2975
|
+
GatherAnnotationRequest: {
|
|
2976
|
+
/** @description Client-generated correlation ID to thread the response back to the originating request */
|
|
2977
|
+
correlationId: string;
|
|
2978
|
+
/** @description Branded AnnotationId of the annotation to gather context for */
|
|
2979
|
+
annotationId: string;
|
|
2980
|
+
/** @description Branded ResourceId of the resource the annotation belongs to */
|
|
2981
|
+
resourceId: string;
|
|
2982
|
+
/** @description Optional gathering configuration */
|
|
2983
|
+
options?: {
|
|
2984
|
+
/** @description Whether to include source context in the gathered result */
|
|
2985
|
+
includeSourceContext?: boolean;
|
|
2986
|
+
/** @description Whether to include target context in the gathered result */
|
|
2987
|
+
includeTargetContext?: boolean;
|
|
2988
|
+
/** @description Characters of surrounding text context to include */
|
|
2989
|
+
contextWindow?: number;
|
|
2990
|
+
};
|
|
2991
|
+
};
|
|
2992
|
+
/** @description Context gathered for an annotation. Includes source document excerpts, metadata, and graph-derived context. Used by both Find (bind) and Generate (yield) flows. */
|
|
2993
|
+
GatheredContext: {
|
|
2994
|
+
/** @description The annotation this context was gathered for */
|
|
2995
|
+
annotation: components["schemas"]["Annotation"];
|
|
2996
|
+
/** @description The resource containing the annotation */
|
|
2997
|
+
sourceResource: components["schemas"]["ResourceDescriptor"];
|
|
2998
|
+
/** @description Text context from the source document */
|
|
2999
|
+
sourceContext?: {
|
|
3000
|
+
/** @description Text appearing before the selected passage */
|
|
3001
|
+
before?: string;
|
|
3002
|
+
/** @description The selected text passage (the annotation target) */
|
|
3003
|
+
selected: string;
|
|
3004
|
+
/** @description Text appearing after the selected passage */
|
|
3005
|
+
after?: string;
|
|
3006
|
+
};
|
|
3007
|
+
/** @description Context metadata about the annotation and its source */
|
|
3008
|
+
metadata?: {
|
|
3009
|
+
/** @description Type of source resource (e.g., 'document', 'image', 'video') */
|
|
3010
|
+
resourceType?: string;
|
|
3011
|
+
/** @description BCP 47 language tag of source content */
|
|
3012
|
+
language?: string;
|
|
3013
|
+
/** @description Entity types associated with the annotation */
|
|
3014
|
+
entityTypes?: string[];
|
|
3015
|
+
};
|
|
3016
|
+
/** @description User-provided textual hint to supplement or replace the selected text for search and generation */
|
|
3017
|
+
userHint?: string;
|
|
3018
|
+
/** @description Graph-derived context from the knowledge base */
|
|
3019
|
+
graphContext?: {
|
|
3020
|
+
/** @description Resources connected to the source resource via annotations */
|
|
3021
|
+
connections?: {
|
|
3022
|
+
/** @description ID of the connected resource */
|
|
3023
|
+
resourceId: string;
|
|
3024
|
+
/** @description Name of the connected resource */
|
|
3025
|
+
resourceName: string;
|
|
3026
|
+
/** @description Entity types on the connected resource */
|
|
3027
|
+
entityTypes?: string[];
|
|
3028
|
+
/** @description Whether the connection goes both ways */
|
|
3029
|
+
bidirectional: boolean;
|
|
3030
|
+
}[];
|
|
3031
|
+
/** @description Number of other resources that reference the source resource */
|
|
3032
|
+
citedByCount?: number;
|
|
3033
|
+
/** @description Resources that reference the source resource */
|
|
3034
|
+
citedBy?: {
|
|
3035
|
+
resourceId: string;
|
|
3036
|
+
resourceName: string;
|
|
3037
|
+
}[];
|
|
3038
|
+
/** @description Entity types from other annotations on the same resource */
|
|
3039
|
+
siblingEntityTypes?: string[];
|
|
3040
|
+
/** @description Global frequency counts for entity types (for IDF-like weighting) */
|
|
3041
|
+
entityTypeFrequencies?: {
|
|
3042
|
+
[key: string]: number;
|
|
3043
|
+
};
|
|
3044
|
+
/** @description LLM-generated summary of the annotation's relationships in the knowledge graph */
|
|
3045
|
+
inferredRelationshipSummary?: string;
|
|
3046
|
+
};
|
|
3047
|
+
/** @description Semantically similar passages from across the knowledge base, found via vector search */
|
|
3048
|
+
semanticContext?: {
|
|
3049
|
+
/** @description Passages ranked by cosine similarity to the focal text */
|
|
3050
|
+
similar: components["schemas"]["SemanticMatch"][];
|
|
3051
|
+
};
|
|
3052
|
+
};
|
|
3053
|
+
/** @description Completion payload emitted on the gather:resource-complete bus channel when resource context gathering finishes. */
|
|
3054
|
+
GatherResourceComplete: {
|
|
3055
|
+
/** @description Client-generated correlation ID to thread the response back to the originating request */
|
|
3056
|
+
correlationId: string;
|
|
3057
|
+
/** @description Branded ResourceId of the resource whose context was gathered */
|
|
3058
|
+
resourceId: string;
|
|
3059
|
+
/** @description The gathered resource context */
|
|
3060
|
+
response: components["schemas"]["ResourceLLMContextResponse"];
|
|
3061
|
+
};
|
|
3062
|
+
/** @description Request payload sent on the gather:resource-requested bus channel to gather context for a resource. */
|
|
3063
|
+
GatherResourceRequest: {
|
|
3064
|
+
/** @description Client-generated correlation ID to thread the response back to the originating request */
|
|
3065
|
+
correlationId: string;
|
|
3066
|
+
/** @description Branded ResourceId of the resource to gather context for */
|
|
3067
|
+
resourceId: string;
|
|
3068
|
+
/** @description Gathering configuration */
|
|
3069
|
+
options: {
|
|
3070
|
+
/** @description Depth of resource graph traversal */
|
|
3071
|
+
depth: number;
|
|
3072
|
+
/** @description Maximum number of related resources to include */
|
|
3073
|
+
maxResources: number;
|
|
3074
|
+
/** @description Whether to include resource content in the gathered result */
|
|
3075
|
+
includeContent: boolean;
|
|
3076
|
+
/** @description Whether to include resource summaries in the gathered result */
|
|
3077
|
+
includeSummary: boolean;
|
|
3078
|
+
};
|
|
3079
|
+
};
|
|
3080
|
+
/** @description Request to generate an AI summary of an annotation */
|
|
3081
|
+
GatherSummaryRequest: {
|
|
3082
|
+
correlationId: string;
|
|
3083
|
+
annotationId: string;
|
|
3084
|
+
resourceId: string;
|
|
3085
|
+
};
|
|
3086
|
+
/** @description Result of a completed assessment-annotation job. */
|
|
3087
|
+
JobAssessmentAnnotationResult: {
|
|
3088
|
+
assessmentsFound: number;
|
|
3089
|
+
assessmentsCreated: number;
|
|
3090
|
+
};
|
|
3091
|
+
/** @description Request to cancel a job */
|
|
3092
|
+
JobCancelRequest: {
|
|
3093
|
+
/** @enum {string} */
|
|
3094
|
+
jobType: "annotation" | "generation";
|
|
3095
|
+
};
|
|
3096
|
+
/** @description Command to claim a pending job (atomic CAS: pending → running) */
|
|
3097
|
+
JobClaimCommand: {
|
|
3098
|
+
correlationId: string;
|
|
3099
|
+
jobId: string;
|
|
3100
|
+
};
|
|
3101
|
+
/** @description Command to create a new job via the event bus */
|
|
3102
|
+
JobCreateCommand: {
|
|
3103
|
+
correlationId: string;
|
|
3104
|
+
/** @enum {string} */
|
|
3105
|
+
jobType: "reference-annotation" | "highlight-annotation" | "assessment-annotation" | "comment-annotation" | "tag-annotation" | "generation";
|
|
3106
|
+
resourceId: string;
|
|
3107
|
+
params: {
|
|
3108
|
+
[key: string]: unknown;
|
|
3109
|
+
};
|
|
3110
|
+
};
|
|
3111
|
+
/** @description Result of a job:create command */
|
|
3112
|
+
JobCreatedResult: {
|
|
3113
|
+
correlationId: string;
|
|
3114
|
+
response: {
|
|
3115
|
+
jobId: string;
|
|
3116
|
+
};
|
|
3117
|
+
};
|
|
3118
|
+
/** @description Result of a completed comment-annotation job. */
|
|
3119
|
+
JobCommentAnnotationResult: {
|
|
3120
|
+
commentsFound: number;
|
|
3121
|
+
commentsCreated: number;
|
|
3122
|
+
};
|
|
3123
|
+
/** @description Command to mark a job as complete */
|
|
3124
|
+
JobCompleteCommand: {
|
|
3125
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3126
|
+
_userId?: string;
|
|
3127
|
+
resourceId: string;
|
|
3128
|
+
jobId: string;
|
|
3129
|
+
jobType: components["schemas"]["JobType"];
|
|
3130
|
+
/** @description Annotation this job is attached to, when applicable. Lets the UI route completion feedback (toast, resolve state) to a specific annotation. */
|
|
3131
|
+
annotationId?: string;
|
|
3132
|
+
result?: components["schemas"]["JobResult"];
|
|
3133
|
+
};
|
|
3134
|
+
/** @description Command to mark a job as failed */
|
|
3135
|
+
JobFailCommand: {
|
|
3136
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3137
|
+
_userId?: string;
|
|
3138
|
+
resourceId: string;
|
|
3139
|
+
jobId: string;
|
|
3140
|
+
jobType: components["schemas"]["JobType"];
|
|
3141
|
+
/** @description Annotation this job is attached to, when applicable. Lets the UI route failure feedback (error toast, revert state) to a specific annotation. */
|
|
3142
|
+
annotationId?: string;
|
|
3143
|
+
error: string;
|
|
3144
|
+
};
|
|
3145
|
+
/** @description Result of a completed generation job. resourceId is assigned by Stower when yield:create is processed; the worker emits job:complete with only resourceName, and Stower populates resourceId on the persisted payload. */
|
|
3146
|
+
JobGenerationResult: {
|
|
3147
|
+
/** @description ID of the generated resource (populated by Stower, not by the worker) */
|
|
3148
|
+
resourceId?: string;
|
|
3149
|
+
/** @description Name of the generated resource */
|
|
3150
|
+
resourceName: string;
|
|
3151
|
+
};
|
|
3152
|
+
/** @description Result of a completed highlight-annotation job. */
|
|
3153
|
+
JobHighlightAnnotationResult: {
|
|
3154
|
+
highlightsFound: number;
|
|
3155
|
+
highlightsCreated: number;
|
|
3156
|
+
};
|
|
3157
|
+
/** @description Progress report from a running job. Common fields are stage/percentage/message; job-type-specific fields may also be present. This is the single progress shape for every job type — annotation workers and generation alike. */
|
|
3158
|
+
JobProgress: {
|
|
3159
|
+
/** @description Current processing stage (e.g. 'analyzing', 'creating', 'complete', 'error') */
|
|
3160
|
+
stage: string;
|
|
3161
|
+
/** @description Completion percentage (0-100) */
|
|
3162
|
+
percentage: number;
|
|
3163
|
+
/** @description Human-readable progress message */
|
|
3164
|
+
message: string;
|
|
3165
|
+
/** @description Annotation this job is attached to, when applicable. Echoed inside JobProgress (in addition to the outer command envelope) so consumers that only see the inner progress object (e.g. client.yield.fromAnnotation's Observable) can still route visual feedback to a specific annotation. */
|
|
3166
|
+
annotationId?: string;
|
|
3167
|
+
/** @description Total entity types to process (reference-annotation) */
|
|
3168
|
+
totalEntityTypes?: number;
|
|
3169
|
+
/** @description Entity types processed so far (reference-annotation) */
|
|
3170
|
+
processedEntityTypes?: number;
|
|
3171
|
+
/** @description Entities found so far (reference-annotation) */
|
|
3172
|
+
entitiesFound?: number;
|
|
3173
|
+
/** @description Annotations emitted so far (reference-annotation) */
|
|
3174
|
+
entitiesEmitted?: number;
|
|
3175
|
+
/** @description Entity type currently being processed */
|
|
3176
|
+
currentEntityType?: string;
|
|
3177
|
+
/** @description Reference annotation: completed entity types with per-type counts, for UI progress display */
|
|
3178
|
+
completedEntityTypes?: {
|
|
3179
|
+
entityType: string;
|
|
3180
|
+
foundCount: number;
|
|
3181
|
+
}[];
|
|
3182
|
+
/** @description Categories processed (tag-annotation) */
|
|
3183
|
+
processedCategories?: number;
|
|
3184
|
+
/** @description Total categories (tag-annotation) */
|
|
3185
|
+
totalCategories?: number;
|
|
3186
|
+
/** @description Category currently being processed (tag-annotation) */
|
|
3187
|
+
currentCategory?: string;
|
|
3188
|
+
/** @description Echoed job parameters for display in the progress UI (e.g. entity types or categories the user asked to detect) */
|
|
3189
|
+
requestParams?: {
|
|
3190
|
+
label: string;
|
|
3191
|
+
value: string;
|
|
3192
|
+
}[];
|
|
3193
|
+
};
|
|
3194
|
+
/** @description Event indicating a job has been queued */
|
|
3195
|
+
JobQueuedEvent: {
|
|
3196
|
+
jobId: string;
|
|
3197
|
+
jobType: string;
|
|
3198
|
+
resourceId: string;
|
|
3199
|
+
/** @description DID of the user who initiated the job (audit). */
|
|
3200
|
+
userId: string;
|
|
3201
|
+
};
|
|
3202
|
+
/** @description Result of a completed reference-annotation job. */
|
|
3203
|
+
JobReferenceAnnotationResult: {
|
|
3204
|
+
/** @description Total entities found */
|
|
3205
|
+
totalFound: number;
|
|
3206
|
+
/** @description Total annotations emitted */
|
|
3207
|
+
totalEmitted: number;
|
|
3208
|
+
/** @description Number of errors encountered */
|
|
3209
|
+
errors: number;
|
|
3210
|
+
};
|
|
3211
|
+
/** @description Command to report progress on a job */
|
|
3212
|
+
JobReportProgressCommand: {
|
|
3213
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3214
|
+
_userId?: string;
|
|
3215
|
+
resourceId: string;
|
|
3216
|
+
jobId: string;
|
|
3217
|
+
jobType: components["schemas"]["JobType"];
|
|
3218
|
+
/** @description Annotation this job is attached to, when applicable. Lets the UI attach progress visuals to a specific annotation (e.g. a reference whose generation is running). */
|
|
3219
|
+
annotationId?: string;
|
|
3220
|
+
percentage: number;
|
|
3221
|
+
progress?: components["schemas"]["JobProgress"];
|
|
3222
|
+
};
|
|
3223
|
+
/** @description Discriminated union of all job result types. */
|
|
3224
|
+
JobResult: components["schemas"]["JobGenerationResult"] | components["schemas"]["JobReferenceAnnotationResult"] | components["schemas"]["JobHighlightAnnotationResult"] | components["schemas"]["JobAssessmentAnnotationResult"] | components["schemas"]["JobCommentAnnotationResult"] | components["schemas"]["JobTagAnnotationResult"];
|
|
3225
|
+
/** @description Command to start a job */
|
|
3226
|
+
JobStartCommand: {
|
|
3227
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3228
|
+
_userId?: string;
|
|
3229
|
+
resourceId: string;
|
|
3230
|
+
jobId: string;
|
|
3231
|
+
jobType: components["schemas"]["JobType"];
|
|
3232
|
+
/** @description Annotation this job is attached to, when applicable. Set for annotation-scoped jobs like generation (from a specific reference). Unset for resource-scoped jobs like bulk reference/tag/highlight detection. */
|
|
3233
|
+
annotationId?: string;
|
|
3234
|
+
};
|
|
3235
|
+
/** @description Request to check the status of a job */
|
|
3236
|
+
JobStatusRequest: {
|
|
3237
|
+
correlationId: string;
|
|
3238
|
+
jobId: string;
|
|
3239
|
+
};
|
|
3240
|
+
/** @description Result of a job status request */
|
|
3241
|
+
JobStatusResult: {
|
|
3242
|
+
correlationId: string;
|
|
3243
|
+
response: components["schemas"]["JobStatusResponse"];
|
|
3244
|
+
};
|
|
3245
|
+
/** @description Result of a completed tag-annotation job. */
|
|
3246
|
+
JobTagAnnotationResult: {
|
|
3247
|
+
tagsFound: number;
|
|
3248
|
+
tagsCreated: number;
|
|
3249
|
+
/** @description Count of tags created per category */
|
|
3250
|
+
byCategory: {
|
|
3251
|
+
[key: string]: number;
|
|
3252
|
+
};
|
|
3253
|
+
};
|
|
3254
|
+
/** @description Bus command to add a new entity type to the KB's vocabulary. Carried on the `frame:add-entity-type` channel — Frame is the schema-layer flow that owns vocabulary writes. */
|
|
3255
|
+
FrameAddEntityTypeCommand: {
|
|
3256
|
+
tag: string;
|
|
3257
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3258
|
+
_userId?: string;
|
|
3259
|
+
};
|
|
3260
|
+
/** @description Bus command to register a tag schema with the KB's runtime registry. Carried on the `frame:add-tag-schema` channel — Frame is the schema-layer flow that owns vocabulary writes. Most-recent registration of a given `schema.id` wins; the projection reflects the latest content. Identical re-registrations are silent; differing content overwrites and logs a warning. */
|
|
3261
|
+
FrameAddTagSchemaCommand: {
|
|
3262
|
+
schema: components["schemas"]["TagSchema"];
|
|
3263
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3264
|
+
_userId?: string;
|
|
3265
|
+
};
|
|
3266
|
+
/** @description Bus command to archive a resource and optionally remove its file. */
|
|
3267
|
+
MarkArchiveCommand: {
|
|
3268
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3269
|
+
_userId?: string;
|
|
3270
|
+
resourceId: string;
|
|
3271
|
+
storageUri?: string;
|
|
3272
|
+
keepFile?: boolean;
|
|
3273
|
+
noGit?: boolean;
|
|
3274
|
+
};
|
|
3275
|
+
/** @description Emitted when the user requests AI assistance for a mark */
|
|
3276
|
+
MarkAssistRequestEvent: {
|
|
3277
|
+
/** @description Client-supplied id used to match this command to its result event(s) on the events-stream. Generated by the route handler if absent. */
|
|
3278
|
+
correlationId?: string;
|
|
3279
|
+
motivation: components["schemas"]["Motivation"];
|
|
3280
|
+
options: {
|
|
3281
|
+
instructions?: string;
|
|
3282
|
+
/** @enum {string} */
|
|
3283
|
+
tone?: "scholarly" | "explanatory" | "conversational" | "technical" | "analytical" | "critical" | "balanced" | "constructive";
|
|
3284
|
+
density?: number;
|
|
3285
|
+
language?: string;
|
|
3286
|
+
entityTypes?: string[];
|
|
3287
|
+
includeDescriptiveReferences?: boolean;
|
|
3288
|
+
schemaId?: string;
|
|
3289
|
+
categories?: string[];
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
3292
|
+
/** @description Emitted when the mark click action changes */
|
|
3293
|
+
MarkClickChangedEvent: {
|
|
3294
|
+
action: string;
|
|
3295
|
+
};
|
|
3296
|
+
/** @description Bus command to create an annotation on a resource. */
|
|
3297
|
+
MarkCreateCommand: {
|
|
3298
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3299
|
+
_userId?: string;
|
|
3300
|
+
/** @description Optional correlation id threaded from the originating mark:create-request. Propagated into event metadata by Stower so annotation-assembly can emit mark:create-ok after persistence completes. */
|
|
3301
|
+
correlationId?: string;
|
|
3302
|
+
annotation: components["schemas"]["Annotation"];
|
|
3303
|
+
resourceId: string;
|
|
3304
|
+
};
|
|
3305
|
+
/** @description Success response after creating an annotation. */
|
|
3306
|
+
MarkCreateOk: {
|
|
3307
|
+
annotationId: string;
|
|
3308
|
+
};
|
|
3309
|
+
/** @description Raw annotation creation intent — bus handler assembles the W3C annotation */
|
|
3310
|
+
MarkCreateRequest: {
|
|
3311
|
+
correlationId: string;
|
|
3312
|
+
resourceId: string;
|
|
3313
|
+
request: components["schemas"]["CreateAnnotationRequest"];
|
|
3314
|
+
};
|
|
3315
|
+
/** @description Bus command to delete an annotation. */
|
|
3316
|
+
MarkDeleteCommand: {
|
|
3317
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3318
|
+
_userId?: string;
|
|
3319
|
+
annotationId: string;
|
|
3320
|
+
resourceId?: string;
|
|
3321
|
+
};
|
|
3322
|
+
/** @description Success response after deleting an annotation. */
|
|
3323
|
+
MarkDeleteOk: {
|
|
3324
|
+
annotationId: string;
|
|
3325
|
+
};
|
|
3326
|
+
/** @description Emitted when the user requests a new mark (annotation) on a resource */
|
|
3327
|
+
MarkRequestedEvent: {
|
|
3328
|
+
/** @description One or more W3C selectors */
|
|
3329
|
+
selector: components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"] | (components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"])[];
|
|
3330
|
+
motivation: components["schemas"]["Motivation"];
|
|
3331
|
+
};
|
|
3332
|
+
/** @description Emitted when the active mark selection changes */
|
|
3333
|
+
MarkSelectionChangedEvent: {
|
|
3334
|
+
motivation: string | null;
|
|
3335
|
+
};
|
|
3336
|
+
/** @description Emitted when the mark shape changes */
|
|
3337
|
+
MarkShapeChangedEvent: {
|
|
3338
|
+
shape: string;
|
|
3339
|
+
};
|
|
3340
|
+
/** @description Emitted when a mark is submitted with its annotation body */
|
|
3341
|
+
MarkSubmitEvent: {
|
|
3342
|
+
motivation: components["schemas"]["Motivation"];
|
|
3343
|
+
/** @description One or more W3C selectors */
|
|
3344
|
+
selector: components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"] | (components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"])[];
|
|
3345
|
+
/** @description Optional body. Omit for annotations whose motivation alone is meaningful (e.g. highlighting) or whose user-supplied content is empty (e.g. an assessing annotation saved without comment text). Shape matches Annotation.body. */
|
|
3346
|
+
body?: components["schemas"]["AnnotationBody"] | components["schemas"]["AnnotationBody"][];
|
|
3347
|
+
};
|
|
3348
|
+
/** @description Bus command to unarchive a previously archived resource. */
|
|
3349
|
+
MarkUnarchiveCommand: {
|
|
3350
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3351
|
+
_userId?: string;
|
|
3352
|
+
resourceId: string;
|
|
3353
|
+
storageUri?: string;
|
|
3354
|
+
};
|
|
3355
|
+
/** @description Bus command to update an annotation's body with patch operations. */
|
|
3356
|
+
MarkUpdateBodyCommand: {
|
|
3357
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3358
|
+
_userId?: string;
|
|
3359
|
+
/** @description Correlation id threaded from the originating route through to event metadata. Lets the events-stream deliver matched results to the client that initiated the bind. */
|
|
3360
|
+
correlationId?: string;
|
|
3361
|
+
annotationId: string;
|
|
3362
|
+
resourceId: string;
|
|
3363
|
+
operations: (components["schemas"]["BodyOperationAdd"] | components["schemas"]["BodyOperationRemove"] | components["schemas"]["BodyOperationReplace"])[];
|
|
3364
|
+
};
|
|
3365
|
+
/** @description Bus command to replace the entity types on a resource. */
|
|
3366
|
+
MarkUpdateEntityTypesCommand: {
|
|
3367
|
+
resourceId: string;
|
|
3368
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3369
|
+
_userId?: string;
|
|
3370
|
+
currentEntityTypes: string[];
|
|
3371
|
+
updatedEntityTypes: string[];
|
|
3372
|
+
};
|
|
3373
|
+
/** @description Request payload sent on the match:search-request bus channel to find candidate matches. */
|
|
3374
|
+
MatchSearchRequest: {
|
|
3375
|
+
/** @description Client-generated correlation ID to thread the response back to the originating request */
|
|
3376
|
+
correlationId: string;
|
|
3377
|
+
/** @description Resource ID the reference annotation belongs to. Used to scope result events on the EventBus so the events-stream delivers them to participants viewing this resource. */
|
|
3378
|
+
resourceId: string;
|
|
3379
|
+
/** @description Annotation ID of the reference to search candidates for */
|
|
3380
|
+
referenceId: string;
|
|
3381
|
+
/** @description Gathered context for the reference annotation */
|
|
3382
|
+
context: components["schemas"]["GatheredContext"];
|
|
3383
|
+
/** @description Maximum number of candidate results to return */
|
|
3384
|
+
limit?: number;
|
|
3385
|
+
/** @description Enable semantic similarity scoring in addition to keyword matching */
|
|
3386
|
+
useSemanticScoring?: boolean;
|
|
3387
|
+
};
|
|
3388
|
+
MediaTokenRequest: {
|
|
3389
|
+
/** @description The resource ID to generate a media token for */
|
|
3390
|
+
resourceId: string;
|
|
3391
|
+
};
|
|
3392
|
+
MediaTokenResponse: {
|
|
3393
|
+
/** @description Short-lived media token for use as ?token= query parameter on resource URLs */
|
|
3394
|
+
token: string;
|
|
3395
|
+
};
|
|
3396
|
+
/** @description Emitted when the hover delay setting changes */
|
|
3397
|
+
SettingsHoverDelayChangedEvent: {
|
|
3398
|
+
hoverDelayMs: number;
|
|
3399
|
+
};
|
|
3400
|
+
/** @description Emitted when the UI locale setting changes */
|
|
3401
|
+
SettingsLocaleChangedEvent: {
|
|
3402
|
+
locale: string;
|
|
3403
|
+
};
|
|
3404
|
+
/** @description Emitted when the UI theme setting changes */
|
|
3405
|
+
SettingsThemeChangedEvent: {
|
|
3406
|
+
/** @enum {string} */
|
|
3407
|
+
theme: "light" | "dark" | "system";
|
|
3408
|
+
};
|
|
3409
|
+
SvgSelector: {
|
|
3410
|
+
/** @enum {string} */
|
|
3411
|
+
type: "SvgSelector";
|
|
3412
|
+
/** @description SVG markup defining the region (must include xmlns attribute) */
|
|
3413
|
+
value: string;
|
|
3414
|
+
};
|
|
3415
|
+
/** @description A single category within a tag schema (e.g. 'Issue' in IRAC, 'distinguished' in legal-citation-treatment). Each category carries methodology-bound semantics: a name, a description, and examples used in the LLM prompt. */
|
|
3416
|
+
TagCategory: {
|
|
3417
|
+
name: string;
|
|
3418
|
+
description: string;
|
|
3419
|
+
examples: string[];
|
|
3420
|
+
};
|
|
3421
|
+
/** @description A structural-analysis schema (e.g. legal-irac, scientific-imrad, argument-toulmin). Defines a methodology framework as an id, name, description, domain hint, and an ordered list of categories. KBs and their skills register schemas with the runtime registry via `frame.addTagSchema(...)` at session start. */
|
|
3422
|
+
TagSchema: {
|
|
3423
|
+
id: string;
|
|
3424
|
+
name: string;
|
|
3425
|
+
description: string;
|
|
3426
|
+
/** @description Free-form domain hint (e.g. 'legal', 'scientific', 'general'). Used in the LLM prompt to tune the model's analysis voice. KB authors choose. */
|
|
3427
|
+
domain: string;
|
|
3428
|
+
tags: components["schemas"]["TagCategory"][];
|
|
3429
|
+
};
|
|
3430
|
+
/** @description Bus command to create a cloned resource from a clone token. */
|
|
3431
|
+
YieldCloneCreateCommand: {
|
|
3432
|
+
correlationId: string;
|
|
3433
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3434
|
+
_userId?: string;
|
|
3435
|
+
token: string;
|
|
3436
|
+
name: string;
|
|
3437
|
+
content: string;
|
|
3438
|
+
archiveOriginal?: boolean;
|
|
3439
|
+
};
|
|
3440
|
+
/** @description Success response after creating a cloned resource. */
|
|
3441
|
+
YieldCloneCreated: {
|
|
3442
|
+
correlationId: string;
|
|
3443
|
+
response: {
|
|
3444
|
+
resourceId?: string;
|
|
3445
|
+
};
|
|
3446
|
+
};
|
|
3447
|
+
/** @description Bus command to request cloning a resource using a clone token. */
|
|
3448
|
+
YieldCloneResourceRequest: {
|
|
3449
|
+
correlationId: string;
|
|
3450
|
+
token: string;
|
|
3451
|
+
};
|
|
3452
|
+
/** @description Bus command to request a clone token for a resource. */
|
|
3453
|
+
YieldCloneTokenRequest: {
|
|
3454
|
+
correlationId: string;
|
|
3455
|
+
resourceId: string;
|
|
3456
|
+
};
|
|
3457
|
+
/** @description Bus command to create a yielded resource in the knowledge base. */
|
|
3458
|
+
YieldCreateCommand: {
|
|
3459
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3460
|
+
_userId?: string;
|
|
3461
|
+
name: string;
|
|
3462
|
+
storageUri: string;
|
|
3463
|
+
contentChecksum: string;
|
|
3464
|
+
byteSize: number;
|
|
3465
|
+
format: components["schemas"]["ContentFormat"];
|
|
3466
|
+
language?: string;
|
|
3467
|
+
entityTypes?: string[];
|
|
3468
|
+
isDraft?: boolean;
|
|
3469
|
+
generatedFrom?: {
|
|
3470
|
+
resourceId?: string;
|
|
3471
|
+
annotationId?: string;
|
|
3472
|
+
};
|
|
3473
|
+
generationPrompt?: string;
|
|
3474
|
+
generator?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
|
|
3475
|
+
noGit?: boolean;
|
|
3476
|
+
};
|
|
3477
|
+
/** @description Success response after creating a yielded resource. */
|
|
3478
|
+
YieldCreateOk: {
|
|
3479
|
+
resourceId: string;
|
|
3480
|
+
resource: components["schemas"]["ResourceDescriptor"];
|
|
3481
|
+
};
|
|
3482
|
+
/** @description Success response after moving a yielded resource. */
|
|
3483
|
+
YieldMoveOk: {
|
|
3484
|
+
resourceId: string;
|
|
3485
|
+
};
|
|
3486
|
+
/** @description Bus command to move (rename) a yielded resource. */
|
|
3487
|
+
YieldMvCommand: {
|
|
3488
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3489
|
+
_userId?: string;
|
|
3490
|
+
fromUri: string;
|
|
3491
|
+
toUri: string;
|
|
3492
|
+
noGit?: boolean;
|
|
3493
|
+
};
|
|
3494
|
+
/** @description Bus command to update a yielded resource's storage content. */
|
|
3495
|
+
YieldUpdateCommand: {
|
|
3496
|
+
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
3497
|
+
_userId?: string;
|
|
3498
|
+
resourceId: string;
|
|
3499
|
+
storageUri: string;
|
|
3500
|
+
contentChecksum: string;
|
|
3501
|
+
byteSize: number;
|
|
3502
|
+
noGit?: boolean;
|
|
3503
|
+
};
|
|
3504
|
+
/** @description Success response after updating a yielded resource. */
|
|
3505
|
+
YieldUpdateOk: {
|
|
3506
|
+
resourceId: string;
|
|
3507
|
+
};
|
|
3508
|
+
};
|
|
3509
|
+
responses: never;
|
|
3510
|
+
parameters: never;
|
|
3511
|
+
requestBodies: never;
|
|
3512
|
+
headers: never;
|
|
3513
|
+
pathItems: never;
|
|
3514
|
+
}
|
|
3515
|
+
export type $defs = Record<string, never>;
|
|
3516
|
+
export type operations = Record<string, never>;
|
|
3517
|
+
//# sourceMappingURL=types.d.ts.map
|