@semiont/api-client 0.2.33 → 0.2.34-build.89
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/README.md +5 -1
- package/dist/index.d.ts +26 -207
- package/dist/index.js +52 -113
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +603 -1
- package/dist/utils/index.js +1 -7
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -7
- package/dist/index-CJqmerJr.d.ts +0 -3859
package/dist/index-CJqmerJr.d.ts
DELETED
|
@@ -1,3859 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by openapi-typescript.
|
|
3
|
-
* Do not make direct changes to the file.
|
|
4
|
-
*/
|
|
5
|
-
interface paths {
|
|
6
|
-
"/resources/{id}": {
|
|
7
|
-
parameters: {
|
|
8
|
-
query?: never;
|
|
9
|
-
header?: never;
|
|
10
|
-
path?: never;
|
|
11
|
-
cookie?: never;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Get Resource by URI (W3C Content Negotiation)
|
|
15
|
-
* @description W3C-compliant globally resolvable resource URI with content negotiation. Returns JSON-LD metadata (Accept: application/ld+json), raw representation (Accept: text/plain, text/markdown, etc.), or redirects to frontend (?view=semiont). Requires authentication.
|
|
16
|
-
*/
|
|
17
|
-
get: {
|
|
18
|
-
parameters: {
|
|
19
|
-
query?: {
|
|
20
|
-
/** @description Optional view parameter. If set to 'semiont', redirects to frontend viewer. */
|
|
21
|
-
view?: "semiont";
|
|
22
|
-
};
|
|
23
|
-
header?: never;
|
|
24
|
-
path: {
|
|
25
|
-
/** @description Resource ID */
|
|
26
|
-
id: string;
|
|
27
|
-
};
|
|
28
|
-
cookie?: never;
|
|
29
|
-
};
|
|
30
|
-
requestBody?: never;
|
|
31
|
-
responses: {
|
|
32
|
-
/** @description Resource metadata (JSON-LD) or raw representation */
|
|
33
|
-
200: {
|
|
34
|
-
headers: {
|
|
35
|
-
[name: string]: unknown;
|
|
36
|
-
};
|
|
37
|
-
content: {
|
|
38
|
-
"application/ld+json": components["schemas"]["GetResourceResponse"];
|
|
39
|
-
"text/plain": string;
|
|
40
|
-
"text/markdown": string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
/** @description Redirect to frontend viewer (when ?view=semiont) */
|
|
44
|
-
302: {
|
|
45
|
-
headers: {
|
|
46
|
-
[name: string]: unknown;
|
|
47
|
-
};
|
|
48
|
-
content?: never;
|
|
49
|
-
};
|
|
50
|
-
/** @description Resource not found */
|
|
51
|
-
404: {
|
|
52
|
-
headers: {
|
|
53
|
-
[name: string]: unknown;
|
|
54
|
-
};
|
|
55
|
-
content?: never;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
put?: never;
|
|
60
|
-
post?: never;
|
|
61
|
-
delete?: never;
|
|
62
|
-
options?: never;
|
|
63
|
-
head?: never;
|
|
64
|
-
/**
|
|
65
|
-
* Update Resource
|
|
66
|
-
* @description Update resource metadata (append-only operations - name and content are immutable)
|
|
67
|
-
*/
|
|
68
|
-
patch: {
|
|
69
|
-
parameters: {
|
|
70
|
-
query?: never;
|
|
71
|
-
header?: never;
|
|
72
|
-
path: {
|
|
73
|
-
/** @description Resource ID */
|
|
74
|
-
id: string;
|
|
75
|
-
};
|
|
76
|
-
cookie?: never;
|
|
77
|
-
};
|
|
78
|
-
requestBody?: {
|
|
79
|
-
content: {
|
|
80
|
-
"application/json": components["schemas"]["UpdateResourceRequest"];
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
responses: {
|
|
84
|
-
/** @description Resource updated successfully */
|
|
85
|
-
200: {
|
|
86
|
-
headers: {
|
|
87
|
-
[name: string]: unknown;
|
|
88
|
-
};
|
|
89
|
-
content: {
|
|
90
|
-
"application/json": components["schemas"]["GetResourceResponse"];
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
/** @description Resource not found */
|
|
94
|
-
404: {
|
|
95
|
-
headers: {
|
|
96
|
-
[name: string]: unknown;
|
|
97
|
-
};
|
|
98
|
-
content?: never;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
trace?: never;
|
|
103
|
-
};
|
|
104
|
-
"/annotations/{id}": {
|
|
105
|
-
parameters: {
|
|
106
|
-
query?: never;
|
|
107
|
-
header?: never;
|
|
108
|
-
path?: never;
|
|
109
|
-
cookie?: never;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Get Annotation by URI (W3C Content Negotiation)
|
|
113
|
-
* @description W3C-compliant globally resolvable annotation URI with content negotiation. Returns JSON-LD for API clients (Accept: application/ld+json or application/json). Redirects to frontend for browsers (Accept: text/html or browser User-Agent). Requires authentication and resourceId query parameter.
|
|
114
|
-
*/
|
|
115
|
-
get: {
|
|
116
|
-
parameters: {
|
|
117
|
-
query: {
|
|
118
|
-
/** @description Resource ID or URI containing the annotation */
|
|
119
|
-
resourceId: string;
|
|
120
|
-
};
|
|
121
|
-
header?: never;
|
|
122
|
-
path: {
|
|
123
|
-
/** @description Annotation ID */
|
|
124
|
-
id: string;
|
|
125
|
-
};
|
|
126
|
-
cookie?: never;
|
|
127
|
-
};
|
|
128
|
-
requestBody?: never;
|
|
129
|
-
responses: {
|
|
130
|
-
/** @description Annotation representation (JSON-LD) */
|
|
131
|
-
200: {
|
|
132
|
-
headers: {
|
|
133
|
-
[name: string]: unknown;
|
|
134
|
-
};
|
|
135
|
-
content: {
|
|
136
|
-
"application/ld+json": components["schemas"]["GetAnnotationResponse"];
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
/** @description Redirect to frontend (for browsers) */
|
|
140
|
-
302: {
|
|
141
|
-
headers: {
|
|
142
|
-
[name: string]: unknown;
|
|
143
|
-
};
|
|
144
|
-
content?: never;
|
|
145
|
-
};
|
|
146
|
-
/** @description Missing resourceId parameter */
|
|
147
|
-
400: {
|
|
148
|
-
headers: {
|
|
149
|
-
[name: string]: unknown;
|
|
150
|
-
};
|
|
151
|
-
content?: never;
|
|
152
|
-
};
|
|
153
|
-
/** @description Annotation not found */
|
|
154
|
-
404: {
|
|
155
|
-
headers: {
|
|
156
|
-
[name: string]: unknown;
|
|
157
|
-
};
|
|
158
|
-
content?: never;
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
put?: never;
|
|
163
|
-
post?: never;
|
|
164
|
-
delete?: never;
|
|
165
|
-
options?: never;
|
|
166
|
-
head?: never;
|
|
167
|
-
patch?: never;
|
|
168
|
-
trace?: never;
|
|
169
|
-
};
|
|
170
|
-
"/api/annotations/{id}/context": {
|
|
171
|
-
parameters: {
|
|
172
|
-
query?: never;
|
|
173
|
-
header?: never;
|
|
174
|
-
path?: never;
|
|
175
|
-
cookie?: never;
|
|
176
|
-
};
|
|
177
|
-
/**
|
|
178
|
-
* Get Annotation Context
|
|
179
|
-
* @description Get the text context around an annotation with configurable before/after window
|
|
180
|
-
*/
|
|
181
|
-
get: {
|
|
182
|
-
parameters: {
|
|
183
|
-
query: {
|
|
184
|
-
/** @description Resource ID containing the annotation */
|
|
185
|
-
resourceId: string;
|
|
186
|
-
/** @description Number of characters before the selection */
|
|
187
|
-
contextBefore?: number;
|
|
188
|
-
/** @description Number of characters after the selection */
|
|
189
|
-
contextAfter?: number;
|
|
190
|
-
};
|
|
191
|
-
header?: never;
|
|
192
|
-
path: {
|
|
193
|
-
/** @description Annotation ID */
|
|
194
|
-
id: string;
|
|
195
|
-
};
|
|
196
|
-
cookie?: never;
|
|
197
|
-
};
|
|
198
|
-
requestBody?: never;
|
|
199
|
-
responses: {
|
|
200
|
-
/** @description Annotation context */
|
|
201
|
-
200: {
|
|
202
|
-
headers: {
|
|
203
|
-
[name: string]: unknown;
|
|
204
|
-
};
|
|
205
|
-
content: {
|
|
206
|
-
"application/json": components["schemas"]["AnnotationContextResponse"];
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
/** @description Invalid query parameters */
|
|
210
|
-
400: {
|
|
211
|
-
headers: {
|
|
212
|
-
[name: string]: unknown;
|
|
213
|
-
};
|
|
214
|
-
content?: never;
|
|
215
|
-
};
|
|
216
|
-
/** @description Authentication required */
|
|
217
|
-
401: {
|
|
218
|
-
headers: {
|
|
219
|
-
[name: string]: unknown;
|
|
220
|
-
};
|
|
221
|
-
content?: never;
|
|
222
|
-
};
|
|
223
|
-
/** @description Annotation not found */
|
|
224
|
-
404: {
|
|
225
|
-
headers: {
|
|
226
|
-
[name: string]: unknown;
|
|
227
|
-
};
|
|
228
|
-
content?: never;
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
put?: never;
|
|
233
|
-
post?: never;
|
|
234
|
-
delete?: never;
|
|
235
|
-
options?: never;
|
|
236
|
-
head?: never;
|
|
237
|
-
patch?: never;
|
|
238
|
-
trace?: never;
|
|
239
|
-
};
|
|
240
|
-
"/api/annotations/{id}/summary": {
|
|
241
|
-
parameters: {
|
|
242
|
-
query?: never;
|
|
243
|
-
header?: never;
|
|
244
|
-
path?: never;
|
|
245
|
-
cookie?: never;
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* Get Annotation Summary
|
|
249
|
-
* @description Get an AI-generated summary of the annotation in context
|
|
250
|
-
*/
|
|
251
|
-
get: {
|
|
252
|
-
parameters: {
|
|
253
|
-
query: {
|
|
254
|
-
/** @description Resource ID containing the annotation */
|
|
255
|
-
resourceId: string;
|
|
256
|
-
};
|
|
257
|
-
header?: never;
|
|
258
|
-
path: {
|
|
259
|
-
/** @description Annotation ID */
|
|
260
|
-
id: string;
|
|
261
|
-
};
|
|
262
|
-
cookie?: never;
|
|
263
|
-
};
|
|
264
|
-
requestBody?: never;
|
|
265
|
-
responses: {
|
|
266
|
-
/** @description AI-generated annotation summary */
|
|
267
|
-
200: {
|
|
268
|
-
headers: {
|
|
269
|
-
[name: string]: unknown;
|
|
270
|
-
};
|
|
271
|
-
content: {
|
|
272
|
-
"application/json": components["schemas"]["ContextualSummaryResponse"];
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
/** @description Missing resourceId parameter */
|
|
276
|
-
400: {
|
|
277
|
-
headers: {
|
|
278
|
-
[name: string]: unknown;
|
|
279
|
-
};
|
|
280
|
-
content?: never;
|
|
281
|
-
};
|
|
282
|
-
/** @description Authentication required */
|
|
283
|
-
401: {
|
|
284
|
-
headers: {
|
|
285
|
-
[name: string]: unknown;
|
|
286
|
-
};
|
|
287
|
-
content?: never;
|
|
288
|
-
};
|
|
289
|
-
/** @description Annotation not found */
|
|
290
|
-
404: {
|
|
291
|
-
headers: {
|
|
292
|
-
[name: string]: unknown;
|
|
293
|
-
};
|
|
294
|
-
content?: never;
|
|
295
|
-
};
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
put?: never;
|
|
299
|
-
post?: never;
|
|
300
|
-
delete?: never;
|
|
301
|
-
options?: never;
|
|
302
|
-
head?: never;
|
|
303
|
-
patch?: never;
|
|
304
|
-
trace?: never;
|
|
305
|
-
};
|
|
306
|
-
"/api/health": {
|
|
307
|
-
parameters: {
|
|
308
|
-
query?: never;
|
|
309
|
-
header?: never;
|
|
310
|
-
path?: never;
|
|
311
|
-
cookie?: never;
|
|
312
|
-
};
|
|
313
|
-
/**
|
|
314
|
-
* Health Check
|
|
315
|
-
* @description Check if the API is operational and database is connected
|
|
316
|
-
*/
|
|
317
|
-
get: {
|
|
318
|
-
parameters: {
|
|
319
|
-
query?: never;
|
|
320
|
-
header?: never;
|
|
321
|
-
path?: never;
|
|
322
|
-
cookie?: never;
|
|
323
|
-
};
|
|
324
|
-
requestBody?: never;
|
|
325
|
-
responses: {
|
|
326
|
-
/** @description Health status of the API */
|
|
327
|
-
200: {
|
|
328
|
-
headers: {
|
|
329
|
-
[name: string]: unknown;
|
|
330
|
-
};
|
|
331
|
-
content: {
|
|
332
|
-
"application/json": components["schemas"]["HealthResponse"];
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
put?: never;
|
|
338
|
-
post?: never;
|
|
339
|
-
delete?: never;
|
|
340
|
-
options?: never;
|
|
341
|
-
head?: never;
|
|
342
|
-
patch?: never;
|
|
343
|
-
trace?: never;
|
|
344
|
-
};
|
|
345
|
-
"/api/tokens/password": {
|
|
346
|
-
parameters: {
|
|
347
|
-
query?: never;
|
|
348
|
-
header?: never;
|
|
349
|
-
path?: never;
|
|
350
|
-
cookie?: never;
|
|
351
|
-
};
|
|
352
|
-
get?: never;
|
|
353
|
-
put?: never;
|
|
354
|
-
/**
|
|
355
|
-
* Password Authentication
|
|
356
|
-
* @description Authenticate with email and password for users with password provider
|
|
357
|
-
*/
|
|
358
|
-
post: {
|
|
359
|
-
parameters: {
|
|
360
|
-
query?: never;
|
|
361
|
-
header?: never;
|
|
362
|
-
path?: never;
|
|
363
|
-
cookie?: never;
|
|
364
|
-
};
|
|
365
|
-
requestBody: {
|
|
366
|
-
content: {
|
|
367
|
-
"application/json": components["schemas"]["PasswordAuthRequest"];
|
|
368
|
-
};
|
|
369
|
-
};
|
|
370
|
-
responses: {
|
|
371
|
-
/** @description Authentication successful */
|
|
372
|
-
200: {
|
|
373
|
-
headers: {
|
|
374
|
-
[name: string]: unknown;
|
|
375
|
-
};
|
|
376
|
-
content: {
|
|
377
|
-
"application/json": components["schemas"]["AuthResponse"];
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
|
-
/** @description Bad request - invalid input or OAuth user attempting password auth */
|
|
381
|
-
400: {
|
|
382
|
-
headers: {
|
|
383
|
-
[name: string]: unknown;
|
|
384
|
-
};
|
|
385
|
-
content: {
|
|
386
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
/** @description Unauthorized - invalid credentials */
|
|
390
|
-
401: {
|
|
391
|
-
headers: {
|
|
392
|
-
[name: string]: unknown;
|
|
393
|
-
};
|
|
394
|
-
content: {
|
|
395
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
396
|
-
};
|
|
397
|
-
};
|
|
398
|
-
/** @description Forbidden - account not active */
|
|
399
|
-
403: {
|
|
400
|
-
headers: {
|
|
401
|
-
[name: string]: unknown;
|
|
402
|
-
};
|
|
403
|
-
content: {
|
|
404
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
405
|
-
};
|
|
406
|
-
};
|
|
407
|
-
};
|
|
408
|
-
};
|
|
409
|
-
delete?: never;
|
|
410
|
-
options?: never;
|
|
411
|
-
head?: never;
|
|
412
|
-
patch?: never;
|
|
413
|
-
trace?: never;
|
|
414
|
-
};
|
|
415
|
-
"/api/tokens/google": {
|
|
416
|
-
parameters: {
|
|
417
|
-
query?: never;
|
|
418
|
-
header?: never;
|
|
419
|
-
path?: never;
|
|
420
|
-
cookie?: never;
|
|
421
|
-
};
|
|
422
|
-
get?: never;
|
|
423
|
-
put?: never;
|
|
424
|
-
/**
|
|
425
|
-
* Google OAuth Authentication
|
|
426
|
-
* @description Authenticate with Google OAuth access token
|
|
427
|
-
*/
|
|
428
|
-
post: {
|
|
429
|
-
parameters: {
|
|
430
|
-
query?: never;
|
|
431
|
-
header?: never;
|
|
432
|
-
path?: never;
|
|
433
|
-
cookie?: never;
|
|
434
|
-
};
|
|
435
|
-
requestBody?: {
|
|
436
|
-
content: {
|
|
437
|
-
"application/json": components["schemas"]["GoogleAuthRequest"];
|
|
438
|
-
};
|
|
439
|
-
};
|
|
440
|
-
responses: {
|
|
441
|
-
/** @description Successful authentication */
|
|
442
|
-
200: {
|
|
443
|
-
headers: {
|
|
444
|
-
[name: string]: unknown;
|
|
445
|
-
};
|
|
446
|
-
content: {
|
|
447
|
-
"application/json": components["schemas"]["AuthResponse"];
|
|
448
|
-
};
|
|
449
|
-
};
|
|
450
|
-
/** @description Invalid request or authentication failed */
|
|
451
|
-
400: {
|
|
452
|
-
headers: {
|
|
453
|
-
[name: string]: unknown;
|
|
454
|
-
};
|
|
455
|
-
content: {
|
|
456
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
457
|
-
};
|
|
458
|
-
};
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
delete?: never;
|
|
462
|
-
options?: never;
|
|
463
|
-
head?: never;
|
|
464
|
-
patch?: never;
|
|
465
|
-
trace?: never;
|
|
466
|
-
};
|
|
467
|
-
"/api/tokens/refresh": {
|
|
468
|
-
parameters: {
|
|
469
|
-
query?: never;
|
|
470
|
-
header?: never;
|
|
471
|
-
path?: never;
|
|
472
|
-
cookie?: never;
|
|
473
|
-
};
|
|
474
|
-
get?: never;
|
|
475
|
-
put?: never;
|
|
476
|
-
/**
|
|
477
|
-
* Refresh Access Token
|
|
478
|
-
* @description Exchange a refresh token for a new access token
|
|
479
|
-
*/
|
|
480
|
-
post: {
|
|
481
|
-
parameters: {
|
|
482
|
-
query?: never;
|
|
483
|
-
header?: never;
|
|
484
|
-
path?: never;
|
|
485
|
-
cookie?: never;
|
|
486
|
-
};
|
|
487
|
-
requestBody?: {
|
|
488
|
-
content: {
|
|
489
|
-
"application/json": components["schemas"]["TokenRefreshRequest"];
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
responses: {
|
|
493
|
-
/** @description New access token generated */
|
|
494
|
-
200: {
|
|
495
|
-
headers: {
|
|
496
|
-
[name: string]: unknown;
|
|
497
|
-
};
|
|
498
|
-
content: {
|
|
499
|
-
"application/json": components["schemas"]["GoogleAuthRequest"];
|
|
500
|
-
};
|
|
501
|
-
};
|
|
502
|
-
/** @description Invalid or expired refresh token */
|
|
503
|
-
401: {
|
|
504
|
-
headers: {
|
|
505
|
-
[name: string]: unknown;
|
|
506
|
-
};
|
|
507
|
-
content: {
|
|
508
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
|
-
};
|
|
512
|
-
};
|
|
513
|
-
delete?: never;
|
|
514
|
-
options?: never;
|
|
515
|
-
head?: never;
|
|
516
|
-
patch?: never;
|
|
517
|
-
trace?: never;
|
|
518
|
-
};
|
|
519
|
-
"/api/tokens/mcp-generate": {
|
|
520
|
-
parameters: {
|
|
521
|
-
query?: never;
|
|
522
|
-
header?: never;
|
|
523
|
-
path?: never;
|
|
524
|
-
cookie?: never;
|
|
525
|
-
};
|
|
526
|
-
get?: never;
|
|
527
|
-
put?: never;
|
|
528
|
-
/**
|
|
529
|
-
* Generate MCP Token
|
|
530
|
-
* @description Generate a short-lived token for MCP server
|
|
531
|
-
*/
|
|
532
|
-
post: {
|
|
533
|
-
parameters: {
|
|
534
|
-
query?: never;
|
|
535
|
-
header?: never;
|
|
536
|
-
path?: never;
|
|
537
|
-
cookie?: never;
|
|
538
|
-
};
|
|
539
|
-
requestBody?: never;
|
|
540
|
-
responses: {
|
|
541
|
-
/** @description MCP token generated */
|
|
542
|
-
200: {
|
|
543
|
-
headers: {
|
|
544
|
-
[name: string]: unknown;
|
|
545
|
-
};
|
|
546
|
-
content: {
|
|
547
|
-
"application/json": components["schemas"]["MCPGenerateResponse"];
|
|
548
|
-
};
|
|
549
|
-
};
|
|
550
|
-
/** @description Unauthorized */
|
|
551
|
-
401: {
|
|
552
|
-
headers: {
|
|
553
|
-
[name: string]: unknown;
|
|
554
|
-
};
|
|
555
|
-
content: {
|
|
556
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
};
|
|
560
|
-
};
|
|
561
|
-
delete?: never;
|
|
562
|
-
options?: never;
|
|
563
|
-
head?: never;
|
|
564
|
-
patch?: never;
|
|
565
|
-
trace?: never;
|
|
566
|
-
};
|
|
567
|
-
"/api/users/me": {
|
|
568
|
-
parameters: {
|
|
569
|
-
query?: never;
|
|
570
|
-
header?: never;
|
|
571
|
-
path?: never;
|
|
572
|
-
cookie?: never;
|
|
573
|
-
};
|
|
574
|
-
/**
|
|
575
|
-
* Get Current User
|
|
576
|
-
* @description Get information about the authenticated user
|
|
577
|
-
*/
|
|
578
|
-
get: {
|
|
579
|
-
parameters: {
|
|
580
|
-
query?: never;
|
|
581
|
-
header?: never;
|
|
582
|
-
path?: never;
|
|
583
|
-
cookie?: never;
|
|
584
|
-
};
|
|
585
|
-
requestBody?: never;
|
|
586
|
-
responses: {
|
|
587
|
-
/** @description User information */
|
|
588
|
-
200: {
|
|
589
|
-
headers: {
|
|
590
|
-
[name: string]: unknown;
|
|
591
|
-
};
|
|
592
|
-
content: {
|
|
593
|
-
"application/json": components["schemas"]["UserResponse"];
|
|
594
|
-
};
|
|
595
|
-
};
|
|
596
|
-
/** @description Unauthorized */
|
|
597
|
-
401: {
|
|
598
|
-
headers: {
|
|
599
|
-
[name: string]: unknown;
|
|
600
|
-
};
|
|
601
|
-
content: {
|
|
602
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
603
|
-
};
|
|
604
|
-
};
|
|
605
|
-
};
|
|
606
|
-
};
|
|
607
|
-
put?: never;
|
|
608
|
-
post?: never;
|
|
609
|
-
delete?: never;
|
|
610
|
-
options?: never;
|
|
611
|
-
head?: never;
|
|
612
|
-
patch?: never;
|
|
613
|
-
trace?: never;
|
|
614
|
-
};
|
|
615
|
-
"/api/users/accept-terms": {
|
|
616
|
-
parameters: {
|
|
617
|
-
query?: never;
|
|
618
|
-
header?: never;
|
|
619
|
-
path?: never;
|
|
620
|
-
cookie?: never;
|
|
621
|
-
};
|
|
622
|
-
get?: never;
|
|
623
|
-
put?: never;
|
|
624
|
-
/**
|
|
625
|
-
* Accept Terms
|
|
626
|
-
* @description Mark terms as accepted for the current user
|
|
627
|
-
*/
|
|
628
|
-
post: {
|
|
629
|
-
parameters: {
|
|
630
|
-
query?: never;
|
|
631
|
-
header?: never;
|
|
632
|
-
path?: never;
|
|
633
|
-
cookie?: never;
|
|
634
|
-
};
|
|
635
|
-
requestBody?: never;
|
|
636
|
-
responses: {
|
|
637
|
-
/** @description Terms accepted successfully */
|
|
638
|
-
200: {
|
|
639
|
-
headers: {
|
|
640
|
-
[name: string]: unknown;
|
|
641
|
-
};
|
|
642
|
-
content: {
|
|
643
|
-
"application/json": components["schemas"]["AcceptTermsResponse"];
|
|
644
|
-
};
|
|
645
|
-
};
|
|
646
|
-
/** @description Unauthorized */
|
|
647
|
-
401: {
|
|
648
|
-
headers: {
|
|
649
|
-
[name: string]: unknown;
|
|
650
|
-
};
|
|
651
|
-
content: {
|
|
652
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
653
|
-
};
|
|
654
|
-
};
|
|
655
|
-
};
|
|
656
|
-
};
|
|
657
|
-
delete?: never;
|
|
658
|
-
options?: never;
|
|
659
|
-
head?: never;
|
|
660
|
-
patch?: never;
|
|
661
|
-
trace?: never;
|
|
662
|
-
};
|
|
663
|
-
"/api/users/logout": {
|
|
664
|
-
parameters: {
|
|
665
|
-
query?: never;
|
|
666
|
-
header?: never;
|
|
667
|
-
path?: never;
|
|
668
|
-
cookie?: never;
|
|
669
|
-
};
|
|
670
|
-
get?: never;
|
|
671
|
-
put?: never;
|
|
672
|
-
/**
|
|
673
|
-
* Logout
|
|
674
|
-
* @description Logout the current user
|
|
675
|
-
*/
|
|
676
|
-
post: {
|
|
677
|
-
parameters: {
|
|
678
|
-
query?: never;
|
|
679
|
-
header?: never;
|
|
680
|
-
path?: never;
|
|
681
|
-
cookie?: never;
|
|
682
|
-
};
|
|
683
|
-
requestBody?: never;
|
|
684
|
-
responses: {
|
|
685
|
-
/** @description Logged out successfully */
|
|
686
|
-
200: {
|
|
687
|
-
headers: {
|
|
688
|
-
[name: string]: unknown;
|
|
689
|
-
};
|
|
690
|
-
content: {
|
|
691
|
-
"application/json": components["schemas"]["AcceptTermsResponse"];
|
|
692
|
-
};
|
|
693
|
-
};
|
|
694
|
-
};
|
|
695
|
-
};
|
|
696
|
-
delete?: never;
|
|
697
|
-
options?: never;
|
|
698
|
-
head?: never;
|
|
699
|
-
patch?: never;
|
|
700
|
-
trace?: never;
|
|
701
|
-
};
|
|
702
|
-
"/api/status": {
|
|
703
|
-
parameters: {
|
|
704
|
-
query?: never;
|
|
705
|
-
header?: never;
|
|
706
|
-
path?: never;
|
|
707
|
-
cookie?: never;
|
|
708
|
-
};
|
|
709
|
-
/**
|
|
710
|
-
* Get Service Status
|
|
711
|
-
* @description Get service status and feature availability
|
|
712
|
-
*/
|
|
713
|
-
get: {
|
|
714
|
-
parameters: {
|
|
715
|
-
query?: never;
|
|
716
|
-
header?: never;
|
|
717
|
-
path?: never;
|
|
718
|
-
cookie?: never;
|
|
719
|
-
};
|
|
720
|
-
requestBody?: never;
|
|
721
|
-
responses: {
|
|
722
|
-
/** @description Service status information */
|
|
723
|
-
200: {
|
|
724
|
-
headers: {
|
|
725
|
-
[name: string]: unknown;
|
|
726
|
-
};
|
|
727
|
-
content: {
|
|
728
|
-
"application/json": components["schemas"]["StatusResponse"];
|
|
729
|
-
};
|
|
730
|
-
};
|
|
731
|
-
/** @description Unauthorized */
|
|
732
|
-
401: {
|
|
733
|
-
headers: {
|
|
734
|
-
[name: string]: unknown;
|
|
735
|
-
};
|
|
736
|
-
content: {
|
|
737
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
738
|
-
};
|
|
739
|
-
};
|
|
740
|
-
};
|
|
741
|
-
};
|
|
742
|
-
put?: never;
|
|
743
|
-
post?: never;
|
|
744
|
-
delete?: never;
|
|
745
|
-
options?: never;
|
|
746
|
-
head?: never;
|
|
747
|
-
patch?: never;
|
|
748
|
-
trace?: never;
|
|
749
|
-
};
|
|
750
|
-
"/api/admin/users": {
|
|
751
|
-
parameters: {
|
|
752
|
-
query?: never;
|
|
753
|
-
header?: never;
|
|
754
|
-
path?: never;
|
|
755
|
-
cookie?: never;
|
|
756
|
-
};
|
|
757
|
-
/**
|
|
758
|
-
* List All Users
|
|
759
|
-
* @description Get a list of all users (admin only)
|
|
760
|
-
*/
|
|
761
|
-
get: {
|
|
762
|
-
parameters: {
|
|
763
|
-
query?: never;
|
|
764
|
-
header?: never;
|
|
765
|
-
path?: never;
|
|
766
|
-
cookie?: never;
|
|
767
|
-
};
|
|
768
|
-
requestBody?: never;
|
|
769
|
-
responses: {
|
|
770
|
-
/** @description List of users */
|
|
771
|
-
200: {
|
|
772
|
-
headers: {
|
|
773
|
-
[name: string]: unknown;
|
|
774
|
-
};
|
|
775
|
-
content: {
|
|
776
|
-
"application/json": components["schemas"]["AdminUsersListResponse"];
|
|
777
|
-
};
|
|
778
|
-
};
|
|
779
|
-
/** @description Unauthorized */
|
|
780
|
-
401: {
|
|
781
|
-
headers: {
|
|
782
|
-
[name: string]: unknown;
|
|
783
|
-
};
|
|
784
|
-
content: {
|
|
785
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
786
|
-
};
|
|
787
|
-
};
|
|
788
|
-
/** @description Forbidden - Admin access required */
|
|
789
|
-
403: {
|
|
790
|
-
headers: {
|
|
791
|
-
[name: string]: unknown;
|
|
792
|
-
};
|
|
793
|
-
content: {
|
|
794
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
795
|
-
};
|
|
796
|
-
};
|
|
797
|
-
};
|
|
798
|
-
};
|
|
799
|
-
put?: never;
|
|
800
|
-
post?: never;
|
|
801
|
-
delete?: never;
|
|
802
|
-
options?: never;
|
|
803
|
-
head?: never;
|
|
804
|
-
patch?: never;
|
|
805
|
-
trace?: never;
|
|
806
|
-
};
|
|
807
|
-
"/api/admin/users/stats": {
|
|
808
|
-
parameters: {
|
|
809
|
-
query?: never;
|
|
810
|
-
header?: never;
|
|
811
|
-
path?: never;
|
|
812
|
-
cookie?: never;
|
|
813
|
-
};
|
|
814
|
-
/**
|
|
815
|
-
* User Statistics
|
|
816
|
-
* @description Get user statistics (admin only)
|
|
817
|
-
*/
|
|
818
|
-
get: {
|
|
819
|
-
parameters: {
|
|
820
|
-
query?: never;
|
|
821
|
-
header?: never;
|
|
822
|
-
path?: never;
|
|
823
|
-
cookie?: never;
|
|
824
|
-
};
|
|
825
|
-
requestBody?: never;
|
|
826
|
-
responses: {
|
|
827
|
-
/** @description User statistics */
|
|
828
|
-
200: {
|
|
829
|
-
headers: {
|
|
830
|
-
[name: string]: unknown;
|
|
831
|
-
};
|
|
832
|
-
content: {
|
|
833
|
-
"application/json": components["schemas"]["AdminUserStatsResponse"];
|
|
834
|
-
};
|
|
835
|
-
};
|
|
836
|
-
/** @description Unauthorized */
|
|
837
|
-
401: {
|
|
838
|
-
headers: {
|
|
839
|
-
[name: string]: unknown;
|
|
840
|
-
};
|
|
841
|
-
content: {
|
|
842
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
843
|
-
};
|
|
844
|
-
};
|
|
845
|
-
/** @description Forbidden - Admin access required */
|
|
846
|
-
403: {
|
|
847
|
-
headers: {
|
|
848
|
-
[name: string]: unknown;
|
|
849
|
-
};
|
|
850
|
-
content: {
|
|
851
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
852
|
-
};
|
|
853
|
-
};
|
|
854
|
-
};
|
|
855
|
-
};
|
|
856
|
-
put?: never;
|
|
857
|
-
post?: never;
|
|
858
|
-
delete?: never;
|
|
859
|
-
options?: never;
|
|
860
|
-
head?: never;
|
|
861
|
-
patch?: never;
|
|
862
|
-
trace?: never;
|
|
863
|
-
};
|
|
864
|
-
"/api/admin/users/{id}": {
|
|
865
|
-
parameters: {
|
|
866
|
-
query?: never;
|
|
867
|
-
header?: never;
|
|
868
|
-
path?: never;
|
|
869
|
-
cookie?: never;
|
|
870
|
-
};
|
|
871
|
-
get?: never;
|
|
872
|
-
put?: never;
|
|
873
|
-
post?: never;
|
|
874
|
-
/**
|
|
875
|
-
* Delete User
|
|
876
|
-
* @description Delete a user account (admin only, cannot delete own account)
|
|
877
|
-
*/
|
|
878
|
-
delete: {
|
|
879
|
-
parameters: {
|
|
880
|
-
query?: never;
|
|
881
|
-
header?: never;
|
|
882
|
-
path: {
|
|
883
|
-
id: string;
|
|
884
|
-
};
|
|
885
|
-
cookie?: never;
|
|
886
|
-
};
|
|
887
|
-
requestBody?: never;
|
|
888
|
-
responses: {
|
|
889
|
-
/** @description User deleted successfully */
|
|
890
|
-
200: {
|
|
891
|
-
headers: {
|
|
892
|
-
[name: string]: unknown;
|
|
893
|
-
};
|
|
894
|
-
content: {
|
|
895
|
-
"application/json": components["schemas"]["AcceptTermsResponse"];
|
|
896
|
-
};
|
|
897
|
-
};
|
|
898
|
-
/** @description Cannot delete own account */
|
|
899
|
-
400: {
|
|
900
|
-
headers: {
|
|
901
|
-
[name: string]: unknown;
|
|
902
|
-
};
|
|
903
|
-
content: {
|
|
904
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
905
|
-
};
|
|
906
|
-
};
|
|
907
|
-
/** @description Unauthorized */
|
|
908
|
-
401: {
|
|
909
|
-
headers: {
|
|
910
|
-
[name: string]: unknown;
|
|
911
|
-
};
|
|
912
|
-
content: {
|
|
913
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
914
|
-
};
|
|
915
|
-
};
|
|
916
|
-
/** @description Forbidden - Admin access required */
|
|
917
|
-
403: {
|
|
918
|
-
headers: {
|
|
919
|
-
[name: string]: unknown;
|
|
920
|
-
};
|
|
921
|
-
content: {
|
|
922
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
923
|
-
};
|
|
924
|
-
};
|
|
925
|
-
/** @description User not found */
|
|
926
|
-
404: {
|
|
927
|
-
headers: {
|
|
928
|
-
[name: string]: unknown;
|
|
929
|
-
};
|
|
930
|
-
content: {
|
|
931
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
932
|
-
};
|
|
933
|
-
};
|
|
934
|
-
};
|
|
935
|
-
};
|
|
936
|
-
options?: never;
|
|
937
|
-
head?: never;
|
|
938
|
-
/**
|
|
939
|
-
* Update User
|
|
940
|
-
* @description Update user properties (admin only)
|
|
941
|
-
*/
|
|
942
|
-
patch: {
|
|
943
|
-
parameters: {
|
|
944
|
-
query?: never;
|
|
945
|
-
header?: never;
|
|
946
|
-
path: {
|
|
947
|
-
id: string;
|
|
948
|
-
};
|
|
949
|
-
cookie?: never;
|
|
950
|
-
};
|
|
951
|
-
requestBody?: {
|
|
952
|
-
content: {
|
|
953
|
-
"application/json": components["schemas"]["UpdateUserRequest"];
|
|
954
|
-
};
|
|
955
|
-
};
|
|
956
|
-
responses: {
|
|
957
|
-
/** @description User updated successfully */
|
|
958
|
-
200: {
|
|
959
|
-
headers: {
|
|
960
|
-
[name: string]: unknown;
|
|
961
|
-
};
|
|
962
|
-
content: {
|
|
963
|
-
"application/json": components["schemas"]["AdminUpdateUserResponse"];
|
|
964
|
-
};
|
|
965
|
-
};
|
|
966
|
-
/** @description Invalid request */
|
|
967
|
-
400: {
|
|
968
|
-
headers: {
|
|
969
|
-
[name: string]: unknown;
|
|
970
|
-
};
|
|
971
|
-
content: {
|
|
972
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
973
|
-
};
|
|
974
|
-
};
|
|
975
|
-
/** @description Unauthorized */
|
|
976
|
-
401: {
|
|
977
|
-
headers: {
|
|
978
|
-
[name: string]: unknown;
|
|
979
|
-
};
|
|
980
|
-
content: {
|
|
981
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
982
|
-
};
|
|
983
|
-
};
|
|
984
|
-
/** @description Forbidden - Admin access required */
|
|
985
|
-
403: {
|
|
986
|
-
headers: {
|
|
987
|
-
[name: string]: unknown;
|
|
988
|
-
};
|
|
989
|
-
content: {
|
|
990
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
991
|
-
};
|
|
992
|
-
};
|
|
993
|
-
/** @description User not found */
|
|
994
|
-
404: {
|
|
995
|
-
headers: {
|
|
996
|
-
[name: string]: unknown;
|
|
997
|
-
};
|
|
998
|
-
content: {
|
|
999
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
1000
|
-
};
|
|
1001
|
-
};
|
|
1002
|
-
};
|
|
1003
|
-
};
|
|
1004
|
-
trace?: never;
|
|
1005
|
-
};
|
|
1006
|
-
"/api/admin/oauth/config": {
|
|
1007
|
-
parameters: {
|
|
1008
|
-
query?: never;
|
|
1009
|
-
header?: never;
|
|
1010
|
-
path?: never;
|
|
1011
|
-
cookie?: never;
|
|
1012
|
-
};
|
|
1013
|
-
/**
|
|
1014
|
-
* Get OAuth Configuration
|
|
1015
|
-
* @description Get OAuth provider configuration (admin only, read-only)
|
|
1016
|
-
*/
|
|
1017
|
-
get: {
|
|
1018
|
-
parameters: {
|
|
1019
|
-
query?: never;
|
|
1020
|
-
header?: never;
|
|
1021
|
-
path?: never;
|
|
1022
|
-
cookie?: never;
|
|
1023
|
-
};
|
|
1024
|
-
requestBody?: never;
|
|
1025
|
-
responses: {
|
|
1026
|
-
/** @description OAuth configuration */
|
|
1027
|
-
200: {
|
|
1028
|
-
headers: {
|
|
1029
|
-
[name: string]: unknown;
|
|
1030
|
-
};
|
|
1031
|
-
content: {
|
|
1032
|
-
"application/json": components["schemas"]["OAuthConfigResponse"];
|
|
1033
|
-
};
|
|
1034
|
-
};
|
|
1035
|
-
/** @description Unauthorized */
|
|
1036
|
-
401: {
|
|
1037
|
-
headers: {
|
|
1038
|
-
[name: string]: unknown;
|
|
1039
|
-
};
|
|
1040
|
-
content: {
|
|
1041
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
1042
|
-
};
|
|
1043
|
-
};
|
|
1044
|
-
/** @description Forbidden - Admin access required */
|
|
1045
|
-
403: {
|
|
1046
|
-
headers: {
|
|
1047
|
-
[name: string]: unknown;
|
|
1048
|
-
};
|
|
1049
|
-
content: {
|
|
1050
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
1051
|
-
};
|
|
1052
|
-
};
|
|
1053
|
-
};
|
|
1054
|
-
};
|
|
1055
|
-
put?: never;
|
|
1056
|
-
post?: never;
|
|
1057
|
-
delete?: never;
|
|
1058
|
-
options?: never;
|
|
1059
|
-
head?: never;
|
|
1060
|
-
patch?: never;
|
|
1061
|
-
trace?: never;
|
|
1062
|
-
};
|
|
1063
|
-
"/resources": {
|
|
1064
|
-
parameters: {
|
|
1065
|
-
query?: never;
|
|
1066
|
-
header?: never;
|
|
1067
|
-
path?: never;
|
|
1068
|
-
cookie?: never;
|
|
1069
|
-
};
|
|
1070
|
-
/**
|
|
1071
|
-
* List Resources
|
|
1072
|
-
* @description List all resources with optional filters
|
|
1073
|
-
*/
|
|
1074
|
-
get: {
|
|
1075
|
-
parameters: {
|
|
1076
|
-
query?: {
|
|
1077
|
-
offset?: number | null;
|
|
1078
|
-
limit?: number | null;
|
|
1079
|
-
entityType?: string;
|
|
1080
|
-
archived?: "true" | "false" | boolean;
|
|
1081
|
-
search?: string;
|
|
1082
|
-
/** @description Search query */
|
|
1083
|
-
q?: string;
|
|
1084
|
-
};
|
|
1085
|
-
header?: never;
|
|
1086
|
-
path?: never;
|
|
1087
|
-
cookie?: never;
|
|
1088
|
-
};
|
|
1089
|
-
requestBody?: never;
|
|
1090
|
-
responses: {
|
|
1091
|
-
/** @description Resources listed successfully */
|
|
1092
|
-
200: {
|
|
1093
|
-
headers: {
|
|
1094
|
-
[name: string]: unknown;
|
|
1095
|
-
};
|
|
1096
|
-
content: {
|
|
1097
|
-
"application/json": components["schemas"]["ListResourcesResponse"];
|
|
1098
|
-
};
|
|
1099
|
-
};
|
|
1100
|
-
};
|
|
1101
|
-
};
|
|
1102
|
-
put?: never;
|
|
1103
|
-
/**
|
|
1104
|
-
* Create Resource
|
|
1105
|
-
* @description Create a new resource
|
|
1106
|
-
*/
|
|
1107
|
-
post: {
|
|
1108
|
-
parameters: {
|
|
1109
|
-
query?: never;
|
|
1110
|
-
header?: never;
|
|
1111
|
-
path?: never;
|
|
1112
|
-
cookie?: never;
|
|
1113
|
-
};
|
|
1114
|
-
requestBody: {
|
|
1115
|
-
content: {
|
|
1116
|
-
"multipart/form-data": {
|
|
1117
|
-
/** @description Resource name */
|
|
1118
|
-
name: string;
|
|
1119
|
-
/**
|
|
1120
|
-
* Format: binary
|
|
1121
|
-
* @description Binary content of the resource
|
|
1122
|
-
*/
|
|
1123
|
-
file: string;
|
|
1124
|
-
/** @description MIME type (e.g., text/markdown, image/png) */
|
|
1125
|
-
format: string;
|
|
1126
|
-
/** @description JSON-encoded array of entity types */
|
|
1127
|
-
entityTypes?: string;
|
|
1128
|
-
/** @description ISO 639-1 language code */
|
|
1129
|
-
language?: string;
|
|
1130
|
-
/** @description How the resource was created */
|
|
1131
|
-
creationMethod?: string;
|
|
1132
|
-
/** @description Source annotation ID (for generated resources) */
|
|
1133
|
-
sourceAnnotationId?: string;
|
|
1134
|
-
/** @description Source resource ID (for cloned resources) */
|
|
1135
|
-
sourceResourceId?: string;
|
|
1136
|
-
};
|
|
1137
|
-
};
|
|
1138
|
-
};
|
|
1139
|
-
responses: {
|
|
1140
|
-
/** @description Resource created successfully */
|
|
1141
|
-
201: {
|
|
1142
|
-
headers: {
|
|
1143
|
-
[name: string]: unknown;
|
|
1144
|
-
};
|
|
1145
|
-
content: {
|
|
1146
|
-
"application/json": components["schemas"]["CreateResourceResponse"];
|
|
1147
|
-
};
|
|
1148
|
-
};
|
|
1149
|
-
};
|
|
1150
|
-
};
|
|
1151
|
-
delete?: never;
|
|
1152
|
-
options?: never;
|
|
1153
|
-
head?: never;
|
|
1154
|
-
patch?: never;
|
|
1155
|
-
trace?: never;
|
|
1156
|
-
};
|
|
1157
|
-
"/resources/{id}/detect-annotations-stream": {
|
|
1158
|
-
parameters: {
|
|
1159
|
-
query?: never;
|
|
1160
|
-
header?: never;
|
|
1161
|
-
path?: never;
|
|
1162
|
-
cookie?: never;
|
|
1163
|
-
};
|
|
1164
|
-
get?: never;
|
|
1165
|
-
put?: never;
|
|
1166
|
-
/**
|
|
1167
|
-
* Detect Annotations with Progress (SSE)
|
|
1168
|
-
* @description Stream real-time entity detection progress via Server-Sent Events
|
|
1169
|
-
*/
|
|
1170
|
-
post: {
|
|
1171
|
-
parameters: {
|
|
1172
|
-
query?: never;
|
|
1173
|
-
header?: never;
|
|
1174
|
-
path: {
|
|
1175
|
-
id: string;
|
|
1176
|
-
};
|
|
1177
|
-
cookie?: never;
|
|
1178
|
-
};
|
|
1179
|
-
requestBody?: {
|
|
1180
|
-
content: {
|
|
1181
|
-
"application/json": components["schemas"]["DetectReferencesStreamRequest"];
|
|
1182
|
-
};
|
|
1183
|
-
};
|
|
1184
|
-
responses: {
|
|
1185
|
-
/** @description SSE stream opened successfully */
|
|
1186
|
-
200: {
|
|
1187
|
-
headers: {
|
|
1188
|
-
[name: string]: unknown;
|
|
1189
|
-
};
|
|
1190
|
-
content: {
|
|
1191
|
-
"text/event-stream": components["schemas"]["EventStreamResponse"];
|
|
1192
|
-
};
|
|
1193
|
-
};
|
|
1194
|
-
/** @description Authentication required */
|
|
1195
|
-
401: {
|
|
1196
|
-
headers: {
|
|
1197
|
-
[name: string]: unknown;
|
|
1198
|
-
};
|
|
1199
|
-
content?: never;
|
|
1200
|
-
};
|
|
1201
|
-
/** @description Resource not found */
|
|
1202
|
-
404: {
|
|
1203
|
-
headers: {
|
|
1204
|
-
[name: string]: unknown;
|
|
1205
|
-
};
|
|
1206
|
-
content?: never;
|
|
1207
|
-
};
|
|
1208
|
-
};
|
|
1209
|
-
};
|
|
1210
|
-
delete?: never;
|
|
1211
|
-
options?: never;
|
|
1212
|
-
head?: never;
|
|
1213
|
-
patch?: never;
|
|
1214
|
-
trace?: never;
|
|
1215
|
-
};
|
|
1216
|
-
"/resources/{id}/detect-highlights-stream": {
|
|
1217
|
-
parameters: {
|
|
1218
|
-
query?: never;
|
|
1219
|
-
header?: never;
|
|
1220
|
-
path?: never;
|
|
1221
|
-
cookie?: never;
|
|
1222
|
-
};
|
|
1223
|
-
get?: never;
|
|
1224
|
-
put?: never;
|
|
1225
|
-
/**
|
|
1226
|
-
* Detect Highlights with Progress (SSE)
|
|
1227
|
-
* @description Stream real-time highlight detection progress via Server-Sent Events
|
|
1228
|
-
*/
|
|
1229
|
-
post: {
|
|
1230
|
-
parameters: {
|
|
1231
|
-
query?: never;
|
|
1232
|
-
header?: never;
|
|
1233
|
-
path: {
|
|
1234
|
-
id: string;
|
|
1235
|
-
};
|
|
1236
|
-
cookie?: never;
|
|
1237
|
-
};
|
|
1238
|
-
requestBody?: {
|
|
1239
|
-
content: {
|
|
1240
|
-
"application/json": components["schemas"]["DetectHighlightsStreamRequest"];
|
|
1241
|
-
};
|
|
1242
|
-
};
|
|
1243
|
-
responses: {
|
|
1244
|
-
/** @description SSE stream opened successfully */
|
|
1245
|
-
200: {
|
|
1246
|
-
headers: {
|
|
1247
|
-
[name: string]: unknown;
|
|
1248
|
-
};
|
|
1249
|
-
content: {
|
|
1250
|
-
"text/event-stream": components["schemas"]["EventStreamResponse"];
|
|
1251
|
-
};
|
|
1252
|
-
};
|
|
1253
|
-
/** @description Authentication required */
|
|
1254
|
-
401: {
|
|
1255
|
-
headers: {
|
|
1256
|
-
[name: string]: unknown;
|
|
1257
|
-
};
|
|
1258
|
-
content?: never;
|
|
1259
|
-
};
|
|
1260
|
-
/** @description Resource not found */
|
|
1261
|
-
404: {
|
|
1262
|
-
headers: {
|
|
1263
|
-
[name: string]: unknown;
|
|
1264
|
-
};
|
|
1265
|
-
content?: never;
|
|
1266
|
-
};
|
|
1267
|
-
};
|
|
1268
|
-
};
|
|
1269
|
-
delete?: never;
|
|
1270
|
-
options?: never;
|
|
1271
|
-
head?: never;
|
|
1272
|
-
patch?: never;
|
|
1273
|
-
trace?: never;
|
|
1274
|
-
};
|
|
1275
|
-
"/resources/{id}/detect-assessments-stream": {
|
|
1276
|
-
parameters: {
|
|
1277
|
-
query?: never;
|
|
1278
|
-
header?: never;
|
|
1279
|
-
path?: never;
|
|
1280
|
-
cookie?: never;
|
|
1281
|
-
};
|
|
1282
|
-
get?: never;
|
|
1283
|
-
put?: never;
|
|
1284
|
-
/**
|
|
1285
|
-
* Detect Assessments with Progress (SSE)
|
|
1286
|
-
* @description Stream real-time assessment detection progress via Server-Sent Events
|
|
1287
|
-
*/
|
|
1288
|
-
post: {
|
|
1289
|
-
parameters: {
|
|
1290
|
-
query?: never;
|
|
1291
|
-
header?: never;
|
|
1292
|
-
path: {
|
|
1293
|
-
id: string;
|
|
1294
|
-
};
|
|
1295
|
-
cookie?: never;
|
|
1296
|
-
};
|
|
1297
|
-
requestBody?: {
|
|
1298
|
-
content: {
|
|
1299
|
-
"application/json": components["schemas"]["DetectAssessmentsStreamRequest"];
|
|
1300
|
-
};
|
|
1301
|
-
};
|
|
1302
|
-
responses: {
|
|
1303
|
-
/** @description SSE stream opened successfully */
|
|
1304
|
-
200: {
|
|
1305
|
-
headers: {
|
|
1306
|
-
[name: string]: unknown;
|
|
1307
|
-
};
|
|
1308
|
-
content: {
|
|
1309
|
-
"text/event-stream": components["schemas"]["EventStreamResponse"];
|
|
1310
|
-
};
|
|
1311
|
-
};
|
|
1312
|
-
/** @description Authentication required */
|
|
1313
|
-
401: {
|
|
1314
|
-
headers: {
|
|
1315
|
-
[name: string]: unknown;
|
|
1316
|
-
};
|
|
1317
|
-
content?: never;
|
|
1318
|
-
};
|
|
1319
|
-
/** @description Resource not found */
|
|
1320
|
-
404: {
|
|
1321
|
-
headers: {
|
|
1322
|
-
[name: string]: unknown;
|
|
1323
|
-
};
|
|
1324
|
-
content?: never;
|
|
1325
|
-
};
|
|
1326
|
-
};
|
|
1327
|
-
};
|
|
1328
|
-
delete?: never;
|
|
1329
|
-
options?: never;
|
|
1330
|
-
head?: never;
|
|
1331
|
-
patch?: never;
|
|
1332
|
-
trace?: never;
|
|
1333
|
-
};
|
|
1334
|
-
"/resources/{id}/detect-comments-stream": {
|
|
1335
|
-
parameters: {
|
|
1336
|
-
query?: never;
|
|
1337
|
-
header?: never;
|
|
1338
|
-
path?: never;
|
|
1339
|
-
cookie?: never;
|
|
1340
|
-
};
|
|
1341
|
-
get?: never;
|
|
1342
|
-
put?: never;
|
|
1343
|
-
/**
|
|
1344
|
-
* Detect Comments with Progress (SSE)
|
|
1345
|
-
* @description Stream real-time comment detection progress via Server-Sent Events
|
|
1346
|
-
*/
|
|
1347
|
-
post: {
|
|
1348
|
-
parameters: {
|
|
1349
|
-
query?: never;
|
|
1350
|
-
header?: never;
|
|
1351
|
-
path: {
|
|
1352
|
-
id: string;
|
|
1353
|
-
};
|
|
1354
|
-
cookie?: never;
|
|
1355
|
-
};
|
|
1356
|
-
requestBody?: {
|
|
1357
|
-
content: {
|
|
1358
|
-
"application/json": components["schemas"]["DetectCommentsStreamRequest"];
|
|
1359
|
-
};
|
|
1360
|
-
};
|
|
1361
|
-
responses: {
|
|
1362
|
-
/** @description SSE stream opened successfully */
|
|
1363
|
-
200: {
|
|
1364
|
-
headers: {
|
|
1365
|
-
[name: string]: unknown;
|
|
1366
|
-
};
|
|
1367
|
-
content: {
|
|
1368
|
-
"text/event-stream": components["schemas"]["EventStreamResponse"];
|
|
1369
|
-
};
|
|
1370
|
-
};
|
|
1371
|
-
/** @description Authentication required */
|
|
1372
|
-
401: {
|
|
1373
|
-
headers: {
|
|
1374
|
-
[name: string]: unknown;
|
|
1375
|
-
};
|
|
1376
|
-
content?: never;
|
|
1377
|
-
};
|
|
1378
|
-
/** @description Resource not found */
|
|
1379
|
-
404: {
|
|
1380
|
-
headers: {
|
|
1381
|
-
[name: string]: unknown;
|
|
1382
|
-
};
|
|
1383
|
-
content?: never;
|
|
1384
|
-
};
|
|
1385
|
-
};
|
|
1386
|
-
};
|
|
1387
|
-
delete?: never;
|
|
1388
|
-
options?: never;
|
|
1389
|
-
head?: never;
|
|
1390
|
-
patch?: never;
|
|
1391
|
-
trace?: never;
|
|
1392
|
-
};
|
|
1393
|
-
"/resources/{id}/detect-tags-stream": {
|
|
1394
|
-
parameters: {
|
|
1395
|
-
query?: never;
|
|
1396
|
-
header?: never;
|
|
1397
|
-
path?: never;
|
|
1398
|
-
cookie?: never;
|
|
1399
|
-
};
|
|
1400
|
-
get?: never;
|
|
1401
|
-
put?: never;
|
|
1402
|
-
/**
|
|
1403
|
-
* Detect Tags with Progress (SSE)
|
|
1404
|
-
* @description Stream real-time tag detection progress via Server-Sent Events. Identifies passages serving specific structural roles (IRAC, IMRAD, Toulmin frameworks).
|
|
1405
|
-
*/
|
|
1406
|
-
post: {
|
|
1407
|
-
parameters: {
|
|
1408
|
-
query?: never;
|
|
1409
|
-
header?: never;
|
|
1410
|
-
path: {
|
|
1411
|
-
id: string;
|
|
1412
|
-
};
|
|
1413
|
-
cookie?: never;
|
|
1414
|
-
};
|
|
1415
|
-
requestBody?: {
|
|
1416
|
-
content: {
|
|
1417
|
-
"application/json": components["schemas"]["DetectTagsStreamRequest"];
|
|
1418
|
-
};
|
|
1419
|
-
};
|
|
1420
|
-
responses: {
|
|
1421
|
-
/** @description SSE stream opened successfully */
|
|
1422
|
-
200: {
|
|
1423
|
-
headers: {
|
|
1424
|
-
[name: string]: unknown;
|
|
1425
|
-
};
|
|
1426
|
-
content: {
|
|
1427
|
-
"text/event-stream": components["schemas"]["EventStreamResponse"];
|
|
1428
|
-
};
|
|
1429
|
-
};
|
|
1430
|
-
/** @description Authentication required */
|
|
1431
|
-
401: {
|
|
1432
|
-
headers: {
|
|
1433
|
-
[name: string]: unknown;
|
|
1434
|
-
};
|
|
1435
|
-
content?: never;
|
|
1436
|
-
};
|
|
1437
|
-
/** @description Resource not found */
|
|
1438
|
-
404: {
|
|
1439
|
-
headers: {
|
|
1440
|
-
[name: string]: unknown;
|
|
1441
|
-
};
|
|
1442
|
-
content?: never;
|
|
1443
|
-
};
|
|
1444
|
-
};
|
|
1445
|
-
};
|
|
1446
|
-
delete?: never;
|
|
1447
|
-
options?: never;
|
|
1448
|
-
head?: never;
|
|
1449
|
-
patch?: never;
|
|
1450
|
-
trace?: never;
|
|
1451
|
-
};
|
|
1452
|
-
"/resources/{id}/llm-context": {
|
|
1453
|
-
parameters: {
|
|
1454
|
-
query?: never;
|
|
1455
|
-
header?: never;
|
|
1456
|
-
path?: never;
|
|
1457
|
-
cookie?: never;
|
|
1458
|
-
};
|
|
1459
|
-
/**
|
|
1460
|
-
* Get Resource LLM Context
|
|
1461
|
-
* @description Get resource with full context for LLM processing
|
|
1462
|
-
*/
|
|
1463
|
-
get: {
|
|
1464
|
-
parameters: {
|
|
1465
|
-
query?: {
|
|
1466
|
-
depth?: number;
|
|
1467
|
-
maxResources?: number;
|
|
1468
|
-
includeContent?: "true" | "false" | boolean;
|
|
1469
|
-
includeSummary?: "true" | "false" | boolean;
|
|
1470
|
-
};
|
|
1471
|
-
header?: never;
|
|
1472
|
-
path: {
|
|
1473
|
-
id: string;
|
|
1474
|
-
};
|
|
1475
|
-
cookie?: never;
|
|
1476
|
-
};
|
|
1477
|
-
requestBody?: never;
|
|
1478
|
-
responses: {
|
|
1479
|
-
/** @description LLM context */
|
|
1480
|
-
200: {
|
|
1481
|
-
headers: {
|
|
1482
|
-
[name: string]: unknown;
|
|
1483
|
-
};
|
|
1484
|
-
content: {
|
|
1485
|
-
"application/json": components["schemas"]["ResourceLLMContextResponse"];
|
|
1486
|
-
};
|
|
1487
|
-
};
|
|
1488
|
-
};
|
|
1489
|
-
};
|
|
1490
|
-
put?: never;
|
|
1491
|
-
post?: never;
|
|
1492
|
-
delete?: never;
|
|
1493
|
-
options?: never;
|
|
1494
|
-
head?: never;
|
|
1495
|
-
patch?: never;
|
|
1496
|
-
trace?: never;
|
|
1497
|
-
};
|
|
1498
|
-
"/resources/{resourceId}/annotations/{annotationId}/llm-context": {
|
|
1499
|
-
parameters: {
|
|
1500
|
-
query?: never;
|
|
1501
|
-
header?: never;
|
|
1502
|
-
path?: never;
|
|
1503
|
-
cookie?: never;
|
|
1504
|
-
};
|
|
1505
|
-
/**
|
|
1506
|
-
* Get Annotation LLM Context
|
|
1507
|
-
* @description Get annotation with full context for LLM processing
|
|
1508
|
-
*/
|
|
1509
|
-
get: {
|
|
1510
|
-
parameters: {
|
|
1511
|
-
query?: {
|
|
1512
|
-
includeSourceContext?: "true" | "false" | boolean;
|
|
1513
|
-
includeTargetContext?: "true" | "false" | boolean;
|
|
1514
|
-
contextWindow?: number;
|
|
1515
|
-
};
|
|
1516
|
-
header?: never;
|
|
1517
|
-
path: {
|
|
1518
|
-
resourceId: string;
|
|
1519
|
-
annotationId: string;
|
|
1520
|
-
};
|
|
1521
|
-
cookie?: never;
|
|
1522
|
-
};
|
|
1523
|
-
requestBody?: never;
|
|
1524
|
-
responses: {
|
|
1525
|
-
/** @description Annotation LLM context */
|
|
1526
|
-
200: {
|
|
1527
|
-
headers: {
|
|
1528
|
-
[name: string]: unknown;
|
|
1529
|
-
};
|
|
1530
|
-
content: {
|
|
1531
|
-
"application/json": components["schemas"]["AnnotationLLMContextResponse"];
|
|
1532
|
-
};
|
|
1533
|
-
};
|
|
1534
|
-
};
|
|
1535
|
-
};
|
|
1536
|
-
put?: never;
|
|
1537
|
-
post?: never;
|
|
1538
|
-
delete?: never;
|
|
1539
|
-
options?: never;
|
|
1540
|
-
head?: never;
|
|
1541
|
-
patch?: never;
|
|
1542
|
-
trace?: never;
|
|
1543
|
-
};
|
|
1544
|
-
"/resources/{id}/referenced-by": {
|
|
1545
|
-
parameters: {
|
|
1546
|
-
query?: never;
|
|
1547
|
-
header?: never;
|
|
1548
|
-
path?: never;
|
|
1549
|
-
cookie?: never;
|
|
1550
|
-
};
|
|
1551
|
-
/**
|
|
1552
|
-
* Get Referenced By
|
|
1553
|
-
* @description Get resources that reference this resource
|
|
1554
|
-
*/
|
|
1555
|
-
get: {
|
|
1556
|
-
parameters: {
|
|
1557
|
-
query?: {
|
|
1558
|
-
/** @description Filter incoming references by W3C motivation type (e.g., 'linking', 'commenting', 'highlighting') */
|
|
1559
|
-
motivation?: components["schemas"]["Motivation"];
|
|
1560
|
-
};
|
|
1561
|
-
header?: never;
|
|
1562
|
-
path: {
|
|
1563
|
-
id: string;
|
|
1564
|
-
};
|
|
1565
|
-
cookie?: never;
|
|
1566
|
-
};
|
|
1567
|
-
requestBody?: never;
|
|
1568
|
-
responses: {
|
|
1569
|
-
/** @description Resources that reference this resource */
|
|
1570
|
-
200: {
|
|
1571
|
-
headers: {
|
|
1572
|
-
[name: string]: unknown;
|
|
1573
|
-
};
|
|
1574
|
-
content: {
|
|
1575
|
-
"application/json": components["schemas"]["GetReferencedByResponse"];
|
|
1576
|
-
};
|
|
1577
|
-
};
|
|
1578
|
-
};
|
|
1579
|
-
};
|
|
1580
|
-
put?: never;
|
|
1581
|
-
post?: never;
|
|
1582
|
-
delete?: never;
|
|
1583
|
-
options?: never;
|
|
1584
|
-
head?: never;
|
|
1585
|
-
patch?: never;
|
|
1586
|
-
trace?: never;
|
|
1587
|
-
};
|
|
1588
|
-
"/api/clone-tokens/{token}": {
|
|
1589
|
-
parameters: {
|
|
1590
|
-
query?: never;
|
|
1591
|
-
header?: never;
|
|
1592
|
-
path?: never;
|
|
1593
|
-
cookie?: never;
|
|
1594
|
-
};
|
|
1595
|
-
/**
|
|
1596
|
-
* Get Resource by Clone Token
|
|
1597
|
-
* @description Retrieve a resource using a clone token
|
|
1598
|
-
*/
|
|
1599
|
-
get: {
|
|
1600
|
-
parameters: {
|
|
1601
|
-
query?: never;
|
|
1602
|
-
header?: never;
|
|
1603
|
-
path: {
|
|
1604
|
-
token: string;
|
|
1605
|
-
};
|
|
1606
|
-
cookie?: never;
|
|
1607
|
-
};
|
|
1608
|
-
requestBody?: never;
|
|
1609
|
-
responses: {
|
|
1610
|
-
/** @description Resource retrieved successfully */
|
|
1611
|
-
200: {
|
|
1612
|
-
headers: {
|
|
1613
|
-
[name: string]: unknown;
|
|
1614
|
-
};
|
|
1615
|
-
content: {
|
|
1616
|
-
"application/json": components["schemas"]["GetResourceByTokenResponse"];
|
|
1617
|
-
};
|
|
1618
|
-
};
|
|
1619
|
-
};
|
|
1620
|
-
};
|
|
1621
|
-
put?: never;
|
|
1622
|
-
post?: never;
|
|
1623
|
-
delete?: never;
|
|
1624
|
-
options?: never;
|
|
1625
|
-
head?: never;
|
|
1626
|
-
patch?: never;
|
|
1627
|
-
trace?: never;
|
|
1628
|
-
};
|
|
1629
|
-
"/api/clone-tokens/create-resource": {
|
|
1630
|
-
parameters: {
|
|
1631
|
-
query?: never;
|
|
1632
|
-
header?: never;
|
|
1633
|
-
path?: never;
|
|
1634
|
-
cookie?: never;
|
|
1635
|
-
};
|
|
1636
|
-
get?: never;
|
|
1637
|
-
put?: never;
|
|
1638
|
-
/**
|
|
1639
|
-
* Create Resource from Clone Token
|
|
1640
|
-
* @description Create a new resource using a clone token
|
|
1641
|
-
*/
|
|
1642
|
-
post: {
|
|
1643
|
-
parameters: {
|
|
1644
|
-
query?: never;
|
|
1645
|
-
header?: never;
|
|
1646
|
-
path?: never;
|
|
1647
|
-
cookie?: never;
|
|
1648
|
-
};
|
|
1649
|
-
requestBody?: {
|
|
1650
|
-
content: {
|
|
1651
|
-
"application/json": components["schemas"]["CreateResourceFromTokenRequest"];
|
|
1652
|
-
};
|
|
1653
|
-
};
|
|
1654
|
-
responses: {
|
|
1655
|
-
/** @description Resource created successfully */
|
|
1656
|
-
201: {
|
|
1657
|
-
headers: {
|
|
1658
|
-
[name: string]: unknown;
|
|
1659
|
-
};
|
|
1660
|
-
content: {
|
|
1661
|
-
"application/json": components["schemas"]["CreateResourceResponse"];
|
|
1662
|
-
};
|
|
1663
|
-
};
|
|
1664
|
-
};
|
|
1665
|
-
};
|
|
1666
|
-
delete?: never;
|
|
1667
|
-
options?: never;
|
|
1668
|
-
head?: never;
|
|
1669
|
-
patch?: never;
|
|
1670
|
-
trace?: never;
|
|
1671
|
-
};
|
|
1672
|
-
"/resources/{id}/clone-with-token": {
|
|
1673
|
-
parameters: {
|
|
1674
|
-
query?: never;
|
|
1675
|
-
header?: never;
|
|
1676
|
-
path?: never;
|
|
1677
|
-
cookie?: never;
|
|
1678
|
-
};
|
|
1679
|
-
get?: never;
|
|
1680
|
-
put?: never;
|
|
1681
|
-
/**
|
|
1682
|
-
* Clone Resource with Token
|
|
1683
|
-
* @description Generate a temporary token for cloning a resource
|
|
1684
|
-
*/
|
|
1685
|
-
post: {
|
|
1686
|
-
parameters: {
|
|
1687
|
-
query?: never;
|
|
1688
|
-
header?: never;
|
|
1689
|
-
path: {
|
|
1690
|
-
id: string;
|
|
1691
|
-
};
|
|
1692
|
-
cookie?: never;
|
|
1693
|
-
};
|
|
1694
|
-
requestBody?: never;
|
|
1695
|
-
responses: {
|
|
1696
|
-
/** @description Clone token generated successfully */
|
|
1697
|
-
200: {
|
|
1698
|
-
headers: {
|
|
1699
|
-
[name: string]: unknown;
|
|
1700
|
-
};
|
|
1701
|
-
content: {
|
|
1702
|
-
"application/json": components["schemas"]["CloneResourceWithTokenResponse"];
|
|
1703
|
-
};
|
|
1704
|
-
};
|
|
1705
|
-
};
|
|
1706
|
-
};
|
|
1707
|
-
delete?: never;
|
|
1708
|
-
options?: never;
|
|
1709
|
-
head?: never;
|
|
1710
|
-
patch?: never;
|
|
1711
|
-
trace?: never;
|
|
1712
|
-
};
|
|
1713
|
-
"/resources/{id}/annotations": {
|
|
1714
|
-
parameters: {
|
|
1715
|
-
query?: never;
|
|
1716
|
-
header?: never;
|
|
1717
|
-
path?: never;
|
|
1718
|
-
cookie?: never;
|
|
1719
|
-
};
|
|
1720
|
-
/**
|
|
1721
|
-
* Get Resource Annotations
|
|
1722
|
-
* @description Get all annotations (both highlights and references) in a resource
|
|
1723
|
-
*/
|
|
1724
|
-
get: {
|
|
1725
|
-
parameters: {
|
|
1726
|
-
query?: never;
|
|
1727
|
-
header?: never;
|
|
1728
|
-
path: {
|
|
1729
|
-
id: string;
|
|
1730
|
-
};
|
|
1731
|
-
cookie?: never;
|
|
1732
|
-
};
|
|
1733
|
-
requestBody?: never;
|
|
1734
|
-
responses: {
|
|
1735
|
-
/** @description Resource annotations */
|
|
1736
|
-
200: {
|
|
1737
|
-
headers: {
|
|
1738
|
-
[name: string]: unknown;
|
|
1739
|
-
};
|
|
1740
|
-
content: {
|
|
1741
|
-
"application/json": components["schemas"]["CreateResourceResponse"];
|
|
1742
|
-
};
|
|
1743
|
-
};
|
|
1744
|
-
};
|
|
1745
|
-
};
|
|
1746
|
-
put?: never;
|
|
1747
|
-
/**
|
|
1748
|
-
* Create Annotation
|
|
1749
|
-
* @description Create a new annotation/reference in a resource
|
|
1750
|
-
*/
|
|
1751
|
-
post: {
|
|
1752
|
-
parameters: {
|
|
1753
|
-
query?: never;
|
|
1754
|
-
header?: never;
|
|
1755
|
-
path: {
|
|
1756
|
-
/** @description Resource ID */
|
|
1757
|
-
id: string;
|
|
1758
|
-
};
|
|
1759
|
-
cookie?: never;
|
|
1760
|
-
};
|
|
1761
|
-
requestBody?: {
|
|
1762
|
-
content: {
|
|
1763
|
-
"application/json": components["schemas"]["CreateAnnotationRequest"];
|
|
1764
|
-
};
|
|
1765
|
-
};
|
|
1766
|
-
responses: {
|
|
1767
|
-
/** @description Annotation created successfully */
|
|
1768
|
-
201: {
|
|
1769
|
-
headers: {
|
|
1770
|
-
[name: string]: unknown;
|
|
1771
|
-
};
|
|
1772
|
-
content: {
|
|
1773
|
-
"application/json": components["schemas"]["CreateAnnotationResponse"];
|
|
1774
|
-
};
|
|
1775
|
-
};
|
|
1776
|
-
};
|
|
1777
|
-
};
|
|
1778
|
-
delete?: never;
|
|
1779
|
-
options?: never;
|
|
1780
|
-
head?: never;
|
|
1781
|
-
patch?: never;
|
|
1782
|
-
trace?: never;
|
|
1783
|
-
};
|
|
1784
|
-
"/resources/{id}/events": {
|
|
1785
|
-
parameters: {
|
|
1786
|
-
query?: never;
|
|
1787
|
-
header?: never;
|
|
1788
|
-
path?: never;
|
|
1789
|
-
cookie?: never;
|
|
1790
|
-
};
|
|
1791
|
-
/**
|
|
1792
|
-
* Get Resource Event History
|
|
1793
|
-
* @description Get full event history for a resource with optional filtering
|
|
1794
|
-
*/
|
|
1795
|
-
get: {
|
|
1796
|
-
parameters: {
|
|
1797
|
-
query?: {
|
|
1798
|
-
type?: "resource.created" | "resource.cloned" | "resource.archived" | "resource.unarchived" | "annotation.added" | "annotation.removed" | "annotation.body.updated" | "entitytag.added" | "entitytag.removed" | "entitytype.added";
|
|
1799
|
-
userId?: string;
|
|
1800
|
-
limit?: number;
|
|
1801
|
-
};
|
|
1802
|
-
header?: never;
|
|
1803
|
-
path: {
|
|
1804
|
-
id: string;
|
|
1805
|
-
};
|
|
1806
|
-
cookie?: never;
|
|
1807
|
-
};
|
|
1808
|
-
requestBody?: never;
|
|
1809
|
-
responses: {
|
|
1810
|
-
/** @description Events retrieved successfully */
|
|
1811
|
-
200: {
|
|
1812
|
-
headers: {
|
|
1813
|
-
[name: string]: unknown;
|
|
1814
|
-
};
|
|
1815
|
-
content: {
|
|
1816
|
-
"application/json": components["schemas"]["GetEventsResponse"];
|
|
1817
|
-
};
|
|
1818
|
-
};
|
|
1819
|
-
};
|
|
1820
|
-
};
|
|
1821
|
-
put?: never;
|
|
1822
|
-
post?: never;
|
|
1823
|
-
delete?: never;
|
|
1824
|
-
options?: never;
|
|
1825
|
-
head?: never;
|
|
1826
|
-
patch?: never;
|
|
1827
|
-
trace?: never;
|
|
1828
|
-
};
|
|
1829
|
-
"/resources/{id}/events/stream": {
|
|
1830
|
-
parameters: {
|
|
1831
|
-
query?: never;
|
|
1832
|
-
header?: never;
|
|
1833
|
-
path?: never;
|
|
1834
|
-
cookie?: never;
|
|
1835
|
-
};
|
|
1836
|
-
/**
|
|
1837
|
-
* Subscribe to Resource Events (SSE)
|
|
1838
|
-
* @description Open a Server-Sent Events stream to receive real-time resource events
|
|
1839
|
-
*/
|
|
1840
|
-
get: {
|
|
1841
|
-
parameters: {
|
|
1842
|
-
query?: never;
|
|
1843
|
-
header?: never;
|
|
1844
|
-
path: {
|
|
1845
|
-
id: string;
|
|
1846
|
-
};
|
|
1847
|
-
cookie?: never;
|
|
1848
|
-
};
|
|
1849
|
-
requestBody?: never;
|
|
1850
|
-
responses: {
|
|
1851
|
-
/** @description SSE stream opened successfully */
|
|
1852
|
-
200: {
|
|
1853
|
-
headers: {
|
|
1854
|
-
[name: string]: unknown;
|
|
1855
|
-
};
|
|
1856
|
-
content: {
|
|
1857
|
-
"text/event-stream": components["schemas"]["EventStreamResponse"];
|
|
1858
|
-
};
|
|
1859
|
-
};
|
|
1860
|
-
};
|
|
1861
|
-
};
|
|
1862
|
-
put?: never;
|
|
1863
|
-
post?: never;
|
|
1864
|
-
delete?: never;
|
|
1865
|
-
options?: never;
|
|
1866
|
-
head?: never;
|
|
1867
|
-
patch?: never;
|
|
1868
|
-
trace?: never;
|
|
1869
|
-
};
|
|
1870
|
-
"/resources/{resourceId}/annotations/{annotationId}": {
|
|
1871
|
-
parameters: {
|
|
1872
|
-
query?: never;
|
|
1873
|
-
header?: never;
|
|
1874
|
-
path?: never;
|
|
1875
|
-
cookie?: never;
|
|
1876
|
-
};
|
|
1877
|
-
/**
|
|
1878
|
-
* Get Annotation
|
|
1879
|
-
* @description Get a specific annotation from a resource using nested path
|
|
1880
|
-
*/
|
|
1881
|
-
get: {
|
|
1882
|
-
parameters: {
|
|
1883
|
-
query?: never;
|
|
1884
|
-
header?: never;
|
|
1885
|
-
path: {
|
|
1886
|
-
/** @description Resource ID */
|
|
1887
|
-
resourceId: string;
|
|
1888
|
-
/** @description Annotation ID */
|
|
1889
|
-
annotationId: string;
|
|
1890
|
-
};
|
|
1891
|
-
cookie?: never;
|
|
1892
|
-
};
|
|
1893
|
-
requestBody?: never;
|
|
1894
|
-
responses: {
|
|
1895
|
-
/** @description Annotation retrieved successfully */
|
|
1896
|
-
200: {
|
|
1897
|
-
headers: {
|
|
1898
|
-
[name: string]: unknown;
|
|
1899
|
-
};
|
|
1900
|
-
content: {
|
|
1901
|
-
"application/json": components["schemas"]["GetAnnotationResponse"];
|
|
1902
|
-
};
|
|
1903
|
-
};
|
|
1904
|
-
/** @description Annotation not found */
|
|
1905
|
-
404: {
|
|
1906
|
-
headers: {
|
|
1907
|
-
[name: string]: unknown;
|
|
1908
|
-
};
|
|
1909
|
-
content?: never;
|
|
1910
|
-
};
|
|
1911
|
-
};
|
|
1912
|
-
};
|
|
1913
|
-
put?: never;
|
|
1914
|
-
post?: never;
|
|
1915
|
-
/**
|
|
1916
|
-
* Delete Annotation
|
|
1917
|
-
* @description Delete an annotation from a resource
|
|
1918
|
-
*/
|
|
1919
|
-
delete: {
|
|
1920
|
-
parameters: {
|
|
1921
|
-
query?: never;
|
|
1922
|
-
header?: never;
|
|
1923
|
-
path: {
|
|
1924
|
-
/** @description Resource ID */
|
|
1925
|
-
resourceId: string;
|
|
1926
|
-
/** @description Annotation ID */
|
|
1927
|
-
annotationId: string;
|
|
1928
|
-
};
|
|
1929
|
-
cookie?: never;
|
|
1930
|
-
};
|
|
1931
|
-
requestBody?: never;
|
|
1932
|
-
responses: {
|
|
1933
|
-
/** @description Annotation deleted successfully */
|
|
1934
|
-
204: {
|
|
1935
|
-
headers: {
|
|
1936
|
-
[name: string]: unknown;
|
|
1937
|
-
};
|
|
1938
|
-
content?: never;
|
|
1939
|
-
};
|
|
1940
|
-
/** @description Annotation not found */
|
|
1941
|
-
404: {
|
|
1942
|
-
headers: {
|
|
1943
|
-
[name: string]: unknown;
|
|
1944
|
-
};
|
|
1945
|
-
content?: never;
|
|
1946
|
-
};
|
|
1947
|
-
};
|
|
1948
|
-
};
|
|
1949
|
-
options?: never;
|
|
1950
|
-
head?: never;
|
|
1951
|
-
patch?: never;
|
|
1952
|
-
trace?: never;
|
|
1953
|
-
};
|
|
1954
|
-
"/resources/{resourceId}/annotations/{annotationId}/body": {
|
|
1955
|
-
parameters: {
|
|
1956
|
-
query?: never;
|
|
1957
|
-
header?: never;
|
|
1958
|
-
path?: never;
|
|
1959
|
-
cookie?: never;
|
|
1960
|
-
};
|
|
1961
|
-
get?: never;
|
|
1962
|
-
/**
|
|
1963
|
-
* Update Annotation Body
|
|
1964
|
-
* @description Apply fine-grained operations to modify annotation body items (add, remove, or replace TextualBody and SpecificResource items)
|
|
1965
|
-
*/
|
|
1966
|
-
put: {
|
|
1967
|
-
parameters: {
|
|
1968
|
-
query?: never;
|
|
1969
|
-
header?: never;
|
|
1970
|
-
path: {
|
|
1971
|
-
/** @description Resource ID */
|
|
1972
|
-
resourceId: string;
|
|
1973
|
-
/** @description Annotation ID */
|
|
1974
|
-
annotationId: string;
|
|
1975
|
-
};
|
|
1976
|
-
cookie?: never;
|
|
1977
|
-
};
|
|
1978
|
-
requestBody?: {
|
|
1979
|
-
content: {
|
|
1980
|
-
"application/json": components["schemas"]["UpdateAnnotationBodyRequest"];
|
|
1981
|
-
};
|
|
1982
|
-
};
|
|
1983
|
-
responses: {
|
|
1984
|
-
/** @description Annotation body updated successfully */
|
|
1985
|
-
200: {
|
|
1986
|
-
headers: {
|
|
1987
|
-
[name: string]: unknown;
|
|
1988
|
-
};
|
|
1989
|
-
content: {
|
|
1990
|
-
"application/json": components["schemas"]["UpdateAnnotationBodyResponse"];
|
|
1991
|
-
};
|
|
1992
|
-
};
|
|
1993
|
-
};
|
|
1994
|
-
};
|
|
1995
|
-
post?: never;
|
|
1996
|
-
delete?: never;
|
|
1997
|
-
options?: never;
|
|
1998
|
-
head?: never;
|
|
1999
|
-
patch?: never;
|
|
2000
|
-
trace?: never;
|
|
2001
|
-
};
|
|
2002
|
-
"/resources/{resourceId}/annotations/{annotationId}/generate-resource-stream": {
|
|
2003
|
-
parameters: {
|
|
2004
|
-
query?: never;
|
|
2005
|
-
header?: never;
|
|
2006
|
-
path?: never;
|
|
2007
|
-
cookie?: never;
|
|
2008
|
-
};
|
|
2009
|
-
get?: never;
|
|
2010
|
-
put?: never;
|
|
2011
|
-
/**
|
|
2012
|
-
* Generate Resource (SSE Stream)
|
|
2013
|
-
* @description Stream real-time resource generation progress via Server-Sent Events
|
|
2014
|
-
*/
|
|
2015
|
-
post: {
|
|
2016
|
-
parameters: {
|
|
2017
|
-
query?: never;
|
|
2018
|
-
header?: never;
|
|
2019
|
-
path: {
|
|
2020
|
-
/** @description Resource ID */
|
|
2021
|
-
resourceId: string;
|
|
2022
|
-
/** @description Annotation ID */
|
|
2023
|
-
annotationId: string;
|
|
2024
|
-
};
|
|
2025
|
-
cookie?: never;
|
|
2026
|
-
};
|
|
2027
|
-
requestBody?: {
|
|
2028
|
-
content: {
|
|
2029
|
-
"application/json": components["schemas"]["GenerateResourceStreamRequest"];
|
|
2030
|
-
};
|
|
2031
|
-
};
|
|
2032
|
-
responses: {
|
|
2033
|
-
/** @description SSE stream opened successfully */
|
|
2034
|
-
200: {
|
|
2035
|
-
headers: {
|
|
2036
|
-
[name: string]: unknown;
|
|
2037
|
-
};
|
|
2038
|
-
content: {
|
|
2039
|
-
"text/event-stream": components["schemas"]["EventStreamResponse"];
|
|
2040
|
-
};
|
|
2041
|
-
};
|
|
2042
|
-
/** @description Authentication required */
|
|
2043
|
-
401: {
|
|
2044
|
-
headers: {
|
|
2045
|
-
[name: string]: unknown;
|
|
2046
|
-
};
|
|
2047
|
-
content?: never;
|
|
2048
|
-
};
|
|
2049
|
-
/** @description Annotation not found */
|
|
2050
|
-
404: {
|
|
2051
|
-
headers: {
|
|
2052
|
-
[name: string]: unknown;
|
|
2053
|
-
};
|
|
2054
|
-
content?: never;
|
|
2055
|
-
};
|
|
2056
|
-
};
|
|
2057
|
-
};
|
|
2058
|
-
delete?: never;
|
|
2059
|
-
options?: never;
|
|
2060
|
-
head?: never;
|
|
2061
|
-
patch?: never;
|
|
2062
|
-
trace?: never;
|
|
2063
|
-
};
|
|
2064
|
-
"/resources/{resourceId}/annotations/{annotationId}/history": {
|
|
2065
|
-
parameters: {
|
|
2066
|
-
query?: never;
|
|
2067
|
-
header?: never;
|
|
2068
|
-
path?: never;
|
|
2069
|
-
cookie?: never;
|
|
2070
|
-
};
|
|
2071
|
-
/**
|
|
2072
|
-
* Get Annotation History
|
|
2073
|
-
* @description Get full event history for a specific annotation (highlight or reference)
|
|
2074
|
-
*/
|
|
2075
|
-
get: {
|
|
2076
|
-
parameters: {
|
|
2077
|
-
query?: never;
|
|
2078
|
-
header?: never;
|
|
2079
|
-
path: {
|
|
2080
|
-
resourceId: string;
|
|
2081
|
-
annotationId: string;
|
|
2082
|
-
};
|
|
2083
|
-
cookie?: never;
|
|
2084
|
-
};
|
|
2085
|
-
requestBody?: never;
|
|
2086
|
-
responses: {
|
|
2087
|
-
/** @description Annotation history retrieved successfully */
|
|
2088
|
-
200: {
|
|
2089
|
-
headers: {
|
|
2090
|
-
[name: string]: unknown;
|
|
2091
|
-
};
|
|
2092
|
-
content: {
|
|
2093
|
-
"application/json": components["schemas"]["GetAnnotationHistoryResponse"];
|
|
2094
|
-
};
|
|
2095
|
-
};
|
|
2096
|
-
/** @description Annotation not found */
|
|
2097
|
-
404: {
|
|
2098
|
-
headers: {
|
|
2099
|
-
[name: string]: unknown;
|
|
2100
|
-
};
|
|
2101
|
-
content?: never;
|
|
2102
|
-
};
|
|
2103
|
-
};
|
|
2104
|
-
};
|
|
2105
|
-
put?: never;
|
|
2106
|
-
post?: never;
|
|
2107
|
-
delete?: never;
|
|
2108
|
-
options?: never;
|
|
2109
|
-
head?: never;
|
|
2110
|
-
patch?: never;
|
|
2111
|
-
trace?: never;
|
|
2112
|
-
};
|
|
2113
|
-
"/api/entity-types": {
|
|
2114
|
-
parameters: {
|
|
2115
|
-
query?: never;
|
|
2116
|
-
header?: never;
|
|
2117
|
-
path?: never;
|
|
2118
|
-
cookie?: never;
|
|
2119
|
-
};
|
|
2120
|
-
/**
|
|
2121
|
-
* Get Entity Types
|
|
2122
|
-
* @description Get list of available entity types for references
|
|
2123
|
-
*/
|
|
2124
|
-
get: {
|
|
2125
|
-
parameters: {
|
|
2126
|
-
query?: never;
|
|
2127
|
-
header?: never;
|
|
2128
|
-
path?: never;
|
|
2129
|
-
cookie?: never;
|
|
2130
|
-
};
|
|
2131
|
-
requestBody?: never;
|
|
2132
|
-
responses: {
|
|
2133
|
-
/** @description Entity types retrieved successfully */
|
|
2134
|
-
200: {
|
|
2135
|
-
headers: {
|
|
2136
|
-
[name: string]: unknown;
|
|
2137
|
-
};
|
|
2138
|
-
content: {
|
|
2139
|
-
"application/json": components["schemas"]["GetEntityTypesResponse"];
|
|
2140
|
-
};
|
|
2141
|
-
};
|
|
2142
|
-
};
|
|
2143
|
-
};
|
|
2144
|
-
put?: never;
|
|
2145
|
-
/**
|
|
2146
|
-
* Add Entity Type
|
|
2147
|
-
* @description Add a new entity type to the collection (append-only, requires moderator/admin)
|
|
2148
|
-
*/
|
|
2149
|
-
post: {
|
|
2150
|
-
parameters: {
|
|
2151
|
-
query?: never;
|
|
2152
|
-
header?: never;
|
|
2153
|
-
path?: never;
|
|
2154
|
-
cookie?: never;
|
|
2155
|
-
};
|
|
2156
|
-
requestBody?: {
|
|
2157
|
-
content: {
|
|
2158
|
-
"application/json": components["schemas"]["AddEntityTypeRequest"];
|
|
2159
|
-
};
|
|
2160
|
-
};
|
|
2161
|
-
responses: {
|
|
2162
|
-
/** @description Entity type added successfully */
|
|
2163
|
-
200: {
|
|
2164
|
-
headers: {
|
|
2165
|
-
[name: string]: unknown;
|
|
2166
|
-
};
|
|
2167
|
-
content: {
|
|
2168
|
-
"application/json": components["schemas"]["AddEntityTypeResponse"];
|
|
2169
|
-
};
|
|
2170
|
-
};
|
|
2171
|
-
/** @description Forbidden - Moderator or Admin access required */
|
|
2172
|
-
403: {
|
|
2173
|
-
headers: {
|
|
2174
|
-
[name: string]: unknown;
|
|
2175
|
-
};
|
|
2176
|
-
content: {
|
|
2177
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
2178
|
-
};
|
|
2179
|
-
};
|
|
2180
|
-
};
|
|
2181
|
-
};
|
|
2182
|
-
delete?: never;
|
|
2183
|
-
options?: never;
|
|
2184
|
-
head?: never;
|
|
2185
|
-
patch?: never;
|
|
2186
|
-
trace?: never;
|
|
2187
|
-
};
|
|
2188
|
-
"/api/entity-types/bulk": {
|
|
2189
|
-
parameters: {
|
|
2190
|
-
query?: never;
|
|
2191
|
-
header?: never;
|
|
2192
|
-
path?: never;
|
|
2193
|
-
cookie?: never;
|
|
2194
|
-
};
|
|
2195
|
-
get?: never;
|
|
2196
|
-
put?: never;
|
|
2197
|
-
/**
|
|
2198
|
-
* Bulk Add Entity Types
|
|
2199
|
-
* @description Add multiple entity types to the collection (append-only, requires moderator/admin)
|
|
2200
|
-
*/
|
|
2201
|
-
post: {
|
|
2202
|
-
parameters: {
|
|
2203
|
-
query?: never;
|
|
2204
|
-
header?: never;
|
|
2205
|
-
path?: never;
|
|
2206
|
-
cookie?: never;
|
|
2207
|
-
};
|
|
2208
|
-
requestBody?: {
|
|
2209
|
-
content: {
|
|
2210
|
-
"application/json": components["schemas"]["BulkAddEntityTypesRequest"];
|
|
2211
|
-
};
|
|
2212
|
-
};
|
|
2213
|
-
responses: {
|
|
2214
|
-
/** @description Entity types added successfully */
|
|
2215
|
-
200: {
|
|
2216
|
-
headers: {
|
|
2217
|
-
[name: string]: unknown;
|
|
2218
|
-
};
|
|
2219
|
-
content: {
|
|
2220
|
-
"application/json": components["schemas"]["AddEntityTypeResponse"];
|
|
2221
|
-
};
|
|
2222
|
-
};
|
|
2223
|
-
/** @description Forbidden - Moderator or Admin access required */
|
|
2224
|
-
403: {
|
|
2225
|
-
headers: {
|
|
2226
|
-
[name: string]: unknown;
|
|
2227
|
-
};
|
|
2228
|
-
content: {
|
|
2229
|
-
"application/json": components["schemas"]["ErrorResponse"];
|
|
2230
|
-
};
|
|
2231
|
-
};
|
|
2232
|
-
};
|
|
2233
|
-
};
|
|
2234
|
-
delete?: never;
|
|
2235
|
-
options?: never;
|
|
2236
|
-
head?: never;
|
|
2237
|
-
patch?: never;
|
|
2238
|
-
trace?: never;
|
|
2239
|
-
};
|
|
2240
|
-
"/api/jobs/{id}": {
|
|
2241
|
-
parameters: {
|
|
2242
|
-
query?: never;
|
|
2243
|
-
header?: never;
|
|
2244
|
-
path?: never;
|
|
2245
|
-
cookie?: never;
|
|
2246
|
-
};
|
|
2247
|
-
/**
|
|
2248
|
-
* Get Job Status
|
|
2249
|
-
* @description Get the current status and progress of an async job
|
|
2250
|
-
*/
|
|
2251
|
-
get: {
|
|
2252
|
-
parameters: {
|
|
2253
|
-
query?: never;
|
|
2254
|
-
header?: never;
|
|
2255
|
-
path: {
|
|
2256
|
-
id: string;
|
|
2257
|
-
};
|
|
2258
|
-
cookie?: never;
|
|
2259
|
-
};
|
|
2260
|
-
requestBody?: never;
|
|
2261
|
-
responses: {
|
|
2262
|
-
/** @description Job status retrieved successfully */
|
|
2263
|
-
200: {
|
|
2264
|
-
headers: {
|
|
2265
|
-
[name: string]: unknown;
|
|
2266
|
-
};
|
|
2267
|
-
content: {
|
|
2268
|
-
"application/json": components["schemas"]["JobStatusResponse"];
|
|
2269
|
-
};
|
|
2270
|
-
};
|
|
2271
|
-
/** @description Job not found */
|
|
2272
|
-
404: {
|
|
2273
|
-
headers: {
|
|
2274
|
-
[name: string]: unknown;
|
|
2275
|
-
};
|
|
2276
|
-
content?: never;
|
|
2277
|
-
};
|
|
2278
|
-
};
|
|
2279
|
-
};
|
|
2280
|
-
put?: never;
|
|
2281
|
-
post?: never;
|
|
2282
|
-
delete?: never;
|
|
2283
|
-
options?: never;
|
|
2284
|
-
head?: never;
|
|
2285
|
-
patch?: never;
|
|
2286
|
-
trace?: never;
|
|
2287
|
-
};
|
|
2288
|
-
}
|
|
2289
|
-
type webhooks = Record<string, never>;
|
|
2290
|
-
interface components {
|
|
2291
|
-
schemas: {
|
|
2292
|
-
AcceptTermsResponse: {
|
|
2293
|
-
success: boolean;
|
|
2294
|
-
message: string;
|
|
2295
|
-
};
|
|
2296
|
-
AddEntityTypeRequest: {
|
|
2297
|
-
tag: string;
|
|
2298
|
-
};
|
|
2299
|
-
AddEntityTypeResponse: {
|
|
2300
|
-
success: boolean;
|
|
2301
|
-
entityTypes: string[];
|
|
2302
|
-
};
|
|
2303
|
-
AdminUpdateUserResponse: {
|
|
2304
|
-
success: boolean;
|
|
2305
|
-
user: {
|
|
2306
|
-
id: string;
|
|
2307
|
-
email: string;
|
|
2308
|
-
name: string | null;
|
|
2309
|
-
image: string | null;
|
|
2310
|
-
domain: string;
|
|
2311
|
-
provider: string;
|
|
2312
|
-
isAdmin: boolean;
|
|
2313
|
-
isActive: boolean;
|
|
2314
|
-
lastLogin: string | null;
|
|
2315
|
-
created: string;
|
|
2316
|
-
updatedAt: string;
|
|
2317
|
-
};
|
|
2318
|
-
};
|
|
2319
|
-
AdminUsersListResponse: {
|
|
2320
|
-
success: boolean;
|
|
2321
|
-
users: {
|
|
2322
|
-
id: string;
|
|
2323
|
-
email: string;
|
|
2324
|
-
name: string | null;
|
|
2325
|
-
image: string | null;
|
|
2326
|
-
domain: string;
|
|
2327
|
-
provider: string;
|
|
2328
|
-
isAdmin: boolean;
|
|
2329
|
-
isActive: boolean;
|
|
2330
|
-
lastLogin: string | null;
|
|
2331
|
-
created: string;
|
|
2332
|
-
updatedAt: string;
|
|
2333
|
-
}[];
|
|
2334
|
-
};
|
|
2335
|
-
AdminUserStatsResponse: {
|
|
2336
|
-
success: boolean;
|
|
2337
|
-
stats: {
|
|
2338
|
-
totalUsers: number;
|
|
2339
|
-
activeUsers: number;
|
|
2340
|
-
adminUsers: number;
|
|
2341
|
-
regularUsers: number;
|
|
2342
|
-
domainBreakdown: {
|
|
2343
|
-
domain: string;
|
|
2344
|
-
count: number;
|
|
2345
|
-
}[];
|
|
2346
|
-
recentSignups: {
|
|
2347
|
-
id: string;
|
|
2348
|
-
email: string;
|
|
2349
|
-
name: string | null;
|
|
2350
|
-
created: string;
|
|
2351
|
-
}[];
|
|
2352
|
-
};
|
|
2353
|
-
};
|
|
2354
|
-
/** @description Minimal Person/Organization for attribution (W3C PROV compatible) */
|
|
2355
|
-
Agent: {
|
|
2356
|
-
/**
|
|
2357
|
-
* Format: uri
|
|
2358
|
-
* @description Unique identifier for the agent
|
|
2359
|
-
*/
|
|
2360
|
-
"@id"?: string;
|
|
2361
|
-
/** @description Type(s) of agent (Person, Organization, Software) */
|
|
2362
|
-
"@type"?: string | string[];
|
|
2363
|
-
name: string;
|
|
2364
|
-
nickname?: string;
|
|
2365
|
-
email?: string;
|
|
2366
|
-
email_sha1?: string;
|
|
2367
|
-
homepage?: string;
|
|
2368
|
-
} & {
|
|
2369
|
-
[key: string]: unknown;
|
|
2370
|
-
};
|
|
2371
|
-
Annotation: {
|
|
2372
|
-
/**
|
|
2373
|
-
* @description W3C Web Annotation JSON-LD context
|
|
2374
|
-
* @default http://www.w3.org/ns/anno.jsonld
|
|
2375
|
-
* @constant
|
|
2376
|
-
*/
|
|
2377
|
-
"@context": "http://www.w3.org/ns/anno.jsonld";
|
|
2378
|
-
/**
|
|
2379
|
-
* @description W3C Annotation type
|
|
2380
|
-
* @default Annotation
|
|
2381
|
-
* @constant
|
|
2382
|
-
*/
|
|
2383
|
-
type: "Annotation";
|
|
2384
|
-
id: string;
|
|
2385
|
-
motivation: components["schemas"]["Motivation"];
|
|
2386
|
-
/** @description W3C Web Annotation target - can be a simple IRI string (entire resource) or an object with source and optional selector (fragment) */
|
|
2387
|
-
target: string | components["schemas"]["AnnotationTarget"];
|
|
2388
|
-
/** @description W3C Web Annotation body - can be empty array, single body, or array of bodies */
|
|
2389
|
-
body: components["schemas"]["AnnotationBody"][] | components["schemas"]["AnnotationBody"] | components["schemas"]["AnnotationBody"][];
|
|
2390
|
-
creator?: components["schemas"]["Agent"];
|
|
2391
|
-
created?: string;
|
|
2392
|
-
modified?: string;
|
|
2393
|
-
generator?: components["schemas"]["Agent"];
|
|
2394
|
-
};
|
|
2395
|
-
/** @description Phase 2: Body can be TextualBody (for entity tags, descriptions) or SpecificResource (for links) */
|
|
2396
|
-
AnnotationBody: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2397
|
-
AnnotationContextResponse: {
|
|
2398
|
-
annotation: components["schemas"]["Annotation"];
|
|
2399
|
-
context: {
|
|
2400
|
-
before?: string;
|
|
2401
|
-
selected: string;
|
|
2402
|
-
after?: string;
|
|
2403
|
-
};
|
|
2404
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2405
|
-
};
|
|
2406
|
-
AnnotationLLMContextResponse: {
|
|
2407
|
-
annotation: components["schemas"]["Annotation"];
|
|
2408
|
-
sourceResource: components["schemas"]["ResourceDescriptor"];
|
|
2409
|
-
targetResource?: components["schemas"]["ResourceDescriptor"] | null;
|
|
2410
|
-
/** @description Generation context for this annotation */
|
|
2411
|
-
context?: components["schemas"]["GenerationContext"];
|
|
2412
|
-
/** @description DEPRECATED: Use 'context' instead. Legacy source context format. */
|
|
2413
|
-
sourceContext?: {
|
|
2414
|
-
before: string;
|
|
2415
|
-
selected: string;
|
|
2416
|
-
after: string;
|
|
2417
|
-
};
|
|
2418
|
-
targetContext?: {
|
|
2419
|
-
content: string;
|
|
2420
|
-
summary?: string;
|
|
2421
|
-
};
|
|
2422
|
-
suggestedResolution?: {
|
|
2423
|
-
resourceId: string;
|
|
2424
|
-
resourceName: string;
|
|
2425
|
-
confidence: number;
|
|
2426
|
-
reasoning: string;
|
|
2427
|
-
};
|
|
2428
|
-
};
|
|
2429
|
-
/** @description W3C Web Annotation target object - source is required, selector is optional */
|
|
2430
|
-
AnnotationTarget: {
|
|
2431
|
-
/** @description IRI of the resource being annotated */
|
|
2432
|
-
source: string;
|
|
2433
|
-
/** @description Optional selector to identify a specific segment of the source resource */
|
|
2434
|
-
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"])[];
|
|
2435
|
-
};
|
|
2436
|
-
AsyncJobResponse: {
|
|
2437
|
-
jobId: string;
|
|
2438
|
-
/** @enum {string} */
|
|
2439
|
-
status: "pending" | "running" | "complete" | "failed" | "cancelled";
|
|
2440
|
-
/** @enum {string} */
|
|
2441
|
-
type: "detection" | "generation";
|
|
2442
|
-
created: string;
|
|
2443
|
-
};
|
|
2444
|
-
AuthResponse: {
|
|
2445
|
-
success: boolean;
|
|
2446
|
-
user: {
|
|
2447
|
-
id: string;
|
|
2448
|
-
email: string;
|
|
2449
|
-
name: string | null;
|
|
2450
|
-
image: string | null;
|
|
2451
|
-
domain: string;
|
|
2452
|
-
isAdmin: boolean;
|
|
2453
|
-
};
|
|
2454
|
-
token: string;
|
|
2455
|
-
isNewUser: boolean;
|
|
2456
|
-
};
|
|
2457
|
-
BodyOperationAdd: {
|
|
2458
|
-
/** @constant */
|
|
2459
|
-
op: "add";
|
|
2460
|
-
item: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2461
|
-
};
|
|
2462
|
-
BodyOperationRemove: {
|
|
2463
|
-
/** @constant */
|
|
2464
|
-
op: "remove";
|
|
2465
|
-
item: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2466
|
-
};
|
|
2467
|
-
BodyOperationReplace: {
|
|
2468
|
-
/** @constant */
|
|
2469
|
-
op: "replace";
|
|
2470
|
-
oldItem: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2471
|
-
newItem: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
|
|
2472
|
-
};
|
|
2473
|
-
/**
|
|
2474
|
-
* @description Annotation body type - TextualBody for textual content, SpecificResource for resource links
|
|
2475
|
-
* @enum {string}
|
|
2476
|
-
*/
|
|
2477
|
-
BodyType: "TextualBody" | "SpecificResource";
|
|
2478
|
-
BulkAddEntityTypesRequest: {
|
|
2479
|
-
tags: string[];
|
|
2480
|
-
};
|
|
2481
|
-
CloneResourceWithTokenResponse: {
|
|
2482
|
-
/** @description Generated clone token */
|
|
2483
|
-
token: string;
|
|
2484
|
-
/** @description ISO 8601 timestamp when token expires */
|
|
2485
|
-
expiresAt: string;
|
|
2486
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2487
|
-
};
|
|
2488
|
-
/**
|
|
2489
|
-
* @description Content format as MIME type, optionally with charset parameter (e.g., 'text/plain', 'text/plain; charset=iso-8859-1')
|
|
2490
|
-
* @example text/plain
|
|
2491
|
-
* @example text/plain; charset=utf-8
|
|
2492
|
-
* @example text/plain; charset=iso-8859-1
|
|
2493
|
-
* @example text/markdown
|
|
2494
|
-
* @example text/markdown; charset=windows-1252
|
|
2495
|
-
* @example image/png
|
|
2496
|
-
* @example image/jpeg
|
|
2497
|
-
* @example application/pdf
|
|
2498
|
-
*/
|
|
2499
|
-
ContentFormat: string;
|
|
2500
|
-
ContextualSummaryResponse: {
|
|
2501
|
-
summary: string;
|
|
2502
|
-
relevantFields: {
|
|
2503
|
-
[key: string]: unknown;
|
|
2504
|
-
};
|
|
2505
|
-
context: {
|
|
2506
|
-
before?: string;
|
|
2507
|
-
selected: string;
|
|
2508
|
-
after?: string;
|
|
2509
|
-
};
|
|
2510
|
-
};
|
|
2511
|
-
CreateAnnotationRequest: {
|
|
2512
|
-
motivation: components["schemas"]["Motivation"];
|
|
2513
|
-
target: {
|
|
2514
|
-
source: string;
|
|
2515
|
-
selector: components["schemas"]["TextPositionSelector"] | {
|
|
2516
|
-
/** @enum {string} */
|
|
2517
|
-
type: "TextQuoteSelector";
|
|
2518
|
-
exact: string;
|
|
2519
|
-
prefix?: string;
|
|
2520
|
-
suffix?: string;
|
|
2521
|
-
} | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"] | (components["schemas"]["TextPositionSelector"] | {
|
|
2522
|
-
/** @enum {string} */
|
|
2523
|
-
type: "TextQuoteSelector";
|
|
2524
|
-
exact: string;
|
|
2525
|
-
prefix?: string;
|
|
2526
|
-
suffix?: string;
|
|
2527
|
-
} | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"])[];
|
|
2528
|
-
};
|
|
2529
|
-
body: unknown[] | components["schemas"]["AnnotationBody"] | components["schemas"]["AnnotationBody"][];
|
|
2530
|
-
};
|
|
2531
|
-
CreateAnnotationResponse: {
|
|
2532
|
-
annotation: components["schemas"]["Annotation"];
|
|
2533
|
-
};
|
|
2534
|
-
CreateFromAnnotationRequest: {
|
|
2535
|
-
/** @description ID of the resource containing the annotation */
|
|
2536
|
-
resourceId: string;
|
|
2537
|
-
name: string;
|
|
2538
|
-
content: string;
|
|
2539
|
-
format: components["schemas"]["ContentFormat"];
|
|
2540
|
-
};
|
|
2541
|
-
CreateFromAnnotationResponse: {
|
|
2542
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2543
|
-
annotations: components["schemas"]["Annotation"][];
|
|
2544
|
-
};
|
|
2545
|
-
CreateJobResponse: {
|
|
2546
|
-
jobId: string;
|
|
2547
|
-
/** @enum {string} */
|
|
2548
|
-
type: "detection" | "generation";
|
|
2549
|
-
/** @enum {string} */
|
|
2550
|
-
status: "pending" | "running" | "complete" | "failed" | "cancelled";
|
|
2551
|
-
created: string;
|
|
2552
|
-
resourceId?: string;
|
|
2553
|
-
};
|
|
2554
|
-
CreateResourceFromAnnotationResponse: {
|
|
2555
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2556
|
-
annotation: components["schemas"]["Annotation"];
|
|
2557
|
-
};
|
|
2558
|
-
CreateResourceFromSelectionRequest: {
|
|
2559
|
-
/** @description ID of the resource containing the annotation */
|
|
2560
|
-
resourceId: string;
|
|
2561
|
-
content: string;
|
|
2562
|
-
name: string;
|
|
2563
|
-
format: components["schemas"]["ContentFormat"];
|
|
2564
|
-
entityTypes?: string[];
|
|
2565
|
-
metadata?: {
|
|
2566
|
-
[key: string]: unknown;
|
|
2567
|
-
};
|
|
2568
|
-
prompt?: string;
|
|
2569
|
-
language?: string;
|
|
2570
|
-
};
|
|
2571
|
-
CreateResourceFromSelectionResponse: {
|
|
2572
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2573
|
-
annotation: components["schemas"]["Annotation"];
|
|
2574
|
-
};
|
|
2575
|
-
CreateResourceFromTokenRequest: {
|
|
2576
|
-
/** @description Clone token */
|
|
2577
|
-
token: string;
|
|
2578
|
-
/** @description Name for the new resource */
|
|
2579
|
-
name: string;
|
|
2580
|
-
/** @description Content for the new resource */
|
|
2581
|
-
content: string;
|
|
2582
|
-
/** @description Whether to archive the original resource */
|
|
2583
|
-
archiveOriginal?: boolean;
|
|
2584
|
-
};
|
|
2585
|
-
CreateResourceFromTokenResponse: {
|
|
2586
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2587
|
-
annotations: components["schemas"]["Annotation"][];
|
|
2588
|
-
};
|
|
2589
|
-
CreateResourceRequest: {
|
|
2590
|
-
name: string;
|
|
2591
|
-
content: string;
|
|
2592
|
-
format: components["schemas"]["ContentFormat"];
|
|
2593
|
-
entityTypes: string[];
|
|
2594
|
-
language?: string;
|
|
2595
|
-
creationMethod?: string;
|
|
2596
|
-
sourceAnnotationId?: string;
|
|
2597
|
-
sourceResourceId?: string;
|
|
2598
|
-
};
|
|
2599
|
-
CreateResourceResponse: {
|
|
2600
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2601
|
-
annotations: components["schemas"]["Annotation"][];
|
|
2602
|
-
};
|
|
2603
|
-
DeleteAnnotationRequest: {
|
|
2604
|
-
/**
|
|
2605
|
-
* Format: uri
|
|
2606
|
-
* @description Resource URI containing the annotation (required for O(1) Layer 3 lookup)
|
|
2607
|
-
*/
|
|
2608
|
-
resourceId: string;
|
|
2609
|
-
};
|
|
2610
|
-
DeleteUserResponse: {
|
|
2611
|
-
success: boolean;
|
|
2612
|
-
message: string;
|
|
2613
|
-
};
|
|
2614
|
-
DetectReferencesStreamRequest: {
|
|
2615
|
-
/** @description Entity types to detect (e.g., 'Person', 'Organization', 'Location') */
|
|
2616
|
-
entityTypes: string[];
|
|
2617
|
-
/** @description Include anaphoric/cataphoric references (e.g., 'the CEO', 'the tech giant') in addition to direct mentions */
|
|
2618
|
-
includeDescriptiveReferences?: boolean;
|
|
2619
|
-
};
|
|
2620
|
-
DetectHighlightsStreamRequest: {
|
|
2621
|
-
/** @description Optional instructions to guide AI highlight detection */
|
|
2622
|
-
instructions?: string;
|
|
2623
|
-
/** @description Optional density: desired number of highlights per 2000 words of text (1-15) */
|
|
2624
|
-
density?: number;
|
|
2625
|
-
};
|
|
2626
|
-
DetectAssessmentsStreamRequest: {
|
|
2627
|
-
/** @description Optional instructions to guide AI assessment detection */
|
|
2628
|
-
instructions?: string;
|
|
2629
|
-
/**
|
|
2630
|
-
* @description Optional tone/style for generated assessments
|
|
2631
|
-
* @enum {string}
|
|
2632
|
-
*/
|
|
2633
|
-
tone?: "analytical" | "critical" | "balanced" | "constructive";
|
|
2634
|
-
/** @description Optional density: desired number of assessments per 2000 words of text (1-10) */
|
|
2635
|
-
density?: number;
|
|
2636
|
-
};
|
|
2637
|
-
DetectCommentsStreamRequest: {
|
|
2638
|
-
/** @description Optional instructions to guide AI comment detection */
|
|
2639
|
-
instructions?: string;
|
|
2640
|
-
/**
|
|
2641
|
-
* @description Optional tone/style for generated comments
|
|
2642
|
-
* @enum {string}
|
|
2643
|
-
*/
|
|
2644
|
-
tone?: "scholarly" | "explanatory" | "conversational" | "technical";
|
|
2645
|
-
/** @description Optional density: desired number of comments per 2000 words of text (2-12) */
|
|
2646
|
-
density?: number;
|
|
2647
|
-
};
|
|
2648
|
-
DetectTagsStreamRequest: {
|
|
2649
|
-
/** @description Tag schema ID (e.g., 'legal-irac', 'scientific-imrad', 'argument-toulmin') */
|
|
2650
|
-
schemaId: string;
|
|
2651
|
-
/** @description Categories to detect from the selected schema (e.g., ['Issue', 'Rule', 'Application', 'Conclusion']) */
|
|
2652
|
-
categories: string[];
|
|
2653
|
-
};
|
|
2654
|
-
ErrorResponse: {
|
|
2655
|
-
error: string;
|
|
2656
|
-
code?: string;
|
|
2657
|
-
details?: unknown;
|
|
2658
|
-
};
|
|
2659
|
-
EventStreamResponse: {
|
|
2660
|
-
event: string;
|
|
2661
|
-
data: string;
|
|
2662
|
-
id?: string;
|
|
2663
|
-
};
|
|
2664
|
-
GenerateResourceFromAnnotationRequest: {
|
|
2665
|
-
/** @description Optional name for the generated resource */
|
|
2666
|
-
name?: string;
|
|
2667
|
-
/** @description Entity types for the generated resource */
|
|
2668
|
-
entityTypes?: string[];
|
|
2669
|
-
/** @description Optional AI prompt for generation */
|
|
2670
|
-
prompt?: string;
|
|
2671
|
-
/** @description Language code (e.g., 'en', 'es') */
|
|
2672
|
-
language?: string;
|
|
2673
|
-
};
|
|
2674
|
-
GenerateResourceFromAnnotationResponse: {
|
|
2675
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2676
|
-
annotation: components["schemas"]["Annotation"];
|
|
2677
|
-
generated: boolean;
|
|
2678
|
-
};
|
|
2679
|
-
GenerateResourceRequest: {
|
|
2680
|
-
/** @description Resource ID containing the annotation */
|
|
2681
|
-
resourceId: string;
|
|
2682
|
-
/** @description Custom title for generated resource */
|
|
2683
|
-
title?: string;
|
|
2684
|
-
/** @description Custom prompt for content generation */
|
|
2685
|
-
prompt?: string;
|
|
2686
|
-
/** @description Language locale (e.g., "es", "fr", "ja") */
|
|
2687
|
-
language?: string;
|
|
2688
|
-
};
|
|
2689
|
-
GenerateResourceStreamRequest: {
|
|
2690
|
-
/** @description Custom title for generated resource */
|
|
2691
|
-
title?: string;
|
|
2692
|
-
/** @description Custom prompt for content generation */
|
|
2693
|
-
prompt?: string;
|
|
2694
|
-
/** @description Language locale for generated content (e.g., "es", "fr", "ja") */
|
|
2695
|
-
language?: string;
|
|
2696
|
-
/** @description Generation context including source document excerpts and metadata */
|
|
2697
|
-
context: components["schemas"]["GenerationContext"];
|
|
2698
|
-
/** @description Inference temperature (0.0 = focused, 1.0 = creative) */
|
|
2699
|
-
temperature?: number;
|
|
2700
|
-
/** @description Maximum tokens to generate */
|
|
2701
|
-
maxTokens?: number;
|
|
2702
|
-
};
|
|
2703
|
-
GetAnnotationHistoryResponse: {
|
|
2704
|
-
events: {
|
|
2705
|
-
id: string;
|
|
2706
|
-
type: string;
|
|
2707
|
-
timestamp: string;
|
|
2708
|
-
userId: string;
|
|
2709
|
-
resourceId: string;
|
|
2710
|
-
payload: {
|
|
2711
|
-
name: string;
|
|
2712
|
-
format: components["schemas"]["ContentFormat"];
|
|
2713
|
-
contentChecksum: string;
|
|
2714
|
-
/** @enum {string} */
|
|
2715
|
-
creationMethod: "api" | "upload" | "ui" | "reference" | "clone" | "generated";
|
|
2716
|
-
entityTypes?: string[];
|
|
2717
|
-
metadata?: {
|
|
2718
|
-
[key: string]: unknown;
|
|
2719
|
-
};
|
|
2720
|
-
} | {
|
|
2721
|
-
name: string;
|
|
2722
|
-
format: components["schemas"]["ContentFormat"];
|
|
2723
|
-
contentChecksum: string;
|
|
2724
|
-
parentResourceId: string;
|
|
2725
|
-
/** @enum {string} */
|
|
2726
|
-
creationMethod: "api" | "upload" | "ui" | "reference" | "clone" | "generated";
|
|
2727
|
-
entityTypes?: string[];
|
|
2728
|
-
metadata?: {
|
|
2729
|
-
[key: string]: unknown;
|
|
2730
|
-
};
|
|
2731
|
-
} | {
|
|
2732
|
-
reason?: string;
|
|
2733
|
-
} | Record<string, never> | {
|
|
2734
|
-
/** @description W3C Annotation (creator/created fields are optional in events - they're derived from event userId/timestamp) */
|
|
2735
|
-
annotation: components["schemas"]["Annotation"];
|
|
2736
|
-
} | {
|
|
2737
|
-
/** @description Unified annotation ID */
|
|
2738
|
-
annotationId: string;
|
|
2739
|
-
} | {
|
|
2740
|
-
/** @description Unified annotation ID */
|
|
2741
|
-
annotationId: string;
|
|
2742
|
-
/** @description For linking motivation */
|
|
2743
|
-
targetResourceId: string;
|
|
2744
|
-
} | {
|
|
2745
|
-
entityType: string;
|
|
2746
|
-
} | {
|
|
2747
|
-
entityType: string;
|
|
2748
|
-
};
|
|
2749
|
-
metadata: {
|
|
2750
|
-
sequenceNumber: number;
|
|
2751
|
-
prevEventHash?: string;
|
|
2752
|
-
checksum?: string;
|
|
2753
|
-
};
|
|
2754
|
-
}[];
|
|
2755
|
-
total: number;
|
|
2756
|
-
annotationId: string;
|
|
2757
|
-
resourceId: string;
|
|
2758
|
-
};
|
|
2759
|
-
GetAnnotationResponse: {
|
|
2760
|
-
annotation: components["schemas"]["Annotation"];
|
|
2761
|
-
resource: components["schemas"]["ResourceDescriptor"] | null;
|
|
2762
|
-
resolvedResource: components["schemas"]["ResourceDescriptor"] | null;
|
|
2763
|
-
};
|
|
2764
|
-
GetAnnotationsResponse: {
|
|
2765
|
-
annotations: components["schemas"]["Annotation"][];
|
|
2766
|
-
/** @description Total number of annotations */
|
|
2767
|
-
total: number;
|
|
2768
|
-
/** @description Motivation filter applied (if any) */
|
|
2769
|
-
motivation?: components["schemas"]["Motivation"] | null;
|
|
2770
|
-
};
|
|
2771
|
-
GetEntityTypesResponse: {
|
|
2772
|
-
entityTypes: string[];
|
|
2773
|
-
};
|
|
2774
|
-
GetEventsResponse: {
|
|
2775
|
-
events: {
|
|
2776
|
-
event: {
|
|
2777
|
-
id: string;
|
|
2778
|
-
type: string;
|
|
2779
|
-
timestamp: string;
|
|
2780
|
-
userId: string;
|
|
2781
|
-
resourceId: string;
|
|
2782
|
-
payload?: unknown;
|
|
2783
|
-
};
|
|
2784
|
-
metadata: {
|
|
2785
|
-
sequenceNumber: number;
|
|
2786
|
-
prevEventHash?: string;
|
|
2787
|
-
checksum?: string;
|
|
2788
|
-
};
|
|
2789
|
-
}[];
|
|
2790
|
-
total: number;
|
|
2791
|
-
resourceId: string;
|
|
2792
|
-
};
|
|
2793
|
-
GetReferencedByResponse: {
|
|
2794
|
-
referencedBy: {
|
|
2795
|
-
/** @description Reference annotation ID */
|
|
2796
|
-
id: string;
|
|
2797
|
-
/** @description Name of resource containing the reference */
|
|
2798
|
-
resourceName: string;
|
|
2799
|
-
target: {
|
|
2800
|
-
/** @description ID of resource containing the reference */
|
|
2801
|
-
source: string;
|
|
2802
|
-
selector: {
|
|
2803
|
-
/** @description The selected text that references this resource */
|
|
2804
|
-
exact: string;
|
|
2805
|
-
};
|
|
2806
|
-
};
|
|
2807
|
-
}[];
|
|
2808
|
-
};
|
|
2809
|
-
GetResourceByTokenResponse: {
|
|
2810
|
-
sourceResource: components["schemas"]["ResourceDescriptor"];
|
|
2811
|
-
/** @description ISO 8601 timestamp when token expires */
|
|
2812
|
-
expiresAt: string;
|
|
2813
|
-
};
|
|
2814
|
-
GetResourceResponse: {
|
|
2815
|
-
resource: components["schemas"]["ResourceDescriptor"];
|
|
2816
|
-
/** @description All annotations for the resource (highlights, references, assessments, etc.) */
|
|
2817
|
-
annotations: components["schemas"]["Annotation"][];
|
|
2818
|
-
/** @description Annotations that reference this resource from other resources */
|
|
2819
|
-
entityReferences: components["schemas"]["Annotation"][];
|
|
2820
|
-
};
|
|
2821
|
-
GoogleAuthRequest: {
|
|
2822
|
-
access_token: string;
|
|
2823
|
-
};
|
|
2824
|
-
HealthResponse: {
|
|
2825
|
-
status: string;
|
|
2826
|
-
message: string;
|
|
2827
|
-
version: string;
|
|
2828
|
-
timestamp: string;
|
|
2829
|
-
/** @enum {string} */
|
|
2830
|
-
database: "connected" | "disconnected" | "unknown";
|
|
2831
|
-
environment: string;
|
|
2832
|
-
};
|
|
2833
|
-
JobStatusResponse: {
|
|
2834
|
-
jobId: string;
|
|
2835
|
-
/** @enum {string} */
|
|
2836
|
-
type: "detection" | "generation" | "highlight-detection" | "assessment-detection" | "comment-detection" | "tag-detection";
|
|
2837
|
-
/** @enum {string} */
|
|
2838
|
-
status: "pending" | "running" | "complete" | "failed" | "cancelled";
|
|
2839
|
-
userId: string;
|
|
2840
|
-
created: string;
|
|
2841
|
-
startedAt?: string;
|
|
2842
|
-
completedAt?: string;
|
|
2843
|
-
error?: string;
|
|
2844
|
-
progress?: unknown;
|
|
2845
|
-
result?: unknown;
|
|
2846
|
-
};
|
|
2847
|
-
ListAnnotationsResponse: {
|
|
2848
|
-
annotations: components["schemas"]["Annotation"][];
|
|
2849
|
-
total: number;
|
|
2850
|
-
offset: number;
|
|
2851
|
-
limit: number;
|
|
2852
|
-
};
|
|
2853
|
-
ListResourcesResponse: {
|
|
2854
|
-
resources: components["schemas"]["ResourceDescriptor"][];
|
|
2855
|
-
total: number;
|
|
2856
|
-
offset: number;
|
|
2857
|
-
limit: number;
|
|
2858
|
-
};
|
|
2859
|
-
PasswordAuthRequest: {
|
|
2860
|
-
/**
|
|
2861
|
-
* Format: email
|
|
2862
|
-
* @description User email address
|
|
2863
|
-
*/
|
|
2864
|
-
email: string;
|
|
2865
|
-
/** @description User password (minimum 8 characters) */
|
|
2866
|
-
password: string;
|
|
2867
|
-
};
|
|
2868
|
-
MCPGenerateResponse: {
|
|
2869
|
-
refresh_token: string;
|
|
2870
|
-
};
|
|
2871
|
-
/**
|
|
2872
|
-
* @description W3C Web Annotation motivation vocabulary - https://www.w3.org/TR/annotation-vocab/#motivation
|
|
2873
|
-
* @enum {string}
|
|
2874
|
-
*/
|
|
2875
|
-
Motivation: "assessing" | "bookmarking" | "classifying" | "commenting" | "describing" | "editing" | "highlighting" | "identifying" | "linking" | "moderating" | "questioning" | "replying" | "tagging";
|
|
2876
|
-
OAuthConfigResponse: {
|
|
2877
|
-
providers: {
|
|
2878
|
-
name: string;
|
|
2879
|
-
isConfigured: boolean;
|
|
2880
|
-
clientId: string;
|
|
2881
|
-
}[];
|
|
2882
|
-
allowedDomains: string[];
|
|
2883
|
-
};
|
|
2884
|
-
/** @description A specific, byte-addressable rendition of a resource (file/asset/variant). */
|
|
2885
|
-
Representation: {
|
|
2886
|
-
/**
|
|
2887
|
-
* Format: uri
|
|
2888
|
-
* @description Stable ID for this representation.
|
|
2889
|
-
*/
|
|
2890
|
-
"@id"?: string;
|
|
2891
|
-
/** @description Type(s), e.g., schema:MediaObject. */
|
|
2892
|
-
"@type"?: string | string[];
|
|
2893
|
-
/** @description MIME/media type (e.g., text/markdown, image/png). */
|
|
2894
|
-
mediaType: string;
|
|
2895
|
-
/** @description Where the bytes live (s3://, file://, https://, ipfs://, etc.). */
|
|
2896
|
-
storageUri?: string;
|
|
2897
|
-
filename?: string;
|
|
2898
|
-
/** @description Size of the payload in bytes. */
|
|
2899
|
-
byteSize?: number;
|
|
2900
|
-
/** @description Integrity hash (e.g., sha256:abcd…). */
|
|
2901
|
-
checksum?: string;
|
|
2902
|
-
/** @description Compression/transfer encoding if applicable. */
|
|
2903
|
-
encoding?: string;
|
|
2904
|
-
/** @description IETF BCP 47 language tag (e.g., en, es-ES). */
|
|
2905
|
-
language?: string;
|
|
2906
|
-
/** @description Pixels (images/video). */
|
|
2907
|
-
width?: number;
|
|
2908
|
-
/** @description Pixels (images/video). */
|
|
2909
|
-
height?: number;
|
|
2910
|
-
/** @description Seconds (audio/video). */
|
|
2911
|
-
duration?: number;
|
|
2912
|
-
/** Format: date-time */
|
|
2913
|
-
created?: string;
|
|
2914
|
-
/** Format: date-time */
|
|
2915
|
-
modified?: string;
|
|
2916
|
-
/** @description Profile/shape the bytes conform to (e.g., a JSON profile or SVG profile). */
|
|
2917
|
-
conformsTo?: string | string[];
|
|
2918
|
-
tags?: string[];
|
|
2919
|
-
/**
|
|
2920
|
-
* @description Semantics of this rendition relative to the resource (e.g., original, thumbnail, preview, derived).
|
|
2921
|
-
* @enum {string}
|
|
2922
|
-
*/
|
|
2923
|
-
rel?: "original" | "thumbnail" | "preview" | "optimized" | "derived" | "other";
|
|
2924
|
-
} & {
|
|
2925
|
-
[key: string]: unknown;
|
|
2926
|
-
};
|
|
2927
|
-
ResolveAnnotationRequest: {
|
|
2928
|
-
/** @description Target resource ID to resolve reference to */
|
|
2929
|
-
resourceId: string;
|
|
2930
|
-
};
|
|
2931
|
-
ResolveAnnotationResponse: {
|
|
2932
|
-
annotation: components["schemas"]["Annotation"];
|
|
2933
|
-
targetResource?: components["schemas"]["ResourceDescriptor"] | null;
|
|
2934
|
-
};
|
|
2935
|
-
/** @description Metadata about a resource (1:1 with its URI). JSON-LD subject is @id. Link to concrete bytes via representations. */
|
|
2936
|
-
ResourceDescriptor: {
|
|
2937
|
-
/** @description JSON-LD context; URI, object, or array of these. */
|
|
2938
|
-
"@context": string | {
|
|
2939
|
-
[key: string]: unknown;
|
|
2940
|
-
} | (string | {
|
|
2941
|
-
[key: string]: unknown;
|
|
2942
|
-
})[];
|
|
2943
|
-
/**
|
|
2944
|
-
* Format: uri
|
|
2945
|
-
* @description Canonical URI/URN of the resource being described.
|
|
2946
|
-
*/
|
|
2947
|
-
"@id": string;
|
|
2948
|
-
/** @description Type(s) of the resource (IRIs/CURIEs via @context). */
|
|
2949
|
-
"@type"?: string | string[];
|
|
2950
|
-
name: string;
|
|
2951
|
-
description?: string;
|
|
2952
|
-
/** @description Persistent identifiers (e.g., DOI, URN). */
|
|
2953
|
-
identifier?: string | string[] | ({
|
|
2954
|
-
/** Format: uri */
|
|
2955
|
-
"@id"?: string;
|
|
2956
|
-
value?: string;
|
|
2957
|
-
scheme?: string;
|
|
2958
|
-
} & {
|
|
2959
|
-
[key: string]: unknown;
|
|
2960
|
-
});
|
|
2961
|
-
/** @description Topics (IRIs or strings). */
|
|
2962
|
-
about?: string | string[];
|
|
2963
|
-
/** @description Equivalent/authoritative references. */
|
|
2964
|
-
sameAs?: string[];
|
|
2965
|
-
isPartOf?: string[];
|
|
2966
|
-
hasPart?: string[];
|
|
2967
|
-
/** Format: uri */
|
|
2968
|
-
license?: string;
|
|
2969
|
-
version?: string;
|
|
2970
|
-
/** Format: date-time */
|
|
2971
|
-
dateCreated?: string;
|
|
2972
|
-
/** Format: date-time */
|
|
2973
|
-
dateModified?: string;
|
|
2974
|
-
/** @description W3C PROV - source resources this was derived from */
|
|
2975
|
-
wasDerivedFrom?: string | string[];
|
|
2976
|
-
/** @description W3C PROV - agents responsible for this resource */
|
|
2977
|
-
wasAttributedTo?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
|
|
2978
|
-
/** @description Profile/shape URI this resource description conforms to. */
|
|
2979
|
-
conformsTo?: string | string[];
|
|
2980
|
-
/** @description Convenience set summarizing media types across representations. */
|
|
2981
|
-
availableFormats?: string[];
|
|
2982
|
-
/** @description Managed or referenced byte-level renditions of this resource. */
|
|
2983
|
-
representations: components["schemas"]["Representation"] | components["schemas"]["Representation"][];
|
|
2984
|
-
/** @description Application-specific: Whether this resource is archived */
|
|
2985
|
-
archived?: boolean;
|
|
2986
|
-
/** @description Application-specific: Entity types for this resource */
|
|
2987
|
-
entityTypes?: string[];
|
|
2988
|
-
/** @description Application-specific: Whether this resource is a draft */
|
|
2989
|
-
isDraft?: boolean;
|
|
2990
|
-
/**
|
|
2991
|
-
* @description Application-specific: How this resource was created
|
|
2992
|
-
* @enum {string}
|
|
2993
|
-
*/
|
|
2994
|
-
creationMethod?: "api" | "upload" | "ui" | "reference" | "clone" | "generated";
|
|
2995
|
-
/** @description Application-specific: ID of annotation that triggered generation */
|
|
2996
|
-
sourceAnnotationId?: string;
|
|
2997
|
-
/** @description Application-specific: ID of source resource for clones/derivatives */
|
|
2998
|
-
sourceResourceId?: string;
|
|
2999
|
-
} & {
|
|
3000
|
-
[key: string]: unknown;
|
|
3001
|
-
};
|
|
3002
|
-
ResourceLLMContextResponse: {
|
|
3003
|
-
mainResource: components["schemas"]["ResourceDescriptor"];
|
|
3004
|
-
relatedResources: components["schemas"]["ResourceDescriptor"][];
|
|
3005
|
-
annotations: components["schemas"]["Annotation"][];
|
|
3006
|
-
graph: {
|
|
3007
|
-
nodes: {
|
|
3008
|
-
id: string;
|
|
3009
|
-
type: string;
|
|
3010
|
-
label: string;
|
|
3011
|
-
metadata: {
|
|
3012
|
-
[key: string]: unknown;
|
|
3013
|
-
};
|
|
3014
|
-
}[];
|
|
3015
|
-
edges: {
|
|
3016
|
-
source: string;
|
|
3017
|
-
target: string;
|
|
3018
|
-
type: string;
|
|
3019
|
-
metadata: {
|
|
3020
|
-
[key: string]: unknown;
|
|
3021
|
-
};
|
|
3022
|
-
}[];
|
|
3023
|
-
};
|
|
3024
|
-
summary?: string;
|
|
3025
|
-
suggestedReferences?: string[];
|
|
3026
|
-
/** @description The content of the main resource (included if includeContent=true) */
|
|
3027
|
-
mainResourceContent?: string;
|
|
3028
|
-
/** @description Map of resource IDs to their content (included if includeContent=true) */
|
|
3029
|
-
relatedResourcesContent?: {
|
|
3030
|
-
[key: string]: string;
|
|
3031
|
-
};
|
|
3032
|
-
};
|
|
3033
|
-
SpecificResource: {
|
|
3034
|
-
/** @constant */
|
|
3035
|
-
type: "SpecificResource";
|
|
3036
|
-
/** @description IRI of the target resource */
|
|
3037
|
-
source: string;
|
|
3038
|
-
/** @description Why this body is included */
|
|
3039
|
-
purpose?: components["schemas"]["Motivation"];
|
|
3040
|
-
};
|
|
3041
|
-
StatusResponse: {
|
|
3042
|
-
status: string;
|
|
3043
|
-
version: string;
|
|
3044
|
-
features: {
|
|
3045
|
-
semanticContent: string;
|
|
3046
|
-
collaboration: string;
|
|
3047
|
-
rbac: string;
|
|
3048
|
-
};
|
|
3049
|
-
message: string;
|
|
3050
|
-
authenticatedAs?: string;
|
|
3051
|
-
};
|
|
3052
|
-
TextPositionSelector: {
|
|
3053
|
-
/** @enum {string} */
|
|
3054
|
-
type: "TextPositionSelector";
|
|
3055
|
-
/** @description Character offset from resource start */
|
|
3056
|
-
start: number;
|
|
3057
|
-
/** @description Character offset from resource start */
|
|
3058
|
-
end: number;
|
|
3059
|
-
};
|
|
3060
|
-
TextQuoteSelector: {
|
|
3061
|
-
/** @enum {string} */
|
|
3062
|
-
type: "TextQuoteSelector";
|
|
3063
|
-
exact: string;
|
|
3064
|
-
prefix?: string;
|
|
3065
|
-
suffix?: string;
|
|
3066
|
-
};
|
|
3067
|
-
TextualBody: {
|
|
3068
|
-
/** @constant */
|
|
3069
|
-
type: "TextualBody";
|
|
3070
|
-
/** @description The text content (e.g., entity type name) */
|
|
3071
|
-
value: string;
|
|
3072
|
-
/** @description Why this body is included */
|
|
3073
|
-
purpose?: components["schemas"]["Motivation"];
|
|
3074
|
-
/** @description MIME type (defaults to text/plain) */
|
|
3075
|
-
format?: string;
|
|
3076
|
-
/** @description BCP 47 language tag */
|
|
3077
|
-
language?: string;
|
|
3078
|
-
};
|
|
3079
|
-
TokenRefreshRequest: {
|
|
3080
|
-
/**
|
|
3081
|
-
* @description Refresh token obtained during login
|
|
3082
|
-
* @example eyJhbGciOiJIUzI1NiIs...
|
|
3083
|
-
*/
|
|
3084
|
-
refreshToken: string;
|
|
3085
|
-
};
|
|
3086
|
-
TokenRefreshResponse: {
|
|
3087
|
-
access_token: string;
|
|
3088
|
-
};
|
|
3089
|
-
UpdateAnnotationBodyRequest: {
|
|
3090
|
-
/** @description Resource ID containing the annotation (required for O(1) Layer 3 lookup) */
|
|
3091
|
-
resourceId: string;
|
|
3092
|
-
/** @description Array of body modification operations to apply */
|
|
3093
|
-
operations: (components["schemas"]["BodyOperationAdd"] | components["schemas"]["BodyOperationRemove"] | components["schemas"]["BodyOperationReplace"])[];
|
|
3094
|
-
};
|
|
3095
|
-
UpdateAnnotationBodyResponse: {
|
|
3096
|
-
annotation: components["schemas"]["Annotation"];
|
|
3097
|
-
};
|
|
3098
|
-
UpdateResourceRequest: {
|
|
3099
|
-
entityTypes?: string[];
|
|
3100
|
-
archived?: boolean;
|
|
3101
|
-
};
|
|
3102
|
-
UpdateUserRequest: {
|
|
3103
|
-
isAdmin?: boolean;
|
|
3104
|
-
isActive?: boolean;
|
|
3105
|
-
name?: string;
|
|
3106
|
-
};
|
|
3107
|
-
UpdateUserResponse: {
|
|
3108
|
-
success: boolean;
|
|
3109
|
-
user: {
|
|
3110
|
-
id: string;
|
|
3111
|
-
email: string;
|
|
3112
|
-
name?: string | null;
|
|
3113
|
-
image?: string | null;
|
|
3114
|
-
domain: string;
|
|
3115
|
-
provider: string;
|
|
3116
|
-
isAdmin: boolean;
|
|
3117
|
-
isActive: boolean;
|
|
3118
|
-
lastLogin?: string | null;
|
|
3119
|
-
created: string;
|
|
3120
|
-
updatedAt: string;
|
|
3121
|
-
};
|
|
3122
|
-
};
|
|
3123
|
-
UserResponse: {
|
|
3124
|
-
id: string;
|
|
3125
|
-
email: string;
|
|
3126
|
-
name: string | null;
|
|
3127
|
-
image: string | null;
|
|
3128
|
-
domain: string;
|
|
3129
|
-
provider: string;
|
|
3130
|
-
isAdmin: boolean;
|
|
3131
|
-
isActive: boolean;
|
|
3132
|
-
termsAcceptedAt: string | null;
|
|
3133
|
-
lastLogin: string | null;
|
|
3134
|
-
created: string;
|
|
3135
|
-
};
|
|
3136
|
-
SvgSelector: {
|
|
3137
|
-
/** @enum {string} */
|
|
3138
|
-
type: "SvgSelector";
|
|
3139
|
-
/** @description SVG markup defining the region (must include xmlns attribute) */
|
|
3140
|
-
value: string;
|
|
3141
|
-
};
|
|
3142
|
-
/** @description W3C Web Annotation FragmentSelector for media fragment identifiers (RFC 3778 for PDFs) */
|
|
3143
|
-
FragmentSelector: {
|
|
3144
|
-
/** @enum {string} */
|
|
3145
|
-
type: "FragmentSelector";
|
|
3146
|
-
/**
|
|
3147
|
-
* @description Media fragment identifier (e.g., 'page=1&viewrect=100,200,50,30' for PDF)
|
|
3148
|
-
* @example page=1&viewrect=100,200,50,30
|
|
3149
|
-
* @example page=5&viewrect=250,400,100,75
|
|
3150
|
-
*/
|
|
3151
|
-
value: string;
|
|
3152
|
-
/**
|
|
3153
|
-
* @description URI identifying the fragment syntax specification
|
|
3154
|
-
* @example http://tools.ietf.org/rfc/rfc3778
|
|
3155
|
-
*/
|
|
3156
|
-
conformsTo?: string;
|
|
3157
|
-
};
|
|
3158
|
-
/** @description Context information used for AI generation. Includes source document excerpts and metadata. */
|
|
3159
|
-
GenerationContext: {
|
|
3160
|
-
/** @description Text context from the source document */
|
|
3161
|
-
sourceContext: {
|
|
3162
|
-
/** @description Text appearing before the selected passage */
|
|
3163
|
-
before?: string;
|
|
3164
|
-
/** @description The selected text passage (the annotation target) */
|
|
3165
|
-
selected: string;
|
|
3166
|
-
/** @description Text appearing after the selected passage */
|
|
3167
|
-
after?: string;
|
|
3168
|
-
};
|
|
3169
|
-
/** @description Additional context metadata (reserved for future use) */
|
|
3170
|
-
metadata?: {
|
|
3171
|
-
/** @description Type of source resource (e.g., 'document', 'image', 'video') */
|
|
3172
|
-
resourceType?: string;
|
|
3173
|
-
/** @description BCP 47 language tag of source content */
|
|
3174
|
-
language?: string;
|
|
3175
|
-
/** @description Entity types associated with the annotation */
|
|
3176
|
-
entityTypes?: string[];
|
|
3177
|
-
};
|
|
3178
|
-
};
|
|
3179
|
-
};
|
|
3180
|
-
responses: never;
|
|
3181
|
-
parameters: never;
|
|
3182
|
-
requestBodies: never;
|
|
3183
|
-
headers: never;
|
|
3184
|
-
pathItems: never;
|
|
3185
|
-
}
|
|
3186
|
-
type $defs = Record<string, never>;
|
|
3187
|
-
type operations = Record<string, never>;
|
|
3188
|
-
|
|
3189
|
-
/**
|
|
3190
|
-
* Branded string types for compile-time type safety
|
|
3191
|
-
*
|
|
3192
|
-
* These types are zero-cost at runtime but prevent mixing
|
|
3193
|
-
* different string types at compile time.
|
|
3194
|
-
*/
|
|
3195
|
-
|
|
3196
|
-
type Motivation = components['schemas']['Motivation'];
|
|
3197
|
-
type ContentFormat = components['schemas']['ContentFormat'];
|
|
3198
|
-
type Email = string & {
|
|
3199
|
-
readonly __brand: 'Email';
|
|
3200
|
-
};
|
|
3201
|
-
type AuthCode = string & {
|
|
3202
|
-
readonly __brand: 'AuthCode';
|
|
3203
|
-
};
|
|
3204
|
-
type GoogleCredential = string & {
|
|
3205
|
-
readonly __brand: 'GoogleCredential';
|
|
3206
|
-
};
|
|
3207
|
-
type AccessToken = string & {
|
|
3208
|
-
readonly __brand: 'AccessToken';
|
|
3209
|
-
};
|
|
3210
|
-
type RefreshToken = string & {
|
|
3211
|
-
readonly __brand: 'RefreshToken';
|
|
3212
|
-
};
|
|
3213
|
-
type MCPToken = string & {
|
|
3214
|
-
readonly __brand: 'MCPToken';
|
|
3215
|
-
};
|
|
3216
|
-
type CloneToken = string & {
|
|
3217
|
-
readonly __brand: 'CloneToken';
|
|
3218
|
-
};
|
|
3219
|
-
type JobId = string & {
|
|
3220
|
-
readonly __brand: 'JobId';
|
|
3221
|
-
};
|
|
3222
|
-
type UserDID = string & {
|
|
3223
|
-
readonly __brand: 'UserDID';
|
|
3224
|
-
};
|
|
3225
|
-
type EntityType = string & {
|
|
3226
|
-
readonly __brand: 'EntityType';
|
|
3227
|
-
};
|
|
3228
|
-
type SearchQuery = string & {
|
|
3229
|
-
readonly __brand: 'SearchQuery';
|
|
3230
|
-
};
|
|
3231
|
-
type BaseUrl = string & {
|
|
3232
|
-
readonly __brand: 'BaseUrl';
|
|
3233
|
-
};
|
|
3234
|
-
declare function email(value: string): Email;
|
|
3235
|
-
declare function authCode(value: string): AuthCode;
|
|
3236
|
-
declare function googleCredential(value: string): GoogleCredential;
|
|
3237
|
-
declare function accessToken(value: string): AccessToken;
|
|
3238
|
-
declare function refreshToken(value: string): RefreshToken;
|
|
3239
|
-
declare function mcpToken(value: string): MCPToken;
|
|
3240
|
-
declare function cloneToken(value: string): CloneToken;
|
|
3241
|
-
declare function jobId(value: string): JobId;
|
|
3242
|
-
declare function userDID(value: string): UserDID;
|
|
3243
|
-
declare function entityType(value: string): EntityType;
|
|
3244
|
-
declare function searchQuery(value: string): SearchQuery;
|
|
3245
|
-
declare function baseUrl(value: string): BaseUrl;
|
|
3246
|
-
type ResourceUri = string & {
|
|
3247
|
-
readonly __brand: 'ResourceUri';
|
|
3248
|
-
};
|
|
3249
|
-
type AnnotationUri = string & {
|
|
3250
|
-
readonly __brand: 'AnnotationUri';
|
|
3251
|
-
};
|
|
3252
|
-
type ResourceAnnotationUri = string & {
|
|
3253
|
-
readonly __brand: 'ResourceAnnotationUri';
|
|
3254
|
-
};
|
|
3255
|
-
declare function resourceUri(uri: string): ResourceUri;
|
|
3256
|
-
declare function annotationUri(uri: string): AnnotationUri;
|
|
3257
|
-
declare function resourceAnnotationUri(uri: string): ResourceAnnotationUri;
|
|
3258
|
-
|
|
3259
|
-
/**
|
|
3260
|
-
* Annotation and Selector Utilities
|
|
3261
|
-
*
|
|
3262
|
-
* Pure TypeScript utilities for working with W3C Web Annotations.
|
|
3263
|
-
* No React dependencies - safe to use in any JavaScript environment.
|
|
3264
|
-
*
|
|
3265
|
-
* Body is either empty array (stub) or single SpecificResource (resolved)
|
|
3266
|
-
* Body can be array of TextualBody (tagging) + SpecificResource (linking)
|
|
3267
|
-
* Target can be simple string IRI or object with source and optional selector
|
|
3268
|
-
*/
|
|
3269
|
-
|
|
3270
|
-
type Annotation = components['schemas']['Annotation'];
|
|
3271
|
-
type HighlightAnnotation = Annotation;
|
|
3272
|
-
type ReferenceAnnotation = Annotation;
|
|
3273
|
-
type TextPositionSelector = components['schemas']['TextPositionSelector'];
|
|
3274
|
-
type TextQuoteSelector = components['schemas']['TextQuoteSelector'];
|
|
3275
|
-
type SvgSelector = components['schemas']['SvgSelector'];
|
|
3276
|
-
type FragmentSelector = components['schemas']['FragmentSelector'];
|
|
3277
|
-
type Selector = TextPositionSelector | TextQuoteSelector | SvgSelector | FragmentSelector;
|
|
3278
|
-
|
|
3279
|
-
/**
|
|
3280
|
-
* Get the source from an annotation body (null if stub)
|
|
3281
|
-
* Search for SpecificResource in body array
|
|
3282
|
-
*/
|
|
3283
|
-
declare function getBodySource(body: Annotation['body']): ResourceUri | null;
|
|
3284
|
-
/**
|
|
3285
|
-
* Get the type from an annotation body (returns first body type in array)
|
|
3286
|
-
*/
|
|
3287
|
-
declare function getBodyType(body: Annotation['body']): 'TextualBody' | 'SpecificResource' | null;
|
|
3288
|
-
/**
|
|
3289
|
-
* Check if body is resolved (has a source)
|
|
3290
|
-
* Check for SpecificResource in body array
|
|
3291
|
-
*/
|
|
3292
|
-
declare function isBodyResolved(body: Annotation['body']): boolean;
|
|
3293
|
-
/**
|
|
3294
|
-
* Get the source IRI from target (handles both string and object forms)
|
|
3295
|
-
*/
|
|
3296
|
-
declare function getTargetSource(target: Annotation['target']): ResourceUri;
|
|
3297
|
-
/**
|
|
3298
|
-
* Get the selector from target (undefined if string or no selector)
|
|
3299
|
-
*/
|
|
3300
|
-
declare function getTargetSelector(target: Annotation['target']): {
|
|
3301
|
-
type: "TextPositionSelector";
|
|
3302
|
-
start: number;
|
|
3303
|
-
end: number;
|
|
3304
|
-
} | {
|
|
3305
|
-
type: "TextQuoteSelector";
|
|
3306
|
-
exact: string;
|
|
3307
|
-
prefix?: string;
|
|
3308
|
-
suffix?: string;
|
|
3309
|
-
} | {
|
|
3310
|
-
type: "SvgSelector";
|
|
3311
|
-
value: string;
|
|
3312
|
-
} | {
|
|
3313
|
-
type: "FragmentSelector";
|
|
3314
|
-
value: string;
|
|
3315
|
-
conformsTo?: string;
|
|
3316
|
-
} | ({
|
|
3317
|
-
type: "TextPositionSelector";
|
|
3318
|
-
start: number;
|
|
3319
|
-
end: number;
|
|
3320
|
-
} | {
|
|
3321
|
-
type: "TextQuoteSelector";
|
|
3322
|
-
exact: string;
|
|
3323
|
-
prefix?: string;
|
|
3324
|
-
suffix?: string;
|
|
3325
|
-
} | {
|
|
3326
|
-
type: "SvgSelector";
|
|
3327
|
-
value: string;
|
|
3328
|
-
} | {
|
|
3329
|
-
type: "FragmentSelector";
|
|
3330
|
-
value: string;
|
|
3331
|
-
conformsTo?: string;
|
|
3332
|
-
})[] | undefined;
|
|
3333
|
-
/**
|
|
3334
|
-
* Check if target has a selector
|
|
3335
|
-
*/
|
|
3336
|
-
declare function hasTargetSelector(target: Annotation['target']): boolean;
|
|
3337
|
-
/**
|
|
3338
|
-
* Type guard to check if an annotation is a highlight
|
|
3339
|
-
*/
|
|
3340
|
-
declare function isHighlight(annotation: Annotation): annotation is HighlightAnnotation;
|
|
3341
|
-
/**
|
|
3342
|
-
* Type guard to check if an annotation is a reference (linking)
|
|
3343
|
-
*/
|
|
3344
|
-
declare function isReference(annotation: Annotation): annotation is ReferenceAnnotation;
|
|
3345
|
-
/**
|
|
3346
|
-
* Type guard to check if an annotation is an assessment
|
|
3347
|
-
*/
|
|
3348
|
-
declare function isAssessment(annotation: Annotation): annotation is Annotation;
|
|
3349
|
-
/**
|
|
3350
|
-
* Type guard to check if an annotation is a comment
|
|
3351
|
-
*/
|
|
3352
|
-
declare function isComment(annotation: Annotation): annotation is Annotation;
|
|
3353
|
-
/**
|
|
3354
|
-
* Type guard to check if an annotation is a tag
|
|
3355
|
-
*/
|
|
3356
|
-
declare function isTag(annotation: Annotation): annotation is Annotation;
|
|
3357
|
-
/**
|
|
3358
|
-
* Extract comment text from a comment annotation's body
|
|
3359
|
-
* @param annotation - The annotation to extract comment text from
|
|
3360
|
-
* @returns The comment text, or undefined if not a comment or no text found
|
|
3361
|
-
*/
|
|
3362
|
-
declare function getCommentText(annotation: Annotation): string | undefined;
|
|
3363
|
-
/**
|
|
3364
|
-
* Type guard to check if a reference annotation is a stub (unresolved)
|
|
3365
|
-
* Stub if no SpecificResource in body array
|
|
3366
|
-
*/
|
|
3367
|
-
declare function isStubReference(annotation: Annotation): boolean;
|
|
3368
|
-
/**
|
|
3369
|
-
* Type guard to check if a reference annotation is resolved
|
|
3370
|
-
* Resolved if SpecificResource exists in body array
|
|
3371
|
-
*/
|
|
3372
|
-
declare function isResolvedReference(annotation: Annotation): annotation is ReferenceAnnotation;
|
|
3373
|
-
/**
|
|
3374
|
-
* Get the exact text from a selector (single or array)
|
|
3375
|
-
*
|
|
3376
|
-
* When selector is an array, tries to find a TextQuoteSelector (which has exact text).
|
|
3377
|
-
* TextPositionSelector does not have exact text, only character offsets.
|
|
3378
|
-
* Handles undefined selector (when target is a string IRI with no selector)
|
|
3379
|
-
*/
|
|
3380
|
-
declare function getExactText(selector: Selector | Selector[] | undefined): string;
|
|
3381
|
-
/**
|
|
3382
|
-
* Get the exact text from an annotation's target selector
|
|
3383
|
-
* Uses getTargetSelector helper to safely get selector
|
|
3384
|
-
*/
|
|
3385
|
-
declare function getAnnotationExactText(annotation: Annotation): string;
|
|
3386
|
-
/**
|
|
3387
|
-
* Get the primary selector from a selector (single or array)
|
|
3388
|
-
*
|
|
3389
|
-
* When selector is an array, returns the first selector.
|
|
3390
|
-
* When selector is a single object, returns it as-is.
|
|
3391
|
-
*/
|
|
3392
|
-
declare function getPrimarySelector(selector: Selector | Selector[]): Selector;
|
|
3393
|
-
/**
|
|
3394
|
-
* Get TextPositionSelector from a selector (single or array)
|
|
3395
|
-
*
|
|
3396
|
-
* Returns the first TextPositionSelector found, or null if none exists.
|
|
3397
|
-
* Handles undefined selector (when target is a string IRI with no selector)
|
|
3398
|
-
*/
|
|
3399
|
-
declare function getTextPositionSelector(selector: Selector | Selector[] | undefined): TextPositionSelector | null;
|
|
3400
|
-
/**
|
|
3401
|
-
* Get TextQuoteSelector from a selector (single or array)
|
|
3402
|
-
*
|
|
3403
|
-
* Returns the first TextQuoteSelector found, or null if none exists.
|
|
3404
|
-
*/
|
|
3405
|
-
declare function getTextQuoteSelector(selector: Selector | Selector[]): TextQuoteSelector | null;
|
|
3406
|
-
/**
|
|
3407
|
-
* Get SvgSelector from a selector (single or array)
|
|
3408
|
-
*
|
|
3409
|
-
* Returns the first SvgSelector found, or null if none exists.
|
|
3410
|
-
*/
|
|
3411
|
-
declare function getSvgSelector(selector: Selector | Selector[] | undefined): SvgSelector | null;
|
|
3412
|
-
/**
|
|
3413
|
-
* Get FragmentSelector from a selector (single or array)
|
|
3414
|
-
*
|
|
3415
|
-
* Returns the first FragmentSelector found, or null if none exists.
|
|
3416
|
-
*/
|
|
3417
|
-
declare function getFragmentSelector(selector: Selector | Selector[] | undefined): FragmentSelector | null;
|
|
3418
|
-
/**
|
|
3419
|
-
* Validate SVG markup for W3C compliance
|
|
3420
|
-
*
|
|
3421
|
-
* Checks that:
|
|
3422
|
-
* - SVG contains xmlns attribute
|
|
3423
|
-
* - SVG is well-formed XML
|
|
3424
|
-
* - SVG contains at least one shape element
|
|
3425
|
-
*
|
|
3426
|
-
* @returns null if valid, error message if invalid
|
|
3427
|
-
*/
|
|
3428
|
-
declare function validateSvgMarkup(svg: string): string | null;
|
|
3429
|
-
/**
|
|
3430
|
-
* Extract bounding box from SVG markup
|
|
3431
|
-
*
|
|
3432
|
-
* Attempts to extract x, y, width, height from the SVG viewBox or root element.
|
|
3433
|
-
* Returns null if bounding box cannot be determined.
|
|
3434
|
-
*/
|
|
3435
|
-
declare function extractBoundingBox(svg: string): {
|
|
3436
|
-
x: number;
|
|
3437
|
-
y: number;
|
|
3438
|
-
width: number;
|
|
3439
|
-
height: number;
|
|
3440
|
-
} | null;
|
|
3441
|
-
|
|
3442
|
-
/**
|
|
3443
|
-
* Fuzzy Anchoring for W3C Web Annotation TextQuoteSelector
|
|
3444
|
-
*
|
|
3445
|
-
* Uses prefix/suffix context to disambiguate when the same text appears multiple times.
|
|
3446
|
-
* Implements fuzzy matching as specified in the W3C Web Annotation Data Model.
|
|
3447
|
-
*
|
|
3448
|
-
* @see https://www.w3.org/TR/annotation-model/#text-quote-selector
|
|
3449
|
-
*/
|
|
3450
|
-
interface TextPosition {
|
|
3451
|
-
start: number;
|
|
3452
|
-
end: number;
|
|
3453
|
-
}
|
|
3454
|
-
type MatchQuality = 'exact' | 'normalized' | 'case-insensitive' | 'fuzzy';
|
|
3455
|
-
/**
|
|
3456
|
-
* Normalize text for comparison - handles common document editing changes
|
|
3457
|
-
*
|
|
3458
|
-
* Collapses whitespace, converts curly quotes to straight quotes,
|
|
3459
|
-
* and normalizes common punctuation variations.
|
|
3460
|
-
*/
|
|
3461
|
-
declare function normalizeText(text: string): string;
|
|
3462
|
-
/**
|
|
3463
|
-
* Find best match for text in content using multi-strategy search
|
|
3464
|
-
*
|
|
3465
|
-
* Shared core logic used by both findTextWithContext and validateAndCorrectOffsets.
|
|
3466
|
-
*
|
|
3467
|
-
* @param content - Full text content to search within
|
|
3468
|
-
* @param searchText - The text to find
|
|
3469
|
-
* @param positionHint - Optional hint for where to search (TextPositionSelector.start)
|
|
3470
|
-
* @returns Match with position and quality, or null if not found
|
|
3471
|
-
*/
|
|
3472
|
-
declare function findBestTextMatch(content: string, searchText: string, positionHint?: number): {
|
|
3473
|
-
start: number;
|
|
3474
|
-
end: number;
|
|
3475
|
-
matchQuality: MatchQuality;
|
|
3476
|
-
} | null;
|
|
3477
|
-
/**
|
|
3478
|
-
* Find text using exact match with optional prefix/suffix context
|
|
3479
|
-
*
|
|
3480
|
-
* When the exact text appears multiple times in the content, prefix and suffix
|
|
3481
|
-
* are used to disambiguate and find the correct occurrence.
|
|
3482
|
-
*
|
|
3483
|
-
* If exact text is not found, uses multi-strategy fuzzy matching (normalization,
|
|
3484
|
-
* case-insensitive, Levenshtein distance) to locate changed text.
|
|
3485
|
-
*
|
|
3486
|
-
* @param content - Full text content to search within
|
|
3487
|
-
* @param exact - The exact text to find
|
|
3488
|
-
* @param prefix - Optional text that should appear immediately before the match
|
|
3489
|
-
* @param suffix - Optional text that should appear immediately after the match
|
|
3490
|
-
* @param positionHint - Optional position hint (from TextPositionSelector) for fuzzy search
|
|
3491
|
-
* @returns Position of the matched text, or null if not found
|
|
3492
|
-
*
|
|
3493
|
-
* @example
|
|
3494
|
-
* ```typescript
|
|
3495
|
-
* const content = "The cat sat. The cat ran.";
|
|
3496
|
-
* // Find second "The cat" occurrence
|
|
3497
|
-
* const pos = findTextWithContext(content, "The cat", "sat. ", " ran");
|
|
3498
|
-
* // Returns { start: 13, end: 20 }
|
|
3499
|
-
* ```
|
|
3500
|
-
*/
|
|
3501
|
-
declare function findTextWithContext(content: string, exact: string, prefix?: string, suffix?: string, positionHint?: number): TextPosition | null;
|
|
3502
|
-
/**
|
|
3503
|
-
* Verify that a position correctly points to the exact text
|
|
3504
|
-
* Useful for debugging and validation
|
|
3505
|
-
*/
|
|
3506
|
-
declare function verifyPosition(content: string, position: TextPosition, expectedExact: string): boolean;
|
|
3507
|
-
|
|
3508
|
-
/**
|
|
3509
|
-
* Locale information
|
|
3510
|
-
* Copied from SDK for frontend use
|
|
3511
|
-
*/
|
|
3512
|
-
interface LocaleInfo {
|
|
3513
|
-
code: string;
|
|
3514
|
-
nativeName: string;
|
|
3515
|
-
englishName: string;
|
|
3516
|
-
}
|
|
3517
|
-
declare const LOCALES: readonly LocaleInfo[];
|
|
3518
|
-
/**
|
|
3519
|
-
* Get locale information by code
|
|
3520
|
-
*/
|
|
3521
|
-
declare function getLocaleInfo(code: string | undefined): LocaleInfo | undefined;
|
|
3522
|
-
/**
|
|
3523
|
-
* Get the native name of a language by its locale code
|
|
3524
|
-
*/
|
|
3525
|
-
declare function getLocaleNativeName(code: string | undefined): string | undefined;
|
|
3526
|
-
/**
|
|
3527
|
-
* Get the English name of a language by its locale code
|
|
3528
|
-
*/
|
|
3529
|
-
declare function getLocaleEnglishName(code: string | undefined): string | undefined;
|
|
3530
|
-
/**
|
|
3531
|
-
* Format locale code for display as "Native Name (code)"
|
|
3532
|
-
*/
|
|
3533
|
-
declare function formatLocaleDisplay(code: string | undefined): string | undefined;
|
|
3534
|
-
/**
|
|
3535
|
-
* Get all supported locale codes
|
|
3536
|
-
*/
|
|
3537
|
-
declare function getAllLocaleCodes(): readonly string[];
|
|
3538
|
-
|
|
3539
|
-
/**
|
|
3540
|
-
* Helper functions for working with W3C ResourceDescriptor
|
|
3541
|
-
*/
|
|
3542
|
-
|
|
3543
|
-
type ResourceDescriptor = components['schemas']['ResourceDescriptor'];
|
|
3544
|
-
type Representation = components['schemas']['Representation'];
|
|
3545
|
-
/**
|
|
3546
|
-
* Get the resource ID from @id property
|
|
3547
|
-
*
|
|
3548
|
-
* For internal resources: extracts UUID from "http://localhost:4000/resources/{uuid}"
|
|
3549
|
-
* For external resources: returns undefined
|
|
3550
|
-
*
|
|
3551
|
-
* This is used for routing - the frontend URL should contain only the resource ID,
|
|
3552
|
-
* not the full HTTP URI.
|
|
3553
|
-
*/
|
|
3554
|
-
declare function getResourceId(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3555
|
-
/**
|
|
3556
|
-
* Get the primary representation (first or only representation)
|
|
3557
|
-
*/
|
|
3558
|
-
declare function getPrimaryRepresentation(resource: ResourceDescriptor | undefined): Representation | undefined;
|
|
3559
|
-
/**
|
|
3560
|
-
* Get the media type from the primary representation
|
|
3561
|
-
*/
|
|
3562
|
-
declare function getPrimaryMediaType(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3563
|
-
/**
|
|
3564
|
-
* Get the checksum from the primary representation
|
|
3565
|
-
*/
|
|
3566
|
-
declare function getChecksum(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3567
|
-
/**
|
|
3568
|
-
* Get the language from the primary representation
|
|
3569
|
-
*/
|
|
3570
|
-
declare function getLanguage(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3571
|
-
/**
|
|
3572
|
-
* Get storage URI from primary representation
|
|
3573
|
-
*
|
|
3574
|
-
* @param resource - ResourceDescriptor
|
|
3575
|
-
* @returns Storage URI or undefined
|
|
3576
|
-
*/
|
|
3577
|
-
declare function getStorageUri(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3578
|
-
/**
|
|
3579
|
-
* Get creator agent from wasAttributedTo
|
|
3580
|
-
* Handles both single agent and array of agents
|
|
3581
|
-
*
|
|
3582
|
-
* @param resource - ResourceDescriptor
|
|
3583
|
-
* @returns First agent or undefined
|
|
3584
|
-
*/
|
|
3585
|
-
declare function getCreator(resource: ResourceDescriptor | undefined): components['schemas']['Agent'] | undefined;
|
|
3586
|
-
/**
|
|
3587
|
-
* Get derived-from URI
|
|
3588
|
-
* Handles both single URI and array of URIs
|
|
3589
|
-
*
|
|
3590
|
-
* @param resource - ResourceDescriptor
|
|
3591
|
-
* @returns First derivation URI or undefined
|
|
3592
|
-
*/
|
|
3593
|
-
declare function getDerivedFrom(resource: ResourceDescriptor | undefined): string | undefined;
|
|
3594
|
-
/**
|
|
3595
|
-
* Check if resource is archived (application-specific field)
|
|
3596
|
-
*
|
|
3597
|
-
* @param resource - ResourceDescriptor
|
|
3598
|
-
* @returns True if archived, false otherwise
|
|
3599
|
-
*/
|
|
3600
|
-
declare function isArchived(resource: ResourceDescriptor | undefined): boolean;
|
|
3601
|
-
/**
|
|
3602
|
-
* Get entity types from resource (application-specific field)
|
|
3603
|
-
*
|
|
3604
|
-
* @param resource - ResourceDescriptor
|
|
3605
|
-
* @returns Array of entity types, empty if not set
|
|
3606
|
-
*/
|
|
3607
|
-
declare function getResourceEntityTypes(resource: ResourceDescriptor | undefined): string[];
|
|
3608
|
-
/**
|
|
3609
|
-
* Check if resource is a draft (application-specific field)
|
|
3610
|
-
*
|
|
3611
|
-
* @param resource - ResourceDescriptor
|
|
3612
|
-
* @returns True if draft, false otherwise
|
|
3613
|
-
*/
|
|
3614
|
-
declare function isDraft(resource: ResourceDescriptor | undefined): boolean;
|
|
3615
|
-
/**
|
|
3616
|
-
* Map charset names to Node.js Buffer encoding names
|
|
3617
|
-
* Node.js Buffer.toString() supports: 'utf8', 'utf16le', 'latin1', 'base64', 'hex', 'ascii', 'binary', 'ucs2'
|
|
3618
|
-
*
|
|
3619
|
-
* @param charset - Charset name (e.g., "UTF-8", "ISO-8859-1", "Windows-1252")
|
|
3620
|
-
* @returns Node.js BufferEncoding
|
|
3621
|
-
*/
|
|
3622
|
-
declare function getNodeEncoding(charset: string): BufferEncoding;
|
|
3623
|
-
/**
|
|
3624
|
-
* Decode a representation buffer to string using the correct charset
|
|
3625
|
-
* Extracts charset from media type and uses appropriate encoding
|
|
3626
|
-
*
|
|
3627
|
-
* @param buffer - The raw representation data
|
|
3628
|
-
* @param mediaType - Media type with optional charset (e.g., "text/plain; charset=iso-8859-1")
|
|
3629
|
-
* @returns Decoded string
|
|
3630
|
-
*
|
|
3631
|
-
* @example
|
|
3632
|
-
* ```typescript
|
|
3633
|
-
* const content = decodeRepresentation(buffer, "text/plain; charset=utf-8");
|
|
3634
|
-
* const legacy = decodeRepresentation(buffer, "text/plain; charset=windows-1252");
|
|
3635
|
-
* ```
|
|
3636
|
-
*/
|
|
3637
|
-
declare function decodeRepresentation(buffer: Buffer, mediaType: string): string;
|
|
3638
|
-
|
|
3639
|
-
/**
|
|
3640
|
-
* SVG Utility Functions
|
|
3641
|
-
*
|
|
3642
|
-
* Utilities for creating, parsing, and manipulating W3C-compliant SVG selectors
|
|
3643
|
-
* for image annotation.
|
|
3644
|
-
*/
|
|
3645
|
-
interface Point {
|
|
3646
|
-
x: number;
|
|
3647
|
-
y: number;
|
|
3648
|
-
}
|
|
3649
|
-
interface BoundingBox {
|
|
3650
|
-
x: number;
|
|
3651
|
-
y: number;
|
|
3652
|
-
width: number;
|
|
3653
|
-
height: number;
|
|
3654
|
-
}
|
|
3655
|
-
/**
|
|
3656
|
-
* Create W3C-compliant SVG rectangle selector
|
|
3657
|
-
*/
|
|
3658
|
-
declare function createRectangleSvg(start: Point, end: Point): string;
|
|
3659
|
-
/**
|
|
3660
|
-
* Create W3C-compliant SVG polygon selector
|
|
3661
|
-
*/
|
|
3662
|
-
declare function createPolygonSvg(points: Point[]): string;
|
|
3663
|
-
/**
|
|
3664
|
-
* Create W3C-compliant SVG circle selector
|
|
3665
|
-
*/
|
|
3666
|
-
declare function createCircleSvg(center: Point, radius: number): string;
|
|
3667
|
-
/**
|
|
3668
|
-
* Parse SVG selector to extract shape type and data
|
|
3669
|
-
*/
|
|
3670
|
-
declare function parseSvgSelector(svg: string): {
|
|
3671
|
-
type: 'rect' | 'polygon' | 'circle' | 'path';
|
|
3672
|
-
data: any;
|
|
3673
|
-
} | null;
|
|
3674
|
-
/**
|
|
3675
|
-
* Normalize coordinates from display space to image native resolution
|
|
3676
|
-
*/
|
|
3677
|
-
declare function normalizeCoordinates(point: Point, displayWidth: number, displayHeight: number, imageWidth: number, imageHeight: number): Point;
|
|
3678
|
-
/**
|
|
3679
|
-
* Scale entire SVG selector from display space to image native resolution
|
|
3680
|
-
*/
|
|
3681
|
-
declare function scaleSvgToNative(svg: string, displayWidth: number, displayHeight: number, imageWidth: number, imageHeight: number): string;
|
|
3682
|
-
|
|
3683
|
-
/**
|
|
3684
|
-
* Text context extraction utilities for W3C Web Annotation TextQuoteSelector
|
|
3685
|
-
*
|
|
3686
|
-
* Provides robust prefix/suffix context extraction with word boundary detection
|
|
3687
|
-
* to ensure fuzzy anchoring works correctly when the same text appears multiple times.
|
|
3688
|
-
*
|
|
3689
|
-
* Also provides AI offset validation and correction for handling AI-generated annotations
|
|
3690
|
-
* where the model may return slightly incorrect character offsets.
|
|
3691
|
-
*
|
|
3692
|
-
* @see https://www.w3.org/TR/annotation-model/#text-quote-selector
|
|
3693
|
-
*/
|
|
3694
|
-
|
|
3695
|
-
/**
|
|
3696
|
-
* Extract prefix and suffix context for TextQuoteSelector
|
|
3697
|
-
*
|
|
3698
|
-
* Extracts up to 64 characters before and after the selected text,
|
|
3699
|
-
* extending to word boundaries to avoid cutting words in half.
|
|
3700
|
-
* This ensures prefix/suffix are meaningful context for fuzzy anchoring.
|
|
3701
|
-
*
|
|
3702
|
-
* @param content - Full text content
|
|
3703
|
-
* @param start - Start offset of selection
|
|
3704
|
-
* @param end - End offset of selection
|
|
3705
|
-
* @returns Object with prefix and suffix (undefined if at boundaries)
|
|
3706
|
-
*
|
|
3707
|
-
* @example
|
|
3708
|
-
* ```typescript
|
|
3709
|
-
* const content = "The United States Congress...";
|
|
3710
|
-
* const context = extractContext(content, 4, 17); // "United States"
|
|
3711
|
-
* // Returns: { prefix: "The ", suffix: " Congress..." }
|
|
3712
|
-
* // NOT: { prefix: "nited ", suffix: "gress..." }
|
|
3713
|
-
* ```
|
|
3714
|
-
*/
|
|
3715
|
-
declare function extractContext(content: string, start: number, end: number): {
|
|
3716
|
-
prefix?: string;
|
|
3717
|
-
suffix?: string;
|
|
3718
|
-
};
|
|
3719
|
-
/**
|
|
3720
|
-
* Result of validating and correcting AI-provided annotation offsets
|
|
3721
|
-
*/
|
|
3722
|
-
interface ValidatedAnnotation {
|
|
3723
|
-
start: number;
|
|
3724
|
-
end: number;
|
|
3725
|
-
exact: string;
|
|
3726
|
-
prefix?: string;
|
|
3727
|
-
suffix?: string;
|
|
3728
|
-
corrected: boolean;
|
|
3729
|
-
fuzzyMatched?: boolean;
|
|
3730
|
-
matchQuality?: MatchQuality;
|
|
3731
|
-
}
|
|
3732
|
-
/**
|
|
3733
|
-
* Validate and correct AI-provided annotation offsets with fuzzy matching tolerance
|
|
3734
|
-
*
|
|
3735
|
-
* AI models sometimes return offsets that don't match the actual text position,
|
|
3736
|
-
* or provide text with minor variations (case differences, whitespace, typos).
|
|
3737
|
-
*
|
|
3738
|
-
* This function uses a multi-strategy approach:
|
|
3739
|
-
* 1. Check if AI's offsets are exactly correct
|
|
3740
|
-
* 2. Try exact case-sensitive search
|
|
3741
|
-
* 3. Try case-insensitive search
|
|
3742
|
-
* 4. Try fuzzy matching with Levenshtein distance (5% tolerance)
|
|
3743
|
-
*
|
|
3744
|
-
* This ensures we're maximally tolerant of AI errors while still maintaining
|
|
3745
|
-
* annotation quality and logging what corrections were made.
|
|
3746
|
-
*
|
|
3747
|
-
* @param content - Full text content
|
|
3748
|
-
* @param aiStart - Start offset from AI
|
|
3749
|
-
* @param aiEnd - End offset from AI
|
|
3750
|
-
* @param exact - The exact text that should be at this position (from AI)
|
|
3751
|
-
* @returns Validated annotation with corrected offsets and context
|
|
3752
|
-
* @throws Error if no acceptable match can be found
|
|
3753
|
-
*
|
|
3754
|
-
* @example
|
|
3755
|
-
* ```typescript
|
|
3756
|
-
* // AI said start=1143, but actual text is at 1161
|
|
3757
|
-
* const result = validateAndCorrectOffsets(
|
|
3758
|
-
* content,
|
|
3759
|
-
* 1143,
|
|
3760
|
-
* 1289,
|
|
3761
|
-
* "the question \"whether..."
|
|
3762
|
-
* );
|
|
3763
|
-
* // Returns: { start: 1161, end: 1303, exact: "...", corrected: true, matchQuality: 'exact', ... }
|
|
3764
|
-
* ```
|
|
3765
|
-
*/
|
|
3766
|
-
declare function validateAndCorrectOffsets(content: string, aiStart: number, aiEnd: number, exact: string): ValidatedAnnotation;
|
|
3767
|
-
|
|
3768
|
-
/**
|
|
3769
|
-
* Text encoding utilities for consistent charset handling
|
|
3770
|
-
*
|
|
3771
|
-
* Ensures frontend decoding matches backend decoding by respecting
|
|
3772
|
-
* charset parameters in mediaType (e.g., "text/plain; charset=iso-8859-1")
|
|
3773
|
-
*/
|
|
3774
|
-
/**
|
|
3775
|
-
* Extract charset from mediaType parameter
|
|
3776
|
-
*
|
|
3777
|
-
* @param mediaType - Media type with optional charset (e.g., "text/plain; charset=utf-8")
|
|
3778
|
-
* @returns Charset name in lowercase (defaults to "utf-8")
|
|
3779
|
-
*
|
|
3780
|
-
* @example
|
|
3781
|
-
* extractCharset("text/plain; charset=iso-8859-1") // "iso-8859-1"
|
|
3782
|
-
* extractCharset("text/plain") // "utf-8"
|
|
3783
|
-
*/
|
|
3784
|
-
declare function extractCharset(mediaType: string): string;
|
|
3785
|
-
/**
|
|
3786
|
-
* Decode ArrayBuffer to string using charset from mediaType
|
|
3787
|
-
*
|
|
3788
|
-
* Uses TextDecoder with the charset extracted from mediaType parameter.
|
|
3789
|
-
* This ensures the same character space is used for both annotation creation
|
|
3790
|
-
* (backend) and rendering (frontend).
|
|
3791
|
-
*
|
|
3792
|
-
* @param buffer - Binary data to decode
|
|
3793
|
-
* @param mediaType - Media type with optional charset parameter
|
|
3794
|
-
* @returns Decoded string in the original character space
|
|
3795
|
-
*
|
|
3796
|
-
* @example
|
|
3797
|
-
* const buffer = new Uint8Array([...]);
|
|
3798
|
-
* const text = decodeWithCharset(buffer, "text/plain; charset=iso-8859-1");
|
|
3799
|
-
*/
|
|
3800
|
-
declare function decodeWithCharset(buffer: ArrayBuffer, mediaType: string): string;
|
|
3801
|
-
|
|
3802
|
-
/**
|
|
3803
|
-
* Generic validation utilities for @semiont/api-client
|
|
3804
|
-
*
|
|
3805
|
-
* Pure TypeScript validation with no external dependencies.
|
|
3806
|
-
* Safe to use in any JavaScript environment (Node.js, browser, Deno, etc.)
|
|
3807
|
-
*/
|
|
3808
|
-
/**
|
|
3809
|
-
* Validation result types
|
|
3810
|
-
*/
|
|
3811
|
-
type ValidationSuccess<T> = {
|
|
3812
|
-
success: true;
|
|
3813
|
-
data: T;
|
|
3814
|
-
};
|
|
3815
|
-
type ValidationFailure = {
|
|
3816
|
-
success: false;
|
|
3817
|
-
error: string;
|
|
3818
|
-
details?: string[];
|
|
3819
|
-
};
|
|
3820
|
-
type ValidationResult<T> = ValidationSuccess<T> | ValidationFailure;
|
|
3821
|
-
/**
|
|
3822
|
-
* JWT Token validation
|
|
3823
|
-
*
|
|
3824
|
-
* Validates JWT token format (header.payload.signature).
|
|
3825
|
-
* Does not verify signature - use for format validation only.
|
|
3826
|
-
*/
|
|
3827
|
-
declare const JWTTokenSchema: {
|
|
3828
|
-
parse(token: unknown): string;
|
|
3829
|
-
safeParse(token: unknown): ValidationResult<string>;
|
|
3830
|
-
};
|
|
3831
|
-
/**
|
|
3832
|
-
* Generic validation helper with error formatting
|
|
3833
|
-
*
|
|
3834
|
-
* Wraps any schema's parse method with try/catch and returns ValidationResult.
|
|
3835
|
-
*
|
|
3836
|
-
* @example
|
|
3837
|
-
* ```typescript
|
|
3838
|
-
* const result = validateData(JWTTokenSchema, 'eyJ...');
|
|
3839
|
-
* if (result.success) {
|
|
3840
|
-
* console.log('Valid token:', result.data);
|
|
3841
|
-
* } else {
|
|
3842
|
-
* console.error('Invalid:', result.error);
|
|
3843
|
-
* }
|
|
3844
|
-
* ```
|
|
3845
|
-
*/
|
|
3846
|
-
declare function validateData<T>(schema: {
|
|
3847
|
-
parse(data: unknown): T;
|
|
3848
|
-
}, data: unknown): ValidationResult<T>;
|
|
3849
|
-
/**
|
|
3850
|
-
* Email validation helper
|
|
3851
|
-
*
|
|
3852
|
-
* Validates email format using RFC 5322 simplified regex.
|
|
3853
|
-
*
|
|
3854
|
-
* @param email - Email address to validate
|
|
3855
|
-
* @returns true if valid email format
|
|
3856
|
-
*/
|
|
3857
|
-
declare function isValidEmail(email: string): boolean;
|
|
3858
|
-
|
|
3859
|
-
export { type $defs as $, type AccessToken as A, type BaseUrl as B, type ContentFormat as C, getExactText as D, type EntityType as E, type FragmentSelector as F, type GoogleCredential as G, getAnnotationExactText as H, getPrimarySelector as I, type JobId as J, getTextPositionSelector as K, getTextQuoteSelector as L, type Motivation as M, getSvgSelector as N, getFragmentSelector as O, validateSvgMarkup as P, extractBoundingBox as Q, type ResourceUri as R, type SearchQuery as S, type TextPositionSelector as T, type UserDID as U, type TextPosition as V, type MatchQuality as W, normalizeText as X, findBestTextMatch as Y, findTextWithContext as Z, verifyPosition as _, type AnnotationUri as a, type LocaleInfo as a0, LOCALES as a1, getLocaleInfo as a2, getLocaleNativeName as a3, getLocaleEnglishName as a4, formatLocaleDisplay as a5, getAllLocaleCodes as a6, getResourceId as a7, getPrimaryRepresentation as a8, getPrimaryMediaType as a9, JWTTokenSchema as aA, validateData as aB, isValidEmail as aC, type AuthCode as aD, type MCPToken as aE, email as aF, authCode as aG, googleCredential as aH, accessToken as aI, refreshToken as aJ, mcpToken as aK, cloneToken as aL, jobId as aM, userDID as aN, entityType as aO, searchQuery as aP, baseUrl as aQ, resourceUri as aR, annotationUri as aS, resourceAnnotationUri as aT, getChecksum as aa, getLanguage as ab, getStorageUri as ac, getCreator as ad, getDerivedFrom as ae, isArchived as af, getResourceEntityTypes as ag, isDraft as ah, getNodeEncoding as ai, decodeRepresentation as aj, type Point as ak, type BoundingBox as al, createRectangleSvg as am, createPolygonSvg as an, createCircleSvg as ao, parseSvgSelector as ap, normalizeCoordinates as aq, scaleSvgToNative as ar, extractContext as as, type ValidatedAnnotation as at, validateAndCorrectOffsets as au, extractCharset as av, decodeWithCharset as aw, type ValidationSuccess as ax, type ValidationFailure as ay, type ValidationResult as az, type Email as b, type components as c, type RefreshToken as d, type CloneToken as e, type ResourceAnnotationUri as f, type TextQuoteSelector as g, type SvgSelector as h, type Selector as i, getBodySource as j, getBodyType as k, isBodyResolved as l, getTargetSource as m, getTargetSelector as n, type operations as o, type paths as p, hasTargetSelector as q, isHighlight as r, isReference as s, isAssessment as t, isComment as u, isTag as v, type webhooks as w, getCommentText as x, isStubReference as y, isResolvedReference as z };
|