@djangocfg/ext-knowbase 1.0.0 → 1.0.1

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.cts DELETED
@@ -1,4398 +0,0 @@
1
- import { ConsolaInstance } from 'consola';
2
- import { z, ZodError } from 'zod';
3
-
4
- /**
5
- * Content classification
6
- * * `document` - Document
7
- * * `code` - Code
8
- * * `image` - Image
9
- * * `data` - Data
10
- * * `archive` - Archive
11
- * * `unknown` - Unknown
12
- */
13
- declare enum ArchiveItemContentType {
14
- DOCUMENT = "document",
15
- CODE = "code",
16
- IMAGE = "image",
17
- DATA = "data",
18
- ARCHIVE = "archive",
19
- UNKNOWN = "unknown"
20
- }
21
- /**
22
- * Type of content in chunk
23
- * * `text` - Text
24
- * * `code` - Code
25
- * * `heading` - Heading
26
- * * `metadata` - Metadata
27
- * * `table` - Table
28
- * * `list` - List
29
- */
30
- declare enum ArchiveItemChunkChunkType {
31
- TEXT = "text",
32
- CODE = "code",
33
- HEADING = "heading",
34
- METADATA = "metadata",
35
- TABLE = "table",
36
- LIST = "list"
37
- }
38
- /**
39
- * Type of content in chunk
40
- * * `text` - Text
41
- * * `code` - Code
42
- * * `heading` - Heading
43
- * * `metadata` - Metadata
44
- * * `table` - Table
45
- * * `list` - List
46
- */
47
- declare enum ArchiveItemChunkDetailChunkType {
48
- TEXT = "text",
49
- CODE = "code",
50
- HEADING = "heading",
51
- METADATA = "metadata",
52
- TABLE = "table",
53
- LIST = "list"
54
- }
55
- /**
56
- * Type of content in chunk
57
- * * `text` - Text
58
- * * `code` - Code
59
- * * `heading` - Heading
60
- * * `metadata` - Metadata
61
- * * `table` - Table
62
- * * `list` - List
63
- */
64
- declare enum ArchiveItemChunkRequestChunkType {
65
- TEXT = "text",
66
- CODE = "code",
67
- HEADING = "heading",
68
- METADATA = "metadata",
69
- TABLE = "table",
70
- LIST = "list"
71
- }
72
- /**
73
- * Content classification
74
- * * `document` - Document
75
- * * `code` - Code
76
- * * `image` - Image
77
- * * `data` - Data
78
- * * `archive` - Archive
79
- * * `unknown` - Unknown
80
- */
81
- declare enum ArchiveItemDetailContentType {
82
- DOCUMENT = "document",
83
- CODE = "code",
84
- IMAGE = "image",
85
- DATA = "data",
86
- ARCHIVE = "archive",
87
- UNKNOWN = "unknown"
88
- }
89
- /**
90
- * * `document` - Document
91
- * * `code` - Code
92
- * * `image` - Image
93
- * * `data` - Data
94
- * * `archive` - Archive
95
- * * `unknown` - Unknown
96
- */
97
- declare enum ArchiveSearchRequestRequestContentTypesItems {
98
- DOCUMENT = "document",
99
- CODE = "code",
100
- IMAGE = "image",
101
- DATA = "data",
102
- ARCHIVE = "archive",
103
- UNKNOWN = "unknown"
104
- }
105
- /**
106
- * * `text` - Text
107
- * * `code` - Code
108
- * * `heading` - Heading
109
- * * `metadata` - Metadata
110
- * * `table` - Table
111
- * * `list` - List
112
- */
113
- declare enum ArchiveSearchRequestRequestChunkTypesItems {
114
- TEXT = "text",
115
- CODE = "code",
116
- HEADING = "heading",
117
- METADATA = "metadata",
118
- TABLE = "table",
119
- LIST = "list"
120
- }
121
- /**
122
- * Message sender role
123
- * * `user` - User
124
- * * `assistant` - Assistant
125
- * * `system` - System
126
- */
127
- declare enum ChatMessageRole {
128
- USER = "user",
129
- ASSISTANT = "assistant",
130
- SYSTEM = "system"
131
- }
132
- /**
133
- * Archive format
134
- * * `zip` - ZIP
135
- * * `tar` - TAR
136
- * * `tar.gz` - TAR GZ
137
- * * `tar.bz2` - TAR BZ2
138
- */
139
- declare enum DocumentArchiveArchiveType {
140
- ZIP = "zip",
141
- TAR = "tar",
142
- TAR_DOT_GZ = "tar.gz",
143
- TAR_DOT_BZ2 = "tar.bz2"
144
- }
145
- /**
146
- * * `pending` - Pending
147
- * * `processing` - Processing
148
- * * `completed` - Completed
149
- * * `failed` - Failed
150
- * * `cancelled` - Cancelled
151
- */
152
- declare enum DocumentArchiveProcessingStatus {
153
- PENDING = "pending",
154
- PROCESSING = "processing",
155
- COMPLETED = "completed",
156
- FAILED = "failed",
157
- CANCELLED = "cancelled"
158
- }
159
- /**
160
- * Archive format
161
- * * `zip` - ZIP
162
- * * `tar` - TAR
163
- * * `tar.gz` - TAR GZ
164
- * * `tar.bz2` - TAR BZ2
165
- */
166
- declare enum DocumentArchiveDetailArchiveType {
167
- ZIP = "zip",
168
- TAR = "tar",
169
- TAR_DOT_GZ = "tar.gz",
170
- TAR_DOT_BZ2 = "tar.bz2"
171
- }
172
- /**
173
- * * `pending` - Pending
174
- * * `processing` - Processing
175
- * * `completed` - Completed
176
- * * `failed` - Failed
177
- * * `cancelled` - Cancelled
178
- */
179
- declare enum DocumentArchiveDetailProcessingStatus {
180
- PENDING = "pending",
181
- PROCESSING = "processing",
182
- COMPLETED = "completed",
183
- FAILED = "failed",
184
- CANCELLED = "cancelled"
185
- }
186
- /**
187
- * Archive format
188
- * * `zip` - ZIP
189
- * * `tar` - TAR
190
- * * `tar.gz` - TAR GZ
191
- * * `tar.bz2` - TAR BZ2
192
- */
193
- declare enum DocumentArchiveListArchiveType {
194
- ZIP = "zip",
195
- TAR = "tar",
196
- TAR_DOT_GZ = "tar.gz",
197
- TAR_DOT_BZ2 = "tar.bz2"
198
- }
199
- /**
200
- * * `pending` - Pending
201
- * * `processing` - Processing
202
- * * `completed` - Completed
203
- * * `failed` - Failed
204
- * * `cancelled` - Cancelled
205
- */
206
- declare enum DocumentArchiveListProcessingStatus {
207
- PENDING = "pending",
208
- PROCESSING = "processing",
209
- COMPLETED = "completed",
210
- FAILED = "failed",
211
- CANCELLED = "cancelled"
212
- }
213
- /**
214
- * Type of content in chunk
215
- * * `text` - Text
216
- * * `code` - Code
217
- * * `heading` - Heading
218
- * * `metadata` - Metadata
219
- * * `table` - Table
220
- * * `list` - List
221
- */
222
- declare enum PatchedArchiveItemChunkRequestChunkType {
223
- TEXT = "text",
224
- CODE = "code",
225
- HEADING = "heading",
226
- METADATA = "metadata",
227
- TABLE = "table",
228
- LIST = "list"
229
- }
230
-
231
- type GeneratedEnums_ArchiveItemChunkChunkType = ArchiveItemChunkChunkType;
232
- declare const GeneratedEnums_ArchiveItemChunkChunkType: typeof ArchiveItemChunkChunkType;
233
- type GeneratedEnums_ArchiveItemChunkDetailChunkType = ArchiveItemChunkDetailChunkType;
234
- declare const GeneratedEnums_ArchiveItemChunkDetailChunkType: typeof ArchiveItemChunkDetailChunkType;
235
- type GeneratedEnums_ArchiveItemChunkRequestChunkType = ArchiveItemChunkRequestChunkType;
236
- declare const GeneratedEnums_ArchiveItemChunkRequestChunkType: typeof ArchiveItemChunkRequestChunkType;
237
- type GeneratedEnums_ArchiveItemContentType = ArchiveItemContentType;
238
- declare const GeneratedEnums_ArchiveItemContentType: typeof ArchiveItemContentType;
239
- type GeneratedEnums_ArchiveItemDetailContentType = ArchiveItemDetailContentType;
240
- declare const GeneratedEnums_ArchiveItemDetailContentType: typeof ArchiveItemDetailContentType;
241
- type GeneratedEnums_ArchiveSearchRequestRequestChunkTypesItems = ArchiveSearchRequestRequestChunkTypesItems;
242
- declare const GeneratedEnums_ArchiveSearchRequestRequestChunkTypesItems: typeof ArchiveSearchRequestRequestChunkTypesItems;
243
- type GeneratedEnums_ArchiveSearchRequestRequestContentTypesItems = ArchiveSearchRequestRequestContentTypesItems;
244
- declare const GeneratedEnums_ArchiveSearchRequestRequestContentTypesItems: typeof ArchiveSearchRequestRequestContentTypesItems;
245
- type GeneratedEnums_ChatMessageRole = ChatMessageRole;
246
- declare const GeneratedEnums_ChatMessageRole: typeof ChatMessageRole;
247
- type GeneratedEnums_DocumentArchiveArchiveType = DocumentArchiveArchiveType;
248
- declare const GeneratedEnums_DocumentArchiveArchiveType: typeof DocumentArchiveArchiveType;
249
- type GeneratedEnums_DocumentArchiveDetailArchiveType = DocumentArchiveDetailArchiveType;
250
- declare const GeneratedEnums_DocumentArchiveDetailArchiveType: typeof DocumentArchiveDetailArchiveType;
251
- type GeneratedEnums_DocumentArchiveDetailProcessingStatus = DocumentArchiveDetailProcessingStatus;
252
- declare const GeneratedEnums_DocumentArchiveDetailProcessingStatus: typeof DocumentArchiveDetailProcessingStatus;
253
- type GeneratedEnums_DocumentArchiveListArchiveType = DocumentArchiveListArchiveType;
254
- declare const GeneratedEnums_DocumentArchiveListArchiveType: typeof DocumentArchiveListArchiveType;
255
- type GeneratedEnums_DocumentArchiveListProcessingStatus = DocumentArchiveListProcessingStatus;
256
- declare const GeneratedEnums_DocumentArchiveListProcessingStatus: typeof DocumentArchiveListProcessingStatus;
257
- type GeneratedEnums_DocumentArchiveProcessingStatus = DocumentArchiveProcessingStatus;
258
- declare const GeneratedEnums_DocumentArchiveProcessingStatus: typeof DocumentArchiveProcessingStatus;
259
- type GeneratedEnums_PatchedArchiveItemChunkRequestChunkType = PatchedArchiveItemChunkRequestChunkType;
260
- declare const GeneratedEnums_PatchedArchiveItemChunkRequestChunkType: typeof PatchedArchiveItemChunkRequestChunkType;
261
- declare namespace GeneratedEnums {
262
- export { GeneratedEnums_ArchiveItemChunkChunkType as ArchiveItemChunkChunkType, GeneratedEnums_ArchiveItemChunkDetailChunkType as ArchiveItemChunkDetailChunkType, GeneratedEnums_ArchiveItemChunkRequestChunkType as ArchiveItemChunkRequestChunkType, GeneratedEnums_ArchiveItemContentType as ArchiveItemContentType, GeneratedEnums_ArchiveItemDetailContentType as ArchiveItemDetailContentType, GeneratedEnums_ArchiveSearchRequestRequestChunkTypesItems as ArchiveSearchRequestRequestChunkTypesItems, GeneratedEnums_ArchiveSearchRequestRequestContentTypesItems as ArchiveSearchRequestRequestContentTypesItems, GeneratedEnums_ChatMessageRole as ChatMessageRole, GeneratedEnums_DocumentArchiveArchiveType as DocumentArchiveArchiveType, GeneratedEnums_DocumentArchiveDetailArchiveType as DocumentArchiveDetailArchiveType, GeneratedEnums_DocumentArchiveDetailProcessingStatus as DocumentArchiveDetailProcessingStatus, GeneratedEnums_DocumentArchiveListArchiveType as DocumentArchiveListArchiveType, GeneratedEnums_DocumentArchiveListProcessingStatus as DocumentArchiveListProcessingStatus, GeneratedEnums_DocumentArchiveProcessingStatus as DocumentArchiveProcessingStatus, GeneratedEnums_PatchedArchiveItemChunkRequestChunkType as PatchedArchiveItemChunkRequestChunkType };
263
- }
264
-
265
- /**
266
- *
267
- * Response model (includes read-only fields).
268
- */
269
- interface PaginatedChatResponseList$1 {
270
- /** Total number of items across all pages */
271
- count: number;
272
- /** Current page number (1-based) */
273
- page: number;
274
- /** Total number of pages */
275
- pages: number;
276
- /** Number of items per page */
277
- page_size: number;
278
- /** Whether there is a next page */
279
- has_next: boolean;
280
- /** Whether there is a previous page */
281
- has_previous: boolean;
282
- /** Next page number (null if no next page) */
283
- next_page?: number | null;
284
- /** Previous page number (null if no previous page) */
285
- previous_page?: number | null;
286
- /** Array of items for current page */
287
- results: Array<ChatResponse$1>;
288
- }
289
- /**
290
- * Chat response serializer.
291
- *
292
- * Request model (no read-only fields).
293
- */
294
- interface ChatResponseRequest$1 {
295
- message_id: string;
296
- content: string;
297
- tokens_used: number;
298
- cost_usd: number;
299
- processing_time_ms: number;
300
- model_used: string;
301
- sources?: Array<ChatSourceRequest$1> | null;
302
- }
303
- /**
304
- * Chat response serializer.
305
- *
306
- * Response model (includes read-only fields).
307
- */
308
- interface ChatResponse$1 {
309
- message_id: string;
310
- content: string;
311
- tokens_used: number;
312
- cost_usd: number;
313
- processing_time_ms: number;
314
- model_used: string;
315
- sources?: Array<ChatSource$2> | null;
316
- }
317
- /**
318
- * Chat response serializer.
319
- *
320
- * Request model (no read-only fields).
321
- */
322
- interface PatchedChatResponseRequest$1 {
323
- message_id?: string;
324
- content?: string;
325
- tokens_used?: number;
326
- cost_usd?: number;
327
- processing_time_ms?: number;
328
- model_used?: string;
329
- sources?: Array<ChatSourceRequest$1> | null;
330
- }
331
- /**
332
- * Chat history response serializer.
333
- *
334
- * Response model (includes read-only fields).
335
- */
336
- interface ChatHistory$1 {
337
- session_id: string;
338
- messages: Array<ChatMessage$2>;
339
- total_messages: number;
340
- }
341
- /**
342
- * Chat query request serializer.
343
- *
344
- * Request model (no read-only fields).
345
- */
346
- interface ChatQueryRequest$1 {
347
- /** Chat session ID (creates new if not provided) */
348
- session_id?: string | null;
349
- /** User query */
350
- query: string;
351
- /** Maximum response tokens */
352
- max_tokens?: number;
353
- /** Include source documents in response */
354
- include_sources?: boolean;
355
- }
356
- /**
357
- *
358
- * Response model (includes read-only fields).
359
- */
360
- interface PaginatedDocumentList$1 {
361
- /** Total number of items across all pages */
362
- count: number;
363
- /** Current page number (1-based) */
364
- page: number;
365
- /** Total number of pages */
366
- pages: number;
367
- /** Number of items per page */
368
- page_size: number;
369
- /** Whether there is a next page */
370
- has_next: boolean;
371
- /** Whether there is a previous page */
372
- has_previous: boolean;
373
- /** Next page number (null if no next page) */
374
- next_page?: number | null;
375
- /** Previous page number (null if no previous page) */
376
- previous_page?: number | null;
377
- /** Array of items for current page */
378
- results: Array<Document$1>;
379
- }
380
- /**
381
- * Document creation request serializer.
382
- *
383
- * Request model (no read-only fields).
384
- */
385
- interface DocumentCreateRequest$1 {
386
- /** Document title */
387
- title: string;
388
- /** Document content */
389
- content: string;
390
- /** MIME type */
391
- file_type?: string;
392
- /** Additional metadata */
393
- metadata?: Record<string, any>;
394
- }
395
- /**
396
- * Document response serializer.
397
- *
398
- * Response model (includes read-only fields).
399
- */
400
- interface Document$1 {
401
- id: string;
402
- /** Document title */
403
- title: string;
404
- /** MIME type of original file */
405
- file_type?: string;
406
- /** Original file size in bytes */
407
- file_size?: number;
408
- processing_status: string;
409
- chunks_count: number;
410
- total_tokens: number;
411
- total_cost_usd: number;
412
- created_at: string;
413
- updated_at: string;
414
- processing_started_at: string;
415
- processing_completed_at: string;
416
- processing_error: string;
417
- /** Additional document metadata */
418
- metadata?: Record<string, any> | null;
419
- }
420
- /**
421
- * Document response serializer.
422
- *
423
- * Request model (no read-only fields).
424
- */
425
- interface DocumentRequest$1 {
426
- /** Document title */
427
- title: string;
428
- /** MIME type of original file */
429
- file_type?: string;
430
- /** Original file size in bytes */
431
- file_size?: number;
432
- /** Additional document metadata */
433
- metadata?: Record<string, any> | null;
434
- }
435
- /**
436
- * Document response serializer.
437
- *
438
- * Request model (no read-only fields).
439
- */
440
- interface PatchedDocumentRequest$1 {
441
- /** Document title */
442
- title?: string;
443
- /** MIME type of original file */
444
- file_type?: string;
445
- /** Original file size in bytes */
446
- file_size?: number;
447
- /** Additional document metadata */
448
- metadata?: Record<string, any> | null;
449
- }
450
- /**
451
- * Document processing status serializer.
452
- *
453
- * Response model (includes read-only fields).
454
- */
455
- interface DocumentProcessingStatus$1 {
456
- id: string;
457
- status: string;
458
- progress: Record<string, any>;
459
- error?: string | null;
460
- processing_time_seconds?: number | null;
461
- }
462
- /**
463
- * Document processing statistics serializer.
464
- *
465
- * Response model (includes read-only fields).
466
- */
467
- interface DocumentStats$1 {
468
- total_documents: number;
469
- completed_documents: number;
470
- processing_success_rate: number;
471
- total_chunks: number;
472
- total_tokens: number;
473
- total_cost_usd: number;
474
- avg_processing_time_seconds: number;
475
- }
476
- /**
477
- *
478
- * Response model (includes read-only fields).
479
- */
480
- interface PaginatedChatSessionList$1 {
481
- /** Total number of items across all pages */
482
- count: number;
483
- /** Current page number (1-based) */
484
- page: number;
485
- /** Total number of pages */
486
- pages: number;
487
- /** Number of items per page */
488
- page_size: number;
489
- /** Whether there is a next page */
490
- has_next: boolean;
491
- /** Whether there is a previous page */
492
- has_previous: boolean;
493
- /** Next page number (null if no next page) */
494
- next_page?: number | null;
495
- /** Previous page number (null if no previous page) */
496
- previous_page?: number | null;
497
- /** Array of items for current page */
498
- results: Array<ChatSession$1>;
499
- }
500
- /**
501
- * Chat session creation request serializer.
502
- *
503
- * Request model (no read-only fields).
504
- */
505
- interface ChatSessionCreateRequest$1 {
506
- /** Session title */
507
- title?: string;
508
- /** LLM model to use */
509
- model_name?: string;
510
- /** Response creativity */
511
- temperature?: number;
512
- /** Maximum context chunks */
513
- max_context_chunks?: number;
514
- }
515
- /**
516
- * Chat session response serializer.
517
- *
518
- * Response model (includes read-only fields).
519
- */
520
- interface ChatSession$1 {
521
- id: string;
522
- /** Session title (auto-generated if empty) */
523
- title?: string;
524
- /** Whether session accepts new messages */
525
- is_active?: boolean;
526
- messages_count?: number;
527
- total_tokens_used?: number;
528
- total_cost_usd: number;
529
- /** LLM model used for this session */
530
- model_name?: string;
531
- /** Temperature setting for LLM */
532
- temperature?: number;
533
- /** Maximum chunks to include in context */
534
- max_context_chunks?: number;
535
- created_at: string;
536
- updated_at: string;
537
- }
538
- /**
539
- * Chat session response serializer.
540
- *
541
- * Request model (no read-only fields).
542
- */
543
- interface ChatSessionRequest$1 {
544
- /** Session title (auto-generated if empty) */
545
- title?: string;
546
- /** Whether session accepts new messages */
547
- is_active?: boolean;
548
- messages_count?: number;
549
- total_tokens_used?: number;
550
- /** LLM model used for this session */
551
- model_name?: string;
552
- /** Temperature setting for LLM */
553
- temperature?: number;
554
- /** Maximum chunks to include in context */
555
- max_context_chunks?: number;
556
- }
557
- /**
558
- * Chat session response serializer.
559
- *
560
- * Request model (no read-only fields).
561
- */
562
- interface PatchedChatSessionRequest$1 {
563
- /** Session title (auto-generated if empty) */
564
- title?: string;
565
- /** Whether session accepts new messages */
566
- is_active?: boolean;
567
- messages_count?: number;
568
- total_tokens_used?: number;
569
- /** LLM model used for this session */
570
- model_name?: string;
571
- /** Temperature setting for LLM */
572
- temperature?: number;
573
- /** Maximum chunks to include in context */
574
- max_context_chunks?: number;
575
- }
576
- /**
577
- *
578
- * Response model (includes read-only fields).
579
- */
580
- interface PaginatedPublicCategoryList$1 {
581
- /** Total number of items across all pages */
582
- count: number;
583
- /** Current page number (1-based) */
584
- page: number;
585
- /** Total number of pages */
586
- pages: number;
587
- /** Number of items per page */
588
- page_size: number;
589
- /** Whether there is a next page */
590
- has_next: boolean;
591
- /** Whether there is a previous page */
592
- has_previous: boolean;
593
- /** Next page number (null if no next page) */
594
- next_page?: number | null;
595
- /** Previous page number (null if no previous page) */
596
- previous_page?: number | null;
597
- /** Array of items for current page */
598
- results: Array<PublicCategory$1>;
599
- }
600
- /**
601
- * Public category serializer.
602
- *
603
- * Response model (includes read-only fields).
604
- */
605
- interface PublicCategory$1 {
606
- id: string;
607
- /** Category name */
608
- name: string;
609
- /** Category description */
610
- description?: string;
611
- }
612
- /**
613
- *
614
- * Response model (includes read-only fields).
615
- */
616
- interface PaginatedPublicDocumentListList$1 {
617
- /** Total number of items across all pages */
618
- count: number;
619
- /** Current page number (1-based) */
620
- page: number;
621
- /** Total number of pages */
622
- pages: number;
623
- /** Number of items per page */
624
- page_size: number;
625
- /** Whether there is a next page */
626
- has_next: boolean;
627
- /** Whether there is a previous page */
628
- has_previous: boolean;
629
- /** Next page number (null if no next page) */
630
- next_page?: number | null;
631
- /** Previous page number (null if no previous page) */
632
- previous_page?: number | null;
633
- /** Array of items for current page */
634
- results: Array<PublicDocumentList$1>;
635
- }
636
- /**
637
- * Public document detail serializer - only essential data for clients.
638
- *
639
- * Response model (includes read-only fields).
640
- */
641
- interface PublicDocument$1 {
642
- id: string;
643
- /** Document title */
644
- title: string;
645
- /** Full document content */
646
- content: string;
647
- category: PublicCategory$1;
648
- created_at: string;
649
- updated_at: string;
650
- }
651
- /**
652
- *
653
- * Response model (includes read-only fields).
654
- */
655
- interface PaginatedDocumentArchiveListList$1 {
656
- /** Total number of items across all pages */
657
- count: number;
658
- /** Current page number (1-based) */
659
- page: number;
660
- /** Total number of pages */
661
- pages: number;
662
- /** Number of items per page */
663
- page_size: number;
664
- /** Whether there is a next page */
665
- has_next: boolean;
666
- /** Whether there is a previous page */
667
- has_previous: boolean;
668
- /** Next page number (null if no next page) */
669
- next_page?: number | null;
670
- /** Previous page number (null if no previous page) */
671
- previous_page?: number | null;
672
- /** Array of items for current page */
673
- results: Array<DocumentArchiveList$1>;
674
- }
675
- /**
676
- * Archive processing result serializer.
677
- *
678
- * Response model (includes read-only fields).
679
- */
680
- interface ArchiveProcessingResult$1 {
681
- archive_id: string;
682
- status: string;
683
- processing_time_ms: number;
684
- items_processed: number;
685
- chunks_created: number;
686
- vectorized_chunks: number;
687
- total_cost_usd: number;
688
- error_message: string;
689
- }
690
- /**
691
- * Detailed archive serializer with items.
692
- *
693
- * Response model (includes read-only fields).
694
- */
695
- interface DocumentArchiveDetail$1 {
696
- id: string;
697
- /** Archive title */
698
- title: string;
699
- /** Archive description */
700
- description?: string;
701
- categories: Array<DocumentCategory$1>;
702
- /** Whether this archive is publicly accessible */
703
- is_public?: boolean;
704
- /** Uploaded archive file */
705
- archive_file: string;
706
- /** Original uploaded filename */
707
- original_filename: string;
708
- /** Archive size in bytes */
709
- file_size: number;
710
- /** Archive format
711
-
712
- * `zip` - ZIP
713
- * `tar` - TAR
714
- * `tar.gz` - TAR GZ
715
- * `tar.bz2` - TAR BZ2 */
716
- archive_type: DocumentArchiveDetailArchiveType;
717
- /** * `pending` - Pending
718
- * `processing` - Processing
719
- * `completed` - Completed
720
- * `failed` - Failed
721
- * `cancelled` - Cancelled */
722
- processing_status: DocumentArchiveDetailProcessingStatus;
723
- /** When processing completed */
724
- processed_at?: string | null;
725
- /** Processing time in milliseconds */
726
- processing_duration_ms: number;
727
- /** Error message if processing failed */
728
- processing_error: string;
729
- /** Total items in archive */
730
- total_items: number;
731
- /** Successfully processed items */
732
- processed_items: number;
733
- /** Total chunks created */
734
- total_chunks: number;
735
- /** Chunks with embeddings */
736
- vectorized_chunks: number;
737
- /** Total tokens across all chunks */
738
- total_tokens: number;
739
- /** Total processing cost in USD */
740
- total_cost_usd: number;
741
- /** Calculate processing progress as percentage. */
742
- processing_progress: number;
743
- /** Calculate vectorization progress as percentage. */
744
- vectorization_progress: number;
745
- /** Check if archive processing is completed. */
746
- is_processed: boolean;
747
- created_at: string;
748
- updated_at: string;
749
- items: Array<ArchiveItem$1>;
750
- /** Get hierarchical file tree. */
751
- file_tree: Record<string, any>;
752
- /** Additional archive metadata */
753
- metadata?: Record<string, any> | null;
754
- }
755
- /**
756
- * Document archive serializer.
757
- *
758
- * Request model (no read-only fields).
759
- */
760
- interface DocumentArchiveRequest$1 {
761
- /** Archive title */
762
- title: string;
763
- /** Archive description */
764
- description?: string;
765
- /** Whether this archive is publicly accessible */
766
- is_public?: boolean;
767
- }
768
- /**
769
- * Document archive serializer.
770
- *
771
- * Response model (includes read-only fields).
772
- */
773
- interface DocumentArchive$1 {
774
- id: string;
775
- /** Archive title */
776
- title: string;
777
- /** Archive description */
778
- description?: string;
779
- categories: Array<DocumentCategory$1>;
780
- /** Whether this archive is publicly accessible */
781
- is_public?: boolean;
782
- /** Uploaded archive file */
783
- archive_file: string;
784
- /** Original uploaded filename */
785
- original_filename: string;
786
- /** Archive size in bytes */
787
- file_size: number;
788
- /** Archive format
789
-
790
- * `zip` - ZIP
791
- * `tar` - TAR
792
- * `tar.gz` - TAR GZ
793
- * `tar.bz2` - TAR BZ2 */
794
- archive_type: DocumentArchiveArchiveType;
795
- /** * `pending` - Pending
796
- * `processing` - Processing
797
- * `completed` - Completed
798
- * `failed` - Failed
799
- * `cancelled` - Cancelled */
800
- processing_status: DocumentArchiveProcessingStatus;
801
- /** When processing completed */
802
- processed_at?: string | null;
803
- /** Processing time in milliseconds */
804
- processing_duration_ms: number;
805
- /** Error message if processing failed */
806
- processing_error: string;
807
- /** Total items in archive */
808
- total_items: number;
809
- /** Successfully processed items */
810
- processed_items: number;
811
- /** Total chunks created */
812
- total_chunks: number;
813
- /** Chunks with embeddings */
814
- vectorized_chunks: number;
815
- /** Total tokens across all chunks */
816
- total_tokens: number;
817
- /** Total processing cost in USD */
818
- total_cost_usd: number;
819
- /** Calculate processing progress as percentage. */
820
- processing_progress: number;
821
- /** Calculate vectorization progress as percentage. */
822
- vectorization_progress: number;
823
- /** Check if archive processing is completed. */
824
- is_processed: boolean;
825
- created_at: string;
826
- updated_at: string;
827
- }
828
- /**
829
- * Document archive serializer.
830
- *
831
- * Request model (no read-only fields).
832
- */
833
- interface PatchedDocumentArchiveRequest$1 {
834
- /** Archive title */
835
- title?: string;
836
- /** Archive description */
837
- description?: string;
838
- /** Whether this archive is publicly accessible */
839
- is_public?: boolean;
840
- }
841
- /**
842
- *
843
- * Response model (includes read-only fields).
844
- */
845
- interface PaginatedArchiveItemList$1 {
846
- /** Total number of items across all pages */
847
- count: number;
848
- /** Current page number (1-based) */
849
- page: number;
850
- /** Total number of pages */
851
- pages: number;
852
- /** Number of items per page */
853
- page_size: number;
854
- /** Whether there is a next page */
855
- has_next: boolean;
856
- /** Whether there is a previous page */
857
- has_previous: boolean;
858
- /** Next page number (null if no next page) */
859
- next_page?: number | null;
860
- /** Previous page number (null if no previous page) */
861
- previous_page?: number | null;
862
- /** Array of items for current page */
863
- results: Array<ArchiveItem$1>;
864
- }
865
- /**
866
- * Archive search request serializer.
867
- *
868
- * Request model (no read-only fields).
869
- */
870
- interface ArchiveSearchRequestRequest$1 {
871
- /** Search query */
872
- query: string;
873
- /** Filter by content types */
874
- content_types?: Array<string>;
875
- /** Filter by programming languages */
876
- languages?: Array<string>;
877
- /** Filter by chunk types */
878
- chunk_types?: Array<string>;
879
- /** Search within specific archives */
880
- archive_ids?: Array<string>;
881
- /** Maximum number of results */
882
- limit?: number;
883
- /** Minimum similarity threshold */
884
- similarity_threshold?: number;
885
- }
886
- /**
887
- *
888
- * Response model (includes read-only fields).
889
- */
890
- interface PaginatedArchiveSearchResultList$1 {
891
- /** Total number of items across all pages */
892
- count: number;
893
- /** Current page number (1-based) */
894
- page: number;
895
- /** Total number of pages */
896
- pages: number;
897
- /** Number of items per page */
898
- page_size: number;
899
- /** Whether there is a next page */
900
- has_next: boolean;
901
- /** Whether there is a previous page */
902
- has_previous: boolean;
903
- /** Next page number (null if no next page) */
904
- next_page?: number | null;
905
- /** Previous page number (null if no previous page) */
906
- previous_page?: number | null;
907
- /** Array of items for current page */
908
- results: Array<ArchiveSearchResult$1>;
909
- }
910
- /**
911
- * Chunk re-vectorization request serializer.
912
- *
913
- * Request model (no read-only fields).
914
- */
915
- interface ChunkRevectorizationRequestRequest$1 {
916
- /** List of chunk IDs to re-vectorize */
917
- chunk_ids: Array<string>;
918
- /** Force re-vectorization even if already vectorized */
919
- force?: boolean;
920
- }
921
- /**
922
- * Vectorization result serializer.
923
- *
924
- * Response model (includes read-only fields).
925
- */
926
- interface VectorizationResult$1 {
927
- vectorized_count: number;
928
- failed_count: number;
929
- total_tokens: number;
930
- total_cost: number;
931
- success_rate: number;
932
- errors: Array<string>;
933
- }
934
- /**
935
- * Archive statistics serializer.
936
- *
937
- * Response model (includes read-only fields).
938
- */
939
- interface ArchiveStatistics$1 {
940
- total_archives: number;
941
- processed_archives: number;
942
- failed_archives: number;
943
- total_items: number;
944
- total_chunks: number;
945
- total_tokens: number;
946
- total_cost: number;
947
- avg_processing_time: number;
948
- avg_items_per_archive: number;
949
- avg_chunks_per_archive: number;
950
- }
951
- /**
952
- * Vectorization statistics serializer.
953
- *
954
- * Response model (includes read-only fields).
955
- */
956
- interface VectorizationStatistics$1 {
957
- total_chunks: number;
958
- vectorized_chunks: number;
959
- pending_chunks: number;
960
- vectorization_rate: number;
961
- total_tokens: number;
962
- total_cost: number;
963
- avg_tokens_per_chunk: number;
964
- avg_cost_per_chunk: number;
965
- }
966
- /**
967
- *
968
- * Response model (includes read-only fields).
969
- */
970
- interface PaginatedArchiveItemChunkList$1 {
971
- /** Total number of items across all pages */
972
- count: number;
973
- /** Current page number (1-based) */
974
- page: number;
975
- /** Total number of pages */
976
- pages: number;
977
- /** Number of items per page */
978
- page_size: number;
979
- /** Whether there is a next page */
980
- has_next: boolean;
981
- /** Whether there is a previous page */
982
- has_previous: boolean;
983
- /** Next page number (null if no next page) */
984
- next_page?: number | null;
985
- /** Previous page number (null if no previous page) */
986
- previous_page?: number | null;
987
- /** Array of items for current page */
988
- results: Array<ArchiveItemChunk$1>;
989
- }
990
- /**
991
- * Archive item chunk serializer.
992
- *
993
- * Request model (no read-only fields).
994
- */
995
- interface ArchiveItemChunkRequest$1 {
996
- /** Chunk text content */
997
- content: string;
998
- /** Sequential chunk number within item */
999
- chunk_index: number;
1000
- /** Type of content in chunk
1001
-
1002
- * `text` - Text
1003
- * `code` - Code
1004
- * `heading` - Heading
1005
- * `metadata` - Metadata
1006
- * `table` - Table
1007
- * `list` - List */
1008
- chunk_type?: ArchiveItemChunkRequestChunkType;
1009
- }
1010
- /**
1011
- * Archive item chunk serializer.
1012
- *
1013
- * Response model (includes read-only fields).
1014
- */
1015
- interface ArchiveItemChunk$1 {
1016
- id: string;
1017
- /** Chunk text content */
1018
- content: string;
1019
- /** Sequential chunk number within item */
1020
- chunk_index: number;
1021
- /** Type of content in chunk
1022
-
1023
- * `text` - Text
1024
- * `code` - Code
1025
- * `heading` - Heading
1026
- * `metadata` - Metadata
1027
- * `table` - Table
1028
- * `list` - List */
1029
- chunk_type?: ArchiveItemChunkChunkType;
1030
- /** Number of tokens in chunk */
1031
- token_count: number;
1032
- /** Number of characters in chunk */
1033
- character_count: number;
1034
- /** Model used for embedding generation */
1035
- embedding_model: string;
1036
- /** Cost in USD for embedding generation */
1037
- embedding_cost: number;
1038
- /** Get context summary for display. */
1039
- context_summary: Record<string, any>;
1040
- created_at: string;
1041
- }
1042
- /**
1043
- * Detailed chunk serializer with full context.
1044
- *
1045
- * Response model (includes read-only fields).
1046
- */
1047
- interface ArchiveItemChunkDetail$1 {
1048
- id: string;
1049
- /** Chunk text content */
1050
- content: string;
1051
- /** Sequential chunk number within item */
1052
- chunk_index: number;
1053
- /** Type of content in chunk
1054
-
1055
- * `text` - Text
1056
- * `code` - Code
1057
- * `heading` - Heading
1058
- * `metadata` - Metadata
1059
- * `table` - Table
1060
- * `list` - List */
1061
- chunk_type?: ArchiveItemChunkDetailChunkType;
1062
- /** Number of tokens in chunk */
1063
- token_count: number;
1064
- /** Number of characters in chunk */
1065
- character_count: number;
1066
- /** Model used for embedding generation */
1067
- embedding_model: string;
1068
- /** Cost in USD for embedding generation */
1069
- embedding_cost: number;
1070
- /** Get context summary for display. */
1071
- context_summary: Record<string, any>;
1072
- created_at: string;
1073
- context_metadata: Record<string, any>;
1074
- }
1075
- /**
1076
- * Archive item chunk serializer.
1077
- *
1078
- * Request model (no read-only fields).
1079
- */
1080
- interface PatchedArchiveItemChunkRequest$1 {
1081
- /** Chunk text content */
1082
- content?: string;
1083
- /** Sequential chunk number within item */
1084
- chunk_index?: number;
1085
- /** Type of content in chunk
1086
-
1087
- * `text` - Text
1088
- * `code` - Code
1089
- * `heading` - Heading
1090
- * `metadata` - Metadata
1091
- * `table` - Table
1092
- * `list` - List */
1093
- chunk_type?: PatchedArchiveItemChunkRequestChunkType;
1094
- }
1095
- /**
1096
- * Archive item serializer.
1097
- *
1098
- * Request model (no read-only fields).
1099
- */
1100
- interface ArchiveItemRequest$1 {
1101
- /** Path within archive */
1102
- relative_path: string;
1103
- /** Item name */
1104
- item_name: string;
1105
- /** MIME type */
1106
- item_type: string;
1107
- /** Item size in bytes */
1108
- file_size?: number;
1109
- }
1110
- /**
1111
- * Archive item serializer.
1112
- *
1113
- * Response model (includes read-only fields).
1114
- */
1115
- interface ArchiveItem$1 {
1116
- id: string;
1117
- /** Path within archive */
1118
- relative_path: string;
1119
- /** Item name */
1120
- item_name: string;
1121
- /** MIME type */
1122
- item_type: string;
1123
- /** Content classification
1124
-
1125
- * `document` - Document
1126
- * `code` - Code
1127
- * `image` - Image
1128
- * `data` - Data
1129
- * `archive` - Archive
1130
- * `unknown` - Unknown */
1131
- content_type: ArchiveItemContentType;
1132
- /** Item size in bytes */
1133
- file_size?: number;
1134
- /** Whether item can be processed for chunks */
1135
- is_processable: boolean;
1136
- /** Programming language or document language */
1137
- language: string;
1138
- /** Character encoding */
1139
- encoding: string;
1140
- /** Number of chunks created */
1141
- chunks_count: number;
1142
- /** Total tokens in all chunks */
1143
- total_tokens: number;
1144
- /** Processing cost for this item */
1145
- processing_cost: number;
1146
- created_at: string;
1147
- updated_at: string;
1148
- }
1149
- /**
1150
- * Detailed archive item serializer with content.
1151
- *
1152
- * Response model (includes read-only fields).
1153
- */
1154
- interface ArchiveItemDetail$1 {
1155
- id: string;
1156
- /** Path within archive */
1157
- relative_path: string;
1158
- /** Item name */
1159
- item_name: string;
1160
- /** MIME type */
1161
- item_type: string;
1162
- /** Content classification
1163
-
1164
- * `document` - Document
1165
- * `code` - Code
1166
- * `image` - Image
1167
- * `data` - Data
1168
- * `archive` - Archive
1169
- * `unknown` - Unknown */
1170
- content_type: ArchiveItemDetailContentType;
1171
- /** Item size in bytes */
1172
- file_size?: number;
1173
- /** Whether item can be processed for chunks */
1174
- is_processable: boolean;
1175
- /** Programming language or document language */
1176
- language: string;
1177
- /** Character encoding */
1178
- encoding: string;
1179
- /** Number of chunks created */
1180
- chunks_count: number;
1181
- /** Total tokens in all chunks */
1182
- total_tokens: number;
1183
- /** Processing cost for this item */
1184
- processing_cost: number;
1185
- created_at: string;
1186
- updated_at: string;
1187
- raw_content: string;
1188
- metadata: Record<string, any>;
1189
- }
1190
- /**
1191
- * Archive item serializer.
1192
- *
1193
- * Request model (no read-only fields).
1194
- */
1195
- interface PatchedArchiveItemRequest$1 {
1196
- /** Path within archive */
1197
- relative_path?: string;
1198
- /** Item name */
1199
- item_name?: string;
1200
- /** MIME type */
1201
- item_type?: string;
1202
- /** Item size in bytes */
1203
- file_size?: number;
1204
- }
1205
- /**
1206
- * Chat source document information serializer.
1207
- *
1208
- * Request model (no read-only fields).
1209
- */
1210
- interface ChatSourceRequest$1 {
1211
- document_title: string;
1212
- chunk_content: string;
1213
- similarity: number;
1214
- }
1215
- /**
1216
- * Chat source document information serializer.
1217
- *
1218
- * Response model (includes read-only fields).
1219
- */
1220
- interface ChatSource$2 {
1221
- document_title: string;
1222
- chunk_content: string;
1223
- similarity: number;
1224
- }
1225
- /**
1226
- * Chat message response serializer.
1227
- *
1228
- * Response model (includes read-only fields).
1229
- */
1230
- interface ChatMessage$2 {
1231
- id: string;
1232
- /** Message sender role
1233
-
1234
- * `user` - User
1235
- * `assistant` - Assistant
1236
- * `system` - System */
1237
- role: ChatMessageRole;
1238
- /** Message content */
1239
- content: string;
1240
- /** Tokens used for this message */
1241
- tokens_used?: number;
1242
- cost_usd: number;
1243
- /** Processing time in milliseconds */
1244
- processing_time_ms?: number;
1245
- created_at: string;
1246
- /** IDs of chunks used for context */
1247
- context_chunks?: Record<string, any>;
1248
- }
1249
- /**
1250
- * Public document list serializer - minimal fields for listing.
1251
- *
1252
- * Response model (includes read-only fields).
1253
- */
1254
- interface PublicDocumentList$1 {
1255
- id: string;
1256
- /** Document title */
1257
- title: string;
1258
- category: PublicCategory$1;
1259
- created_at: string;
1260
- updated_at: string;
1261
- }
1262
- /**
1263
- * Simplified archive serializer for list views.
1264
- *
1265
- * Response model (includes read-only fields).
1266
- */
1267
- interface DocumentArchiveList$1 {
1268
- id: string;
1269
- /** Archive title */
1270
- title: string;
1271
- /** Archive description */
1272
- description: string;
1273
- categories: Array<DocumentCategory$1>;
1274
- /** Whether this archive is publicly accessible */
1275
- is_public: boolean;
1276
- /** Original uploaded filename */
1277
- original_filename: string;
1278
- /** Archive size in bytes */
1279
- file_size: number;
1280
- /** Archive format
1281
-
1282
- * `zip` - ZIP
1283
- * `tar` - TAR
1284
- * `tar.gz` - TAR GZ
1285
- * `tar.bz2` - TAR BZ2 */
1286
- archive_type: DocumentArchiveListArchiveType;
1287
- /** * `pending` - Pending
1288
- * `processing` - Processing
1289
- * `completed` - Completed
1290
- * `failed` - Failed
1291
- * `cancelled` - Cancelled */
1292
- processing_status: DocumentArchiveListProcessingStatus;
1293
- /** When processing completed */
1294
- processed_at?: string | null;
1295
- /** Total items in archive */
1296
- total_items: number;
1297
- /** Total chunks created */
1298
- total_chunks: number;
1299
- /** Total processing cost in USD */
1300
- total_cost_usd: number;
1301
- /** Calculate processing progress as percentage. */
1302
- processing_progress: number;
1303
- created_at: string;
1304
- }
1305
- /**
1306
- * Document category serializer.
1307
- *
1308
- * Response model (includes read-only fields).
1309
- */
1310
- interface DocumentCategory$1 {
1311
- id: string;
1312
- /** Category name */
1313
- name: string;
1314
- /** Category description */
1315
- description?: string;
1316
- /** Whether documents in this category are publicly accessible */
1317
- is_public?: boolean;
1318
- created_at: string;
1319
- }
1320
- /**
1321
- * Archive search result serializer.
1322
- *
1323
- * Response model (includes read-only fields).
1324
- */
1325
- interface ArchiveSearchResult$1 {
1326
- chunk: ArchiveItemChunk$1;
1327
- similarity_score: number;
1328
- context_summary: Record<string, any>;
1329
- archive_info: Record<string, any>;
1330
- item_info: Record<string, any>;
1331
- }
1332
-
1333
- declare namespace models {
1334
- export type { ArchiveItem$1 as ArchiveItem, ArchiveItemChunk$1 as ArchiveItemChunk, ArchiveItemChunkDetail$1 as ArchiveItemChunkDetail, ArchiveItemChunkRequest$1 as ArchiveItemChunkRequest, ArchiveItemDetail$1 as ArchiveItemDetail, ArchiveItemRequest$1 as ArchiveItemRequest, ArchiveProcessingResult$1 as ArchiveProcessingResult, ArchiveSearchRequestRequest$1 as ArchiveSearchRequestRequest, ArchiveSearchResult$1 as ArchiveSearchResult, ArchiveStatistics$1 as ArchiveStatistics, ChatHistory$1 as ChatHistory, ChatMessage$2 as ChatMessage, ChatQueryRequest$1 as ChatQueryRequest, ChatResponse$1 as ChatResponse, ChatResponseRequest$1 as ChatResponseRequest, ChatSession$1 as ChatSession, ChatSessionCreateRequest$1 as ChatSessionCreateRequest, ChatSessionRequest$1 as ChatSessionRequest, ChatSource$2 as ChatSource, ChatSourceRequest$1 as ChatSourceRequest, ChunkRevectorizationRequestRequest$1 as ChunkRevectorizationRequestRequest, Document$1 as Document, DocumentArchive$1 as DocumentArchive, DocumentArchiveDetail$1 as DocumentArchiveDetail, DocumentArchiveList$1 as DocumentArchiveList, DocumentArchiveRequest$1 as DocumentArchiveRequest, DocumentCategory$1 as DocumentCategory, DocumentCreateRequest$1 as DocumentCreateRequest, DocumentProcessingStatus$1 as DocumentProcessingStatus, DocumentRequest$1 as DocumentRequest, DocumentStats$1 as DocumentStats, PaginatedArchiveItemChunkList$1 as PaginatedArchiveItemChunkList, PaginatedArchiveItemList$1 as PaginatedArchiveItemList, PaginatedArchiveSearchResultList$1 as PaginatedArchiveSearchResultList, PaginatedChatResponseList$1 as PaginatedChatResponseList, PaginatedChatSessionList$1 as PaginatedChatSessionList, PaginatedDocumentArchiveListList$1 as PaginatedDocumentArchiveListList, PaginatedDocumentList$1 as PaginatedDocumentList, PaginatedPublicCategoryList$1 as PaginatedPublicCategoryList, PaginatedPublicDocumentListList$1 as PaginatedPublicDocumentListList, PatchedArchiveItemChunkRequest$1 as PatchedArchiveItemChunkRequest, PatchedArchiveItemRequest$1 as PatchedArchiveItemRequest, PatchedChatResponseRequest$1 as PatchedChatResponseRequest, PatchedChatSessionRequest$1 as PatchedChatSessionRequest, PatchedDocumentArchiveRequest$1 as PatchedDocumentArchiveRequest, PatchedDocumentRequest$1 as PatchedDocumentRequest, PublicCategory$1 as PublicCategory, PublicDocument$1 as PublicDocument, PublicDocumentList$1 as PublicDocumentList, VectorizationResult$1 as VectorizationResult, VectorizationStatistics$1 as VectorizationStatistics };
1335
- }
1336
-
1337
- /**
1338
- * API endpoints for Knowbase.
1339
- */
1340
- declare class ExtKnowbaseKnowbase {
1341
- private client;
1342
- constructor(client: any);
1343
- adminChatList(page?: number, page_size?: number): Promise<PaginatedChatResponseList$1>;
1344
- adminChatList(params?: {
1345
- page?: number;
1346
- page_size?: number;
1347
- }): Promise<PaginatedChatResponseList$1>;
1348
- /**
1349
- * Chat query endpoints.
1350
- */
1351
- adminChatCreate(data: ChatResponseRequest$1): Promise<ChatResponse$1>;
1352
- /**
1353
- * Chat query endpoints.
1354
- */
1355
- adminChatRetrieve(id: string): Promise<ChatResponse$1>;
1356
- /**
1357
- * Chat query endpoints.
1358
- */
1359
- adminChatUpdate(id: string, data: ChatResponseRequest$1): Promise<ChatResponse$1>;
1360
- /**
1361
- * Chat query endpoints.
1362
- */
1363
- adminChatPartialUpdate(id: string, data?: PatchedChatResponseRequest$1): Promise<ChatResponse$1>;
1364
- /**
1365
- * Chat query endpoints.
1366
- */
1367
- adminChatDestroy(id: string): Promise<void>;
1368
- /**
1369
- * Get chat history
1370
- *
1371
- * Get chat session history.
1372
- */
1373
- adminChatHistoryRetrieve(id: string): Promise<ChatHistory$1>;
1374
- /**
1375
- * Process chat query with RAG
1376
- *
1377
- * Process chat query with RAG context.
1378
- */
1379
- adminChatQueryCreate(data: ChatQueryRequest$1): Promise<ChatResponse$1>;
1380
- adminDocumentsList(page?: number, page_size?: number, status?: string): Promise<PaginatedDocumentList$1>;
1381
- adminDocumentsList(params?: {
1382
- page?: number;
1383
- page_size?: number;
1384
- status?: string;
1385
- }): Promise<PaginatedDocumentList$1>;
1386
- /**
1387
- * Upload new document
1388
- *
1389
- * Upload and process a new knowledge document
1390
- */
1391
- adminDocumentsCreate(data: DocumentCreateRequest$1): Promise<Document$1>;
1392
- /**
1393
- * Get document details
1394
- *
1395
- * Get document by ID.
1396
- */
1397
- adminDocumentsRetrieve(id: string): Promise<Document$1>;
1398
- /**
1399
- * Document management endpoints - Admin only.
1400
- */
1401
- adminDocumentsUpdate(id: string, data: DocumentRequest$1): Promise<Document$1>;
1402
- /**
1403
- * Document management endpoints - Admin only.
1404
- */
1405
- adminDocumentsPartialUpdate(id: string, data?: PatchedDocumentRequest$1): Promise<Document$1>;
1406
- /**
1407
- * Delete document
1408
- *
1409
- * Delete document and all associated chunks.
1410
- */
1411
- adminDocumentsDestroy(id: string): Promise<void>;
1412
- /**
1413
- * Reprocess document
1414
- *
1415
- * Trigger reprocessing of document chunks and embeddings
1416
- */
1417
- adminDocumentsReprocessCreate(id: string, data: DocumentRequest$1): Promise<Document$1>;
1418
- /**
1419
- * Get document processing status
1420
- *
1421
- * Get document processing status.
1422
- */
1423
- adminDocumentsStatusRetrieve(id: string): Promise<DocumentProcessingStatus$1>;
1424
- /**
1425
- * Get processing statistics
1426
- *
1427
- * Get user's document processing statistics.
1428
- */
1429
- adminDocumentsStatsRetrieve(): Promise<DocumentStats$1>;
1430
- adminSessionsList(page?: number, page_size?: number): Promise<PaginatedChatSessionList$1>;
1431
- adminSessionsList(params?: {
1432
- page?: number;
1433
- page_size?: number;
1434
- }): Promise<PaginatedChatSessionList$1>;
1435
- /**
1436
- * Create new chat session
1437
- *
1438
- * Create new chat session.
1439
- */
1440
- adminSessionsCreate(data: ChatSessionCreateRequest$1): Promise<ChatSession$1>;
1441
- /**
1442
- * Chat session management endpoints.
1443
- */
1444
- adminSessionsRetrieve(id: string): Promise<ChatSession$1>;
1445
- /**
1446
- * Chat session management endpoints.
1447
- */
1448
- adminSessionsUpdate(id: string, data: ChatSessionRequest$1): Promise<ChatSession$1>;
1449
- /**
1450
- * Chat session management endpoints.
1451
- */
1452
- adminSessionsPartialUpdate(id: string, data?: PatchedChatSessionRequest$1): Promise<ChatSession$1>;
1453
- /**
1454
- * Chat session management endpoints.
1455
- */
1456
- adminSessionsDestroy(id: string): Promise<void>;
1457
- /**
1458
- * Activate chat session
1459
- *
1460
- * Activate chat session.
1461
- */
1462
- adminSessionsActivateCreate(id: string, data: ChatSessionRequest$1): Promise<ChatSession$1>;
1463
- /**
1464
- * Archive chat session
1465
- *
1466
- * Archive (deactivate) chat session.
1467
- */
1468
- adminSessionsArchiveCreate(id: string, data: ChatSessionRequest$1): Promise<ChatSession$1>;
1469
- categoriesList(page?: number, page_size?: number): Promise<PaginatedPublicCategoryList$1>;
1470
- categoriesList(params?: {
1471
- page?: number;
1472
- page_size?: number;
1473
- }): Promise<PaginatedPublicCategoryList$1>;
1474
- /**
1475
- * Get public category details
1476
- *
1477
- * Get category details by ID (public access)
1478
- */
1479
- categoriesRetrieve(id: string): Promise<PublicCategory$1>;
1480
- documentsList(category?: string, page?: number, page_size?: number, search?: string): Promise<PaginatedPublicDocumentListList$1>;
1481
- documentsList(params?: {
1482
- category?: string;
1483
- page?: number;
1484
- page_size?: number;
1485
- search?: string;
1486
- }): Promise<PaginatedPublicDocumentListList$1>;
1487
- /**
1488
- * Get public document details
1489
- *
1490
- * Get document details by ID (public access)
1491
- */
1492
- documentsRetrieve(id: string): Promise<PublicDocument$1>;
1493
- systemArchivesList(page?: number, page_size?: number): Promise<PaginatedDocumentArchiveListList$1>;
1494
- systemArchivesList(params?: {
1495
- page?: number;
1496
- page_size?: number;
1497
- }): Promise<PaginatedDocumentArchiveListList$1>;
1498
- /**
1499
- * Upload and process archive
1500
- *
1501
- * Upload archive file and process it synchronously
1502
- */
1503
- systemArchivesCreate(data: FormData): Promise<ArchiveProcessingResult$1>;
1504
- /**
1505
- * Document archive management endpoints - Admin only.
1506
- */
1507
- systemArchivesRetrieve(id: string): Promise<DocumentArchiveDetail$1>;
1508
- /**
1509
- * Document archive management endpoints - Admin only.
1510
- */
1511
- systemArchivesUpdate(id: string, data: DocumentArchiveRequest$1): Promise<DocumentArchive$1>;
1512
- /**
1513
- * Document archive management endpoints - Admin only.
1514
- */
1515
- systemArchivesPartialUpdate(id: string, data?: PatchedDocumentArchiveRequest$1): Promise<DocumentArchive$1>;
1516
- /**
1517
- * Document archive management endpoints - Admin only.
1518
- */
1519
- systemArchivesDestroy(id: string): Promise<void>;
1520
- /**
1521
- * Get archive file tree
1522
- *
1523
- * Get hierarchical file tree structure
1524
- */
1525
- systemArchivesFileTreeRetrieve(id: string): Promise<any>;
1526
- systemArchivesItemsList(id: string, page?: number, page_size?: number): Promise<PaginatedArchiveItemList$1>;
1527
- systemArchivesItemsList(id: string, params?: {
1528
- page?: number;
1529
- page_size?: number;
1530
- }): Promise<PaginatedArchiveItemList$1>;
1531
- systemArchivesSearchCreate(id: string, data: ArchiveSearchRequestRequest$1, page?: number, page_size?: number): Promise<PaginatedArchiveSearchResultList$1>;
1532
- systemArchivesSearchCreate(id: string, data: ArchiveSearchRequestRequest$1, params?: {
1533
- page?: number;
1534
- page_size?: number;
1535
- }): Promise<PaginatedArchiveSearchResultList$1>;
1536
- /**
1537
- * Re-vectorize chunks
1538
- *
1539
- * Re-vectorize specific chunks
1540
- */
1541
- systemArchivesRevectorizeCreate(data: ChunkRevectorizationRequestRequest$1): Promise<VectorizationResult$1>;
1542
- /**
1543
- * Get archive statistics
1544
- *
1545
- * Get processing and vectorization statistics
1546
- */
1547
- systemArchivesStatisticsRetrieve(): Promise<ArchiveStatistics$1>;
1548
- /**
1549
- * Get vectorization statistics
1550
- *
1551
- * Get vectorization statistics for archives
1552
- */
1553
- systemArchivesVectorizationStatsRetrieve(): Promise<VectorizationStatistics$1>;
1554
- systemChunksList(page?: number, page_size?: number): Promise<PaginatedArchiveItemChunkList$1>;
1555
- systemChunksList(params?: {
1556
- page?: number;
1557
- page_size?: number;
1558
- }): Promise<PaginatedArchiveItemChunkList$1>;
1559
- /**
1560
- * Archive item chunk management endpoints - Admin only.
1561
- */
1562
- systemChunksCreate(data: ArchiveItemChunkRequest$1): Promise<ArchiveItemChunk$1>;
1563
- /**
1564
- * Archive item chunk management endpoints - Admin only.
1565
- */
1566
- systemChunksRetrieve(id: string): Promise<ArchiveItemChunkDetail$1>;
1567
- /**
1568
- * Archive item chunk management endpoints - Admin only.
1569
- */
1570
- systemChunksUpdate(id: string, data: ArchiveItemChunkRequest$1): Promise<ArchiveItemChunk$1>;
1571
- /**
1572
- * Archive item chunk management endpoints - Admin only.
1573
- */
1574
- systemChunksPartialUpdate(id: string, data?: PatchedArchiveItemChunkRequest$1): Promise<ArchiveItemChunk$1>;
1575
- /**
1576
- * Archive item chunk management endpoints - Admin only.
1577
- */
1578
- systemChunksDestroy(id: string): Promise<void>;
1579
- /**
1580
- * Get chunk context
1581
- *
1582
- * Get full context metadata for chunk
1583
- */
1584
- systemChunksContextRetrieve(id: string): Promise<ArchiveItemChunkDetail$1>;
1585
- /**
1586
- * Vectorize chunk
1587
- *
1588
- * Generate embedding for specific chunk
1589
- */
1590
- systemChunksVectorizeCreate(id: string, data: ArchiveItemChunkRequest$1): Promise<any>;
1591
- systemItemsList(page?: number, page_size?: number): Promise<PaginatedArchiveItemList$1>;
1592
- systemItemsList(params?: {
1593
- page?: number;
1594
- page_size?: number;
1595
- }): Promise<PaginatedArchiveItemList$1>;
1596
- /**
1597
- * Archive item management endpoints - Admin only.
1598
- */
1599
- systemItemsCreate(data: ArchiveItemRequest$1): Promise<ArchiveItem$1>;
1600
- /**
1601
- * Archive item management endpoints - Admin only.
1602
- */
1603
- systemItemsRetrieve(id: string): Promise<ArchiveItemDetail$1>;
1604
- /**
1605
- * Archive item management endpoints - Admin only.
1606
- */
1607
- systemItemsUpdate(id: string, data: ArchiveItemRequest$1): Promise<ArchiveItem$1>;
1608
- /**
1609
- * Archive item management endpoints - Admin only.
1610
- */
1611
- systemItemsPartialUpdate(id: string, data?: PatchedArchiveItemRequest$1): Promise<ArchiveItem$1>;
1612
- /**
1613
- * Archive item management endpoints - Admin only.
1614
- */
1615
- systemItemsDestroy(id: string): Promise<void>;
1616
- systemItemsChunksList(id: string, page?: number, page_size?: number): Promise<PaginatedArchiveItemChunkList$1>;
1617
- systemItemsChunksList(id: string, params?: {
1618
- page?: number;
1619
- page_size?: number;
1620
- }): Promise<PaginatedArchiveItemChunkList$1>;
1621
- /**
1622
- * Get item content
1623
- *
1624
- * Get full content of archive item
1625
- */
1626
- systemItemsContentRetrieve(id: string): Promise<ArchiveItemDetail$1>;
1627
- }
1628
-
1629
- /**
1630
- * HTTP Client Adapter Pattern
1631
- *
1632
- * Allows switching between fetch/axios/httpx without changing generated code.
1633
- * Provides unified interface for making HTTP requests.
1634
- */
1635
- interface HttpRequest {
1636
- method: string;
1637
- url: string;
1638
- headers?: Record<string, string>;
1639
- body?: any;
1640
- params?: Record<string, any>;
1641
- /** FormData for file uploads (multipart/form-data) */
1642
- formData?: FormData;
1643
- }
1644
- interface HttpResponse<T = any> {
1645
- data: T;
1646
- status: number;
1647
- statusText: string;
1648
- headers: Record<string, string>;
1649
- }
1650
- /**
1651
- * HTTP Client Adapter Interface.
1652
- * Implement this to use custom HTTP clients (axios, httpx, etc.)
1653
- */
1654
- interface HttpClientAdapter {
1655
- request<T = any>(request: HttpRequest): Promise<HttpResponse<T>>;
1656
- }
1657
- /**
1658
- * Default Fetch API adapter.
1659
- * Uses native browser fetch() with proper error handling.
1660
- */
1661
- declare class FetchAdapter implements HttpClientAdapter {
1662
- request<T = any>(request: HttpRequest): Promise<HttpResponse<T>>;
1663
- }
1664
-
1665
- /**
1666
- * API Logger with Consola
1667
- * Beautiful console logging for API requests and responses
1668
- *
1669
- * Installation:
1670
- * npm install consola
1671
- */
1672
-
1673
- /**
1674
- * Request log data
1675
- */
1676
- interface RequestLog {
1677
- method: string;
1678
- url: string;
1679
- headers?: Record<string, string>;
1680
- body?: any;
1681
- timestamp: number;
1682
- }
1683
- /**
1684
- * Response log data
1685
- */
1686
- interface ResponseLog {
1687
- status: number;
1688
- statusText: string;
1689
- data?: any;
1690
- duration: number;
1691
- timestamp: number;
1692
- }
1693
- /**
1694
- * Error log data
1695
- */
1696
- interface ErrorLog {
1697
- message: string;
1698
- statusCode?: number;
1699
- fieldErrors?: Record<string, string[]>;
1700
- duration: number;
1701
- timestamp: number;
1702
- }
1703
- /**
1704
- * Logger configuration
1705
- */
1706
- interface LoggerConfig {
1707
- /** Enable logging */
1708
- enabled: boolean;
1709
- /** Log requests */
1710
- logRequests: boolean;
1711
- /** Log responses */
1712
- logResponses: boolean;
1713
- /** Log errors */
1714
- logErrors: boolean;
1715
- /** Log request/response bodies */
1716
- logBodies: boolean;
1717
- /** Log headers (excluding sensitive ones) */
1718
- logHeaders: boolean;
1719
- /** Custom consola instance */
1720
- consola?: ConsolaInstance;
1721
- }
1722
- /**
1723
- * API Logger class
1724
- */
1725
- declare class APILogger {
1726
- private config;
1727
- private consola;
1728
- constructor(config?: Partial<LoggerConfig>);
1729
- /**
1730
- * Enable logging
1731
- */
1732
- enable(): void;
1733
- /**
1734
- * Disable logging
1735
- */
1736
- disable(): void;
1737
- /**
1738
- * Update configuration
1739
- */
1740
- setConfig(config: Partial<LoggerConfig>): void;
1741
- /**
1742
- * Filter sensitive headers
1743
- */
1744
- private filterHeaders;
1745
- /**
1746
- * Log request
1747
- */
1748
- logRequest(request: RequestLog): void;
1749
- /**
1750
- * Log response
1751
- */
1752
- logResponse(request: RequestLog, response: ResponseLog): void;
1753
- /**
1754
- * Log error
1755
- */
1756
- logError(request: RequestLog, error: ErrorLog): void;
1757
- /**
1758
- * Log general info
1759
- */
1760
- info(message: string, ...args: any[]): void;
1761
- /**
1762
- * Log warning
1763
- */
1764
- warn(message: string, ...args: any[]): void;
1765
- /**
1766
- * Log error
1767
- */
1768
- error(message: string, ...args: any[]): void;
1769
- /**
1770
- * Log debug
1771
- */
1772
- debug(message: string, ...args: any[]): void;
1773
- /**
1774
- * Log success
1775
- */
1776
- success(message: string, ...args: any[]): void;
1777
- /**
1778
- * Create a sub-logger with prefix
1779
- */
1780
- withTag(tag: string): ConsolaInstance;
1781
- }
1782
-
1783
- /**
1784
- * Retry Configuration and Utilities
1785
- *
1786
- * Provides automatic retry logic for failed HTTP requests using p-retry.
1787
- * Retries only on network errors and server errors (5xx), not client errors (4xx).
1788
- */
1789
- /**
1790
- * Information about a failed retry attempt.
1791
- */
1792
- interface FailedAttemptInfo {
1793
- /** The error that caused the failure */
1794
- error: Error;
1795
- /** The attempt number (1-indexed) */
1796
- attemptNumber: number;
1797
- /** Number of retries left */
1798
- retriesLeft: number;
1799
- }
1800
- /**
1801
- * Retry configuration options.
1802
- *
1803
- * Uses exponential backoff with jitter by default to avoid thundering herd.
1804
- */
1805
- interface RetryConfig {
1806
- /**
1807
- * Maximum number of retry attempts.
1808
- * @default 3
1809
- */
1810
- retries?: number;
1811
- /**
1812
- * Exponential backoff factor.
1813
- * @default 2
1814
- */
1815
- factor?: number;
1816
- /**
1817
- * Minimum wait time between retries (ms).
1818
- * @default 1000
1819
- */
1820
- minTimeout?: number;
1821
- /**
1822
- * Maximum wait time between retries (ms).
1823
- * @default 60000
1824
- */
1825
- maxTimeout?: number;
1826
- /**
1827
- * Add randomness to wait times (jitter).
1828
- * Helps avoid thundering herd problem.
1829
- * @default true
1830
- */
1831
- randomize?: boolean;
1832
- /**
1833
- * Callback called on each failed attempt.
1834
- */
1835
- onFailedAttempt?: (info: FailedAttemptInfo) => void;
1836
- }
1837
- /**
1838
- * Default retry configuration.
1839
- */
1840
- declare const DEFAULT_RETRY_CONFIG: Required<RetryConfig>;
1841
- /**
1842
- * Determine if an error should trigger a retry.
1843
- *
1844
- * Retries on:
1845
- * - Network errors (connection refused, timeout, etc.)
1846
- * - Server errors (5xx status codes)
1847
- * - Rate limiting (429 status code)
1848
- *
1849
- * Does NOT retry on:
1850
- * - Client errors (4xx except 429)
1851
- * - Authentication errors (401, 403)
1852
- * - Not found (404)
1853
- *
1854
- * @param error - The error to check
1855
- * @returns true if should retry, false otherwise
1856
- */
1857
- declare function shouldRetry(error: any): boolean;
1858
- /**
1859
- * Wrap a function with retry logic.
1860
- *
1861
- * @param fn - Async function to retry
1862
- * @param config - Retry configuration
1863
- * @returns Result of the function
1864
- *
1865
- * @example
1866
- * ```typescript
1867
- * const result = await withRetry(
1868
- * async () => fetch('https://api.example.com/users'),
1869
- * { retries: 5, minTimeout: 2000 }
1870
- * );
1871
- * ```
1872
- */
1873
- declare function withRetry<T>(fn: () => Promise<T>, config?: RetryConfig): Promise<T>;
1874
-
1875
- /**
1876
- * Async API client for Django CFG API.
1877
- *
1878
- * Usage:
1879
- * ```typescript
1880
- * const client = new APIClient('https://api.example.com');
1881
- * const users = await client.users.list();
1882
- * const post = await client.posts.create(newPost);
1883
- *
1884
- * // Custom HTTP adapter (e.g., Axios)
1885
- * const client = new APIClient('https://api.example.com', {
1886
- * httpClient: new AxiosAdapter()
1887
- * });
1888
- * ```
1889
- */
1890
- declare class APIClient {
1891
- private baseUrl;
1892
- private httpClient;
1893
- private logger;
1894
- private retryConfig;
1895
- ext_knowbase_knowbase: ExtKnowbaseKnowbase;
1896
- constructor(baseUrl: string, options?: {
1897
- httpClient?: HttpClientAdapter;
1898
- loggerConfig?: Partial<LoggerConfig>;
1899
- retryConfig?: RetryConfig;
1900
- });
1901
- /**
1902
- * Get CSRF token from cookies (for SessionAuthentication).
1903
- *
1904
- * Returns null if cookie doesn't exist (JWT-only auth).
1905
- */
1906
- getCsrfToken(): string | null;
1907
- /**
1908
- * Make HTTP request with Django CSRF and session handling.
1909
- * Automatically retries on network errors and 5xx server errors.
1910
- */
1911
- request<T>(method: string, path: string, options?: {
1912
- params?: Record<string, any>;
1913
- body?: any;
1914
- formData?: FormData;
1915
- headers?: Record<string, string>;
1916
- }): Promise<T>;
1917
- /**
1918
- * Internal request method (without retry wrapper).
1919
- * Used by request() method with optional retry logic.
1920
- */
1921
- private _makeRequest;
1922
- }
1923
-
1924
- /**
1925
- * Storage adapters for cross-platform token storage.
1926
- *
1927
- * Supports:
1928
- * - LocalStorage (browser)
1929
- * - Cookies (SSR/browser)
1930
- * - Memory (Node.js/Electron/testing)
1931
- */
1932
-
1933
- /**
1934
- * Storage adapter interface for cross-platform token storage.
1935
- */
1936
- interface StorageAdapter {
1937
- getItem(key: string): string | null;
1938
- setItem(key: string, value: string): void;
1939
- removeItem(key: string): void;
1940
- }
1941
- /**
1942
- * LocalStorage adapter with safe try-catch for browser environments.
1943
- * Works in modern browsers with localStorage support.
1944
- *
1945
- * Note: This adapter uses window.localStorage and should only be used in browser/client environments.
1946
- * For server-side usage, use MemoryStorageAdapter or CookieStorageAdapter instead.
1947
- */
1948
- declare class LocalStorageAdapter implements StorageAdapter {
1949
- private logger?;
1950
- constructor(logger?: APILogger);
1951
- getItem(key: string): string | null;
1952
- setItem(key: string, value: string): void;
1953
- removeItem(key: string): void;
1954
- }
1955
- /**
1956
- * Cookie-based storage adapter for SSR and browser environments.
1957
- * Useful for Next.js, Nuxt.js, and other SSR frameworks.
1958
- */
1959
- declare class CookieStorageAdapter implements StorageAdapter {
1960
- private logger?;
1961
- constructor(logger?: APILogger);
1962
- getItem(key: string): string | null;
1963
- setItem(key: string, value: string): void;
1964
- removeItem(key: string): void;
1965
- }
1966
- /**
1967
- * In-memory storage adapter for Node.js, Electron, and testing environments.
1968
- * Data is stored in RAM and cleared when process exits.
1969
- */
1970
- declare class MemoryStorageAdapter implements StorageAdapter {
1971
- private storage;
1972
- private logger?;
1973
- constructor(logger?: APILogger);
1974
- getItem(key: string): string | null;
1975
- setItem(key: string, value: string): void;
1976
- removeItem(key: string): void;
1977
- }
1978
-
1979
- /**
1980
- * Zod schema for ArchiveItem
1981
- *
1982
- * This schema provides runtime validation and type inference.
1983
- * * Archive item serializer.
1984
- * */
1985
-
1986
- /**
1987
- * Archive item serializer.
1988
- */
1989
- declare const ArchiveItemSchema: z.ZodObject<{
1990
- id: z.ZodString;
1991
- relative_path: z.ZodString;
1992
- item_name: z.ZodString;
1993
- item_type: z.ZodString;
1994
- content_type: z.ZodEnum<typeof ArchiveItemContentType>;
1995
- file_size: z.ZodOptional<z.ZodInt>;
1996
- is_processable: z.ZodBoolean;
1997
- language: z.ZodString;
1998
- encoding: z.ZodString;
1999
- chunks_count: z.ZodInt;
2000
- total_tokens: z.ZodInt;
2001
- processing_cost: z.ZodNumber;
2002
- created_at: z.ZodISODateTime;
2003
- updated_at: z.ZodISODateTime;
2004
- }, z.core.$strip>;
2005
- /**
2006
- * Infer TypeScript type from Zod schema
2007
- */
2008
- type ArchiveItem = z.infer<typeof ArchiveItemSchema>;
2009
-
2010
- /**
2011
- * Zod schema for ArchiveItemChunk
2012
- *
2013
- * This schema provides runtime validation and type inference.
2014
- * * Archive item chunk serializer.
2015
- * */
2016
-
2017
- /**
2018
- * Archive item chunk serializer.
2019
- */
2020
- declare const ArchiveItemChunkSchema: z.ZodObject<{
2021
- id: z.ZodString;
2022
- content: z.ZodString;
2023
- chunk_index: z.ZodInt;
2024
- chunk_type: z.ZodOptional<z.ZodEnum<typeof ArchiveItemChunkChunkType>>;
2025
- token_count: z.ZodInt;
2026
- character_count: z.ZodInt;
2027
- embedding_model: z.ZodString;
2028
- embedding_cost: z.ZodNumber;
2029
- context_summary: z.ZodObject<{}, z.core.$strip>;
2030
- created_at: z.ZodISODateTime;
2031
- }, z.core.$strip>;
2032
- /**
2033
- * Infer TypeScript type from Zod schema
2034
- */
2035
- type ArchiveItemChunk = z.infer<typeof ArchiveItemChunkSchema>;
2036
-
2037
- /**
2038
- * Zod schema for ArchiveItemChunkDetail
2039
- *
2040
- * This schema provides runtime validation and type inference.
2041
- * * Detailed chunk serializer with full context.
2042
- * */
2043
-
2044
- /**
2045
- * Detailed chunk serializer with full context.
2046
- */
2047
- declare const ArchiveItemChunkDetailSchema: z.ZodObject<{
2048
- id: z.ZodString;
2049
- content: z.ZodString;
2050
- chunk_index: z.ZodInt;
2051
- chunk_type: z.ZodOptional<z.ZodEnum<typeof ArchiveItemChunkDetailChunkType>>;
2052
- token_count: z.ZodInt;
2053
- character_count: z.ZodInt;
2054
- embedding_model: z.ZodString;
2055
- embedding_cost: z.ZodNumber;
2056
- context_summary: z.ZodObject<{}, z.core.$strip>;
2057
- created_at: z.ZodISODateTime;
2058
- context_metadata: z.ZodRecord<z.ZodString, z.ZodAny>;
2059
- }, z.core.$strip>;
2060
- /**
2061
- * Infer TypeScript type from Zod schema
2062
- */
2063
- type ArchiveItemChunkDetail = z.infer<typeof ArchiveItemChunkDetailSchema>;
2064
-
2065
- /**
2066
- * Zod schema for ArchiveItemChunkRequest
2067
- *
2068
- * This schema provides runtime validation and type inference.
2069
- * * Archive item chunk serializer.
2070
- * */
2071
-
2072
- /**
2073
- * Archive item chunk serializer.
2074
- */
2075
- declare const ArchiveItemChunkRequestSchema: z.ZodObject<{
2076
- content: z.ZodString;
2077
- chunk_index: z.ZodInt;
2078
- chunk_type: z.ZodOptional<z.ZodEnum<typeof ArchiveItemChunkRequestChunkType>>;
2079
- }, z.core.$strip>;
2080
- /**
2081
- * Infer TypeScript type from Zod schema
2082
- */
2083
- type ArchiveItemChunkRequest = z.infer<typeof ArchiveItemChunkRequestSchema>;
2084
-
2085
- /**
2086
- * Zod schema for ArchiveItemDetail
2087
- *
2088
- * This schema provides runtime validation and type inference.
2089
- * * Detailed archive item serializer with content.
2090
- * */
2091
-
2092
- /**
2093
- * Detailed archive item serializer with content.
2094
- */
2095
- declare const ArchiveItemDetailSchema: z.ZodObject<{
2096
- id: z.ZodString;
2097
- relative_path: z.ZodString;
2098
- item_name: z.ZodString;
2099
- item_type: z.ZodString;
2100
- content_type: z.ZodEnum<typeof ArchiveItemDetailContentType>;
2101
- file_size: z.ZodOptional<z.ZodInt>;
2102
- is_processable: z.ZodBoolean;
2103
- language: z.ZodString;
2104
- encoding: z.ZodString;
2105
- chunks_count: z.ZodInt;
2106
- total_tokens: z.ZodInt;
2107
- processing_cost: z.ZodNumber;
2108
- created_at: z.ZodISODateTime;
2109
- updated_at: z.ZodISODateTime;
2110
- raw_content: z.ZodString;
2111
- metadata: z.ZodRecord<z.ZodString, z.ZodAny>;
2112
- }, z.core.$strip>;
2113
- /**
2114
- * Infer TypeScript type from Zod schema
2115
- */
2116
- type ArchiveItemDetail = z.infer<typeof ArchiveItemDetailSchema>;
2117
-
2118
- /**
2119
- * Zod schema for ArchiveItemRequest
2120
- *
2121
- * This schema provides runtime validation and type inference.
2122
- * * Archive item serializer.
2123
- * */
2124
-
2125
- /**
2126
- * Archive item serializer.
2127
- */
2128
- declare const ArchiveItemRequestSchema: z.ZodObject<{
2129
- relative_path: z.ZodString;
2130
- item_name: z.ZodString;
2131
- item_type: z.ZodString;
2132
- file_size: z.ZodOptional<z.ZodInt>;
2133
- }, z.core.$strip>;
2134
- /**
2135
- * Infer TypeScript type from Zod schema
2136
- */
2137
- type ArchiveItemRequest = z.infer<typeof ArchiveItemRequestSchema>;
2138
-
2139
- /**
2140
- * Zod schema for ArchiveProcessingResult
2141
- *
2142
- * This schema provides runtime validation and type inference.
2143
- * * Archive processing result serializer.
2144
- * */
2145
-
2146
- /**
2147
- * Archive processing result serializer.
2148
- */
2149
- declare const ArchiveProcessingResultSchema: z.ZodObject<{
2150
- archive_id: z.ZodString;
2151
- status: z.ZodString;
2152
- processing_time_ms: z.ZodInt;
2153
- items_processed: z.ZodInt;
2154
- chunks_created: z.ZodInt;
2155
- vectorized_chunks: z.ZodInt;
2156
- total_cost_usd: z.ZodNumber;
2157
- error_message: z.ZodString;
2158
- }, z.core.$strip>;
2159
- /**
2160
- * Infer TypeScript type from Zod schema
2161
- */
2162
- type ArchiveProcessingResult = z.infer<typeof ArchiveProcessingResultSchema>;
2163
-
2164
- /**
2165
- * Zod schema for ArchiveSearchRequestRequest
2166
- *
2167
- * This schema provides runtime validation and type inference.
2168
- * * Archive search request serializer.
2169
- * */
2170
-
2171
- /**
2172
- * Archive search request serializer.
2173
- */
2174
- declare const ArchiveSearchRequestRequestSchema: z.ZodObject<{
2175
- query: z.ZodString;
2176
- content_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
2177
- languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
2178
- chunk_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
2179
- archive_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
2180
- limit: z.ZodOptional<z.ZodInt>;
2181
- similarity_threshold: z.ZodOptional<z.ZodNumber>;
2182
- }, z.core.$strip>;
2183
- /**
2184
- * Infer TypeScript type from Zod schema
2185
- */
2186
- type ArchiveSearchRequestRequest = z.infer<typeof ArchiveSearchRequestRequestSchema>;
2187
-
2188
- /**
2189
- * Archive search result serializer.
2190
- */
2191
- declare const ArchiveSearchResultSchema: z.ZodObject<{
2192
- chunk: z.ZodObject<{
2193
- id: z.ZodString;
2194
- content: z.ZodString;
2195
- chunk_index: z.ZodInt;
2196
- chunk_type: z.ZodOptional<z.ZodEnum<typeof ArchiveItemChunkChunkType>>;
2197
- token_count: z.ZodInt;
2198
- character_count: z.ZodInt;
2199
- embedding_model: z.ZodString;
2200
- embedding_cost: z.ZodNumber;
2201
- context_summary: z.ZodObject<{}, z.core.$strip>;
2202
- created_at: z.ZodISODateTime;
2203
- }, z.core.$strip>;
2204
- similarity_score: z.ZodNumber;
2205
- context_summary: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>;
2206
- archive_info: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>;
2207
- item_info: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>;
2208
- }, z.core.$strip>;
2209
- /**
2210
- * Infer TypeScript type from Zod schema
2211
- */
2212
- type ArchiveSearchResult = z.infer<typeof ArchiveSearchResultSchema>;
2213
-
2214
- /**
2215
- * Zod schema for ArchiveStatistics
2216
- *
2217
- * This schema provides runtime validation and type inference.
2218
- * * Archive statistics serializer.
2219
- * */
2220
-
2221
- /**
2222
- * Archive statistics serializer.
2223
- */
2224
- declare const ArchiveStatisticsSchema: z.ZodObject<{
2225
- total_archives: z.ZodInt;
2226
- processed_archives: z.ZodInt;
2227
- failed_archives: z.ZodInt;
2228
- total_items: z.ZodInt;
2229
- total_chunks: z.ZodInt;
2230
- total_tokens: z.ZodInt;
2231
- total_cost: z.ZodNumber;
2232
- avg_processing_time: z.ZodNumber;
2233
- avg_items_per_archive: z.ZodNumber;
2234
- avg_chunks_per_archive: z.ZodNumber;
2235
- }, z.core.$strip>;
2236
- /**
2237
- * Infer TypeScript type from Zod schema
2238
- */
2239
- type ArchiveStatistics = z.infer<typeof ArchiveStatisticsSchema>;
2240
-
2241
- /**
2242
- * Chat history response serializer.
2243
- */
2244
- declare const ChatHistorySchema: z.ZodObject<{
2245
- session_id: z.ZodString;
2246
- messages: z.ZodArray<z.ZodObject<{
2247
- id: z.ZodString;
2248
- role: z.ZodEnum<typeof ChatMessageRole>;
2249
- content: z.ZodString;
2250
- tokens_used: z.ZodOptional<z.ZodInt>;
2251
- cost_usd: z.ZodNumber;
2252
- processing_time_ms: z.ZodOptional<z.ZodInt>;
2253
- created_at: z.ZodISODateTime;
2254
- context_chunks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2255
- }, z.core.$strip>>;
2256
- total_messages: z.ZodInt;
2257
- }, z.core.$strip>;
2258
- /**
2259
- * Infer TypeScript type from Zod schema
2260
- */
2261
- type ChatHistory = z.infer<typeof ChatHistorySchema>;
2262
-
2263
- /**
2264
- * Zod schema for ChatMessage
2265
- *
2266
- * This schema provides runtime validation and type inference.
2267
- * * Chat message response serializer.
2268
- * */
2269
-
2270
- /**
2271
- * Chat message response serializer.
2272
- */
2273
- declare const ChatMessageSchema: z.ZodObject<{
2274
- id: z.ZodString;
2275
- role: z.ZodEnum<typeof ChatMessageRole>;
2276
- content: z.ZodString;
2277
- tokens_used: z.ZodOptional<z.ZodInt>;
2278
- cost_usd: z.ZodNumber;
2279
- processing_time_ms: z.ZodOptional<z.ZodInt>;
2280
- created_at: z.ZodISODateTime;
2281
- context_chunks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2282
- }, z.core.$strip>;
2283
- /**
2284
- * Infer TypeScript type from Zod schema
2285
- */
2286
- type ChatMessage$1 = z.infer<typeof ChatMessageSchema>;
2287
-
2288
- /**
2289
- * Zod schema for ChatQueryRequest
2290
- *
2291
- * This schema provides runtime validation and type inference.
2292
- * * Chat query request serializer.
2293
- * */
2294
-
2295
- /**
2296
- * Chat query request serializer.
2297
- */
2298
- declare const ChatQueryRequestSchema: z.ZodObject<{
2299
- session_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2300
- query: z.ZodString;
2301
- max_tokens: z.ZodOptional<z.ZodInt>;
2302
- include_sources: z.ZodOptional<z.ZodBoolean>;
2303
- }, z.core.$strip>;
2304
- /**
2305
- * Infer TypeScript type from Zod schema
2306
- */
2307
- type ChatQueryRequest = z.infer<typeof ChatQueryRequestSchema>;
2308
-
2309
- /**
2310
- * Zod schema for ChatResponse
2311
- *
2312
- * This schema provides runtime validation and type inference.
2313
- * * Chat response serializer.
2314
- * */
2315
-
2316
- /**
2317
- * Chat response serializer.
2318
- */
2319
- declare const ChatResponseSchema: z.ZodObject<{
2320
- message_id: z.ZodString;
2321
- content: z.ZodString;
2322
- tokens_used: z.ZodInt;
2323
- cost_usd: z.ZodNumber;
2324
- processing_time_ms: z.ZodInt;
2325
- model_used: z.ZodString;
2326
- sources: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2327
- document_title: z.ZodString;
2328
- chunk_content: z.ZodString;
2329
- similarity: z.ZodNumber;
2330
- }, z.core.$strip>>>>;
2331
- }, z.core.$strip>;
2332
- /**
2333
- * Infer TypeScript type from Zod schema
2334
- */
2335
- type ChatResponse = z.infer<typeof ChatResponseSchema>;
2336
-
2337
- /**
2338
- * Zod schema for ChatResponseRequest
2339
- *
2340
- * This schema provides runtime validation and type inference.
2341
- * * Chat response serializer.
2342
- * */
2343
-
2344
- /**
2345
- * Chat response serializer.
2346
- */
2347
- declare const ChatResponseRequestSchema: z.ZodObject<{
2348
- message_id: z.ZodString;
2349
- content: z.ZodString;
2350
- tokens_used: z.ZodInt;
2351
- cost_usd: z.ZodNumber;
2352
- processing_time_ms: z.ZodInt;
2353
- model_used: z.ZodString;
2354
- sources: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2355
- document_title: z.ZodString;
2356
- chunk_content: z.ZodString;
2357
- similarity: z.ZodNumber;
2358
- }, z.core.$strip>>>>;
2359
- }, z.core.$strip>;
2360
- /**
2361
- * Infer TypeScript type from Zod schema
2362
- */
2363
- type ChatResponseRequest = z.infer<typeof ChatResponseRequestSchema>;
2364
-
2365
- /**
2366
- * Zod schema for ChatSession
2367
- *
2368
- * This schema provides runtime validation and type inference.
2369
- * * Chat session response serializer.
2370
- * */
2371
-
2372
- /**
2373
- * Chat session response serializer.
2374
- */
2375
- declare const ChatSessionSchema: z.ZodObject<{
2376
- id: z.ZodString;
2377
- title: z.ZodOptional<z.ZodString>;
2378
- is_active: z.ZodOptional<z.ZodBoolean>;
2379
- messages_count: z.ZodOptional<z.ZodInt>;
2380
- total_tokens_used: z.ZodOptional<z.ZodInt>;
2381
- total_cost_usd: z.ZodNumber;
2382
- model_name: z.ZodOptional<z.ZodString>;
2383
- temperature: z.ZodOptional<z.ZodNumber>;
2384
- max_context_chunks: z.ZodOptional<z.ZodInt>;
2385
- created_at: z.ZodISODateTime;
2386
- updated_at: z.ZodISODateTime;
2387
- }, z.core.$strip>;
2388
- /**
2389
- * Infer TypeScript type from Zod schema
2390
- */
2391
- type ChatSession = z.infer<typeof ChatSessionSchema>;
2392
-
2393
- /**
2394
- * Zod schema for ChatSessionCreateRequest
2395
- *
2396
- * This schema provides runtime validation and type inference.
2397
- * * Chat session creation request serializer.
2398
- * */
2399
-
2400
- /**
2401
- * Chat session creation request serializer.
2402
- */
2403
- declare const ChatSessionCreateRequestSchema: z.ZodObject<{
2404
- title: z.ZodOptional<z.ZodString>;
2405
- model_name: z.ZodOptional<z.ZodString>;
2406
- temperature: z.ZodOptional<z.ZodNumber>;
2407
- max_context_chunks: z.ZodOptional<z.ZodInt>;
2408
- }, z.core.$strip>;
2409
- /**
2410
- * Infer TypeScript type from Zod schema
2411
- */
2412
- type ChatSessionCreateRequest = z.infer<typeof ChatSessionCreateRequestSchema>;
2413
-
2414
- /**
2415
- * Zod schema for ChatSessionRequest
2416
- *
2417
- * This schema provides runtime validation and type inference.
2418
- * * Chat session response serializer.
2419
- * */
2420
-
2421
- /**
2422
- * Chat session response serializer.
2423
- */
2424
- declare const ChatSessionRequestSchema: z.ZodObject<{
2425
- title: z.ZodOptional<z.ZodString>;
2426
- is_active: z.ZodOptional<z.ZodBoolean>;
2427
- messages_count: z.ZodOptional<z.ZodInt>;
2428
- total_tokens_used: z.ZodOptional<z.ZodInt>;
2429
- model_name: z.ZodOptional<z.ZodString>;
2430
- temperature: z.ZodOptional<z.ZodNumber>;
2431
- max_context_chunks: z.ZodOptional<z.ZodInt>;
2432
- }, z.core.$strip>;
2433
- /**
2434
- * Infer TypeScript type from Zod schema
2435
- */
2436
- type ChatSessionRequest = z.infer<typeof ChatSessionRequestSchema>;
2437
-
2438
- /**
2439
- * Zod schema for ChatSource
2440
- *
2441
- * This schema provides runtime validation and type inference.
2442
- * * Chat source document information serializer.
2443
- * */
2444
-
2445
- /**
2446
- * Chat source document information serializer.
2447
- */
2448
- declare const ChatSourceSchema: z.ZodObject<{
2449
- document_title: z.ZodString;
2450
- chunk_content: z.ZodString;
2451
- similarity: z.ZodNumber;
2452
- }, z.core.$strip>;
2453
- /**
2454
- * Infer TypeScript type from Zod schema
2455
- */
2456
- type ChatSource$1 = z.infer<typeof ChatSourceSchema>;
2457
-
2458
- /**
2459
- * Zod schema for ChatSourceRequest
2460
- *
2461
- * This schema provides runtime validation and type inference.
2462
- * * Chat source document information serializer.
2463
- * */
2464
-
2465
- /**
2466
- * Chat source document information serializer.
2467
- */
2468
- declare const ChatSourceRequestSchema: z.ZodObject<{
2469
- document_title: z.ZodString;
2470
- chunk_content: z.ZodString;
2471
- similarity: z.ZodNumber;
2472
- }, z.core.$strip>;
2473
- /**
2474
- * Infer TypeScript type from Zod schema
2475
- */
2476
- type ChatSourceRequest = z.infer<typeof ChatSourceRequestSchema>;
2477
-
2478
- /**
2479
- * Zod schema for ChunkRevectorizationRequestRequest
2480
- *
2481
- * This schema provides runtime validation and type inference.
2482
- * * Chunk re-vectorization request serializer.
2483
- * */
2484
-
2485
- /**
2486
- * Chunk re-vectorization request serializer.
2487
- */
2488
- declare const ChunkRevectorizationRequestRequestSchema: z.ZodObject<{
2489
- chunk_ids: z.ZodArray<z.ZodString>;
2490
- force: z.ZodOptional<z.ZodBoolean>;
2491
- }, z.core.$strip>;
2492
- /**
2493
- * Infer TypeScript type from Zod schema
2494
- */
2495
- type ChunkRevectorizationRequestRequest = z.infer<typeof ChunkRevectorizationRequestRequestSchema>;
2496
-
2497
- /**
2498
- * Zod schema for Document
2499
- *
2500
- * This schema provides runtime validation and type inference.
2501
- * * Document response serializer.
2502
- * */
2503
-
2504
- /**
2505
- * Document response serializer.
2506
- */
2507
- declare const DocumentSchema: z.ZodObject<{
2508
- id: z.ZodString;
2509
- title: z.ZodString;
2510
- file_type: z.ZodOptional<z.ZodString>;
2511
- file_size: z.ZodOptional<z.ZodInt>;
2512
- processing_status: z.ZodString;
2513
- chunks_count: z.ZodInt;
2514
- total_tokens: z.ZodInt;
2515
- total_cost_usd: z.ZodNumber;
2516
- created_at: z.ZodISODateTime;
2517
- updated_at: z.ZodISODateTime;
2518
- processing_started_at: z.ZodISODateTime;
2519
- processing_completed_at: z.ZodISODateTime;
2520
- processing_error: z.ZodString;
2521
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2522
- }, z.core.$strip>;
2523
- /**
2524
- * Infer TypeScript type from Zod schema
2525
- */
2526
- type Document = z.infer<typeof DocumentSchema>;
2527
-
2528
- /**
2529
- * Zod schema for DocumentArchive
2530
- *
2531
- * This schema provides runtime validation and type inference.
2532
- * * Document archive serializer.
2533
- * */
2534
-
2535
- /**
2536
- * Document archive serializer.
2537
- */
2538
- declare const DocumentArchiveSchema: z.ZodObject<{
2539
- id: z.ZodString;
2540
- title: z.ZodString;
2541
- description: z.ZodOptional<z.ZodString>;
2542
- categories: z.ZodArray<z.ZodObject<{
2543
- id: z.ZodString;
2544
- name: z.ZodString;
2545
- description: z.ZodOptional<z.ZodString>;
2546
- is_public: z.ZodOptional<z.ZodBoolean>;
2547
- created_at: z.ZodISODateTime;
2548
- }, z.core.$strip>>;
2549
- is_public: z.ZodOptional<z.ZodBoolean>;
2550
- archive_file: z.ZodURL;
2551
- original_filename: z.ZodString;
2552
- file_size: z.ZodInt;
2553
- archive_type: z.ZodEnum<typeof DocumentArchiveArchiveType>;
2554
- processing_status: z.ZodEnum<typeof DocumentArchiveProcessingStatus>;
2555
- processed_at: z.ZodNullable<z.ZodISODateTime>;
2556
- processing_duration_ms: z.ZodInt;
2557
- processing_error: z.ZodString;
2558
- total_items: z.ZodInt;
2559
- processed_items: z.ZodInt;
2560
- total_chunks: z.ZodInt;
2561
- vectorized_chunks: z.ZodInt;
2562
- total_tokens: z.ZodInt;
2563
- total_cost_usd: z.ZodNumber;
2564
- processing_progress: z.ZodNumber;
2565
- vectorization_progress: z.ZodNumber;
2566
- is_processed: z.ZodBoolean;
2567
- created_at: z.ZodISODateTime;
2568
- updated_at: z.ZodISODateTime;
2569
- }, z.core.$strip>;
2570
- /**
2571
- * Infer TypeScript type from Zod schema
2572
- */
2573
- type DocumentArchive = z.infer<typeof DocumentArchiveSchema>;
2574
-
2575
- /**
2576
- * Zod schema for DocumentArchiveDetail
2577
- *
2578
- * This schema provides runtime validation and type inference.
2579
- * * Detailed archive serializer with items.
2580
- * */
2581
-
2582
- /**
2583
- * Detailed archive serializer with items.
2584
- */
2585
- declare const DocumentArchiveDetailSchema: z.ZodObject<{
2586
- id: z.ZodString;
2587
- title: z.ZodString;
2588
- description: z.ZodOptional<z.ZodString>;
2589
- categories: z.ZodArray<z.ZodObject<{
2590
- id: z.ZodString;
2591
- name: z.ZodString;
2592
- description: z.ZodOptional<z.ZodString>;
2593
- is_public: z.ZodOptional<z.ZodBoolean>;
2594
- created_at: z.ZodISODateTime;
2595
- }, z.core.$strip>>;
2596
- is_public: z.ZodOptional<z.ZodBoolean>;
2597
- archive_file: z.ZodURL;
2598
- original_filename: z.ZodString;
2599
- file_size: z.ZodInt;
2600
- archive_type: z.ZodEnum<typeof DocumentArchiveDetailArchiveType>;
2601
- processing_status: z.ZodEnum<typeof DocumentArchiveDetailProcessingStatus>;
2602
- processed_at: z.ZodNullable<z.ZodISODateTime>;
2603
- processing_duration_ms: z.ZodInt;
2604
- processing_error: z.ZodString;
2605
- total_items: z.ZodInt;
2606
- processed_items: z.ZodInt;
2607
- total_chunks: z.ZodInt;
2608
- vectorized_chunks: z.ZodInt;
2609
- total_tokens: z.ZodInt;
2610
- total_cost_usd: z.ZodNumber;
2611
- processing_progress: z.ZodNumber;
2612
- vectorization_progress: z.ZodNumber;
2613
- is_processed: z.ZodBoolean;
2614
- created_at: z.ZodISODateTime;
2615
- updated_at: z.ZodISODateTime;
2616
- items: z.ZodArray<z.ZodObject<{
2617
- id: z.ZodString;
2618
- relative_path: z.ZodString;
2619
- item_name: z.ZodString;
2620
- item_type: z.ZodString;
2621
- content_type: z.ZodEnum<typeof ArchiveItemContentType>;
2622
- file_size: z.ZodOptional<z.ZodInt>;
2623
- is_processable: z.ZodBoolean;
2624
- language: z.ZodString;
2625
- encoding: z.ZodString;
2626
- chunks_count: z.ZodInt;
2627
- total_tokens: z.ZodInt;
2628
- processing_cost: z.ZodNumber;
2629
- created_at: z.ZodISODateTime;
2630
- updated_at: z.ZodISODateTime;
2631
- }, z.core.$strip>>;
2632
- file_tree: z.ZodRecord<z.ZodString, z.ZodAny>;
2633
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2634
- }, z.core.$strip>;
2635
- /**
2636
- * Infer TypeScript type from Zod schema
2637
- */
2638
- type DocumentArchiveDetail = z.infer<typeof DocumentArchiveDetailSchema>;
2639
-
2640
- /**
2641
- * Zod schema for DocumentArchiveList
2642
- *
2643
- * This schema provides runtime validation and type inference.
2644
- * * Simplified archive serializer for list views.
2645
- * */
2646
-
2647
- /**
2648
- * Simplified archive serializer for list views.
2649
- */
2650
- declare const DocumentArchiveListSchema: z.ZodObject<{
2651
- id: z.ZodString;
2652
- title: z.ZodString;
2653
- description: z.ZodString;
2654
- categories: z.ZodArray<z.ZodObject<{
2655
- id: z.ZodString;
2656
- name: z.ZodString;
2657
- description: z.ZodOptional<z.ZodString>;
2658
- is_public: z.ZodOptional<z.ZodBoolean>;
2659
- created_at: z.ZodISODateTime;
2660
- }, z.core.$strip>>;
2661
- is_public: z.ZodBoolean;
2662
- original_filename: z.ZodString;
2663
- file_size: z.ZodInt;
2664
- archive_type: z.ZodEnum<typeof DocumentArchiveListArchiveType>;
2665
- processing_status: z.ZodEnum<typeof DocumentArchiveListProcessingStatus>;
2666
- processed_at: z.ZodNullable<z.ZodISODateTime>;
2667
- total_items: z.ZodInt;
2668
- total_chunks: z.ZodInt;
2669
- total_cost_usd: z.ZodNumber;
2670
- processing_progress: z.ZodNumber;
2671
- created_at: z.ZodISODateTime;
2672
- }, z.core.$strip>;
2673
- /**
2674
- * Infer TypeScript type from Zod schema
2675
- */
2676
- type DocumentArchiveList = z.infer<typeof DocumentArchiveListSchema>;
2677
-
2678
- /**
2679
- * Zod schema for DocumentArchiveRequest
2680
- *
2681
- * This schema provides runtime validation and type inference.
2682
- * * Document archive serializer.
2683
- * */
2684
-
2685
- /**
2686
- * Document archive serializer.
2687
- */
2688
- declare const DocumentArchiveRequestSchema: z.ZodObject<{
2689
- title: z.ZodString;
2690
- description: z.ZodOptional<z.ZodString>;
2691
- is_public: z.ZodOptional<z.ZodBoolean>;
2692
- }, z.core.$strip>;
2693
- /**
2694
- * Infer TypeScript type from Zod schema
2695
- */
2696
- type DocumentArchiveRequest = z.infer<typeof DocumentArchiveRequestSchema>;
2697
-
2698
- /**
2699
- * Zod schema for DocumentCategory
2700
- *
2701
- * This schema provides runtime validation and type inference.
2702
- * * Document category serializer.
2703
- * */
2704
-
2705
- /**
2706
- * Document category serializer.
2707
- */
2708
- declare const DocumentCategorySchema: z.ZodObject<{
2709
- id: z.ZodString;
2710
- name: z.ZodString;
2711
- description: z.ZodOptional<z.ZodString>;
2712
- is_public: z.ZodOptional<z.ZodBoolean>;
2713
- created_at: z.ZodISODateTime;
2714
- }, z.core.$strip>;
2715
- /**
2716
- * Infer TypeScript type from Zod schema
2717
- */
2718
- type DocumentCategory = z.infer<typeof DocumentCategorySchema>;
2719
-
2720
- /**
2721
- * Zod schema for DocumentCategoryRequest
2722
- *
2723
- * This schema provides runtime validation and type inference.
2724
- * * Document category serializer.
2725
- * */
2726
-
2727
- /**
2728
- * Document category serializer.
2729
- */
2730
- declare const DocumentCategoryRequestSchema: z.ZodObject<{
2731
- name: z.ZodString;
2732
- description: z.ZodOptional<z.ZodString>;
2733
- is_public: z.ZodOptional<z.ZodBoolean>;
2734
- }, z.core.$strip>;
2735
- /**
2736
- * Infer TypeScript type from Zod schema
2737
- */
2738
- type DocumentCategoryRequest = z.infer<typeof DocumentCategoryRequestSchema>;
2739
-
2740
- /**
2741
- * Zod schema for DocumentCreateRequest
2742
- *
2743
- * This schema provides runtime validation and type inference.
2744
- * * Document creation request serializer.
2745
- * */
2746
-
2747
- /**
2748
- * Document creation request serializer.
2749
- */
2750
- declare const DocumentCreateRequestSchema: z.ZodObject<{
2751
- title: z.ZodString;
2752
- content: z.ZodString;
2753
- file_type: z.ZodOptional<z.ZodString>;
2754
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2755
- }, z.core.$strip>;
2756
- /**
2757
- * Infer TypeScript type from Zod schema
2758
- */
2759
- type DocumentCreateRequest = z.infer<typeof DocumentCreateRequestSchema>;
2760
-
2761
- /**
2762
- * Zod schema for DocumentProcessingStatus
2763
- *
2764
- * This schema provides runtime validation and type inference.
2765
- * * Document processing status serializer.
2766
- * */
2767
-
2768
- /**
2769
- * Document processing status serializer.
2770
- */
2771
- declare const DocumentProcessingStatusSchema: z.ZodObject<{
2772
- id: z.ZodString;
2773
- status: z.ZodString;
2774
- progress: z.ZodRecord<z.ZodString, z.ZodAny>;
2775
- error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2776
- processing_time_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2777
- }, z.core.$strip>;
2778
- /**
2779
- * Infer TypeScript type from Zod schema
2780
- */
2781
- type DocumentProcessingStatus = z.infer<typeof DocumentProcessingStatusSchema>;
2782
-
2783
- /**
2784
- * Zod schema for DocumentRequest
2785
- *
2786
- * This schema provides runtime validation and type inference.
2787
- * * Document response serializer.
2788
- * */
2789
-
2790
- /**
2791
- * Document response serializer.
2792
- */
2793
- declare const DocumentRequestSchema: z.ZodObject<{
2794
- title: z.ZodString;
2795
- file_type: z.ZodOptional<z.ZodString>;
2796
- file_size: z.ZodOptional<z.ZodInt>;
2797
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
2798
- }, z.core.$strip>;
2799
- /**
2800
- * Infer TypeScript type from Zod schema
2801
- */
2802
- type DocumentRequest = z.infer<typeof DocumentRequestSchema>;
2803
-
2804
- /**
2805
- * Zod schema for DocumentStats
2806
- *
2807
- * This schema provides runtime validation and type inference.
2808
- * * Document processing statistics serializer.
2809
- * */
2810
-
2811
- /**
2812
- * Document processing statistics serializer.
2813
- */
2814
- declare const DocumentStatsSchema: z.ZodObject<{
2815
- total_documents: z.ZodInt;
2816
- completed_documents: z.ZodInt;
2817
- processing_success_rate: z.ZodNumber;
2818
- total_chunks: z.ZodInt;
2819
- total_tokens: z.ZodInt;
2820
- total_cost_usd: z.ZodNumber;
2821
- avg_processing_time_seconds: z.ZodNumber;
2822
- }, z.core.$strip>;
2823
- /**
2824
- * Infer TypeScript type from Zod schema
2825
- */
2826
- type DocumentStats = z.infer<typeof DocumentStatsSchema>;
2827
-
2828
- declare const PaginatedArchiveItemChunkListSchema: z.ZodObject<{
2829
- count: z.ZodInt;
2830
- page: z.ZodInt;
2831
- pages: z.ZodInt;
2832
- page_size: z.ZodInt;
2833
- has_next: z.ZodBoolean;
2834
- has_previous: z.ZodBoolean;
2835
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2836
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2837
- results: z.ZodArray<z.ZodObject<{
2838
- id: z.ZodString;
2839
- content: z.ZodString;
2840
- chunk_index: z.ZodInt;
2841
- chunk_type: z.ZodOptional<z.ZodEnum<typeof ArchiveItemChunkChunkType>>;
2842
- token_count: z.ZodInt;
2843
- character_count: z.ZodInt;
2844
- embedding_model: z.ZodString;
2845
- embedding_cost: z.ZodNumber;
2846
- context_summary: z.ZodObject<{}, z.core.$strip>;
2847
- created_at: z.ZodISODateTime;
2848
- }, z.core.$strip>>;
2849
- }, z.core.$strip>;
2850
- /**
2851
- * Infer TypeScript type from Zod schema
2852
- */
2853
- type PaginatedArchiveItemChunkList = z.infer<typeof PaginatedArchiveItemChunkListSchema>;
2854
-
2855
- declare const PaginatedArchiveItemListSchema: z.ZodObject<{
2856
- count: z.ZodInt;
2857
- page: z.ZodInt;
2858
- pages: z.ZodInt;
2859
- page_size: z.ZodInt;
2860
- has_next: z.ZodBoolean;
2861
- has_previous: z.ZodBoolean;
2862
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2863
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2864
- results: z.ZodArray<z.ZodObject<{
2865
- id: z.ZodString;
2866
- relative_path: z.ZodString;
2867
- item_name: z.ZodString;
2868
- item_type: z.ZodString;
2869
- content_type: z.ZodEnum<typeof ArchiveItemContentType>;
2870
- file_size: z.ZodOptional<z.ZodInt>;
2871
- is_processable: z.ZodBoolean;
2872
- language: z.ZodString;
2873
- encoding: z.ZodString;
2874
- chunks_count: z.ZodInt;
2875
- total_tokens: z.ZodInt;
2876
- processing_cost: z.ZodNumber;
2877
- created_at: z.ZodISODateTime;
2878
- updated_at: z.ZodISODateTime;
2879
- }, z.core.$strip>>;
2880
- }, z.core.$strip>;
2881
- /**
2882
- * Infer TypeScript type from Zod schema
2883
- */
2884
- type PaginatedArchiveItemList = z.infer<typeof PaginatedArchiveItemListSchema>;
2885
-
2886
- declare const PaginatedArchiveSearchResultListSchema: z.ZodObject<{
2887
- count: z.ZodInt;
2888
- page: z.ZodInt;
2889
- pages: z.ZodInt;
2890
- page_size: z.ZodInt;
2891
- has_next: z.ZodBoolean;
2892
- has_previous: z.ZodBoolean;
2893
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2894
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2895
- results: z.ZodArray<z.ZodObject<{
2896
- chunk: z.ZodObject<{
2897
- id: z.ZodString;
2898
- content: z.ZodString;
2899
- chunk_index: z.ZodInt;
2900
- chunk_type: z.ZodOptional<z.ZodEnum<typeof ArchiveItemChunkChunkType>>;
2901
- token_count: z.ZodInt;
2902
- character_count: z.ZodInt;
2903
- embedding_model: z.ZodString;
2904
- embedding_cost: z.ZodNumber;
2905
- context_summary: z.ZodObject<{}, z.core.$strip>;
2906
- created_at: z.ZodISODateTime;
2907
- }, z.core.$strip>;
2908
- similarity_score: z.ZodNumber;
2909
- context_summary: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>;
2910
- archive_info: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>;
2911
- item_info: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>;
2912
- }, z.core.$strip>>;
2913
- }, z.core.$strip>;
2914
- /**
2915
- * Infer TypeScript type from Zod schema
2916
- */
2917
- type PaginatedArchiveSearchResultList = z.infer<typeof PaginatedArchiveSearchResultListSchema>;
2918
-
2919
- /**
2920
- * Zod schema for PaginatedChatResponseList
2921
- *
2922
- * This schema provides runtime validation and type inference.
2923
- * */
2924
-
2925
- declare const PaginatedChatResponseListSchema: z.ZodObject<{
2926
- count: z.ZodInt;
2927
- page: z.ZodInt;
2928
- pages: z.ZodInt;
2929
- page_size: z.ZodInt;
2930
- has_next: z.ZodBoolean;
2931
- has_previous: z.ZodBoolean;
2932
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2933
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2934
- results: z.ZodArray<z.ZodObject<{
2935
- message_id: z.ZodString;
2936
- content: z.ZodString;
2937
- tokens_used: z.ZodInt;
2938
- cost_usd: z.ZodNumber;
2939
- processing_time_ms: z.ZodInt;
2940
- model_used: z.ZodString;
2941
- sources: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2942
- document_title: z.ZodString;
2943
- chunk_content: z.ZodString;
2944
- similarity: z.ZodNumber;
2945
- }, z.core.$strip>>>>;
2946
- }, z.core.$strip>>;
2947
- }, z.core.$strip>;
2948
- /**
2949
- * Infer TypeScript type from Zod schema
2950
- */
2951
- type PaginatedChatResponseList = z.infer<typeof PaginatedChatResponseListSchema>;
2952
-
2953
- /**
2954
- * Zod schema for PaginatedChatSessionList
2955
- *
2956
- * This schema provides runtime validation and type inference.
2957
- * */
2958
-
2959
- declare const PaginatedChatSessionListSchema: z.ZodObject<{
2960
- count: z.ZodInt;
2961
- page: z.ZodInt;
2962
- pages: z.ZodInt;
2963
- page_size: z.ZodInt;
2964
- has_next: z.ZodBoolean;
2965
- has_previous: z.ZodBoolean;
2966
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2967
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2968
- results: z.ZodArray<z.ZodObject<{
2969
- id: z.ZodString;
2970
- title: z.ZodOptional<z.ZodString>;
2971
- is_active: z.ZodOptional<z.ZodBoolean>;
2972
- messages_count: z.ZodOptional<z.ZodInt>;
2973
- total_tokens_used: z.ZodOptional<z.ZodInt>;
2974
- total_cost_usd: z.ZodNumber;
2975
- model_name: z.ZodOptional<z.ZodString>;
2976
- temperature: z.ZodOptional<z.ZodNumber>;
2977
- max_context_chunks: z.ZodOptional<z.ZodInt>;
2978
- created_at: z.ZodISODateTime;
2979
- updated_at: z.ZodISODateTime;
2980
- }, z.core.$strip>>;
2981
- }, z.core.$strip>;
2982
- /**
2983
- * Infer TypeScript type from Zod schema
2984
- */
2985
- type PaginatedChatSessionList = z.infer<typeof PaginatedChatSessionListSchema>;
2986
-
2987
- declare const PaginatedDocumentArchiveListListSchema: z.ZodObject<{
2988
- count: z.ZodInt;
2989
- page: z.ZodInt;
2990
- pages: z.ZodInt;
2991
- page_size: z.ZodInt;
2992
- has_next: z.ZodBoolean;
2993
- has_previous: z.ZodBoolean;
2994
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2995
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
2996
- results: z.ZodArray<z.ZodObject<{
2997
- id: z.ZodString;
2998
- title: z.ZodString;
2999
- description: z.ZodString;
3000
- categories: z.ZodArray<z.ZodObject<{
3001
- id: z.ZodString;
3002
- name: z.ZodString;
3003
- description: z.ZodOptional<z.ZodString>;
3004
- is_public: z.ZodOptional<z.ZodBoolean>;
3005
- created_at: z.ZodISODateTime;
3006
- }, z.core.$strip>>;
3007
- is_public: z.ZodBoolean;
3008
- original_filename: z.ZodString;
3009
- file_size: z.ZodInt;
3010
- archive_type: z.ZodEnum<typeof DocumentArchiveListArchiveType>;
3011
- processing_status: z.ZodEnum<typeof DocumentArchiveListProcessingStatus>;
3012
- processed_at: z.ZodNullable<z.ZodISODateTime>;
3013
- total_items: z.ZodInt;
3014
- total_chunks: z.ZodInt;
3015
- total_cost_usd: z.ZodNumber;
3016
- processing_progress: z.ZodNumber;
3017
- created_at: z.ZodISODateTime;
3018
- }, z.core.$strip>>;
3019
- }, z.core.$strip>;
3020
- /**
3021
- * Infer TypeScript type from Zod schema
3022
- */
3023
- type PaginatedDocumentArchiveListList = z.infer<typeof PaginatedDocumentArchiveListListSchema>;
3024
-
3025
- /**
3026
- * Zod schema for PaginatedDocumentList
3027
- *
3028
- * This schema provides runtime validation and type inference.
3029
- * */
3030
-
3031
- declare const PaginatedDocumentListSchema: z.ZodObject<{
3032
- count: z.ZodInt;
3033
- page: z.ZodInt;
3034
- pages: z.ZodInt;
3035
- page_size: z.ZodInt;
3036
- has_next: z.ZodBoolean;
3037
- has_previous: z.ZodBoolean;
3038
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3039
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3040
- results: z.ZodArray<z.ZodObject<{
3041
- id: z.ZodString;
3042
- title: z.ZodString;
3043
- file_type: z.ZodOptional<z.ZodString>;
3044
- file_size: z.ZodOptional<z.ZodInt>;
3045
- processing_status: z.ZodString;
3046
- chunks_count: z.ZodInt;
3047
- total_tokens: z.ZodInt;
3048
- total_cost_usd: z.ZodNumber;
3049
- created_at: z.ZodISODateTime;
3050
- updated_at: z.ZodISODateTime;
3051
- processing_started_at: z.ZodISODateTime;
3052
- processing_completed_at: z.ZodISODateTime;
3053
- processing_error: z.ZodString;
3054
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
3055
- }, z.core.$strip>>;
3056
- }, z.core.$strip>;
3057
- /**
3058
- * Infer TypeScript type from Zod schema
3059
- */
3060
- type PaginatedDocumentList = z.infer<typeof PaginatedDocumentListSchema>;
3061
-
3062
- /**
3063
- * Zod schema for PaginatedPublicCategoryList
3064
- *
3065
- * This schema provides runtime validation and type inference.
3066
- * */
3067
-
3068
- declare const PaginatedPublicCategoryListSchema: z.ZodObject<{
3069
- count: z.ZodInt;
3070
- page: z.ZodInt;
3071
- pages: z.ZodInt;
3072
- page_size: z.ZodInt;
3073
- has_next: z.ZodBoolean;
3074
- has_previous: z.ZodBoolean;
3075
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3076
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3077
- results: z.ZodArray<z.ZodObject<{
3078
- id: z.ZodString;
3079
- name: z.ZodString;
3080
- description: z.ZodOptional<z.ZodString>;
3081
- }, z.core.$strip>>;
3082
- }, z.core.$strip>;
3083
- /**
3084
- * Infer TypeScript type from Zod schema
3085
- */
3086
- type PaginatedPublicCategoryList = z.infer<typeof PaginatedPublicCategoryListSchema>;
3087
-
3088
- /**
3089
- * Zod schema for PaginatedPublicDocumentListList
3090
- *
3091
- * This schema provides runtime validation and type inference.
3092
- * */
3093
-
3094
- declare const PaginatedPublicDocumentListListSchema: z.ZodObject<{
3095
- count: z.ZodInt;
3096
- page: z.ZodInt;
3097
- pages: z.ZodInt;
3098
- page_size: z.ZodInt;
3099
- has_next: z.ZodBoolean;
3100
- has_previous: z.ZodBoolean;
3101
- next_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3102
- previous_page: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
3103
- results: z.ZodArray<z.ZodObject<{
3104
- id: z.ZodString;
3105
- title: z.ZodString;
3106
- category: z.ZodObject<{
3107
- id: z.ZodString;
3108
- name: z.ZodString;
3109
- description: z.ZodOptional<z.ZodString>;
3110
- }, z.core.$strip>;
3111
- created_at: z.ZodISODateTime;
3112
- updated_at: z.ZodISODateTime;
3113
- }, z.core.$strip>>;
3114
- }, z.core.$strip>;
3115
- /**
3116
- * Infer TypeScript type from Zod schema
3117
- */
3118
- type PaginatedPublicDocumentListList = z.infer<typeof PaginatedPublicDocumentListListSchema>;
3119
-
3120
- /**
3121
- * Zod schema for PatchedArchiveItemChunkRequest
3122
- *
3123
- * This schema provides runtime validation and type inference.
3124
- * * Archive item chunk serializer.
3125
- * */
3126
-
3127
- /**
3128
- * Archive item chunk serializer.
3129
- */
3130
- declare const PatchedArchiveItemChunkRequestSchema: z.ZodObject<{
3131
- content: z.ZodOptional<z.ZodString>;
3132
- chunk_index: z.ZodOptional<z.ZodInt>;
3133
- chunk_type: z.ZodOptional<z.ZodEnum<typeof PatchedArchiveItemChunkRequestChunkType>>;
3134
- }, z.core.$strip>;
3135
- /**
3136
- * Infer TypeScript type from Zod schema
3137
- */
3138
- type PatchedArchiveItemChunkRequest = z.infer<typeof PatchedArchiveItemChunkRequestSchema>;
3139
-
3140
- /**
3141
- * Zod schema for PatchedArchiveItemRequest
3142
- *
3143
- * This schema provides runtime validation and type inference.
3144
- * * Archive item serializer.
3145
- * */
3146
-
3147
- /**
3148
- * Archive item serializer.
3149
- */
3150
- declare const PatchedArchiveItemRequestSchema: z.ZodObject<{
3151
- relative_path: z.ZodOptional<z.ZodString>;
3152
- item_name: z.ZodOptional<z.ZodString>;
3153
- item_type: z.ZodOptional<z.ZodString>;
3154
- file_size: z.ZodOptional<z.ZodInt>;
3155
- }, z.core.$strip>;
3156
- /**
3157
- * Infer TypeScript type from Zod schema
3158
- */
3159
- type PatchedArchiveItemRequest = z.infer<typeof PatchedArchiveItemRequestSchema>;
3160
-
3161
- /**
3162
- * Zod schema for PatchedChatResponseRequest
3163
- *
3164
- * This schema provides runtime validation and type inference.
3165
- * * Chat response serializer.
3166
- * */
3167
-
3168
- /**
3169
- * Chat response serializer.
3170
- */
3171
- declare const PatchedChatResponseRequestSchema: z.ZodObject<{
3172
- message_id: z.ZodOptional<z.ZodString>;
3173
- content: z.ZodOptional<z.ZodString>;
3174
- tokens_used: z.ZodOptional<z.ZodInt>;
3175
- cost_usd: z.ZodOptional<z.ZodNumber>;
3176
- processing_time_ms: z.ZodOptional<z.ZodInt>;
3177
- model_used: z.ZodOptional<z.ZodString>;
3178
- sources: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3179
- document_title: z.ZodString;
3180
- chunk_content: z.ZodString;
3181
- similarity: z.ZodNumber;
3182
- }, z.core.$strip>>>>;
3183
- }, z.core.$strip>;
3184
- /**
3185
- * Infer TypeScript type from Zod schema
3186
- */
3187
- type PatchedChatResponseRequest = z.infer<typeof PatchedChatResponseRequestSchema>;
3188
-
3189
- /**
3190
- * Zod schema for PatchedChatSessionRequest
3191
- *
3192
- * This schema provides runtime validation and type inference.
3193
- * * Chat session response serializer.
3194
- * */
3195
-
3196
- /**
3197
- * Chat session response serializer.
3198
- */
3199
- declare const PatchedChatSessionRequestSchema: z.ZodObject<{
3200
- title: z.ZodOptional<z.ZodString>;
3201
- is_active: z.ZodOptional<z.ZodBoolean>;
3202
- messages_count: z.ZodOptional<z.ZodInt>;
3203
- total_tokens_used: z.ZodOptional<z.ZodInt>;
3204
- model_name: z.ZodOptional<z.ZodString>;
3205
- temperature: z.ZodOptional<z.ZodNumber>;
3206
- max_context_chunks: z.ZodOptional<z.ZodInt>;
3207
- }, z.core.$strip>;
3208
- /**
3209
- * Infer TypeScript type from Zod schema
3210
- */
3211
- type PatchedChatSessionRequest = z.infer<typeof PatchedChatSessionRequestSchema>;
3212
-
3213
- /**
3214
- * Zod schema for PatchedDocumentArchiveRequest
3215
- *
3216
- * This schema provides runtime validation and type inference.
3217
- * * Document archive serializer.
3218
- * */
3219
-
3220
- /**
3221
- * Document archive serializer.
3222
- */
3223
- declare const PatchedDocumentArchiveRequestSchema: z.ZodObject<{
3224
- title: z.ZodOptional<z.ZodString>;
3225
- description: z.ZodOptional<z.ZodString>;
3226
- is_public: z.ZodOptional<z.ZodBoolean>;
3227
- }, z.core.$strip>;
3228
- /**
3229
- * Infer TypeScript type from Zod schema
3230
- */
3231
- type PatchedDocumentArchiveRequest = z.infer<typeof PatchedDocumentArchiveRequestSchema>;
3232
-
3233
- /**
3234
- * Zod schema for PatchedDocumentRequest
3235
- *
3236
- * This schema provides runtime validation and type inference.
3237
- * * Document response serializer.
3238
- * */
3239
-
3240
- /**
3241
- * Document response serializer.
3242
- */
3243
- declare const PatchedDocumentRequestSchema: z.ZodObject<{
3244
- title: z.ZodOptional<z.ZodString>;
3245
- file_type: z.ZodOptional<z.ZodString>;
3246
- file_size: z.ZodOptional<z.ZodInt>;
3247
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
3248
- }, z.core.$strip>;
3249
- /**
3250
- * Infer TypeScript type from Zod schema
3251
- */
3252
- type PatchedDocumentRequest = z.infer<typeof PatchedDocumentRequestSchema>;
3253
-
3254
- /**
3255
- * Zod schema for PublicCategory
3256
- *
3257
- * This schema provides runtime validation and type inference.
3258
- * * Public category serializer.
3259
- * */
3260
-
3261
- /**
3262
- * Public category serializer.
3263
- */
3264
- declare const PublicCategorySchema: z.ZodObject<{
3265
- id: z.ZodString;
3266
- name: z.ZodString;
3267
- description: z.ZodOptional<z.ZodString>;
3268
- }, z.core.$strip>;
3269
- /**
3270
- * Infer TypeScript type from Zod schema
3271
- */
3272
- type PublicCategory = z.infer<typeof PublicCategorySchema>;
3273
-
3274
- /**
3275
- * Zod schema for PublicDocument
3276
- *
3277
- * This schema provides runtime validation and type inference.
3278
- * * Public document detail serializer - only essential data for clients.
3279
- * */
3280
-
3281
- /**
3282
- * Public document detail serializer - only essential data for clients.
3283
- */
3284
- declare const PublicDocumentSchema: z.ZodObject<{
3285
- id: z.ZodString;
3286
- title: z.ZodString;
3287
- content: z.ZodString;
3288
- category: z.ZodObject<{
3289
- id: z.ZodString;
3290
- name: z.ZodString;
3291
- description: z.ZodOptional<z.ZodString>;
3292
- }, z.core.$strip>;
3293
- created_at: z.ZodISODateTime;
3294
- updated_at: z.ZodISODateTime;
3295
- }, z.core.$strip>;
3296
- /**
3297
- * Infer TypeScript type from Zod schema
3298
- */
3299
- type PublicDocument = z.infer<typeof PublicDocumentSchema>;
3300
-
3301
- /**
3302
- * Zod schema for PublicDocumentList
3303
- *
3304
- * This schema provides runtime validation and type inference.
3305
- * * Public document list serializer - minimal fields for listing.
3306
- * */
3307
-
3308
- /**
3309
- * Public document list serializer - minimal fields for listing.
3310
- */
3311
- declare const PublicDocumentListSchema: z.ZodObject<{
3312
- id: z.ZodString;
3313
- title: z.ZodString;
3314
- category: z.ZodObject<{
3315
- id: z.ZodString;
3316
- name: z.ZodString;
3317
- description: z.ZodOptional<z.ZodString>;
3318
- }, z.core.$strip>;
3319
- created_at: z.ZodISODateTime;
3320
- updated_at: z.ZodISODateTime;
3321
- }, z.core.$strip>;
3322
- /**
3323
- * Infer TypeScript type from Zod schema
3324
- */
3325
- type PublicDocumentList = z.infer<typeof PublicDocumentListSchema>;
3326
-
3327
- /**
3328
- * Zod schema for VectorizationResult
3329
- *
3330
- * This schema provides runtime validation and type inference.
3331
- * * Vectorization result serializer.
3332
- * */
3333
-
3334
- /**
3335
- * Vectorization result serializer.
3336
- */
3337
- declare const VectorizationResultSchema: z.ZodObject<{
3338
- vectorized_count: z.ZodInt;
3339
- failed_count: z.ZodInt;
3340
- total_tokens: z.ZodInt;
3341
- total_cost: z.ZodNumber;
3342
- success_rate: z.ZodNumber;
3343
- errors: z.ZodArray<z.ZodString>;
3344
- }, z.core.$strip>;
3345
- /**
3346
- * Infer TypeScript type from Zod schema
3347
- */
3348
- type VectorizationResult = z.infer<typeof VectorizationResultSchema>;
3349
-
3350
- /**
3351
- * Zod schema for VectorizationStatistics
3352
- *
3353
- * This schema provides runtime validation and type inference.
3354
- * * Vectorization statistics serializer.
3355
- * */
3356
-
3357
- /**
3358
- * Vectorization statistics serializer.
3359
- */
3360
- declare const VectorizationStatisticsSchema: z.ZodObject<{
3361
- total_chunks: z.ZodInt;
3362
- vectorized_chunks: z.ZodInt;
3363
- pending_chunks: z.ZodInt;
3364
- vectorization_rate: z.ZodNumber;
3365
- total_tokens: z.ZodInt;
3366
- total_cost: z.ZodNumber;
3367
- avg_tokens_per_chunk: z.ZodNumber;
3368
- avg_cost_per_chunk: z.ZodNumber;
3369
- }, z.core.$strip>;
3370
- /**
3371
- * Infer TypeScript type from Zod schema
3372
- */
3373
- type VectorizationStatistics = z.infer<typeof VectorizationStatisticsSchema>;
3374
-
3375
- /**
3376
- * Zod Schemas - Runtime validation and type inference
3377
- *
3378
- * Auto-generated from OpenAPI specification.
3379
- * Provides runtime validation for API requests and responses.
3380
- *
3381
- * Usage:
3382
- * ```typescript
3383
- * import { UserSchema } from './schemas'
3384
- *
3385
- * // Validate data
3386
- * const user = UserSchema.parse(data)
3387
- *
3388
- * // Type inference
3389
- * type User = z.infer<typeof UserSchema>
3390
- * ```
3391
- */
3392
-
3393
- type index$1_ArchiveItem = ArchiveItem;
3394
- type index$1_ArchiveItemChunk = ArchiveItemChunk;
3395
- type index$1_ArchiveItemChunkDetail = ArchiveItemChunkDetail;
3396
- declare const index$1_ArchiveItemChunkDetailSchema: typeof ArchiveItemChunkDetailSchema;
3397
- type index$1_ArchiveItemChunkRequest = ArchiveItemChunkRequest;
3398
- declare const index$1_ArchiveItemChunkRequestSchema: typeof ArchiveItemChunkRequestSchema;
3399
- declare const index$1_ArchiveItemChunkSchema: typeof ArchiveItemChunkSchema;
3400
- type index$1_ArchiveItemDetail = ArchiveItemDetail;
3401
- declare const index$1_ArchiveItemDetailSchema: typeof ArchiveItemDetailSchema;
3402
- type index$1_ArchiveItemRequest = ArchiveItemRequest;
3403
- declare const index$1_ArchiveItemRequestSchema: typeof ArchiveItemRequestSchema;
3404
- declare const index$1_ArchiveItemSchema: typeof ArchiveItemSchema;
3405
- type index$1_ArchiveProcessingResult = ArchiveProcessingResult;
3406
- declare const index$1_ArchiveProcessingResultSchema: typeof ArchiveProcessingResultSchema;
3407
- type index$1_ArchiveSearchRequestRequest = ArchiveSearchRequestRequest;
3408
- declare const index$1_ArchiveSearchRequestRequestSchema: typeof ArchiveSearchRequestRequestSchema;
3409
- type index$1_ArchiveSearchResult = ArchiveSearchResult;
3410
- declare const index$1_ArchiveSearchResultSchema: typeof ArchiveSearchResultSchema;
3411
- type index$1_ArchiveStatistics = ArchiveStatistics;
3412
- declare const index$1_ArchiveStatisticsSchema: typeof ArchiveStatisticsSchema;
3413
- type index$1_ChatHistory = ChatHistory;
3414
- declare const index$1_ChatHistorySchema: typeof ChatHistorySchema;
3415
- declare const index$1_ChatMessageSchema: typeof ChatMessageSchema;
3416
- type index$1_ChatQueryRequest = ChatQueryRequest;
3417
- declare const index$1_ChatQueryRequestSchema: typeof ChatQueryRequestSchema;
3418
- type index$1_ChatResponse = ChatResponse;
3419
- type index$1_ChatResponseRequest = ChatResponseRequest;
3420
- declare const index$1_ChatResponseRequestSchema: typeof ChatResponseRequestSchema;
3421
- declare const index$1_ChatResponseSchema: typeof ChatResponseSchema;
3422
- type index$1_ChatSession = ChatSession;
3423
- type index$1_ChatSessionCreateRequest = ChatSessionCreateRequest;
3424
- declare const index$1_ChatSessionCreateRequestSchema: typeof ChatSessionCreateRequestSchema;
3425
- type index$1_ChatSessionRequest = ChatSessionRequest;
3426
- declare const index$1_ChatSessionRequestSchema: typeof ChatSessionRequestSchema;
3427
- declare const index$1_ChatSessionSchema: typeof ChatSessionSchema;
3428
- type index$1_ChatSourceRequest = ChatSourceRequest;
3429
- declare const index$1_ChatSourceRequestSchema: typeof ChatSourceRequestSchema;
3430
- declare const index$1_ChatSourceSchema: typeof ChatSourceSchema;
3431
- type index$1_ChunkRevectorizationRequestRequest = ChunkRevectorizationRequestRequest;
3432
- declare const index$1_ChunkRevectorizationRequestRequestSchema: typeof ChunkRevectorizationRequestRequestSchema;
3433
- type index$1_Document = Document;
3434
- type index$1_DocumentArchive = DocumentArchive;
3435
- type index$1_DocumentArchiveDetail = DocumentArchiveDetail;
3436
- declare const index$1_DocumentArchiveDetailSchema: typeof DocumentArchiveDetailSchema;
3437
- type index$1_DocumentArchiveList = DocumentArchiveList;
3438
- declare const index$1_DocumentArchiveListSchema: typeof DocumentArchiveListSchema;
3439
- type index$1_DocumentArchiveRequest = DocumentArchiveRequest;
3440
- declare const index$1_DocumentArchiveRequestSchema: typeof DocumentArchiveRequestSchema;
3441
- declare const index$1_DocumentArchiveSchema: typeof DocumentArchiveSchema;
3442
- type index$1_DocumentCategory = DocumentCategory;
3443
- type index$1_DocumentCategoryRequest = DocumentCategoryRequest;
3444
- declare const index$1_DocumentCategoryRequestSchema: typeof DocumentCategoryRequestSchema;
3445
- declare const index$1_DocumentCategorySchema: typeof DocumentCategorySchema;
3446
- type index$1_DocumentCreateRequest = DocumentCreateRequest;
3447
- declare const index$1_DocumentCreateRequestSchema: typeof DocumentCreateRequestSchema;
3448
- type index$1_DocumentProcessingStatus = DocumentProcessingStatus;
3449
- declare const index$1_DocumentProcessingStatusSchema: typeof DocumentProcessingStatusSchema;
3450
- type index$1_DocumentRequest = DocumentRequest;
3451
- declare const index$1_DocumentRequestSchema: typeof DocumentRequestSchema;
3452
- declare const index$1_DocumentSchema: typeof DocumentSchema;
3453
- type index$1_DocumentStats = DocumentStats;
3454
- declare const index$1_DocumentStatsSchema: typeof DocumentStatsSchema;
3455
- type index$1_PaginatedArchiveItemChunkList = PaginatedArchiveItemChunkList;
3456
- declare const index$1_PaginatedArchiveItemChunkListSchema: typeof PaginatedArchiveItemChunkListSchema;
3457
- type index$1_PaginatedArchiveItemList = PaginatedArchiveItemList;
3458
- declare const index$1_PaginatedArchiveItemListSchema: typeof PaginatedArchiveItemListSchema;
3459
- type index$1_PaginatedArchiveSearchResultList = PaginatedArchiveSearchResultList;
3460
- declare const index$1_PaginatedArchiveSearchResultListSchema: typeof PaginatedArchiveSearchResultListSchema;
3461
- type index$1_PaginatedChatResponseList = PaginatedChatResponseList;
3462
- declare const index$1_PaginatedChatResponseListSchema: typeof PaginatedChatResponseListSchema;
3463
- type index$1_PaginatedChatSessionList = PaginatedChatSessionList;
3464
- declare const index$1_PaginatedChatSessionListSchema: typeof PaginatedChatSessionListSchema;
3465
- type index$1_PaginatedDocumentArchiveListList = PaginatedDocumentArchiveListList;
3466
- declare const index$1_PaginatedDocumentArchiveListListSchema: typeof PaginatedDocumentArchiveListListSchema;
3467
- type index$1_PaginatedDocumentList = PaginatedDocumentList;
3468
- declare const index$1_PaginatedDocumentListSchema: typeof PaginatedDocumentListSchema;
3469
- type index$1_PaginatedPublicCategoryList = PaginatedPublicCategoryList;
3470
- declare const index$1_PaginatedPublicCategoryListSchema: typeof PaginatedPublicCategoryListSchema;
3471
- type index$1_PaginatedPublicDocumentListList = PaginatedPublicDocumentListList;
3472
- declare const index$1_PaginatedPublicDocumentListListSchema: typeof PaginatedPublicDocumentListListSchema;
3473
- type index$1_PatchedArchiveItemChunkRequest = PatchedArchiveItemChunkRequest;
3474
- declare const index$1_PatchedArchiveItemChunkRequestSchema: typeof PatchedArchiveItemChunkRequestSchema;
3475
- type index$1_PatchedArchiveItemRequest = PatchedArchiveItemRequest;
3476
- declare const index$1_PatchedArchiveItemRequestSchema: typeof PatchedArchiveItemRequestSchema;
3477
- type index$1_PatchedChatResponseRequest = PatchedChatResponseRequest;
3478
- declare const index$1_PatchedChatResponseRequestSchema: typeof PatchedChatResponseRequestSchema;
3479
- type index$1_PatchedChatSessionRequest = PatchedChatSessionRequest;
3480
- declare const index$1_PatchedChatSessionRequestSchema: typeof PatchedChatSessionRequestSchema;
3481
- type index$1_PatchedDocumentArchiveRequest = PatchedDocumentArchiveRequest;
3482
- declare const index$1_PatchedDocumentArchiveRequestSchema: typeof PatchedDocumentArchiveRequestSchema;
3483
- type index$1_PatchedDocumentRequest = PatchedDocumentRequest;
3484
- declare const index$1_PatchedDocumentRequestSchema: typeof PatchedDocumentRequestSchema;
3485
- type index$1_PublicCategory = PublicCategory;
3486
- declare const index$1_PublicCategorySchema: typeof PublicCategorySchema;
3487
- type index$1_PublicDocument = PublicDocument;
3488
- type index$1_PublicDocumentList = PublicDocumentList;
3489
- declare const index$1_PublicDocumentListSchema: typeof PublicDocumentListSchema;
3490
- declare const index$1_PublicDocumentSchema: typeof PublicDocumentSchema;
3491
- type index$1_VectorizationResult = VectorizationResult;
3492
- declare const index$1_VectorizationResultSchema: typeof VectorizationResultSchema;
3493
- type index$1_VectorizationStatistics = VectorizationStatistics;
3494
- declare const index$1_VectorizationStatisticsSchema: typeof VectorizationStatisticsSchema;
3495
- declare namespace index$1 {
3496
- export { type index$1_ArchiveItem as ArchiveItem, type index$1_ArchiveItemChunk as ArchiveItemChunk, type index$1_ArchiveItemChunkDetail as ArchiveItemChunkDetail, index$1_ArchiveItemChunkDetailSchema as ArchiveItemChunkDetailSchema, type index$1_ArchiveItemChunkRequest as ArchiveItemChunkRequest, index$1_ArchiveItemChunkRequestSchema as ArchiveItemChunkRequestSchema, index$1_ArchiveItemChunkSchema as ArchiveItemChunkSchema, type index$1_ArchiveItemDetail as ArchiveItemDetail, index$1_ArchiveItemDetailSchema as ArchiveItemDetailSchema, type index$1_ArchiveItemRequest as ArchiveItemRequest, index$1_ArchiveItemRequestSchema as ArchiveItemRequestSchema, index$1_ArchiveItemSchema as ArchiveItemSchema, type index$1_ArchiveProcessingResult as ArchiveProcessingResult, index$1_ArchiveProcessingResultSchema as ArchiveProcessingResultSchema, type index$1_ArchiveSearchRequestRequest as ArchiveSearchRequestRequest, index$1_ArchiveSearchRequestRequestSchema as ArchiveSearchRequestRequestSchema, type index$1_ArchiveSearchResult as ArchiveSearchResult, index$1_ArchiveSearchResultSchema as ArchiveSearchResultSchema, type index$1_ArchiveStatistics as ArchiveStatistics, index$1_ArchiveStatisticsSchema as ArchiveStatisticsSchema, type index$1_ChatHistory as ChatHistory, index$1_ChatHistorySchema as ChatHistorySchema, type ChatMessage$1 as ChatMessage, index$1_ChatMessageSchema as ChatMessageSchema, type index$1_ChatQueryRequest as ChatQueryRequest, index$1_ChatQueryRequestSchema as ChatQueryRequestSchema, type index$1_ChatResponse as ChatResponse, type index$1_ChatResponseRequest as ChatResponseRequest, index$1_ChatResponseRequestSchema as ChatResponseRequestSchema, index$1_ChatResponseSchema as ChatResponseSchema, type index$1_ChatSession as ChatSession, type index$1_ChatSessionCreateRequest as ChatSessionCreateRequest, index$1_ChatSessionCreateRequestSchema as ChatSessionCreateRequestSchema, type index$1_ChatSessionRequest as ChatSessionRequest, index$1_ChatSessionRequestSchema as ChatSessionRequestSchema, index$1_ChatSessionSchema as ChatSessionSchema, type ChatSource$1 as ChatSource, type index$1_ChatSourceRequest as ChatSourceRequest, index$1_ChatSourceRequestSchema as ChatSourceRequestSchema, index$1_ChatSourceSchema as ChatSourceSchema, type index$1_ChunkRevectorizationRequestRequest as ChunkRevectorizationRequestRequest, index$1_ChunkRevectorizationRequestRequestSchema as ChunkRevectorizationRequestRequestSchema, type index$1_Document as Document, type index$1_DocumentArchive as DocumentArchive, type index$1_DocumentArchiveDetail as DocumentArchiveDetail, index$1_DocumentArchiveDetailSchema as DocumentArchiveDetailSchema, type index$1_DocumentArchiveList as DocumentArchiveList, index$1_DocumentArchiveListSchema as DocumentArchiveListSchema, type index$1_DocumentArchiveRequest as DocumentArchiveRequest, index$1_DocumentArchiveRequestSchema as DocumentArchiveRequestSchema, index$1_DocumentArchiveSchema as DocumentArchiveSchema, type index$1_DocumentCategory as DocumentCategory, type index$1_DocumentCategoryRequest as DocumentCategoryRequest, index$1_DocumentCategoryRequestSchema as DocumentCategoryRequestSchema, index$1_DocumentCategorySchema as DocumentCategorySchema, type index$1_DocumentCreateRequest as DocumentCreateRequest, index$1_DocumentCreateRequestSchema as DocumentCreateRequestSchema, type index$1_DocumentProcessingStatus as DocumentProcessingStatus, index$1_DocumentProcessingStatusSchema as DocumentProcessingStatusSchema, type index$1_DocumentRequest as DocumentRequest, index$1_DocumentRequestSchema as DocumentRequestSchema, index$1_DocumentSchema as DocumentSchema, type index$1_DocumentStats as DocumentStats, index$1_DocumentStatsSchema as DocumentStatsSchema, type index$1_PaginatedArchiveItemChunkList as PaginatedArchiveItemChunkList, index$1_PaginatedArchiveItemChunkListSchema as PaginatedArchiveItemChunkListSchema, type index$1_PaginatedArchiveItemList as PaginatedArchiveItemList, index$1_PaginatedArchiveItemListSchema as PaginatedArchiveItemListSchema, type index$1_PaginatedArchiveSearchResultList as PaginatedArchiveSearchResultList, index$1_PaginatedArchiveSearchResultListSchema as PaginatedArchiveSearchResultListSchema, type index$1_PaginatedChatResponseList as PaginatedChatResponseList, index$1_PaginatedChatResponseListSchema as PaginatedChatResponseListSchema, type index$1_PaginatedChatSessionList as PaginatedChatSessionList, index$1_PaginatedChatSessionListSchema as PaginatedChatSessionListSchema, type index$1_PaginatedDocumentArchiveListList as PaginatedDocumentArchiveListList, index$1_PaginatedDocumentArchiveListListSchema as PaginatedDocumentArchiveListListSchema, type index$1_PaginatedDocumentList as PaginatedDocumentList, index$1_PaginatedDocumentListSchema as PaginatedDocumentListSchema, type index$1_PaginatedPublicCategoryList as PaginatedPublicCategoryList, index$1_PaginatedPublicCategoryListSchema as PaginatedPublicCategoryListSchema, type index$1_PaginatedPublicDocumentListList as PaginatedPublicDocumentListList, index$1_PaginatedPublicDocumentListListSchema as PaginatedPublicDocumentListListSchema, type index$1_PatchedArchiveItemChunkRequest as PatchedArchiveItemChunkRequest, index$1_PatchedArchiveItemChunkRequestSchema as PatchedArchiveItemChunkRequestSchema, type index$1_PatchedArchiveItemRequest as PatchedArchiveItemRequest, index$1_PatchedArchiveItemRequestSchema as PatchedArchiveItemRequestSchema, type index$1_PatchedChatResponseRequest as PatchedChatResponseRequest, index$1_PatchedChatResponseRequestSchema as PatchedChatResponseRequestSchema, type index$1_PatchedChatSessionRequest as PatchedChatSessionRequest, index$1_PatchedChatSessionRequestSchema as PatchedChatSessionRequestSchema, type index$1_PatchedDocumentArchiveRequest as PatchedDocumentArchiveRequest, index$1_PatchedDocumentArchiveRequestSchema as PatchedDocumentArchiveRequestSchema, type index$1_PatchedDocumentRequest as PatchedDocumentRequest, index$1_PatchedDocumentRequestSchema as PatchedDocumentRequestSchema, type index$1_PublicCategory as PublicCategory, index$1_PublicCategorySchema as PublicCategorySchema, type index$1_PublicDocument as PublicDocument, type index$1_PublicDocumentList as PublicDocumentList, index$1_PublicDocumentListSchema as PublicDocumentListSchema, index$1_PublicDocumentSchema as PublicDocumentSchema, type index$1_VectorizationResult as VectorizationResult, index$1_VectorizationResultSchema as VectorizationResultSchema, type index$1_VectorizationStatistics as VectorizationStatistics, index$1_VectorizationStatisticsSchema as VectorizationStatisticsSchema };
3497
- }
3498
-
3499
- /**
3500
- * Zod Validation Events - Browser CustomEvent integration
3501
- *
3502
- * Dispatches browser CustomEvents when Zod validation fails, allowing
3503
- * React/frontend apps to listen and handle validation errors globally.
3504
- *
3505
- * @example
3506
- * ```typescript
3507
- * // In your React app
3508
- * window.addEventListener('zod-validation-error', (event) => {
3509
- * const { operation, path, method, error, response } = event.detail;
3510
- * console.error(`Validation failed for ${method} ${path}`, error);
3511
- * // Show toast notification, log to Sentry, etc.
3512
- * });
3513
- * ```
3514
- */
3515
-
3516
- /**
3517
- * Validation error event detail
3518
- */
3519
- interface ValidationErrorDetail {
3520
- /** Operation/function name that failed validation */
3521
- operation: string;
3522
- /** API endpoint path */
3523
- path: string;
3524
- /** HTTP method */
3525
- method: string;
3526
- /** Zod validation error */
3527
- error: ZodError;
3528
- /** Raw response data that failed validation */
3529
- response: any;
3530
- /** Timestamp of the error */
3531
- timestamp: Date;
3532
- }
3533
- /**
3534
- * Custom event type for Zod validation errors
3535
- */
3536
- type ValidationErrorEvent = CustomEvent<ValidationErrorDetail>;
3537
- /**
3538
- * Dispatch a Zod validation error event.
3539
- *
3540
- * Only dispatches in browser environment (when window is defined).
3541
- * Safe to call in Node.js/SSR - will be a no-op.
3542
- *
3543
- * @param detail - Validation error details
3544
- */
3545
- declare function dispatchValidationError(detail: ValidationErrorDetail): void;
3546
- /**
3547
- * Add a global listener for Zod validation errors.
3548
- *
3549
- * @param callback - Function to call when validation error occurs
3550
- * @returns Cleanup function to remove the listener
3551
- *
3552
- * @example
3553
- * ```typescript
3554
- * const cleanup = onValidationError(({ operation, error }) => {
3555
- * toast.error(`Validation failed in ${operation}`);
3556
- * logToSentry(error);
3557
- * });
3558
- *
3559
- * // Later, remove listener
3560
- * cleanup();
3561
- * ```
3562
- */
3563
- declare function onValidationError(callback: (detail: ValidationErrorDetail) => void): () => void;
3564
- /**
3565
- * Format Zod error for logging/display.
3566
- *
3567
- * @param error - Zod validation error
3568
- * @returns Formatted error message
3569
- */
3570
- declare function formatZodError(error: ZodError): string;
3571
-
3572
- /**
3573
- * API operation
3574
- *
3575
- * @method GET
3576
- * @path /cfg/knowbase/admin/chat/
3577
- */
3578
- declare function getKnowbaseAdminChatList(params?: {
3579
- page?: number;
3580
- page_size?: number;
3581
- }, client?: any): Promise<PaginatedChatResponseList>;
3582
- /**
3583
- * API operation
3584
- *
3585
- * @method POST
3586
- * @path /cfg/knowbase/admin/chat/
3587
- */
3588
- declare function createKnowbaseAdminChatCreate(data: ChatResponseRequest, client?: any): Promise<ChatResponse>;
3589
- /**
3590
- * API operation
3591
- *
3592
- * @method GET
3593
- * @path /cfg/knowbase/admin/chat/{id}/
3594
- */
3595
- declare function getKnowbaseAdminChatRetrieve(id: string, client?: any): Promise<ChatResponse>;
3596
- /**
3597
- * API operation
3598
- *
3599
- * @method PUT
3600
- * @path /cfg/knowbase/admin/chat/{id}/
3601
- */
3602
- declare function updateKnowbaseAdminChatUpdate(id: string, data: ChatResponseRequest, client?: any): Promise<ChatResponse>;
3603
- /**
3604
- * API operation
3605
- *
3606
- * @method PATCH
3607
- * @path /cfg/knowbase/admin/chat/{id}/
3608
- */
3609
- declare function partialUpdateKnowbaseAdminChatPartialUpdate(id: string, data?: PatchedChatResponseRequest, client?: any): Promise<ChatResponse>;
3610
- /**
3611
- * API operation
3612
- *
3613
- * @method DELETE
3614
- * @path /cfg/knowbase/admin/chat/{id}/
3615
- */
3616
- declare function deleteKnowbaseAdminChatDestroy(id: string, client?: any): Promise<void>;
3617
- /**
3618
- * Get chat history
3619
- *
3620
- * @method GET
3621
- * @path /cfg/knowbase/admin/chat/{id}/history/
3622
- */
3623
- declare function getKnowbaseAdminChatHistoryRetrieve(id: string, client?: any): Promise<ChatHistory>;
3624
- /**
3625
- * Process chat query with RAG
3626
- *
3627
- * @method POST
3628
- * @path /cfg/knowbase/admin/chat/query/
3629
- */
3630
- declare function createKnowbaseAdminChatQueryCreate(data: ChatQueryRequest, client?: any): Promise<ChatResponse>;
3631
- /**
3632
- * List user documents
3633
- *
3634
- * @method GET
3635
- * @path /cfg/knowbase/admin/documents/
3636
- */
3637
- declare function getKnowbaseAdminDocumentsList(params?: {
3638
- page?: number;
3639
- page_size?: number;
3640
- status?: string;
3641
- }, client?: any): Promise<PaginatedDocumentList>;
3642
- /**
3643
- * Upload new document
3644
- *
3645
- * @method POST
3646
- * @path /cfg/knowbase/admin/documents/
3647
- */
3648
- declare function createKnowbaseAdminDocumentsCreate(data: DocumentCreateRequest, client?: any): Promise<Document>;
3649
- /**
3650
- * Get document details
3651
- *
3652
- * @method GET
3653
- * @path /cfg/knowbase/admin/documents/{id}/
3654
- */
3655
- declare function getKnowbaseAdminDocumentsRetrieve(id: string, client?: any): Promise<Document>;
3656
- /**
3657
- * API operation
3658
- *
3659
- * @method PUT
3660
- * @path /cfg/knowbase/admin/documents/{id}/
3661
- */
3662
- declare function updateKnowbaseAdminDocumentsUpdate(id: string, data: DocumentRequest, client?: any): Promise<Document>;
3663
- /**
3664
- * API operation
3665
- *
3666
- * @method PATCH
3667
- * @path /cfg/knowbase/admin/documents/{id}/
3668
- */
3669
- declare function partialUpdateKnowbaseAdminDocumentsPartialUpdate(id: string, data?: PatchedDocumentRequest, client?: any): Promise<Document>;
3670
- /**
3671
- * Delete document
3672
- *
3673
- * @method DELETE
3674
- * @path /cfg/knowbase/admin/documents/{id}/
3675
- */
3676
- declare function deleteKnowbaseAdminDocumentsDestroy(id: string, client?: any): Promise<void>;
3677
- /**
3678
- * Reprocess document
3679
- *
3680
- * @method POST
3681
- * @path /cfg/knowbase/admin/documents/{id}/reprocess/
3682
- */
3683
- declare function createKnowbaseAdminDocumentsReprocessCreate(id: string, data: DocumentRequest, client?: any): Promise<Document>;
3684
- /**
3685
- * Get document processing status
3686
- *
3687
- * @method GET
3688
- * @path /cfg/knowbase/admin/documents/{id}/status/
3689
- */
3690
- declare function getKnowbaseAdminDocumentsStatusRetrieve(id: string, client?: any): Promise<DocumentProcessingStatus>;
3691
- /**
3692
- * Get processing statistics
3693
- *
3694
- * @method GET
3695
- * @path /cfg/knowbase/admin/documents/stats/
3696
- */
3697
- declare function getKnowbaseAdminDocumentsStatsRetrieve(client?: any): Promise<DocumentStats>;
3698
- /**
3699
- * List user chat sessions
3700
- *
3701
- * @method GET
3702
- * @path /cfg/knowbase/admin/sessions/
3703
- */
3704
- declare function getKnowbaseAdminSessionsList(params?: {
3705
- page?: number;
3706
- page_size?: number;
3707
- }, client?: any): Promise<PaginatedChatSessionList>;
3708
- /**
3709
- * Create new chat session
3710
- *
3711
- * @method POST
3712
- * @path /cfg/knowbase/admin/sessions/
3713
- */
3714
- declare function createKnowbaseAdminSessionsCreate(data: ChatSessionCreateRequest, client?: any): Promise<ChatSession>;
3715
- /**
3716
- * API operation
3717
- *
3718
- * @method GET
3719
- * @path /cfg/knowbase/admin/sessions/{id}/
3720
- */
3721
- declare function getKnowbaseAdminSessionsRetrieve(id: string, client?: any): Promise<ChatSession>;
3722
- /**
3723
- * API operation
3724
- *
3725
- * @method PUT
3726
- * @path /cfg/knowbase/admin/sessions/{id}/
3727
- */
3728
- declare function updateKnowbaseAdminSessionsUpdate(id: string, data: ChatSessionRequest, client?: any): Promise<ChatSession>;
3729
- /**
3730
- * API operation
3731
- *
3732
- * @method PATCH
3733
- * @path /cfg/knowbase/admin/sessions/{id}/
3734
- */
3735
- declare function partialUpdateKnowbaseAdminSessionsPartialUpdate(id: string, data?: PatchedChatSessionRequest, client?: any): Promise<ChatSession>;
3736
- /**
3737
- * API operation
3738
- *
3739
- * @method DELETE
3740
- * @path /cfg/knowbase/admin/sessions/{id}/
3741
- */
3742
- declare function deleteKnowbaseAdminSessionsDestroy(id: string, client?: any): Promise<void>;
3743
- /**
3744
- * Activate chat session
3745
- *
3746
- * @method POST
3747
- * @path /cfg/knowbase/admin/sessions/{id}/activate/
3748
- */
3749
- declare function createKnowbaseAdminSessionsActivateCreate(id: string, data: ChatSessionRequest, client?: any): Promise<ChatSession>;
3750
- /**
3751
- * Archive chat session
3752
- *
3753
- * @method POST
3754
- * @path /cfg/knowbase/admin/sessions/{id}/archive/
3755
- */
3756
- declare function createKnowbaseAdminSessionsArchiveCreate(id: string, data: ChatSessionRequest, client?: any): Promise<ChatSession>;
3757
- /**
3758
- * List public categories
3759
- *
3760
- * @method GET
3761
- * @path /cfg/knowbase/categories/
3762
- */
3763
- declare function getKnowbaseCategoriesList(params?: {
3764
- page?: number;
3765
- page_size?: number;
3766
- }, client?: any): Promise<PaginatedPublicCategoryList>;
3767
- /**
3768
- * Get public category details
3769
- *
3770
- * @method GET
3771
- * @path /cfg/knowbase/categories/{id}/
3772
- */
3773
- declare function getKnowbaseCategoriesRetrieve(id: string, client?: any): Promise<PublicCategory>;
3774
- /**
3775
- * List public documents
3776
- *
3777
- * @method GET
3778
- * @path /cfg/knowbase/documents/
3779
- */
3780
- declare function getKnowbaseDocumentsList(params?: {
3781
- category?: string;
3782
- page?: number;
3783
- page_size?: number;
3784
- search?: string;
3785
- }, client?: any): Promise<PaginatedPublicDocumentListList>;
3786
- /**
3787
- * Get public document details
3788
- *
3789
- * @method GET
3790
- * @path /cfg/knowbase/documents/{id}/
3791
- */
3792
- declare function getKnowbaseDocumentsRetrieve(id: string, client?: any): Promise<PublicDocument>;
3793
- /**
3794
- * API operation
3795
- *
3796
- * @method GET
3797
- * @path /cfg/knowbase/system/archives/
3798
- */
3799
- declare function getKnowbaseSystemArchivesList(params?: {
3800
- page?: number;
3801
- page_size?: number;
3802
- }, client?: any): Promise<PaginatedDocumentArchiveListList>;
3803
- /**
3804
- * Upload and process archive
3805
- *
3806
- * @method POST
3807
- * @path /cfg/knowbase/system/archives/
3808
- */
3809
- declare function createKnowbaseSystemArchivesCreate(data: any, client?: any): Promise<ArchiveProcessingResult>;
3810
- /**
3811
- * API operation
3812
- *
3813
- * @method GET
3814
- * @path /cfg/knowbase/system/archives/{id}/
3815
- */
3816
- declare function getKnowbaseSystemArchivesRetrieve(id: string, client?: any): Promise<DocumentArchiveDetail>;
3817
- /**
3818
- * API operation
3819
- *
3820
- * @method PUT
3821
- * @path /cfg/knowbase/system/archives/{id}/
3822
- */
3823
- declare function updateKnowbaseSystemArchivesUpdate(id: string, data: DocumentArchiveRequest, client?: any): Promise<DocumentArchive>;
3824
- /**
3825
- * API operation
3826
- *
3827
- * @method PATCH
3828
- * @path /cfg/knowbase/system/archives/{id}/
3829
- */
3830
- declare function partialUpdateKnowbaseSystemArchivesPartialUpdate(id: string, data?: PatchedDocumentArchiveRequest, client?: any): Promise<DocumentArchive>;
3831
- /**
3832
- * API operation
3833
- *
3834
- * @method DELETE
3835
- * @path /cfg/knowbase/system/archives/{id}/
3836
- */
3837
- declare function deleteKnowbaseSystemArchivesDestroy(id: string, client?: any): Promise<void>;
3838
- /**
3839
- * Get archive file tree
3840
- *
3841
- * @method GET
3842
- * @path /cfg/knowbase/system/archives/{id}/file_tree/
3843
- */
3844
- declare function getKnowbaseSystemArchivesFileTreeRetrieve(id: string, client?: any): Promise<any>;
3845
- /**
3846
- * Get archive items
3847
- *
3848
- * @method GET
3849
- * @path /cfg/knowbase/system/archives/{id}/items/
3850
- */
3851
- declare function getKnowbaseSystemArchivesItemsList(id: string, params?: {
3852
- page?: number;
3853
- page_size?: number;
3854
- }, client?: any): Promise<PaginatedArchiveItemList>;
3855
- /**
3856
- * Search archive chunks
3857
- *
3858
- * @method POST
3859
- * @path /cfg/knowbase/system/archives/{id}/search/
3860
- */
3861
- declare function createKnowbaseSystemArchivesSearchCreate(id: string, data: ArchiveSearchRequestRequest, params?: {
3862
- page?: number;
3863
- page_size?: number;
3864
- }, client?: any): Promise<PaginatedArchiveSearchResultList>;
3865
- /**
3866
- * Re-vectorize chunks
3867
- *
3868
- * @method POST
3869
- * @path /cfg/knowbase/system/archives/revectorize/
3870
- */
3871
- declare function createKnowbaseSystemArchivesRevectorizeCreate(data: ChunkRevectorizationRequestRequest, client?: any): Promise<VectorizationResult>;
3872
- /**
3873
- * Get archive statistics
3874
- *
3875
- * @method GET
3876
- * @path /cfg/knowbase/system/archives/statistics/
3877
- */
3878
- declare function getKnowbaseSystemArchivesStatisticsRetrieve(client?: any): Promise<ArchiveStatistics>;
3879
- /**
3880
- * Get vectorization statistics
3881
- *
3882
- * @method GET
3883
- * @path /cfg/knowbase/system/archives/vectorization_stats/
3884
- */
3885
- declare function getKnowbaseSystemArchivesVectorizationStatsRetrieve(client?: any): Promise<VectorizationStatistics>;
3886
- /**
3887
- * API operation
3888
- *
3889
- * @method GET
3890
- * @path /cfg/knowbase/system/chunks/
3891
- */
3892
- declare function getKnowbaseSystemChunksList(params?: {
3893
- page?: number;
3894
- page_size?: number;
3895
- }, client?: any): Promise<PaginatedArchiveItemChunkList>;
3896
- /**
3897
- * API operation
3898
- *
3899
- * @method POST
3900
- * @path /cfg/knowbase/system/chunks/
3901
- */
3902
- declare function createKnowbaseSystemChunksCreate(data: ArchiveItemChunkRequest, client?: any): Promise<ArchiveItemChunk>;
3903
- /**
3904
- * API operation
3905
- *
3906
- * @method GET
3907
- * @path /cfg/knowbase/system/chunks/{id}/
3908
- */
3909
- declare function getKnowbaseSystemChunksRetrieve(id: string, client?: any): Promise<ArchiveItemChunkDetail>;
3910
- /**
3911
- * API operation
3912
- *
3913
- * @method PUT
3914
- * @path /cfg/knowbase/system/chunks/{id}/
3915
- */
3916
- declare function updateKnowbaseSystemChunksUpdate(id: string, data: ArchiveItemChunkRequest, client?: any): Promise<ArchiveItemChunk>;
3917
- /**
3918
- * API operation
3919
- *
3920
- * @method PATCH
3921
- * @path /cfg/knowbase/system/chunks/{id}/
3922
- */
3923
- declare function partialUpdateKnowbaseSystemChunksPartialUpdate(id: string, data?: PatchedArchiveItemChunkRequest, client?: any): Promise<ArchiveItemChunk>;
3924
- /**
3925
- * API operation
3926
- *
3927
- * @method DELETE
3928
- * @path /cfg/knowbase/system/chunks/{id}/
3929
- */
3930
- declare function deleteKnowbaseSystemChunksDestroy(id: string, client?: any): Promise<void>;
3931
- /**
3932
- * Get chunk context
3933
- *
3934
- * @method GET
3935
- * @path /cfg/knowbase/system/chunks/{id}/context/
3936
- */
3937
- declare function getKnowbaseSystemChunksContextRetrieve(id: string, client?: any): Promise<ArchiveItemChunkDetail>;
3938
- /**
3939
- * Vectorize chunk
3940
- *
3941
- * @method POST
3942
- * @path /cfg/knowbase/system/chunks/{id}/vectorize/
3943
- */
3944
- declare function createKnowbaseSystemChunksVectorizeCreate(id: string, data: ArchiveItemChunkRequest, client?: any): Promise<any>;
3945
- /**
3946
- * API operation
3947
- *
3948
- * @method GET
3949
- * @path /cfg/knowbase/system/items/
3950
- */
3951
- declare function getKnowbaseSystemItemsList(params?: {
3952
- page?: number;
3953
- page_size?: number;
3954
- }, client?: any): Promise<PaginatedArchiveItemList>;
3955
- /**
3956
- * API operation
3957
- *
3958
- * @method POST
3959
- * @path /cfg/knowbase/system/items/
3960
- */
3961
- declare function createKnowbaseSystemItemsCreate(data: ArchiveItemRequest, client?: any): Promise<ArchiveItem>;
3962
- /**
3963
- * API operation
3964
- *
3965
- * @method GET
3966
- * @path /cfg/knowbase/system/items/{id}/
3967
- */
3968
- declare function getKnowbaseSystemItemsRetrieve(id: string, client?: any): Promise<ArchiveItemDetail>;
3969
- /**
3970
- * API operation
3971
- *
3972
- * @method PUT
3973
- * @path /cfg/knowbase/system/items/{id}/
3974
- */
3975
- declare function updateKnowbaseSystemItemsUpdate(id: string, data: ArchiveItemRequest, client?: any): Promise<ArchiveItem>;
3976
- /**
3977
- * API operation
3978
- *
3979
- * @method PATCH
3980
- * @path /cfg/knowbase/system/items/{id}/
3981
- */
3982
- declare function partialUpdateKnowbaseSystemItemsPartialUpdate(id: string, data?: PatchedArchiveItemRequest, client?: any): Promise<ArchiveItem>;
3983
- /**
3984
- * API operation
3985
- *
3986
- * @method DELETE
3987
- * @path /cfg/knowbase/system/items/{id}/
3988
- */
3989
- declare function deleteKnowbaseSystemItemsDestroy(id: string, client?: any): Promise<void>;
3990
- /**
3991
- * Get item chunks
3992
- *
3993
- * @method GET
3994
- * @path /cfg/knowbase/system/items/{id}/chunks/
3995
- */
3996
- declare function getKnowbaseSystemItemsChunksList(id: string, params?: {
3997
- page?: number;
3998
- page_size?: number;
3999
- }, client?: any): Promise<PaginatedArchiveItemChunkList>;
4000
- /**
4001
- * Get item content
4002
- *
4003
- * @method GET
4004
- * @path /cfg/knowbase/system/items/{id}/content/
4005
- */
4006
- declare function getKnowbaseSystemItemsContentRetrieve(id: string, client?: any): Promise<ArchiveItemDetail>;
4007
-
4008
- /**
4009
- * Typed Fetchers - Universal API functions
4010
- *
4011
- * Auto-generated from OpenAPI specification.
4012
- * These functions work in any JavaScript environment.
4013
- *
4014
- * Features:
4015
- * - Runtime validation with Zod
4016
- * - Type-safe parameters and responses
4017
- * - Works with any data-fetching library (SWR, React Query, etc)
4018
- * - Server Component compatible
4019
- *
4020
- * Usage:
4021
- * ```typescript
4022
- * import * as fetchers from './fetchers'
4023
- *
4024
- * // Direct usage
4025
- * const user = await fetchers.getUser(1)
4026
- *
4027
- * // With SWR
4028
- * const { data } = useSWR('user-1', () => fetchers.getUser(1))
4029
- *
4030
- * // With React Query
4031
- * const { data } = useQuery(['user', 1], () => fetchers.getUser(1))
4032
- * ```
4033
- */
4034
-
4035
- declare const index_createKnowbaseAdminChatCreate: typeof createKnowbaseAdminChatCreate;
4036
- declare const index_createKnowbaseAdminChatQueryCreate: typeof createKnowbaseAdminChatQueryCreate;
4037
- declare const index_createKnowbaseAdminDocumentsCreate: typeof createKnowbaseAdminDocumentsCreate;
4038
- declare const index_createKnowbaseAdminDocumentsReprocessCreate: typeof createKnowbaseAdminDocumentsReprocessCreate;
4039
- declare const index_createKnowbaseAdminSessionsActivateCreate: typeof createKnowbaseAdminSessionsActivateCreate;
4040
- declare const index_createKnowbaseAdminSessionsArchiveCreate: typeof createKnowbaseAdminSessionsArchiveCreate;
4041
- declare const index_createKnowbaseAdminSessionsCreate: typeof createKnowbaseAdminSessionsCreate;
4042
- declare const index_createKnowbaseSystemArchivesCreate: typeof createKnowbaseSystemArchivesCreate;
4043
- declare const index_createKnowbaseSystemArchivesRevectorizeCreate: typeof createKnowbaseSystemArchivesRevectorizeCreate;
4044
- declare const index_createKnowbaseSystemArchivesSearchCreate: typeof createKnowbaseSystemArchivesSearchCreate;
4045
- declare const index_createKnowbaseSystemChunksCreate: typeof createKnowbaseSystemChunksCreate;
4046
- declare const index_createKnowbaseSystemChunksVectorizeCreate: typeof createKnowbaseSystemChunksVectorizeCreate;
4047
- declare const index_createKnowbaseSystemItemsCreate: typeof createKnowbaseSystemItemsCreate;
4048
- declare const index_deleteKnowbaseAdminChatDestroy: typeof deleteKnowbaseAdminChatDestroy;
4049
- declare const index_deleteKnowbaseAdminDocumentsDestroy: typeof deleteKnowbaseAdminDocumentsDestroy;
4050
- declare const index_deleteKnowbaseAdminSessionsDestroy: typeof deleteKnowbaseAdminSessionsDestroy;
4051
- declare const index_deleteKnowbaseSystemArchivesDestroy: typeof deleteKnowbaseSystemArchivesDestroy;
4052
- declare const index_deleteKnowbaseSystemChunksDestroy: typeof deleteKnowbaseSystemChunksDestroy;
4053
- declare const index_deleteKnowbaseSystemItemsDestroy: typeof deleteKnowbaseSystemItemsDestroy;
4054
- declare const index_getKnowbaseAdminChatHistoryRetrieve: typeof getKnowbaseAdminChatHistoryRetrieve;
4055
- declare const index_getKnowbaseAdminChatList: typeof getKnowbaseAdminChatList;
4056
- declare const index_getKnowbaseAdminChatRetrieve: typeof getKnowbaseAdminChatRetrieve;
4057
- declare const index_getKnowbaseAdminDocumentsList: typeof getKnowbaseAdminDocumentsList;
4058
- declare const index_getKnowbaseAdminDocumentsRetrieve: typeof getKnowbaseAdminDocumentsRetrieve;
4059
- declare const index_getKnowbaseAdminDocumentsStatsRetrieve: typeof getKnowbaseAdminDocumentsStatsRetrieve;
4060
- declare const index_getKnowbaseAdminDocumentsStatusRetrieve: typeof getKnowbaseAdminDocumentsStatusRetrieve;
4061
- declare const index_getKnowbaseAdminSessionsList: typeof getKnowbaseAdminSessionsList;
4062
- declare const index_getKnowbaseAdminSessionsRetrieve: typeof getKnowbaseAdminSessionsRetrieve;
4063
- declare const index_getKnowbaseCategoriesList: typeof getKnowbaseCategoriesList;
4064
- declare const index_getKnowbaseCategoriesRetrieve: typeof getKnowbaseCategoriesRetrieve;
4065
- declare const index_getKnowbaseDocumentsList: typeof getKnowbaseDocumentsList;
4066
- declare const index_getKnowbaseDocumentsRetrieve: typeof getKnowbaseDocumentsRetrieve;
4067
- declare const index_getKnowbaseSystemArchivesFileTreeRetrieve: typeof getKnowbaseSystemArchivesFileTreeRetrieve;
4068
- declare const index_getKnowbaseSystemArchivesItemsList: typeof getKnowbaseSystemArchivesItemsList;
4069
- declare const index_getKnowbaseSystemArchivesList: typeof getKnowbaseSystemArchivesList;
4070
- declare const index_getKnowbaseSystemArchivesRetrieve: typeof getKnowbaseSystemArchivesRetrieve;
4071
- declare const index_getKnowbaseSystemArchivesStatisticsRetrieve: typeof getKnowbaseSystemArchivesStatisticsRetrieve;
4072
- declare const index_getKnowbaseSystemArchivesVectorizationStatsRetrieve: typeof getKnowbaseSystemArchivesVectorizationStatsRetrieve;
4073
- declare const index_getKnowbaseSystemChunksContextRetrieve: typeof getKnowbaseSystemChunksContextRetrieve;
4074
- declare const index_getKnowbaseSystemChunksList: typeof getKnowbaseSystemChunksList;
4075
- declare const index_getKnowbaseSystemChunksRetrieve: typeof getKnowbaseSystemChunksRetrieve;
4076
- declare const index_getKnowbaseSystemItemsChunksList: typeof getKnowbaseSystemItemsChunksList;
4077
- declare const index_getKnowbaseSystemItemsContentRetrieve: typeof getKnowbaseSystemItemsContentRetrieve;
4078
- declare const index_getKnowbaseSystemItemsList: typeof getKnowbaseSystemItemsList;
4079
- declare const index_getKnowbaseSystemItemsRetrieve: typeof getKnowbaseSystemItemsRetrieve;
4080
- declare const index_partialUpdateKnowbaseAdminChatPartialUpdate: typeof partialUpdateKnowbaseAdminChatPartialUpdate;
4081
- declare const index_partialUpdateKnowbaseAdminDocumentsPartialUpdate: typeof partialUpdateKnowbaseAdminDocumentsPartialUpdate;
4082
- declare const index_partialUpdateKnowbaseAdminSessionsPartialUpdate: typeof partialUpdateKnowbaseAdminSessionsPartialUpdate;
4083
- declare const index_partialUpdateKnowbaseSystemArchivesPartialUpdate: typeof partialUpdateKnowbaseSystemArchivesPartialUpdate;
4084
- declare const index_partialUpdateKnowbaseSystemChunksPartialUpdate: typeof partialUpdateKnowbaseSystemChunksPartialUpdate;
4085
- declare const index_partialUpdateKnowbaseSystemItemsPartialUpdate: typeof partialUpdateKnowbaseSystemItemsPartialUpdate;
4086
- declare const index_updateKnowbaseAdminChatUpdate: typeof updateKnowbaseAdminChatUpdate;
4087
- declare const index_updateKnowbaseAdminDocumentsUpdate: typeof updateKnowbaseAdminDocumentsUpdate;
4088
- declare const index_updateKnowbaseAdminSessionsUpdate: typeof updateKnowbaseAdminSessionsUpdate;
4089
- declare const index_updateKnowbaseSystemArchivesUpdate: typeof updateKnowbaseSystemArchivesUpdate;
4090
- declare const index_updateKnowbaseSystemChunksUpdate: typeof updateKnowbaseSystemChunksUpdate;
4091
- declare const index_updateKnowbaseSystemItemsUpdate: typeof updateKnowbaseSystemItemsUpdate;
4092
- declare namespace index {
4093
- export { index_createKnowbaseAdminChatCreate as createKnowbaseAdminChatCreate, index_createKnowbaseAdminChatQueryCreate as createKnowbaseAdminChatQueryCreate, index_createKnowbaseAdminDocumentsCreate as createKnowbaseAdminDocumentsCreate, index_createKnowbaseAdminDocumentsReprocessCreate as createKnowbaseAdminDocumentsReprocessCreate, index_createKnowbaseAdminSessionsActivateCreate as createKnowbaseAdminSessionsActivateCreate, index_createKnowbaseAdminSessionsArchiveCreate as createKnowbaseAdminSessionsArchiveCreate, index_createKnowbaseAdminSessionsCreate as createKnowbaseAdminSessionsCreate, index_createKnowbaseSystemArchivesCreate as createKnowbaseSystemArchivesCreate, index_createKnowbaseSystemArchivesRevectorizeCreate as createKnowbaseSystemArchivesRevectorizeCreate, index_createKnowbaseSystemArchivesSearchCreate as createKnowbaseSystemArchivesSearchCreate, index_createKnowbaseSystemChunksCreate as createKnowbaseSystemChunksCreate, index_createKnowbaseSystemChunksVectorizeCreate as createKnowbaseSystemChunksVectorizeCreate, index_createKnowbaseSystemItemsCreate as createKnowbaseSystemItemsCreate, index_deleteKnowbaseAdminChatDestroy as deleteKnowbaseAdminChatDestroy, index_deleteKnowbaseAdminDocumentsDestroy as deleteKnowbaseAdminDocumentsDestroy, index_deleteKnowbaseAdminSessionsDestroy as deleteKnowbaseAdminSessionsDestroy, index_deleteKnowbaseSystemArchivesDestroy as deleteKnowbaseSystemArchivesDestroy, index_deleteKnowbaseSystemChunksDestroy as deleteKnowbaseSystemChunksDestroy, index_deleteKnowbaseSystemItemsDestroy as deleteKnowbaseSystemItemsDestroy, index_getKnowbaseAdminChatHistoryRetrieve as getKnowbaseAdminChatHistoryRetrieve, index_getKnowbaseAdminChatList as getKnowbaseAdminChatList, index_getKnowbaseAdminChatRetrieve as getKnowbaseAdminChatRetrieve, index_getKnowbaseAdminDocumentsList as getKnowbaseAdminDocumentsList, index_getKnowbaseAdminDocumentsRetrieve as getKnowbaseAdminDocumentsRetrieve, index_getKnowbaseAdminDocumentsStatsRetrieve as getKnowbaseAdminDocumentsStatsRetrieve, index_getKnowbaseAdminDocumentsStatusRetrieve as getKnowbaseAdminDocumentsStatusRetrieve, index_getKnowbaseAdminSessionsList as getKnowbaseAdminSessionsList, index_getKnowbaseAdminSessionsRetrieve as getKnowbaseAdminSessionsRetrieve, index_getKnowbaseCategoriesList as getKnowbaseCategoriesList, index_getKnowbaseCategoriesRetrieve as getKnowbaseCategoriesRetrieve, index_getKnowbaseDocumentsList as getKnowbaseDocumentsList, index_getKnowbaseDocumentsRetrieve as getKnowbaseDocumentsRetrieve, index_getKnowbaseSystemArchivesFileTreeRetrieve as getKnowbaseSystemArchivesFileTreeRetrieve, index_getKnowbaseSystemArchivesItemsList as getKnowbaseSystemArchivesItemsList, index_getKnowbaseSystemArchivesList as getKnowbaseSystemArchivesList, index_getKnowbaseSystemArchivesRetrieve as getKnowbaseSystemArchivesRetrieve, index_getKnowbaseSystemArchivesStatisticsRetrieve as getKnowbaseSystemArchivesStatisticsRetrieve, index_getKnowbaseSystemArchivesVectorizationStatsRetrieve as getKnowbaseSystemArchivesVectorizationStatsRetrieve, index_getKnowbaseSystemChunksContextRetrieve as getKnowbaseSystemChunksContextRetrieve, index_getKnowbaseSystemChunksList as getKnowbaseSystemChunksList, index_getKnowbaseSystemChunksRetrieve as getKnowbaseSystemChunksRetrieve, index_getKnowbaseSystemItemsChunksList as getKnowbaseSystemItemsChunksList, index_getKnowbaseSystemItemsContentRetrieve as getKnowbaseSystemItemsContentRetrieve, index_getKnowbaseSystemItemsList as getKnowbaseSystemItemsList, index_getKnowbaseSystemItemsRetrieve as getKnowbaseSystemItemsRetrieve, index_partialUpdateKnowbaseAdminChatPartialUpdate as partialUpdateKnowbaseAdminChatPartialUpdate, index_partialUpdateKnowbaseAdminDocumentsPartialUpdate as partialUpdateKnowbaseAdminDocumentsPartialUpdate, index_partialUpdateKnowbaseAdminSessionsPartialUpdate as partialUpdateKnowbaseAdminSessionsPartialUpdate, index_partialUpdateKnowbaseSystemArchivesPartialUpdate as partialUpdateKnowbaseSystemArchivesPartialUpdate, index_partialUpdateKnowbaseSystemChunksPartialUpdate as partialUpdateKnowbaseSystemChunksPartialUpdate, index_partialUpdateKnowbaseSystemItemsPartialUpdate as partialUpdateKnowbaseSystemItemsPartialUpdate, index_updateKnowbaseAdminChatUpdate as updateKnowbaseAdminChatUpdate, index_updateKnowbaseAdminDocumentsUpdate as updateKnowbaseAdminDocumentsUpdate, index_updateKnowbaseAdminSessionsUpdate as updateKnowbaseAdminSessionsUpdate, index_updateKnowbaseSystemArchivesUpdate as updateKnowbaseSystemArchivesUpdate, index_updateKnowbaseSystemChunksUpdate as updateKnowbaseSystemChunksUpdate, index_updateKnowbaseSystemItemsUpdate as updateKnowbaseSystemItemsUpdate };
4094
- }
4095
-
4096
- /**
4097
- * Global API Instance - Singleton configuration
4098
- *
4099
- * This module provides a global API instance that can be configured once
4100
- * and used throughout your application.
4101
- *
4102
- * Usage:
4103
- * ```typescript
4104
- * // Configure once (e.g., in your app entry point)
4105
- * import { configureAPI } from './api-instance'
4106
- *
4107
- * configureAPI({
4108
- * baseUrl: 'https://api.example.com',
4109
- * token: 'your-jwt-token'
4110
- * })
4111
- *
4112
- * // Then use fetchers and hooks anywhere without configuration
4113
- * import { getUsers } from './fetchers'
4114
- * const users = await getUsers({ page: 1 })
4115
- * ```
4116
- *
4117
- * For SSR or multiple instances:
4118
- * ```typescript
4119
- * import { API } from './index'
4120
- * import { getUsers } from './fetchers'
4121
- *
4122
- * const api = new API('https://api.example.com')
4123
- * const users = await getUsers({ page: 1 }, api)
4124
- * ```
4125
- */
4126
-
4127
- /**
4128
- * Get the global API instance
4129
- * @throws Error if API is not configured
4130
- */
4131
- declare function getAPIInstance(): API;
4132
- /**
4133
- * Check if API is configured
4134
- */
4135
- declare function isAPIConfigured(): boolean;
4136
- /**
4137
- * Configure the global API instance
4138
- *
4139
- * @param baseUrl - Base URL for the API
4140
- * @param options - Optional configuration (storage, retry, logger)
4141
- *
4142
- * @example
4143
- * ```typescript
4144
- * configureAPI({
4145
- * baseUrl: 'https://api.example.com',
4146
- * token: 'jwt-token',
4147
- * options: {
4148
- * retryConfig: { maxRetries: 3 },
4149
- * loggerConfig: { enabled: true }
4150
- * }
4151
- * })
4152
- * ```
4153
- */
4154
- declare function configureAPI(config: {
4155
- baseUrl: string;
4156
- token?: string;
4157
- refreshToken?: string;
4158
- options?: APIOptions;
4159
- }): API;
4160
- /**
4161
- * Reconfigure the global API instance with new settings
4162
- * Useful for updating tokens or base URL
4163
- */
4164
- declare function reconfigureAPI(updates: {
4165
- baseUrl?: string;
4166
- token?: string;
4167
- refreshToken?: string;
4168
- }): API;
4169
- /**
4170
- * Clear tokens from the global API instance
4171
- */
4172
- declare function clearAPITokens(): void;
4173
- /**
4174
- * Reset the global API instance
4175
- * Useful for testing or logout scenarios
4176
- */
4177
- declare function resetAPI(): void;
4178
-
4179
- /**
4180
- * API Error Classes
4181
- *
4182
- * Typed error classes with Django REST Framework support.
4183
- */
4184
- /**
4185
- * HTTP API Error with DRF field-specific validation errors.
4186
- *
4187
- * Usage:
4188
- * ```typescript
4189
- * try {
4190
- * await api.users.create(userData);
4191
- * } catch (error) {
4192
- * if (error instanceof APIError) {
4193
- * if (error.isValidationError) {
4194
- * console.log('Field errors:', error.fieldErrors);
4195
- * // { "email": ["Email already exists"], "username": ["Required"] }
4196
- * }
4197
- * }
4198
- * }
4199
- * ```
4200
- */
4201
- declare class APIError extends Error {
4202
- statusCode: number;
4203
- statusText: string;
4204
- response: any;
4205
- url: string;
4206
- constructor(statusCode: number, statusText: string, response: any, url: string, message?: string);
4207
- /**
4208
- * Get error details from response.
4209
- * DRF typically returns: { "detail": "Error message" } or { "field": ["error1", "error2"] }
4210
- */
4211
- get details(): Record<string, any> | null;
4212
- /**
4213
- * Get field-specific validation errors from DRF.
4214
- * Returns: { "field_name": ["error1", "error2"], ... }
4215
- */
4216
- get fieldErrors(): Record<string, string[]> | null;
4217
- /**
4218
- * Get single error message from DRF.
4219
- * Checks for "detail", "message", or first field error.
4220
- */
4221
- get errorMessage(): string;
4222
- get isValidationError(): boolean;
4223
- get isAuthError(): boolean;
4224
- get isPermissionError(): boolean;
4225
- get isNotFoundError(): boolean;
4226
- get isServerError(): boolean;
4227
- }
4228
- /**
4229
- * Network Error (connection failed, timeout, etc.)
4230
- */
4231
- declare class NetworkError extends Error {
4232
- url: string;
4233
- originalError?: Error;
4234
- constructor(message: string, url: string, originalError?: Error);
4235
- }
4236
-
4237
- /**
4238
- * Django CFG API - API Client with JWT Management
4239
- *
4240
- * Usage:
4241
- * ```typescript
4242
- * import { API } from './api';
4243
- *
4244
- * const api = new API('https://api.example.com');
4245
- *
4246
- * // Set JWT token
4247
- * api.setToken('your-jwt-token', 'refresh-token');
4248
- *
4249
- * // Use API
4250
- * const posts = await api.posts.list();
4251
- * const user = await api.users.retrieve(1);
4252
- *
4253
- * // Check authentication
4254
- * if (api.isAuthenticated()) {
4255
- * // ...
4256
- * }
4257
- *
4258
- * // Custom storage with logging (for Electron/Node.js)
4259
- * import { MemoryStorageAdapter, APILogger } from './storage';
4260
- * const logger = new APILogger({ enabled: true, logLevel: 'debug' });
4261
- * const api = new API('https://api.example.com', {
4262
- * storage: new MemoryStorageAdapter(logger),
4263
- * loggerConfig: { enabled: true, logLevel: 'debug' }
4264
- * });
4265
- *
4266
- * // Get OpenAPI schema
4267
- * const schema = api.getSchema();
4268
- * ```
4269
- */
4270
-
4271
- declare const TOKEN_KEY = "auth_token";
4272
- declare const REFRESH_TOKEN_KEY = "refresh_token";
4273
- interface APIOptions {
4274
- /** Custom storage adapter (defaults to LocalStorageAdapter) */
4275
- storage?: StorageAdapter;
4276
- /** Retry configuration for failed requests */
4277
- retryConfig?: RetryConfig;
4278
- /** Logger configuration */
4279
- loggerConfig?: Partial<LoggerConfig>;
4280
- }
4281
- declare class API {
4282
- private baseUrl;
4283
- private _client;
4284
- private _token;
4285
- private _refreshToken;
4286
- private storage;
4287
- private options?;
4288
- ext_knowbase_knowbase: ExtKnowbaseKnowbase;
4289
- constructor(baseUrl: string, options?: APIOptions);
4290
- private _loadTokensFromStorage;
4291
- private _reinitClients;
4292
- private _injectAuthHeader;
4293
- /**
4294
- * Get current JWT token
4295
- */
4296
- getToken(): string | null;
4297
- /**
4298
- * Get current refresh token
4299
- */
4300
- getRefreshToken(): string | null;
4301
- /**
4302
- * Set JWT token and refresh token
4303
- * @param token - JWT access token
4304
- * @param refreshToken - JWT refresh token (optional)
4305
- */
4306
- setToken(token: string, refreshToken?: string): void;
4307
- /**
4308
- * Clear all tokens
4309
- */
4310
- clearTokens(): void;
4311
- /**
4312
- * Check if user is authenticated
4313
- */
4314
- isAuthenticated(): boolean;
4315
- /**
4316
- * Update base URL and reinitialize clients
4317
- * @param url - New base URL
4318
- */
4319
- setBaseUrl(url: string): void;
4320
- /**
4321
- * Get current base URL
4322
- */
4323
- getBaseUrl(): string;
4324
- /**
4325
- * Get OpenAPI schema path
4326
- * @returns Path to the OpenAPI schema JSON file
4327
- *
4328
- * Note: The OpenAPI schema is available in the schema.json file.
4329
- * You can load it dynamically using:
4330
- * ```typescript
4331
- * const schema = await fetch('./schema.json').then(r => r.json());
4332
- * // or using fs in Node.js:
4333
- * // const schema = JSON.parse(fs.readFileSync('./schema.json', 'utf-8'));
4334
- * ```
4335
- */
4336
- getSchemaPath(): string;
4337
- }
4338
-
4339
- /**
4340
- * Knowbase Extension API
4341
- *
4342
- * Pre-configured API instance with shared authentication
4343
- */
4344
-
4345
- declare const apiKnowbase: API;
4346
-
4347
- /**
4348
- * Chat Types
4349
- * Type definitions for RAG-powered chat widget
4350
- */
4351
-
4352
- type ChatMessage = ChatMessage$2;
4353
- type ChatSource = ChatSource$2;
4354
- interface ChatMessageWithSources extends ChatMessage {
4355
- sources?: ChatSource[];
4356
- }
4357
- interface ChatWidgetProps {
4358
- /** Whether to auto-open on mount */
4359
- autoOpen?: boolean;
4360
- /** Render even when closed (for animations) */
4361
- persistent?: boolean;
4362
- /** Additional CSS classes */
4363
- className?: string;
4364
- /** Callback when toggle state changes */
4365
- onToggle?: (isOpen: boolean) => void;
4366
- /** Callback when message is sent */
4367
- onMessage?: (message: ChatMessageWithSources) => void;
4368
- }
4369
- interface ChatUIState {
4370
- isOpen: boolean;
4371
- isExpanded: boolean;
4372
- isMinimized: boolean;
4373
- showSources: boolean;
4374
- showTimestamps: boolean;
4375
- }
4376
- interface MessageListProps {
4377
- messages: ChatMessageWithSources[];
4378
- isLoading?: boolean;
4379
- showSources?: boolean;
4380
- showTimestamps?: boolean;
4381
- autoScroll?: boolean;
4382
- className?: string;
4383
- }
4384
- interface MessageInputProps {
4385
- onSend: (message: string) => Promise<void>;
4386
- isLoading?: boolean;
4387
- disabled?: boolean;
4388
- placeholder?: string;
4389
- className?: string;
4390
- }
4391
- interface SessionListProps {
4392
- isOpen: boolean;
4393
- onClose: () => void;
4394
- onSelectSession: (sessionId: string) => void;
4395
- className?: string;
4396
- }
4397
-
4398
- export { API, APIClient, APIError, APILogger, type APIOptions, type ArchiveItem, type ArchiveItemChunk, type ArchiveItemChunkDetail, ArchiveItemChunkDetailSchema, type ArchiveItemChunkRequest, ArchiveItemChunkRequestSchema, ArchiveItemChunkSchema, type ArchiveItemDetail, ArchiveItemDetailSchema, type ArchiveItemRequest, ArchiveItemRequestSchema, ArchiveItemSchema, type ArchiveProcessingResult, ArchiveProcessingResultSchema, type ArchiveSearchRequestRequest, ArchiveSearchRequestRequestSchema, type ArchiveSearchResult, ArchiveSearchResultSchema, type ArchiveStatistics, ArchiveStatisticsSchema, type ChatHistory, ChatHistorySchema, type ChatMessage$1 as ChatMessage, ChatMessageSchema, type ChatMessageWithSources, type ChatQueryRequest, ChatQueryRequestSchema, type ChatResponse, type ChatResponseRequest, ChatResponseRequestSchema, ChatResponseSchema, type ChatSession, type ChatSessionCreateRequest, ChatSessionCreateRequestSchema, type ChatSessionRequest, ChatSessionRequestSchema, ChatSessionSchema, type ChatSource$1 as ChatSource, type ChatSourceRequest, ChatSourceRequestSchema, ChatSourceSchema, type ChatUIState, type ChatWidgetProps, type ChunkRevectorizationRequestRequest, ChunkRevectorizationRequestRequestSchema, CookieStorageAdapter, DEFAULT_RETRY_CONFIG, type Document, type DocumentArchive, type DocumentArchiveDetail, DocumentArchiveDetailSchema, type DocumentArchiveList, DocumentArchiveListSchema, type DocumentArchiveRequest, DocumentArchiveRequestSchema, DocumentArchiveSchema, type DocumentCategory, type DocumentCategoryRequest, DocumentCategoryRequestSchema, DocumentCategorySchema, type DocumentCreateRequest, DocumentCreateRequestSchema, type DocumentProcessingStatus, DocumentProcessingStatusSchema, type DocumentRequest, DocumentRequestSchema, DocumentSchema, type DocumentStats, DocumentStatsSchema, GeneratedEnums as Enums, type ErrorLog, models as ExtKnowbaseKnowbaseTypes, type FailedAttemptInfo, FetchAdapter, index as Fetchers, type HttpClientAdapter, type HttpRequest, type HttpResponse, LocalStorageAdapter, type LoggerConfig, MemoryStorageAdapter, type MessageInputProps, type MessageListProps, NetworkError, type PaginatedArchiveItemChunkList, PaginatedArchiveItemChunkListSchema, type PaginatedArchiveItemList, PaginatedArchiveItemListSchema, type PaginatedArchiveSearchResultList, PaginatedArchiveSearchResultListSchema, type PaginatedChatResponseList, PaginatedChatResponseListSchema, type PaginatedChatSessionList, PaginatedChatSessionListSchema, type PaginatedDocumentArchiveListList, PaginatedDocumentArchiveListListSchema, type PaginatedDocumentList, PaginatedDocumentListSchema, type PaginatedPublicCategoryList, PaginatedPublicCategoryListSchema, type PaginatedPublicDocumentListList, PaginatedPublicDocumentListListSchema, type PatchedArchiveItemChunkRequest, PatchedArchiveItemChunkRequestSchema, type PatchedArchiveItemRequest, PatchedArchiveItemRequestSchema, type PatchedChatResponseRequest, PatchedChatResponseRequestSchema, type PatchedChatSessionRequest, PatchedChatSessionRequestSchema, type PatchedDocumentArchiveRequest, PatchedDocumentArchiveRequestSchema, type PatchedDocumentRequest, PatchedDocumentRequestSchema, type PublicCategory, PublicCategorySchema, type PublicDocument, type PublicDocumentList, PublicDocumentListSchema, PublicDocumentSchema, REFRESH_TOKEN_KEY, type RequestLog, type ResponseLog, type RetryConfig, index$1 as Schemas, type SessionListProps, type StorageAdapter, TOKEN_KEY, type ValidationErrorDetail, type ValidationErrorEvent, type VectorizationResult, VectorizationResultSchema, type VectorizationStatistics, VectorizationStatisticsSchema, apiKnowbase, clearAPITokens, configureAPI, createKnowbaseAdminChatCreate, createKnowbaseAdminChatQueryCreate, createKnowbaseAdminDocumentsCreate, createKnowbaseAdminDocumentsReprocessCreate, createKnowbaseAdminSessionsActivateCreate, createKnowbaseAdminSessionsArchiveCreate, createKnowbaseAdminSessionsCreate, createKnowbaseSystemArchivesCreate, createKnowbaseSystemArchivesRevectorizeCreate, createKnowbaseSystemArchivesSearchCreate, createKnowbaseSystemChunksCreate, createKnowbaseSystemChunksVectorizeCreate, createKnowbaseSystemItemsCreate, deleteKnowbaseAdminChatDestroy, deleteKnowbaseAdminDocumentsDestroy, deleteKnowbaseAdminSessionsDestroy, deleteKnowbaseSystemArchivesDestroy, deleteKnowbaseSystemChunksDestroy, deleteKnowbaseSystemItemsDestroy, dispatchValidationError, formatZodError, getAPIInstance, getKnowbaseAdminChatHistoryRetrieve, getKnowbaseAdminChatList, getKnowbaseAdminChatRetrieve, getKnowbaseAdminDocumentsList, getKnowbaseAdminDocumentsRetrieve, getKnowbaseAdminDocumentsStatsRetrieve, getKnowbaseAdminDocumentsStatusRetrieve, getKnowbaseAdminSessionsList, getKnowbaseAdminSessionsRetrieve, getKnowbaseCategoriesList, getKnowbaseCategoriesRetrieve, getKnowbaseDocumentsList, getKnowbaseDocumentsRetrieve, getKnowbaseSystemArchivesFileTreeRetrieve, getKnowbaseSystemArchivesItemsList, getKnowbaseSystemArchivesList, getKnowbaseSystemArchivesRetrieve, getKnowbaseSystemArchivesStatisticsRetrieve, getKnowbaseSystemArchivesVectorizationStatsRetrieve, getKnowbaseSystemChunksContextRetrieve, getKnowbaseSystemChunksList, getKnowbaseSystemChunksRetrieve, getKnowbaseSystemItemsChunksList, getKnowbaseSystemItemsContentRetrieve, getKnowbaseSystemItemsList, getKnowbaseSystemItemsRetrieve, isAPIConfigured, onValidationError, partialUpdateKnowbaseAdminChatPartialUpdate, partialUpdateKnowbaseAdminDocumentsPartialUpdate, partialUpdateKnowbaseAdminSessionsPartialUpdate, partialUpdateKnowbaseSystemArchivesPartialUpdate, partialUpdateKnowbaseSystemChunksPartialUpdate, partialUpdateKnowbaseSystemItemsPartialUpdate, reconfigureAPI, resetAPI, shouldRetry, updateKnowbaseAdminChatUpdate, updateKnowbaseAdminDocumentsUpdate, updateKnowbaseAdminSessionsUpdate, updateKnowbaseSystemArchivesUpdate, updateKnowbaseSystemChunksUpdate, updateKnowbaseSystemItemsUpdate, withRetry };