@semiont/core 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/dist/index.d.ts CHANGED
@@ -1,6 +1,3262 @@
1
- import { ResourceUri, AnnotationUri, ResourceAnnotationUri, components, JobId } from '@semiont/api-client';
1
+ import { Subject } from 'rxjs';
2
2
  import { ErrorObject } from 'ajv';
3
3
 
4
+ /**
5
+ * This file was auto-generated by openapi-typescript.
6
+ * Do not make direct changes to the file.
7
+ */
8
+ interface paths {
9
+ "/resources/{id}": {
10
+ parameters: {
11
+ query?: never;
12
+ header?: never;
13
+ path?: never;
14
+ cookie?: never;
15
+ };
16
+ /**
17
+ * Get Resource by URI (W3C Content Negotiation)
18
+ * @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.
19
+ */
20
+ get: {
21
+ parameters: {
22
+ query?: {
23
+ /** @description Optional view parameter. If set to 'semiont', redirects to frontend viewer. */
24
+ view?: "semiont";
25
+ };
26
+ header?: never;
27
+ path: {
28
+ /** @description Resource ID */
29
+ id: string;
30
+ };
31
+ cookie?: never;
32
+ };
33
+ requestBody?: never;
34
+ responses: {
35
+ /** @description Resource metadata (JSON-LD) or raw representation */
36
+ 200: {
37
+ headers: {
38
+ [name: string]: unknown;
39
+ };
40
+ content: {
41
+ "application/ld+json": components["schemas"]["GetResourceResponse"];
42
+ "text/plain": string;
43
+ "text/markdown": string;
44
+ };
45
+ };
46
+ /** @description Redirect to frontend viewer (when ?view=semiont) */
47
+ 302: {
48
+ headers: {
49
+ [name: string]: unknown;
50
+ };
51
+ content?: never;
52
+ };
53
+ /** @description Resource not found */
54
+ 404: {
55
+ headers: {
56
+ [name: string]: unknown;
57
+ };
58
+ content?: never;
59
+ };
60
+ };
61
+ };
62
+ put?: never;
63
+ post?: never;
64
+ delete?: never;
65
+ options?: never;
66
+ head?: never;
67
+ /**
68
+ * Update Resource
69
+ * @description Update resource metadata (append-only operations - name and content are immutable)
70
+ */
71
+ patch: {
72
+ parameters: {
73
+ query?: never;
74
+ header?: never;
75
+ path: {
76
+ /** @description Resource ID */
77
+ id: string;
78
+ };
79
+ cookie?: never;
80
+ };
81
+ requestBody?: {
82
+ content: {
83
+ "application/json": components["schemas"]["UpdateResourceRequest"];
84
+ };
85
+ };
86
+ responses: {
87
+ /** @description Resource updated successfully */
88
+ 200: {
89
+ headers: {
90
+ [name: string]: unknown;
91
+ };
92
+ content: {
93
+ "application/json": components["schemas"]["GetResourceResponse"];
94
+ };
95
+ };
96
+ /** @description Resource not found */
97
+ 404: {
98
+ headers: {
99
+ [name: string]: unknown;
100
+ };
101
+ content?: never;
102
+ };
103
+ };
104
+ };
105
+ trace?: never;
106
+ };
107
+ "/annotations/{id}": {
108
+ parameters: {
109
+ query?: never;
110
+ header?: never;
111
+ path?: never;
112
+ cookie?: never;
113
+ };
114
+ /**
115
+ * Get Annotation by URI (W3C Content Negotiation)
116
+ * @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.
117
+ */
118
+ get: {
119
+ parameters: {
120
+ query: {
121
+ /** @description Resource ID or URI containing the annotation */
122
+ resourceId: string;
123
+ };
124
+ header?: never;
125
+ path: {
126
+ /** @description Annotation ID */
127
+ id: string;
128
+ };
129
+ cookie?: never;
130
+ };
131
+ requestBody?: never;
132
+ responses: {
133
+ /** @description Annotation representation (JSON-LD) */
134
+ 200: {
135
+ headers: {
136
+ [name: string]: unknown;
137
+ };
138
+ content: {
139
+ "application/ld+json": components["schemas"]["GetAnnotationResponse"];
140
+ };
141
+ };
142
+ /** @description Redirect to frontend (for browsers) */
143
+ 302: {
144
+ headers: {
145
+ [name: string]: unknown;
146
+ };
147
+ content?: never;
148
+ };
149
+ /** @description Missing resourceId parameter */
150
+ 400: {
151
+ headers: {
152
+ [name: string]: unknown;
153
+ };
154
+ content?: never;
155
+ };
156
+ /** @description Annotation not found */
157
+ 404: {
158
+ headers: {
159
+ [name: string]: unknown;
160
+ };
161
+ content?: never;
162
+ };
163
+ };
164
+ };
165
+ put?: never;
166
+ post?: never;
167
+ delete?: never;
168
+ options?: never;
169
+ head?: never;
170
+ patch?: never;
171
+ trace?: never;
172
+ };
173
+ "/api/annotations/{id}/context": {
174
+ parameters: {
175
+ query?: never;
176
+ header?: never;
177
+ path?: never;
178
+ cookie?: never;
179
+ };
180
+ /**
181
+ * Get Annotation Context
182
+ * @description Get the text context around an annotation with configurable before/after window
183
+ */
184
+ get: {
185
+ parameters: {
186
+ query: {
187
+ /** @description Resource ID containing the annotation */
188
+ resourceId: string;
189
+ /** @description Number of characters before the selection */
190
+ contextBefore?: number;
191
+ /** @description Number of characters after the selection */
192
+ contextAfter?: number;
193
+ };
194
+ header?: never;
195
+ path: {
196
+ /** @description Annotation ID */
197
+ id: string;
198
+ };
199
+ cookie?: never;
200
+ };
201
+ requestBody?: never;
202
+ responses: {
203
+ /** @description Annotation context */
204
+ 200: {
205
+ headers: {
206
+ [name: string]: unknown;
207
+ };
208
+ content: {
209
+ "application/json": components["schemas"]["AnnotationContextResponse"];
210
+ };
211
+ };
212
+ /** @description Invalid query parameters */
213
+ 400: {
214
+ headers: {
215
+ [name: string]: unknown;
216
+ };
217
+ content?: never;
218
+ };
219
+ /** @description Authentication required */
220
+ 401: {
221
+ headers: {
222
+ [name: string]: unknown;
223
+ };
224
+ content?: never;
225
+ };
226
+ /** @description Annotation not found */
227
+ 404: {
228
+ headers: {
229
+ [name: string]: unknown;
230
+ };
231
+ content?: never;
232
+ };
233
+ };
234
+ };
235
+ put?: never;
236
+ post?: never;
237
+ delete?: never;
238
+ options?: never;
239
+ head?: never;
240
+ patch?: never;
241
+ trace?: never;
242
+ };
243
+ "/api/annotations/{id}/summary": {
244
+ parameters: {
245
+ query?: never;
246
+ header?: never;
247
+ path?: never;
248
+ cookie?: never;
249
+ };
250
+ /**
251
+ * Get Annotation Summary
252
+ * @description Get an AI-generated summary of the annotation in context
253
+ */
254
+ get: {
255
+ parameters: {
256
+ query: {
257
+ /** @description Resource ID containing the annotation */
258
+ resourceId: string;
259
+ };
260
+ header?: never;
261
+ path: {
262
+ /** @description Annotation ID */
263
+ id: string;
264
+ };
265
+ cookie?: never;
266
+ };
267
+ requestBody?: never;
268
+ responses: {
269
+ /** @description AI-generated annotation summary */
270
+ 200: {
271
+ headers: {
272
+ [name: string]: unknown;
273
+ };
274
+ content: {
275
+ "application/json": components["schemas"]["ContextualSummaryResponse"];
276
+ };
277
+ };
278
+ /** @description Missing resourceId parameter */
279
+ 400: {
280
+ headers: {
281
+ [name: string]: unknown;
282
+ };
283
+ content?: never;
284
+ };
285
+ /** @description Authentication required */
286
+ 401: {
287
+ headers: {
288
+ [name: string]: unknown;
289
+ };
290
+ content?: never;
291
+ };
292
+ /** @description Annotation not found */
293
+ 404: {
294
+ headers: {
295
+ [name: string]: unknown;
296
+ };
297
+ content?: never;
298
+ };
299
+ };
300
+ };
301
+ put?: never;
302
+ post?: never;
303
+ delete?: never;
304
+ options?: never;
305
+ head?: never;
306
+ patch?: never;
307
+ trace?: never;
308
+ };
309
+ "/api/health": {
310
+ parameters: {
311
+ query?: never;
312
+ header?: never;
313
+ path?: never;
314
+ cookie?: never;
315
+ };
316
+ /**
317
+ * Health Check
318
+ * @description Check if the API is operational and database is connected
319
+ */
320
+ get: {
321
+ parameters: {
322
+ query?: never;
323
+ header?: never;
324
+ path?: never;
325
+ cookie?: never;
326
+ };
327
+ requestBody?: never;
328
+ responses: {
329
+ /** @description Health status of the API */
330
+ 200: {
331
+ headers: {
332
+ [name: string]: unknown;
333
+ };
334
+ content: {
335
+ "application/json": components["schemas"]["HealthResponse"];
336
+ };
337
+ };
338
+ };
339
+ };
340
+ put?: never;
341
+ post?: never;
342
+ delete?: never;
343
+ options?: never;
344
+ head?: never;
345
+ patch?: never;
346
+ trace?: never;
347
+ };
348
+ "/api/tokens/password": {
349
+ parameters: {
350
+ query?: never;
351
+ header?: never;
352
+ path?: never;
353
+ cookie?: never;
354
+ };
355
+ get?: never;
356
+ put?: never;
357
+ /**
358
+ * Password Authentication
359
+ * @description Authenticate with email and password for users with password provider
360
+ */
361
+ post: {
362
+ parameters: {
363
+ query?: never;
364
+ header?: never;
365
+ path?: never;
366
+ cookie?: never;
367
+ };
368
+ requestBody: {
369
+ content: {
370
+ "application/json": components["schemas"]["PasswordAuthRequest"];
371
+ };
372
+ };
373
+ responses: {
374
+ /** @description Authentication successful */
375
+ 200: {
376
+ headers: {
377
+ [name: string]: unknown;
378
+ };
379
+ content: {
380
+ "application/json": components["schemas"]["AuthResponse"];
381
+ };
382
+ };
383
+ /** @description Bad request - invalid input or OAuth user attempting password auth */
384
+ 400: {
385
+ headers: {
386
+ [name: string]: unknown;
387
+ };
388
+ content: {
389
+ "application/json": components["schemas"]["ErrorResponse"];
390
+ };
391
+ };
392
+ /** @description Unauthorized - invalid credentials */
393
+ 401: {
394
+ headers: {
395
+ [name: string]: unknown;
396
+ };
397
+ content: {
398
+ "application/json": components["schemas"]["ErrorResponse"];
399
+ };
400
+ };
401
+ /** @description Forbidden - account not active */
402
+ 403: {
403
+ headers: {
404
+ [name: string]: unknown;
405
+ };
406
+ content: {
407
+ "application/json": components["schemas"]["ErrorResponse"];
408
+ };
409
+ };
410
+ };
411
+ };
412
+ delete?: never;
413
+ options?: never;
414
+ head?: never;
415
+ patch?: never;
416
+ trace?: never;
417
+ };
418
+ "/api/tokens/google": {
419
+ parameters: {
420
+ query?: never;
421
+ header?: never;
422
+ path?: never;
423
+ cookie?: never;
424
+ };
425
+ get?: never;
426
+ put?: never;
427
+ /**
428
+ * Google OAuth Authentication
429
+ * @description Authenticate with Google OAuth access token
430
+ */
431
+ post: {
432
+ parameters: {
433
+ query?: never;
434
+ header?: never;
435
+ path?: never;
436
+ cookie?: never;
437
+ };
438
+ requestBody?: {
439
+ content: {
440
+ "application/json": components["schemas"]["GoogleAuthRequest"];
441
+ };
442
+ };
443
+ responses: {
444
+ /** @description Successful authentication */
445
+ 200: {
446
+ headers: {
447
+ [name: string]: unknown;
448
+ };
449
+ content: {
450
+ "application/json": components["schemas"]["AuthResponse"];
451
+ };
452
+ };
453
+ /** @description Invalid request or authentication failed */
454
+ 400: {
455
+ headers: {
456
+ [name: string]: unknown;
457
+ };
458
+ content: {
459
+ "application/json": components["schemas"]["ErrorResponse"];
460
+ };
461
+ };
462
+ };
463
+ };
464
+ delete?: never;
465
+ options?: never;
466
+ head?: never;
467
+ patch?: never;
468
+ trace?: never;
469
+ };
470
+ "/api/tokens/refresh": {
471
+ parameters: {
472
+ query?: never;
473
+ header?: never;
474
+ path?: never;
475
+ cookie?: never;
476
+ };
477
+ get?: never;
478
+ put?: never;
479
+ /**
480
+ * Refresh Access Token
481
+ * @description Exchange a refresh token for a new access token
482
+ */
483
+ post: {
484
+ parameters: {
485
+ query?: never;
486
+ header?: never;
487
+ path?: never;
488
+ cookie?: never;
489
+ };
490
+ requestBody?: {
491
+ content: {
492
+ "application/json": components["schemas"]["TokenRefreshRequest"];
493
+ };
494
+ };
495
+ responses: {
496
+ /** @description New access token generated */
497
+ 200: {
498
+ headers: {
499
+ [name: string]: unknown;
500
+ };
501
+ content: {
502
+ "application/json": components["schemas"]["GoogleAuthRequest"];
503
+ };
504
+ };
505
+ /** @description Invalid or expired refresh token */
506
+ 401: {
507
+ headers: {
508
+ [name: string]: unknown;
509
+ };
510
+ content: {
511
+ "application/json": components["schemas"]["ErrorResponse"];
512
+ };
513
+ };
514
+ };
515
+ };
516
+ delete?: never;
517
+ options?: never;
518
+ head?: never;
519
+ patch?: never;
520
+ trace?: never;
521
+ };
522
+ "/api/tokens/mcp-generate": {
523
+ parameters: {
524
+ query?: never;
525
+ header?: never;
526
+ path?: never;
527
+ cookie?: never;
528
+ };
529
+ get?: never;
530
+ put?: never;
531
+ /**
532
+ * Generate MCP Token
533
+ * @description Generate a short-lived token for MCP server
534
+ */
535
+ post: {
536
+ parameters: {
537
+ query?: never;
538
+ header?: never;
539
+ path?: never;
540
+ cookie?: never;
541
+ };
542
+ requestBody?: never;
543
+ responses: {
544
+ /** @description MCP token generated */
545
+ 200: {
546
+ headers: {
547
+ [name: string]: unknown;
548
+ };
549
+ content: {
550
+ "application/json": components["schemas"]["MCPGenerateResponse"];
551
+ };
552
+ };
553
+ /** @description Unauthorized */
554
+ 401: {
555
+ headers: {
556
+ [name: string]: unknown;
557
+ };
558
+ content: {
559
+ "application/json": components["schemas"]["ErrorResponse"];
560
+ };
561
+ };
562
+ };
563
+ };
564
+ delete?: never;
565
+ options?: never;
566
+ head?: never;
567
+ patch?: never;
568
+ trace?: never;
569
+ };
570
+ "/api/users/me": {
571
+ parameters: {
572
+ query?: never;
573
+ header?: never;
574
+ path?: never;
575
+ cookie?: never;
576
+ };
577
+ /**
578
+ * Get Current User
579
+ * @description Get information about the authenticated user
580
+ */
581
+ get: {
582
+ parameters: {
583
+ query?: never;
584
+ header?: never;
585
+ path?: never;
586
+ cookie?: never;
587
+ };
588
+ requestBody?: never;
589
+ responses: {
590
+ /** @description User information */
591
+ 200: {
592
+ headers: {
593
+ [name: string]: unknown;
594
+ };
595
+ content: {
596
+ "application/json": components["schemas"]["UserResponse"];
597
+ };
598
+ };
599
+ /** @description Unauthorized */
600
+ 401: {
601
+ headers: {
602
+ [name: string]: unknown;
603
+ };
604
+ content: {
605
+ "application/json": components["schemas"]["ErrorResponse"];
606
+ };
607
+ };
608
+ };
609
+ };
610
+ put?: never;
611
+ post?: never;
612
+ delete?: never;
613
+ options?: never;
614
+ head?: never;
615
+ patch?: never;
616
+ trace?: never;
617
+ };
618
+ "/api/users/accept-terms": {
619
+ parameters: {
620
+ query?: never;
621
+ header?: never;
622
+ path?: never;
623
+ cookie?: never;
624
+ };
625
+ get?: never;
626
+ put?: never;
627
+ /**
628
+ * Accept Terms
629
+ * @description Mark terms as accepted for the current user
630
+ */
631
+ post: {
632
+ parameters: {
633
+ query?: never;
634
+ header?: never;
635
+ path?: never;
636
+ cookie?: never;
637
+ };
638
+ requestBody?: never;
639
+ responses: {
640
+ /** @description Terms accepted successfully */
641
+ 200: {
642
+ headers: {
643
+ [name: string]: unknown;
644
+ };
645
+ content: {
646
+ "application/json": components["schemas"]["AcceptTermsResponse"];
647
+ };
648
+ };
649
+ /** @description Unauthorized */
650
+ 401: {
651
+ headers: {
652
+ [name: string]: unknown;
653
+ };
654
+ content: {
655
+ "application/json": components["schemas"]["ErrorResponse"];
656
+ };
657
+ };
658
+ };
659
+ };
660
+ delete?: never;
661
+ options?: never;
662
+ head?: never;
663
+ patch?: never;
664
+ trace?: never;
665
+ };
666
+ "/api/users/logout": {
667
+ parameters: {
668
+ query?: never;
669
+ header?: never;
670
+ path?: never;
671
+ cookie?: never;
672
+ };
673
+ get?: never;
674
+ put?: never;
675
+ /**
676
+ * Logout
677
+ * @description Logout the current user
678
+ */
679
+ post: {
680
+ parameters: {
681
+ query?: never;
682
+ header?: never;
683
+ path?: never;
684
+ cookie?: never;
685
+ };
686
+ requestBody?: never;
687
+ responses: {
688
+ /** @description Logged out successfully */
689
+ 200: {
690
+ headers: {
691
+ [name: string]: unknown;
692
+ };
693
+ content: {
694
+ "application/json": components["schemas"]["AcceptTermsResponse"];
695
+ };
696
+ };
697
+ };
698
+ };
699
+ delete?: never;
700
+ options?: never;
701
+ head?: never;
702
+ patch?: never;
703
+ trace?: never;
704
+ };
705
+ "/api/status": {
706
+ parameters: {
707
+ query?: never;
708
+ header?: never;
709
+ path?: never;
710
+ cookie?: never;
711
+ };
712
+ /**
713
+ * Get Service Status
714
+ * @description Get service status and feature availability
715
+ */
716
+ get: {
717
+ parameters: {
718
+ query?: never;
719
+ header?: never;
720
+ path?: never;
721
+ cookie?: never;
722
+ };
723
+ requestBody?: never;
724
+ responses: {
725
+ /** @description Service status information */
726
+ 200: {
727
+ headers: {
728
+ [name: string]: unknown;
729
+ };
730
+ content: {
731
+ "application/json": components["schemas"]["StatusResponse"];
732
+ };
733
+ };
734
+ /** @description Unauthorized */
735
+ 401: {
736
+ headers: {
737
+ [name: string]: unknown;
738
+ };
739
+ content: {
740
+ "application/json": components["schemas"]["ErrorResponse"];
741
+ };
742
+ };
743
+ };
744
+ };
745
+ put?: never;
746
+ post?: never;
747
+ delete?: never;
748
+ options?: never;
749
+ head?: never;
750
+ patch?: never;
751
+ trace?: never;
752
+ };
753
+ "/api/admin/users": {
754
+ parameters: {
755
+ query?: never;
756
+ header?: never;
757
+ path?: never;
758
+ cookie?: never;
759
+ };
760
+ /**
761
+ * List All Users
762
+ * @description Get a list of all users (admin only)
763
+ */
764
+ get: {
765
+ parameters: {
766
+ query?: never;
767
+ header?: never;
768
+ path?: never;
769
+ cookie?: never;
770
+ };
771
+ requestBody?: never;
772
+ responses: {
773
+ /** @description List of users */
774
+ 200: {
775
+ headers: {
776
+ [name: string]: unknown;
777
+ };
778
+ content: {
779
+ "application/json": components["schemas"]["AdminUsersListResponse"];
780
+ };
781
+ };
782
+ /** @description Unauthorized */
783
+ 401: {
784
+ headers: {
785
+ [name: string]: unknown;
786
+ };
787
+ content: {
788
+ "application/json": components["schemas"]["ErrorResponse"];
789
+ };
790
+ };
791
+ /** @description Forbidden - Admin access required */
792
+ 403: {
793
+ headers: {
794
+ [name: string]: unknown;
795
+ };
796
+ content: {
797
+ "application/json": components["schemas"]["ErrorResponse"];
798
+ };
799
+ };
800
+ };
801
+ };
802
+ put?: never;
803
+ post?: never;
804
+ delete?: never;
805
+ options?: never;
806
+ head?: never;
807
+ patch?: never;
808
+ trace?: never;
809
+ };
810
+ "/api/admin/users/stats": {
811
+ parameters: {
812
+ query?: never;
813
+ header?: never;
814
+ path?: never;
815
+ cookie?: never;
816
+ };
817
+ /**
818
+ * User Statistics
819
+ * @description Get user statistics (admin only)
820
+ */
821
+ get: {
822
+ parameters: {
823
+ query?: never;
824
+ header?: never;
825
+ path?: never;
826
+ cookie?: never;
827
+ };
828
+ requestBody?: never;
829
+ responses: {
830
+ /** @description User statistics */
831
+ 200: {
832
+ headers: {
833
+ [name: string]: unknown;
834
+ };
835
+ content: {
836
+ "application/json": components["schemas"]["AdminUserStatsResponse"];
837
+ };
838
+ };
839
+ /** @description Unauthorized */
840
+ 401: {
841
+ headers: {
842
+ [name: string]: unknown;
843
+ };
844
+ content: {
845
+ "application/json": components["schemas"]["ErrorResponse"];
846
+ };
847
+ };
848
+ /** @description Forbidden - Admin access required */
849
+ 403: {
850
+ headers: {
851
+ [name: string]: unknown;
852
+ };
853
+ content: {
854
+ "application/json": components["schemas"]["ErrorResponse"];
855
+ };
856
+ };
857
+ };
858
+ };
859
+ put?: never;
860
+ post?: never;
861
+ delete?: never;
862
+ options?: never;
863
+ head?: never;
864
+ patch?: never;
865
+ trace?: never;
866
+ };
867
+ "/api/admin/users/{id}": {
868
+ parameters: {
869
+ query?: never;
870
+ header?: never;
871
+ path?: never;
872
+ cookie?: never;
873
+ };
874
+ get?: never;
875
+ put?: never;
876
+ post?: never;
877
+ /**
878
+ * Delete User
879
+ * @description Delete a user account (admin only, cannot delete own account)
880
+ */
881
+ delete: {
882
+ parameters: {
883
+ query?: never;
884
+ header?: never;
885
+ path: {
886
+ id: string;
887
+ };
888
+ cookie?: never;
889
+ };
890
+ requestBody?: never;
891
+ responses: {
892
+ /** @description User deleted successfully */
893
+ 200: {
894
+ headers: {
895
+ [name: string]: unknown;
896
+ };
897
+ content: {
898
+ "application/json": components["schemas"]["AcceptTermsResponse"];
899
+ };
900
+ };
901
+ /** @description Cannot delete own account */
902
+ 400: {
903
+ headers: {
904
+ [name: string]: unknown;
905
+ };
906
+ content: {
907
+ "application/json": components["schemas"]["ErrorResponse"];
908
+ };
909
+ };
910
+ /** @description Unauthorized */
911
+ 401: {
912
+ headers: {
913
+ [name: string]: unknown;
914
+ };
915
+ content: {
916
+ "application/json": components["schemas"]["ErrorResponse"];
917
+ };
918
+ };
919
+ /** @description Forbidden - Admin access required */
920
+ 403: {
921
+ headers: {
922
+ [name: string]: unknown;
923
+ };
924
+ content: {
925
+ "application/json": components["schemas"]["ErrorResponse"];
926
+ };
927
+ };
928
+ /** @description User not found */
929
+ 404: {
930
+ headers: {
931
+ [name: string]: unknown;
932
+ };
933
+ content: {
934
+ "application/json": components["schemas"]["ErrorResponse"];
935
+ };
936
+ };
937
+ };
938
+ };
939
+ options?: never;
940
+ head?: never;
941
+ /**
942
+ * Update User
943
+ * @description Update user properties (admin only)
944
+ */
945
+ patch: {
946
+ parameters: {
947
+ query?: never;
948
+ header?: never;
949
+ path: {
950
+ id: string;
951
+ };
952
+ cookie?: never;
953
+ };
954
+ requestBody?: {
955
+ content: {
956
+ "application/json": components["schemas"]["UpdateUserRequest"];
957
+ };
958
+ };
959
+ responses: {
960
+ /** @description User updated successfully */
961
+ 200: {
962
+ headers: {
963
+ [name: string]: unknown;
964
+ };
965
+ content: {
966
+ "application/json": components["schemas"]["AdminUpdateUserResponse"];
967
+ };
968
+ };
969
+ /** @description Invalid request */
970
+ 400: {
971
+ headers: {
972
+ [name: string]: unknown;
973
+ };
974
+ content: {
975
+ "application/json": components["schemas"]["ErrorResponse"];
976
+ };
977
+ };
978
+ /** @description Unauthorized */
979
+ 401: {
980
+ headers: {
981
+ [name: string]: unknown;
982
+ };
983
+ content: {
984
+ "application/json": components["schemas"]["ErrorResponse"];
985
+ };
986
+ };
987
+ /** @description Forbidden - Admin access required */
988
+ 403: {
989
+ headers: {
990
+ [name: string]: unknown;
991
+ };
992
+ content: {
993
+ "application/json": components["schemas"]["ErrorResponse"];
994
+ };
995
+ };
996
+ /** @description User not found */
997
+ 404: {
998
+ headers: {
999
+ [name: string]: unknown;
1000
+ };
1001
+ content: {
1002
+ "application/json": components["schemas"]["ErrorResponse"];
1003
+ };
1004
+ };
1005
+ };
1006
+ };
1007
+ trace?: never;
1008
+ };
1009
+ "/api/admin/oauth/config": {
1010
+ parameters: {
1011
+ query?: never;
1012
+ header?: never;
1013
+ path?: never;
1014
+ cookie?: never;
1015
+ };
1016
+ /**
1017
+ * Get OAuth Configuration
1018
+ * @description Get OAuth provider configuration (admin only, read-only)
1019
+ */
1020
+ get: {
1021
+ parameters: {
1022
+ query?: never;
1023
+ header?: never;
1024
+ path?: never;
1025
+ cookie?: never;
1026
+ };
1027
+ requestBody?: never;
1028
+ responses: {
1029
+ /** @description OAuth configuration */
1030
+ 200: {
1031
+ headers: {
1032
+ [name: string]: unknown;
1033
+ };
1034
+ content: {
1035
+ "application/json": components["schemas"]["OAuthConfigResponse"];
1036
+ };
1037
+ };
1038
+ /** @description Unauthorized */
1039
+ 401: {
1040
+ headers: {
1041
+ [name: string]: unknown;
1042
+ };
1043
+ content: {
1044
+ "application/json": components["schemas"]["ErrorResponse"];
1045
+ };
1046
+ };
1047
+ /** @description Forbidden - Admin access required */
1048
+ 403: {
1049
+ headers: {
1050
+ [name: string]: unknown;
1051
+ };
1052
+ content: {
1053
+ "application/json": components["schemas"]["ErrorResponse"];
1054
+ };
1055
+ };
1056
+ };
1057
+ };
1058
+ put?: never;
1059
+ post?: never;
1060
+ delete?: never;
1061
+ options?: never;
1062
+ head?: never;
1063
+ patch?: never;
1064
+ trace?: never;
1065
+ };
1066
+ "/resources": {
1067
+ parameters: {
1068
+ query?: never;
1069
+ header?: never;
1070
+ path?: never;
1071
+ cookie?: never;
1072
+ };
1073
+ /**
1074
+ * List Resources
1075
+ * @description List all resources with optional filters
1076
+ */
1077
+ get: {
1078
+ parameters: {
1079
+ query?: {
1080
+ offset?: number | null;
1081
+ limit?: number | null;
1082
+ entityType?: string;
1083
+ archived?: "true" | "false" | boolean;
1084
+ search?: string;
1085
+ /** @description Search query */
1086
+ q?: string;
1087
+ };
1088
+ header?: never;
1089
+ path?: never;
1090
+ cookie?: never;
1091
+ };
1092
+ requestBody?: never;
1093
+ responses: {
1094
+ /** @description Resources listed successfully */
1095
+ 200: {
1096
+ headers: {
1097
+ [name: string]: unknown;
1098
+ };
1099
+ content: {
1100
+ "application/json": components["schemas"]["ListResourcesResponse"];
1101
+ };
1102
+ };
1103
+ };
1104
+ };
1105
+ put?: never;
1106
+ /**
1107
+ * Create Resource
1108
+ * @description Create a new resource
1109
+ */
1110
+ post: {
1111
+ parameters: {
1112
+ query?: never;
1113
+ header?: never;
1114
+ path?: never;
1115
+ cookie?: never;
1116
+ };
1117
+ requestBody: {
1118
+ content: {
1119
+ "multipart/form-data": {
1120
+ /** @description Resource name */
1121
+ name: string;
1122
+ /**
1123
+ * Format: binary
1124
+ * @description Binary content of the resource
1125
+ */
1126
+ file: string;
1127
+ /** @description MIME type (e.g., text/markdown, image/png) */
1128
+ format: string;
1129
+ /** @description JSON-encoded array of entity types */
1130
+ entityTypes?: string;
1131
+ /** @description ISO 639-1 language code */
1132
+ language?: string;
1133
+ /** @description How the resource was created */
1134
+ creationMethod?: string;
1135
+ /** @description Source annotation ID (for generated resources) */
1136
+ sourceAnnotationId?: string;
1137
+ /** @description Source resource ID (for cloned resources) */
1138
+ sourceResourceId?: string;
1139
+ };
1140
+ };
1141
+ };
1142
+ responses: {
1143
+ /** @description Resource created successfully */
1144
+ 201: {
1145
+ headers: {
1146
+ [name: string]: unknown;
1147
+ };
1148
+ content: {
1149
+ "application/json": components["schemas"]["CreateResourceResponse"];
1150
+ };
1151
+ };
1152
+ };
1153
+ };
1154
+ delete?: never;
1155
+ options?: never;
1156
+ head?: never;
1157
+ patch?: never;
1158
+ trace?: never;
1159
+ };
1160
+ "/resources/{id}/detect-annotations-stream": {
1161
+ parameters: {
1162
+ query?: never;
1163
+ header?: never;
1164
+ path?: never;
1165
+ cookie?: never;
1166
+ };
1167
+ get?: never;
1168
+ put?: never;
1169
+ /**
1170
+ * Detect Annotations with Progress (SSE)
1171
+ * @description Stream real-time entity detection progress via Server-Sent Events
1172
+ */
1173
+ post: {
1174
+ parameters: {
1175
+ query?: never;
1176
+ header?: never;
1177
+ path: {
1178
+ id: string;
1179
+ };
1180
+ cookie?: never;
1181
+ };
1182
+ requestBody?: {
1183
+ content: {
1184
+ "application/json": components["schemas"]["DetectReferencesStreamRequest"];
1185
+ };
1186
+ };
1187
+ responses: {
1188
+ /** @description SSE stream opened successfully */
1189
+ 200: {
1190
+ headers: {
1191
+ [name: string]: unknown;
1192
+ };
1193
+ content: {
1194
+ "text/event-stream": components["schemas"]["EventStreamResponse"];
1195
+ };
1196
+ };
1197
+ /** @description Authentication required */
1198
+ 401: {
1199
+ headers: {
1200
+ [name: string]: unknown;
1201
+ };
1202
+ content?: never;
1203
+ };
1204
+ /** @description Resource not found */
1205
+ 404: {
1206
+ headers: {
1207
+ [name: string]: unknown;
1208
+ };
1209
+ content?: never;
1210
+ };
1211
+ };
1212
+ };
1213
+ delete?: never;
1214
+ options?: never;
1215
+ head?: never;
1216
+ patch?: never;
1217
+ trace?: never;
1218
+ };
1219
+ "/resources/{id}/detect-highlights-stream": {
1220
+ parameters: {
1221
+ query?: never;
1222
+ header?: never;
1223
+ path?: never;
1224
+ cookie?: never;
1225
+ };
1226
+ get?: never;
1227
+ put?: never;
1228
+ /**
1229
+ * Detect Highlights with Progress (SSE)
1230
+ * @description Stream real-time highlight detection progress via Server-Sent Events
1231
+ */
1232
+ post: {
1233
+ parameters: {
1234
+ query?: never;
1235
+ header?: never;
1236
+ path: {
1237
+ id: string;
1238
+ };
1239
+ cookie?: never;
1240
+ };
1241
+ requestBody?: {
1242
+ content: {
1243
+ "application/json": components["schemas"]["DetectHighlightsStreamRequest"];
1244
+ };
1245
+ };
1246
+ responses: {
1247
+ /** @description SSE stream opened successfully */
1248
+ 200: {
1249
+ headers: {
1250
+ [name: string]: unknown;
1251
+ };
1252
+ content: {
1253
+ "text/event-stream": components["schemas"]["EventStreamResponse"];
1254
+ };
1255
+ };
1256
+ /** @description Authentication required */
1257
+ 401: {
1258
+ headers: {
1259
+ [name: string]: unknown;
1260
+ };
1261
+ content?: never;
1262
+ };
1263
+ /** @description Resource not found */
1264
+ 404: {
1265
+ headers: {
1266
+ [name: string]: unknown;
1267
+ };
1268
+ content?: never;
1269
+ };
1270
+ };
1271
+ };
1272
+ delete?: never;
1273
+ options?: never;
1274
+ head?: never;
1275
+ patch?: never;
1276
+ trace?: never;
1277
+ };
1278
+ "/resources/{id}/detect-assessments-stream": {
1279
+ parameters: {
1280
+ query?: never;
1281
+ header?: never;
1282
+ path?: never;
1283
+ cookie?: never;
1284
+ };
1285
+ get?: never;
1286
+ put?: never;
1287
+ /**
1288
+ * Detect Assessments with Progress (SSE)
1289
+ * @description Stream real-time assessment detection progress via Server-Sent Events
1290
+ */
1291
+ post: {
1292
+ parameters: {
1293
+ query?: never;
1294
+ header?: never;
1295
+ path: {
1296
+ id: string;
1297
+ };
1298
+ cookie?: never;
1299
+ };
1300
+ requestBody?: {
1301
+ content: {
1302
+ "application/json": components["schemas"]["DetectAssessmentsStreamRequest"];
1303
+ };
1304
+ };
1305
+ responses: {
1306
+ /** @description SSE stream opened successfully */
1307
+ 200: {
1308
+ headers: {
1309
+ [name: string]: unknown;
1310
+ };
1311
+ content: {
1312
+ "text/event-stream": components["schemas"]["EventStreamResponse"];
1313
+ };
1314
+ };
1315
+ /** @description Authentication required */
1316
+ 401: {
1317
+ headers: {
1318
+ [name: string]: unknown;
1319
+ };
1320
+ content?: never;
1321
+ };
1322
+ /** @description Resource not found */
1323
+ 404: {
1324
+ headers: {
1325
+ [name: string]: unknown;
1326
+ };
1327
+ content?: never;
1328
+ };
1329
+ };
1330
+ };
1331
+ delete?: never;
1332
+ options?: never;
1333
+ head?: never;
1334
+ patch?: never;
1335
+ trace?: never;
1336
+ };
1337
+ "/resources/{id}/detect-comments-stream": {
1338
+ parameters: {
1339
+ query?: never;
1340
+ header?: never;
1341
+ path?: never;
1342
+ cookie?: never;
1343
+ };
1344
+ get?: never;
1345
+ put?: never;
1346
+ /**
1347
+ * Detect Comments with Progress (SSE)
1348
+ * @description Stream real-time comment detection progress via Server-Sent Events
1349
+ */
1350
+ post: {
1351
+ parameters: {
1352
+ query?: never;
1353
+ header?: never;
1354
+ path: {
1355
+ id: string;
1356
+ };
1357
+ cookie?: never;
1358
+ };
1359
+ requestBody?: {
1360
+ content: {
1361
+ "application/json": components["schemas"]["DetectCommentsStreamRequest"];
1362
+ };
1363
+ };
1364
+ responses: {
1365
+ /** @description SSE stream opened successfully */
1366
+ 200: {
1367
+ headers: {
1368
+ [name: string]: unknown;
1369
+ };
1370
+ content: {
1371
+ "text/event-stream": components["schemas"]["EventStreamResponse"];
1372
+ };
1373
+ };
1374
+ /** @description Authentication required */
1375
+ 401: {
1376
+ headers: {
1377
+ [name: string]: unknown;
1378
+ };
1379
+ content?: never;
1380
+ };
1381
+ /** @description Resource not found */
1382
+ 404: {
1383
+ headers: {
1384
+ [name: string]: unknown;
1385
+ };
1386
+ content?: never;
1387
+ };
1388
+ };
1389
+ };
1390
+ delete?: never;
1391
+ options?: never;
1392
+ head?: never;
1393
+ patch?: never;
1394
+ trace?: never;
1395
+ };
1396
+ "/resources/{id}/detect-tags-stream": {
1397
+ parameters: {
1398
+ query?: never;
1399
+ header?: never;
1400
+ path?: never;
1401
+ cookie?: never;
1402
+ };
1403
+ get?: never;
1404
+ put?: never;
1405
+ /**
1406
+ * Detect Tags with Progress (SSE)
1407
+ * @description Stream real-time tag detection progress via Server-Sent Events. Identifies passages serving specific structural roles (IRAC, IMRAD, Toulmin frameworks).
1408
+ */
1409
+ post: {
1410
+ parameters: {
1411
+ query?: never;
1412
+ header?: never;
1413
+ path: {
1414
+ id: string;
1415
+ };
1416
+ cookie?: never;
1417
+ };
1418
+ requestBody?: {
1419
+ content: {
1420
+ "application/json": components["schemas"]["DetectTagsStreamRequest"];
1421
+ };
1422
+ };
1423
+ responses: {
1424
+ /** @description SSE stream opened successfully */
1425
+ 200: {
1426
+ headers: {
1427
+ [name: string]: unknown;
1428
+ };
1429
+ content: {
1430
+ "text/event-stream": components["schemas"]["EventStreamResponse"];
1431
+ };
1432
+ };
1433
+ /** @description Authentication required */
1434
+ 401: {
1435
+ headers: {
1436
+ [name: string]: unknown;
1437
+ };
1438
+ content?: never;
1439
+ };
1440
+ /** @description Resource not found */
1441
+ 404: {
1442
+ headers: {
1443
+ [name: string]: unknown;
1444
+ };
1445
+ content?: never;
1446
+ };
1447
+ };
1448
+ };
1449
+ delete?: never;
1450
+ options?: never;
1451
+ head?: never;
1452
+ patch?: never;
1453
+ trace?: never;
1454
+ };
1455
+ "/resources/{id}/llm-context": {
1456
+ parameters: {
1457
+ query?: never;
1458
+ header?: never;
1459
+ path?: never;
1460
+ cookie?: never;
1461
+ };
1462
+ /**
1463
+ * Get Resource LLM Context
1464
+ * @description Get resource with full context for LLM processing
1465
+ */
1466
+ get: {
1467
+ parameters: {
1468
+ query?: {
1469
+ depth?: number;
1470
+ maxResources?: number;
1471
+ includeContent?: "true" | "false" | boolean;
1472
+ includeSummary?: "true" | "false" | boolean;
1473
+ };
1474
+ header?: never;
1475
+ path: {
1476
+ id: string;
1477
+ };
1478
+ cookie?: never;
1479
+ };
1480
+ requestBody?: never;
1481
+ responses: {
1482
+ /** @description LLM context */
1483
+ 200: {
1484
+ headers: {
1485
+ [name: string]: unknown;
1486
+ };
1487
+ content: {
1488
+ "application/json": components["schemas"]["ResourceLLMContextResponse"];
1489
+ };
1490
+ };
1491
+ };
1492
+ };
1493
+ put?: never;
1494
+ post?: never;
1495
+ delete?: never;
1496
+ options?: never;
1497
+ head?: never;
1498
+ patch?: never;
1499
+ trace?: never;
1500
+ };
1501
+ "/resources/{resourceId}/annotations/{annotationId}/llm-context": {
1502
+ parameters: {
1503
+ query?: never;
1504
+ header?: never;
1505
+ path?: never;
1506
+ cookie?: never;
1507
+ };
1508
+ /**
1509
+ * Get Annotation LLM Context
1510
+ * @description Get annotation with full context for LLM processing
1511
+ */
1512
+ get: {
1513
+ parameters: {
1514
+ query?: {
1515
+ includeSourceContext?: "true" | "false" | boolean;
1516
+ includeTargetContext?: "true" | "false" | boolean;
1517
+ contextWindow?: number;
1518
+ };
1519
+ header?: never;
1520
+ path: {
1521
+ resourceId: string;
1522
+ annotationId: string;
1523
+ };
1524
+ cookie?: never;
1525
+ };
1526
+ requestBody?: never;
1527
+ responses: {
1528
+ /** @description Annotation LLM context */
1529
+ 200: {
1530
+ headers: {
1531
+ [name: string]: unknown;
1532
+ };
1533
+ content: {
1534
+ "application/json": components["schemas"]["AnnotationLLMContextResponse"];
1535
+ };
1536
+ };
1537
+ };
1538
+ };
1539
+ put?: never;
1540
+ post?: never;
1541
+ delete?: never;
1542
+ options?: never;
1543
+ head?: never;
1544
+ patch?: never;
1545
+ trace?: never;
1546
+ };
1547
+ "/resources/{id}/referenced-by": {
1548
+ parameters: {
1549
+ query?: never;
1550
+ header?: never;
1551
+ path?: never;
1552
+ cookie?: never;
1553
+ };
1554
+ /**
1555
+ * Get Referenced By
1556
+ * @description Get resources that reference this resource
1557
+ */
1558
+ get: {
1559
+ parameters: {
1560
+ query?: {
1561
+ /** @description Filter incoming references by W3C motivation type (e.g., 'linking', 'commenting', 'highlighting') */
1562
+ motivation?: components["schemas"]["Motivation"];
1563
+ };
1564
+ header?: never;
1565
+ path: {
1566
+ id: string;
1567
+ };
1568
+ cookie?: never;
1569
+ };
1570
+ requestBody?: never;
1571
+ responses: {
1572
+ /** @description Resources that reference this resource */
1573
+ 200: {
1574
+ headers: {
1575
+ [name: string]: unknown;
1576
+ };
1577
+ content: {
1578
+ "application/json": components["schemas"]["GetReferencedByResponse"];
1579
+ };
1580
+ };
1581
+ };
1582
+ };
1583
+ put?: never;
1584
+ post?: never;
1585
+ delete?: never;
1586
+ options?: never;
1587
+ head?: never;
1588
+ patch?: never;
1589
+ trace?: never;
1590
+ };
1591
+ "/api/clone-tokens/{token}": {
1592
+ parameters: {
1593
+ query?: never;
1594
+ header?: never;
1595
+ path?: never;
1596
+ cookie?: never;
1597
+ };
1598
+ /**
1599
+ * Get Resource by Clone Token
1600
+ * @description Retrieve a resource using a clone token
1601
+ */
1602
+ get: {
1603
+ parameters: {
1604
+ query?: never;
1605
+ header?: never;
1606
+ path: {
1607
+ token: string;
1608
+ };
1609
+ cookie?: never;
1610
+ };
1611
+ requestBody?: never;
1612
+ responses: {
1613
+ /** @description Resource retrieved successfully */
1614
+ 200: {
1615
+ headers: {
1616
+ [name: string]: unknown;
1617
+ };
1618
+ content: {
1619
+ "application/json": components["schemas"]["GetResourceByTokenResponse"];
1620
+ };
1621
+ };
1622
+ };
1623
+ };
1624
+ put?: never;
1625
+ post?: never;
1626
+ delete?: never;
1627
+ options?: never;
1628
+ head?: never;
1629
+ patch?: never;
1630
+ trace?: never;
1631
+ };
1632
+ "/api/clone-tokens/create-resource": {
1633
+ parameters: {
1634
+ query?: never;
1635
+ header?: never;
1636
+ path?: never;
1637
+ cookie?: never;
1638
+ };
1639
+ get?: never;
1640
+ put?: never;
1641
+ /**
1642
+ * Create Resource from Clone Token
1643
+ * @description Create a new resource using a clone token
1644
+ */
1645
+ post: {
1646
+ parameters: {
1647
+ query?: never;
1648
+ header?: never;
1649
+ path?: never;
1650
+ cookie?: never;
1651
+ };
1652
+ requestBody?: {
1653
+ content: {
1654
+ "application/json": components["schemas"]["CreateResourceFromTokenRequest"];
1655
+ };
1656
+ };
1657
+ responses: {
1658
+ /** @description Resource created successfully */
1659
+ 201: {
1660
+ headers: {
1661
+ [name: string]: unknown;
1662
+ };
1663
+ content: {
1664
+ "application/json": components["schemas"]["CreateResourceResponse"];
1665
+ };
1666
+ };
1667
+ };
1668
+ };
1669
+ delete?: never;
1670
+ options?: never;
1671
+ head?: never;
1672
+ patch?: never;
1673
+ trace?: never;
1674
+ };
1675
+ "/resources/{id}/clone-with-token": {
1676
+ parameters: {
1677
+ query?: never;
1678
+ header?: never;
1679
+ path?: never;
1680
+ cookie?: never;
1681
+ };
1682
+ get?: never;
1683
+ put?: never;
1684
+ /**
1685
+ * Clone Resource with Token
1686
+ * @description Generate a temporary token for cloning a resource
1687
+ */
1688
+ post: {
1689
+ parameters: {
1690
+ query?: never;
1691
+ header?: never;
1692
+ path: {
1693
+ id: string;
1694
+ };
1695
+ cookie?: never;
1696
+ };
1697
+ requestBody?: never;
1698
+ responses: {
1699
+ /** @description Clone token generated successfully */
1700
+ 200: {
1701
+ headers: {
1702
+ [name: string]: unknown;
1703
+ };
1704
+ content: {
1705
+ "application/json": components["schemas"]["CloneResourceWithTokenResponse"];
1706
+ };
1707
+ };
1708
+ };
1709
+ };
1710
+ delete?: never;
1711
+ options?: never;
1712
+ head?: never;
1713
+ patch?: never;
1714
+ trace?: never;
1715
+ };
1716
+ "/resources/{id}/annotations": {
1717
+ parameters: {
1718
+ query?: never;
1719
+ header?: never;
1720
+ path?: never;
1721
+ cookie?: never;
1722
+ };
1723
+ /**
1724
+ * Get Resource Annotations
1725
+ * @description Get all annotations (both highlights and references) in a resource
1726
+ */
1727
+ get: {
1728
+ parameters: {
1729
+ query?: never;
1730
+ header?: never;
1731
+ path: {
1732
+ id: string;
1733
+ };
1734
+ cookie?: never;
1735
+ };
1736
+ requestBody?: never;
1737
+ responses: {
1738
+ /** @description Resource annotations */
1739
+ 200: {
1740
+ headers: {
1741
+ [name: string]: unknown;
1742
+ };
1743
+ content: {
1744
+ "application/json": components["schemas"]["CreateResourceResponse"];
1745
+ };
1746
+ };
1747
+ };
1748
+ };
1749
+ put?: never;
1750
+ /**
1751
+ * Create Annotation
1752
+ * @description Create a new annotation/reference in a resource
1753
+ */
1754
+ post: {
1755
+ parameters: {
1756
+ query?: never;
1757
+ header?: never;
1758
+ path: {
1759
+ /** @description Resource ID */
1760
+ id: string;
1761
+ };
1762
+ cookie?: never;
1763
+ };
1764
+ requestBody?: {
1765
+ content: {
1766
+ "application/json": components["schemas"]["CreateAnnotationRequest"];
1767
+ };
1768
+ };
1769
+ responses: {
1770
+ /** @description Annotation created successfully */
1771
+ 201: {
1772
+ headers: {
1773
+ [name: string]: unknown;
1774
+ };
1775
+ content: {
1776
+ "application/json": components["schemas"]["CreateAnnotationResponse"];
1777
+ };
1778
+ };
1779
+ };
1780
+ };
1781
+ delete?: never;
1782
+ options?: never;
1783
+ head?: never;
1784
+ patch?: never;
1785
+ trace?: never;
1786
+ };
1787
+ "/resources/{id}/events": {
1788
+ parameters: {
1789
+ query?: never;
1790
+ header?: never;
1791
+ path?: never;
1792
+ cookie?: never;
1793
+ };
1794
+ /**
1795
+ * Get Resource Event History
1796
+ * @description Get full event history for a resource with optional filtering
1797
+ */
1798
+ get: {
1799
+ parameters: {
1800
+ query?: {
1801
+ type?: "resource.created" | "resource.cloned" | "resource.archived" | "resource.unarchived" | "annotation.added" | "annotation.removed" | "annotation.body.updated" | "entitytag.added" | "entitytag.removed" | "entitytype.added";
1802
+ userId?: string;
1803
+ limit?: number;
1804
+ };
1805
+ header?: never;
1806
+ path: {
1807
+ id: string;
1808
+ };
1809
+ cookie?: never;
1810
+ };
1811
+ requestBody?: never;
1812
+ responses: {
1813
+ /** @description Events retrieved successfully */
1814
+ 200: {
1815
+ headers: {
1816
+ [name: string]: unknown;
1817
+ };
1818
+ content: {
1819
+ "application/json": components["schemas"]["GetEventsResponse"];
1820
+ };
1821
+ };
1822
+ };
1823
+ };
1824
+ put?: never;
1825
+ post?: never;
1826
+ delete?: never;
1827
+ options?: never;
1828
+ head?: never;
1829
+ patch?: never;
1830
+ trace?: never;
1831
+ };
1832
+ "/resources/{id}/events/stream": {
1833
+ parameters: {
1834
+ query?: never;
1835
+ header?: never;
1836
+ path?: never;
1837
+ cookie?: never;
1838
+ };
1839
+ /**
1840
+ * Subscribe to Resource Events (SSE)
1841
+ * @description Open a Server-Sent Events stream to receive real-time resource events
1842
+ */
1843
+ get: {
1844
+ parameters: {
1845
+ query?: never;
1846
+ header?: never;
1847
+ path: {
1848
+ id: string;
1849
+ };
1850
+ cookie?: never;
1851
+ };
1852
+ requestBody?: never;
1853
+ responses: {
1854
+ /** @description SSE stream opened successfully */
1855
+ 200: {
1856
+ headers: {
1857
+ [name: string]: unknown;
1858
+ };
1859
+ content: {
1860
+ "text/event-stream": components["schemas"]["EventStreamResponse"];
1861
+ };
1862
+ };
1863
+ };
1864
+ };
1865
+ put?: never;
1866
+ post?: never;
1867
+ delete?: never;
1868
+ options?: never;
1869
+ head?: never;
1870
+ patch?: never;
1871
+ trace?: never;
1872
+ };
1873
+ "/resources/{resourceId}/annotations/{annotationId}": {
1874
+ parameters: {
1875
+ query?: never;
1876
+ header?: never;
1877
+ path?: never;
1878
+ cookie?: never;
1879
+ };
1880
+ /**
1881
+ * Get Annotation
1882
+ * @description Get a specific annotation from a resource using nested path
1883
+ */
1884
+ get: {
1885
+ parameters: {
1886
+ query?: never;
1887
+ header?: never;
1888
+ path: {
1889
+ /** @description Resource ID */
1890
+ resourceId: string;
1891
+ /** @description Annotation ID */
1892
+ annotationId: string;
1893
+ };
1894
+ cookie?: never;
1895
+ };
1896
+ requestBody?: never;
1897
+ responses: {
1898
+ /** @description Annotation retrieved successfully */
1899
+ 200: {
1900
+ headers: {
1901
+ [name: string]: unknown;
1902
+ };
1903
+ content: {
1904
+ "application/json": components["schemas"]["GetAnnotationResponse"];
1905
+ };
1906
+ };
1907
+ /** @description Annotation not found */
1908
+ 404: {
1909
+ headers: {
1910
+ [name: string]: unknown;
1911
+ };
1912
+ content?: never;
1913
+ };
1914
+ };
1915
+ };
1916
+ put?: never;
1917
+ post?: never;
1918
+ /**
1919
+ * Delete Annotation
1920
+ * @description Delete an annotation from a resource
1921
+ */
1922
+ delete: {
1923
+ parameters: {
1924
+ query?: never;
1925
+ header?: never;
1926
+ path: {
1927
+ /** @description Resource ID */
1928
+ resourceId: string;
1929
+ /** @description Annotation ID */
1930
+ annotationId: string;
1931
+ };
1932
+ cookie?: never;
1933
+ };
1934
+ requestBody?: never;
1935
+ responses: {
1936
+ /** @description Annotation deleted successfully */
1937
+ 204: {
1938
+ headers: {
1939
+ [name: string]: unknown;
1940
+ };
1941
+ content?: never;
1942
+ };
1943
+ /** @description Annotation not found */
1944
+ 404: {
1945
+ headers: {
1946
+ [name: string]: unknown;
1947
+ };
1948
+ content?: never;
1949
+ };
1950
+ };
1951
+ };
1952
+ options?: never;
1953
+ head?: never;
1954
+ patch?: never;
1955
+ trace?: never;
1956
+ };
1957
+ "/resources/{resourceId}/annotations/{annotationId}/body": {
1958
+ parameters: {
1959
+ query?: never;
1960
+ header?: never;
1961
+ path?: never;
1962
+ cookie?: never;
1963
+ };
1964
+ get?: never;
1965
+ /**
1966
+ * Update Annotation Body
1967
+ * @description Apply fine-grained operations to modify annotation body items (add, remove, or replace TextualBody and SpecificResource items)
1968
+ */
1969
+ put: {
1970
+ parameters: {
1971
+ query?: never;
1972
+ header?: never;
1973
+ path: {
1974
+ /** @description Resource ID */
1975
+ resourceId: string;
1976
+ /** @description Annotation ID */
1977
+ annotationId: string;
1978
+ };
1979
+ cookie?: never;
1980
+ };
1981
+ requestBody?: {
1982
+ content: {
1983
+ "application/json": components["schemas"]["UpdateAnnotationBodyRequest"];
1984
+ };
1985
+ };
1986
+ responses: {
1987
+ /** @description Annotation body updated successfully */
1988
+ 200: {
1989
+ headers: {
1990
+ [name: string]: unknown;
1991
+ };
1992
+ content: {
1993
+ "application/json": components["schemas"]["UpdateAnnotationBodyResponse"];
1994
+ };
1995
+ };
1996
+ };
1997
+ };
1998
+ post?: never;
1999
+ delete?: never;
2000
+ options?: never;
2001
+ head?: never;
2002
+ patch?: never;
2003
+ trace?: never;
2004
+ };
2005
+ "/resources/{resourceId}/annotations/{annotationId}/generate-resource-stream": {
2006
+ parameters: {
2007
+ query?: never;
2008
+ header?: never;
2009
+ path?: never;
2010
+ cookie?: never;
2011
+ };
2012
+ get?: never;
2013
+ put?: never;
2014
+ /**
2015
+ * Generate Resource (SSE Stream)
2016
+ * @description Stream real-time resource generation progress via Server-Sent Events
2017
+ */
2018
+ post: {
2019
+ parameters: {
2020
+ query?: never;
2021
+ header?: never;
2022
+ path: {
2023
+ /** @description Resource ID */
2024
+ resourceId: string;
2025
+ /** @description Annotation ID */
2026
+ annotationId: string;
2027
+ };
2028
+ cookie?: never;
2029
+ };
2030
+ requestBody?: {
2031
+ content: {
2032
+ "application/json": components["schemas"]["GenerateResourceStreamRequest"];
2033
+ };
2034
+ };
2035
+ responses: {
2036
+ /** @description SSE stream opened successfully */
2037
+ 200: {
2038
+ headers: {
2039
+ [name: string]: unknown;
2040
+ };
2041
+ content: {
2042
+ "text/event-stream": components["schemas"]["EventStreamResponse"];
2043
+ };
2044
+ };
2045
+ /** @description Authentication required */
2046
+ 401: {
2047
+ headers: {
2048
+ [name: string]: unknown;
2049
+ };
2050
+ content?: never;
2051
+ };
2052
+ /** @description Annotation not found */
2053
+ 404: {
2054
+ headers: {
2055
+ [name: string]: unknown;
2056
+ };
2057
+ content?: never;
2058
+ };
2059
+ };
2060
+ };
2061
+ delete?: never;
2062
+ options?: never;
2063
+ head?: never;
2064
+ patch?: never;
2065
+ trace?: never;
2066
+ };
2067
+ "/resources/{resourceId}/annotations/{annotationId}/history": {
2068
+ parameters: {
2069
+ query?: never;
2070
+ header?: never;
2071
+ path?: never;
2072
+ cookie?: never;
2073
+ };
2074
+ /**
2075
+ * Get Annotation History
2076
+ * @description Get full event history for a specific annotation (highlight or reference)
2077
+ */
2078
+ get: {
2079
+ parameters: {
2080
+ query?: never;
2081
+ header?: never;
2082
+ path: {
2083
+ resourceId: string;
2084
+ annotationId: string;
2085
+ };
2086
+ cookie?: never;
2087
+ };
2088
+ requestBody?: never;
2089
+ responses: {
2090
+ /** @description Annotation history retrieved successfully */
2091
+ 200: {
2092
+ headers: {
2093
+ [name: string]: unknown;
2094
+ };
2095
+ content: {
2096
+ "application/json": components["schemas"]["GetAnnotationHistoryResponse"];
2097
+ };
2098
+ };
2099
+ /** @description Annotation not found */
2100
+ 404: {
2101
+ headers: {
2102
+ [name: string]: unknown;
2103
+ };
2104
+ content?: never;
2105
+ };
2106
+ };
2107
+ };
2108
+ put?: never;
2109
+ post?: never;
2110
+ delete?: never;
2111
+ options?: never;
2112
+ head?: never;
2113
+ patch?: never;
2114
+ trace?: never;
2115
+ };
2116
+ "/api/entity-types": {
2117
+ parameters: {
2118
+ query?: never;
2119
+ header?: never;
2120
+ path?: never;
2121
+ cookie?: never;
2122
+ };
2123
+ /**
2124
+ * Get Entity Types
2125
+ * @description Get list of available entity types for references
2126
+ */
2127
+ get: {
2128
+ parameters: {
2129
+ query?: never;
2130
+ header?: never;
2131
+ path?: never;
2132
+ cookie?: never;
2133
+ };
2134
+ requestBody?: never;
2135
+ responses: {
2136
+ /** @description Entity types retrieved successfully */
2137
+ 200: {
2138
+ headers: {
2139
+ [name: string]: unknown;
2140
+ };
2141
+ content: {
2142
+ "application/json": components["schemas"]["GetEntityTypesResponse"];
2143
+ };
2144
+ };
2145
+ };
2146
+ };
2147
+ put?: never;
2148
+ /**
2149
+ * Add Entity Type
2150
+ * @description Add a new entity type to the collection (append-only, requires moderator/admin)
2151
+ */
2152
+ post: {
2153
+ parameters: {
2154
+ query?: never;
2155
+ header?: never;
2156
+ path?: never;
2157
+ cookie?: never;
2158
+ };
2159
+ requestBody?: {
2160
+ content: {
2161
+ "application/json": components["schemas"]["AddEntityTypeRequest"];
2162
+ };
2163
+ };
2164
+ responses: {
2165
+ /** @description Entity type added successfully */
2166
+ 200: {
2167
+ headers: {
2168
+ [name: string]: unknown;
2169
+ };
2170
+ content: {
2171
+ "application/json": components["schemas"]["AddEntityTypeResponse"];
2172
+ };
2173
+ };
2174
+ /** @description Forbidden - Moderator or Admin access required */
2175
+ 403: {
2176
+ headers: {
2177
+ [name: string]: unknown;
2178
+ };
2179
+ content: {
2180
+ "application/json": components["schemas"]["ErrorResponse"];
2181
+ };
2182
+ };
2183
+ };
2184
+ };
2185
+ delete?: never;
2186
+ options?: never;
2187
+ head?: never;
2188
+ patch?: never;
2189
+ trace?: never;
2190
+ };
2191
+ "/api/entity-types/bulk": {
2192
+ parameters: {
2193
+ query?: never;
2194
+ header?: never;
2195
+ path?: never;
2196
+ cookie?: never;
2197
+ };
2198
+ get?: never;
2199
+ put?: never;
2200
+ /**
2201
+ * Bulk Add Entity Types
2202
+ * @description Add multiple entity types to the collection (append-only, requires moderator/admin)
2203
+ */
2204
+ post: {
2205
+ parameters: {
2206
+ query?: never;
2207
+ header?: never;
2208
+ path?: never;
2209
+ cookie?: never;
2210
+ };
2211
+ requestBody?: {
2212
+ content: {
2213
+ "application/json": components["schemas"]["BulkAddEntityTypesRequest"];
2214
+ };
2215
+ };
2216
+ responses: {
2217
+ /** @description Entity types added successfully */
2218
+ 200: {
2219
+ headers: {
2220
+ [name: string]: unknown;
2221
+ };
2222
+ content: {
2223
+ "application/json": components["schemas"]["AddEntityTypeResponse"];
2224
+ };
2225
+ };
2226
+ /** @description Forbidden - Moderator or Admin access required */
2227
+ 403: {
2228
+ headers: {
2229
+ [name: string]: unknown;
2230
+ };
2231
+ content: {
2232
+ "application/json": components["schemas"]["ErrorResponse"];
2233
+ };
2234
+ };
2235
+ };
2236
+ };
2237
+ delete?: never;
2238
+ options?: never;
2239
+ head?: never;
2240
+ patch?: never;
2241
+ trace?: never;
2242
+ };
2243
+ "/api/jobs/{id}": {
2244
+ parameters: {
2245
+ query?: never;
2246
+ header?: never;
2247
+ path?: never;
2248
+ cookie?: never;
2249
+ };
2250
+ /**
2251
+ * Get Job Status
2252
+ * @description Get the current status and progress of an async job
2253
+ */
2254
+ get: {
2255
+ parameters: {
2256
+ query?: never;
2257
+ header?: never;
2258
+ path: {
2259
+ id: string;
2260
+ };
2261
+ cookie?: never;
2262
+ };
2263
+ requestBody?: never;
2264
+ responses: {
2265
+ /** @description Job status retrieved successfully */
2266
+ 200: {
2267
+ headers: {
2268
+ [name: string]: unknown;
2269
+ };
2270
+ content: {
2271
+ "application/json": components["schemas"]["JobStatusResponse"];
2272
+ };
2273
+ };
2274
+ /** @description Job not found */
2275
+ 404: {
2276
+ headers: {
2277
+ [name: string]: unknown;
2278
+ };
2279
+ content?: never;
2280
+ };
2281
+ };
2282
+ };
2283
+ put?: never;
2284
+ post?: never;
2285
+ delete?: never;
2286
+ options?: never;
2287
+ head?: never;
2288
+ patch?: never;
2289
+ trace?: never;
2290
+ };
2291
+ }
2292
+ interface components {
2293
+ schemas: {
2294
+ AcceptTermsResponse: {
2295
+ success: boolean;
2296
+ message: string;
2297
+ };
2298
+ AddEntityTypeRequest: {
2299
+ tag: string;
2300
+ };
2301
+ AddEntityTypeResponse: {
2302
+ success: boolean;
2303
+ entityTypes: string[];
2304
+ };
2305
+ AdminUpdateUserResponse: {
2306
+ success: boolean;
2307
+ user: {
2308
+ id: string;
2309
+ email: string;
2310
+ name: string | null;
2311
+ image: string | null;
2312
+ domain: string;
2313
+ provider: string;
2314
+ isAdmin: boolean;
2315
+ isActive: boolean;
2316
+ lastLogin: string | null;
2317
+ created: string;
2318
+ updatedAt: string;
2319
+ };
2320
+ };
2321
+ AdminUsersListResponse: {
2322
+ success: boolean;
2323
+ users: {
2324
+ id: string;
2325
+ email: string;
2326
+ name: string | null;
2327
+ image: string | null;
2328
+ domain: string;
2329
+ provider: string;
2330
+ isAdmin: boolean;
2331
+ isActive: boolean;
2332
+ lastLogin: string | null;
2333
+ created: string;
2334
+ updatedAt: string;
2335
+ }[];
2336
+ };
2337
+ AdminUserStatsResponse: {
2338
+ success: boolean;
2339
+ stats: {
2340
+ totalUsers: number;
2341
+ activeUsers: number;
2342
+ adminUsers: number;
2343
+ regularUsers: number;
2344
+ domainBreakdown: {
2345
+ domain: string;
2346
+ count: number;
2347
+ }[];
2348
+ recentSignups: {
2349
+ id: string;
2350
+ email: string;
2351
+ name: string | null;
2352
+ created: string;
2353
+ }[];
2354
+ };
2355
+ };
2356
+ /** @description Minimal Person/Organization for attribution (W3C PROV compatible) */
2357
+ Agent: {
2358
+ /**
2359
+ * Format: uri
2360
+ * @description Unique identifier for the agent
2361
+ */
2362
+ "@id"?: string;
2363
+ /** @description Type(s) of agent (Person, Organization, Software) */
2364
+ "@type"?: string | string[];
2365
+ name: string;
2366
+ nickname?: string;
2367
+ email?: string;
2368
+ email_sha1?: string;
2369
+ homepage?: string;
2370
+ } & {
2371
+ [key: string]: unknown;
2372
+ };
2373
+ Annotation: {
2374
+ /**
2375
+ * @description W3C Web Annotation JSON-LD context
2376
+ * @default http://www.w3.org/ns/anno.jsonld
2377
+ * @constant
2378
+ */
2379
+ "@context": "http://www.w3.org/ns/anno.jsonld";
2380
+ /**
2381
+ * @description W3C Annotation type
2382
+ * @default Annotation
2383
+ * @constant
2384
+ */
2385
+ type: "Annotation";
2386
+ id: string;
2387
+ motivation: components["schemas"]["Motivation"];
2388
+ /** @description W3C Web Annotation target - can be a simple IRI string (entire resource) or an object with source and optional selector (fragment) */
2389
+ target: string | components["schemas"]["AnnotationTarget"];
2390
+ /** @description W3C Web Annotation body - can be empty array, single body, or array of bodies */
2391
+ body: components["schemas"]["AnnotationBody"][] | components["schemas"]["AnnotationBody"] | components["schemas"]["AnnotationBody"][];
2392
+ creator?: components["schemas"]["Agent"];
2393
+ created?: string;
2394
+ modified?: string;
2395
+ generator?: components["schemas"]["Agent"];
2396
+ };
2397
+ /** @description Phase 2: Body can be TextualBody (for entity tags, descriptions) or SpecificResource (for links) */
2398
+ AnnotationBody: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
2399
+ AnnotationContextResponse: {
2400
+ annotation: components["schemas"]["Annotation"];
2401
+ context: {
2402
+ before?: string;
2403
+ selected: string;
2404
+ after?: string;
2405
+ };
2406
+ resource: components["schemas"]["ResourceDescriptor"];
2407
+ };
2408
+ AnnotationLLMContextResponse: {
2409
+ annotation: components["schemas"]["Annotation"];
2410
+ sourceResource: components["schemas"]["ResourceDescriptor"];
2411
+ targetResource?: components["schemas"]["ResourceDescriptor"] | null;
2412
+ /** @description Generation context for this annotation */
2413
+ context?: components["schemas"]["GenerationContext"];
2414
+ /** @description DEPRECATED: Use 'context' instead. Legacy source context format. */
2415
+ sourceContext?: {
2416
+ before: string;
2417
+ selected: string;
2418
+ after: string;
2419
+ };
2420
+ targetContext?: {
2421
+ content: string;
2422
+ summary?: string;
2423
+ };
2424
+ suggestedResolution?: {
2425
+ resourceId: string;
2426
+ resourceName: string;
2427
+ confidence: number;
2428
+ reasoning: string;
2429
+ };
2430
+ };
2431
+ /** @description W3C Web Annotation target object - source is required, selector is optional */
2432
+ AnnotationTarget: {
2433
+ /** @description IRI of the resource being annotated */
2434
+ source: string;
2435
+ /** @description Optional selector to identify a specific segment of the source resource */
2436
+ 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"])[];
2437
+ };
2438
+ AsyncJobResponse: {
2439
+ jobId: string;
2440
+ /** @enum {string} */
2441
+ status: "pending" | "running" | "complete" | "failed" | "cancelled";
2442
+ /** @enum {string} */
2443
+ type: "detection" | "generation";
2444
+ created: string;
2445
+ };
2446
+ AuthResponse: {
2447
+ success: boolean;
2448
+ user: {
2449
+ id: string;
2450
+ email: string;
2451
+ name: string | null;
2452
+ image: string | null;
2453
+ domain: string;
2454
+ isAdmin: boolean;
2455
+ };
2456
+ token: string;
2457
+ isNewUser: boolean;
2458
+ };
2459
+ BodyOperationAdd: {
2460
+ /** @constant */
2461
+ op: "add";
2462
+ item: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
2463
+ };
2464
+ BodyOperationRemove: {
2465
+ /** @constant */
2466
+ op: "remove";
2467
+ item: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
2468
+ };
2469
+ BodyOperationReplace: {
2470
+ /** @constant */
2471
+ op: "replace";
2472
+ oldItem: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
2473
+ newItem: components["schemas"]["TextualBody"] | components["schemas"]["SpecificResource"];
2474
+ };
2475
+ /**
2476
+ * @description Annotation body type - TextualBody for textual content, SpecificResource for resource links
2477
+ * @enum {string}
2478
+ */
2479
+ BodyType: "TextualBody" | "SpecificResource";
2480
+ BulkAddEntityTypesRequest: {
2481
+ tags: string[];
2482
+ };
2483
+ CloneResourceWithTokenResponse: {
2484
+ /** @description Generated clone token */
2485
+ token: string;
2486
+ /** @description ISO 8601 timestamp when token expires */
2487
+ expiresAt: string;
2488
+ resource: components["schemas"]["ResourceDescriptor"];
2489
+ };
2490
+ /**
2491
+ * @description Content format as MIME type, optionally with charset parameter (e.g., 'text/plain', 'text/plain; charset=iso-8859-1')
2492
+ * @example text/plain
2493
+ * @example text/plain; charset=utf-8
2494
+ * @example text/plain; charset=iso-8859-1
2495
+ * @example text/markdown
2496
+ * @example text/markdown; charset=windows-1252
2497
+ * @example image/png
2498
+ * @example image/jpeg
2499
+ * @example application/pdf
2500
+ */
2501
+ ContentFormat: string;
2502
+ ContextualSummaryResponse: {
2503
+ summary: string;
2504
+ relevantFields: {
2505
+ [key: string]: unknown;
2506
+ };
2507
+ context: {
2508
+ before?: string;
2509
+ selected: string;
2510
+ after?: string;
2511
+ };
2512
+ };
2513
+ CreateAnnotationRequest: {
2514
+ motivation: components["schemas"]["Motivation"];
2515
+ target: {
2516
+ source: string;
2517
+ selector: components["schemas"]["TextPositionSelector"] | {
2518
+ /** @enum {string} */
2519
+ type: "TextQuoteSelector";
2520
+ exact: string;
2521
+ prefix?: string;
2522
+ suffix?: string;
2523
+ } | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"] | (components["schemas"]["TextPositionSelector"] | {
2524
+ /** @enum {string} */
2525
+ type: "TextQuoteSelector";
2526
+ exact: string;
2527
+ prefix?: string;
2528
+ suffix?: string;
2529
+ } | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"])[];
2530
+ };
2531
+ body: unknown[] | components["schemas"]["AnnotationBody"] | components["schemas"]["AnnotationBody"][];
2532
+ };
2533
+ CreateAnnotationResponse: {
2534
+ annotation: components["schemas"]["Annotation"];
2535
+ };
2536
+ CreateFromAnnotationRequest: {
2537
+ /** @description ID of the resource containing the annotation */
2538
+ resourceId: string;
2539
+ name: string;
2540
+ content: string;
2541
+ format: components["schemas"]["ContentFormat"];
2542
+ };
2543
+ CreateFromAnnotationResponse: {
2544
+ resource: components["schemas"]["ResourceDescriptor"];
2545
+ annotations: components["schemas"]["Annotation"][];
2546
+ };
2547
+ CreateJobResponse: {
2548
+ jobId: string;
2549
+ /** @enum {string} */
2550
+ type: "detection" | "generation";
2551
+ /** @enum {string} */
2552
+ status: "pending" | "running" | "complete" | "failed" | "cancelled";
2553
+ created: string;
2554
+ resourceId?: string;
2555
+ };
2556
+ CreateResourceFromAnnotationResponse: {
2557
+ resource: components["schemas"]["ResourceDescriptor"];
2558
+ annotation: components["schemas"]["Annotation"];
2559
+ };
2560
+ CreateResourceFromSelectionRequest: {
2561
+ /** @description ID of the resource containing the annotation */
2562
+ resourceId: string;
2563
+ content: string;
2564
+ name: string;
2565
+ format: components["schemas"]["ContentFormat"];
2566
+ entityTypes?: string[];
2567
+ metadata?: {
2568
+ [key: string]: unknown;
2569
+ };
2570
+ prompt?: string;
2571
+ language?: string;
2572
+ };
2573
+ CreateResourceFromSelectionResponse: {
2574
+ resource: components["schemas"]["ResourceDescriptor"];
2575
+ annotation: components["schemas"]["Annotation"];
2576
+ };
2577
+ CreateResourceFromTokenRequest: {
2578
+ /** @description Clone token */
2579
+ token: string;
2580
+ /** @description Name for the new resource */
2581
+ name: string;
2582
+ /** @description Content for the new resource */
2583
+ content: string;
2584
+ /** @description Whether to archive the original resource */
2585
+ archiveOriginal?: boolean;
2586
+ };
2587
+ CreateResourceFromTokenResponse: {
2588
+ resource: components["schemas"]["ResourceDescriptor"];
2589
+ annotations: components["schemas"]["Annotation"][];
2590
+ };
2591
+ CreateResourceRequest: {
2592
+ name: string;
2593
+ content: string;
2594
+ format: components["schemas"]["ContentFormat"];
2595
+ entityTypes: string[];
2596
+ language?: string;
2597
+ creationMethod?: string;
2598
+ sourceAnnotationId?: string;
2599
+ sourceResourceId?: string;
2600
+ };
2601
+ CreateResourceResponse: {
2602
+ resource: components["schemas"]["ResourceDescriptor"];
2603
+ annotations: components["schemas"]["Annotation"][];
2604
+ };
2605
+ DeleteAnnotationRequest: {
2606
+ /**
2607
+ * Format: uri
2608
+ * @description Resource URI containing the annotation (required for O(1) Layer 3 lookup)
2609
+ */
2610
+ resourceId: string;
2611
+ };
2612
+ DeleteUserResponse: {
2613
+ success: boolean;
2614
+ message: string;
2615
+ };
2616
+ DetectReferencesStreamRequest: {
2617
+ /** @description Entity types to detect (e.g., 'Person', 'Organization', 'Location') */
2618
+ entityTypes: string[];
2619
+ /** @description Include anaphoric/cataphoric references (e.g., 'the CEO', 'the tech giant') in addition to direct mentions */
2620
+ includeDescriptiveReferences?: boolean;
2621
+ };
2622
+ DetectHighlightsStreamRequest: {
2623
+ /** @description Optional instructions to guide AI highlight detection */
2624
+ instructions?: string;
2625
+ /** @description Optional density: desired number of highlights per 2000 words of text (1-15) */
2626
+ density?: number;
2627
+ };
2628
+ DetectAssessmentsStreamRequest: {
2629
+ /** @description Optional instructions to guide AI assessment detection */
2630
+ instructions?: string;
2631
+ /**
2632
+ * @description Optional tone/style for generated assessments
2633
+ * @enum {string}
2634
+ */
2635
+ tone?: "analytical" | "critical" | "balanced" | "constructive";
2636
+ /** @description Optional density: desired number of assessments per 2000 words of text (1-10) */
2637
+ density?: number;
2638
+ };
2639
+ DetectCommentsStreamRequest: {
2640
+ /** @description Optional instructions to guide AI comment detection */
2641
+ instructions?: string;
2642
+ /**
2643
+ * @description Optional tone/style for generated comments
2644
+ * @enum {string}
2645
+ */
2646
+ tone?: "scholarly" | "explanatory" | "conversational" | "technical";
2647
+ /** @description Optional density: desired number of comments per 2000 words of text (2-12) */
2648
+ density?: number;
2649
+ };
2650
+ DetectTagsStreamRequest: {
2651
+ /** @description Tag schema ID (e.g., 'legal-irac', 'scientific-imrad', 'argument-toulmin') */
2652
+ schemaId: string;
2653
+ /** @description Categories to detect from the selected schema (e.g., ['Issue', 'Rule', 'Application', 'Conclusion']) */
2654
+ categories: string[];
2655
+ };
2656
+ ErrorResponse: {
2657
+ error: string;
2658
+ code?: string;
2659
+ details?: unknown;
2660
+ };
2661
+ EventStreamResponse: {
2662
+ event: string;
2663
+ data: string;
2664
+ id?: string;
2665
+ };
2666
+ GenerateResourceFromAnnotationRequest: {
2667
+ /** @description Optional name for the generated resource */
2668
+ name?: string;
2669
+ /** @description Entity types for the generated resource */
2670
+ entityTypes?: string[];
2671
+ /** @description Optional AI prompt for generation */
2672
+ prompt?: string;
2673
+ /** @description Language code (e.g., 'en', 'es') */
2674
+ language?: string;
2675
+ };
2676
+ GenerateResourceFromAnnotationResponse: {
2677
+ resource: components["schemas"]["ResourceDescriptor"];
2678
+ annotation: components["schemas"]["Annotation"];
2679
+ generated: boolean;
2680
+ };
2681
+ GenerateResourceRequest: {
2682
+ /** @description Resource ID containing the annotation */
2683
+ resourceId: string;
2684
+ /** @description Custom title for generated resource */
2685
+ title?: string;
2686
+ /** @description Custom prompt for content generation */
2687
+ prompt?: string;
2688
+ /** @description Language locale (e.g., "es", "fr", "ja") */
2689
+ language?: string;
2690
+ };
2691
+ GenerateResourceStreamRequest: {
2692
+ /** @description Custom title for generated resource */
2693
+ title?: string;
2694
+ /** @description Custom prompt for content generation */
2695
+ prompt?: string;
2696
+ /** @description Language locale for generated content (e.g., "es", "fr", "ja") */
2697
+ language?: string;
2698
+ /** @description Generation context including source document excerpts and metadata */
2699
+ context: components["schemas"]["GenerationContext"];
2700
+ /** @description Inference temperature (0.0 = focused, 1.0 = creative) */
2701
+ temperature?: number;
2702
+ /** @description Maximum tokens to generate */
2703
+ maxTokens?: number;
2704
+ };
2705
+ GetAnnotationHistoryResponse: {
2706
+ events: {
2707
+ id: string;
2708
+ type: string;
2709
+ timestamp: string;
2710
+ userId: string;
2711
+ resourceId: string;
2712
+ payload: {
2713
+ name: string;
2714
+ format: components["schemas"]["ContentFormat"];
2715
+ contentChecksum: string;
2716
+ /** @enum {string} */
2717
+ creationMethod: "api" | "upload" | "ui" | "reference" | "clone" | "generated";
2718
+ entityTypes?: string[];
2719
+ metadata?: {
2720
+ [key: string]: unknown;
2721
+ };
2722
+ } | {
2723
+ name: string;
2724
+ format: components["schemas"]["ContentFormat"];
2725
+ contentChecksum: string;
2726
+ parentResourceId: string;
2727
+ /** @enum {string} */
2728
+ creationMethod: "api" | "upload" | "ui" | "reference" | "clone" | "generated";
2729
+ entityTypes?: string[];
2730
+ metadata?: {
2731
+ [key: string]: unknown;
2732
+ };
2733
+ } | {
2734
+ reason?: string;
2735
+ } | Record<string, never> | {
2736
+ /** @description W3C Annotation (creator/created fields are optional in events - they're derived from event userId/timestamp) */
2737
+ annotation: components["schemas"]["Annotation"];
2738
+ } | {
2739
+ /** @description Unified annotation ID */
2740
+ annotationId: string;
2741
+ } | {
2742
+ /** @description Unified annotation ID */
2743
+ annotationId: string;
2744
+ /** @description For linking motivation */
2745
+ targetResourceId: string;
2746
+ } | {
2747
+ entityType: string;
2748
+ } | {
2749
+ entityType: string;
2750
+ };
2751
+ metadata: {
2752
+ sequenceNumber: number;
2753
+ prevEventHash?: string;
2754
+ checksum?: string;
2755
+ };
2756
+ }[];
2757
+ total: number;
2758
+ annotationId: string;
2759
+ resourceId: string;
2760
+ };
2761
+ GetAnnotationResponse: {
2762
+ annotation: components["schemas"]["Annotation"];
2763
+ resource: components["schemas"]["ResourceDescriptor"] | null;
2764
+ resolvedResource: components["schemas"]["ResourceDescriptor"] | null;
2765
+ };
2766
+ GetAnnotationsResponse: {
2767
+ annotations: components["schemas"]["Annotation"][];
2768
+ /** @description Total number of annotations */
2769
+ total: number;
2770
+ /** @description Motivation filter applied (if any) */
2771
+ motivation?: components["schemas"]["Motivation"] | null;
2772
+ };
2773
+ GetEntityTypesResponse: {
2774
+ entityTypes: string[];
2775
+ };
2776
+ GetEventsResponse: {
2777
+ events: {
2778
+ event: {
2779
+ id: string;
2780
+ type: string;
2781
+ timestamp: string;
2782
+ userId: string;
2783
+ resourceId: string;
2784
+ payload?: unknown;
2785
+ };
2786
+ metadata: {
2787
+ sequenceNumber: number;
2788
+ prevEventHash?: string;
2789
+ checksum?: string;
2790
+ };
2791
+ }[];
2792
+ total: number;
2793
+ resourceId: string;
2794
+ };
2795
+ GetReferencedByResponse: {
2796
+ referencedBy: {
2797
+ /** @description Reference annotation ID */
2798
+ id: string;
2799
+ /** @description Name of resource containing the reference */
2800
+ resourceName: string;
2801
+ target: {
2802
+ /** @description ID of resource containing the reference */
2803
+ source: string;
2804
+ selector: {
2805
+ /** @description The selected text that references this resource */
2806
+ exact: string;
2807
+ };
2808
+ };
2809
+ }[];
2810
+ };
2811
+ GetResourceByTokenResponse: {
2812
+ sourceResource: components["schemas"]["ResourceDescriptor"];
2813
+ /** @description ISO 8601 timestamp when token expires */
2814
+ expiresAt: string;
2815
+ };
2816
+ GetResourceResponse: {
2817
+ resource: components["schemas"]["ResourceDescriptor"];
2818
+ /** @description All annotations for the resource (highlights, references, assessments, etc.) */
2819
+ annotations: components["schemas"]["Annotation"][];
2820
+ /** @description Annotations that reference this resource from other resources */
2821
+ entityReferences: components["schemas"]["Annotation"][];
2822
+ };
2823
+ GoogleAuthRequest: {
2824
+ access_token: string;
2825
+ };
2826
+ HealthResponse: {
2827
+ status: string;
2828
+ message: string;
2829
+ version: string;
2830
+ timestamp: string;
2831
+ /** @enum {string} */
2832
+ database: "connected" | "disconnected" | "unknown";
2833
+ environment: string;
2834
+ };
2835
+ JobStatusResponse: {
2836
+ jobId: string;
2837
+ /** @enum {string} */
2838
+ type: "detection" | "generation" | "highlight-detection" | "assessment-detection" | "comment-detection" | "tag-detection";
2839
+ /** @enum {string} */
2840
+ status: "pending" | "running" | "complete" | "failed" | "cancelled";
2841
+ userId: string;
2842
+ created: string;
2843
+ startedAt?: string;
2844
+ completedAt?: string;
2845
+ error?: string;
2846
+ progress?: unknown;
2847
+ result?: unknown;
2848
+ };
2849
+ ListAnnotationsResponse: {
2850
+ annotations: components["schemas"]["Annotation"][];
2851
+ total: number;
2852
+ offset: number;
2853
+ limit: number;
2854
+ };
2855
+ ListResourcesResponse: {
2856
+ resources: components["schemas"]["ResourceDescriptor"][];
2857
+ total: number;
2858
+ offset: number;
2859
+ limit: number;
2860
+ };
2861
+ PasswordAuthRequest: {
2862
+ /**
2863
+ * Format: email
2864
+ * @description User email address
2865
+ */
2866
+ email: string;
2867
+ /** @description User password (minimum 8 characters) */
2868
+ password: string;
2869
+ };
2870
+ MCPGenerateResponse: {
2871
+ refresh_token: string;
2872
+ };
2873
+ /**
2874
+ * @description W3C Web Annotation motivation vocabulary - https://www.w3.org/TR/annotation-vocab/#motivation
2875
+ * @enum {string}
2876
+ */
2877
+ Motivation: "assessing" | "bookmarking" | "classifying" | "commenting" | "describing" | "editing" | "highlighting" | "identifying" | "linking" | "moderating" | "questioning" | "replying" | "tagging";
2878
+ OAuthConfigResponse: {
2879
+ providers: {
2880
+ name: string;
2881
+ isConfigured: boolean;
2882
+ clientId: string;
2883
+ }[];
2884
+ allowedDomains: string[];
2885
+ };
2886
+ /** @description A specific, byte-addressable rendition of a resource (file/asset/variant). */
2887
+ Representation: {
2888
+ /**
2889
+ * Format: uri
2890
+ * @description Stable ID for this representation.
2891
+ */
2892
+ "@id"?: string;
2893
+ /** @description Type(s), e.g., schema:MediaObject. */
2894
+ "@type"?: string | string[];
2895
+ /** @description MIME/media type (e.g., text/markdown, image/png). */
2896
+ mediaType: string;
2897
+ /** @description Where the bytes live (s3://, file://, https://, ipfs://, etc.). */
2898
+ storageUri?: string;
2899
+ filename?: string;
2900
+ /** @description Size of the payload in bytes. */
2901
+ byteSize?: number;
2902
+ /** @description Integrity hash (e.g., sha256:abcd…). */
2903
+ checksum?: string;
2904
+ /** @description Compression/transfer encoding if applicable. */
2905
+ encoding?: string;
2906
+ /** @description IETF BCP 47 language tag (e.g., en, es-ES). */
2907
+ language?: string;
2908
+ /** @description Pixels (images/video). */
2909
+ width?: number;
2910
+ /** @description Pixels (images/video). */
2911
+ height?: number;
2912
+ /** @description Seconds (audio/video). */
2913
+ duration?: number;
2914
+ /** Format: date-time */
2915
+ created?: string;
2916
+ /** Format: date-time */
2917
+ modified?: string;
2918
+ /** @description Profile/shape the bytes conform to (e.g., a JSON profile or SVG profile). */
2919
+ conformsTo?: string | string[];
2920
+ tags?: string[];
2921
+ /**
2922
+ * @description Semantics of this rendition relative to the resource (e.g., original, thumbnail, preview, derived).
2923
+ * @enum {string}
2924
+ */
2925
+ rel?: "original" | "thumbnail" | "preview" | "optimized" | "derived" | "other";
2926
+ } & {
2927
+ [key: string]: unknown;
2928
+ };
2929
+ ResolveAnnotationRequest: {
2930
+ /** @description Target resource ID to resolve reference to */
2931
+ resourceId: string;
2932
+ };
2933
+ ResolveAnnotationResponse: {
2934
+ annotation: components["schemas"]["Annotation"];
2935
+ targetResource?: components["schemas"]["ResourceDescriptor"] | null;
2936
+ };
2937
+ /** @description Metadata about a resource (1:1 with its URI). JSON-LD subject is @id. Link to concrete bytes via representations. */
2938
+ ResourceDescriptor: {
2939
+ /** @description JSON-LD context; URI, object, or array of these. */
2940
+ "@context": string | {
2941
+ [key: string]: unknown;
2942
+ } | (string | {
2943
+ [key: string]: unknown;
2944
+ })[];
2945
+ /**
2946
+ * Format: uri
2947
+ * @description Canonical URI/URN of the resource being described.
2948
+ */
2949
+ "@id": string;
2950
+ /** @description Type(s) of the resource (IRIs/CURIEs via @context). */
2951
+ "@type"?: string | string[];
2952
+ name: string;
2953
+ description?: string;
2954
+ /** @description Persistent identifiers (e.g., DOI, URN). */
2955
+ identifier?: string | string[] | ({
2956
+ /** Format: uri */
2957
+ "@id"?: string;
2958
+ value?: string;
2959
+ scheme?: string;
2960
+ } & {
2961
+ [key: string]: unknown;
2962
+ });
2963
+ /** @description Topics (IRIs or strings). */
2964
+ about?: string | string[];
2965
+ /** @description Equivalent/authoritative references. */
2966
+ sameAs?: string[];
2967
+ isPartOf?: string[];
2968
+ hasPart?: string[];
2969
+ /** Format: uri */
2970
+ license?: string;
2971
+ version?: string;
2972
+ /** Format: date-time */
2973
+ dateCreated?: string;
2974
+ /** Format: date-time */
2975
+ dateModified?: string;
2976
+ /** @description W3C PROV - source resources this was derived from */
2977
+ wasDerivedFrom?: string | string[];
2978
+ /** @description W3C PROV - agents responsible for this resource */
2979
+ wasAttributedTo?: components["schemas"]["Agent"] | components["schemas"]["Agent"][];
2980
+ /** @description Profile/shape URI this resource description conforms to. */
2981
+ conformsTo?: string | string[];
2982
+ /** @description Convenience set summarizing media types across representations. */
2983
+ availableFormats?: string[];
2984
+ /** @description Managed or referenced byte-level renditions of this resource. */
2985
+ representations: components["schemas"]["Representation"] | components["schemas"]["Representation"][];
2986
+ /** @description Application-specific: Whether this resource is archived */
2987
+ archived?: boolean;
2988
+ /** @description Application-specific: Entity types for this resource */
2989
+ entityTypes?: string[];
2990
+ /** @description Application-specific: Whether this resource is a draft */
2991
+ isDraft?: boolean;
2992
+ /**
2993
+ * @description Application-specific: How this resource was created
2994
+ * @enum {string}
2995
+ */
2996
+ creationMethod?: "api" | "upload" | "ui" | "reference" | "clone" | "generated";
2997
+ /** @description Application-specific: ID of annotation that triggered generation */
2998
+ sourceAnnotationId?: string;
2999
+ /** @description Application-specific: ID of source resource for clones/derivatives */
3000
+ sourceResourceId?: string;
3001
+ } & {
3002
+ [key: string]: unknown;
3003
+ };
3004
+ ResourceLLMContextResponse: {
3005
+ mainResource: components["schemas"]["ResourceDescriptor"];
3006
+ relatedResources: components["schemas"]["ResourceDescriptor"][];
3007
+ annotations: components["schemas"]["Annotation"][];
3008
+ graph: {
3009
+ nodes: {
3010
+ id: string;
3011
+ type: string;
3012
+ label: string;
3013
+ metadata: {
3014
+ [key: string]: unknown;
3015
+ };
3016
+ }[];
3017
+ edges: {
3018
+ source: string;
3019
+ target: string;
3020
+ type: string;
3021
+ metadata: {
3022
+ [key: string]: unknown;
3023
+ };
3024
+ }[];
3025
+ };
3026
+ summary?: string;
3027
+ suggestedReferences?: string[];
3028
+ /** @description The content of the main resource (included if includeContent=true) */
3029
+ mainResourceContent?: string;
3030
+ /** @description Map of resource IDs to their content (included if includeContent=true) */
3031
+ relatedResourcesContent?: {
3032
+ [key: string]: string;
3033
+ };
3034
+ };
3035
+ SpecificResource: {
3036
+ /** @constant */
3037
+ type: "SpecificResource";
3038
+ /** @description IRI of the target resource */
3039
+ source: string;
3040
+ /** @description Why this body is included */
3041
+ purpose?: components["schemas"]["Motivation"];
3042
+ };
3043
+ StatusResponse: {
3044
+ status: string;
3045
+ version: string;
3046
+ features: {
3047
+ semanticContent: string;
3048
+ collaboration: string;
3049
+ rbac: string;
3050
+ };
3051
+ message: string;
3052
+ authenticatedAs?: string;
3053
+ };
3054
+ TextPositionSelector: {
3055
+ /** @enum {string} */
3056
+ type: "TextPositionSelector";
3057
+ /** @description Character offset from resource start */
3058
+ start: number;
3059
+ /** @description Character offset from resource start */
3060
+ end: number;
3061
+ };
3062
+ TextQuoteSelector: {
3063
+ /** @enum {string} */
3064
+ type: "TextQuoteSelector";
3065
+ exact: string;
3066
+ prefix?: string;
3067
+ suffix?: string;
3068
+ };
3069
+ TextualBody: {
3070
+ /** @constant */
3071
+ type: "TextualBody";
3072
+ /** @description The text content (e.g., entity type name) */
3073
+ value: string;
3074
+ /** @description Why this body is included */
3075
+ purpose?: components["schemas"]["Motivation"];
3076
+ /** @description MIME type (defaults to text/plain) */
3077
+ format?: string;
3078
+ /** @description BCP 47 language tag */
3079
+ language?: string;
3080
+ };
3081
+ TokenRefreshRequest: {
3082
+ /**
3083
+ * @description Refresh token obtained during login
3084
+ * @example eyJhbGciOiJIUzI1NiIs...
3085
+ */
3086
+ refreshToken: string;
3087
+ };
3088
+ TokenRefreshResponse: {
3089
+ access_token: string;
3090
+ };
3091
+ UpdateAnnotationBodyRequest: {
3092
+ /** @description Resource ID containing the annotation (required for O(1) Layer 3 lookup) */
3093
+ resourceId: string;
3094
+ /** @description Array of body modification operations to apply */
3095
+ operations: (components["schemas"]["BodyOperationAdd"] | components["schemas"]["BodyOperationRemove"] | components["schemas"]["BodyOperationReplace"])[];
3096
+ };
3097
+ UpdateAnnotationBodyResponse: {
3098
+ annotation: components["schemas"]["Annotation"];
3099
+ };
3100
+ UpdateResourceRequest: {
3101
+ entityTypes?: string[];
3102
+ archived?: boolean;
3103
+ };
3104
+ UpdateUserRequest: {
3105
+ isAdmin?: boolean;
3106
+ isActive?: boolean;
3107
+ name?: string;
3108
+ };
3109
+ UpdateUserResponse: {
3110
+ success: boolean;
3111
+ user: {
3112
+ id: string;
3113
+ email: string;
3114
+ name?: string | null;
3115
+ image?: string | null;
3116
+ domain: string;
3117
+ provider: string;
3118
+ isAdmin: boolean;
3119
+ isActive: boolean;
3120
+ lastLogin?: string | null;
3121
+ created: string;
3122
+ updatedAt: string;
3123
+ };
3124
+ };
3125
+ UserResponse: {
3126
+ id: string;
3127
+ email: string;
3128
+ name: string | null;
3129
+ image: string | null;
3130
+ domain: string;
3131
+ provider: string;
3132
+ isAdmin: boolean;
3133
+ isActive: boolean;
3134
+ termsAcceptedAt: string | null;
3135
+ lastLogin: string | null;
3136
+ created: string;
3137
+ };
3138
+ SvgSelector: {
3139
+ /** @enum {string} */
3140
+ type: "SvgSelector";
3141
+ /** @description SVG markup defining the region (must include xmlns attribute) */
3142
+ value: string;
3143
+ };
3144
+ /** @description W3C Web Annotation FragmentSelector for media fragment identifiers (RFC 3778 for PDFs) */
3145
+ FragmentSelector: {
3146
+ /** @enum {string} */
3147
+ type: "FragmentSelector";
3148
+ /**
3149
+ * @description Media fragment identifier (e.g., 'page=1&viewrect=100,200,50,30' for PDF)
3150
+ * @example page=1&viewrect=100,200,50,30
3151
+ * @example page=5&viewrect=250,400,100,75
3152
+ */
3153
+ value: string;
3154
+ /**
3155
+ * @description URI identifying the fragment syntax specification
3156
+ * @example http://tools.ietf.org/rfc/rfc3778
3157
+ */
3158
+ conformsTo?: string;
3159
+ };
3160
+ /** @description Context information used for AI generation. Includes source document excerpts and metadata. */
3161
+ GenerationContext: {
3162
+ /** @description Text context from the source document */
3163
+ sourceContext: {
3164
+ /** @description Text appearing before the selected passage */
3165
+ before?: string;
3166
+ /** @description The selected text passage (the annotation target) */
3167
+ selected: string;
3168
+ /** @description Text appearing after the selected passage */
3169
+ after?: string;
3170
+ };
3171
+ /** @description Additional context metadata (reserved for future use) */
3172
+ metadata?: {
3173
+ /** @description Type of source resource (e.g., 'document', 'image', 'video') */
3174
+ resourceType?: string;
3175
+ /** @description BCP 47 language tag of source content */
3176
+ language?: string;
3177
+ /** @description Entity types associated with the annotation */
3178
+ entityTypes?: string[];
3179
+ };
3180
+ };
3181
+ };
3182
+ responses: never;
3183
+ parameters: never;
3184
+ requestBodies: never;
3185
+ headers: never;
3186
+ pathItems: never;
3187
+ }
3188
+ type operations = Record<string, never>;
3189
+
3190
+ /**
3191
+ * Branded string types for compile-time type safety
3192
+ *
3193
+ * These types are zero-cost at runtime but prevent mixing
3194
+ * different string types at compile time.
3195
+ */
3196
+
3197
+ type Motivation$2 = components['schemas']['Motivation'];
3198
+ type ContentFormat$1 = components['schemas']['ContentFormat'];
3199
+ type Email = string & {
3200
+ readonly __brand: 'Email';
3201
+ };
3202
+ type AuthCode = string & {
3203
+ readonly __brand: 'AuthCode';
3204
+ };
3205
+ type GoogleCredential = string & {
3206
+ readonly __brand: 'GoogleCredential';
3207
+ };
3208
+ type AccessToken = string & {
3209
+ readonly __brand: 'AccessToken';
3210
+ };
3211
+ type RefreshToken = string & {
3212
+ readonly __brand: 'RefreshToken';
3213
+ };
3214
+ type MCPToken = string & {
3215
+ readonly __brand: 'MCPToken';
3216
+ };
3217
+ type CloneToken = string & {
3218
+ readonly __brand: 'CloneToken';
3219
+ };
3220
+ type JobId = string & {
3221
+ readonly __brand: 'JobId';
3222
+ };
3223
+ type UserDID = string & {
3224
+ readonly __brand: 'UserDID';
3225
+ };
3226
+ type EntityType = string & {
3227
+ readonly __brand: 'EntityType';
3228
+ };
3229
+ type SearchQuery = string & {
3230
+ readonly __brand: 'SearchQuery';
3231
+ };
3232
+ type BaseUrl = string & {
3233
+ readonly __brand: 'BaseUrl';
3234
+ };
3235
+ declare function email(value: string): Email;
3236
+ declare function authCode(value: string): AuthCode;
3237
+ declare function googleCredential(value: string): GoogleCredential;
3238
+ declare function accessToken(value: string): AccessToken;
3239
+ declare function refreshToken(value: string): RefreshToken;
3240
+ declare function mcpToken(value: string): MCPToken;
3241
+ declare function cloneToken(value: string): CloneToken;
3242
+ declare function jobId(value: string): JobId;
3243
+ declare function userDID(value: string): UserDID;
3244
+ declare function entityType(value: string): EntityType;
3245
+ declare function searchQuery(value: string): SearchQuery;
3246
+ declare function baseUrl(value: string): BaseUrl;
3247
+ type ResourceUri = string & {
3248
+ readonly __brand: 'ResourceUri';
3249
+ };
3250
+ type AnnotationUri = string & {
3251
+ readonly __brand: 'AnnotationUri';
3252
+ };
3253
+ type ResourceAnnotationUri = string & {
3254
+ readonly __brand: 'ResourceAnnotationUri';
3255
+ };
3256
+ declare function resourceUri(uri: string): ResourceUri;
3257
+ declare function annotationUri(uri: string): AnnotationUri;
3258
+ declare function resourceAnnotationUri(uri: string): ResourceAnnotationUri;
3259
+
4
3260
  /**
5
3261
  * Resource creation methods - How resources are created in the system
6
3262
  */
@@ -135,13 +3391,13 @@ declare function extractResourceUriFromAnnotationUri(annotationUri: ResourceAnno
135
3391
  */
136
3392
 
137
3393
  type ResourceDescriptor = components['schemas']['ResourceDescriptor'];
138
- type Annotation$3 = components['schemas']['Annotation'];
3394
+ type Annotation$4 = components['schemas']['Annotation'];
139
3395
  /**
140
3396
  * Represents a connection between resources through annotations
141
3397
  */
142
3398
  interface GraphConnection {
143
3399
  targetResource: ResourceDescriptor;
144
- annotations: Annotation$3[];
3400
+ annotations: Annotation$4[];
145
3401
  relationshipType?: string;
146
3402
  bidirectional: boolean;
147
3403
  }
@@ -150,7 +3406,7 @@ interface GraphConnection {
150
3406
  */
151
3407
  interface GraphPath {
152
3408
  resources: ResourceDescriptor[];
153
- annotations: Annotation$3[];
3409
+ annotations: Annotation$4[];
154
3410
  }
155
3411
  /**
156
3412
  * Statistics about entity types in the graph
@@ -173,9 +3429,9 @@ interface EntityTypeStats {
173
3429
  * - Optional signatures for cross-org verification
174
3430
  */
175
3431
 
176
- type Annotation$2 = components['schemas']['Annotation'];
3432
+ type Annotation$3 = components['schemas']['Annotation'];
177
3433
  type ContentFormat = components['schemas']['ContentFormat'];
178
- type Motivation = components['schemas']['Motivation'];
3434
+ type Motivation$1 = components['schemas']['Motivation'];
179
3435
  interface BaseEvent {
180
3436
  id: string;
181
3437
  timestamp: string;
@@ -251,7 +3507,7 @@ interface RepresentationRemovedEvent extends BaseEvent {
251
3507
  interface AnnotationAddedEvent extends BaseEvent {
252
3508
  type: 'annotation.added';
253
3509
  payload: {
254
- annotation: Omit<Annotation$2, 'creator' | 'created'>;
3510
+ annotation: Omit<Annotation$3, 'creator' | 'created'>;
255
3511
  };
256
3512
  }
257
3513
  interface AnnotationRemovedEvent extends BaseEvent {
@@ -263,13 +3519,13 @@ interface AnnotationRemovedEvent extends BaseEvent {
263
3519
  type BodyItem = {
264
3520
  type: 'TextualBody';
265
3521
  value: string;
266
- purpose?: Motivation;
3522
+ purpose?: Motivation$1;
267
3523
  format?: string;
268
3524
  language?: string;
269
3525
  } | {
270
3526
  type: 'SpecificResource';
271
3527
  source: string;
272
- purpose?: Motivation;
3528
+ purpose?: Motivation$1;
273
3529
  };
274
3530
  type BodyOperation = {
275
3531
  op: 'add';
@@ -403,7 +3659,7 @@ interface EventQuery {
403
3659
  }
404
3660
  interface ResourceAnnotations {
405
3661
  resourceId: ResourceId;
406
- annotations: Annotation$2[];
3662
+ annotations: Annotation$3[];
407
3663
  version: number;
408
3664
  updatedAt: string;
409
3665
  }
@@ -432,6 +3688,382 @@ declare function isEventRelatedToAnnotation(event: StoredEvent, annotationUri: A
432
3688
  */
433
3689
  declare function isResourceEvent(event: any): event is StoredEvent;
434
3690
 
3691
+ /**
3692
+ * Event Protocol Types
3693
+ *
3694
+ * Unified event map for all application events.
3695
+ * This is the single source of truth for event types across backend, frontend, and CLI.
3696
+ *
3697
+ * Consolidates events from:
3698
+ * - Backend events (SSE streams, job progress, resource operations)
3699
+ * - User interaction events (selection, annotation hover/click, panels, toolbar)
3700
+ * - Navigation events (sidebar, routing, links)
3701
+ * - Settings events (theme, line numbers, locale)
3702
+ * - API operation events (CRUD, detection, generation)
3703
+ */
3704
+
3705
+ type Selector = components['schemas']['TextPositionSelector'] | components['schemas']['TextQuoteSelector'] | components['schemas']['SvgSelector'] | components['schemas']['FragmentSelector'];
3706
+ type GenerationContext = components['schemas']['GenerationContext'];
3707
+ type Annotation$2 = components['schemas']['Annotation'];
3708
+ type Motivation = components['schemas']['Motivation'];
3709
+ interface GenerationProgress {
3710
+ status: 'started' | 'fetching' | 'generating' | 'creating' | 'complete' | 'error';
3711
+ referenceId: string;
3712
+ resourceName?: string;
3713
+ resourceId?: string;
3714
+ sourceResourceId?: string;
3715
+ percentage: number;
3716
+ message?: string;
3717
+ }
3718
+ /**
3719
+ * Selection data for user-initiated annotations
3720
+ */
3721
+ interface SelectionData {
3722
+ exact: string;
3723
+ start: number;
3724
+ end: number;
3725
+ svgSelector?: string;
3726
+ fragmentSelector?: string;
3727
+ conformsTo?: string;
3728
+ prefix?: string;
3729
+ suffix?: string;
3730
+ }
3731
+ /**
3732
+ * Common detection progress fields shared across all motivation types.
3733
+ *
3734
+ * The five motivations have different SSE progress shapes
3735
+ * (ReferenceDetectionProgress uses entity-type steps; the others use percentage).
3736
+ * This type captures the subset of fields used by the detection UI
3737
+ * (DetectionProgressWidget, useDetectionFlow).
3738
+ */
3739
+ interface DetectionProgress {
3740
+ status: string;
3741
+ message?: string;
3742
+ /** Reference detection: currently scanning entity type */
3743
+ currentEntityType?: string;
3744
+ /** Reference detection: completed entity types with counts (frontend-only) */
3745
+ completedEntityTypes?: Array<{
3746
+ entityType: string;
3747
+ foundCount: number;
3748
+ }>;
3749
+ /** Percentage-based motivations (highlight, assessment, comment, tag) */
3750
+ percentage?: number;
3751
+ /** Category-based motivations (tag) */
3752
+ currentCategory?: string;
3753
+ processedCategories?: number;
3754
+ totalCategories?: number;
3755
+ /** Request parameters for display in progress UI (frontend-only, added by annotation-registry) */
3756
+ requestParams?: Array<{
3757
+ label: string;
3758
+ value: string;
3759
+ }>;
3760
+ }
3761
+ /**
3762
+ * Unified event map for all application events
3763
+ */
3764
+ type EventMap = {
3765
+ 'make-meaning:event': ResourceEvent;
3766
+ 'detection:started': Extract<ResourceEvent, {
3767
+ type: 'job.started';
3768
+ }>;
3769
+ 'detection:entity-found': Extract<ResourceEvent, {
3770
+ type: 'annotation.added';
3771
+ }>;
3772
+ 'detection:completed': Extract<ResourceEvent, {
3773
+ type: 'job.completed';
3774
+ }>;
3775
+ 'detection:failed': Extract<ResourceEvent, {
3776
+ type: 'job.failed';
3777
+ }>;
3778
+ 'detection:progress': DetectionProgress;
3779
+ 'annotation:added': Extract<ResourceEvent, {
3780
+ type: 'annotation.added';
3781
+ }>;
3782
+ 'annotation:removed': Extract<ResourceEvent, {
3783
+ type: 'annotation.removed';
3784
+ }>;
3785
+ 'annotation:updated': Extract<ResourceEvent, {
3786
+ type: 'annotation.body.updated';
3787
+ }>;
3788
+ 'entity-tag:added': Extract<ResourceEvent, {
3789
+ type: 'entitytag.added';
3790
+ }>;
3791
+ 'entity-tag:removed': Extract<ResourceEvent, {
3792
+ type: 'entitytag.removed';
3793
+ }>;
3794
+ 'resource:archived': Extract<ResourceEvent, {
3795
+ type: 'resource.archived';
3796
+ }>;
3797
+ 'resource:unarchived': Extract<ResourceEvent, {
3798
+ type: 'resource.unarchived';
3799
+ }>;
3800
+ 'selection:comment-requested': SelectionData;
3801
+ 'selection:tag-requested': SelectionData;
3802
+ 'selection:assessment-requested': SelectionData;
3803
+ 'selection:reference-requested': SelectionData;
3804
+ 'annotation:requested': {
3805
+ selector: Selector | Selector[];
3806
+ motivation: Motivation;
3807
+ };
3808
+ 'annotation:cancel-pending': void;
3809
+ 'annotation:hover': {
3810
+ annotationId: string | null;
3811
+ };
3812
+ 'annotation:click': {
3813
+ annotationId: string;
3814
+ motivation: Motivation;
3815
+ };
3816
+ 'annotation:focus': {
3817
+ annotationId: string | null;
3818
+ };
3819
+ 'annotation:sparkle': {
3820
+ annotationId: string;
3821
+ };
3822
+ 'panel:toggle': {
3823
+ panel: string;
3824
+ };
3825
+ 'panel:open': {
3826
+ panel: string;
3827
+ scrollToAnnotationId?: string;
3828
+ motivation?: string;
3829
+ };
3830
+ 'panel:close': void;
3831
+ 'view:mode-toggled': void;
3832
+ 'toolbar:selection-changed': {
3833
+ motivation: string | null;
3834
+ };
3835
+ 'toolbar:click-changed': {
3836
+ action: string;
3837
+ };
3838
+ 'toolbar:shape-changed': {
3839
+ shape: string;
3840
+ };
3841
+ 'navigation:sidebar-toggle': void;
3842
+ 'navigation:resource-close': {
3843
+ resourceId: string;
3844
+ };
3845
+ 'navigation:resource-reorder': {
3846
+ oldIndex: number;
3847
+ newIndex: number;
3848
+ };
3849
+ 'navigation:link-clicked': {
3850
+ href: string;
3851
+ label?: string;
3852
+ };
3853
+ 'navigation:router-push': {
3854
+ path: string;
3855
+ reason?: string;
3856
+ };
3857
+ 'navigation:external-navigate': {
3858
+ url: string;
3859
+ resourceId?: string;
3860
+ cancelFallback: () => void;
3861
+ };
3862
+ 'navigation:reference-navigate': {
3863
+ documentId: string;
3864
+ };
3865
+ 'navigation:entity-type-clicked': {
3866
+ entityType: string;
3867
+ };
3868
+ 'settings:theme-changed': {
3869
+ theme: 'light' | 'dark' | 'system';
3870
+ };
3871
+ 'settings:line-numbers-toggled': void;
3872
+ 'settings:locale-changed': {
3873
+ locale: string;
3874
+ };
3875
+ 'resource:archive': void;
3876
+ 'resource:unarchive': void;
3877
+ 'resource:clone': void;
3878
+ 'job:cancel-requested': {
3879
+ jobType: 'detection' | 'generation';
3880
+ };
3881
+ 'annotation:create': {
3882
+ motivation: Motivation;
3883
+ selector: Selector | Selector[];
3884
+ body: components['schemas']['AnnotationBody'][];
3885
+ };
3886
+ 'annotation:created': {
3887
+ annotation: Annotation$2;
3888
+ };
3889
+ 'annotation:create-failed': {
3890
+ error: Error;
3891
+ };
3892
+ 'annotation:delete': {
3893
+ annotationId: string;
3894
+ };
3895
+ 'annotation:deleted': {
3896
+ annotationId: string;
3897
+ };
3898
+ 'annotation:delete-failed': {
3899
+ error: Error;
3900
+ };
3901
+ 'annotation:update-body': {
3902
+ annotationUri: string;
3903
+ resourceId: string;
3904
+ operations: Array<{
3905
+ op: 'add' | 'remove' | 'replace';
3906
+ item?: components['schemas']['AnnotationBody'];
3907
+ oldItem?: components['schemas']['AnnotationBody'];
3908
+ newItem?: components['schemas']['AnnotationBody'];
3909
+ }>;
3910
+ };
3911
+ 'annotation:body-updated': {
3912
+ annotationUri: string;
3913
+ };
3914
+ 'annotation:body-update-failed': {
3915
+ error: Error;
3916
+ };
3917
+ 'detection:start': {
3918
+ motivation: Motivation;
3919
+ options: {
3920
+ instructions?: string;
3921
+ /** Comment tone */
3922
+ tone?: 'scholarly' | 'explanatory' | 'conversational' | 'technical' | 'analytical' | 'critical' | 'balanced' | 'constructive';
3923
+ density?: number;
3924
+ entityTypes?: string[];
3925
+ includeDescriptiveReferences?: boolean;
3926
+ schemaId?: string;
3927
+ categories?: string[];
3928
+ };
3929
+ };
3930
+ 'detection:complete': {
3931
+ motivation?: Motivation;
3932
+ resourceUri?: ResourceUri;
3933
+ progress?: DetectionProgress;
3934
+ };
3935
+ 'detection:cancelled': void;
3936
+ 'detection:dismiss-progress': void;
3937
+ 'generation:start': {
3938
+ annotationUri: string;
3939
+ resourceUri: string;
3940
+ options: {
3941
+ title: string;
3942
+ prompt?: string;
3943
+ language?: string;
3944
+ temperature?: number;
3945
+ maxTokens?: number;
3946
+ context: GenerationContext;
3947
+ };
3948
+ };
3949
+ 'generation:progress': GenerationProgress;
3950
+ 'generation:complete': {
3951
+ annotationUri: string;
3952
+ progress: GenerationProgress;
3953
+ };
3954
+ 'generation:failed': {
3955
+ error: Error;
3956
+ };
3957
+ 'generation:modal-open': {
3958
+ annotationUri: string;
3959
+ resourceUri: string;
3960
+ defaultTitle: string;
3961
+ };
3962
+ 'reference:create-manual': {
3963
+ annotationUri: string;
3964
+ title: string;
3965
+ entityTypes: string[];
3966
+ };
3967
+ 'reference:link': {
3968
+ annotationUri: string;
3969
+ searchTerm: string;
3970
+ };
3971
+ 'resolution:search-requested': {
3972
+ referenceId: string;
3973
+ searchTerm: string;
3974
+ };
3975
+ 'context:retrieval-requested': {
3976
+ annotationUri: string;
3977
+ resourceUri: string;
3978
+ };
3979
+ 'context:retrieval-complete': {
3980
+ annotationUri: string;
3981
+ context: GenerationContext;
3982
+ };
3983
+ 'context:retrieval-failed': {
3984
+ annotationUri: string;
3985
+ error: Error;
3986
+ };
3987
+ };
3988
+
3989
+ /**
3990
+ * RxJS-based Event Bus
3991
+ *
3992
+ * Framework-agnostic event bus providing direct access to typed RxJS Subjects.
3993
+ *
3994
+ * Can be used in Node.js, browser, workers, CLI - anywhere RxJS runs.
3995
+ */
3996
+
3997
+ /**
3998
+ * RxJS-based event bus
3999
+ *
4000
+ * Provides direct access to RxJS Subjects for each event type.
4001
+ * Use standard RxJS patterns for emitting and subscribing.
4002
+ *
4003
+ * @example
4004
+ * ```typescript
4005
+ * const eventBus = new EventBus();
4006
+ *
4007
+ * // Emit events
4008
+ * eventBus.get('annotation:hover').next({ annotationId: 'ann-1' });
4009
+ *
4010
+ * // Subscribe to events
4011
+ * const subscription = eventBus.get('annotation:hover').subscribe(({ annotationId }) => {
4012
+ * console.log('Hover:', annotationId);
4013
+ * });
4014
+ *
4015
+ * // Use RxJS operators
4016
+ * import { debounceTime } from 'rxjs/operators';
4017
+ * eventBus.get('annotation:hover')
4018
+ * .pipe(debounceTime(100))
4019
+ * .subscribe(handleHover);
4020
+ *
4021
+ * // Cleanup
4022
+ * subscription.unsubscribe();
4023
+ * eventBus.destroy();
4024
+ * ```
4025
+ */
4026
+ declare class EventBus {
4027
+ private subjects;
4028
+ private isDestroyed;
4029
+ constructor();
4030
+ /**
4031
+ * Get the RxJS Subject for an event
4032
+ *
4033
+ * Returns a typed Subject that can be used with all RxJS operators.
4034
+ * Subjects are created lazily on first access.
4035
+ *
4036
+ * @param eventName - The event name
4037
+ * @returns The RxJS Subject for this event
4038
+ *
4039
+ * @example
4040
+ * ```typescript
4041
+ * // Emit
4042
+ * eventBus.get('annotation:hover').next({ annotationId: 'ann-1' });
4043
+ *
4044
+ * // Subscribe
4045
+ * const sub = eventBus.get('annotation:hover').subscribe(handleHover);
4046
+ *
4047
+ * // With operators
4048
+ * eventBus.get('annotation:hover')
4049
+ * .pipe(debounceTime(100), distinctUntilChanged())
4050
+ * .subscribe(handleHover);
4051
+ * ```
4052
+ */
4053
+ get<K extends keyof EventMap>(eventName: K): Subject<EventMap[K]>;
4054
+ /**
4055
+ * Destroy the event bus and complete all subjects
4056
+ *
4057
+ * After calling destroy(), no new events can be emitted or subscribed to.
4058
+ * All active subscriptions will be completed.
4059
+ */
4060
+ destroy(): void;
4061
+ /**
4062
+ * Check if the event bus has been destroyed
4063
+ */
4064
+ get destroyed(): boolean;
4065
+ }
4066
+
435
4067
  /**
436
4068
  * Backend-specific annotation utility functions
437
4069
  */
@@ -1433,10 +5065,10 @@ declare class ConfigurationError extends Error {
1433
5065
  * @semiont/core
1434
5066
  *
1435
5067
  * Core domain logic and utilities for the Semiont semantic knowledge platform.
1436
- * For OpenAPI types, import directly from @semiont/api-client.
5068
+ * OpenAPI types are generated here and exported for use across the monorepo.
1437
5069
  */
1438
5070
 
1439
5071
  declare const CORE_TYPES_VERSION = "0.1.0";
1440
5072
  declare const SDK_VERSION = "0.1.0";
1441
5073
 
1442
- export { APIError, type AWSConfig, type AnnotationAddedEvent, type AnnotationBodyUpdatedEvent, type AnnotationCategory, type AnnotationId, type AnnotationRemovedEvent, type AppConfig, type BackendServiceConfig, type BaseEvent, type BodyItem, type BodyOperation, CORE_TYPES_VERSION, CREATION_METHODS, ConfigurationError, ConflictError, type CreateAnnotationInternal, type CreationMethod, type DatabaseServiceConfig, type EntityTagAddedEvent, type EntityTagRemovedEvent, type EntityTypeStats, type Environment, type EnvironmentConfig, type EventMetadata, type EventQuery, type EventSignature, type FilesystemServiceConfig, type FrontendServiceConfig, type GoogleAuthRequest, type GraphConnection, type GraphDatabaseType, type GraphPath, type GraphServiceConfig, type InferenceServiceConfig, type JobCompletedEvent, type JobFailedEvent, type JobProgressEvent, type JobStartedEvent, type McpServiceConfig, NotFoundError, type PlatformType, type ProxyServiceConfig, type RepresentationAddedEvent, type RepresentationRemovedEvent, type ResourceAnnotations, type ResourceArchivedEvent, type ResourceClonedEvent, type ResourceCreatedEvent, type ResourceEvent, type ResourceEventType, type ResourceFilter, type ResourceId, type ResourceScopedEvent, type ResourceUnarchivedEvent, SDK_VERSION, ScriptError, type SemiontConfig, SemiontError, type ServiceConfig, type ServicePlatformConfig, type ServicesConfig, type SiteConfig, type StoredEvent, type SystemEvent, UnauthorizedError, type UpdateResourceInput, type UserId, ValidationError, type ValidationResult, annotationId, annotationIdToURI, deepMerge, didToAgent, displayConfiguration, extractResourceUriFromAnnotationUri, findBodyItem, formatErrors, getAllPlatformTypes, getAnnotationUriFromEvent, getEventType, getNodeEnvForEnvironment, hasAWSConfig, isAnnotationId, isArray, isBoolean, isDefined, isEventRelatedToAnnotation, isFunction, isNull, isNullish, isNumber, isObject, isResourceEvent$1 as isResourceEvent, isResourceId, isResourceScopedEvent, isResourceEvent as isStoredEvent, isString, isSystemEvent, isUndefined, isValidPlatformType, listEnvironmentNames, parseAndMergeConfigs, parseEnvironment, resolveEnvVars, resourceId, resourceIdToURI, uriToAnnotationId, uriToAnnotationIdOrPassthrough, uriToResourceId, userId, userToAgent, userToDid, validateEnvironment, validateEnvironmentConfig, validateSemiontConfig, validateSiteConfig };
5074
+ export { APIError, type AWSConfig, type AccessToken, type AnnotationAddedEvent, type AnnotationBodyUpdatedEvent, type AnnotationCategory, type AnnotationId, type AnnotationRemovedEvent, type AnnotationUri, type AppConfig, type AuthCode, type BackendServiceConfig, type BaseEvent, type BaseUrl, type BodyItem, type BodyOperation, CORE_TYPES_VERSION, CREATION_METHODS, type CloneToken, ConfigurationError, ConflictError, type ContentFormat$1 as ContentFormat, type CreateAnnotationInternal, type CreationMethod, type DatabaseServiceConfig, type DetectionProgress, type Email, type EntityTagAddedEvent, type EntityTagRemovedEvent, type EntityType, type EntityTypeStats, type Environment, type EnvironmentConfig, EventBus, type EventMap, type EventMetadata, type EventQuery, type EventSignature, type FilesystemServiceConfig, type FrontendServiceConfig, type GenerationContext, type GenerationProgress, type GoogleAuthRequest, type GoogleCredential, type GraphConnection, type GraphDatabaseType, type GraphPath, type GraphServiceConfig, type InferenceServiceConfig, type JobCompletedEvent, type JobFailedEvent, type JobId, type JobProgressEvent, type JobStartedEvent, type MCPToken, type McpServiceConfig, type Motivation$2 as Motivation, NotFoundError, type PlatformType, type ProxyServiceConfig, type RefreshToken, type RepresentationAddedEvent, type RepresentationRemovedEvent, type ResourceAnnotationUri, type ResourceAnnotations, type ResourceArchivedEvent, type ResourceClonedEvent, type ResourceCreatedEvent, type ResourceEvent, type ResourceEventType, type ResourceFilter, type ResourceId, type ResourceScopedEvent, type ResourceUnarchivedEvent, type ResourceUri, SDK_VERSION, ScriptError, type SearchQuery, type SelectionData, type Selector, type SemiontConfig, SemiontError, type ServiceConfig, type ServicePlatformConfig, type ServicesConfig, type SiteConfig, type StoredEvent, type SystemEvent, UnauthorizedError, type UpdateResourceInput, type UserDID, type UserId, ValidationError, type ValidationResult, accessToken, annotationId, annotationIdToURI, annotationUri, authCode, baseUrl, cloneToken, type components, deepMerge, didToAgent, displayConfiguration, email, entityType, extractResourceUriFromAnnotationUri, findBodyItem, formatErrors, getAllPlatformTypes, getAnnotationUriFromEvent, getEventType, getNodeEnvForEnvironment, googleCredential, hasAWSConfig, isAnnotationId, isArray, isBoolean, isDefined, isEventRelatedToAnnotation, isFunction, isNull, isNullish, isNumber, isObject, isResourceEvent$1 as isResourceEvent, isResourceId, isResourceScopedEvent, isResourceEvent as isStoredEvent, isString, isSystemEvent, isUndefined, isValidPlatformType, jobId, listEnvironmentNames, mcpToken, type operations, parseAndMergeConfigs, parseEnvironment, type paths, refreshToken, resolveEnvVars, resourceAnnotationUri, resourceId, resourceIdToURI, resourceUri, searchQuery, uriToAnnotationId, uriToAnnotationIdOrPassthrough, uriToResourceId, userDID, userId, userToAgent, userToDid, validateEnvironment, validateEnvironmentConfig, validateSemiontConfig, validateSiteConfig };