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