@djangocfg/ext-knowbase 1.0.1 → 1.0.3

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