@djangocfg/ext-knowbase 1.0.25 → 1.0.27
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/config.cjs +1 -1
- package/dist/config.js +1 -1
- package/dist/hooks.cjs +592 -210
- package/dist/hooks.d.cts +21 -0
- package/dist/hooks.d.ts +21 -0
- package/dist/hooks.js +592 -210
- package/dist/i18n.cjs +507 -3
- package/dist/i18n.d.cts +29 -1
- package/dist/i18n.d.ts +29 -1
- package/dist/i18n.js +492 -2
- package/dist/index.cjs +115 -209
- package/dist/index.d.cts +72 -205
- package/dist/index.d.ts +72 -205
- package/dist/index.js +115 -209
- package/package.json +9 -9
- package/src/api/generated/ext_knowbase/_utils/fetchers/ext_knowbase__knowbase.ts +69 -136
- package/src/api/generated/ext_knowbase/_utils/hooks/ext_knowbase__knowbase.ts +14 -15
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItem.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemChunk.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemChunkDetail.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemChunkRequest.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemDetail.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveItemRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveProcessingResult.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveSearchRequestRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveSearchResult.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ArchiveStatistics.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/CfgKnowbaseSystemArchivesCreateRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatHistory.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatMessage.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatQueryRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatResponse.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatResponseRequest.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSession.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSessionCreateRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSessionRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSource.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChatSourceRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/ChunkRevectorizationRequestRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/Document.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentArchive.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentArchiveDetail.schema.ts +6 -7
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentArchiveList.schema.ts +5 -6
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentArchiveRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentCategory.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentCategoryRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentCreateRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentProcessingStatus.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/DocumentStats.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedArchiveItemChunkList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedArchiveItemList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedArchiveSearchResultList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedChatResponseList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedChatSessionList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedDocumentArchiveListList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedDocumentList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedPublicCategoryList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PaginatedPublicDocumentListList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +3 -4
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedArchiveItemRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedChatResponseRequest.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedChatSessionRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedDocumentArchiveRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PatchedDocumentRequest.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PublicCategory.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/PublicDocument.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/PublicDocumentList.schema.ts +2 -3
- package/src/api/generated/ext_knowbase/_utils/schemas/VectorizationResult.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/_utils/schemas/VectorizationStatistics.schema.ts +1 -1
- package/src/api/generated/ext_knowbase/api-instance.ts +1 -1
- package/src/api/generated/ext_knowbase/client.ts +6 -5
- package/src/api/generated/ext_knowbase/enums.ts +0 -165
- package/src/api/generated/ext_knowbase/ext_knowbase__knowbase/client.ts +35 -34
- package/src/api/generated/ext_knowbase/ext_knowbase__knowbase/models.ts +9 -9
- package/src/api/generated/ext_knowbase/index.ts +8 -6
- package/src/api/generated/ext_knowbase/retry.ts +0 -1
- package/src/api/generated/ext_knowbase/schema.json +189 -0
- package/src/i18n/index.ts +14 -0
- package/src/i18n/locales/ar.ts +36 -0
- package/src/i18n/locales/da.ts +36 -0
- package/src/i18n/locales/de.ts +36 -0
- package/src/i18n/locales/es.ts +36 -0
- package/src/i18n/locales/fr.ts +36 -0
- package/src/i18n/locales/it.ts +36 -0
- package/src/i18n/locales/ja.ts +36 -0
- package/src/i18n/locales/nl.ts +36 -0
- package/src/i18n/locales/no.ts +36 -0
- package/src/i18n/locales/pl.ts +36 -0
- package/src/i18n/locales/pt-BR.ts +36 -0
- package/src/i18n/locales/sv.ts +36 -0
- package/src/i18n/locales/tr.ts +36 -0
- package/src/i18n/locales/zh.ts +36 -0
- package/src/i18n/useKnowbaseT.ts +15 -1
|
@@ -30,120 +30,53 @@
|
|
|
30
30
|
* const users = await getUsers({ page: 1 }, api)
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
import { consola } from 'consola'
|
|
34
|
-
|
|
35
|
-
import {
|
|
36
|
-
import { type
|
|
37
|
-
import { type
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
} from '../schemas/
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
} from '../schemas/
|
|
44
|
-
import {
|
|
45
|
-
|
|
46
|
-
} from '../schemas/
|
|
47
|
-
import {
|
|
48
|
-
|
|
49
|
-
} from '../schemas/
|
|
50
|
-
import {
|
|
51
|
-
|
|
52
|
-
} from '../schemas/
|
|
53
|
-
import {
|
|
54
|
-
|
|
55
|
-
} from '../schemas/
|
|
56
|
-
import {
|
|
57
|
-
|
|
58
|
-
} from '../schemas/
|
|
59
|
-
import {
|
|
60
|
-
|
|
61
|
-
} from '../schemas/
|
|
62
|
-
import { type
|
|
63
|
-
import { type
|
|
64
|
-
import { type
|
|
65
|
-
import {
|
|
66
|
-
|
|
67
|
-
} from '../schemas/
|
|
68
|
-
import { type
|
|
69
|
-
import {
|
|
70
|
-
|
|
71
|
-
} from '../schemas/
|
|
72
|
-
import {
|
|
73
|
-
|
|
74
|
-
} from '../schemas/
|
|
75
|
-
import {
|
|
76
|
-
|
|
77
|
-
} from '../schemas/
|
|
78
|
-
import { type
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
type DocumentArchiveDetail, DocumentArchiveDetailSchema
|
|
82
|
-
} from '../schemas/DocumentArchiveDetail.schema';
|
|
83
|
-
import {
|
|
84
|
-
type DocumentArchiveRequest, DocumentArchiveRequestSchema
|
|
85
|
-
} from '../schemas/DocumentArchiveRequest.schema';
|
|
86
|
-
import {
|
|
87
|
-
type DocumentCreateRequest, DocumentCreateRequestSchema
|
|
88
|
-
} from '../schemas/DocumentCreateRequest.schema';
|
|
89
|
-
import {
|
|
90
|
-
type DocumentProcessingStatus, DocumentProcessingStatusSchema
|
|
91
|
-
} from '../schemas/DocumentProcessingStatus.schema';
|
|
92
|
-
import { type DocumentRequest, DocumentRequestSchema } from '../schemas/DocumentRequest.schema';
|
|
93
|
-
import { type DocumentStats, DocumentStatsSchema } from '../schemas/DocumentStats.schema';
|
|
94
|
-
import {
|
|
95
|
-
type PaginatedArchiveItemChunkList, PaginatedArchiveItemChunkListSchema
|
|
96
|
-
} from '../schemas/PaginatedArchiveItemChunkList.schema';
|
|
97
|
-
import {
|
|
98
|
-
type PaginatedArchiveItemList, PaginatedArchiveItemListSchema
|
|
99
|
-
} from '../schemas/PaginatedArchiveItemList.schema';
|
|
100
|
-
import {
|
|
101
|
-
type PaginatedArchiveSearchResultList, PaginatedArchiveSearchResultListSchema
|
|
102
|
-
} from '../schemas/PaginatedArchiveSearchResultList.schema';
|
|
103
|
-
import {
|
|
104
|
-
type PaginatedChatResponseList, PaginatedChatResponseListSchema
|
|
105
|
-
} from '../schemas/PaginatedChatResponseList.schema';
|
|
106
|
-
import {
|
|
107
|
-
type PaginatedChatSessionList, PaginatedChatSessionListSchema
|
|
108
|
-
} from '../schemas/PaginatedChatSessionList.schema';
|
|
109
|
-
import {
|
|
110
|
-
type PaginatedDocumentArchiveListList, PaginatedDocumentArchiveListListSchema
|
|
111
|
-
} from '../schemas/PaginatedDocumentArchiveListList.schema';
|
|
112
|
-
import {
|
|
113
|
-
type PaginatedDocumentList, PaginatedDocumentListSchema
|
|
114
|
-
} from '../schemas/PaginatedDocumentList.schema';
|
|
115
|
-
import {
|
|
116
|
-
type PaginatedPublicCategoryList, PaginatedPublicCategoryListSchema
|
|
117
|
-
} from '../schemas/PaginatedPublicCategoryList.schema';
|
|
118
|
-
import {
|
|
119
|
-
type PaginatedPublicDocumentListList, PaginatedPublicDocumentListListSchema
|
|
120
|
-
} from '../schemas/PaginatedPublicDocumentListList.schema';
|
|
121
|
-
import {
|
|
122
|
-
type PatchedArchiveItemChunkRequest, PatchedArchiveItemChunkRequestSchema
|
|
123
|
-
} from '../schemas/PatchedArchiveItemChunkRequest.schema';
|
|
124
|
-
import {
|
|
125
|
-
type PatchedArchiveItemRequest, PatchedArchiveItemRequestSchema
|
|
126
|
-
} from '../schemas/PatchedArchiveItemRequest.schema';
|
|
127
|
-
import {
|
|
128
|
-
type PatchedChatResponseRequest, PatchedChatResponseRequestSchema
|
|
129
|
-
} from '../schemas/PatchedChatResponseRequest.schema';
|
|
130
|
-
import {
|
|
131
|
-
type PatchedChatSessionRequest, PatchedChatSessionRequestSchema
|
|
132
|
-
} from '../schemas/PatchedChatSessionRequest.schema';
|
|
133
|
-
import {
|
|
134
|
-
type PatchedDocumentArchiveRequest, PatchedDocumentArchiveRequestSchema
|
|
135
|
-
} from '../schemas/PatchedDocumentArchiveRequest.schema';
|
|
136
|
-
import {
|
|
137
|
-
type PatchedDocumentRequest, PatchedDocumentRequestSchema
|
|
138
|
-
} from '../schemas/PatchedDocumentRequest.schema';
|
|
139
|
-
import { type PublicCategory, PublicCategorySchema } from '../schemas/PublicCategory.schema';
|
|
140
|
-
import { type PublicDocument, PublicDocumentSchema } from '../schemas/PublicDocument.schema';
|
|
141
|
-
import {
|
|
142
|
-
type VectorizationResult, VectorizationResultSchema
|
|
143
|
-
} from '../schemas/VectorizationResult.schema';
|
|
144
|
-
import {
|
|
145
|
-
type VectorizationStatistics, VectorizationStatisticsSchema
|
|
146
|
-
} from '../schemas/VectorizationStatistics.schema';
|
|
33
|
+
import { consola } from 'consola'
|
|
34
|
+
import { ArchiveItemSchema, type ArchiveItem } from '../schemas/ArchiveItem.schema'
|
|
35
|
+
import { ArchiveItemChunkSchema, type ArchiveItemChunk } from '../schemas/ArchiveItemChunk.schema'
|
|
36
|
+
import { ArchiveItemChunkDetailSchema, type ArchiveItemChunkDetail } from '../schemas/ArchiveItemChunkDetail.schema'
|
|
37
|
+
import { ArchiveItemChunkRequestSchema, type ArchiveItemChunkRequest } from '../schemas/ArchiveItemChunkRequest.schema'
|
|
38
|
+
import { ArchiveItemDetailSchema, type ArchiveItemDetail } from '../schemas/ArchiveItemDetail.schema'
|
|
39
|
+
import { ArchiveItemRequestSchema, type ArchiveItemRequest } from '../schemas/ArchiveItemRequest.schema'
|
|
40
|
+
import { ArchiveProcessingResultSchema, type ArchiveProcessingResult } from '../schemas/ArchiveProcessingResult.schema'
|
|
41
|
+
import { ArchiveSearchRequestRequestSchema, type ArchiveSearchRequestRequest } from '../schemas/ArchiveSearchRequestRequest.schema'
|
|
42
|
+
import { ArchiveStatisticsSchema, type ArchiveStatistics } from '../schemas/ArchiveStatistics.schema'
|
|
43
|
+
import { CfgKnowbaseSystemArchivesCreateRequestSchema, type CfgKnowbaseSystemArchivesCreateRequest } from '../schemas/CfgKnowbaseSystemArchivesCreateRequest.schema'
|
|
44
|
+
import { ChatHistorySchema, type ChatHistory } from '../schemas/ChatHistory.schema'
|
|
45
|
+
import { ChatQueryRequestSchema, type ChatQueryRequest } from '../schemas/ChatQueryRequest.schema'
|
|
46
|
+
import { ChatResponseSchema, type ChatResponse } from '../schemas/ChatResponse.schema'
|
|
47
|
+
import { ChatResponseRequestSchema, type ChatResponseRequest } from '../schemas/ChatResponseRequest.schema'
|
|
48
|
+
import { ChatSessionSchema, type ChatSession } from '../schemas/ChatSession.schema'
|
|
49
|
+
import { ChatSessionCreateRequestSchema, type ChatSessionCreateRequest } from '../schemas/ChatSessionCreateRequest.schema'
|
|
50
|
+
import { ChatSessionRequestSchema, type ChatSessionRequest } from '../schemas/ChatSessionRequest.schema'
|
|
51
|
+
import { ChunkRevectorizationRequestRequestSchema, type ChunkRevectorizationRequestRequest } from '../schemas/ChunkRevectorizationRequestRequest.schema'
|
|
52
|
+
import { DocumentSchema, type Document } from '../schemas/Document.schema'
|
|
53
|
+
import { DocumentArchiveSchema, type DocumentArchive } from '../schemas/DocumentArchive.schema'
|
|
54
|
+
import { DocumentArchiveDetailSchema, type DocumentArchiveDetail } from '../schemas/DocumentArchiveDetail.schema'
|
|
55
|
+
import { DocumentArchiveRequestSchema, type DocumentArchiveRequest } from '../schemas/DocumentArchiveRequest.schema'
|
|
56
|
+
import { DocumentCreateRequestSchema, type DocumentCreateRequest } from '../schemas/DocumentCreateRequest.schema'
|
|
57
|
+
import { DocumentProcessingStatusSchema, type DocumentProcessingStatus } from '../schemas/DocumentProcessingStatus.schema'
|
|
58
|
+
import { DocumentRequestSchema, type DocumentRequest } from '../schemas/DocumentRequest.schema'
|
|
59
|
+
import { DocumentStatsSchema, type DocumentStats } from '../schemas/DocumentStats.schema'
|
|
60
|
+
import { PaginatedArchiveItemChunkListSchema, type PaginatedArchiveItemChunkList } from '../schemas/PaginatedArchiveItemChunkList.schema'
|
|
61
|
+
import { PaginatedArchiveItemListSchema, type PaginatedArchiveItemList } from '../schemas/PaginatedArchiveItemList.schema'
|
|
62
|
+
import { PaginatedArchiveSearchResultListSchema, type PaginatedArchiveSearchResultList } from '../schemas/PaginatedArchiveSearchResultList.schema'
|
|
63
|
+
import { PaginatedChatResponseListSchema, type PaginatedChatResponseList } from '../schemas/PaginatedChatResponseList.schema'
|
|
64
|
+
import { PaginatedChatSessionListSchema, type PaginatedChatSessionList } from '../schemas/PaginatedChatSessionList.schema'
|
|
65
|
+
import { PaginatedDocumentArchiveListListSchema, type PaginatedDocumentArchiveListList } from '../schemas/PaginatedDocumentArchiveListList.schema'
|
|
66
|
+
import { PaginatedDocumentListSchema, type PaginatedDocumentList } from '../schemas/PaginatedDocumentList.schema'
|
|
67
|
+
import { PaginatedPublicCategoryListSchema, type PaginatedPublicCategoryList } from '../schemas/PaginatedPublicCategoryList.schema'
|
|
68
|
+
import { PaginatedPublicDocumentListListSchema, type PaginatedPublicDocumentListList } from '../schemas/PaginatedPublicDocumentListList.schema'
|
|
69
|
+
import { PatchedArchiveItemChunkRequestSchema, type PatchedArchiveItemChunkRequest } from '../schemas/PatchedArchiveItemChunkRequest.schema'
|
|
70
|
+
import { PatchedArchiveItemRequestSchema, type PatchedArchiveItemRequest } from '../schemas/PatchedArchiveItemRequest.schema'
|
|
71
|
+
import { PatchedChatResponseRequestSchema, type PatchedChatResponseRequest } from '../schemas/PatchedChatResponseRequest.schema'
|
|
72
|
+
import { PatchedChatSessionRequestSchema, type PatchedChatSessionRequest } from '../schemas/PatchedChatSessionRequest.schema'
|
|
73
|
+
import { PatchedDocumentArchiveRequestSchema, type PatchedDocumentArchiveRequest } from '../schemas/PatchedDocumentArchiveRequest.schema'
|
|
74
|
+
import { PatchedDocumentRequestSchema, type PatchedDocumentRequest } from '../schemas/PatchedDocumentRequest.schema'
|
|
75
|
+
import { PublicCategorySchema, type PublicCategory } from '../schemas/PublicCategory.schema'
|
|
76
|
+
import { PublicDocumentSchema, type PublicDocument } from '../schemas/PublicDocument.schema'
|
|
77
|
+
import { VectorizationResultSchema, type VectorizationResult } from '../schemas/VectorizationResult.schema'
|
|
78
|
+
import { VectorizationStatisticsSchema, type VectorizationStatistics } from '../schemas/VectorizationStatistics.schema'
|
|
79
|
+
import { getAPIInstance } from '../../api-instance'
|
|
147
80
|
|
|
148
81
|
/**
|
|
149
82
|
* API operation
|
|
@@ -151,10 +84,10 @@ import {
|
|
|
151
84
|
* @method GET
|
|
152
85
|
* @path /cfg/knowbase/admin/chat/
|
|
153
86
|
*/
|
|
154
|
-
export async function getKnowbaseAdminChatList( params?: { page?: number; page_size?: number }, client?: any
|
|
87
|
+
export async function getKnowbaseAdminChatList( params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
155
88
|
): Promise<PaginatedChatResponseList> {
|
|
156
89
|
const api = client || getAPIInstance()
|
|
157
|
-
const response = await api.ext_knowbase_knowbase.adminChatList(params?.page, params?.page_size)
|
|
90
|
+
const response = await api.ext_knowbase_knowbase.adminChatList(params?.ordering, params?.page, params?.page_size, params?.search)
|
|
158
91
|
try {
|
|
159
92
|
return PaginatedChatResponseListSchema.parse(response)
|
|
160
93
|
} catch (error) {
|
|
@@ -564,10 +497,10 @@ export async function createKnowbaseAdminChatQueryCreate( data: ChatQueryReques
|
|
|
564
497
|
* @method GET
|
|
565
498
|
* @path /cfg/knowbase/admin/documents/
|
|
566
499
|
*/
|
|
567
|
-
export async function getKnowbaseAdminDocumentsList( params?: { page?: number; page_size?: number; status?: string }, client?: any
|
|
500
|
+
export async function getKnowbaseAdminDocumentsList( params?: { ordering?: string; page?: number; page_size?: number; search?: string; status?: string }, client?: any
|
|
568
501
|
): Promise<PaginatedDocumentList> {
|
|
569
502
|
const api = client || getAPIInstance()
|
|
570
|
-
const response = await api.ext_knowbase_knowbase.adminDocumentsList(params?.page, params?.page_size, params?.status)
|
|
503
|
+
const response = await api.ext_knowbase_knowbase.adminDocumentsList(params?.ordering, params?.page, params?.page_size, params?.search, params?.status)
|
|
571
504
|
try {
|
|
572
505
|
return PaginatedDocumentListSchema.parse(response)
|
|
573
506
|
} catch (error) {
|
|
@@ -1034,10 +967,10 @@ export async function getKnowbaseAdminDocumentsStatsRetrieve( client?: any
|
|
|
1034
967
|
* @method GET
|
|
1035
968
|
* @path /cfg/knowbase/admin/sessions/
|
|
1036
969
|
*/
|
|
1037
|
-
export async function getKnowbaseAdminSessionsList( params?: { page?: number; page_size?: number }, client?: any
|
|
970
|
+
export async function getKnowbaseAdminSessionsList( params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
1038
971
|
): Promise<PaginatedChatSessionList> {
|
|
1039
972
|
const api = client || getAPIInstance()
|
|
1040
|
-
const response = await api.ext_knowbase_knowbase.adminSessionsList(params?.page, params?.page_size)
|
|
973
|
+
const response = await api.ext_knowbase_knowbase.adminSessionsList(params?.ordering, params?.page, params?.page_size, params?.search)
|
|
1041
974
|
try {
|
|
1042
975
|
return PaginatedChatSessionListSchema.parse(response)
|
|
1043
976
|
} catch (error) {
|
|
@@ -1447,10 +1380,10 @@ export async function createKnowbaseAdminSessionsArchiveCreate( id: string, dat
|
|
|
1447
1380
|
* @method GET
|
|
1448
1381
|
* @path /cfg/knowbase/categories/
|
|
1449
1382
|
*/
|
|
1450
|
-
export async function getKnowbaseCategoriesList( params?: { page?: number; page_size?: number }, client?: any
|
|
1383
|
+
export async function getKnowbaseCategoriesList( params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
1451
1384
|
): Promise<PaginatedPublicCategoryList> {
|
|
1452
1385
|
const api = client || getAPIInstance()
|
|
1453
|
-
const response = await api.ext_knowbase_knowbase.categoriesList(params?.page, params?.page_size)
|
|
1386
|
+
const response = await api.ext_knowbase_knowbase.categoriesList(params?.ordering, params?.page, params?.page_size, params?.search)
|
|
1454
1387
|
try {
|
|
1455
1388
|
return PaginatedPublicCategoryListSchema.parse(response)
|
|
1456
1389
|
} catch (error) {
|
|
@@ -1561,10 +1494,10 @@ export async function getKnowbaseCategoriesRetrieve( id: string, client?: any
|
|
|
1561
1494
|
* @method GET
|
|
1562
1495
|
* @path /cfg/knowbase/documents/
|
|
1563
1496
|
*/
|
|
1564
|
-
export async function getKnowbaseDocumentsList( params?: { category?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
1497
|
+
export async function getKnowbaseDocumentsList( params?: { category?: string; ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
1565
1498
|
): Promise<PaginatedPublicDocumentListList> {
|
|
1566
1499
|
const api = client || getAPIInstance()
|
|
1567
|
-
const response = await api.ext_knowbase_knowbase.documentsList(params?.category, params?.page, params?.page_size, params?.search)
|
|
1500
|
+
const response = await api.ext_knowbase_knowbase.documentsList(params?.category, params?.ordering, params?.page, params?.page_size, params?.search)
|
|
1568
1501
|
try {
|
|
1569
1502
|
return PaginatedPublicDocumentListListSchema.parse(response)
|
|
1570
1503
|
} catch (error) {
|
|
@@ -1675,10 +1608,10 @@ export async function getKnowbaseDocumentsRetrieve( id: string, client?: any
|
|
|
1675
1608
|
* @method GET
|
|
1676
1609
|
* @path /cfg/knowbase/system/archives/
|
|
1677
1610
|
*/
|
|
1678
|
-
export async function getKnowbaseSystemArchivesList( params?: { page?: number; page_size?: number }, client?: any
|
|
1611
|
+
export async function getKnowbaseSystemArchivesList( params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
1679
1612
|
): Promise<PaginatedDocumentArchiveListList> {
|
|
1680
1613
|
const api = client || getAPIInstance()
|
|
1681
|
-
const response = await api.ext_knowbase_knowbase.systemArchivesList(params?.page, params?.page_size)
|
|
1614
|
+
const response = await api.ext_knowbase_knowbase.systemArchivesList(params?.ordering, params?.page, params?.page_size, params?.search)
|
|
1682
1615
|
try {
|
|
1683
1616
|
return PaginatedDocumentArchiveListListSchema.parse(response)
|
|
1684
1617
|
} catch (error) {
|
|
@@ -1988,10 +1921,10 @@ export async function getKnowbaseSystemArchivesFileTreeRetrieve( id: string, c
|
|
|
1988
1921
|
* @method GET
|
|
1989
1922
|
* @path /cfg/knowbase/system/archives/{id}/items/
|
|
1990
1923
|
*/
|
|
1991
|
-
export async function getKnowbaseSystemArchivesItemsList( id: string, params?: { page?: number; page_size?: number }, client?: any
|
|
1924
|
+
export async function getKnowbaseSystemArchivesItemsList( id: string, params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
1992
1925
|
): Promise<PaginatedArchiveItemList> {
|
|
1993
1926
|
const api = client || getAPIInstance()
|
|
1994
|
-
const response = await api.ext_knowbase_knowbase.systemArchivesItemsList(id, params?.page, params?.page_size)
|
|
1927
|
+
const response = await api.ext_knowbase_knowbase.systemArchivesItemsList(id, params?.ordering, params?.page, params?.page_size, params?.search)
|
|
1995
1928
|
try {
|
|
1996
1929
|
return PaginatedArchiveItemListSchema.parse(response)
|
|
1997
1930
|
} catch (error) {
|
|
@@ -2045,10 +1978,10 @@ export async function getKnowbaseSystemArchivesItemsList( id: string, params?:
|
|
|
2045
1978
|
* @method POST
|
|
2046
1979
|
* @path /cfg/knowbase/system/archives/{id}/search/
|
|
2047
1980
|
*/
|
|
2048
|
-
export async function createKnowbaseSystemArchivesSearchCreate( id: string, data: ArchiveSearchRequestRequest, params?: { page?: number; page_size?: number }, client?: any
|
|
1981
|
+
export async function createKnowbaseSystemArchivesSearchCreate( id: string, data: ArchiveSearchRequestRequest, params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
2049
1982
|
): Promise<PaginatedArchiveSearchResultList> {
|
|
2050
1983
|
const api = client || getAPIInstance()
|
|
2051
|
-
const response = await api.ext_knowbase_knowbase.systemArchivesSearchCreate(id, data, params?.page, params?.page_size)
|
|
1984
|
+
const response = await api.ext_knowbase_knowbase.systemArchivesSearchCreate(id, data, params?.ordering, params?.page, params?.page_size, params?.search)
|
|
2052
1985
|
try {
|
|
2053
1986
|
return PaginatedArchiveSearchResultListSchema.parse(response)
|
|
2054
1987
|
} catch (error) {
|
|
@@ -2273,10 +2206,10 @@ export async function getKnowbaseSystemArchivesVectorizationStatsRetrieve( clie
|
|
|
2273
2206
|
* @method GET
|
|
2274
2207
|
* @path /cfg/knowbase/system/chunks/
|
|
2275
2208
|
*/
|
|
2276
|
-
export async function getKnowbaseSystemChunksList( params?: { page?: number; page_size?: number }, client?: any
|
|
2209
|
+
export async function getKnowbaseSystemChunksList( params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
2277
2210
|
): Promise<PaginatedArchiveItemChunkList> {
|
|
2278
2211
|
const api = client || getAPIInstance()
|
|
2279
|
-
const response = await api.ext_knowbase_knowbase.systemChunksList(params?.page, params?.page_size)
|
|
2212
|
+
const response = await api.ext_knowbase_knowbase.systemChunksList(params?.ordering, params?.page, params?.page_size, params?.search)
|
|
2280
2213
|
try {
|
|
2281
2214
|
return PaginatedArchiveItemChunkListSchema.parse(response)
|
|
2282
2215
|
} catch (error) {
|
|
@@ -2643,10 +2576,10 @@ export async function createKnowbaseSystemChunksVectorizeCreate( id: string, da
|
|
|
2643
2576
|
* @method GET
|
|
2644
2577
|
* @path /cfg/knowbase/system/items/
|
|
2645
2578
|
*/
|
|
2646
|
-
export async function getKnowbaseSystemItemsList( params?: { page?: number; page_size?: number }, client?: any
|
|
2579
|
+
export async function getKnowbaseSystemItemsList( params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
2647
2580
|
): Promise<PaginatedArchiveItemList> {
|
|
2648
2581
|
const api = client || getAPIInstance()
|
|
2649
|
-
const response = await api.ext_knowbase_knowbase.systemItemsList(params?.page, params?.page_size)
|
|
2582
|
+
const response = await api.ext_knowbase_knowbase.systemItemsList(params?.ordering, params?.page, params?.page_size, params?.search)
|
|
2650
2583
|
try {
|
|
2651
2584
|
return PaginatedArchiveItemListSchema.parse(response)
|
|
2652
2585
|
} catch (error) {
|
|
@@ -2942,10 +2875,10 @@ export async function deleteKnowbaseSystemItemsDestroy( id: string, client?: a
|
|
|
2942
2875
|
* @method GET
|
|
2943
2876
|
* @path /cfg/knowbase/system/items/{id}/chunks/
|
|
2944
2877
|
*/
|
|
2945
|
-
export async function getKnowbaseSystemItemsChunksList( id: string, params?: { page?: number; page_size?: number }, client?: any
|
|
2878
|
+
export async function getKnowbaseSystemItemsChunksList( id: string, params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: any
|
|
2946
2879
|
): Promise<PaginatedArchiveItemChunkList> {
|
|
2947
2880
|
const api = client || getAPIInstance()
|
|
2948
|
-
const response = await api.ext_knowbase_knowbase.systemItemsChunksList(id, params?.page, params?.page_size)
|
|
2881
|
+
const response = await api.ext_knowbase_knowbase.systemItemsChunksList(id, params?.ordering, params?.page, params?.page_size, params?.search)
|
|
2949
2882
|
try {
|
|
2950
2883
|
return PaginatedArchiveItemChunkListSchema.parse(response)
|
|
2951
2884
|
} catch (error) {
|
|
@@ -17,10 +17,9 @@
|
|
|
17
17
|
* await createUser({ name: 'John', email: 'john@example.com' })
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
import useSWR
|
|
21
|
-
|
|
22
|
-
import * as Fetchers from '../fetchers/ext_knowbase__knowbase'
|
|
23
|
-
|
|
20
|
+
import useSWR from 'swr'
|
|
21
|
+
import { useSWRConfig } from 'swr'
|
|
22
|
+
import * as Fetchers from '../fetchers/ext_knowbase__knowbase'
|
|
24
23
|
import type { API } from '../../index'
|
|
25
24
|
import type { ArchiveItem } from '../schemas/ArchiveItem.schema'
|
|
26
25
|
import type { ArchiveItemChunk } from '../schemas/ArchiveItemChunk.schema'
|
|
@@ -74,7 +73,7 @@ import type { VectorizationStatistics } from '../schemas/VectorizationStatistics
|
|
|
74
73
|
* @method GET
|
|
75
74
|
* @path /cfg/knowbase/admin/chat/
|
|
76
75
|
*/
|
|
77
|
-
export function useKnowbaseAdminChatList(params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedChatResponseList>> {
|
|
76
|
+
export function useKnowbaseAdminChatList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedChatResponseList>> {
|
|
78
77
|
return useSWR<PaginatedChatResponseList>(
|
|
79
78
|
params ? ['cfg-knowbase-admin-chat', params] : 'cfg-knowbase-admin-chat',
|
|
80
79
|
() => Fetchers.getKnowbaseAdminChatList(params, client)
|
|
@@ -206,7 +205,7 @@ export function useCreateKnowbaseAdminChatQueryCreate() {
|
|
|
206
205
|
* @method GET
|
|
207
206
|
* @path /cfg/knowbase/admin/documents/
|
|
208
207
|
*/
|
|
209
|
-
export function useKnowbaseAdminDocumentsList(params?: { page?: number; page_size?: number; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedDocumentList>> {
|
|
208
|
+
export function useKnowbaseAdminDocumentsList(params?: { ordering?: string; page?: number; page_size?: number; search?: string; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedDocumentList>> {
|
|
210
209
|
return useSWR<PaginatedDocumentList>(
|
|
211
210
|
params ? ['cfg-knowbase-admin-documents', params] : 'cfg-knowbase-admin-documents',
|
|
212
211
|
() => Fetchers.getKnowbaseAdminDocumentsList(params, client)
|
|
@@ -354,7 +353,7 @@ export function useKnowbaseAdminDocumentsStatsRetrieve(client?: API): ReturnType
|
|
|
354
353
|
* @method GET
|
|
355
354
|
* @path /cfg/knowbase/admin/sessions/
|
|
356
355
|
*/
|
|
357
|
-
export function useKnowbaseAdminSessionsList(params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedChatSessionList>> {
|
|
356
|
+
export function useKnowbaseAdminSessionsList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedChatSessionList>> {
|
|
358
357
|
return useSWR<PaginatedChatSessionList>(
|
|
359
358
|
params ? ['cfg-knowbase-admin-sessions', params] : 'cfg-knowbase-admin-sessions',
|
|
360
359
|
() => Fetchers.getKnowbaseAdminSessionsList(params, client)
|
|
@@ -492,7 +491,7 @@ export function useCreateKnowbaseAdminSessionsArchiveCreate() {
|
|
|
492
491
|
* @method GET
|
|
493
492
|
* @path /cfg/knowbase/categories/
|
|
494
493
|
*/
|
|
495
|
-
export function useKnowbaseCategoriesList(params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedPublicCategoryList>> {
|
|
494
|
+
export function useKnowbaseCategoriesList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedPublicCategoryList>> {
|
|
496
495
|
return useSWR<PaginatedPublicCategoryList>(
|
|
497
496
|
params ? ['cfg-knowbase-categories', params] : 'cfg-knowbase-categories',
|
|
498
497
|
() => Fetchers.getKnowbaseCategoriesList(params, client)
|
|
@@ -520,7 +519,7 @@ export function useKnowbaseCategoriesRetrieve(id: string, client?: API): ReturnT
|
|
|
520
519
|
* @method GET
|
|
521
520
|
* @path /cfg/knowbase/documents/
|
|
522
521
|
*/
|
|
523
|
-
export function useKnowbaseDocumentsList(params?: { category?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedPublicDocumentListList>> {
|
|
522
|
+
export function useKnowbaseDocumentsList(params?: { category?: string; ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedPublicDocumentListList>> {
|
|
524
523
|
return useSWR<PaginatedPublicDocumentListList>(
|
|
525
524
|
params ? ['cfg-knowbase-documents', params] : 'cfg-knowbase-documents',
|
|
526
525
|
() => Fetchers.getKnowbaseDocumentsList(params, client)
|
|
@@ -548,7 +547,7 @@ export function useKnowbaseDocumentsRetrieve(id: string, client?: API): ReturnTy
|
|
|
548
547
|
* @method GET
|
|
549
548
|
* @path /cfg/knowbase/system/archives/
|
|
550
549
|
*/
|
|
551
|
-
export function useKnowbaseSystemArchivesList(params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedDocumentArchiveListList>> {
|
|
550
|
+
export function useKnowbaseSystemArchivesList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedDocumentArchiveListList>> {
|
|
552
551
|
return useSWR<PaginatedDocumentArchiveListList>(
|
|
553
552
|
params ? ['cfg-knowbase-system-archives', params] : 'cfg-knowbase-system-archives',
|
|
554
553
|
() => Fetchers.getKnowbaseSystemArchivesList(params, client)
|
|
@@ -664,7 +663,7 @@ export function useKnowbaseSystemArchivesFileTreeRetrieve(id: string, client?: A
|
|
|
664
663
|
* @method GET
|
|
665
664
|
* @path /cfg/knowbase/system/archives/{id}/items/
|
|
666
665
|
*/
|
|
667
|
-
export function useKnowbaseSystemArchivesItemsList(id: string, params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedArchiveItemList>> {
|
|
666
|
+
export function useKnowbaseSystemArchivesItemsList(id: string, params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedArchiveItemList>> {
|
|
668
667
|
return useSWR<PaginatedArchiveItemList>(
|
|
669
668
|
['cfg-knowbase-system-archives-items', id],
|
|
670
669
|
() => Fetchers.getKnowbaseSystemArchivesItemsList(id, params, client)
|
|
@@ -681,7 +680,7 @@ export function useKnowbaseSystemArchivesItemsList(id: string, params?: { page?:
|
|
|
681
680
|
export function useCreateKnowbaseSystemArchivesSearchCreate() {
|
|
682
681
|
const { mutate } = useSWRConfig()
|
|
683
682
|
|
|
684
|
-
return async (id: string, data: ArchiveSearchRequestRequest, params?: { page?: number; page_size?: number }, client?: API): Promise<PaginatedArchiveSearchResultList> => {
|
|
683
|
+
return async (id: string, data: ArchiveSearchRequestRequest, params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): Promise<PaginatedArchiveSearchResultList> => {
|
|
685
684
|
const result = await Fetchers.createKnowbaseSystemArchivesSearchCreate(id, data, params, client)
|
|
686
685
|
// Revalidate related queries
|
|
687
686
|
mutate('cfg-knowbase-system-archives-search')
|
|
@@ -742,7 +741,7 @@ export function useKnowbaseSystemArchivesVectorizationStatsRetrieve(client?: API
|
|
|
742
741
|
* @method GET
|
|
743
742
|
* @path /cfg/knowbase/system/chunks/
|
|
744
743
|
*/
|
|
745
|
-
export function useKnowbaseSystemChunksList(params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedArchiveItemChunkList>> {
|
|
744
|
+
export function useKnowbaseSystemChunksList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedArchiveItemChunkList>> {
|
|
746
745
|
return useSWR<PaginatedArchiveItemChunkList>(
|
|
747
746
|
params ? ['cfg-knowbase-system-chunks', params] : 'cfg-knowbase-system-chunks',
|
|
748
747
|
() => Fetchers.getKnowbaseSystemChunksList(params, client)
|
|
@@ -876,7 +875,7 @@ export function useCreateKnowbaseSystemChunksVectorizeCreate() {
|
|
|
876
875
|
* @method GET
|
|
877
876
|
* @path /cfg/knowbase/system/items/
|
|
878
877
|
*/
|
|
879
|
-
export function useKnowbaseSystemItemsList(params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedArchiveItemList>> {
|
|
878
|
+
export function useKnowbaseSystemItemsList(params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedArchiveItemList>> {
|
|
880
879
|
return useSWR<PaginatedArchiveItemList>(
|
|
881
880
|
params ? ['cfg-knowbase-system-items', params] : 'cfg-knowbase-system-items',
|
|
882
881
|
() => Fetchers.getKnowbaseSystemItemsList(params, client)
|
|
@@ -978,7 +977,7 @@ export function useDeleteKnowbaseSystemItemsDestroy() {
|
|
|
978
977
|
* @method GET
|
|
979
978
|
* @path /cfg/knowbase/system/items/{id}/chunks/
|
|
980
979
|
*/
|
|
981
|
-
export function useKnowbaseSystemItemsChunksList(id: string, params?: { page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedArchiveItemChunkList>> {
|
|
980
|
+
export function useKnowbaseSystemItemsChunksList(id: string, params?: { ordering?: string; page?: number; page_size?: number; search?: string }, client?: API): ReturnType<typeof useSWR<PaginatedArchiveItemChunkList>> {
|
|
982
981
|
return useSWR<PaginatedArchiveItemChunkList>(
|
|
983
982
|
['cfg-knowbase-system-items-chunks', id],
|
|
984
983
|
() => Fetchers.getKnowbaseSystemItemsChunksList(id, params, client)
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Archive item serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import * as Enums from '../../enums';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Archive item serializer.
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Archive item chunk serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import * as Enums from '../../enums';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Archive item chunk serializer.
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Detailed chunk serializer with full context.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import * as Enums from '../../enums';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Detailed chunk serializer with full context.
|
|
@@ -15,7 +14,7 @@ export const ArchiveItemChunkDetailSchema = z.object({
|
|
|
15
14
|
id: z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
16
15
|
content: z.string(),
|
|
17
16
|
chunk_index: z.int().min(0.0).max(2147483647.0),
|
|
18
|
-
chunk_type: z.nativeEnum(Enums.
|
|
17
|
+
chunk_type: z.nativeEnum(Enums.ArchiveItemChunkChunkType).optional(),
|
|
19
18
|
token_count: z.int(),
|
|
20
19
|
character_count: z.int(),
|
|
21
20
|
embedding_model: z.string(),
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Archive item chunk serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import * as Enums from '../../enums';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Archive item chunk serializer.
|
|
@@ -14,7 +13,7 @@ import * as Enums from '../../enums';
|
|
|
14
13
|
export const ArchiveItemChunkRequestSchema = z.object({
|
|
15
14
|
content: z.string().min(1),
|
|
16
15
|
chunk_index: z.int().min(0.0).max(2147483647.0),
|
|
17
|
-
chunk_type: z.nativeEnum(Enums.
|
|
16
|
+
chunk_type: z.nativeEnum(Enums.ArchiveItemChunkChunkType).optional(),
|
|
18
17
|
})
|
|
19
18
|
|
|
20
19
|
/**
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Detailed archive item serializer with content.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import * as Enums from '../../enums';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Detailed archive item serializer with content.
|
|
@@ -16,7 +15,7 @@ export const ArchiveItemDetailSchema = z.object({
|
|
|
16
15
|
relative_path: z.string().max(1024),
|
|
17
16
|
item_name: z.string().max(255),
|
|
18
17
|
item_type: z.string().max(100),
|
|
19
|
-
content_type: z.nativeEnum(Enums.
|
|
18
|
+
content_type: z.nativeEnum(Enums.ArchiveItemContentType),
|
|
20
19
|
file_size: z.int().min(0.0).max(2147483647.0).optional(),
|
|
21
20
|
is_processable: z.boolean(),
|
|
22
21
|
language: z.string(),
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Archive search result serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import { ArchiveItemChunkSchema } from './ArchiveItemChunk.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ArchiveItemChunkSchema } from './ArchiveItemChunk.schema'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Archive search result serializer.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* */
|
|
6
|
-
import { z } from 'zod'
|
|
6
|
+
import { z } from 'zod'
|
|
7
7
|
|
|
8
8
|
export const CfgKnowbaseSystemArchivesCreateRequestSchema = z.object({
|
|
9
9
|
file: z.union([z.instanceof(File), z.instanceof(Blob)]).optional(),
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Chat history response serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import { ChatMessageSchema } from './ChatMessage.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ChatMessageSchema } from './ChatMessage.schema'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Chat history response serializer.
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Chat message response serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import * as Enums from '../../enums';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Chat message response serializer.
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
5
|
* * Chat response serializer.
|
|
6
6
|
* */
|
|
7
|
-
import { z } from 'zod'
|
|
8
|
-
|
|
9
|
-
import { ChatSourceSchema } from './ChatSource.schema';
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ChatSourceSchema } from './ChatSource.schema'
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Chat response serializer.
|