@djangocfg/api 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 +17641 -8457
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14654 -5066
- package/dist/index.d.ts +14654 -5066
- package/dist/index.mjs +17885 -8728
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -17
- package/src/cfg/contexts/payments/ApiKeysContext.tsx +2 -2
- package/src/cfg/contexts/payments/CurrenciesContext.tsx +0 -26
- package/src/cfg/contexts/payments/OverviewContext.tsx +79 -0
- package/src/cfg/contexts/payments/RootPaymentsContext.tsx +137 -0
- package/src/cfg/contexts/payments/index.ts +13 -0
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +876 -0
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -6
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -1
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +181 -179
- package/src/cfg/generated/_utils/fetchers/cfg__payments__webhooks.ts +5 -5
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -12
- package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -10
- package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
- package/src/cfg/generated/_utils/hooks/cfg__knowbase.ts +997 -0
- package/src/cfg/generated/_utils/hooks/cfg__payments.ts +12 -10
- package/src/cfg/generated/_utils/hooks/index.ts +1 -0
- package/src/cfg/generated/_utils/schemas/APIKeyValidationResponse.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/AdminPaymentDetail.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/AdminPaymentList.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItem.schema.ts +33 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +35 -0
- package/src/cfg/generated/_utils/schemas/ArchiveItemRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ArchiveProcessingResult.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/ArchiveSearchRequestRequest.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ArchiveSearchResult.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ArchiveStatistics.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/ChatHistory.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/ChatQueryRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ChatResponse.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/ChatResponseRequest.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/ChatSession.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/ChatSessionCreateRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ChatSessionRequest.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ChatSource.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChatSourceRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChunkRevectorizationRequestRequest.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/CurrencyList.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/CurrencyRates.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/Document.schema.ts +32 -0
- package/src/cfg/generated/_utils/schemas/DocumentArchive.schema.ts +44 -0
- package/src/cfg/generated/_utils/schemas/DocumentArchiveDetail.schema.ts +48 -0
- package/src/cfg/generated/_utils/schemas/DocumentArchiveList.schema.ts +35 -0
- package/src/cfg/generated/_utils/schemas/DocumentArchiveRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/DocumentCategory.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/DocumentCategoryRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/DocumentCreateRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/DocumentProcessingStatus.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/DocumentStats.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/Network.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PaginatedArchiveItemChunkList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedArchiveItemList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedArchiveSearchResultList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedChatResponseList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedChatSessionList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedDocumentArchiveListList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedDocumentList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedPublicCategoryList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedPublicDocumentListList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/PatchedChatResponseRequest.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/PatchedChatSessionRequest.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/PatchedDocumentArchiveRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/Payment.schema.ts +1 -0
- package/src/cfg/generated/_utils/schemas/PaymentCreate.schema.ts +0 -1
- package/src/cfg/generated/_utils/schemas/PaymentCreateRequest.schema.ts +0 -1
- package/src/cfg/generated/_utils/schemas/PaymentsMetrics.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ProviderCurrency.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PublicCategory.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/PublicDocument.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/PublicDocumentList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/SupportedCurrencies.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/VectorizationResult.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/VectorizationStatistics.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/index.ts +54 -0
- package/src/cfg/generated/cfg__accounts/client.ts +1 -1
- package/src/cfg/generated/cfg__accounts__auth/client.ts +1 -1
- package/src/cfg/generated/cfg__accounts__user_profile/client.ts +1 -1
- package/src/cfg/generated/cfg__endpoints/client.ts +1 -1
- package/src/cfg/generated/cfg__health/client.ts +1 -1
- package/src/cfg/generated/cfg__knowbase/client.ts +666 -0
- package/src/cfg/generated/cfg__knowbase/index.ts +2 -0
- package/src/cfg/generated/cfg__knowbase/models.ts +1120 -0
- package/src/cfg/generated/cfg__leads/client.ts +1 -1
- package/src/cfg/generated/cfg__leads__lead_submission/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__bulk_email/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__campaigns/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__logs/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__newsletters/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__subscriptions/client.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__testing/client.ts +1 -1
- package/src/cfg/generated/cfg__payments/client.ts +25 -45
- package/src/cfg/generated/cfg__payments/models.ts +46 -12
- package/src/cfg/generated/cfg__payments__webhooks/client.ts +1 -1
- package/src/cfg/generated/cfg__support/client.ts +1 -1
- package/src/cfg/generated/cfg__tasks/client.ts +1 -1
- package/src/cfg/generated/client.ts +57 -54
- package/src/cfg/generated/enums.ts +269 -16
- package/src/cfg/generated/index.ts +82 -29
- package/src/cfg/generated/schema.ts +10238 -4386
- package/src/index.ts +23 -1
|
@@ -0,0 +1,876 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Knowbase
|
|
3
|
+
*
|
|
4
|
+
* Universal functions that work in any environment:
|
|
5
|
+
* - Next.js (App Router / Pages Router / Server Components)
|
|
6
|
+
* - React Native
|
|
7
|
+
* - Node.js backend
|
|
8
|
+
*
|
|
9
|
+
* These fetchers use Zod schemas for runtime validation.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Configure API once (in your app entry point)
|
|
14
|
+
* import { configureAPI } from '../../api-instance'
|
|
15
|
+
* configureAPI({ baseUrl: 'https://api.example.com' })
|
|
16
|
+
*
|
|
17
|
+
* // Then use fetchers anywhere
|
|
18
|
+
* const users = await getUsers({ page: 1 })
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR(['users', params], () => getUsers(params))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['users', params], () => getUsers(params))
|
|
25
|
+
*
|
|
26
|
+
* // In Server Component or SSR (pass custom client)
|
|
27
|
+
* import { API } from '../../index'
|
|
28
|
+
* const api = new API('https://api.example.com')
|
|
29
|
+
* const users = await getUsers({ page: 1 }, api)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { ArchiveItemSchema, type ArchiveItem } from '../schemas/ArchiveItem.schema'
|
|
33
|
+
import { ArchiveItemChunkSchema, type ArchiveItemChunk } from '../schemas/ArchiveItemChunk.schema'
|
|
34
|
+
import { ArchiveItemChunkDetailSchema, type ArchiveItemChunkDetail } from '../schemas/ArchiveItemChunkDetail.schema'
|
|
35
|
+
import { ArchiveItemChunkRequestSchema, type ArchiveItemChunkRequest } from '../schemas/ArchiveItemChunkRequest.schema'
|
|
36
|
+
import { ArchiveItemDetailSchema, type ArchiveItemDetail } from '../schemas/ArchiveItemDetail.schema'
|
|
37
|
+
import { ArchiveItemRequestSchema, type ArchiveItemRequest } from '../schemas/ArchiveItemRequest.schema'
|
|
38
|
+
import { ArchiveProcessingResultSchema, type ArchiveProcessingResult } from '../schemas/ArchiveProcessingResult.schema'
|
|
39
|
+
import { ArchiveSearchRequestRequestSchema, type ArchiveSearchRequestRequest } from '../schemas/ArchiveSearchRequestRequest.schema'
|
|
40
|
+
import { ArchiveStatisticsSchema, type ArchiveStatistics } from '../schemas/ArchiveStatistics.schema'
|
|
41
|
+
import { ChatHistorySchema, type ChatHistory } from '../schemas/ChatHistory.schema'
|
|
42
|
+
import { ChatQueryRequestSchema, type ChatQueryRequest } from '../schemas/ChatQueryRequest.schema'
|
|
43
|
+
import { ChatResponseSchema, type ChatResponse } from '../schemas/ChatResponse.schema'
|
|
44
|
+
import { ChatResponseRequestSchema, type ChatResponseRequest } from '../schemas/ChatResponseRequest.schema'
|
|
45
|
+
import { ChatSessionSchema, type ChatSession } from '../schemas/ChatSession.schema'
|
|
46
|
+
import { ChatSessionCreateRequestSchema, type ChatSessionCreateRequest } from '../schemas/ChatSessionCreateRequest.schema'
|
|
47
|
+
import { ChatSessionRequestSchema, type ChatSessionRequest } from '../schemas/ChatSessionRequest.schema'
|
|
48
|
+
import { ChunkRevectorizationRequestRequestSchema, type ChunkRevectorizationRequestRequest } from '../schemas/ChunkRevectorizationRequestRequest.schema'
|
|
49
|
+
import { DocumentSchema, type Document } from '../schemas/Document.schema'
|
|
50
|
+
import { DocumentArchiveSchema, type DocumentArchive } from '../schemas/DocumentArchive.schema'
|
|
51
|
+
import { DocumentArchiveDetailSchema, type DocumentArchiveDetail } from '../schemas/DocumentArchiveDetail.schema'
|
|
52
|
+
import { DocumentArchiveRequestSchema, type DocumentArchiveRequest } from '../schemas/DocumentArchiveRequest.schema'
|
|
53
|
+
import { DocumentCreateRequestSchema, type DocumentCreateRequest } from '../schemas/DocumentCreateRequest.schema'
|
|
54
|
+
import { DocumentProcessingStatusSchema, type DocumentProcessingStatus } from '../schemas/DocumentProcessingStatus.schema'
|
|
55
|
+
import { DocumentRequestSchema, type DocumentRequest } from '../schemas/DocumentRequest.schema'
|
|
56
|
+
import { DocumentStatsSchema, type DocumentStats } from '../schemas/DocumentStats.schema'
|
|
57
|
+
import { PaginatedArchiveItemChunkListSchema, type PaginatedArchiveItemChunkList } from '../schemas/PaginatedArchiveItemChunkList.schema'
|
|
58
|
+
import { PaginatedArchiveItemListSchema, type PaginatedArchiveItemList } from '../schemas/PaginatedArchiveItemList.schema'
|
|
59
|
+
import { PaginatedArchiveSearchResultListSchema, type PaginatedArchiveSearchResultList } from '../schemas/PaginatedArchiveSearchResultList.schema'
|
|
60
|
+
import { PaginatedChatResponseListSchema, type PaginatedChatResponseList } from '../schemas/PaginatedChatResponseList.schema'
|
|
61
|
+
import { PaginatedChatSessionListSchema, type PaginatedChatSessionList } from '../schemas/PaginatedChatSessionList.schema'
|
|
62
|
+
import { PaginatedDocumentArchiveListListSchema, type PaginatedDocumentArchiveListList } from '../schemas/PaginatedDocumentArchiveListList.schema'
|
|
63
|
+
import { PaginatedDocumentListSchema, type PaginatedDocumentList } from '../schemas/PaginatedDocumentList.schema'
|
|
64
|
+
import { PaginatedPublicCategoryListSchema, type PaginatedPublicCategoryList } from '../schemas/PaginatedPublicCategoryList.schema'
|
|
65
|
+
import { PaginatedPublicDocumentListListSchema, type PaginatedPublicDocumentListList } from '../schemas/PaginatedPublicDocumentListList.schema'
|
|
66
|
+
import { PatchedArchiveItemChunkRequestSchema, type PatchedArchiveItemChunkRequest } from '../schemas/PatchedArchiveItemChunkRequest.schema'
|
|
67
|
+
import { PatchedArchiveItemRequestSchema, type PatchedArchiveItemRequest } from '../schemas/PatchedArchiveItemRequest.schema'
|
|
68
|
+
import { PatchedChatResponseRequestSchema, type PatchedChatResponseRequest } from '../schemas/PatchedChatResponseRequest.schema'
|
|
69
|
+
import { PatchedChatSessionRequestSchema, type PatchedChatSessionRequest } from '../schemas/PatchedChatSessionRequest.schema'
|
|
70
|
+
import { PatchedDocumentArchiveRequestSchema, type PatchedDocumentArchiveRequest } from '../schemas/PatchedDocumentArchiveRequest.schema'
|
|
71
|
+
import { PatchedDocumentRequestSchema, type PatchedDocumentRequest } from '../schemas/PatchedDocumentRequest.schema'
|
|
72
|
+
import { PublicCategorySchema, type PublicCategory } from '../schemas/PublicCategory.schema'
|
|
73
|
+
import { PublicDocumentSchema, type PublicDocument } from '../schemas/PublicDocument.schema'
|
|
74
|
+
import { VectorizationResultSchema, type VectorizationResult } from '../schemas/VectorizationResult.schema'
|
|
75
|
+
import { VectorizationStatisticsSchema, type VectorizationStatistics } from '../schemas/VectorizationStatistics.schema'
|
|
76
|
+
import { getAPIInstance } from '../../api-instance'
|
|
77
|
+
import type { API } from '../../index'
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* API operation
|
|
81
|
+
*
|
|
82
|
+
* @method GET
|
|
83
|
+
* @path /cfg/knowbase/admin/chat/
|
|
84
|
+
*/
|
|
85
|
+
export async function getKnowbaseAdminChatList( params?: { page?: number; page_size?: number }, client?
|
|
86
|
+
): Promise<PaginatedChatResponseList> {
|
|
87
|
+
const api = client || getAPIInstance()
|
|
88
|
+
const response = await api.cfg_knowbase.adminChatList(params?.page, params?.page_size)
|
|
89
|
+
return PaginatedChatResponseListSchema.parse(response)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* API operation
|
|
95
|
+
*
|
|
96
|
+
* @method POST
|
|
97
|
+
* @path /cfg/knowbase/admin/chat/
|
|
98
|
+
*/
|
|
99
|
+
export async function createKnowbaseAdminChatCreate( data: ChatResponseRequest, client?
|
|
100
|
+
): Promise<ChatResponse> {
|
|
101
|
+
const api = client || getAPIInstance()
|
|
102
|
+
const response = await api.cfg_knowbase.adminChatCreate(data)
|
|
103
|
+
return ChatResponseSchema.parse(response)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* API operation
|
|
109
|
+
*
|
|
110
|
+
* @method GET
|
|
111
|
+
* @path /cfg/knowbase/admin/chat/{id}/
|
|
112
|
+
*/
|
|
113
|
+
export async function getKnowbaseAdminChatRetrieve( id: string, client?
|
|
114
|
+
): Promise<ChatResponse> {
|
|
115
|
+
const api = client || getAPIInstance()
|
|
116
|
+
const response = await api.cfg_knowbase.adminChatRetrieve(id)
|
|
117
|
+
return ChatResponseSchema.parse(response)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* API operation
|
|
123
|
+
*
|
|
124
|
+
* @method PUT
|
|
125
|
+
* @path /cfg/knowbase/admin/chat/{id}/
|
|
126
|
+
*/
|
|
127
|
+
export async function updateKnowbaseAdminChatUpdate( id: string, data: ChatResponseRequest, client?
|
|
128
|
+
): Promise<ChatResponse> {
|
|
129
|
+
const api = client || getAPIInstance()
|
|
130
|
+
const response = await api.cfg_knowbase.adminChatUpdate(id, data)
|
|
131
|
+
return ChatResponseSchema.parse(response)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* API operation
|
|
137
|
+
*
|
|
138
|
+
* @method PATCH
|
|
139
|
+
* @path /cfg/knowbase/admin/chat/{id}/
|
|
140
|
+
*/
|
|
141
|
+
export async function partialUpdateKnowbaseAdminChatPartialUpdate( id: string, data?: PatchedChatResponseRequest, client?
|
|
142
|
+
): Promise<ChatResponse> {
|
|
143
|
+
const api = client || getAPIInstance()
|
|
144
|
+
const response = await api.cfg_knowbase.adminChatPartialUpdate(id, data)
|
|
145
|
+
return ChatResponseSchema.parse(response)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* API operation
|
|
151
|
+
*
|
|
152
|
+
* @method DELETE
|
|
153
|
+
* @path /cfg/knowbase/admin/chat/{id}/
|
|
154
|
+
*/
|
|
155
|
+
export async function deleteKnowbaseAdminChatDestroy( id: string, client?
|
|
156
|
+
): Promise<void> {
|
|
157
|
+
const api = client || getAPIInstance()
|
|
158
|
+
const response = await api.cfg_knowbase.adminChatDestroy(id)
|
|
159
|
+
return response
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Get chat history
|
|
165
|
+
*
|
|
166
|
+
* @method GET
|
|
167
|
+
* @path /cfg/knowbase/admin/chat/{id}/history/
|
|
168
|
+
*/
|
|
169
|
+
export async function getKnowbaseAdminChatHistoryRetrieve( id: string, client?
|
|
170
|
+
): Promise<ChatHistory> {
|
|
171
|
+
const api = client || getAPIInstance()
|
|
172
|
+
const response = await api.cfg_knowbase.adminChatHistoryRetrieve(id)
|
|
173
|
+
return ChatHistorySchema.parse(response)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Process chat query with RAG
|
|
179
|
+
*
|
|
180
|
+
* @method POST
|
|
181
|
+
* @path /cfg/knowbase/admin/chat/query/
|
|
182
|
+
*/
|
|
183
|
+
export async function createKnowbaseAdminChatQueryCreate( data: ChatQueryRequest, client?
|
|
184
|
+
): Promise<ChatResponse> {
|
|
185
|
+
const api = client || getAPIInstance()
|
|
186
|
+
const response = await api.cfg_knowbase.adminChatQueryCreate(data)
|
|
187
|
+
return ChatResponseSchema.parse(response)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* List user documents
|
|
193
|
+
*
|
|
194
|
+
* @method GET
|
|
195
|
+
* @path /cfg/knowbase/admin/documents/
|
|
196
|
+
*/
|
|
197
|
+
export async function getKnowbaseAdminDocumentsList( params?: { page?: number; page_size?: number; status?: string }, client?
|
|
198
|
+
): Promise<PaginatedDocumentList> {
|
|
199
|
+
const api = client || getAPIInstance()
|
|
200
|
+
const response = await api.cfg_knowbase.adminDocumentsList(params?.page, params?.page_size, params?.status)
|
|
201
|
+
return PaginatedDocumentListSchema.parse(response)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Upload new document
|
|
207
|
+
*
|
|
208
|
+
* @method POST
|
|
209
|
+
* @path /cfg/knowbase/admin/documents/
|
|
210
|
+
*/
|
|
211
|
+
export async function createKnowbaseAdminDocumentsCreate( data: DocumentCreateRequest, client?
|
|
212
|
+
): Promise<Document> {
|
|
213
|
+
const api = client || getAPIInstance()
|
|
214
|
+
const response = await api.cfg_knowbase.adminDocumentsCreate(data)
|
|
215
|
+
return DocumentSchema.parse(response)
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Get document details
|
|
221
|
+
*
|
|
222
|
+
* @method GET
|
|
223
|
+
* @path /cfg/knowbase/admin/documents/{id}/
|
|
224
|
+
*/
|
|
225
|
+
export async function getKnowbaseAdminDocumentsRetrieve( id: string, client?
|
|
226
|
+
): Promise<Document> {
|
|
227
|
+
const api = client || getAPIInstance()
|
|
228
|
+
const response = await api.cfg_knowbase.adminDocumentsRetrieve(id)
|
|
229
|
+
return DocumentSchema.parse(response)
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* API operation
|
|
235
|
+
*
|
|
236
|
+
* @method PUT
|
|
237
|
+
* @path /cfg/knowbase/admin/documents/{id}/
|
|
238
|
+
*/
|
|
239
|
+
export async function updateKnowbaseAdminDocumentsUpdate( id: string, data: DocumentRequest, client?
|
|
240
|
+
): Promise<Document> {
|
|
241
|
+
const api = client || getAPIInstance()
|
|
242
|
+
const response = await api.cfg_knowbase.adminDocumentsUpdate(id, data)
|
|
243
|
+
return DocumentSchema.parse(response)
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* API operation
|
|
249
|
+
*
|
|
250
|
+
* @method PATCH
|
|
251
|
+
* @path /cfg/knowbase/admin/documents/{id}/
|
|
252
|
+
*/
|
|
253
|
+
export async function partialUpdateKnowbaseAdminDocumentsPartialUpdate( id: string, data?: PatchedDocumentRequest, client?
|
|
254
|
+
): Promise<Document> {
|
|
255
|
+
const api = client || getAPIInstance()
|
|
256
|
+
const response = await api.cfg_knowbase.adminDocumentsPartialUpdate(id, data)
|
|
257
|
+
return DocumentSchema.parse(response)
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Delete document
|
|
263
|
+
*
|
|
264
|
+
* @method DELETE
|
|
265
|
+
* @path /cfg/knowbase/admin/documents/{id}/
|
|
266
|
+
*/
|
|
267
|
+
export async function deleteKnowbaseAdminDocumentsDestroy( id: string, client?
|
|
268
|
+
): Promise<void> {
|
|
269
|
+
const api = client || getAPIInstance()
|
|
270
|
+
const response = await api.cfg_knowbase.adminDocumentsDestroy(id)
|
|
271
|
+
return response
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Reprocess document
|
|
277
|
+
*
|
|
278
|
+
* @method POST
|
|
279
|
+
* @path /cfg/knowbase/admin/documents/{id}/reprocess/
|
|
280
|
+
*/
|
|
281
|
+
export async function createKnowbaseAdminDocumentsReprocessCreate( id: string, data: DocumentRequest, client?
|
|
282
|
+
): Promise<Document> {
|
|
283
|
+
const api = client || getAPIInstance()
|
|
284
|
+
const response = await api.cfg_knowbase.adminDocumentsReprocessCreate(id, data)
|
|
285
|
+
return DocumentSchema.parse(response)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Get document processing status
|
|
291
|
+
*
|
|
292
|
+
* @method GET
|
|
293
|
+
* @path /cfg/knowbase/admin/documents/{id}/status/
|
|
294
|
+
*/
|
|
295
|
+
export async function getKnowbaseAdminDocumentsStatusRetrieve( id: string, client?
|
|
296
|
+
): Promise<DocumentProcessingStatus> {
|
|
297
|
+
const api = client || getAPIInstance()
|
|
298
|
+
const response = await api.cfg_knowbase.adminDocumentsStatusRetrieve(id)
|
|
299
|
+
return DocumentProcessingStatusSchema.parse(response)
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Get processing statistics
|
|
305
|
+
*
|
|
306
|
+
* @method GET
|
|
307
|
+
* @path /cfg/knowbase/admin/documents/stats/
|
|
308
|
+
*/
|
|
309
|
+
export async function getKnowbaseAdminDocumentsStatsRetrieve( client?
|
|
310
|
+
): Promise<DocumentStats> {
|
|
311
|
+
const api = client || getAPIInstance()
|
|
312
|
+
const response = await api.cfg_knowbase.adminDocumentsStatsRetrieve()
|
|
313
|
+
return DocumentStatsSchema.parse(response)
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* List user chat sessions
|
|
319
|
+
*
|
|
320
|
+
* @method GET
|
|
321
|
+
* @path /cfg/knowbase/admin/sessions/
|
|
322
|
+
*/
|
|
323
|
+
export async function getKnowbaseAdminSessionsList( params?: { page?: number; page_size?: number }, client?
|
|
324
|
+
): Promise<PaginatedChatSessionList> {
|
|
325
|
+
const api = client || getAPIInstance()
|
|
326
|
+
const response = await api.cfg_knowbase.adminSessionsList(params?.page, params?.page_size)
|
|
327
|
+
return PaginatedChatSessionListSchema.parse(response)
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Create new chat session
|
|
333
|
+
*
|
|
334
|
+
* @method POST
|
|
335
|
+
* @path /cfg/knowbase/admin/sessions/
|
|
336
|
+
*/
|
|
337
|
+
export async function createKnowbaseAdminSessionsCreate( data: ChatSessionCreateRequest, client?
|
|
338
|
+
): Promise<ChatSession> {
|
|
339
|
+
const api = client || getAPIInstance()
|
|
340
|
+
const response = await api.cfg_knowbase.adminSessionsCreate(data)
|
|
341
|
+
return ChatSessionSchema.parse(response)
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* API operation
|
|
347
|
+
*
|
|
348
|
+
* @method GET
|
|
349
|
+
* @path /cfg/knowbase/admin/sessions/{id}/
|
|
350
|
+
*/
|
|
351
|
+
export async function getKnowbaseAdminSessionsRetrieve( id: string, client?
|
|
352
|
+
): Promise<ChatSession> {
|
|
353
|
+
const api = client || getAPIInstance()
|
|
354
|
+
const response = await api.cfg_knowbase.adminSessionsRetrieve(id)
|
|
355
|
+
return ChatSessionSchema.parse(response)
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* API operation
|
|
361
|
+
*
|
|
362
|
+
* @method PUT
|
|
363
|
+
* @path /cfg/knowbase/admin/sessions/{id}/
|
|
364
|
+
*/
|
|
365
|
+
export async function updateKnowbaseAdminSessionsUpdate( id: string, data: ChatSessionRequest, client?
|
|
366
|
+
): Promise<ChatSession> {
|
|
367
|
+
const api = client || getAPIInstance()
|
|
368
|
+
const response = await api.cfg_knowbase.adminSessionsUpdate(id, data)
|
|
369
|
+
return ChatSessionSchema.parse(response)
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* API operation
|
|
375
|
+
*
|
|
376
|
+
* @method PATCH
|
|
377
|
+
* @path /cfg/knowbase/admin/sessions/{id}/
|
|
378
|
+
*/
|
|
379
|
+
export async function partialUpdateKnowbaseAdminSessionsPartialUpdate( id: string, data?: PatchedChatSessionRequest, client?
|
|
380
|
+
): Promise<ChatSession> {
|
|
381
|
+
const api = client || getAPIInstance()
|
|
382
|
+
const response = await api.cfg_knowbase.adminSessionsPartialUpdate(id, data)
|
|
383
|
+
return ChatSessionSchema.parse(response)
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* API operation
|
|
389
|
+
*
|
|
390
|
+
* @method DELETE
|
|
391
|
+
* @path /cfg/knowbase/admin/sessions/{id}/
|
|
392
|
+
*/
|
|
393
|
+
export async function deleteKnowbaseAdminSessionsDestroy( id: string, client?
|
|
394
|
+
): Promise<void> {
|
|
395
|
+
const api = client || getAPIInstance()
|
|
396
|
+
const response = await api.cfg_knowbase.adminSessionsDestroy(id)
|
|
397
|
+
return response
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Activate chat session
|
|
403
|
+
*
|
|
404
|
+
* @method POST
|
|
405
|
+
* @path /cfg/knowbase/admin/sessions/{id}/activate/
|
|
406
|
+
*/
|
|
407
|
+
export async function createKnowbaseAdminSessionsActivateCreate( id: string, data: ChatSessionRequest, client?
|
|
408
|
+
): Promise<ChatSession> {
|
|
409
|
+
const api = client || getAPIInstance()
|
|
410
|
+
const response = await api.cfg_knowbase.adminSessionsActivateCreate(id, data)
|
|
411
|
+
return ChatSessionSchema.parse(response)
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Archive chat session
|
|
417
|
+
*
|
|
418
|
+
* @method POST
|
|
419
|
+
* @path /cfg/knowbase/admin/sessions/{id}/archive/
|
|
420
|
+
*/
|
|
421
|
+
export async function createKnowbaseAdminSessionsArchiveCreate( id: string, data: ChatSessionRequest, client?
|
|
422
|
+
): Promise<ChatSession> {
|
|
423
|
+
const api = client || getAPIInstance()
|
|
424
|
+
const response = await api.cfg_knowbase.adminSessionsArchiveCreate(id, data)
|
|
425
|
+
return ChatSessionSchema.parse(response)
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* List public categories
|
|
431
|
+
*
|
|
432
|
+
* @method GET
|
|
433
|
+
* @path /cfg/knowbase/categories/
|
|
434
|
+
*/
|
|
435
|
+
export async function getKnowbaseCategoriesList( params?: { page?: number; page_size?: number }, client?
|
|
436
|
+
): Promise<PaginatedPublicCategoryList> {
|
|
437
|
+
const api = client || getAPIInstance()
|
|
438
|
+
const response = await api.cfg_knowbase.categoriesList(params?.page, params?.page_size)
|
|
439
|
+
return PaginatedPublicCategoryListSchema.parse(response)
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Get public category details
|
|
445
|
+
*
|
|
446
|
+
* @method GET
|
|
447
|
+
* @path /cfg/knowbase/categories/{id}/
|
|
448
|
+
*/
|
|
449
|
+
export async function getKnowbaseCategoriesRetrieve( id: string, client?
|
|
450
|
+
): Promise<PublicCategory> {
|
|
451
|
+
const api = client || getAPIInstance()
|
|
452
|
+
const response = await api.cfg_knowbase.categoriesRetrieve(id)
|
|
453
|
+
return PublicCategorySchema.parse(response)
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* List public documents
|
|
459
|
+
*
|
|
460
|
+
* @method GET
|
|
461
|
+
* @path /cfg/knowbase/documents/
|
|
462
|
+
*/
|
|
463
|
+
export async function getKnowbaseDocumentsList( params?: { category?: string; page?: number; page_size?: number; search?: string }, client?
|
|
464
|
+
): Promise<PaginatedPublicDocumentListList> {
|
|
465
|
+
const api = client || getAPIInstance()
|
|
466
|
+
const response = await api.cfg_knowbase.documentsList(params?.category, params?.page, params?.page_size, params?.search)
|
|
467
|
+
return PaginatedPublicDocumentListListSchema.parse(response)
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Get public document details
|
|
473
|
+
*
|
|
474
|
+
* @method GET
|
|
475
|
+
* @path /cfg/knowbase/documents/{id}/
|
|
476
|
+
*/
|
|
477
|
+
export async function getKnowbaseDocumentsRetrieve( id: string, client?
|
|
478
|
+
): Promise<PublicDocument> {
|
|
479
|
+
const api = client || getAPIInstance()
|
|
480
|
+
const response = await api.cfg_knowbase.documentsRetrieve(id)
|
|
481
|
+
return PublicDocumentSchema.parse(response)
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* API operation
|
|
487
|
+
*
|
|
488
|
+
* @method GET
|
|
489
|
+
* @path /cfg/knowbase/system/archives/
|
|
490
|
+
*/
|
|
491
|
+
export async function getKnowbaseSystemArchivesList( params?: { page?: number; page_size?: number }, client?
|
|
492
|
+
): Promise<PaginatedDocumentArchiveListList> {
|
|
493
|
+
const api = client || getAPIInstance()
|
|
494
|
+
const response = await api.cfg_knowbase.systemArchivesList(params?.page, params?.page_size)
|
|
495
|
+
return PaginatedDocumentArchiveListListSchema.parse(response)
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Upload and process archive
|
|
501
|
+
*
|
|
502
|
+
* @method POST
|
|
503
|
+
* @path /cfg/knowbase/system/archives/
|
|
504
|
+
*/
|
|
505
|
+
export async function createKnowbaseSystemArchivesCreate( data: any, client?
|
|
506
|
+
): Promise<ArchiveProcessingResult> {
|
|
507
|
+
const api = client || getAPIInstance()
|
|
508
|
+
const response = await api.cfg_knowbase.systemArchivesCreate(data)
|
|
509
|
+
return ArchiveProcessingResultSchema.parse(response)
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* API operation
|
|
515
|
+
*
|
|
516
|
+
* @method GET
|
|
517
|
+
* @path /cfg/knowbase/system/archives/{id}/
|
|
518
|
+
*/
|
|
519
|
+
export async function getKnowbaseSystemArchivesRetrieve( id: string, client?
|
|
520
|
+
): Promise<DocumentArchiveDetail> {
|
|
521
|
+
const api = client || getAPIInstance()
|
|
522
|
+
const response = await api.cfg_knowbase.systemArchivesRetrieve(id)
|
|
523
|
+
return DocumentArchiveDetailSchema.parse(response)
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* API operation
|
|
529
|
+
*
|
|
530
|
+
* @method PUT
|
|
531
|
+
* @path /cfg/knowbase/system/archives/{id}/
|
|
532
|
+
*/
|
|
533
|
+
export async function updateKnowbaseSystemArchivesUpdate( id: string, data: DocumentArchiveRequest, client?
|
|
534
|
+
): Promise<DocumentArchive> {
|
|
535
|
+
const api = client || getAPIInstance()
|
|
536
|
+
const response = await api.cfg_knowbase.systemArchivesUpdate(id, data)
|
|
537
|
+
return DocumentArchiveSchema.parse(response)
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* API operation
|
|
543
|
+
*
|
|
544
|
+
* @method PATCH
|
|
545
|
+
* @path /cfg/knowbase/system/archives/{id}/
|
|
546
|
+
*/
|
|
547
|
+
export async function partialUpdateKnowbaseSystemArchivesPartialUpdate( id: string, data?: PatchedDocumentArchiveRequest, client?
|
|
548
|
+
): Promise<DocumentArchive> {
|
|
549
|
+
const api = client || getAPIInstance()
|
|
550
|
+
const response = await api.cfg_knowbase.systemArchivesPartialUpdate(id, data)
|
|
551
|
+
return DocumentArchiveSchema.parse(response)
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* API operation
|
|
557
|
+
*
|
|
558
|
+
* @method DELETE
|
|
559
|
+
* @path /cfg/knowbase/system/archives/{id}/
|
|
560
|
+
*/
|
|
561
|
+
export async function deleteKnowbaseSystemArchivesDestroy( id: string, client?
|
|
562
|
+
): Promise<void> {
|
|
563
|
+
const api = client || getAPIInstance()
|
|
564
|
+
const response = await api.cfg_knowbase.systemArchivesDestroy(id)
|
|
565
|
+
return response
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Get archive file tree
|
|
571
|
+
*
|
|
572
|
+
* @method GET
|
|
573
|
+
* @path /cfg/knowbase/system/archives/{id}/file_tree/
|
|
574
|
+
*/
|
|
575
|
+
export async function getKnowbaseSystemArchivesFileTreeRetrieve( id: string, client?
|
|
576
|
+
): Promise<any> {
|
|
577
|
+
const api = client || getAPIInstance()
|
|
578
|
+
const response = await api.cfg_knowbase.systemArchivesFileTreeRetrieve(id)
|
|
579
|
+
return response
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Get archive items
|
|
585
|
+
*
|
|
586
|
+
* @method GET
|
|
587
|
+
* @path /cfg/knowbase/system/archives/{id}/items/
|
|
588
|
+
*/
|
|
589
|
+
export async function getKnowbaseSystemArchivesItemsList( id: string, params?: { page?: number; page_size?: number }, client?
|
|
590
|
+
): Promise<PaginatedArchiveItemList> {
|
|
591
|
+
const api = client || getAPIInstance()
|
|
592
|
+
const response = await api.cfg_knowbase.systemArchivesItemsList(id, params?.page, params?.page_size)
|
|
593
|
+
return PaginatedArchiveItemListSchema.parse(response)
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Search archive chunks
|
|
599
|
+
*
|
|
600
|
+
* @method POST
|
|
601
|
+
* @path /cfg/knowbase/system/archives/{id}/search/
|
|
602
|
+
*/
|
|
603
|
+
export async function createKnowbaseSystemArchivesSearchCreate( id: string, data: ArchiveSearchRequestRequest, params?: { page?: number; page_size?: number }, client?
|
|
604
|
+
): Promise<PaginatedArchiveSearchResultList> {
|
|
605
|
+
const api = client || getAPIInstance()
|
|
606
|
+
const response = await api.cfg_knowbase.systemArchivesSearchCreate(id, data, params?.page, params?.page_size)
|
|
607
|
+
return PaginatedArchiveSearchResultListSchema.parse(response)
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Re-vectorize chunks
|
|
613
|
+
*
|
|
614
|
+
* @method POST
|
|
615
|
+
* @path /cfg/knowbase/system/archives/revectorize/
|
|
616
|
+
*/
|
|
617
|
+
export async function createKnowbaseSystemArchivesRevectorizeCreate( data: ChunkRevectorizationRequestRequest, client?
|
|
618
|
+
): Promise<VectorizationResult> {
|
|
619
|
+
const api = client || getAPIInstance()
|
|
620
|
+
const response = await api.cfg_knowbase.systemArchivesRevectorizeCreate(data)
|
|
621
|
+
return VectorizationResultSchema.parse(response)
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Get archive statistics
|
|
627
|
+
*
|
|
628
|
+
* @method GET
|
|
629
|
+
* @path /cfg/knowbase/system/archives/statistics/
|
|
630
|
+
*/
|
|
631
|
+
export async function getKnowbaseSystemArchivesStatisticsRetrieve( client?
|
|
632
|
+
): Promise<ArchiveStatistics> {
|
|
633
|
+
const api = client || getAPIInstance()
|
|
634
|
+
const response = await api.cfg_knowbase.systemArchivesStatisticsRetrieve()
|
|
635
|
+
return ArchiveStatisticsSchema.parse(response)
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Get vectorization statistics
|
|
641
|
+
*
|
|
642
|
+
* @method GET
|
|
643
|
+
* @path /cfg/knowbase/system/archives/vectorization_stats/
|
|
644
|
+
*/
|
|
645
|
+
export async function getKnowbaseSystemArchivesVectorizationStatsRetrieve( client?
|
|
646
|
+
): Promise<VectorizationStatistics> {
|
|
647
|
+
const api = client || getAPIInstance()
|
|
648
|
+
const response = await api.cfg_knowbase.systemArchivesVectorizationStatsRetrieve()
|
|
649
|
+
return VectorizationStatisticsSchema.parse(response)
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* API operation
|
|
655
|
+
*
|
|
656
|
+
* @method GET
|
|
657
|
+
* @path /cfg/knowbase/system/chunks/
|
|
658
|
+
*/
|
|
659
|
+
export async function getKnowbaseSystemChunksList( params?: { page?: number; page_size?: number }, client?
|
|
660
|
+
): Promise<PaginatedArchiveItemChunkList> {
|
|
661
|
+
const api = client || getAPIInstance()
|
|
662
|
+
const response = await api.cfg_knowbase.systemChunksList(params?.page, params?.page_size)
|
|
663
|
+
return PaginatedArchiveItemChunkListSchema.parse(response)
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* API operation
|
|
669
|
+
*
|
|
670
|
+
* @method POST
|
|
671
|
+
* @path /cfg/knowbase/system/chunks/
|
|
672
|
+
*/
|
|
673
|
+
export async function createKnowbaseSystemChunksCreate( data: ArchiveItemChunkRequest, client?
|
|
674
|
+
): Promise<ArchiveItemChunk> {
|
|
675
|
+
const api = client || getAPIInstance()
|
|
676
|
+
const response = await api.cfg_knowbase.systemChunksCreate(data)
|
|
677
|
+
return ArchiveItemChunkSchema.parse(response)
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* API operation
|
|
683
|
+
*
|
|
684
|
+
* @method GET
|
|
685
|
+
* @path /cfg/knowbase/system/chunks/{id}/
|
|
686
|
+
*/
|
|
687
|
+
export async function getKnowbaseSystemChunksRetrieve( id: string, client?
|
|
688
|
+
): Promise<ArchiveItemChunkDetail> {
|
|
689
|
+
const api = client || getAPIInstance()
|
|
690
|
+
const response = await api.cfg_knowbase.systemChunksRetrieve(id)
|
|
691
|
+
return ArchiveItemChunkDetailSchema.parse(response)
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* API operation
|
|
697
|
+
*
|
|
698
|
+
* @method PUT
|
|
699
|
+
* @path /cfg/knowbase/system/chunks/{id}/
|
|
700
|
+
*/
|
|
701
|
+
export async function updateKnowbaseSystemChunksUpdate( id: string, data: ArchiveItemChunkRequest, client?
|
|
702
|
+
): Promise<ArchiveItemChunk> {
|
|
703
|
+
const api = client || getAPIInstance()
|
|
704
|
+
const response = await api.cfg_knowbase.systemChunksUpdate(id, data)
|
|
705
|
+
return ArchiveItemChunkSchema.parse(response)
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* API operation
|
|
711
|
+
*
|
|
712
|
+
* @method PATCH
|
|
713
|
+
* @path /cfg/knowbase/system/chunks/{id}/
|
|
714
|
+
*/
|
|
715
|
+
export async function partialUpdateKnowbaseSystemChunksPartialUpdate( id: string, data?: PatchedArchiveItemChunkRequest, client?
|
|
716
|
+
): Promise<ArchiveItemChunk> {
|
|
717
|
+
const api = client || getAPIInstance()
|
|
718
|
+
const response = await api.cfg_knowbase.systemChunksPartialUpdate(id, data)
|
|
719
|
+
return ArchiveItemChunkSchema.parse(response)
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* API operation
|
|
725
|
+
*
|
|
726
|
+
* @method DELETE
|
|
727
|
+
* @path /cfg/knowbase/system/chunks/{id}/
|
|
728
|
+
*/
|
|
729
|
+
export async function deleteKnowbaseSystemChunksDestroy( id: string, client?
|
|
730
|
+
): Promise<void> {
|
|
731
|
+
const api = client || getAPIInstance()
|
|
732
|
+
const response = await api.cfg_knowbase.systemChunksDestroy(id)
|
|
733
|
+
return response
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Get chunk context
|
|
739
|
+
*
|
|
740
|
+
* @method GET
|
|
741
|
+
* @path /cfg/knowbase/system/chunks/{id}/context/
|
|
742
|
+
*/
|
|
743
|
+
export async function getKnowbaseSystemChunksContextRetrieve( id: string, client?
|
|
744
|
+
): Promise<ArchiveItemChunkDetail> {
|
|
745
|
+
const api = client || getAPIInstance()
|
|
746
|
+
const response = await api.cfg_knowbase.systemChunksContextRetrieve(id)
|
|
747
|
+
return ArchiveItemChunkDetailSchema.parse(response)
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Vectorize chunk
|
|
753
|
+
*
|
|
754
|
+
* @method POST
|
|
755
|
+
* @path /cfg/knowbase/system/chunks/{id}/vectorize/
|
|
756
|
+
*/
|
|
757
|
+
export async function createKnowbaseSystemChunksVectorizeCreate( id: string, data: ArchiveItemChunkRequest, client?
|
|
758
|
+
): Promise<any> {
|
|
759
|
+
const api = client || getAPIInstance()
|
|
760
|
+
const response = await api.cfg_knowbase.systemChunksVectorizeCreate(id, data)
|
|
761
|
+
return response
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* API operation
|
|
767
|
+
*
|
|
768
|
+
* @method GET
|
|
769
|
+
* @path /cfg/knowbase/system/items/
|
|
770
|
+
*/
|
|
771
|
+
export async function getKnowbaseSystemItemsList( params?: { page?: number; page_size?: number }, client?
|
|
772
|
+
): Promise<PaginatedArchiveItemList> {
|
|
773
|
+
const api = client || getAPIInstance()
|
|
774
|
+
const response = await api.cfg_knowbase.systemItemsList(params?.page, params?.page_size)
|
|
775
|
+
return PaginatedArchiveItemListSchema.parse(response)
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* API operation
|
|
781
|
+
*
|
|
782
|
+
* @method POST
|
|
783
|
+
* @path /cfg/knowbase/system/items/
|
|
784
|
+
*/
|
|
785
|
+
export async function createKnowbaseSystemItemsCreate( data: ArchiveItemRequest, client?
|
|
786
|
+
): Promise<ArchiveItem> {
|
|
787
|
+
const api = client || getAPIInstance()
|
|
788
|
+
const response = await api.cfg_knowbase.systemItemsCreate(data)
|
|
789
|
+
return ArchiveItemSchema.parse(response)
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* API operation
|
|
795
|
+
*
|
|
796
|
+
* @method GET
|
|
797
|
+
* @path /cfg/knowbase/system/items/{id}/
|
|
798
|
+
*/
|
|
799
|
+
export async function getKnowbaseSystemItemsRetrieve( id: string, client?
|
|
800
|
+
): Promise<ArchiveItemDetail> {
|
|
801
|
+
const api = client || getAPIInstance()
|
|
802
|
+
const response = await api.cfg_knowbase.systemItemsRetrieve(id)
|
|
803
|
+
return ArchiveItemDetailSchema.parse(response)
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* API operation
|
|
809
|
+
*
|
|
810
|
+
* @method PUT
|
|
811
|
+
* @path /cfg/knowbase/system/items/{id}/
|
|
812
|
+
*/
|
|
813
|
+
export async function updateKnowbaseSystemItemsUpdate( id: string, data: ArchiveItemRequest, client?
|
|
814
|
+
): Promise<ArchiveItem> {
|
|
815
|
+
const api = client || getAPIInstance()
|
|
816
|
+
const response = await api.cfg_knowbase.systemItemsUpdate(id, data)
|
|
817
|
+
return ArchiveItemSchema.parse(response)
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* API operation
|
|
823
|
+
*
|
|
824
|
+
* @method PATCH
|
|
825
|
+
* @path /cfg/knowbase/system/items/{id}/
|
|
826
|
+
*/
|
|
827
|
+
export async function partialUpdateKnowbaseSystemItemsPartialUpdate( id: string, data?: PatchedArchiveItemRequest, client?
|
|
828
|
+
): Promise<ArchiveItem> {
|
|
829
|
+
const api = client || getAPIInstance()
|
|
830
|
+
const response = await api.cfg_knowbase.systemItemsPartialUpdate(id, data)
|
|
831
|
+
return ArchiveItemSchema.parse(response)
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* API operation
|
|
837
|
+
*
|
|
838
|
+
* @method DELETE
|
|
839
|
+
* @path /cfg/knowbase/system/items/{id}/
|
|
840
|
+
*/
|
|
841
|
+
export async function deleteKnowbaseSystemItemsDestroy( id: string, client?
|
|
842
|
+
): Promise<void> {
|
|
843
|
+
const api = client || getAPIInstance()
|
|
844
|
+
const response = await api.cfg_knowbase.systemItemsDestroy(id)
|
|
845
|
+
return response
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* Get item chunks
|
|
851
|
+
*
|
|
852
|
+
* @method GET
|
|
853
|
+
* @path /cfg/knowbase/system/items/{id}/chunks/
|
|
854
|
+
*/
|
|
855
|
+
export async function getKnowbaseSystemItemsChunksList( id: string, params?: { page?: number; page_size?: number }, client?
|
|
856
|
+
): Promise<PaginatedArchiveItemChunkList> {
|
|
857
|
+
const api = client || getAPIInstance()
|
|
858
|
+
const response = await api.cfg_knowbase.systemItemsChunksList(id, params?.page, params?.page_size)
|
|
859
|
+
return PaginatedArchiveItemChunkListSchema.parse(response)
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Get item content
|
|
865
|
+
*
|
|
866
|
+
* @method GET
|
|
867
|
+
* @path /cfg/knowbase/system/items/{id}/content/
|
|
868
|
+
*/
|
|
869
|
+
export async function getKnowbaseSystemItemsContentRetrieve( id: string, client?
|
|
870
|
+
): Promise<ArchiveItemDetail> {
|
|
871
|
+
const api = client || getAPIInstance()
|
|
872
|
+
const response = await api.cfg_knowbase.systemItemsContentRetrieve(id)
|
|
873
|
+
return ArchiveItemDetailSchema.parse(response)
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
|