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