@stack-spot/portal-network 0.184.0-beta.1 → 0.184.0

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.
Files changed (151) hide show
  1. package/CHANGELOG.md +2412 -2431
  2. package/dist/api/account.js +1 -1
  3. package/dist/api/agent-tools.js +1 -1
  4. package/dist/api/agent.js +1 -1
  5. package/dist/api/ai.js +1 -1
  6. package/dist/api/apiManagement.js +1 -1
  7. package/dist/api/apiRuntime.js +1 -1
  8. package/dist/api/cloudAccount.js +1 -1
  9. package/dist/api/cloudPlatform.js +1 -1
  10. package/dist/api/cloudPlatformHorizon.js +1 -1
  11. package/dist/api/cloudRuntimes.js +1 -1
  12. package/dist/api/cloudServices.js +1 -1
  13. package/dist/api/codeShift.d.ts +4 -76
  14. package/dist/api/codeShift.d.ts.map +1 -1
  15. package/dist/api/codeShift.js +1 -14
  16. package/dist/api/codeShift.js.map +1 -1
  17. package/dist/api/content.js +1 -1
  18. package/dist/api/dataIntegration.js +1 -1
  19. package/dist/api/discover.js +1 -1
  20. package/dist/api/genAiInference.js +1 -1
  21. package/dist/api/insights.js +1 -1
  22. package/dist/api/notification.js +1 -1
  23. package/dist/api/secrets.js +1 -1
  24. package/dist/api/serviceCatalog.js +1 -1
  25. package/dist/api/workspace-ai.js +1 -1
  26. package/dist/api/workspace.js +1 -1
  27. package/dist/api/workspaceManager.d.ts +16 -10
  28. package/dist/api/workspaceManager.d.ts.map +1 -1
  29. package/dist/api/workspaceManager.js +11 -1
  30. package/dist/api/workspaceManager.js.map +1 -1
  31. package/dist/api/workspaceSearchEngine.js +1 -1
  32. package/dist/client/ai.d.ts.map +1 -1
  33. package/dist/client/ai.js +14 -84
  34. package/dist/client/ai.js.map +1 -1
  35. package/dist/client/code-shift.d.ts +0 -30
  36. package/dist/client/code-shift.d.ts.map +1 -1
  37. package/dist/client/code-shift.js +1 -37
  38. package/dist/client/code-shift.js.map +1 -1
  39. package/dist/client/types.d.ts +6 -26
  40. package/dist/client/types.d.ts.map +1 -1
  41. package/dist/client/workspace-manager.d.ts +6 -0
  42. package/dist/client/workspace-manager.d.ts.map +1 -1
  43. package/dist/client/workspace-manager.js +10 -1
  44. package/dist/client/workspace-manager.js.map +1 -1
  45. package/package.json +1 -1
  46. package/readme.md +1 -1
  47. package/scripts/generate-apis.ts +134 -134
  48. package/src/api/account.ts +8367 -8368
  49. package/src/api/agent-tools.ts +2169 -2172
  50. package/src/api/agent.ts +1083 -1085
  51. package/src/api/ai.ts +3388 -3388
  52. package/src/api/apiManagement.ts +570 -570
  53. package/src/api/apiRuntime.ts +2103 -2103
  54. package/src/api/cloudAccount.ts +1239 -1239
  55. package/src/api/cloudPlatform.ts +927 -927
  56. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  57. package/src/api/cloudRuntimes.ts +2043 -2043
  58. package/src/api/cloudServices.ts +1445 -1445
  59. package/src/api/codeShift.ts +3481 -3580
  60. package/src/api/content.ts +9785 -9785
  61. package/src/api/dataIntegration.ts +1657 -1657
  62. package/src/api/discover.ts +435 -435
  63. package/src/api/eventBus.ts +171 -171
  64. package/src/api/genAiInference.ts +603 -603
  65. package/src/api/insights.ts +310 -310
  66. package/src/api/notification.ts +334 -336
  67. package/src/api/secrets.ts +342 -342
  68. package/src/api/serviceCatalog.ts +2908 -2908
  69. package/src/api/workflows.ts +1669 -1669
  70. package/src/api/workspace-ai.ts +677 -677
  71. package/src/api/workspace.ts +5889 -5889
  72. package/src/api/workspaceManager.ts +2951 -2936
  73. package/src/api/workspaceSearchEngine.ts +153 -153
  74. package/src/api-addresses.ts +120 -120
  75. package/src/apis-itau.json +225 -225
  76. package/src/apis.json +225 -225
  77. package/src/client/account.ts +902 -902
  78. package/src/client/agent-tools.ts +210 -210
  79. package/src/client/agent.ts +81 -81
  80. package/src/client/ai.ts +395 -469
  81. package/src/client/api-management.ts +40 -40
  82. package/src/client/cloud-account.ts +70 -70
  83. package/src/client/cloud-platform-horizon.ts +113 -113
  84. package/src/client/cloud-platform.ts +163 -163
  85. package/src/client/cloud-runtimes.ts +129 -129
  86. package/src/client/cloud-services.ts +94 -94
  87. package/src/client/code-shift.ts +349 -371
  88. package/src/client/content.ts +538 -538
  89. package/src/client/data-integration.ts +191 -191
  90. package/src/client/discover.ts +89 -89
  91. package/src/client/event-bus.ts +84 -84
  92. package/src/client/gen-ai-inference.ts +65 -65
  93. package/src/client/insights.ts +28 -28
  94. package/src/client/notification.ts +32 -32
  95. package/src/client/runtime-manager.ts +76 -76
  96. package/src/client/secrets.ts +60 -60
  97. package/src/client/types.ts +377 -398
  98. package/src/client/workflow.ts +83 -83
  99. package/src/client/workspace-ai.ts +191 -191
  100. package/src/client/workspace-manager.ts +564 -560
  101. package/src/client/workspace-search.ts +39 -39
  102. package/src/client/workspace.ts +480 -480
  103. package/src/error/DefaultAPIError.ts +151 -151
  104. package/src/error/FileUploadError.ts +18 -18
  105. package/src/error/IgnoredErrorCodes.ts +3 -3
  106. package/src/error/StackspotAPIError.ts +101 -101
  107. package/src/error/StreamCanceledError.ts +10 -10
  108. package/src/error/StreamError.ts +7 -7
  109. package/src/error/StreamJsonError.ts +10 -10
  110. package/src/error/dictionary/account.ts +58 -58
  111. package/src/error/dictionary/action-details.ts +20 -20
  112. package/src/error/dictionary/action.ts +211 -211
  113. package/src/error/dictionary/agent-tools.ts +75 -75
  114. package/src/error/dictionary/ai-inference.ts +28 -28
  115. package/src/error/dictionary/base.ts +22 -22
  116. package/src/error/dictionary/cloud-platform.ts +82 -82
  117. package/src/error/dictionary/cnt-fields.ts +14 -14
  118. package/src/error/dictionary/cnt.ts +103 -103
  119. package/src/error/dictionary/code-shift.ts +12 -12
  120. package/src/error/dictionary/rte.ts +24 -24
  121. package/src/error/dictionary/rtm.ts +10 -10
  122. package/src/error/dictionary/secrets.ts +14 -14
  123. package/src/error/dictionary/workspace-ai.ts +10 -10
  124. package/src/error/dictionary/workspace-details.ts +15 -15
  125. package/src/error/dictionary/workspace-fields.ts +10 -10
  126. package/src/error/dictionary/workspace.ts +209 -209
  127. package/src/error/types.ts +21 -21
  128. package/src/index.ts +43 -43
  129. package/src/network/AutoInfiniteQuery.ts +115 -115
  130. package/src/network/AutoMutation.ts +27 -27
  131. package/src/network/AutoOperation.ts +73 -73
  132. package/src/network/AutoQuery.ts +75 -75
  133. package/src/network/ManualInfiniteQuery.ts +95 -95
  134. package/src/network/ManualMutation.ts +40 -40
  135. package/src/network/ManualOperation.ts +52 -52
  136. package/src/network/ManualQuery.ts +82 -82
  137. package/src/network/NetworkClient.ts +167 -167
  138. package/src/network/ReactQueryNetworkClient.ts +312 -312
  139. package/src/network/react-query-client.ts +14 -14
  140. package/src/network/types.ts +294 -294
  141. package/src/types.ts +1 -1
  142. package/src/utils/StreamedArray.tsx +146 -146
  143. package/src/utils/StreamedJson.tsx +166 -166
  144. package/src/utils/remove-authorization-param.ts +6 -6
  145. package/src/utils/string.ts +19 -19
  146. package/src/utils/use-extended-list.ts +80 -80
  147. package/src/utils/use-streamed-array.ts +17 -17
  148. package/tsconfig.build.json +4 -4
  149. package/tsconfig.json +10 -10
  150. package/logs/simple-failure/01JBER7AWKACEC3Y1NF7M6PHFF/job_id_1.log +0 -3
  151. package/logs/simple-suspend/01JBEMQG94ADPT99MSZ7EJKGXZ/job_id_1.log +0 -5
@@ -1,1657 +1,1657 @@
1
- /**
2
- * FastAPI
3
- * 0.1.0
4
- * DO NOT MODIFY - This file has been generated using oazapfts.
5
- * See https://www.npmjs.com/package/oazapfts
6
- */
7
- import * as Oazapfts from "@oazapfts/runtime";
8
- import * as QS from "@oazapfts/runtime/query";
9
- export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
- headers: {},
11
- baseUrl: "/",
12
- };
13
- const oazapfts = Oazapfts.runtime(defaults);
14
- export const servers = {};
15
- export type SearchPreProcessing = "multi_query";
16
- export type SearchPostProcessing = "reranker";
17
- export type SearchStrategy = "cosine";
18
- export type SearchMethod = "similarity";
19
- export type SearchKnowledgeObjectRequest = {
20
- query: string;
21
- knowledge_source_ids: string[];
22
- limit?: number;
23
- threshold?: number | null;
24
- pre_processing?: SearchPreProcessing | null;
25
- post_processing?: SearchPostProcessing | null;
26
- strategy?: SearchStrategy;
27
- method?: SearchMethod;
28
- };
29
- export type SearchKnowledgeObjectResponse = {
30
- id: string;
31
- score: number;
32
- display_content: string;
33
- prompt_content: string;
34
- file_path: string | null;
35
- ks_id: string;
36
- ks_name: string;
37
- ks_slug: string;
38
- ks_type: string;
39
- };
40
- export type ValidationError = {
41
- loc: (string | number)[];
42
- msg: string;
43
- "type": string;
44
- };
45
- export type HttpValidationError = {
46
- detail?: ValidationError[];
47
- };
48
- export type SearchCrossAccountKnowledgeObjectRequest = {
49
- query: string;
50
- limit?: number;
51
- threshold?: number | null;
52
- pre_processing?: SearchPreProcessing | null;
53
- post_processing?: SearchPostProcessing | null;
54
- strategy?: SearchStrategy;
55
- method?: SearchMethod;
56
- };
57
- export type KnowledgeSourceTypeEnum = "snippet" | "api" | "event" | "custom" | "project_file" | "memory";
58
- export type NewKnowledgeSourceRequest = {
59
- slug: string;
60
- name: string;
61
- description: string;
62
- "type": KnowledgeSourceTypeEnum;
63
- };
64
- export type KnowledgeSourcesWorkspaceForkRequest = {
65
- ids: string[];
66
- member_id: string;
67
- };
68
- export type VisibilityLevelEnum = "account" | "personal" | "shared" | "workspace" | "favorite";
69
- export type KnowledgeSourceResponse = {
70
- id: string;
71
- slug: string;
72
- name: string;
73
- description: string;
74
- "type": KnowledgeSourceTypeEnum;
75
- creator: string | null;
76
- "default": boolean;
77
- visibility_level: VisibilityLevelEnum;
78
- model_name: string;
79
- use_only: boolean;
80
- };
81
- export type KnowledgeSourcesWorkspaceForkResponse = {
82
- list_ks: KnowledgeSourceResponse[];
83
- ks_ids_account: string[];
84
- error_ids: string[];
85
- };
86
- export type KnowledgeSourcesWorkspaceDeleteRequest = {
87
- ids: string[];
88
- };
89
- export type KnowledgeSourcesWorkspaceListRequest = {
90
- ids: string[];
91
- name?: string | null;
92
- };
93
- export type KnowledgeSourceItemResponse = {
94
- id: string;
95
- slug: string;
96
- name: string;
97
- description: string;
98
- "type": KnowledgeSourceTypeEnum;
99
- creator: string | null;
100
- "default": boolean;
101
- visibility_level: VisibilityLevelEnum;
102
- object_count: number;
103
- use_only: boolean;
104
- };
105
- export type ExceptionType = "DATAINTEGRATION_1000_INVALID_JWT" | "DATAINTEGRATION_1001_DECODE_JWT_ERROR" | "DATAINTEGRATION_1002_KNOWLEDGE_SOURCE_DOES_NOT_EXISTS" | "DATAINTEGRATION_1003_KNOWLEDGE_SOURCE_WRONG_TYPE" | "DATAINTEGRATION_1004_UNSUPPORTED_KNOWLEDGE_SOURCE_TYPE_FOR_UPLOAD" | "DATAINTEGRATION_1005_KNOWLEDGE_OBJECT_NOT_FOUND" | "DATAINTEGRATION_1006_UNSUPPORTED_FILE_TYPE" | "DATAINTEGRATION_1007_KNOWLEDGE_SOURCE_SLUG_ALREADY_EXISTS" | "DATAINTEGRATION_1008_KNOWLEDGE_SOURCE_NOT_FOUND" | "DATAINTEGRATION_1009_KNOWLEDGE_SOURCE_CANNOT_BE_ASSOCIATED" | "DATAINTEGRATION_1010_KNOWLEDGE_SOURCE_NOT_ACCOUNT_VISIBLE" | "DATAINTEGRATION_1011_ACCOUNT_SETTINGS_NOT_FOUND" | "DATAINTEGRATION_1012_SECRET_NOT_FOUND" | "DATAINTEGRATION_1013_STRATEGY_NOT_FOUND" | "DATAINTEGRATION_1014_EMBEDDING_INTEGRATION_ERROR" | "DATAINTEGRATION_1015_KNOWLEDGE_OBJECT_UNEXPECTED_ERROR" | "DATAINTEGRATION_1016_FILE_UPLOAD_DOES_NOT_EXISTS" | "DATAINTEGRATION_1017_INVALID_VISIBILITY_CHANGE" | "DATAINTEGRATION_1018_TOKENS_USAGE_LIMIT_REACHED" | "DATAINTEGRATION_1019_KNOWLEDGE_SOURCE_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1020_FILE_UPLOAD_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1021_FILE_UPLOAD_INDEXED_OR_NOT_SPLITTED" | "DATAINTEGRATION_1022_KNOWLEDGE_GROUP_NOT_FOUND" | "DATAINTEGRATION_1023_FILE_UPLOAD_UNSUPPORTED_TARGET" | "DATAINTEGRATION_2000_LLM_INTEGRATION_ERROR" | "DATAINTEGRATION_2001_LLM_RATE_LIMIT_ERROR" | "DATAINTEGRATION_2002_LLM_PROMPT_TOO_LARGE_ERROR" | "DATAINTEGRATION_2003_LLM_FILE_TOO_LARGE_ERROR" | "DATAINTEGRATION_3000_FEATURE_DISABLED_ERROR" | "DATAINTEGRATION_5000_UNEXPECTED_ERROR" | "DATAINTEGRATION_6000_FORBIDDEN" | "DATAINTEGRATION_8001_ACCOUNT_API_ERROR" | "DATAINTEGRATION_4001_FAVORITE_ALREADY_EXISTS" | "DATAINTEGRATION_4002_FAVORITE_NOT_FOUND";
106
- export type HttpErrorResponse = {
107
- "type"?: string;
108
- status: string;
109
- code: ExceptionType;
110
- details: string;
111
- value?: string | null;
112
- field?: string | null;
113
- };
114
- export type OrderEnum = "a-to-z" | "z-to-a" | "oldest-first" | "newest-first";
115
- export type KnowledgeSourceSearchRequest = {
116
- ids: string[];
117
- };
118
- export type KnowledgeSourcePatchesRequest = {
119
- name: string;
120
- description: string;
121
- use_only?: boolean | null;
122
- };
123
- export type KnowledgeSourcesPublishRequest = {
124
- use_only?: boolean;
125
- };
126
- export type KnowledgeSourcePublishBatchRequest = {
127
- ids: string[];
128
- };
129
- export type ForkKnowledgeSourceRequest = {
130
- slug: string;
131
- name: string;
132
- description: string;
133
- };
134
- export type KnowledgeObjectResponse = {
135
- content: string;
136
- id: string;
137
- standalone: boolean;
138
- updated: string;
139
- checksum: string;
140
- file_path: string | null;
141
- programming_language: string | null;
142
- use_case: string | null;
143
- attributes: {
144
- [key: string]: any;
145
- } | null;
146
- };
147
- export type KnowledgeObjectChecksumResponse = {
148
- checksum: string;
149
- };
150
- export type KnowledgeSourceLastMessageResponse = {
151
- id: string;
152
- prompt_content: string;
153
- ks_id: string;
154
- };
155
- export type KnowledgeSourceFilesIngestedResponse = {
156
- id: string;
157
- path: string;
158
- checksum: string;
159
- status?: string;
160
- created_at: string;
161
- updated_at: string;
162
- count_kos: number;
163
- };
164
- export type DeleteIndexedFilesRequest = {
165
- paths: string[];
166
- };
167
- export type FileUploadType = "PROJECT" | "KNOWLEDGE_SOURCE" | "CONTEXT" | "TOOLKIT";
168
- export type FileUploadIndexType = "RELEVANT" | "FULL_INDEX";
169
- export type NewFileUploadRequest = {
170
- file_name: string;
171
- target_id?: string | null;
172
- target_type: FileUploadType;
173
- expiration?: number;
174
- index_type?: FileUploadIndexType | null;
175
- };
176
- export type NewFileUploadFormResponse = {
177
- id: string;
178
- url: string;
179
- form: {
180
- [key: string]: string;
181
- };
182
- };
183
- export type FileUploadStatus = "NEW" | "PROCESSING" | "INDEXED" | "SPLITTED" | "EXPIRED" | "ERROR" | "SPLIT_ERROR" | "INDEXED_BUT_CLEANUP_FAILED";
184
- export type SummaryPartResponse = {
185
- added: number;
186
- preserved: number;
187
- removed: number;
188
- errors: {
189
- [key: string]: string;
190
- };
191
- };
192
- export type FileUploadStatusResponse = {
193
- id: string;
194
- file_name: string;
195
- target_id: string;
196
- target_type: FileUploadType;
197
- status: FileUploadStatus;
198
- error_description: string | null;
199
- summary: SummaryPartResponse | null;
200
- };
201
- export type FileSplitStrategy = "NONE" | "LINES_QUANTITY" | "TOKENS_QUANTITY" | "CHARACTERS_QUANTITY" | "SYNTACTIC" | "ENDPOINT";
202
- export type FileUploadSaveChunksRequest = {
203
- split_strategy: FileSplitStrategy;
204
- split_overlap?: number | null;
205
- split_quantity?: number | null;
206
- };
207
- export type SyncResultDto = {
208
- added: number;
209
- preserved: number;
210
- removed: number;
211
- errors: {
212
- [key: string]: string;
213
- };
214
- };
215
- export type FileUploadUpdateRequest = {
216
- status: FileUploadStatus;
217
- summary?: SyncResultDto | null;
218
- error_description?: string | null;
219
- };
220
- export type FileSplitRequest = {
221
- split_overlap?: number | null;
222
- split_quantity?: number | null;
223
- split_strategy: FileSplitStrategy;
224
- embed_after_split?: boolean;
225
- max_split_preview?: number;
226
- };
227
- export type FileMetadataResponse = {
228
- id: string;
229
- file_path: string;
230
- bucket_name: string;
231
- target_slug: string;
232
- target_type: FileUploadType;
233
- status: FileUploadStatus;
234
- error_description: string | null;
235
- user_id_headers: string;
236
- };
237
- export type FileUploadException = {
238
- "type": ExceptionType;
239
- message: string;
240
- value?: string | null;
241
- field?: string | null;
242
- };
243
- export type PresignedUrlsDto = {
244
- presigned_urls: string[] | null;
245
- invalid: FileUploadException | null;
246
- };
247
- export type AccountEmbeddingTokenUsage = {
248
- current_used: number;
249
- max_embedding_tokens: number;
250
- };
251
- export type ConsumeTokenRequest = {
252
- token_quantity: number;
253
- };
254
- export type AccountLlmConfigResponse = {
255
- "type": string | null;
256
- embedding_max_chunk_size: number;
257
- };
258
- export type GetOrCreateKnowledgeGroupRequest = {
259
- knowledge_source_id: string;
260
- file_path: string;
261
- };
262
- export type KnowledgeGroupResponse = {
263
- id: string;
264
- knowledge_source_id: string;
265
- path: string;
266
- parent: string | null;
267
- checksum: string;
268
- created: string;
269
- updated: string;
270
- last_modified: string;
271
- count_kos?: number | null;
272
- };
273
- export type DeleteGroupObjectsRequests = {
274
- checksums_not_in: string[];
275
- };
276
- export type DeletedCountResponse = {
277
- count: number;
278
- };
279
- export type UpdateKnowledgeGroupRequest = {
280
- checksum: Blob;
281
- last_modified: string;
282
- parent_zip?: string | null;
283
- };
284
- export type CreateKnowledgeObjectsBatchRequest = {
285
- knowledge_source_id: string;
286
- prompt_content: string;
287
- checksum: string;
288
- embedding: number[];
289
- display_content: string;
290
- model_name: string;
291
- programming_language?: string | null;
292
- use_case?: string | null;
293
- knowledge_group_id?: string | null;
294
- attributes?: {
295
- [key: string]: any;
296
- } | null;
297
- };
298
- /**
299
- * Health Check
300
- */
301
- export function healthCheckHealthzGet(opts?: Oazapfts.RequestOpts) {
302
- return oazapfts.ok(oazapfts.fetchJson<{
303
- status: 200;
304
- data: any;
305
- } | {
306
- status: 404;
307
- }>("/healthz", {
308
- ...opts
309
- }));
310
- }
311
- /**
312
- * Readiness Check
313
- */
314
- export function readinessCheckReadyzGet(opts?: Oazapfts.RequestOpts) {
315
- return oazapfts.ok(oazapfts.fetchJson<{
316
- status: 200;
317
- data: any;
318
- } | {
319
- status: 404;
320
- }>("/readyz", {
321
- ...opts
322
- }));
323
- }
324
- /**
325
- * Search Objects
326
- */
327
- export function searchObjectsV1SearchPost({ xAccountId, xUsername, authorization, searchKnowledgeObjectRequest }: {
328
- xAccountId?: string | null;
329
- xUsername?: string | null;
330
- authorization: string;
331
- searchKnowledgeObjectRequest: SearchKnowledgeObjectRequest;
332
- }, opts?: Oazapfts.RequestOpts) {
333
- return oazapfts.ok(oazapfts.fetchJson<{
334
- status: 200;
335
- data: SearchKnowledgeObjectResponse[];
336
- } | {
337
- status: 404;
338
- } | {
339
- status: 422;
340
- data: HttpValidationError;
341
- }>("/v1/search", oazapfts.json({
342
- ...opts,
343
- method: "POST",
344
- body: searchKnowledgeObjectRequest,
345
- headers: oazapfts.mergeHeaders(opts?.headers, {
346
- "x-account-id": xAccountId,
347
- "x-username": xUsername,
348
- authorization
349
- })
350
- })));
351
- }
352
- /**
353
- * Search Cross Account Objects
354
- */
355
- export function searchCrossAccountObjectsV1SearchCrossAccountPost({ xAccountId, xUsername, authorization, searchCrossAccountKnowledgeObjectRequest }: {
356
- xAccountId: string;
357
- xUsername: string;
358
- authorization: string;
359
- searchCrossAccountKnowledgeObjectRequest: SearchCrossAccountKnowledgeObjectRequest;
360
- }, opts?: Oazapfts.RequestOpts) {
361
- return oazapfts.ok(oazapfts.fetchJson<{
362
- status: 200;
363
- data: SearchKnowledgeObjectResponse[];
364
- } | {
365
- status: 404;
366
- } | {
367
- status: 422;
368
- data: HttpValidationError;
369
- }>("/v1/search/cross-account", oazapfts.json({
370
- ...opts,
371
- method: "POST",
372
- body: searchCrossAccountKnowledgeObjectRequest,
373
- headers: oazapfts.mergeHeaders(opts?.headers, {
374
- "x-account-id": xAccountId,
375
- "x-username": xUsername,
376
- authorization
377
- })
378
- })));
379
- }
380
- /**
381
- * Create Ft Knowledge Source
382
- */
383
- export function createFtKnowledgeSourceV1FtKnowledgeSourcesPost({ newKnowledgeSourceRequest }: {
384
- newKnowledgeSourceRequest: NewKnowledgeSourceRequest;
385
- }, opts?: Oazapfts.RequestOpts) {
386
- return oazapfts.ok(oazapfts.fetchJson<{
387
- status: 204;
388
- } | {
389
- status: 404;
390
- } | {
391
- status: 422;
392
- data: HttpValidationError;
393
- }>("/v1/ft-knowledge-sources", oazapfts.json({
394
- ...opts,
395
- method: "POST",
396
- body: newKnowledgeSourceRequest
397
- })));
398
- }
399
- /**
400
- * Delete Ft Knowledge Source
401
- */
402
- export function deleteFtKnowledgeSourceV1FtKnowledgeSourcesSlugDelete({ slug }: {
403
- slug: string;
404
- }, opts?: Oazapfts.RequestOpts) {
405
- return oazapfts.ok(oazapfts.fetchJson<{
406
- status: 204;
407
- } | {
408
- status: 404;
409
- } | {
410
- status: 422;
411
- data: HttpValidationError;
412
- }>(`/v1/ft-knowledge-sources/${encodeURIComponent(slug)}`, {
413
- ...opts,
414
- method: "DELETE"
415
- }));
416
- }
417
- /**
418
- * Workspace Fork
419
- */
420
- export function workspaceForkV1KnowledgeSourcesWorkspaceForkPost({ xAccountId, xUsername, authorization, knowledgeSourcesWorkspaceForkRequest }: {
421
- xAccountId?: string | null;
422
- xUsername?: string | null;
423
- authorization: string;
424
- knowledgeSourcesWorkspaceForkRequest: KnowledgeSourcesWorkspaceForkRequest;
425
- }, opts?: Oazapfts.RequestOpts) {
426
- return oazapfts.ok(oazapfts.fetchJson<{
427
- status: 200;
428
- data: KnowledgeSourcesWorkspaceForkResponse;
429
- } | {
430
- status: 404;
431
- } | {
432
- status: 422;
433
- data: HttpValidationError;
434
- }>("/v1/knowledge-sources/workspace/fork", oazapfts.json({
435
- ...opts,
436
- method: "POST",
437
- body: knowledgeSourcesWorkspaceForkRequest,
438
- headers: oazapfts.mergeHeaders(opts?.headers, {
439
- "x-account-id": xAccountId,
440
- "x-username": xUsername,
441
- authorization
442
- })
443
- })));
444
- }
445
- /**
446
- * Workspace Delete Fork
447
- */
448
- export function workspaceDeleteForkV1KnowledgeSourcesWorkspaceForkDelete({ xAccountId, xUsername, authorization, knowledgeSourcesWorkspaceDeleteRequest }: {
449
- xAccountId?: string | null;
450
- xUsername?: string | null;
451
- authorization: string;
452
- knowledgeSourcesWorkspaceDeleteRequest: KnowledgeSourcesWorkspaceDeleteRequest;
453
- }, opts?: Oazapfts.RequestOpts) {
454
- return oazapfts.ok(oazapfts.fetchJson<{
455
- status: 204;
456
- } | {
457
- status: 404;
458
- } | {
459
- status: 422;
460
- data: HttpValidationError;
461
- }>("/v1/knowledge-sources/workspace/fork", oazapfts.json({
462
- ...opts,
463
- method: "DELETE",
464
- body: knowledgeSourcesWorkspaceDeleteRequest,
465
- headers: oazapfts.mergeHeaders(opts?.headers, {
466
- "x-account-id": xAccountId,
467
- "x-username": xUsername,
468
- authorization
469
- })
470
- })));
471
- }
472
- /**
473
- * Workspace List
474
- */
475
- export function workspaceListV1KnowledgeSourcesWorkspaceListPost({ xAccountId, xUsername, authorization, knowledgeSourcesWorkspaceListRequest }: {
476
- xAccountId?: string | null;
477
- xUsername?: string | null;
478
- authorization: string;
479
- knowledgeSourcesWorkspaceListRequest: KnowledgeSourcesWorkspaceListRequest;
480
- }, opts?: Oazapfts.RequestOpts) {
481
- return oazapfts.ok(oazapfts.fetchJson<{
482
- status: 200;
483
- data: KnowledgeSourceItemResponse[];
484
- } | {
485
- status: 404;
486
- } | {
487
- status: 422;
488
- data: HttpValidationError;
489
- }>("/v1/knowledge-sources/workspace/list", oazapfts.json({
490
- ...opts,
491
- method: "POST",
492
- body: knowledgeSourcesWorkspaceListRequest,
493
- headers: oazapfts.mergeHeaders(opts?.headers, {
494
- "x-account-id": xAccountId,
495
- "x-username": xUsername,
496
- authorization
497
- })
498
- })));
499
- }
500
- /**
501
- * Create Ks
502
- */
503
- export function createKsV1KnowledgeSourcesPost({ xAccountId, xUsername, authorization, newKnowledgeSourceRequest }: {
504
- xAccountId?: string | null;
505
- xUsername?: string | null;
506
- authorization: string;
507
- newKnowledgeSourceRequest: NewKnowledgeSourceRequest;
508
- }, opts?: Oazapfts.RequestOpts) {
509
- return oazapfts.ok(oazapfts.fetchJson<{
510
- status: 201;
511
- data: any;
512
- } | {
513
- status: 404;
514
- } | {
515
- status: 422;
516
- data: HttpErrorResponse;
517
- } | {
518
- status: 500;
519
- data: HttpErrorResponse;
520
- }>("/v1/knowledge-sources", oazapfts.json({
521
- ...opts,
522
- method: "POST",
523
- body: newKnowledgeSourceRequest,
524
- headers: oazapfts.mergeHeaders(opts?.headers, {
525
- "x-account-id": xAccountId,
526
- "x-username": xUsername,
527
- authorization
528
- })
529
- })));
530
- }
531
- /**
532
- * List Ks
533
- */
534
- export function listKsV1KnowledgeSourcesGet({ visibility, order, types, xAccountId, xUsername, authorization }: {
535
- visibility?: VisibilityLevelEnum;
536
- order?: OrderEnum;
537
- types?: KnowledgeSourceTypeEnum[];
538
- xAccountId?: string | null;
539
- xUsername?: string | null;
540
- authorization: string;
541
- }, opts?: Oazapfts.RequestOpts) {
542
- return oazapfts.ok(oazapfts.fetchJson<{
543
- status: 200;
544
- data: KnowledgeSourceItemResponse[];
545
- } | {
546
- status: 404;
547
- } | {
548
- status: 422;
549
- data: HttpValidationError;
550
- }>(`/v1/knowledge-sources${QS.query(QS.explode({
551
- visibility,
552
- order,
553
- types
554
- }))}`, {
555
- ...opts,
556
- headers: oazapfts.mergeHeaders(opts?.headers, {
557
- "x-account-id": xAccountId,
558
- "x-username": xUsername,
559
- authorization
560
- })
561
- }));
562
- }
563
- /**
564
- * Search Ks
565
- */
566
- export function searchKsV1KnowledgeSourcesSearchPost({ xAccountId, xUsername, authorization, knowledgeSourceSearchRequest }: {
567
- xAccountId?: string | null;
568
- xUsername?: string | null;
569
- authorization: string;
570
- knowledgeSourceSearchRequest: KnowledgeSourceSearchRequest;
571
- }, opts?: Oazapfts.RequestOpts) {
572
- return oazapfts.ok(oazapfts.fetchJson<{
573
- status: 200;
574
- data: KnowledgeSourceResponse[];
575
- } | {
576
- status: 404;
577
- } | {
578
- status: 422;
579
- data: HttpValidationError;
580
- }>("/v1/knowledge-sources/search", oazapfts.json({
581
- ...opts,
582
- method: "POST",
583
- body: knowledgeSourceSearchRequest,
584
- headers: oazapfts.mergeHeaders(opts?.headers, {
585
- "x-account-id": xAccountId,
586
- "x-username": xUsername,
587
- authorization
588
- })
589
- })));
590
- }
591
- /**
592
- * Find Ks
593
- */
594
- export function findKsV1KnowledgeSourcesSlugGet({ slug, xAccountId, xUsername, authorization }: {
595
- slug: string;
596
- xAccountId?: string | null;
597
- xUsername?: string | null;
598
- authorization: string;
599
- }, opts?: Oazapfts.RequestOpts) {
600
- return oazapfts.ok(oazapfts.fetchJson<{
601
- status: 200;
602
- data: KnowledgeSourceResponse;
603
- } | {
604
- status: 404;
605
- data: HttpErrorResponse;
606
- } | {
607
- status: 422;
608
- data: HttpValidationError;
609
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, {
610
- ...opts,
611
- headers: oazapfts.mergeHeaders(opts?.headers, {
612
- "x-account-id": xAccountId,
613
- "x-username": xUsername,
614
- authorization
615
- })
616
- }));
617
- }
618
- /**
619
- * Update Ks
620
- */
621
- export function updateKsV1KnowledgeSourcesSlugPatch({ slug, xAccountId, xUsername, authorization, knowledgeSourcePatchesRequest }: {
622
- slug: string;
623
- xAccountId?: string | null;
624
- xUsername?: string | null;
625
- authorization: string;
626
- knowledgeSourcePatchesRequest: KnowledgeSourcePatchesRequest;
627
- }, opts?: Oazapfts.RequestOpts) {
628
- return oazapfts.ok(oazapfts.fetchJson<{
629
- status: 204;
630
- } | {
631
- status: 403;
632
- data: HttpErrorResponse;
633
- } | {
634
- status: 404;
635
- data: HttpErrorResponse;
636
- } | {
637
- status: 422;
638
- data: HttpValidationError;
639
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, oazapfts.json({
640
- ...opts,
641
- method: "PATCH",
642
- body: knowledgeSourcePatchesRequest,
643
- headers: oazapfts.mergeHeaders(opts?.headers, {
644
- "x-account-id": xAccountId,
645
- "x-username": xUsername,
646
- authorization
647
- })
648
- })));
649
- }
650
- /**
651
- * Delete Ks
652
- */
653
- export function deleteKsV1KnowledgeSourcesSlugDelete({ slug, xAccountId, xUsername, authorization }: {
654
- slug: string;
655
- xAccountId: string;
656
- xUsername: string;
657
- authorization: string;
658
- }, opts?: Oazapfts.RequestOpts) {
659
- return oazapfts.ok(oazapfts.fetchJson<{
660
- status: 204;
661
- } | {
662
- status: 403;
663
- data: HttpErrorResponse;
664
- } | {
665
- status: 404;
666
- data: HttpErrorResponse;
667
- } | {
668
- status: 422;
669
- data: HttpValidationError;
670
- } | {
671
- status: 500;
672
- data: HttpErrorResponse;
673
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, {
674
- ...opts,
675
- method: "DELETE",
676
- headers: oazapfts.mergeHeaders(opts?.headers, {
677
- "x-account-id": xAccountId,
678
- "x-username": xUsername,
679
- authorization
680
- })
681
- }));
682
- }
683
- /**
684
- * Exists Ks
685
- */
686
- export function existsKsV1KnowledgeSourcesSlugExistsGet({ slug, xAccountId, xUsername, authorization }: {
687
- slug: string;
688
- xAccountId?: string | null;
689
- xUsername?: string | null;
690
- authorization: string;
691
- }, opts?: Oazapfts.RequestOpts) {
692
- return oazapfts.ok(oazapfts.fetchJson<{
693
- status: 204;
694
- } | {
695
- status: 404;
696
- data: HttpErrorResponse;
697
- } | {
698
- status: 422;
699
- data: HttpValidationError;
700
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/exists`, {
701
- ...opts,
702
- headers: oazapfts.mergeHeaders(opts?.headers, {
703
- "x-account-id": xAccountId,
704
- "x-username": xUsername,
705
- authorization
706
- })
707
- }));
708
- }
709
- /**
710
- * Share Ks
711
- */
712
- export function shareKsV1KnowledgeSourcesSlugSharePost({ slug, xAccountId, xUsername, authorization }: {
713
- slug: string;
714
- xAccountId?: string | null;
715
- xUsername?: string | null;
716
- authorization: string;
717
- }, opts?: Oazapfts.RequestOpts) {
718
- return oazapfts.ok(oazapfts.fetchJson<{
719
- status: 204;
720
- } | {
721
- status: 403;
722
- data: HttpErrorResponse;
723
- } | {
724
- status: 404;
725
- data: HttpErrorResponse;
726
- } | {
727
- status: 422;
728
- data: HttpErrorResponse;
729
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/share`, {
730
- ...opts,
731
- method: "POST",
732
- headers: oazapfts.mergeHeaders(opts?.headers, {
733
- "x-account-id": xAccountId,
734
- "x-username": xUsername,
735
- authorization
736
- })
737
- }));
738
- }
739
- /**
740
- * Add Favorite
741
- */
742
- export function addFavoriteV1KnowledgeSourcesSlugFavoritePost({ slug, xAccountId, xUsername, authorization }: {
743
- slug: string;
744
- xAccountId?: string | null;
745
- xUsername?: string | null;
746
- authorization: string;
747
- }, opts?: Oazapfts.RequestOpts) {
748
- return oazapfts.ok(oazapfts.fetchJson<{
749
- status: 204;
750
- } | {
751
- status: 403;
752
- data: HttpErrorResponse;
753
- } | {
754
- status: 404;
755
- data: HttpErrorResponse;
756
- } | {
757
- status: 422;
758
- data: HttpValidationError;
759
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/favorite`, {
760
- ...opts,
761
- method: "POST",
762
- headers: oazapfts.mergeHeaders(opts?.headers, {
763
- "x-account-id": xAccountId,
764
- "x-username": xUsername,
765
- authorization
766
- })
767
- }));
768
- }
769
- /**
770
- * Delete Favorite
771
- */
772
- export function deleteFavoriteV1KnowledgeSourcesSlugFavoriteDelete({ slug, xAccountId, xUsername, authorization }: {
773
- slug: string;
774
- xAccountId?: string | null;
775
- xUsername?: string | null;
776
- authorization: string;
777
- }, opts?: Oazapfts.RequestOpts) {
778
- return oazapfts.ok(oazapfts.fetchJson<{
779
- status: 204;
780
- } | {
781
- status: 403;
782
- data: HttpErrorResponse;
783
- } | {
784
- status: 404;
785
- data: HttpErrorResponse;
786
- } | {
787
- status: 422;
788
- data: HttpValidationError;
789
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/favorite`, {
790
- ...opts,
791
- method: "DELETE",
792
- headers: oazapfts.mergeHeaders(opts?.headers, {
793
- "x-account-id": xAccountId,
794
- "x-username": xUsername,
795
- authorization
796
- })
797
- }));
798
- }
799
- /**
800
- * Publish Ks
801
- */
802
- export function publishKsV1KnowledgeSourcesSlugPublishPost({ slug, xAccountId, xUsername, authorization, body }: {
803
- slug: string;
804
- xAccountId?: string | null;
805
- xUsername?: string | null;
806
- authorization: string;
807
- body?: KnowledgeSourcesPublishRequest | null;
808
- }, opts?: Oazapfts.RequestOpts) {
809
- return oazapfts.ok(oazapfts.fetchJson<{
810
- status: 204;
811
- } | {
812
- status: 403;
813
- data: HttpErrorResponse;
814
- } | {
815
- status: 404;
816
- data: HttpErrorResponse;
817
- } | {
818
- status: 422;
819
- data: HttpValidationError;
820
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/publish`, oazapfts.json({
821
- ...opts,
822
- method: "POST",
823
- body,
824
- headers: oazapfts.mergeHeaders(opts?.headers, {
825
- "x-account-id": xAccountId,
826
- "x-username": xUsername,
827
- authorization
828
- })
829
- })));
830
- }
831
- /**
832
- * Publish Ks Batch
833
- */
834
- export function publishKsBatchV1KnowledgeSourcesPublishBatchPost({ xAccountId, xUsername, authorization, knowledgeSourcePublishBatchRequest }: {
835
- xAccountId?: string | null;
836
- xUsername?: string | null;
837
- authorization: string;
838
- knowledgeSourcePublishBatchRequest: KnowledgeSourcePublishBatchRequest;
839
- }, opts?: Oazapfts.RequestOpts) {
840
- return oazapfts.ok(oazapfts.fetchJson<{
841
- status: 204;
842
- } | {
843
- status: 403;
844
- data: HttpErrorResponse;
845
- } | {
846
- status: 404;
847
- } | {
848
- status: 422;
849
- data: HttpValidationError;
850
- }>("/v1/knowledge-sources/publish/batch", oazapfts.json({
851
- ...opts,
852
- method: "POST",
853
- body: knowledgeSourcePublishBatchRequest,
854
- headers: oazapfts.mergeHeaders(opts?.headers, {
855
- "x-account-id": xAccountId,
856
- "x-username": xUsername,
857
- authorization
858
- })
859
- })));
860
- }
861
- /**
862
- * Fork Ks
863
- */
864
- export function forkKsV1KnowledgeSourcesSlugForkPost({ slug, xAccountId, xUsername, authorization, forkKnowledgeSourceRequest }: {
865
- slug: string;
866
- xAccountId?: string | null;
867
- xUsername?: string | null;
868
- authorization: string;
869
- forkKnowledgeSourceRequest: ForkKnowledgeSourceRequest;
870
- }, opts?: Oazapfts.RequestOpts) {
871
- return oazapfts.ok(oazapfts.fetchJson<{
872
- status: 204;
873
- } | {
874
- status: 403;
875
- data: HttpErrorResponse;
876
- } | {
877
- status: 404;
878
- data: HttpErrorResponse;
879
- } | {
880
- status: 422;
881
- data: HttpErrorResponse;
882
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/fork`, oazapfts.json({
883
- ...opts,
884
- method: "POST",
885
- body: forkKnowledgeSourceRequest,
886
- headers: oazapfts.mergeHeaders(opts?.headers, {
887
- "x-account-id": xAccountId,
888
- "x-username": xUsername,
889
- authorization
890
- })
891
- })));
892
- }
893
- /**
894
- * List Kos
895
- */
896
- export function listKosV1KnowledgeSourcesKsSlugObjectsGet({ ksSlug, standalone, filePath, contentLimit, xAccountId, xUsername, authorization }: {
897
- ksSlug: string;
898
- standalone?: boolean | null;
899
- filePath?: string[];
900
- contentLimit?: number | null;
901
- xAccountId?: string | null;
902
- xUsername?: string | null;
903
- authorization: string;
904
- }, opts?: Oazapfts.RequestOpts) {
905
- return oazapfts.ok(oazapfts.fetchJson<{
906
- status: 200;
907
- data: KnowledgeObjectResponse[];
908
- } | {
909
- status: 404;
910
- data: HttpErrorResponse;
911
- } | {
912
- status: 422;
913
- data: HttpValidationError;
914
- }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects${QS.query(QS.explode({
915
- standalone,
916
- file_path: filePath,
917
- content_limit: contentLimit
918
- }))}`, {
919
- ...opts,
920
- headers: oazapfts.mergeHeaders(opts?.headers, {
921
- "x-account-id": xAccountId,
922
- "x-username": xUsername,
923
- authorization
924
- })
925
- }));
926
- }
927
- /**
928
- * Reset Kos
929
- */
930
- export function resetKosV1KnowledgeSourcesKsSlugObjectsDelete({ ksSlug, standalone, xAccountId, xUsername, authorization }: {
931
- ksSlug: string;
932
- standalone?: boolean | null;
933
- xAccountId?: string | null;
934
- xUsername?: string | null;
935
- authorization: string;
936
- }, opts?: Oazapfts.RequestOpts) {
937
- return oazapfts.ok(oazapfts.fetchJson<{
938
- status: 204;
939
- } | {
940
- status: 403;
941
- data: HttpErrorResponse;
942
- } | {
943
- status: 404;
944
- data: HttpErrorResponse;
945
- } | {
946
- status: 422;
947
- data: HttpValidationError;
948
- }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects${QS.query(QS.explode({
949
- standalone
950
- }))}`, {
951
- ...opts,
952
- method: "DELETE",
953
- headers: oazapfts.mergeHeaders(opts?.headers, {
954
- "x-account-id": xAccountId,
955
- "x-username": xUsername,
956
- authorization
957
- })
958
- }));
959
- }
960
- /**
961
- * List Kos Checksums
962
- */
963
- export function listKosChecksumsV1KnowledgeSourcesKsSlugObjectsChecksumsGet({ ksSlug, xAccountId, xUsername, authorization }: {
964
- ksSlug: string;
965
- xAccountId?: string | null;
966
- xUsername?: string | null;
967
- authorization: string;
968
- }, opts?: Oazapfts.RequestOpts) {
969
- return oazapfts.ok(oazapfts.fetchJson<{
970
- status: 200;
971
- data: KnowledgeObjectChecksumResponse[];
972
- } | {
973
- status: 404;
974
- data: HttpErrorResponse;
975
- } | {
976
- status: 422;
977
- data: HttpValidationError;
978
- }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects/checksums`, {
979
- ...opts,
980
- headers: oazapfts.mergeHeaders(opts?.headers, {
981
- "x-account-id": xAccountId,
982
- "x-username": xUsername,
983
- authorization
984
- })
985
- }));
986
- }
987
- /**
988
- * Vectorize Snippet Ks
989
- */
990
- export function vectorizeSnippetKsV1KnowledgeSourcesSlugSnippetsPost(opts?: Oazapfts.RequestOpts) {
991
- return oazapfts.ok(oazapfts.fetchJson<{
992
- status: 201;
993
- data: any;
994
- } | {
995
- status: 404;
996
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/snippets`, {
997
- ...opts,
998
- method: "POST"
999
- }));
1000
- }
1001
- /**
1002
- * Vectorize Custom Ks
1003
- */
1004
- export function vectorizeCustomKsV1KnowledgeSourcesSlugCustomPost(opts?: Oazapfts.RequestOpts) {
1005
- return oazapfts.ok(oazapfts.fetchJson<{
1006
- status: 201;
1007
- data: any;
1008
- } | {
1009
- status: 404;
1010
- }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/custom`, {
1011
- ...opts,
1012
- method: "POST"
1013
- }));
1014
- }
1015
- /**
1016
- * Find Ko By Id
1017
- */
1018
- export function findKoByIdV1KnowledgeSourcesKsSlugObjectsKoIdGet({ ksSlug, koId, xAccountId, xUsername, authorization }: {
1019
- ksSlug: string;
1020
- koId: string;
1021
- xAccountId?: string | null;
1022
- xUsername?: string | null;
1023
- authorization: string;
1024
- }, opts?: Oazapfts.RequestOpts) {
1025
- return oazapfts.ok(oazapfts.fetchJson<{
1026
- status: 200;
1027
- data: KnowledgeObjectResponse;
1028
- } | {
1029
- status: 404;
1030
- data: HttpErrorResponse;
1031
- } | {
1032
- status: 422;
1033
- data: HttpValidationError;
1034
- }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects/${encodeURIComponent(koId)}`, {
1035
- ...opts,
1036
- headers: oazapfts.mergeHeaders(opts?.headers, {
1037
- "x-account-id": xAccountId,
1038
- "x-username": xUsername,
1039
- authorization
1040
- })
1041
- }));
1042
- }
1043
- /**
1044
- * Delete Ko By Id
1045
- */
1046
- export function deleteKoByIdV1KnowledgeSourcesKsSlugObjectsKoIdDelete({ ksSlug, koId, xAccountId, xUsername, authorization }: {
1047
- ksSlug: string;
1048
- koId: string;
1049
- xAccountId?: string | null;
1050
- xUsername?: string | null;
1051
- authorization: string;
1052
- }, opts?: Oazapfts.RequestOpts) {
1053
- return oazapfts.ok(oazapfts.fetchJson<{
1054
- status: 204;
1055
- } | {
1056
- status: 403;
1057
- data: HttpErrorResponse;
1058
- } | {
1059
- status: 404;
1060
- data: HttpErrorResponse;
1061
- } | {
1062
- status: 422;
1063
- data: HttpValidationError;
1064
- }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects/${encodeURIComponent(koId)}`, {
1065
- ...opts,
1066
- method: "DELETE",
1067
- headers: oazapfts.mergeHeaders(opts?.headers, {
1068
- "x-account-id": xAccountId,
1069
- "x-username": xUsername,
1070
- authorization
1071
- })
1072
- }));
1073
- }
1074
- /**
1075
- * Get Last Message
1076
- */
1077
- export function getLastMessageV1KnowledgeSourcesKsSlugLastMessageGet({ ksSlug, xAccountId, xUsername, authorization }: {
1078
- ksSlug: string;
1079
- xAccountId: string;
1080
- xUsername?: string | null;
1081
- authorization: string;
1082
- }, opts?: Oazapfts.RequestOpts) {
1083
- return oazapfts.ok(oazapfts.fetchJson<{
1084
- status: 200;
1085
- data: KnowledgeSourceLastMessageResponse[];
1086
- } | {
1087
- status: 404;
1088
- data: HttpErrorResponse;
1089
- } | {
1090
- status: 422;
1091
- data: HttpValidationError;
1092
- }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/last-message`, {
1093
- ...opts,
1094
- headers: oazapfts.mergeHeaders(opts?.headers, {
1095
- "x-account-id": xAccountId,
1096
- "x-username": xUsername,
1097
- authorization
1098
- })
1099
- }));
1100
- }
1101
- /**
1102
- * Get Indexed Files
1103
- */
1104
- export function getIndexedFilesV1KnowledgeSourcesKsSlugFilesGet({ ksSlug, xAccountId, xUsername, authorization }: {
1105
- ksSlug: string;
1106
- xAccountId?: string | null;
1107
- xUsername?: string | null;
1108
- authorization: string;
1109
- }, opts?: Oazapfts.RequestOpts) {
1110
- return oazapfts.ok(oazapfts.fetchJson<{
1111
- status: 200;
1112
- data: KnowledgeSourceFilesIngestedResponse[];
1113
- } | {
1114
- status: 404;
1115
- data: HttpErrorResponse;
1116
- } | {
1117
- status: 422;
1118
- data: HttpValidationError;
1119
- }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/files`, {
1120
- ...opts,
1121
- headers: oazapfts.mergeHeaders(opts?.headers, {
1122
- "x-account-id": xAccountId,
1123
- "x-username": xUsername,
1124
- authorization
1125
- })
1126
- }));
1127
- }
1128
- /**
1129
- * Delete Indexed Files
1130
- */
1131
- export function deleteIndexedFilesV1KnowledgeSourcesKsSlugFilesDelete({ ksSlug, xAccountId, xUsername, authorization, deleteIndexedFilesRequest }: {
1132
- ksSlug: string;
1133
- xAccountId?: string | null;
1134
- xUsername?: string | null;
1135
- authorization: string;
1136
- deleteIndexedFilesRequest: DeleteIndexedFilesRequest;
1137
- }, opts?: Oazapfts.RequestOpts) {
1138
- return oazapfts.ok(oazapfts.fetchJson<{
1139
- status: 204;
1140
- } | {
1141
- status: 403;
1142
- data: HttpErrorResponse;
1143
- } | {
1144
- status: 404;
1145
- data: HttpErrorResponse;
1146
- } | {
1147
- status: 422;
1148
- data: HttpValidationError;
1149
- }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/files`, oazapfts.json({
1150
- ...opts,
1151
- method: "DELETE",
1152
- body: deleteIndexedFilesRequest,
1153
- headers: oazapfts.mergeHeaders(opts?.headers, {
1154
- "x-account-id": xAccountId,
1155
- "x-username": xUsername,
1156
- authorization
1157
- })
1158
- })));
1159
- }
1160
- /**
1161
- * Get Upload Form
1162
- */
1163
- export function getUploadFormV1FileUploadFormPost({ xAccountId, xUsername, authorization, newFileUploadRequest }: {
1164
- xAccountId?: string | null;
1165
- xUsername?: string | null;
1166
- authorization: string;
1167
- newFileUploadRequest: NewFileUploadRequest;
1168
- }, opts?: Oazapfts.RequestOpts) {
1169
- return oazapfts.ok(oazapfts.fetchJson<{
1170
- status: 201;
1171
- data: NewFileUploadFormResponse;
1172
- } | {
1173
- status: 404;
1174
- } | {
1175
- status: 422;
1176
- data: HttpValidationError;
1177
- }>("/v1/file-upload/form", oazapfts.json({
1178
- ...opts,
1179
- method: "POST",
1180
- body: newFileUploadRequest,
1181
- headers: oazapfts.mergeHeaders(opts?.headers, {
1182
- "x-account-id": xAccountId,
1183
- "x-username": xUsername,
1184
- authorization
1185
- })
1186
- })));
1187
- }
1188
- /**
1189
- * Get File Upload Status
1190
- */
1191
- export function getFileUploadStatusV1FileUploadFileUploadIdGet({ fileUploadId, xAccountId, xUsername, authorization }: {
1192
- fileUploadId: string;
1193
- xAccountId?: string | null;
1194
- xUsername?: string | null;
1195
- authorization: string;
1196
- }, opts?: Oazapfts.RequestOpts) {
1197
- return oazapfts.ok(oazapfts.fetchJson<{
1198
- status: 200;
1199
- data: FileUploadStatusResponse;
1200
- } | {
1201
- status: 404;
1202
- } | {
1203
- status: 422;
1204
- data: HttpValidationError;
1205
- }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}`, {
1206
- ...opts,
1207
- headers: oazapfts.mergeHeaders(opts?.headers, {
1208
- "x-account-id": xAccountId,
1209
- "x-username": xUsername,
1210
- authorization
1211
- })
1212
- }));
1213
- }
1214
- /**
1215
- * Save Chunked Files Deprecated
1216
- */
1217
- export function saveChunkedFilesDeprecatedV1FileUploadFileUploadIdPost({ fileUploadId, xAccountId, xUsername, authorization, fileUploadSaveChunksRequest }: {
1218
- fileUploadId: string;
1219
- xAccountId?: string | null;
1220
- xUsername?: string | null;
1221
- authorization: string;
1222
- fileUploadSaveChunksRequest: FileUploadSaveChunksRequest;
1223
- }, opts?: Oazapfts.RequestOpts) {
1224
- return oazapfts.ok(oazapfts.fetchJson<{
1225
- status: 202;
1226
- data: any;
1227
- } | {
1228
- status: 404;
1229
- } | {
1230
- status: 422;
1231
- data: HttpValidationError;
1232
- }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}`, oazapfts.json({
1233
- ...opts,
1234
- method: "POST",
1235
- body: fileUploadSaveChunksRequest,
1236
- headers: oazapfts.mergeHeaders(opts?.headers, {
1237
- "x-account-id": xAccountId,
1238
- "x-username": xUsername,
1239
- authorization
1240
- })
1241
- })));
1242
- }
1243
- /**
1244
- * Internal Patch File Upload Status
1245
- */
1246
- export function internalPatchFileUploadStatusV1FileUploadFileUploadIdPatch({ fileUploadId, xAccountId, xUsername, authorization, fileUploadUpdateRequest }: {
1247
- fileUploadId: string;
1248
- xAccountId: string;
1249
- xUsername?: string | null;
1250
- authorization: string;
1251
- fileUploadUpdateRequest: FileUploadUpdateRequest;
1252
- }, opts?: Oazapfts.RequestOpts) {
1253
- return oazapfts.ok(oazapfts.fetchJson<{
1254
- status: 200;
1255
- data: FileUploadStatusResponse;
1256
- } | {
1257
- status: 404;
1258
- } | {
1259
- status: 422;
1260
- data: HttpValidationError;
1261
- }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}`, oazapfts.json({
1262
- ...opts,
1263
- method: "PATCH",
1264
- body: fileUploadUpdateRequest,
1265
- headers: oazapfts.mergeHeaders(opts?.headers, {
1266
- "x-account-id": xAccountId,
1267
- "x-username": xUsername,
1268
- authorization
1269
- })
1270
- })));
1271
- }
1272
- /**
1273
- * Save Chunked Files
1274
- */
1275
- export function saveChunkedFilesV1FileUploadFileUploadIdKnowledgeObjectsPost({ fileUploadId, xAccountId, xUsername, authorization, fileUploadSaveChunksRequest }: {
1276
- fileUploadId: string;
1277
- xAccountId?: string | null;
1278
- xUsername?: string | null;
1279
- authorization: string;
1280
- fileUploadSaveChunksRequest: FileUploadSaveChunksRequest;
1281
- }, opts?: Oazapfts.RequestOpts) {
1282
- return oazapfts.ok(oazapfts.fetchJson<{
1283
- status: 202;
1284
- data: any;
1285
- } | {
1286
- status: 404;
1287
- } | {
1288
- status: 422;
1289
- data: HttpValidationError;
1290
- }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}/knowledge-objects`, oazapfts.json({
1291
- ...opts,
1292
- method: "POST",
1293
- body: fileUploadSaveChunksRequest,
1294
- headers: oazapfts.mergeHeaders(opts?.headers, {
1295
- "x-account-id": xAccountId,
1296
- "x-username": xUsername,
1297
- authorization
1298
- })
1299
- })));
1300
- }
1301
- /**
1302
- * Split Uploaded File
1303
- */
1304
- export function splitUploadedFileV1FileUploadFileUploadIdSplitPost({ fileUploadId, xAccountId, xUsername, authorization, fileSplitRequest }: {
1305
- fileUploadId: string;
1306
- xAccountId?: string | null;
1307
- xUsername?: string | null;
1308
- authorization: string;
1309
- fileSplitRequest: FileSplitRequest;
1310
- }, opts?: Oazapfts.RequestOpts) {
1311
- return oazapfts.ok(oazapfts.fetchJson<{
1312
- status: 202;
1313
- data: any;
1314
- } | {
1315
- status: 404;
1316
- } | {
1317
- status: 422;
1318
- data: HttpValidationError;
1319
- }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}/split`, oazapfts.json({
1320
- ...opts,
1321
- method: "POST",
1322
- body: fileSplitRequest,
1323
- headers: oazapfts.mergeHeaders(opts?.headers, {
1324
- "x-account-id": xAccountId,
1325
- "x-username": xUsername,
1326
- authorization
1327
- })
1328
- })));
1329
- }
1330
- /**
1331
- * Split Uploaded File Preview
1332
- */
1333
- export function splitUploadedFilePreviewV1FileUploadFileUploadIdSplitPreviewSplitStrategyGet({ fileUploadId, splitStrategy, xAccountId, xUsername, authorization }: {
1334
- fileUploadId: string;
1335
- splitStrategy: FileSplitStrategy;
1336
- xAccountId?: string | null;
1337
- xUsername?: string | null;
1338
- authorization: string;
1339
- }, opts?: Oazapfts.RequestOpts) {
1340
- return oazapfts.ok(oazapfts.fetchJson<{
1341
- status: 200;
1342
- data: any;
1343
- } | {
1344
- status: 404;
1345
- } | {
1346
- status: 422;
1347
- data: HttpValidationError;
1348
- }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}/split/preview/${encodeURIComponent(splitStrategy)}`, {
1349
- ...opts,
1350
- headers: oazapfts.mergeHeaders(opts?.headers, {
1351
- "x-account-id": xAccountId,
1352
- "x-username": xUsername,
1353
- authorization
1354
- })
1355
- }));
1356
- }
1357
- /**
1358
- * Internal Get File Upload Metadata
1359
- */
1360
- export function internalGetFileUploadMetadataV1FileUploadFileUploadIdMetadataGet({ fileUploadId, xAccountId, xUsername, authorization }: {
1361
- fileUploadId: string;
1362
- xAccountId: string;
1363
- xUsername?: string | null;
1364
- authorization: string;
1365
- }, opts?: Oazapfts.RequestOpts) {
1366
- return oazapfts.ok(oazapfts.fetchJson<{
1367
- status: 200;
1368
- data: FileMetadataResponse;
1369
- } | {
1370
- status: 404;
1371
- } | {
1372
- status: 422;
1373
- data: HttpValidationError;
1374
- }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}/metadata`, {
1375
- ...opts,
1376
- headers: oazapfts.mergeHeaders(opts?.headers, {
1377
- "x-account-id": xAccountId,
1378
- "x-username": xUsername,
1379
- authorization
1380
- })
1381
- }));
1382
- }
1383
- /**
1384
- * Get Presigned Download Url
1385
- */
1386
- export function getPresignedDownloadUrlV1FileUploadPresignedUrlGet({ id, expiration, xAccountId, xUsername, authorization }: {
1387
- id?: string[];
1388
- expiration?: number;
1389
- xAccountId?: string | null;
1390
- xUsername?: string | null;
1391
- authorization: string;
1392
- }, opts?: Oazapfts.RequestOpts) {
1393
- return oazapfts.ok(oazapfts.fetchJson<{
1394
- status: 200;
1395
- data: PresignedUrlsDto;
1396
- } | {
1397
- status: 404;
1398
- } | {
1399
- status: 422;
1400
- data: HttpValidationError;
1401
- }>(`/v1/file-upload/presigned/url${QS.query(QS.explode({
1402
- id,
1403
- expiration
1404
- }))}`, {
1405
- ...opts,
1406
- headers: oazapfts.mergeHeaders(opts?.headers, {
1407
- "x-account-id": xAccountId,
1408
- "x-username": xUsername,
1409
- authorization
1410
- })
1411
- }));
1412
- }
1413
- /**
1414
- * Delete Bucket Object
1415
- */
1416
- export function deleteBucketObjectV1FileUploadUploadIdDelete({ uploadId, xAccountId, xUsername, authorization }: {
1417
- uploadId: string;
1418
- xAccountId?: string | null;
1419
- xUsername?: string | null;
1420
- authorization: string;
1421
- }, opts?: Oazapfts.RequestOpts) {
1422
- return oazapfts.ok(oazapfts.fetchJson<{
1423
- status: 204;
1424
- } | {
1425
- status: 404;
1426
- } | {
1427
- status: 422;
1428
- data: HttpValidationError;
1429
- }>(`/v1/file-upload/${encodeURIComponent(uploadId)}`, {
1430
- ...opts,
1431
- method: "DELETE",
1432
- headers: oazapfts.mergeHeaders(opts?.headers, {
1433
- "x-account-id": xAccountId,
1434
- "x-username": xUsername,
1435
- authorization
1436
- })
1437
- }));
1438
- }
1439
- /**
1440
- * Internal Get Current Embedding Usage
1441
- */
1442
- export function internalGetCurrentEmbeddingUsageV1TokenUsageEmbeddingGet({ xAccountId, xUsername, authorization }: {
1443
- xAccountId: string;
1444
- xUsername?: string | null;
1445
- authorization: string;
1446
- }, opts?: Oazapfts.RequestOpts) {
1447
- return oazapfts.ok(oazapfts.fetchJson<{
1448
- status: 200;
1449
- data: AccountEmbeddingTokenUsage;
1450
- } | {
1451
- status: 404;
1452
- } | {
1453
- status: 422;
1454
- data: HttpValidationError;
1455
- }>("/v1/token-usage/embedding", {
1456
- ...opts,
1457
- headers: oazapfts.mergeHeaders(opts?.headers, {
1458
- "x-account-id": xAccountId,
1459
- "x-username": xUsername,
1460
- authorization
1461
- })
1462
- }));
1463
- }
1464
- /**
1465
- * Internal Consume Token Usage
1466
- */
1467
- export function internalConsumeTokenUsageV1TokenUsageConsumePost({ xAccountId, xUsername, authorization, consumeTokenRequest }: {
1468
- xAccountId: string;
1469
- xUsername: string;
1470
- authorization: string;
1471
- consumeTokenRequest: ConsumeTokenRequest;
1472
- }, opts?: Oazapfts.RequestOpts) {
1473
- return oazapfts.ok(oazapfts.fetchJson<{
1474
- status: 204;
1475
- } | {
1476
- status: 404;
1477
- } | {
1478
- status: 422;
1479
- data: HttpValidationError;
1480
- }>("/v1/token-usage/consume", oazapfts.json({
1481
- ...opts,
1482
- method: "POST",
1483
- body: consumeTokenRequest,
1484
- headers: oazapfts.mergeHeaders(opts?.headers, {
1485
- "x-account-id": xAccountId,
1486
- "x-username": xUsername,
1487
- authorization
1488
- })
1489
- })));
1490
- }
1491
- /**
1492
- * Get Upload Form V2
1493
- */
1494
- export function getUploadFormV2V2FileUploadFormPost({ xAccountId, xUsername, authorization, newFileUploadRequest }: {
1495
- xAccountId?: string | null;
1496
- xUsername?: string | null;
1497
- authorization: string;
1498
- newFileUploadRequest: NewFileUploadRequest;
1499
- }, opts?: Oazapfts.RequestOpts) {
1500
- return oazapfts.ok(oazapfts.fetchJson<{
1501
- status: 201;
1502
- data: NewFileUploadFormResponse;
1503
- } | {
1504
- status: 404;
1505
- } | {
1506
- status: 422;
1507
- data: HttpValidationError;
1508
- }>("/v2/file-upload/form", oazapfts.json({
1509
- ...opts,
1510
- method: "POST",
1511
- body: newFileUploadRequest,
1512
- headers: oazapfts.mergeHeaders(opts?.headers, {
1513
- "x-account-id": xAccountId,
1514
- "x-username": xUsername,
1515
- authorization
1516
- })
1517
- })));
1518
- }
1519
- /**
1520
- * Internal Get Llm Config
1521
- */
1522
- export function internalGetLlmConfigV1AccountsLlmConfigGet({ xAccountId, xUsername, authorization }: {
1523
- xAccountId: string;
1524
- xUsername?: string | null;
1525
- authorization: string;
1526
- }, opts?: Oazapfts.RequestOpts) {
1527
- return oazapfts.ok(oazapfts.fetchJson<{
1528
- status: 200;
1529
- data: AccountLlmConfigResponse;
1530
- } | {
1531
- status: 404;
1532
- } | {
1533
- status: 422;
1534
- data: HttpValidationError;
1535
- }>("/v1/accounts/llm-config", {
1536
- ...opts,
1537
- headers: oazapfts.mergeHeaders(opts?.headers, {
1538
- "x-account-id": xAccountId,
1539
- "x-username": xUsername,
1540
- authorization
1541
- })
1542
- }));
1543
- }
1544
- /**
1545
- * Internal Get Or Create Knowledge Group
1546
- */
1547
- export function internalGetOrCreateKnowledgeGroupV1KnowledgeGroupsGetOrCreatePut({ xAccountId, xUsername, authorization, getOrCreateKnowledgeGroupRequest }: {
1548
- xAccountId: string;
1549
- xUsername?: string | null;
1550
- authorization: string;
1551
- getOrCreateKnowledgeGroupRequest: GetOrCreateKnowledgeGroupRequest;
1552
- }, opts?: Oazapfts.RequestOpts) {
1553
- return oazapfts.ok(oazapfts.fetchJson<{
1554
- status: 200;
1555
- data: KnowledgeGroupResponse;
1556
- } | {
1557
- status: 404;
1558
- } | {
1559
- status: 422;
1560
- data: HttpValidationError;
1561
- }>("/v1/knowledge-groups/get-or-create", oazapfts.json({
1562
- ...opts,
1563
- method: "PUT",
1564
- body: getOrCreateKnowledgeGroupRequest,
1565
- headers: oazapfts.mergeHeaders(opts?.headers, {
1566
- "x-account-id": xAccountId,
1567
- "x-username": xUsername,
1568
- authorization
1569
- })
1570
- })));
1571
- }
1572
- /**
1573
- * Internal Delete By Not Checksums
1574
- */
1575
- export function internalDeleteByNotChecksumsV1KnowledgeGroupsGroupIdObjectsDelete({ groupId, xAccountId, xUsername, authorization, deleteGroupObjectsRequests }: {
1576
- groupId: string;
1577
- xAccountId: string;
1578
- xUsername?: string | null;
1579
- authorization: string;
1580
- deleteGroupObjectsRequests: DeleteGroupObjectsRequests;
1581
- }, opts?: Oazapfts.RequestOpts) {
1582
- return oazapfts.ok(oazapfts.fetchJson<{
1583
- status: 200;
1584
- data: DeletedCountResponse;
1585
- } | {
1586
- status: 404;
1587
- } | {
1588
- status: 422;
1589
- data: HttpValidationError;
1590
- }>(`/v1/knowledge-groups/${encodeURIComponent(groupId)}/objects`, oazapfts.json({
1591
- ...opts,
1592
- method: "DELETE",
1593
- body: deleteGroupObjectsRequests,
1594
- headers: oazapfts.mergeHeaders(opts?.headers, {
1595
- "x-account-id": xAccountId,
1596
- "x-username": xUsername,
1597
- authorization
1598
- })
1599
- })));
1600
- }
1601
- /**
1602
- * Internal Update Knowledge Group
1603
- */
1604
- export function internalUpdateKnowledgeGroupV1KnowledgeGroupsGroupIdPatch({ groupId, xAccountId, xUsername, authorization, updateKnowledgeGroupRequest }: {
1605
- groupId: string;
1606
- xAccountId: string;
1607
- xUsername?: string | null;
1608
- authorization: string;
1609
- updateKnowledgeGroupRequest: UpdateKnowledgeGroupRequest;
1610
- }, opts?: Oazapfts.RequestOpts) {
1611
- return oazapfts.ok(oazapfts.fetchJson<{
1612
- status: 200;
1613
- data: any;
1614
- } | {
1615
- status: 404;
1616
- } | {
1617
- status: 422;
1618
- data: HttpValidationError;
1619
- }>(`/v1/knowledge-groups/${encodeURIComponent(groupId)}`, oazapfts.json({
1620
- ...opts,
1621
- method: "PATCH",
1622
- body: updateKnowledgeGroupRequest,
1623
- headers: oazapfts.mergeHeaders(opts?.headers, {
1624
- "x-account-id": xAccountId,
1625
- "x-username": xUsername,
1626
- authorization
1627
- })
1628
- })));
1629
- }
1630
- /**
1631
- * Internal Create Knowledge Objects Batch
1632
- */
1633
- export function internalCreateKnowledgeObjectsBatchV1KnowledgeObjectsBatchPost({ xAccountId, xUsername, authorization, body }: {
1634
- xAccountId: string;
1635
- xUsername?: string | null;
1636
- authorization: string;
1637
- body: CreateKnowledgeObjectsBatchRequest[];
1638
- }, opts?: Oazapfts.RequestOpts) {
1639
- return oazapfts.ok(oazapfts.fetchJson<{
1640
- status: 200;
1641
- data: any;
1642
- } | {
1643
- status: 404;
1644
- } | {
1645
- status: 422;
1646
- data: HttpValidationError;
1647
- }>("/v1/knowledge-objects/batch", oazapfts.json({
1648
- ...opts,
1649
- method: "POST",
1650
- body,
1651
- headers: oazapfts.mergeHeaders(opts?.headers, {
1652
- "x-account-id": xAccountId,
1653
- "x-username": xUsername,
1654
- authorization
1655
- })
1656
- })));
1657
- }
1
+ /**
2
+ * FastAPI
3
+ * 0.1.0
4
+ * DO NOT MODIFY - This file has been generated using oazapfts.
5
+ * See https://www.npmjs.com/package/oazapfts
6
+ */
7
+ import * as Oazapfts from "@oazapfts/runtime";
8
+ import * as QS from "@oazapfts/runtime/query";
9
+ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
+ headers: {},
11
+ baseUrl: "/",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {};
15
+ export type SearchPreProcessing = "multi_query";
16
+ export type SearchPostProcessing = "reranker";
17
+ export type SearchStrategy = "cosine";
18
+ export type SearchMethod = "similarity";
19
+ export type SearchKnowledgeObjectRequest = {
20
+ query: string;
21
+ knowledge_source_ids: string[];
22
+ limit?: number;
23
+ threshold?: number | null;
24
+ pre_processing?: SearchPreProcessing | null;
25
+ post_processing?: SearchPostProcessing | null;
26
+ strategy?: SearchStrategy;
27
+ method?: SearchMethod;
28
+ };
29
+ export type SearchKnowledgeObjectResponse = {
30
+ id: string;
31
+ score: number;
32
+ display_content: string;
33
+ prompt_content: string;
34
+ file_path: string | null;
35
+ ks_id: string;
36
+ ks_name: string;
37
+ ks_slug: string;
38
+ ks_type: string;
39
+ };
40
+ export type ValidationError = {
41
+ loc: (string | number)[];
42
+ msg: string;
43
+ "type": string;
44
+ };
45
+ export type HttpValidationError = {
46
+ detail?: ValidationError[];
47
+ };
48
+ export type SearchCrossAccountKnowledgeObjectRequest = {
49
+ query: string;
50
+ limit?: number;
51
+ threshold?: number | null;
52
+ pre_processing?: SearchPreProcessing | null;
53
+ post_processing?: SearchPostProcessing | null;
54
+ strategy?: SearchStrategy;
55
+ method?: SearchMethod;
56
+ };
57
+ export type KnowledgeSourceTypeEnum = "snippet" | "api" | "event" | "custom" | "project_file" | "memory";
58
+ export type NewKnowledgeSourceRequest = {
59
+ slug: string;
60
+ name: string;
61
+ description: string;
62
+ "type": KnowledgeSourceTypeEnum;
63
+ };
64
+ export type KnowledgeSourcesWorkspaceForkRequest = {
65
+ ids: string[];
66
+ member_id: string;
67
+ };
68
+ export type VisibilityLevelEnum = "account" | "personal" | "shared" | "workspace" | "favorite";
69
+ export type KnowledgeSourceResponse = {
70
+ id: string;
71
+ slug: string;
72
+ name: string;
73
+ description: string;
74
+ "type": KnowledgeSourceTypeEnum;
75
+ creator: string | null;
76
+ "default": boolean;
77
+ visibility_level: VisibilityLevelEnum;
78
+ model_name: string;
79
+ use_only: boolean;
80
+ };
81
+ export type KnowledgeSourcesWorkspaceForkResponse = {
82
+ list_ks: KnowledgeSourceResponse[];
83
+ ks_ids_account: string[];
84
+ error_ids: string[];
85
+ };
86
+ export type KnowledgeSourcesWorkspaceDeleteRequest = {
87
+ ids: string[];
88
+ };
89
+ export type KnowledgeSourcesWorkspaceListRequest = {
90
+ ids: string[];
91
+ name?: string | null;
92
+ };
93
+ export type KnowledgeSourceItemResponse = {
94
+ id: string;
95
+ slug: string;
96
+ name: string;
97
+ description: string;
98
+ "type": KnowledgeSourceTypeEnum;
99
+ creator: string | null;
100
+ "default": boolean;
101
+ visibility_level: VisibilityLevelEnum;
102
+ object_count: number;
103
+ use_only: boolean;
104
+ };
105
+ export type ExceptionType = "DATAINTEGRATION_1000_INVALID_JWT" | "DATAINTEGRATION_1001_DECODE_JWT_ERROR" | "DATAINTEGRATION_1002_KNOWLEDGE_SOURCE_DOES_NOT_EXISTS" | "DATAINTEGRATION_1003_KNOWLEDGE_SOURCE_WRONG_TYPE" | "DATAINTEGRATION_1004_UNSUPPORTED_KNOWLEDGE_SOURCE_TYPE_FOR_UPLOAD" | "DATAINTEGRATION_1005_KNOWLEDGE_OBJECT_NOT_FOUND" | "DATAINTEGRATION_1006_UNSUPPORTED_FILE_TYPE" | "DATAINTEGRATION_1007_KNOWLEDGE_SOURCE_SLUG_ALREADY_EXISTS" | "DATAINTEGRATION_1008_KNOWLEDGE_SOURCE_NOT_FOUND" | "DATAINTEGRATION_1009_KNOWLEDGE_SOURCE_CANNOT_BE_ASSOCIATED" | "DATAINTEGRATION_1010_KNOWLEDGE_SOURCE_NOT_ACCOUNT_VISIBLE" | "DATAINTEGRATION_1011_ACCOUNT_SETTINGS_NOT_FOUND" | "DATAINTEGRATION_1012_SECRET_NOT_FOUND" | "DATAINTEGRATION_1013_STRATEGY_NOT_FOUND" | "DATAINTEGRATION_1014_EMBEDDING_INTEGRATION_ERROR" | "DATAINTEGRATION_1015_KNOWLEDGE_OBJECT_UNEXPECTED_ERROR" | "DATAINTEGRATION_1016_FILE_UPLOAD_DOES_NOT_EXISTS" | "DATAINTEGRATION_1017_INVALID_VISIBILITY_CHANGE" | "DATAINTEGRATION_1018_TOKENS_USAGE_LIMIT_REACHED" | "DATAINTEGRATION_1019_KNOWLEDGE_SOURCE_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1020_FILE_UPLOAD_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1021_FILE_UPLOAD_INDEXED_OR_NOT_SPLITTED" | "DATAINTEGRATION_1022_KNOWLEDGE_GROUP_NOT_FOUND" | "DATAINTEGRATION_1023_FILE_UPLOAD_UNSUPPORTED_TARGET" | "DATAINTEGRATION_2000_LLM_INTEGRATION_ERROR" | "DATAINTEGRATION_2001_LLM_RATE_LIMIT_ERROR" | "DATAINTEGRATION_2002_LLM_PROMPT_TOO_LARGE_ERROR" | "DATAINTEGRATION_2003_LLM_FILE_TOO_LARGE_ERROR" | "DATAINTEGRATION_3000_FEATURE_DISABLED_ERROR" | "DATAINTEGRATION_5000_UNEXPECTED_ERROR" | "DATAINTEGRATION_6000_FORBIDDEN" | "DATAINTEGRATION_8001_ACCOUNT_API_ERROR" | "DATAINTEGRATION_4001_FAVORITE_ALREADY_EXISTS" | "DATAINTEGRATION_4002_FAVORITE_NOT_FOUND";
106
+ export type HttpErrorResponse = {
107
+ "type"?: string;
108
+ status: string;
109
+ code: ExceptionType;
110
+ details: string;
111
+ value?: string | null;
112
+ field?: string | null;
113
+ };
114
+ export type OrderEnum = "a-to-z" | "z-to-a" | "oldest-first" | "newest-first";
115
+ export type KnowledgeSourceSearchRequest = {
116
+ ids: string[];
117
+ };
118
+ export type KnowledgeSourcePatchesRequest = {
119
+ name: string;
120
+ description: string;
121
+ use_only?: boolean | null;
122
+ };
123
+ export type KnowledgeSourcesPublishRequest = {
124
+ use_only?: boolean;
125
+ };
126
+ export type KnowledgeSourcePublishBatchRequest = {
127
+ ids: string[];
128
+ };
129
+ export type ForkKnowledgeSourceRequest = {
130
+ slug: string;
131
+ name: string;
132
+ description: string;
133
+ };
134
+ export type KnowledgeObjectResponse = {
135
+ content: string;
136
+ id: string;
137
+ standalone: boolean;
138
+ updated: string;
139
+ checksum: string;
140
+ file_path: string | null;
141
+ programming_language: string | null;
142
+ use_case: string | null;
143
+ attributes: {
144
+ [key: string]: any;
145
+ } | null;
146
+ };
147
+ export type KnowledgeObjectChecksumResponse = {
148
+ checksum: string;
149
+ };
150
+ export type KnowledgeSourceLastMessageResponse = {
151
+ id: string;
152
+ prompt_content: string;
153
+ ks_id: string;
154
+ };
155
+ export type KnowledgeSourceFilesIngestedResponse = {
156
+ id: string;
157
+ path: string;
158
+ checksum: string;
159
+ status?: string;
160
+ created_at: string;
161
+ updated_at: string;
162
+ count_kos: number;
163
+ };
164
+ export type DeleteIndexedFilesRequest = {
165
+ paths: string[];
166
+ };
167
+ export type FileUploadType = "PROJECT" | "KNOWLEDGE_SOURCE" | "CONTEXT" | "TOOLKIT";
168
+ export type FileUploadIndexType = "RELEVANT" | "FULL_INDEX";
169
+ export type NewFileUploadRequest = {
170
+ file_name: string;
171
+ target_id?: string | null;
172
+ target_type: FileUploadType;
173
+ expiration?: number;
174
+ index_type?: FileUploadIndexType | null;
175
+ };
176
+ export type NewFileUploadFormResponse = {
177
+ id: string;
178
+ url: string;
179
+ form: {
180
+ [key: string]: string;
181
+ };
182
+ };
183
+ export type FileUploadStatus = "NEW" | "PROCESSING" | "INDEXED" | "SPLITTED" | "EXPIRED" | "ERROR" | "SPLIT_ERROR" | "INDEXED_BUT_CLEANUP_FAILED";
184
+ export type SummaryPartResponse = {
185
+ added: number;
186
+ preserved: number;
187
+ removed: number;
188
+ errors: {
189
+ [key: string]: string;
190
+ };
191
+ };
192
+ export type FileUploadStatusResponse = {
193
+ id: string;
194
+ file_name: string;
195
+ target_id: string;
196
+ target_type: FileUploadType;
197
+ status: FileUploadStatus;
198
+ error_description: string | null;
199
+ summary: SummaryPartResponse | null;
200
+ };
201
+ export type FileSplitStrategy = "NONE" | "LINES_QUANTITY" | "TOKENS_QUANTITY" | "CHARACTERS_QUANTITY" | "SYNTACTIC" | "ENDPOINT";
202
+ export type FileUploadSaveChunksRequest = {
203
+ split_strategy: FileSplitStrategy;
204
+ split_overlap?: number | null;
205
+ split_quantity?: number | null;
206
+ };
207
+ export type SyncResultDto = {
208
+ added: number;
209
+ preserved: number;
210
+ removed: number;
211
+ errors: {
212
+ [key: string]: string;
213
+ };
214
+ };
215
+ export type FileUploadUpdateRequest = {
216
+ status: FileUploadStatus;
217
+ summary?: SyncResultDto | null;
218
+ error_description?: string | null;
219
+ };
220
+ export type FileSplitRequest = {
221
+ split_overlap?: number | null;
222
+ split_quantity?: number | null;
223
+ split_strategy: FileSplitStrategy;
224
+ embed_after_split?: boolean;
225
+ max_split_preview?: number;
226
+ };
227
+ export type FileMetadataResponse = {
228
+ id: string;
229
+ file_path: string;
230
+ bucket_name: string;
231
+ target_slug: string;
232
+ target_type: FileUploadType;
233
+ status: FileUploadStatus;
234
+ error_description: string | null;
235
+ user_id_headers: string;
236
+ };
237
+ export type FileUploadException = {
238
+ "type": ExceptionType;
239
+ message: string;
240
+ value?: string | null;
241
+ field?: string | null;
242
+ };
243
+ export type PresignedUrlsDto = {
244
+ presigned_urls: string[] | null;
245
+ invalid: FileUploadException | null;
246
+ };
247
+ export type AccountEmbeddingTokenUsage = {
248
+ current_used: number;
249
+ max_embedding_tokens: number;
250
+ };
251
+ export type ConsumeTokenRequest = {
252
+ token_quantity: number;
253
+ };
254
+ export type AccountLlmConfigResponse = {
255
+ "type": string | null;
256
+ embedding_max_chunk_size: number;
257
+ };
258
+ export type GetOrCreateKnowledgeGroupRequest = {
259
+ knowledge_source_id: string;
260
+ file_path: string;
261
+ };
262
+ export type KnowledgeGroupResponse = {
263
+ id: string;
264
+ knowledge_source_id: string;
265
+ path: string;
266
+ parent: string | null;
267
+ checksum: string;
268
+ created: string;
269
+ updated: string;
270
+ last_modified: string;
271
+ count_kos?: number | null;
272
+ };
273
+ export type DeleteGroupObjectsRequests = {
274
+ checksums_not_in: string[];
275
+ };
276
+ export type DeletedCountResponse = {
277
+ count: number;
278
+ };
279
+ export type UpdateKnowledgeGroupRequest = {
280
+ checksum: Blob;
281
+ last_modified: string;
282
+ parent_zip?: string | null;
283
+ };
284
+ export type CreateKnowledgeObjectsBatchRequest = {
285
+ knowledge_source_id: string;
286
+ prompt_content: string;
287
+ checksum: string;
288
+ embedding: number[];
289
+ display_content: string;
290
+ model_name: string;
291
+ programming_language?: string | null;
292
+ use_case?: string | null;
293
+ knowledge_group_id?: string | null;
294
+ attributes?: {
295
+ [key: string]: any;
296
+ } | null;
297
+ };
298
+ /**
299
+ * Health Check
300
+ */
301
+ export function healthCheckHealthzGet(opts?: Oazapfts.RequestOpts) {
302
+ return oazapfts.ok(oazapfts.fetchJson<{
303
+ status: 200;
304
+ data: any;
305
+ } | {
306
+ status: 404;
307
+ }>("/healthz", {
308
+ ...opts
309
+ }));
310
+ }
311
+ /**
312
+ * Readiness Check
313
+ */
314
+ export function readinessCheckReadyzGet(opts?: Oazapfts.RequestOpts) {
315
+ return oazapfts.ok(oazapfts.fetchJson<{
316
+ status: 200;
317
+ data: any;
318
+ } | {
319
+ status: 404;
320
+ }>("/readyz", {
321
+ ...opts
322
+ }));
323
+ }
324
+ /**
325
+ * Search Objects
326
+ */
327
+ export function searchObjectsV1SearchPost({ xAccountId, xUsername, authorization, searchKnowledgeObjectRequest }: {
328
+ xAccountId?: string | null;
329
+ xUsername?: string | null;
330
+ authorization: string;
331
+ searchKnowledgeObjectRequest: SearchKnowledgeObjectRequest;
332
+ }, opts?: Oazapfts.RequestOpts) {
333
+ return oazapfts.ok(oazapfts.fetchJson<{
334
+ status: 200;
335
+ data: SearchKnowledgeObjectResponse[];
336
+ } | {
337
+ status: 404;
338
+ } | {
339
+ status: 422;
340
+ data: HttpValidationError;
341
+ }>("/v1/search", oazapfts.json({
342
+ ...opts,
343
+ method: "POST",
344
+ body: searchKnowledgeObjectRequest,
345
+ headers: oazapfts.mergeHeaders(opts?.headers, {
346
+ "x-account-id": xAccountId,
347
+ "x-username": xUsername,
348
+ authorization
349
+ })
350
+ })));
351
+ }
352
+ /**
353
+ * Search Cross Account Objects
354
+ */
355
+ export function searchCrossAccountObjectsV1SearchCrossAccountPost({ xAccountId, xUsername, authorization, searchCrossAccountKnowledgeObjectRequest }: {
356
+ xAccountId: string;
357
+ xUsername: string;
358
+ authorization: string;
359
+ searchCrossAccountKnowledgeObjectRequest: SearchCrossAccountKnowledgeObjectRequest;
360
+ }, opts?: Oazapfts.RequestOpts) {
361
+ return oazapfts.ok(oazapfts.fetchJson<{
362
+ status: 200;
363
+ data: SearchKnowledgeObjectResponse[];
364
+ } | {
365
+ status: 404;
366
+ } | {
367
+ status: 422;
368
+ data: HttpValidationError;
369
+ }>("/v1/search/cross-account", oazapfts.json({
370
+ ...opts,
371
+ method: "POST",
372
+ body: searchCrossAccountKnowledgeObjectRequest,
373
+ headers: oazapfts.mergeHeaders(opts?.headers, {
374
+ "x-account-id": xAccountId,
375
+ "x-username": xUsername,
376
+ authorization
377
+ })
378
+ })));
379
+ }
380
+ /**
381
+ * Create Ft Knowledge Source
382
+ */
383
+ export function createFtKnowledgeSourceV1FtKnowledgeSourcesPost({ newKnowledgeSourceRequest }: {
384
+ newKnowledgeSourceRequest: NewKnowledgeSourceRequest;
385
+ }, opts?: Oazapfts.RequestOpts) {
386
+ return oazapfts.ok(oazapfts.fetchJson<{
387
+ status: 204;
388
+ } | {
389
+ status: 404;
390
+ } | {
391
+ status: 422;
392
+ data: HttpValidationError;
393
+ }>("/v1/ft-knowledge-sources", oazapfts.json({
394
+ ...opts,
395
+ method: "POST",
396
+ body: newKnowledgeSourceRequest
397
+ })));
398
+ }
399
+ /**
400
+ * Delete Ft Knowledge Source
401
+ */
402
+ export function deleteFtKnowledgeSourceV1FtKnowledgeSourcesSlugDelete({ slug }: {
403
+ slug: string;
404
+ }, opts?: Oazapfts.RequestOpts) {
405
+ return oazapfts.ok(oazapfts.fetchJson<{
406
+ status: 204;
407
+ } | {
408
+ status: 404;
409
+ } | {
410
+ status: 422;
411
+ data: HttpValidationError;
412
+ }>(`/v1/ft-knowledge-sources/${encodeURIComponent(slug)}`, {
413
+ ...opts,
414
+ method: "DELETE"
415
+ }));
416
+ }
417
+ /**
418
+ * Workspace Fork
419
+ */
420
+ export function workspaceForkV1KnowledgeSourcesWorkspaceForkPost({ xAccountId, xUsername, authorization, knowledgeSourcesWorkspaceForkRequest }: {
421
+ xAccountId?: string | null;
422
+ xUsername?: string | null;
423
+ authorization: string;
424
+ knowledgeSourcesWorkspaceForkRequest: KnowledgeSourcesWorkspaceForkRequest;
425
+ }, opts?: Oazapfts.RequestOpts) {
426
+ return oazapfts.ok(oazapfts.fetchJson<{
427
+ status: 200;
428
+ data: KnowledgeSourcesWorkspaceForkResponse;
429
+ } | {
430
+ status: 404;
431
+ } | {
432
+ status: 422;
433
+ data: HttpValidationError;
434
+ }>("/v1/knowledge-sources/workspace/fork", oazapfts.json({
435
+ ...opts,
436
+ method: "POST",
437
+ body: knowledgeSourcesWorkspaceForkRequest,
438
+ headers: oazapfts.mergeHeaders(opts?.headers, {
439
+ "x-account-id": xAccountId,
440
+ "x-username": xUsername,
441
+ authorization
442
+ })
443
+ })));
444
+ }
445
+ /**
446
+ * Workspace Delete Fork
447
+ */
448
+ export function workspaceDeleteForkV1KnowledgeSourcesWorkspaceForkDelete({ xAccountId, xUsername, authorization, knowledgeSourcesWorkspaceDeleteRequest }: {
449
+ xAccountId?: string | null;
450
+ xUsername?: string | null;
451
+ authorization: string;
452
+ knowledgeSourcesWorkspaceDeleteRequest: KnowledgeSourcesWorkspaceDeleteRequest;
453
+ }, opts?: Oazapfts.RequestOpts) {
454
+ return oazapfts.ok(oazapfts.fetchJson<{
455
+ status: 204;
456
+ } | {
457
+ status: 404;
458
+ } | {
459
+ status: 422;
460
+ data: HttpValidationError;
461
+ }>("/v1/knowledge-sources/workspace/fork", oazapfts.json({
462
+ ...opts,
463
+ method: "DELETE",
464
+ body: knowledgeSourcesWorkspaceDeleteRequest,
465
+ headers: oazapfts.mergeHeaders(opts?.headers, {
466
+ "x-account-id": xAccountId,
467
+ "x-username": xUsername,
468
+ authorization
469
+ })
470
+ })));
471
+ }
472
+ /**
473
+ * Workspace List
474
+ */
475
+ export function workspaceListV1KnowledgeSourcesWorkspaceListPost({ xAccountId, xUsername, authorization, knowledgeSourcesWorkspaceListRequest }: {
476
+ xAccountId?: string | null;
477
+ xUsername?: string | null;
478
+ authorization: string;
479
+ knowledgeSourcesWorkspaceListRequest: KnowledgeSourcesWorkspaceListRequest;
480
+ }, opts?: Oazapfts.RequestOpts) {
481
+ return oazapfts.ok(oazapfts.fetchJson<{
482
+ status: 200;
483
+ data: KnowledgeSourceItemResponse[];
484
+ } | {
485
+ status: 404;
486
+ } | {
487
+ status: 422;
488
+ data: HttpValidationError;
489
+ }>("/v1/knowledge-sources/workspace/list", oazapfts.json({
490
+ ...opts,
491
+ method: "POST",
492
+ body: knowledgeSourcesWorkspaceListRequest,
493
+ headers: oazapfts.mergeHeaders(opts?.headers, {
494
+ "x-account-id": xAccountId,
495
+ "x-username": xUsername,
496
+ authorization
497
+ })
498
+ })));
499
+ }
500
+ /**
501
+ * Create Ks
502
+ */
503
+ export function createKsV1KnowledgeSourcesPost({ xAccountId, xUsername, authorization, newKnowledgeSourceRequest }: {
504
+ xAccountId?: string | null;
505
+ xUsername?: string | null;
506
+ authorization: string;
507
+ newKnowledgeSourceRequest: NewKnowledgeSourceRequest;
508
+ }, opts?: Oazapfts.RequestOpts) {
509
+ return oazapfts.ok(oazapfts.fetchJson<{
510
+ status: 201;
511
+ data: any;
512
+ } | {
513
+ status: 404;
514
+ } | {
515
+ status: 422;
516
+ data: HttpErrorResponse;
517
+ } | {
518
+ status: 500;
519
+ data: HttpErrorResponse;
520
+ }>("/v1/knowledge-sources", oazapfts.json({
521
+ ...opts,
522
+ method: "POST",
523
+ body: newKnowledgeSourceRequest,
524
+ headers: oazapfts.mergeHeaders(opts?.headers, {
525
+ "x-account-id": xAccountId,
526
+ "x-username": xUsername,
527
+ authorization
528
+ })
529
+ })));
530
+ }
531
+ /**
532
+ * List Ks
533
+ */
534
+ export function listKsV1KnowledgeSourcesGet({ visibility, order, types, xAccountId, xUsername, authorization }: {
535
+ visibility?: VisibilityLevelEnum;
536
+ order?: OrderEnum;
537
+ types?: KnowledgeSourceTypeEnum[];
538
+ xAccountId?: string | null;
539
+ xUsername?: string | null;
540
+ authorization: string;
541
+ }, opts?: Oazapfts.RequestOpts) {
542
+ return oazapfts.ok(oazapfts.fetchJson<{
543
+ status: 200;
544
+ data: KnowledgeSourceItemResponse[];
545
+ } | {
546
+ status: 404;
547
+ } | {
548
+ status: 422;
549
+ data: HttpValidationError;
550
+ }>(`/v1/knowledge-sources${QS.query(QS.explode({
551
+ visibility,
552
+ order,
553
+ types
554
+ }))}`, {
555
+ ...opts,
556
+ headers: oazapfts.mergeHeaders(opts?.headers, {
557
+ "x-account-id": xAccountId,
558
+ "x-username": xUsername,
559
+ authorization
560
+ })
561
+ }));
562
+ }
563
+ /**
564
+ * Search Ks
565
+ */
566
+ export function searchKsV1KnowledgeSourcesSearchPost({ xAccountId, xUsername, authorization, knowledgeSourceSearchRequest }: {
567
+ xAccountId?: string | null;
568
+ xUsername?: string | null;
569
+ authorization: string;
570
+ knowledgeSourceSearchRequest: KnowledgeSourceSearchRequest;
571
+ }, opts?: Oazapfts.RequestOpts) {
572
+ return oazapfts.ok(oazapfts.fetchJson<{
573
+ status: 200;
574
+ data: KnowledgeSourceResponse[];
575
+ } | {
576
+ status: 404;
577
+ } | {
578
+ status: 422;
579
+ data: HttpValidationError;
580
+ }>("/v1/knowledge-sources/search", oazapfts.json({
581
+ ...opts,
582
+ method: "POST",
583
+ body: knowledgeSourceSearchRequest,
584
+ headers: oazapfts.mergeHeaders(opts?.headers, {
585
+ "x-account-id": xAccountId,
586
+ "x-username": xUsername,
587
+ authorization
588
+ })
589
+ })));
590
+ }
591
+ /**
592
+ * Find Ks
593
+ */
594
+ export function findKsV1KnowledgeSourcesSlugGet({ slug, xAccountId, xUsername, authorization }: {
595
+ slug: string;
596
+ xAccountId?: string | null;
597
+ xUsername?: string | null;
598
+ authorization: string;
599
+ }, opts?: Oazapfts.RequestOpts) {
600
+ return oazapfts.ok(oazapfts.fetchJson<{
601
+ status: 200;
602
+ data: KnowledgeSourceResponse;
603
+ } | {
604
+ status: 404;
605
+ data: HttpErrorResponse;
606
+ } | {
607
+ status: 422;
608
+ data: HttpValidationError;
609
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, {
610
+ ...opts,
611
+ headers: oazapfts.mergeHeaders(opts?.headers, {
612
+ "x-account-id": xAccountId,
613
+ "x-username": xUsername,
614
+ authorization
615
+ })
616
+ }));
617
+ }
618
+ /**
619
+ * Update Ks
620
+ */
621
+ export function updateKsV1KnowledgeSourcesSlugPatch({ slug, xAccountId, xUsername, authorization, knowledgeSourcePatchesRequest }: {
622
+ slug: string;
623
+ xAccountId?: string | null;
624
+ xUsername?: string | null;
625
+ authorization: string;
626
+ knowledgeSourcePatchesRequest: KnowledgeSourcePatchesRequest;
627
+ }, opts?: Oazapfts.RequestOpts) {
628
+ return oazapfts.ok(oazapfts.fetchJson<{
629
+ status: 204;
630
+ } | {
631
+ status: 403;
632
+ data: HttpErrorResponse;
633
+ } | {
634
+ status: 404;
635
+ data: HttpErrorResponse;
636
+ } | {
637
+ status: 422;
638
+ data: HttpValidationError;
639
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, oazapfts.json({
640
+ ...opts,
641
+ method: "PATCH",
642
+ body: knowledgeSourcePatchesRequest,
643
+ headers: oazapfts.mergeHeaders(opts?.headers, {
644
+ "x-account-id": xAccountId,
645
+ "x-username": xUsername,
646
+ authorization
647
+ })
648
+ })));
649
+ }
650
+ /**
651
+ * Delete Ks
652
+ */
653
+ export function deleteKsV1KnowledgeSourcesSlugDelete({ slug, xAccountId, xUsername, authorization }: {
654
+ slug: string;
655
+ xAccountId: string;
656
+ xUsername: string;
657
+ authorization: string;
658
+ }, opts?: Oazapfts.RequestOpts) {
659
+ return oazapfts.ok(oazapfts.fetchJson<{
660
+ status: 204;
661
+ } | {
662
+ status: 403;
663
+ data: HttpErrorResponse;
664
+ } | {
665
+ status: 404;
666
+ data: HttpErrorResponse;
667
+ } | {
668
+ status: 422;
669
+ data: HttpValidationError;
670
+ } | {
671
+ status: 500;
672
+ data: HttpErrorResponse;
673
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, {
674
+ ...opts,
675
+ method: "DELETE",
676
+ headers: oazapfts.mergeHeaders(opts?.headers, {
677
+ "x-account-id": xAccountId,
678
+ "x-username": xUsername,
679
+ authorization
680
+ })
681
+ }));
682
+ }
683
+ /**
684
+ * Exists Ks
685
+ */
686
+ export function existsKsV1KnowledgeSourcesSlugExistsGet({ slug, xAccountId, xUsername, authorization }: {
687
+ slug: string;
688
+ xAccountId?: string | null;
689
+ xUsername?: string | null;
690
+ authorization: string;
691
+ }, opts?: Oazapfts.RequestOpts) {
692
+ return oazapfts.ok(oazapfts.fetchJson<{
693
+ status: 204;
694
+ } | {
695
+ status: 404;
696
+ data: HttpErrorResponse;
697
+ } | {
698
+ status: 422;
699
+ data: HttpValidationError;
700
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/exists`, {
701
+ ...opts,
702
+ headers: oazapfts.mergeHeaders(opts?.headers, {
703
+ "x-account-id": xAccountId,
704
+ "x-username": xUsername,
705
+ authorization
706
+ })
707
+ }));
708
+ }
709
+ /**
710
+ * Share Ks
711
+ */
712
+ export function shareKsV1KnowledgeSourcesSlugSharePost({ slug, xAccountId, xUsername, authorization }: {
713
+ slug: string;
714
+ xAccountId?: string | null;
715
+ xUsername?: string | null;
716
+ authorization: string;
717
+ }, opts?: Oazapfts.RequestOpts) {
718
+ return oazapfts.ok(oazapfts.fetchJson<{
719
+ status: 204;
720
+ } | {
721
+ status: 403;
722
+ data: HttpErrorResponse;
723
+ } | {
724
+ status: 404;
725
+ data: HttpErrorResponse;
726
+ } | {
727
+ status: 422;
728
+ data: HttpErrorResponse;
729
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/share`, {
730
+ ...opts,
731
+ method: "POST",
732
+ headers: oazapfts.mergeHeaders(opts?.headers, {
733
+ "x-account-id": xAccountId,
734
+ "x-username": xUsername,
735
+ authorization
736
+ })
737
+ }));
738
+ }
739
+ /**
740
+ * Add Favorite
741
+ */
742
+ export function addFavoriteV1KnowledgeSourcesSlugFavoritePost({ slug, xAccountId, xUsername, authorization }: {
743
+ slug: string;
744
+ xAccountId?: string | null;
745
+ xUsername?: string | null;
746
+ authorization: string;
747
+ }, opts?: Oazapfts.RequestOpts) {
748
+ return oazapfts.ok(oazapfts.fetchJson<{
749
+ status: 204;
750
+ } | {
751
+ status: 403;
752
+ data: HttpErrorResponse;
753
+ } | {
754
+ status: 404;
755
+ data: HttpErrorResponse;
756
+ } | {
757
+ status: 422;
758
+ data: HttpValidationError;
759
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/favorite`, {
760
+ ...opts,
761
+ method: "POST",
762
+ headers: oazapfts.mergeHeaders(opts?.headers, {
763
+ "x-account-id": xAccountId,
764
+ "x-username": xUsername,
765
+ authorization
766
+ })
767
+ }));
768
+ }
769
+ /**
770
+ * Delete Favorite
771
+ */
772
+ export function deleteFavoriteV1KnowledgeSourcesSlugFavoriteDelete({ slug, xAccountId, xUsername, authorization }: {
773
+ slug: string;
774
+ xAccountId?: string | null;
775
+ xUsername?: string | null;
776
+ authorization: string;
777
+ }, opts?: Oazapfts.RequestOpts) {
778
+ return oazapfts.ok(oazapfts.fetchJson<{
779
+ status: 204;
780
+ } | {
781
+ status: 403;
782
+ data: HttpErrorResponse;
783
+ } | {
784
+ status: 404;
785
+ data: HttpErrorResponse;
786
+ } | {
787
+ status: 422;
788
+ data: HttpValidationError;
789
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/favorite`, {
790
+ ...opts,
791
+ method: "DELETE",
792
+ headers: oazapfts.mergeHeaders(opts?.headers, {
793
+ "x-account-id": xAccountId,
794
+ "x-username": xUsername,
795
+ authorization
796
+ })
797
+ }));
798
+ }
799
+ /**
800
+ * Publish Ks
801
+ */
802
+ export function publishKsV1KnowledgeSourcesSlugPublishPost({ slug, xAccountId, xUsername, authorization, body }: {
803
+ slug: string;
804
+ xAccountId?: string | null;
805
+ xUsername?: string | null;
806
+ authorization: string;
807
+ body?: KnowledgeSourcesPublishRequest | null;
808
+ }, opts?: Oazapfts.RequestOpts) {
809
+ return oazapfts.ok(oazapfts.fetchJson<{
810
+ status: 204;
811
+ } | {
812
+ status: 403;
813
+ data: HttpErrorResponse;
814
+ } | {
815
+ status: 404;
816
+ data: HttpErrorResponse;
817
+ } | {
818
+ status: 422;
819
+ data: HttpValidationError;
820
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/publish`, oazapfts.json({
821
+ ...opts,
822
+ method: "POST",
823
+ body,
824
+ headers: oazapfts.mergeHeaders(opts?.headers, {
825
+ "x-account-id": xAccountId,
826
+ "x-username": xUsername,
827
+ authorization
828
+ })
829
+ })));
830
+ }
831
+ /**
832
+ * Publish Ks Batch
833
+ */
834
+ export function publishKsBatchV1KnowledgeSourcesPublishBatchPost({ xAccountId, xUsername, authorization, knowledgeSourcePublishBatchRequest }: {
835
+ xAccountId?: string | null;
836
+ xUsername?: string | null;
837
+ authorization: string;
838
+ knowledgeSourcePublishBatchRequest: KnowledgeSourcePublishBatchRequest;
839
+ }, opts?: Oazapfts.RequestOpts) {
840
+ return oazapfts.ok(oazapfts.fetchJson<{
841
+ status: 204;
842
+ } | {
843
+ status: 403;
844
+ data: HttpErrorResponse;
845
+ } | {
846
+ status: 404;
847
+ } | {
848
+ status: 422;
849
+ data: HttpValidationError;
850
+ }>("/v1/knowledge-sources/publish/batch", oazapfts.json({
851
+ ...opts,
852
+ method: "POST",
853
+ body: knowledgeSourcePublishBatchRequest,
854
+ headers: oazapfts.mergeHeaders(opts?.headers, {
855
+ "x-account-id": xAccountId,
856
+ "x-username": xUsername,
857
+ authorization
858
+ })
859
+ })));
860
+ }
861
+ /**
862
+ * Fork Ks
863
+ */
864
+ export function forkKsV1KnowledgeSourcesSlugForkPost({ slug, xAccountId, xUsername, authorization, forkKnowledgeSourceRequest }: {
865
+ slug: string;
866
+ xAccountId?: string | null;
867
+ xUsername?: string | null;
868
+ authorization: string;
869
+ forkKnowledgeSourceRequest: ForkKnowledgeSourceRequest;
870
+ }, opts?: Oazapfts.RequestOpts) {
871
+ return oazapfts.ok(oazapfts.fetchJson<{
872
+ status: 204;
873
+ } | {
874
+ status: 403;
875
+ data: HttpErrorResponse;
876
+ } | {
877
+ status: 404;
878
+ data: HttpErrorResponse;
879
+ } | {
880
+ status: 422;
881
+ data: HttpErrorResponse;
882
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/fork`, oazapfts.json({
883
+ ...opts,
884
+ method: "POST",
885
+ body: forkKnowledgeSourceRequest,
886
+ headers: oazapfts.mergeHeaders(opts?.headers, {
887
+ "x-account-id": xAccountId,
888
+ "x-username": xUsername,
889
+ authorization
890
+ })
891
+ })));
892
+ }
893
+ /**
894
+ * List Kos
895
+ */
896
+ export function listKosV1KnowledgeSourcesKsSlugObjectsGet({ ksSlug, standalone, filePath, contentLimit, xAccountId, xUsername, authorization }: {
897
+ ksSlug: string;
898
+ standalone?: boolean | null;
899
+ filePath?: string[];
900
+ contentLimit?: number | null;
901
+ xAccountId?: string | null;
902
+ xUsername?: string | null;
903
+ authorization: string;
904
+ }, opts?: Oazapfts.RequestOpts) {
905
+ return oazapfts.ok(oazapfts.fetchJson<{
906
+ status: 200;
907
+ data: KnowledgeObjectResponse[];
908
+ } | {
909
+ status: 404;
910
+ data: HttpErrorResponse;
911
+ } | {
912
+ status: 422;
913
+ data: HttpValidationError;
914
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects${QS.query(QS.explode({
915
+ standalone,
916
+ file_path: filePath,
917
+ content_limit: contentLimit
918
+ }))}`, {
919
+ ...opts,
920
+ headers: oazapfts.mergeHeaders(opts?.headers, {
921
+ "x-account-id": xAccountId,
922
+ "x-username": xUsername,
923
+ authorization
924
+ })
925
+ }));
926
+ }
927
+ /**
928
+ * Reset Kos
929
+ */
930
+ export function resetKosV1KnowledgeSourcesKsSlugObjectsDelete({ ksSlug, standalone, xAccountId, xUsername, authorization }: {
931
+ ksSlug: string;
932
+ standalone?: boolean | null;
933
+ xAccountId?: string | null;
934
+ xUsername?: string | null;
935
+ authorization: string;
936
+ }, opts?: Oazapfts.RequestOpts) {
937
+ return oazapfts.ok(oazapfts.fetchJson<{
938
+ status: 204;
939
+ } | {
940
+ status: 403;
941
+ data: HttpErrorResponse;
942
+ } | {
943
+ status: 404;
944
+ data: HttpErrorResponse;
945
+ } | {
946
+ status: 422;
947
+ data: HttpValidationError;
948
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects${QS.query(QS.explode({
949
+ standalone
950
+ }))}`, {
951
+ ...opts,
952
+ method: "DELETE",
953
+ headers: oazapfts.mergeHeaders(opts?.headers, {
954
+ "x-account-id": xAccountId,
955
+ "x-username": xUsername,
956
+ authorization
957
+ })
958
+ }));
959
+ }
960
+ /**
961
+ * List Kos Checksums
962
+ */
963
+ export function listKosChecksumsV1KnowledgeSourcesKsSlugObjectsChecksumsGet({ ksSlug, xAccountId, xUsername, authorization }: {
964
+ ksSlug: string;
965
+ xAccountId?: string | null;
966
+ xUsername?: string | null;
967
+ authorization: string;
968
+ }, opts?: Oazapfts.RequestOpts) {
969
+ return oazapfts.ok(oazapfts.fetchJson<{
970
+ status: 200;
971
+ data: KnowledgeObjectChecksumResponse[];
972
+ } | {
973
+ status: 404;
974
+ data: HttpErrorResponse;
975
+ } | {
976
+ status: 422;
977
+ data: HttpValidationError;
978
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects/checksums`, {
979
+ ...opts,
980
+ headers: oazapfts.mergeHeaders(opts?.headers, {
981
+ "x-account-id": xAccountId,
982
+ "x-username": xUsername,
983
+ authorization
984
+ })
985
+ }));
986
+ }
987
+ /**
988
+ * Vectorize Snippet Ks
989
+ */
990
+ export function vectorizeSnippetKsV1KnowledgeSourcesSlugSnippetsPost(opts?: Oazapfts.RequestOpts) {
991
+ return oazapfts.ok(oazapfts.fetchJson<{
992
+ status: 201;
993
+ data: any;
994
+ } | {
995
+ status: 404;
996
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/snippets`, {
997
+ ...opts,
998
+ method: "POST"
999
+ }));
1000
+ }
1001
+ /**
1002
+ * Vectorize Custom Ks
1003
+ */
1004
+ export function vectorizeCustomKsV1KnowledgeSourcesSlugCustomPost(opts?: Oazapfts.RequestOpts) {
1005
+ return oazapfts.ok(oazapfts.fetchJson<{
1006
+ status: 201;
1007
+ data: any;
1008
+ } | {
1009
+ status: 404;
1010
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/custom`, {
1011
+ ...opts,
1012
+ method: "POST"
1013
+ }));
1014
+ }
1015
+ /**
1016
+ * Find Ko By Id
1017
+ */
1018
+ export function findKoByIdV1KnowledgeSourcesKsSlugObjectsKoIdGet({ ksSlug, koId, xAccountId, xUsername, authorization }: {
1019
+ ksSlug: string;
1020
+ koId: string;
1021
+ xAccountId?: string | null;
1022
+ xUsername?: string | null;
1023
+ authorization: string;
1024
+ }, opts?: Oazapfts.RequestOpts) {
1025
+ return oazapfts.ok(oazapfts.fetchJson<{
1026
+ status: 200;
1027
+ data: KnowledgeObjectResponse;
1028
+ } | {
1029
+ status: 404;
1030
+ data: HttpErrorResponse;
1031
+ } | {
1032
+ status: 422;
1033
+ data: HttpValidationError;
1034
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects/${encodeURIComponent(koId)}`, {
1035
+ ...opts,
1036
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1037
+ "x-account-id": xAccountId,
1038
+ "x-username": xUsername,
1039
+ authorization
1040
+ })
1041
+ }));
1042
+ }
1043
+ /**
1044
+ * Delete Ko By Id
1045
+ */
1046
+ export function deleteKoByIdV1KnowledgeSourcesKsSlugObjectsKoIdDelete({ ksSlug, koId, xAccountId, xUsername, authorization }: {
1047
+ ksSlug: string;
1048
+ koId: string;
1049
+ xAccountId?: string | null;
1050
+ xUsername?: string | null;
1051
+ authorization: string;
1052
+ }, opts?: Oazapfts.RequestOpts) {
1053
+ return oazapfts.ok(oazapfts.fetchJson<{
1054
+ status: 204;
1055
+ } | {
1056
+ status: 403;
1057
+ data: HttpErrorResponse;
1058
+ } | {
1059
+ status: 404;
1060
+ data: HttpErrorResponse;
1061
+ } | {
1062
+ status: 422;
1063
+ data: HttpValidationError;
1064
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/objects/${encodeURIComponent(koId)}`, {
1065
+ ...opts,
1066
+ method: "DELETE",
1067
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1068
+ "x-account-id": xAccountId,
1069
+ "x-username": xUsername,
1070
+ authorization
1071
+ })
1072
+ }));
1073
+ }
1074
+ /**
1075
+ * Get Last Message
1076
+ */
1077
+ export function getLastMessageV1KnowledgeSourcesKsSlugLastMessageGet({ ksSlug, xAccountId, xUsername, authorization }: {
1078
+ ksSlug: string;
1079
+ xAccountId: string;
1080
+ xUsername?: string | null;
1081
+ authorization: string;
1082
+ }, opts?: Oazapfts.RequestOpts) {
1083
+ return oazapfts.ok(oazapfts.fetchJson<{
1084
+ status: 200;
1085
+ data: KnowledgeSourceLastMessageResponse[];
1086
+ } | {
1087
+ status: 404;
1088
+ data: HttpErrorResponse;
1089
+ } | {
1090
+ status: 422;
1091
+ data: HttpValidationError;
1092
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/last-message`, {
1093
+ ...opts,
1094
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1095
+ "x-account-id": xAccountId,
1096
+ "x-username": xUsername,
1097
+ authorization
1098
+ })
1099
+ }));
1100
+ }
1101
+ /**
1102
+ * Get Indexed Files
1103
+ */
1104
+ export function getIndexedFilesV1KnowledgeSourcesKsSlugFilesGet({ ksSlug, xAccountId, xUsername, authorization }: {
1105
+ ksSlug: string;
1106
+ xAccountId?: string | null;
1107
+ xUsername?: string | null;
1108
+ authorization: string;
1109
+ }, opts?: Oazapfts.RequestOpts) {
1110
+ return oazapfts.ok(oazapfts.fetchJson<{
1111
+ status: 200;
1112
+ data: KnowledgeSourceFilesIngestedResponse[];
1113
+ } | {
1114
+ status: 404;
1115
+ data: HttpErrorResponse;
1116
+ } | {
1117
+ status: 422;
1118
+ data: HttpValidationError;
1119
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/files`, {
1120
+ ...opts,
1121
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1122
+ "x-account-id": xAccountId,
1123
+ "x-username": xUsername,
1124
+ authorization
1125
+ })
1126
+ }));
1127
+ }
1128
+ /**
1129
+ * Delete Indexed Files
1130
+ */
1131
+ export function deleteIndexedFilesV1KnowledgeSourcesKsSlugFilesDelete({ ksSlug, xAccountId, xUsername, authorization, deleteIndexedFilesRequest }: {
1132
+ ksSlug: string;
1133
+ xAccountId?: string | null;
1134
+ xUsername?: string | null;
1135
+ authorization: string;
1136
+ deleteIndexedFilesRequest: DeleteIndexedFilesRequest;
1137
+ }, opts?: Oazapfts.RequestOpts) {
1138
+ return oazapfts.ok(oazapfts.fetchJson<{
1139
+ status: 204;
1140
+ } | {
1141
+ status: 403;
1142
+ data: HttpErrorResponse;
1143
+ } | {
1144
+ status: 404;
1145
+ data: HttpErrorResponse;
1146
+ } | {
1147
+ status: 422;
1148
+ data: HttpValidationError;
1149
+ }>(`/v1/knowledge-sources/${encodeURIComponent(ksSlug)}/files`, oazapfts.json({
1150
+ ...opts,
1151
+ method: "DELETE",
1152
+ body: deleteIndexedFilesRequest,
1153
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1154
+ "x-account-id": xAccountId,
1155
+ "x-username": xUsername,
1156
+ authorization
1157
+ })
1158
+ })));
1159
+ }
1160
+ /**
1161
+ * Get Upload Form
1162
+ */
1163
+ export function getUploadFormV1FileUploadFormPost({ xAccountId, xUsername, authorization, newFileUploadRequest }: {
1164
+ xAccountId?: string | null;
1165
+ xUsername?: string | null;
1166
+ authorization: string;
1167
+ newFileUploadRequest: NewFileUploadRequest;
1168
+ }, opts?: Oazapfts.RequestOpts) {
1169
+ return oazapfts.ok(oazapfts.fetchJson<{
1170
+ status: 201;
1171
+ data: NewFileUploadFormResponse;
1172
+ } | {
1173
+ status: 404;
1174
+ } | {
1175
+ status: 422;
1176
+ data: HttpValidationError;
1177
+ }>("/v1/file-upload/form", oazapfts.json({
1178
+ ...opts,
1179
+ method: "POST",
1180
+ body: newFileUploadRequest,
1181
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1182
+ "x-account-id": xAccountId,
1183
+ "x-username": xUsername,
1184
+ authorization
1185
+ })
1186
+ })));
1187
+ }
1188
+ /**
1189
+ * Get File Upload Status
1190
+ */
1191
+ export function getFileUploadStatusV1FileUploadFileUploadIdGet({ fileUploadId, xAccountId, xUsername, authorization }: {
1192
+ fileUploadId: string;
1193
+ xAccountId?: string | null;
1194
+ xUsername?: string | null;
1195
+ authorization: string;
1196
+ }, opts?: Oazapfts.RequestOpts) {
1197
+ return oazapfts.ok(oazapfts.fetchJson<{
1198
+ status: 200;
1199
+ data: FileUploadStatusResponse;
1200
+ } | {
1201
+ status: 404;
1202
+ } | {
1203
+ status: 422;
1204
+ data: HttpValidationError;
1205
+ }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}`, {
1206
+ ...opts,
1207
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1208
+ "x-account-id": xAccountId,
1209
+ "x-username": xUsername,
1210
+ authorization
1211
+ })
1212
+ }));
1213
+ }
1214
+ /**
1215
+ * Save Chunked Files Deprecated
1216
+ */
1217
+ export function saveChunkedFilesDeprecatedV1FileUploadFileUploadIdPost({ fileUploadId, xAccountId, xUsername, authorization, fileUploadSaveChunksRequest }: {
1218
+ fileUploadId: string;
1219
+ xAccountId?: string | null;
1220
+ xUsername?: string | null;
1221
+ authorization: string;
1222
+ fileUploadSaveChunksRequest: FileUploadSaveChunksRequest;
1223
+ }, opts?: Oazapfts.RequestOpts) {
1224
+ return oazapfts.ok(oazapfts.fetchJson<{
1225
+ status: 202;
1226
+ data: any;
1227
+ } | {
1228
+ status: 404;
1229
+ } | {
1230
+ status: 422;
1231
+ data: HttpValidationError;
1232
+ }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}`, oazapfts.json({
1233
+ ...opts,
1234
+ method: "POST",
1235
+ body: fileUploadSaveChunksRequest,
1236
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1237
+ "x-account-id": xAccountId,
1238
+ "x-username": xUsername,
1239
+ authorization
1240
+ })
1241
+ })));
1242
+ }
1243
+ /**
1244
+ * Internal Patch File Upload Status
1245
+ */
1246
+ export function internalPatchFileUploadStatusV1FileUploadFileUploadIdPatch({ fileUploadId, xAccountId, xUsername, authorization, fileUploadUpdateRequest }: {
1247
+ fileUploadId: string;
1248
+ xAccountId: string;
1249
+ xUsername?: string | null;
1250
+ authorization: string;
1251
+ fileUploadUpdateRequest: FileUploadUpdateRequest;
1252
+ }, opts?: Oazapfts.RequestOpts) {
1253
+ return oazapfts.ok(oazapfts.fetchJson<{
1254
+ status: 200;
1255
+ data: FileUploadStatusResponse;
1256
+ } | {
1257
+ status: 404;
1258
+ } | {
1259
+ status: 422;
1260
+ data: HttpValidationError;
1261
+ }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}`, oazapfts.json({
1262
+ ...opts,
1263
+ method: "PATCH",
1264
+ body: fileUploadUpdateRequest,
1265
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1266
+ "x-account-id": xAccountId,
1267
+ "x-username": xUsername,
1268
+ authorization
1269
+ })
1270
+ })));
1271
+ }
1272
+ /**
1273
+ * Save Chunked Files
1274
+ */
1275
+ export function saveChunkedFilesV1FileUploadFileUploadIdKnowledgeObjectsPost({ fileUploadId, xAccountId, xUsername, authorization, fileUploadSaveChunksRequest }: {
1276
+ fileUploadId: string;
1277
+ xAccountId?: string | null;
1278
+ xUsername?: string | null;
1279
+ authorization: string;
1280
+ fileUploadSaveChunksRequest: FileUploadSaveChunksRequest;
1281
+ }, opts?: Oazapfts.RequestOpts) {
1282
+ return oazapfts.ok(oazapfts.fetchJson<{
1283
+ status: 202;
1284
+ data: any;
1285
+ } | {
1286
+ status: 404;
1287
+ } | {
1288
+ status: 422;
1289
+ data: HttpValidationError;
1290
+ }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}/knowledge-objects`, oazapfts.json({
1291
+ ...opts,
1292
+ method: "POST",
1293
+ body: fileUploadSaveChunksRequest,
1294
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1295
+ "x-account-id": xAccountId,
1296
+ "x-username": xUsername,
1297
+ authorization
1298
+ })
1299
+ })));
1300
+ }
1301
+ /**
1302
+ * Split Uploaded File
1303
+ */
1304
+ export function splitUploadedFileV1FileUploadFileUploadIdSplitPost({ fileUploadId, xAccountId, xUsername, authorization, fileSplitRequest }: {
1305
+ fileUploadId: string;
1306
+ xAccountId?: string | null;
1307
+ xUsername?: string | null;
1308
+ authorization: string;
1309
+ fileSplitRequest: FileSplitRequest;
1310
+ }, opts?: Oazapfts.RequestOpts) {
1311
+ return oazapfts.ok(oazapfts.fetchJson<{
1312
+ status: 202;
1313
+ data: any;
1314
+ } | {
1315
+ status: 404;
1316
+ } | {
1317
+ status: 422;
1318
+ data: HttpValidationError;
1319
+ }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}/split`, oazapfts.json({
1320
+ ...opts,
1321
+ method: "POST",
1322
+ body: fileSplitRequest,
1323
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1324
+ "x-account-id": xAccountId,
1325
+ "x-username": xUsername,
1326
+ authorization
1327
+ })
1328
+ })));
1329
+ }
1330
+ /**
1331
+ * Split Uploaded File Preview
1332
+ */
1333
+ export function splitUploadedFilePreviewV1FileUploadFileUploadIdSplitPreviewSplitStrategyGet({ fileUploadId, splitStrategy, xAccountId, xUsername, authorization }: {
1334
+ fileUploadId: string;
1335
+ splitStrategy: FileSplitStrategy;
1336
+ xAccountId?: string | null;
1337
+ xUsername?: string | null;
1338
+ authorization: string;
1339
+ }, opts?: Oazapfts.RequestOpts) {
1340
+ return oazapfts.ok(oazapfts.fetchJson<{
1341
+ status: 200;
1342
+ data: any;
1343
+ } | {
1344
+ status: 404;
1345
+ } | {
1346
+ status: 422;
1347
+ data: HttpValidationError;
1348
+ }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}/split/preview/${encodeURIComponent(splitStrategy)}`, {
1349
+ ...opts,
1350
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1351
+ "x-account-id": xAccountId,
1352
+ "x-username": xUsername,
1353
+ authorization
1354
+ })
1355
+ }));
1356
+ }
1357
+ /**
1358
+ * Internal Get File Upload Metadata
1359
+ */
1360
+ export function internalGetFileUploadMetadataV1FileUploadFileUploadIdMetadataGet({ fileUploadId, xAccountId, xUsername, authorization }: {
1361
+ fileUploadId: string;
1362
+ xAccountId: string;
1363
+ xUsername?: string | null;
1364
+ authorization: string;
1365
+ }, opts?: Oazapfts.RequestOpts) {
1366
+ return oazapfts.ok(oazapfts.fetchJson<{
1367
+ status: 200;
1368
+ data: FileMetadataResponse;
1369
+ } | {
1370
+ status: 404;
1371
+ } | {
1372
+ status: 422;
1373
+ data: HttpValidationError;
1374
+ }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}/metadata`, {
1375
+ ...opts,
1376
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1377
+ "x-account-id": xAccountId,
1378
+ "x-username": xUsername,
1379
+ authorization
1380
+ })
1381
+ }));
1382
+ }
1383
+ /**
1384
+ * Get Presigned Download Url
1385
+ */
1386
+ export function getPresignedDownloadUrlV1FileUploadPresignedUrlGet({ id, expiration, xAccountId, xUsername, authorization }: {
1387
+ id?: string[];
1388
+ expiration?: number;
1389
+ xAccountId?: string | null;
1390
+ xUsername?: string | null;
1391
+ authorization: string;
1392
+ }, opts?: Oazapfts.RequestOpts) {
1393
+ return oazapfts.ok(oazapfts.fetchJson<{
1394
+ status: 200;
1395
+ data: PresignedUrlsDto;
1396
+ } | {
1397
+ status: 404;
1398
+ } | {
1399
+ status: 422;
1400
+ data: HttpValidationError;
1401
+ }>(`/v1/file-upload/presigned/url${QS.query(QS.explode({
1402
+ id,
1403
+ expiration
1404
+ }))}`, {
1405
+ ...opts,
1406
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1407
+ "x-account-id": xAccountId,
1408
+ "x-username": xUsername,
1409
+ authorization
1410
+ })
1411
+ }));
1412
+ }
1413
+ /**
1414
+ * Delete Bucket Object
1415
+ */
1416
+ export function deleteBucketObjectV1FileUploadUploadIdDelete({ uploadId, xAccountId, xUsername, authorization }: {
1417
+ uploadId: string;
1418
+ xAccountId?: string | null;
1419
+ xUsername?: string | null;
1420
+ authorization: string;
1421
+ }, opts?: Oazapfts.RequestOpts) {
1422
+ return oazapfts.ok(oazapfts.fetchJson<{
1423
+ status: 204;
1424
+ } | {
1425
+ status: 404;
1426
+ } | {
1427
+ status: 422;
1428
+ data: HttpValidationError;
1429
+ }>(`/v1/file-upload/${encodeURIComponent(uploadId)}`, {
1430
+ ...opts,
1431
+ method: "DELETE",
1432
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1433
+ "x-account-id": xAccountId,
1434
+ "x-username": xUsername,
1435
+ authorization
1436
+ })
1437
+ }));
1438
+ }
1439
+ /**
1440
+ * Internal Get Current Embedding Usage
1441
+ */
1442
+ export function internalGetCurrentEmbeddingUsageV1TokenUsageEmbeddingGet({ xAccountId, xUsername, authorization }: {
1443
+ xAccountId: string;
1444
+ xUsername?: string | null;
1445
+ authorization: string;
1446
+ }, opts?: Oazapfts.RequestOpts) {
1447
+ return oazapfts.ok(oazapfts.fetchJson<{
1448
+ status: 200;
1449
+ data: AccountEmbeddingTokenUsage;
1450
+ } | {
1451
+ status: 404;
1452
+ } | {
1453
+ status: 422;
1454
+ data: HttpValidationError;
1455
+ }>("/v1/token-usage/embedding", {
1456
+ ...opts,
1457
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1458
+ "x-account-id": xAccountId,
1459
+ "x-username": xUsername,
1460
+ authorization
1461
+ })
1462
+ }));
1463
+ }
1464
+ /**
1465
+ * Internal Consume Token Usage
1466
+ */
1467
+ export function internalConsumeTokenUsageV1TokenUsageConsumePost({ xAccountId, xUsername, authorization, consumeTokenRequest }: {
1468
+ xAccountId: string;
1469
+ xUsername: string;
1470
+ authorization: string;
1471
+ consumeTokenRequest: ConsumeTokenRequest;
1472
+ }, opts?: Oazapfts.RequestOpts) {
1473
+ return oazapfts.ok(oazapfts.fetchJson<{
1474
+ status: 204;
1475
+ } | {
1476
+ status: 404;
1477
+ } | {
1478
+ status: 422;
1479
+ data: HttpValidationError;
1480
+ }>("/v1/token-usage/consume", oazapfts.json({
1481
+ ...opts,
1482
+ method: "POST",
1483
+ body: consumeTokenRequest,
1484
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1485
+ "x-account-id": xAccountId,
1486
+ "x-username": xUsername,
1487
+ authorization
1488
+ })
1489
+ })));
1490
+ }
1491
+ /**
1492
+ * Get Upload Form V2
1493
+ */
1494
+ export function getUploadFormV2V2FileUploadFormPost({ xAccountId, xUsername, authorization, newFileUploadRequest }: {
1495
+ xAccountId?: string | null;
1496
+ xUsername?: string | null;
1497
+ authorization: string;
1498
+ newFileUploadRequest: NewFileUploadRequest;
1499
+ }, opts?: Oazapfts.RequestOpts) {
1500
+ return oazapfts.ok(oazapfts.fetchJson<{
1501
+ status: 201;
1502
+ data: NewFileUploadFormResponse;
1503
+ } | {
1504
+ status: 404;
1505
+ } | {
1506
+ status: 422;
1507
+ data: HttpValidationError;
1508
+ }>("/v2/file-upload/form", oazapfts.json({
1509
+ ...opts,
1510
+ method: "POST",
1511
+ body: newFileUploadRequest,
1512
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1513
+ "x-account-id": xAccountId,
1514
+ "x-username": xUsername,
1515
+ authorization
1516
+ })
1517
+ })));
1518
+ }
1519
+ /**
1520
+ * Internal Get Llm Config
1521
+ */
1522
+ export function internalGetLlmConfigV1AccountsLlmConfigGet({ xAccountId, xUsername, authorization }: {
1523
+ xAccountId: string;
1524
+ xUsername?: string | null;
1525
+ authorization: string;
1526
+ }, opts?: Oazapfts.RequestOpts) {
1527
+ return oazapfts.ok(oazapfts.fetchJson<{
1528
+ status: 200;
1529
+ data: AccountLlmConfigResponse;
1530
+ } | {
1531
+ status: 404;
1532
+ } | {
1533
+ status: 422;
1534
+ data: HttpValidationError;
1535
+ }>("/v1/accounts/llm-config", {
1536
+ ...opts,
1537
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1538
+ "x-account-id": xAccountId,
1539
+ "x-username": xUsername,
1540
+ authorization
1541
+ })
1542
+ }));
1543
+ }
1544
+ /**
1545
+ * Internal Get Or Create Knowledge Group
1546
+ */
1547
+ export function internalGetOrCreateKnowledgeGroupV1KnowledgeGroupsGetOrCreatePut({ xAccountId, xUsername, authorization, getOrCreateKnowledgeGroupRequest }: {
1548
+ xAccountId: string;
1549
+ xUsername?: string | null;
1550
+ authorization: string;
1551
+ getOrCreateKnowledgeGroupRequest: GetOrCreateKnowledgeGroupRequest;
1552
+ }, opts?: Oazapfts.RequestOpts) {
1553
+ return oazapfts.ok(oazapfts.fetchJson<{
1554
+ status: 200;
1555
+ data: KnowledgeGroupResponse;
1556
+ } | {
1557
+ status: 404;
1558
+ } | {
1559
+ status: 422;
1560
+ data: HttpValidationError;
1561
+ }>("/v1/knowledge-groups/get-or-create", oazapfts.json({
1562
+ ...opts,
1563
+ method: "PUT",
1564
+ body: getOrCreateKnowledgeGroupRequest,
1565
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1566
+ "x-account-id": xAccountId,
1567
+ "x-username": xUsername,
1568
+ authorization
1569
+ })
1570
+ })));
1571
+ }
1572
+ /**
1573
+ * Internal Delete By Not Checksums
1574
+ */
1575
+ export function internalDeleteByNotChecksumsV1KnowledgeGroupsGroupIdObjectsDelete({ groupId, xAccountId, xUsername, authorization, deleteGroupObjectsRequests }: {
1576
+ groupId: string;
1577
+ xAccountId: string;
1578
+ xUsername?: string | null;
1579
+ authorization: string;
1580
+ deleteGroupObjectsRequests: DeleteGroupObjectsRequests;
1581
+ }, opts?: Oazapfts.RequestOpts) {
1582
+ return oazapfts.ok(oazapfts.fetchJson<{
1583
+ status: 200;
1584
+ data: DeletedCountResponse;
1585
+ } | {
1586
+ status: 404;
1587
+ } | {
1588
+ status: 422;
1589
+ data: HttpValidationError;
1590
+ }>(`/v1/knowledge-groups/${encodeURIComponent(groupId)}/objects`, oazapfts.json({
1591
+ ...opts,
1592
+ method: "DELETE",
1593
+ body: deleteGroupObjectsRequests,
1594
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1595
+ "x-account-id": xAccountId,
1596
+ "x-username": xUsername,
1597
+ authorization
1598
+ })
1599
+ })));
1600
+ }
1601
+ /**
1602
+ * Internal Update Knowledge Group
1603
+ */
1604
+ export function internalUpdateKnowledgeGroupV1KnowledgeGroupsGroupIdPatch({ groupId, xAccountId, xUsername, authorization, updateKnowledgeGroupRequest }: {
1605
+ groupId: string;
1606
+ xAccountId: string;
1607
+ xUsername?: string | null;
1608
+ authorization: string;
1609
+ updateKnowledgeGroupRequest: UpdateKnowledgeGroupRequest;
1610
+ }, opts?: Oazapfts.RequestOpts) {
1611
+ return oazapfts.ok(oazapfts.fetchJson<{
1612
+ status: 200;
1613
+ data: any;
1614
+ } | {
1615
+ status: 404;
1616
+ } | {
1617
+ status: 422;
1618
+ data: HttpValidationError;
1619
+ }>(`/v1/knowledge-groups/${encodeURIComponent(groupId)}`, oazapfts.json({
1620
+ ...opts,
1621
+ method: "PATCH",
1622
+ body: updateKnowledgeGroupRequest,
1623
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1624
+ "x-account-id": xAccountId,
1625
+ "x-username": xUsername,
1626
+ authorization
1627
+ })
1628
+ })));
1629
+ }
1630
+ /**
1631
+ * Internal Create Knowledge Objects Batch
1632
+ */
1633
+ export function internalCreateKnowledgeObjectsBatchV1KnowledgeObjectsBatchPost({ xAccountId, xUsername, authorization, body }: {
1634
+ xAccountId: string;
1635
+ xUsername?: string | null;
1636
+ authorization: string;
1637
+ body: CreateKnowledgeObjectsBatchRequest[];
1638
+ }, opts?: Oazapfts.RequestOpts) {
1639
+ return oazapfts.ok(oazapfts.fetchJson<{
1640
+ status: 200;
1641
+ data: any;
1642
+ } | {
1643
+ status: 404;
1644
+ } | {
1645
+ status: 422;
1646
+ data: HttpValidationError;
1647
+ }>("/v1/knowledge-objects/batch", oazapfts.json({
1648
+ ...opts,
1649
+ method: "POST",
1650
+ body,
1651
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1652
+ "x-account-id": xAccountId,
1653
+ "x-username": xUsername,
1654
+ authorization
1655
+ })
1656
+ })));
1657
+ }