@stack-spot/portal-network 0.1.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 (186) hide show
  1. package/.generate-api.failed.json +1 -0
  2. package/dist/api/account.d.ts +2368 -0
  3. package/dist/api/account.d.ts.map +1 -0
  4. package/dist/api/account.js +1521 -0
  5. package/dist/api/account.js.map +1 -0
  6. package/dist/api/ai.d.ts +1432 -0
  7. package/dist/api/ai.d.ts.map +1 -0
  8. package/dist/api/ai.js +1342 -0
  9. package/dist/api/ai.js.map +1 -0
  10. package/dist/api/apiRuntime.d.ts +922 -0
  11. package/dist/api/apiRuntime.d.ts.map +1 -0
  12. package/dist/api/apiRuntime.js +599 -0
  13. package/dist/api/apiRuntime.js.map +1 -0
  14. package/dist/api/cloudAccount.d.ts +473 -0
  15. package/dist/api/cloudAccount.d.ts.map +1 -0
  16. package/dist/api/cloudAccount.js +300 -0
  17. package/dist/api/cloudAccount.js.map +1 -0
  18. package/dist/api/cloudServices.d.ts +1233 -0
  19. package/dist/api/cloudServices.d.ts.map +1 -0
  20. package/dist/api/cloudServices.js +715 -0
  21. package/dist/api/cloudServices.js.map +1 -0
  22. package/dist/api/insights.d.ts +123 -0
  23. package/dist/api/insights.d.ts.map +1 -0
  24. package/dist/api/insights.js +112 -0
  25. package/dist/api/insights.js.map +1 -0
  26. package/dist/api/plugin.d.ts +368 -0
  27. package/dist/api/plugin.d.ts.map +1 -0
  28. package/dist/api/plugin.js +218 -0
  29. package/dist/api/plugin.js.map +1 -0
  30. package/dist/api/serviceCatalog.d.ts +737 -0
  31. package/dist/api/serviceCatalog.d.ts.map +1 -0
  32. package/dist/api/serviceCatalog.js +611 -0
  33. package/dist/api/serviceCatalog.js.map +1 -0
  34. package/dist/api/workflows.d.ts +366 -0
  35. package/dist/api/workflows.d.ts.map +1 -0
  36. package/dist/api/workflows.js +175 -0
  37. package/dist/api/workflows.js.map +1 -0
  38. package/dist/api/workspace.js +1476 -0
  39. package/dist/api/workspace.js.map +1 -0
  40. package/dist/api/workspaceManager.d.ts +1121 -0
  41. package/dist/api/workspaceManager.d.ts.map +1 -0
  42. package/dist/api/workspaceManager.js +357 -0
  43. package/dist/api/workspaceManager.js.map +1 -0
  44. package/dist/api/workspaceSearchEngine.d.ts +93 -0
  45. package/dist/api/workspaceSearchEngine.d.ts.map +1 -0
  46. package/dist/api/workspaceSearchEngine.js +55 -0
  47. package/dist/api/workspaceSearchEngine.js.map +1 -0
  48. package/dist/apis.json +129 -0
  49. package/dist/client/account.d.ts +46 -0
  50. package/dist/client/account.d.ts.map +1 -0
  51. package/dist/client/account.js +104 -0
  52. package/dist/client/account.js.map +1 -0
  53. package/dist/error/CanceledError.d.ts +5 -0
  54. package/dist/error/CanceledError.d.ts.map +1 -0
  55. package/dist/error/CanceledError.js +7 -0
  56. package/dist/error/CanceledError.js.map +1 -0
  57. package/dist/error/DefaultAPIError.d.ts +9 -0
  58. package/dist/error/DefaultAPIError.d.ts.map +1 -0
  59. package/dist/error/DefaultAPIError.js +58 -0
  60. package/dist/error/DefaultAPIError.js.map +1 -0
  61. package/dist/error/StackspotAPIError.d.ts +19 -0
  62. package/dist/error/StackspotAPIError.d.ts.map +1 -0
  63. package/dist/error/StackspotAPIError.js +39 -0
  64. package/dist/error/StackspotAPIError.js.map +1 -0
  65. package/dist/error/dictionary/account.d.ts +55 -0
  66. package/dist/error/dictionary/account.d.ts.map +1 -0
  67. package/dist/error/dictionary/account.js +55 -0
  68. package/dist/error/dictionary/account.js.map +1 -0
  69. package/dist/error/dictionary/action.d.ts +163 -0
  70. package/dist/error/dictionary/action.d.ts.map +1 -0
  71. package/dist/error/dictionary/action.js +163 -0
  72. package/dist/error/dictionary/action.js.map +1 -0
  73. package/dist/error/dictionary/base.d.ts +21 -0
  74. package/dist/error/dictionary/base.d.ts.map +1 -0
  75. package/dist/error/dictionary/base.js +21 -0
  76. package/dist/error/dictionary/base.js.map +1 -0
  77. package/dist/error/dictionary/cnt-fields.d.ts +13 -0
  78. package/dist/error/dictionary/cnt-fields.d.ts.map +1 -0
  79. package/dist/error/dictionary/cnt-fields.js +13 -0
  80. package/dist/error/dictionary/cnt-fields.js.map +1 -0
  81. package/dist/error/dictionary/cnt.d.ts +79 -0
  82. package/dist/error/dictionary/cnt.d.ts.map +1 -0
  83. package/dist/error/dictionary/cnt.js +79 -0
  84. package/dist/error/dictionary/cnt.js.map +1 -0
  85. package/dist/error/dictionary/rte.d.ts +23 -0
  86. package/dist/error/dictionary/rte.d.ts.map +1 -0
  87. package/dist/error/dictionary/rte.js +23 -0
  88. package/dist/error/dictionary/rte.js.map +1 -0
  89. package/dist/error/dictionary/rtm.d.ts +9 -0
  90. package/dist/error/dictionary/rtm.d.ts.map +1 -0
  91. package/dist/error/dictionary/rtm.js +9 -0
  92. package/dist/error/dictionary/rtm.js.map +1 -0
  93. package/dist/error/dictionary/workspace-fields.d.ts +9 -0
  94. package/dist/error/dictionary/workspace-fields.d.ts.map +1 -0
  95. package/dist/error/dictionary/workspace-fields.js +9 -0
  96. package/dist/error/dictionary/workspace-fields.js.map +1 -0
  97. package/dist/error/dictionary/workspace.d.ts +99 -0
  98. package/dist/error/dictionary/workspace.d.ts.map +1 -0
  99. package/dist/error/dictionary/workspace.js +99 -0
  100. package/dist/error/dictionary/workspace.js.map +1 -0
  101. package/dist/index.d.ts +6 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +6 -0
  104. package/dist/index.js.map +1 -0
  105. package/dist/network/AutoMutation.d.ts +10 -0
  106. package/dist/network/AutoMutation.d.ts.map +1 -0
  107. package/dist/network/AutoMutation.js +20 -0
  108. package/dist/network/AutoMutation.js.map +1 -0
  109. package/dist/network/AutoOperation.d.ts +19 -0
  110. package/dist/network/AutoOperation.d.ts.map +1 -0
  111. package/dist/network/AutoOperation.js +99 -0
  112. package/dist/network/AutoOperation.js.map +1 -0
  113. package/dist/network/AutoQuery.d.ts +19 -0
  114. package/dist/network/AutoQuery.d.ts.map +1 -0
  115. package/dist/network/AutoQuery.js +70 -0
  116. package/dist/network/AutoQuery.js.map +1 -0
  117. package/dist/network/ManualMutation.d.ts +11 -0
  118. package/dist/network/ManualMutation.d.ts.map +1 -0
  119. package/dist/network/ManualMutation.js +32 -0
  120. package/dist/network/ManualMutation.js.map +1 -0
  121. package/dist/network/ManualOperation.d.ts +13 -0
  122. package/dist/network/ManualOperation.d.ts.map +1 -0
  123. package/dist/network/ManualOperation.js +53 -0
  124. package/dist/network/ManualOperation.js.map +1 -0
  125. package/dist/network/ManualQuery.d.ts +20 -0
  126. package/dist/network/ManualQuery.d.ts.map +1 -0
  127. package/dist/network/ManualQuery.js +77 -0
  128. package/dist/network/ManualQuery.js.map +1 -0
  129. package/dist/network/NetworkClient.d.ts +20 -0
  130. package/dist/network/NetworkClient.d.ts.map +1 -0
  131. package/dist/network/NetworkClient.js +85 -0
  132. package/dist/network/NetworkClient.js.map +1 -0
  133. package/dist/network/ReactQueryNetworkClient.d.ts +16 -0
  134. package/dist/network/ReactQueryNetworkClient.d.ts.map +1 -0
  135. package/dist/network/ReactQueryNetworkClient.js +125 -0
  136. package/dist/network/ReactQueryNetworkClient.js.map +1 -0
  137. package/dist/network/react-query-client.d.ts +3 -0
  138. package/dist/network/react-query-client.d.ts.map +1 -0
  139. package/dist/network/react-query-client.js +3 -0
  140. package/dist/network/react-query-client.js.map +1 -0
  141. package/dist/network/types.d.ts +55 -0
  142. package/dist/network/types.d.ts.map +1 -0
  143. package/dist/network/types.js +2 -0
  144. package/dist/network/types.js.map +1 -0
  145. package/package.json +56 -0
  146. package/readme.md +1 -0
  147. package/scripts/generate-apis.ts +134 -0
  148. package/src/api/account.ts +4793 -0
  149. package/src/api/ai.ts +3121 -0
  150. package/src/api/apiRuntime.ts +2029 -0
  151. package/src/api/cloudAccount.ts +1133 -0
  152. package/src/api/cloudServices.ts +2872 -0
  153. package/src/api/insights.ts +264 -0
  154. package/src/api/plugin.ts +685 -0
  155. package/src/api/serviceCatalog.ts +2908 -0
  156. package/src/api/workflows.ts +709 -0
  157. package/src/api/workspace.ts +5178 -0
  158. package/src/api/workspaceManager.ts +1516 -0
  159. package/src/api/workspaceSearchEngine.ts +153 -0
  160. package/src/apis.json +129 -0
  161. package/src/client/account.ts +52 -0
  162. package/src/error/CanceledError.ts +7 -0
  163. package/src/error/DefaultAPIError.ts +51 -0
  164. package/src/error/StackspotAPIError.ts +31 -0
  165. package/src/error/dictionary/account.ts +56 -0
  166. package/src/error/dictionary/action.ts +206 -0
  167. package/src/error/dictionary/base.ts +22 -0
  168. package/src/error/dictionary/cnt-fields.ts +14 -0
  169. package/src/error/dictionary/cnt.ts +80 -0
  170. package/src/error/dictionary/rte.ts +24 -0
  171. package/src/error/dictionary/rtm.ts +10 -0
  172. package/src/error/dictionary/workspace-fields.ts +10 -0
  173. package/src/error/dictionary/workspace.ts +100 -0
  174. package/src/index.ts +5 -0
  175. package/src/network/AutoMutation.ts +25 -0
  176. package/src/network/AutoOperation.ts +88 -0
  177. package/src/network/AutoQuery.ts +80 -0
  178. package/src/network/ManualMutation.ts +41 -0
  179. package/src/network/ManualOperation.ts +55 -0
  180. package/src/network/ManualQuery.ts +93 -0
  181. package/src/network/NetworkClient.ts +93 -0
  182. package/src/network/ReactQueryNetworkClient.ts +154 -0
  183. package/src/network/react-query-client.ts +3 -0
  184. package/src/network/types.ts +82 -0
  185. package/tsconfig.build.json +4 -0
  186. package/tsconfig.json +10 -0
package/src/api/ai.ts ADDED
@@ -0,0 +1,3121 @@
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 ValidationError = {
16
+ loc: (string | number)[];
17
+ msg: string;
18
+ "type": string;
19
+ };
20
+ export type HttpValidationError = {
21
+ detail?: ValidationError[];
22
+ };
23
+ export type AllowedAccessResponse = {
24
+ id: string;
25
+ username: string;
26
+ enabled: boolean;
27
+ };
28
+ export type GetAiStackResponse = {
29
+ id: string;
30
+ name: string;
31
+ use_case: string;
32
+ programming_language: string;
33
+ framework?: string;
34
+ test_framework?: string;
35
+ observability?: string;
36
+ patterns?: string[];
37
+ dependencies?: string[];
38
+ studio_id?: string;
39
+ image?: string;
40
+ cloud_provider?: string;
41
+ cloud_attributes?: string[];
42
+ creator?: string;
43
+ visibility_level: string;
44
+ };
45
+ export type NewAiStackRequest = {
46
+ name: string;
47
+ use_case: string;
48
+ programming_language: string;
49
+ framework?: string;
50
+ test_framework?: string;
51
+ observability?: string;
52
+ patterns?: string[];
53
+ dependencies?: string[];
54
+ image?: string;
55
+ cloud_provider?: string;
56
+ cloud_attributes?: string[];
57
+ };
58
+ export type NewAiStackResponse = {
59
+ id: string;
60
+ };
61
+ export type UpdateAiStackRequest = {
62
+ name?: string;
63
+ use_case?: string;
64
+ programming_language?: string;
65
+ framework?: string;
66
+ test_framework?: string;
67
+ observability?: string;
68
+ patterns?: string[];
69
+ dependencies?: string[];
70
+ image?: string;
71
+ cloud_provider?: string;
72
+ cloud_attributes?: string[];
73
+ };
74
+ export type AiStacksDependenciesResponse = {
75
+ studios?: string[];
76
+ workspaces?: string[];
77
+ };
78
+ export type AddAiStackToWorkspaceRequest = {
79
+ ai_stack_id: string;
80
+ };
81
+ export type AiStacksFromWorkspaceResponse = {
82
+ id: string;
83
+ name: string;
84
+ use_case: string;
85
+ programming_language: string;
86
+ framework?: string;
87
+ test_framework?: string;
88
+ observability?: string;
89
+ patterns?: string[];
90
+ dependencies?: string[];
91
+ image?: string;
92
+ cloud_provider?: string;
93
+ cloud_attributes?: string[];
94
+ creator?: string;
95
+ };
96
+ export type VisibilityLevelEnum = "account" | "personal";
97
+ export type OrderEnum = "a-to-z" | "z-to-a" | "oldest-first" | "newest-first";
98
+ export type AiStackForkRequest = {
99
+ name: string;
100
+ description?: string;
101
+ };
102
+ export type ShareContentRequest = {
103
+ visibility: "account";
104
+ };
105
+ export type NewProjectFilesRequest = {
106
+ context?: object;
107
+ project_id: string;
108
+ encoded_project_files: string;
109
+ };
110
+ export type CodeUnderstandingRequest = {
111
+ context?: object;
112
+ project_id: string;
113
+ user_prompt: string;
114
+ };
115
+ export type SourceStackAi = {
116
+ "type": "ai_stack";
117
+ name: string;
118
+ id: string;
119
+ };
120
+ export type SourceKnowledgeSource = {
121
+ "type": "knowledge_source";
122
+ name: string;
123
+ slug: string;
124
+ document_type?: string;
125
+ document_score: number;
126
+ document_id: string;
127
+ };
128
+ export type SourceProjectFile = {
129
+ "type": "project_file";
130
+ path: string;
131
+ document_score: number;
132
+ };
133
+ export type CodeUnderstandingResponse = {
134
+ answer: string;
135
+ prompt_tokens: number;
136
+ completion_tokens: number;
137
+ total_cost?: number;
138
+ input?: string;
139
+ sources: (SourceStackAi | SourceKnowledgeSource | SourceProjectFile)[];
140
+ };
141
+ export type CodeScanRequest = {
142
+ context?: object;
143
+ project_id: string;
144
+ };
145
+ export type QuickActionsRequest = {
146
+ context?: object;
147
+ action: string;
148
+ code: string;
149
+ };
150
+ export type SimpleResponse = {
151
+ answer: string;
152
+ prompt_tokens: number;
153
+ completion_tokens: number;
154
+ total_cost?: number;
155
+ };
156
+ export type ChatRequest = {
157
+ context?: object;
158
+ user_prompt: string;
159
+ project_id?: string;
160
+ };
161
+ export type ChatResponse = {
162
+ answer: string;
163
+ prompt_tokens: number;
164
+ completion_tokens: number;
165
+ total_cost?: number;
166
+ sources: (SourceStackAi | SourceKnowledgeSource | SourceProjectFile)[];
167
+ };
168
+ export type AutocompleteCodeGeneratorRequest = {
169
+ context?: object;
170
+ code_to_complete: string;
171
+ };
172
+ export type EventTypeEnum = "code_injected" | "code_copied" | "custom_quick_command_execution" | "user_feedback_provided";
173
+ export type QuickCommandEvent = {
174
+ slug: string;
175
+ "type": string;
176
+ duration_execution: number;
177
+ status_execution: string;
178
+ message_error?: string;
179
+ tokens_consumed?: string;
180
+ execution_id?: string;
181
+ };
182
+ export type UserFeedbackProvidedEventRequest = {
183
+ context?: object;
184
+ "type": EventTypeEnum;
185
+ knowledge_sources?: (string | SourceStackAi | SourceKnowledgeSource | SourceProjectFile)[];
186
+ code: string;
187
+ size: number;
188
+ generated_at: number;
189
+ quick_command_event?: QuickCommandEvent;
190
+ feedback: "LIKE" | "DISLIKE";
191
+ chosen_feedback_options?: string[];
192
+ additional_feedback?: string;
193
+ message_id?: string;
194
+ };
195
+ export type GenericEventRequest = {
196
+ context?: object;
197
+ "type": EventTypeEnum;
198
+ knowledge_sources?: (string | SourceStackAi | SourceKnowledgeSource | SourceProjectFile)[];
199
+ code: string;
200
+ size: number;
201
+ generated_at: number;
202
+ quick_command_event?: QuickCommandEvent;
203
+ };
204
+ export type FileUploadType = "PROJECT" | "KNOWLEDGE_SOURCE";
205
+ export type NewFileUploadUrlRequest = {
206
+ file_name: string;
207
+ target_id: string;
208
+ target_type: FileUploadType;
209
+ expiration?: number;
210
+ };
211
+ export type NewFileUploadUrlResponse = {
212
+ id: string;
213
+ upload_url: string;
214
+ };
215
+ export type NewFileUploadFormResponse = {
216
+ id: string;
217
+ url: string;
218
+ form: {
219
+ [key: string]: string;
220
+ };
221
+ };
222
+ export type FileUploadStatus = "NEW" | "PROCESSING" | "INDEXED" | "EXPIRED" | "ERROR" | "INDEXED_BUT_CLEANUP_FAILED";
223
+ export type SummaryPartResponse = {
224
+ added: number;
225
+ preserved: number;
226
+ removed: number;
227
+ errors: {
228
+ [key: string]: string;
229
+ };
230
+ };
231
+ export type FileUploadStatusResponse = {
232
+ id: string;
233
+ file_name: string;
234
+ target_id: string;
235
+ target_type: FileUploadType;
236
+ status: FileUploadStatus;
237
+ error_description?: string;
238
+ summary?: SummaryPartResponse;
239
+ };
240
+ export type KnowledgeSourceTypeEnum = "snippet" | "api" | "event" | "custom" | "project_file" | "memory";
241
+ export type KnowledgeSourceItemResponse = {
242
+ slug: string;
243
+ name: string;
244
+ description: string;
245
+ "type": string;
246
+ object_count: number;
247
+ creator?: string;
248
+ visibility_level: string;
249
+ };
250
+ export type NewKnowledgeSourceRequest = {
251
+ slug: string;
252
+ name: string;
253
+ description: string;
254
+ "type": "API" | "SNIPPET" | "CUSTOM";
255
+ };
256
+ export type KnowledgeSourceResponse = {
257
+ slug: string;
258
+ name: string;
259
+ description: string;
260
+ "type": string;
261
+ creator?: string;
262
+ "default": boolean;
263
+ visibility_level: string;
264
+ };
265
+ export type KnowledgeSourcePatchesRequest = {
266
+ name: string;
267
+ description: string;
268
+ };
269
+ export type KnowledgeSourceDependenciesResponse = {
270
+ workspaces?: string[];
271
+ };
272
+ export type KnowledgeSourceSimilaritySearchItemResponse = {
273
+ doc: string;
274
+ score: number;
275
+ file_path?: string;
276
+ };
277
+ export type ForkKnowledgeSourceRequest = {
278
+ slug: string;
279
+ name: string;
280
+ description: string;
281
+ };
282
+ export type DocumentResponse = {
283
+ page_content: string;
284
+ metadata: object;
285
+ };
286
+ export type BodyVectorizeObjectsFromFileV1KnowledgeSourcesSlugObjectsPost = {
287
+ upload: Blob;
288
+ };
289
+ export type BodyUploadKnowledgeObjectsZipV1KnowledgeSourcesSlugObjectsBatchPost = {
290
+ objects_zip: Blob;
291
+ };
292
+ export type SnippetKnowledgeSourceRequest = {
293
+ use_case: string;
294
+ code: string;
295
+ language?: string;
296
+ };
297
+ export type CustomKnowledgeSourceRequest = {
298
+ content: string;
299
+ };
300
+ export type AccountSettingsChangeLlmRequest = {
301
+ llm_type?: string;
302
+ llm_data?: object;
303
+ };
304
+ export type AccountSettingsChangeLimitRequest = {
305
+ limit: number;
306
+ };
307
+ export type TokensCurrentUsageResponse = {
308
+ used: number;
309
+ limit: number;
310
+ renewal_date: string;
311
+ };
312
+ export type TokensMonthlyUsageResponse = {
313
+ used: number;
314
+ month: number;
315
+ };
316
+ export type AddWorkspaceKnowledgeSourceRequest = {
317
+ knowledge_source_slugs: string[];
318
+ };
319
+ export type QuickCommandTypeRequest = "IDE" | "REMOTE";
320
+ export type Method = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE";
321
+ export type QuickCommandsStepFetchRequest = {
322
+ slug: string;
323
+ knowledge_source_slugs?: string[];
324
+ url: string;
325
+ method: Method;
326
+ headers?: {
327
+ [key: string]: string;
328
+ };
329
+ data?: string;
330
+ };
331
+ export type QuickCommandsStepPromptRequest = {
332
+ slug: string;
333
+ knowledge_source_slugs?: string[];
334
+ prompt: string;
335
+ use_stack?: boolean;
336
+ use_project_files?: boolean;
337
+ };
338
+ export type QuickCommandsReturnType = "CHAT" | "REPLACE_CODE" | "BEFORE_CODE" | "AFTER_CODE";
339
+ export type CustomInputRequest = {
340
+ slug: string;
341
+ question: string;
342
+ mandatory?: boolean;
343
+ };
344
+ export type QuickCommandsCreateRequest = {
345
+ slug: string;
346
+ name: string;
347
+ "type"?: QuickCommandTypeRequest;
348
+ description: string;
349
+ final_result: string;
350
+ steps: (QuickCommandsStepFetchRequest | QuickCommandsStepPromptRequest)[];
351
+ return_type?: QuickCommandsReturnType;
352
+ preserve_conversation?: boolean;
353
+ custom_inputs?: CustomInputRequest[];
354
+ flow?: object;
355
+ };
356
+ export type QuickCommandListResponse = {
357
+ slug: string;
358
+ name: string;
359
+ "type": QuickCommandTypeRequest;
360
+ description: string;
361
+ studio_id?: string;
362
+ flow?: object;
363
+ preserve_conversation: boolean;
364
+ use_selected_code: boolean;
365
+ return_type?: QuickCommandsReturnType;
366
+ creator?: string;
367
+ visibility_level: string;
368
+ };
369
+ export type BaseContextualRequest = {
370
+ context?: object;
371
+ };
372
+ export type QuickCommandReturnType = "CHAT" | "REPLACE_CODE" | "BEFORE_CODE" | "AFTER_CODE";
373
+ export type QuickCommandStepType = "LLM" | "FETCH";
374
+ export type Method2 = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
375
+ export type QuickCommandStepFetchResponse = {
376
+ slug: string;
377
+ "type": QuickCommandStepType;
378
+ url: string;
379
+ method: Method2;
380
+ headers?: {
381
+ [key: string]: string;
382
+ };
383
+ data?: string;
384
+ };
385
+ export type QuickCommandStepType2 = "LLM" | "FETCH";
386
+ export type QuickCommandStepLlmResponse = {
387
+ slug: string;
388
+ "type": QuickCommandStepType2;
389
+ knowledge_source_slugs?: string[];
390
+ prompt: string;
391
+ use_stack?: boolean;
392
+ use_project_files?: boolean;
393
+ };
394
+ export type CustomInputResponse = {
395
+ slug: string;
396
+ question: string;
397
+ mandatory?: boolean;
398
+ };
399
+ export type QuickCommandResponse = {
400
+ slug: string;
401
+ name?: string;
402
+ "type"?: QuickCommandTypeRequest;
403
+ description?: string;
404
+ studio_id?: string;
405
+ return_type?: QuickCommandReturnType;
406
+ final_result?: string;
407
+ steps?: (QuickCommandStepFetchResponse | QuickCommandStepLlmResponse)[];
408
+ flow?: object;
409
+ preserve_conversation?: boolean;
410
+ use_selected_code?: boolean;
411
+ creator?: string;
412
+ custom_inputs?: CustomInputResponse[];
413
+ visibility_level: string;
414
+ };
415
+ export type QuickCommandsUpdateRequest = {
416
+ name?: string;
417
+ description?: string;
418
+ steps?: (QuickCommandsStepFetchRequest | QuickCommandsStepPromptRequest)[];
419
+ return_type?: QuickCommandsReturnType;
420
+ knowledge_source_slugs?: string[];
421
+ final_result?: string;
422
+ preserve_conversation?: boolean;
423
+ custom_inputs?: CustomInputRequest[];
424
+ flow?: object;
425
+ };
426
+ export type QuickCommandsMakeACopyRequest = {
427
+ suggested_slug: string;
428
+ name: string;
429
+ description: string;
430
+ };
431
+ export type QuickCommandDependenciesResponse = {
432
+ studios?: string[];
433
+ workspaces?: string[];
434
+ };
435
+ export type QuickCommandFetchResponseResult = {
436
+ headers?: {
437
+ [key: string]: string;
438
+ };
439
+ data?: string;
440
+ status: number;
441
+ };
442
+ export type QuickCommandsExecutionRequest = {
443
+ context?: object;
444
+ /** This field is deprecated and will be removed in future releases. Use 'input_data' instead. */
445
+ code_selection?: string;
446
+ input_data?: string;
447
+ slugs_executions?: {
448
+ [key: string]: SimpleResponse | QuickCommandFetchResponseResult;
449
+ };
450
+ };
451
+ export type QuickCommandFinalResultResponse = {
452
+ result: string;
453
+ };
454
+ export type QuickCommandCreateRequest = {
455
+ input_data?: string | object;
456
+ ai_stack_id?: string;
457
+ custom_inputs?: object;
458
+ };
459
+ export type Progress = {
460
+ start: string;
461
+ end?: string;
462
+ duration?: number;
463
+ execution_percentage: number;
464
+ status: string;
465
+ };
466
+ export type StepFetch = {
467
+ status_code: number;
468
+ headers?: {
469
+ [key: string]: string;
470
+ };
471
+ data?: string;
472
+ json_data?: object;
473
+ };
474
+ export type StepLlm = {
475
+ answer: string;
476
+ sources: (SourceStackAi | SourceKnowledgeSource | SourceProjectFile)[];
477
+ };
478
+ export type Step = {
479
+ step_name: string;
480
+ execution_order: number;
481
+ "type": QuickCommandStepType2;
482
+ step_result: StepFetch | StepLlm;
483
+ };
484
+ export type QuickCommandExecutionResponse = {
485
+ execution_id: string;
486
+ quick_command_slug: string;
487
+ conversation_id: string;
488
+ progress: Progress;
489
+ steps?: Step[];
490
+ result?: string;
491
+ };
492
+ export type ImportContentType = "ai_stack" | "knowledge_source" | "quick_command";
493
+ export type ImportPublicContent = {
494
+ "type": ImportContentType;
495
+ content_id: string;
496
+ content_slug_name: string;
497
+ studio_id?: string;
498
+ workspace_ids?: string[];
499
+ };
500
+ export type ContentVisibility = "private" | "public";
501
+ export type ChangeContentVisibility = {
502
+ visibility: ContentVisibility;
503
+ };
504
+ export type ConversationHistoryAgentEnum = "AI" | "USER";
505
+ export type ConversationHistoryResponse = {
506
+ message_id: string;
507
+ agent: ConversationHistoryAgentEnum;
508
+ content: string;
509
+ sources: any[];
510
+ updated: string;
511
+ };
512
+ export type ConversationResponse = {
513
+ id: string;
514
+ title: string;
515
+ workspace_id?: string;
516
+ ai_stack_id?: string;
517
+ created?: string;
518
+ updated?: string;
519
+ history?: ConversationHistoryResponse[];
520
+ };
521
+ export type ConversationUpdateTitleRequest = {
522
+ title: string;
523
+ };
524
+ export type BodyUploadKnowledgeObjectsZipV1DefaultKnowledgeSourcesSlugObjectsBatchPost = {
525
+ objects_zip: Blob;
526
+ };
527
+ export type ChatRequest2 = {
528
+ context?: object;
529
+ user_prompt: string;
530
+ project_id?: string;
531
+ };
532
+ export type SourceStackAi2 = {
533
+ "type": "ai_stack";
534
+ name: string;
535
+ id: string;
536
+ };
537
+ export type SourceKnowledgeSource2 = {
538
+ "type": "knowledge_source";
539
+ name: string;
540
+ slug: string;
541
+ document_type: string;
542
+ document_score: number;
543
+ document_id: string;
544
+ };
545
+ export type SourceProjectFile2 = {
546
+ "type": "project_file";
547
+ path: string;
548
+ document_score: number;
549
+ };
550
+ export type ChatResponse2 = {
551
+ answer: string;
552
+ sources: (SourceStackAi2 | SourceKnowledgeSource2 | SourceProjectFile2)[];
553
+ };
554
+ export type BodyVectorizeObjectsFromFileV2KnowledgeSourcesSlugObjectsPost = {
555
+ upload: Blob;
556
+ };
557
+ export type SyncResponse = {
558
+ added: number;
559
+ preserved: number;
560
+ removed: number;
561
+ errors?: {
562
+ [key: string]: string;
563
+ };
564
+ };
565
+ export type BodyUploadKnowledgeObjectsZipV2KnowledgeSourcesSlugObjectsBatchPost = {
566
+ objects_zip: Blob;
567
+ };
568
+ export type SourceStackAi3 = {
569
+ "type": "ai_stack";
570
+ name: string;
571
+ id: string;
572
+ };
573
+ export type SourceKnowledgeSource3 = {
574
+ "type": "knowledge_source";
575
+ name: string;
576
+ slug: string;
577
+ document_type: string;
578
+ document_score: number;
579
+ document_id: string;
580
+ };
581
+ export type SourceProjectFile3 = {
582
+ "type": "project_file";
583
+ path: string;
584
+ document_score: number;
585
+ };
586
+ export type ChatResponse3 = {
587
+ answer: string;
588
+ sources: (SourceStackAi3 | SourceKnowledgeSource3 | SourceProjectFile3)[];
589
+ message_id?: string;
590
+ };
591
+ /**
592
+ * Metrics
593
+ */
594
+ export function metricsMetricsGet(opts?: Oazapfts.RequestOpts) {
595
+ return oazapfts.ok(oazapfts.fetchJson<{
596
+ status: 200;
597
+ data: any;
598
+ }>("/metrics", {
599
+ ...opts
600
+ }));
601
+ }
602
+ /**
603
+ * Request Access
604
+ */
605
+ export function requestAccessV1AllowedAccessRequestAccessPost({ authorization, xAccountId }: {
606
+ authorization: string;
607
+ xAccountId?: string;
608
+ }, opts?: Oazapfts.RequestOpts) {
609
+ return oazapfts.ok(oazapfts.fetchJson<{
610
+ status: 201;
611
+ data: any;
612
+ } | {
613
+ status: 404;
614
+ } | {
615
+ status: 422;
616
+ data: HttpValidationError;
617
+ }>("/v1/allowed-access/request-access", {
618
+ ...opts,
619
+ method: "POST",
620
+ headers: oazapfts.mergeHeaders(opts?.headers, {
621
+ authorization,
622
+ "x-account-id": xAccountId
623
+ })
624
+ }));
625
+ }
626
+ /**
627
+ * Get By Username
628
+ */
629
+ export function getByUsernameV1AllowedAccessGet({ authorization, xAccountId }: {
630
+ authorization: string;
631
+ xAccountId?: string;
632
+ }, opts?: Oazapfts.RequestOpts) {
633
+ return oazapfts.ok(oazapfts.fetchJson<{
634
+ status: 200;
635
+ data: AllowedAccessResponse;
636
+ } | {
637
+ status: 404;
638
+ } | {
639
+ status: 422;
640
+ data: HttpValidationError;
641
+ }>("/v1/allowed-access/", {
642
+ ...opts,
643
+ headers: oazapfts.mergeHeaders(opts?.headers, {
644
+ authorization,
645
+ "x-account-id": xAccountId
646
+ })
647
+ }));
648
+ }
649
+ /**
650
+ * List Ai Stacks By Studio
651
+ */
652
+ export function listAiStacksByStudioV1StudiosStudioIdAiStacksGet({ studioId, authorization, xAccountId }: {
653
+ studioId: string;
654
+ authorization: string;
655
+ xAccountId?: string;
656
+ }, opts?: Oazapfts.RequestOpts) {
657
+ return oazapfts.ok(oazapfts.fetchJson<{
658
+ status: 200;
659
+ data: GetAiStackResponse[];
660
+ } | {
661
+ status: 404;
662
+ } | {
663
+ status: 422;
664
+ data: HttpValidationError;
665
+ }>(`/v1/studios/${encodeURIComponent(studioId)}/ai-stacks`, {
666
+ ...opts,
667
+ headers: oazapfts.mergeHeaders(opts?.headers, {
668
+ authorization,
669
+ "x-account-id": xAccountId
670
+ })
671
+ }));
672
+ }
673
+ /**
674
+ * Create Ai Stack
675
+ */
676
+ export function createAiStackV1StudiosStudioIdAiStacksPost({ studioId, authorization, xAccountId, newAiStackRequest }: {
677
+ studioId: string;
678
+ authorization: string;
679
+ xAccountId?: string;
680
+ newAiStackRequest: NewAiStackRequest;
681
+ }, opts?: Oazapfts.RequestOpts) {
682
+ return oazapfts.ok(oazapfts.fetchJson<{
683
+ status: 201;
684
+ data: NewAiStackResponse;
685
+ } | {
686
+ status: 404;
687
+ } | {
688
+ status: 422;
689
+ data: HttpValidationError;
690
+ }>(`/v1/studios/${encodeURIComponent(studioId)}/ai-stacks`, oazapfts.json({
691
+ ...opts,
692
+ method: "POST",
693
+ body: newAiStackRequest,
694
+ headers: oazapfts.mergeHeaders(opts?.headers, {
695
+ authorization,
696
+ "x-account-id": xAccountId
697
+ })
698
+ })));
699
+ }
700
+ /**
701
+ * Get Ai Stack
702
+ */
703
+ export function getAiStackV1StudiosStudioIdAiStacksStackIdGet({ studioId, stackId, authorization, xAccountId }: {
704
+ studioId: string;
705
+ stackId: string;
706
+ authorization: string;
707
+ xAccountId?: string;
708
+ }, opts?: Oazapfts.RequestOpts) {
709
+ return oazapfts.ok(oazapfts.fetchJson<{
710
+ status: 200;
711
+ data: GetAiStackResponse;
712
+ } | {
713
+ status: 404;
714
+ } | {
715
+ status: 422;
716
+ data: HttpValidationError;
717
+ }>(`/v1/studios/${encodeURIComponent(studioId)}/ai-stacks/${encodeURIComponent(stackId)}`, {
718
+ ...opts,
719
+ headers: oazapfts.mergeHeaders(opts?.headers, {
720
+ authorization,
721
+ "x-account-id": xAccountId
722
+ })
723
+ }));
724
+ }
725
+ /**
726
+ * Remove Ai Stack
727
+ */
728
+ export function removeAiStackV1StudiosStudioIdAiStacksStackIdDelete({ studioId, stackId, authorization, xAccountId }: {
729
+ studioId: string;
730
+ stackId: string;
731
+ authorization: string;
732
+ xAccountId?: string;
733
+ }, opts?: Oazapfts.RequestOpts) {
734
+ return oazapfts.ok(oazapfts.fetchJson<{
735
+ status: 200;
736
+ data: any;
737
+ } | {
738
+ status: 404;
739
+ } | {
740
+ status: 422;
741
+ data: HttpValidationError;
742
+ }>(`/v1/studios/${encodeURIComponent(studioId)}/ai-stacks/${encodeURIComponent(stackId)}`, {
743
+ ...opts,
744
+ method: "DELETE",
745
+ headers: oazapfts.mergeHeaders(opts?.headers, {
746
+ authorization,
747
+ "x-account-id": xAccountId
748
+ })
749
+ }));
750
+ }
751
+ /**
752
+ * Update Ai Stack
753
+ */
754
+ export function updateAiStackV1StudiosStudioIdAiStacksStackIdPatch({ studioId, stackId, authorization, xAccountId, updateAiStackRequest }: {
755
+ studioId: string;
756
+ stackId: string;
757
+ authorization: string;
758
+ xAccountId?: string;
759
+ updateAiStackRequest: UpdateAiStackRequest;
760
+ }, opts?: Oazapfts.RequestOpts) {
761
+ return oazapfts.ok(oazapfts.fetchJson<{
762
+ status: 204;
763
+ } | {
764
+ status: 404;
765
+ } | {
766
+ status: 422;
767
+ data: HttpValidationError;
768
+ }>(`/v1/studios/${encodeURIComponent(studioId)}/ai-stacks/${encodeURIComponent(stackId)}`, oazapfts.json({
769
+ ...opts,
770
+ method: "PATCH",
771
+ body: updateAiStackRequest,
772
+ headers: oazapfts.mergeHeaders(opts?.headers, {
773
+ authorization,
774
+ "x-account-id": xAccountId
775
+ })
776
+ })));
777
+ }
778
+ /**
779
+ * Find Knowledge Source Dependencies
780
+ */
781
+ export function findKnowledgeSourceDependenciesV1StudiosStudioIdAiStacksStackIdDependenciesGet({ studioId, stackId, authorization, xAccountId }: {
782
+ studioId: string;
783
+ stackId: string;
784
+ authorization: string;
785
+ xAccountId?: string;
786
+ }, opts?: Oazapfts.RequestOpts) {
787
+ return oazapfts.ok(oazapfts.fetchJson<{
788
+ status: 200;
789
+ data: AiStacksDependenciesResponse;
790
+ } | {
791
+ status: 404;
792
+ } | {
793
+ status: 422;
794
+ data: HttpValidationError;
795
+ }>(`/v1/studios/${encodeURIComponent(studioId)}/ai-stacks/${encodeURIComponent(stackId)}/dependencies`, {
796
+ ...opts,
797
+ headers: oazapfts.mergeHeaders(opts?.headers, {
798
+ authorization,
799
+ "x-account-id": xAccountId
800
+ })
801
+ }));
802
+ }
803
+ /**
804
+ * Add Ai Stack To Workspace
805
+ */
806
+ export function addAiStackToWorkspaceV1WorkspacesWorkspaceIdAddAiStackPost({ workspaceId, authorization, xAccountId, addAiStackToWorkspaceRequest }: {
807
+ workspaceId: string;
808
+ authorization: string;
809
+ xAccountId?: string;
810
+ addAiStackToWorkspaceRequest: AddAiStackToWorkspaceRequest;
811
+ }, opts?: Oazapfts.RequestOpts) {
812
+ return oazapfts.ok(oazapfts.fetchJson<{
813
+ status: 204;
814
+ } | {
815
+ status: 404;
816
+ } | {
817
+ status: 422;
818
+ data: HttpValidationError;
819
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/add-ai-stack`, oazapfts.json({
820
+ ...opts,
821
+ method: "POST",
822
+ body: addAiStackToWorkspaceRequest,
823
+ headers: oazapfts.mergeHeaders(opts?.headers, {
824
+ authorization,
825
+ "x-account-id": xAccountId
826
+ })
827
+ })));
828
+ }
829
+ /**
830
+ * List Ai Stacks From Workspace
831
+ */
832
+ export function listAiStacksFromWorkspaceV1WorkspacesWorkspaceIdAiStacksGet({ workspaceId, authorization, xAccountId }: {
833
+ workspaceId: string;
834
+ authorization: string;
835
+ xAccountId?: string;
836
+ }, opts?: Oazapfts.RequestOpts) {
837
+ return oazapfts.ok(oazapfts.fetchJson<{
838
+ status: 200;
839
+ data: AiStacksFromWorkspaceResponse[];
840
+ } | {
841
+ status: 404;
842
+ } | {
843
+ status: 422;
844
+ data: HttpValidationError;
845
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/ai-stacks`, {
846
+ ...opts,
847
+ headers: oazapfts.mergeHeaders(opts?.headers, {
848
+ authorization,
849
+ "x-account-id": xAccountId
850
+ })
851
+ }));
852
+ }
853
+ /**
854
+ * Find Ai Stack In Workspace
855
+ */
856
+ export function findAiStackInWorkspaceV1WorkspacesWorkspaceIdAiStacksStackIdGet({ workspaceId, stackId, authorization, xAccountId }: {
857
+ workspaceId: string;
858
+ stackId: string;
859
+ authorization: string;
860
+ xAccountId?: string;
861
+ }, opts?: Oazapfts.RequestOpts) {
862
+ return oazapfts.ok(oazapfts.fetchJson<{
863
+ status: 200;
864
+ data: AiStacksFromWorkspaceResponse;
865
+ } | {
866
+ status: 404;
867
+ } | {
868
+ status: 422;
869
+ data: HttpValidationError;
870
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/ai-stacks/${encodeURIComponent(stackId)}`, {
871
+ ...opts,
872
+ headers: oazapfts.mergeHeaders(opts?.headers, {
873
+ authorization,
874
+ "x-account-id": xAccountId
875
+ })
876
+ }));
877
+ }
878
+ /**
879
+ * Remove Ai Stack From Workspace
880
+ */
881
+ export function removeAiStackFromWorkspaceV1WorkspacesWorkspaceIdAiStacksStackIdDelete({ workspaceId, stackId, authorization, xAccountId }: {
882
+ workspaceId: string;
883
+ stackId: string;
884
+ authorization: string;
885
+ xAccountId?: string;
886
+ }, opts?: Oazapfts.RequestOpts) {
887
+ return oazapfts.ok(oazapfts.fetchJson<{
888
+ status: 200;
889
+ data: any;
890
+ } | {
891
+ status: 404;
892
+ } | {
893
+ status: 422;
894
+ data: HttpValidationError;
895
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/ai-stacks/${encodeURIComponent(stackId)}`, {
896
+ ...opts,
897
+ method: "DELETE",
898
+ headers: oazapfts.mergeHeaders(opts?.headers, {
899
+ authorization,
900
+ "x-account-id": xAccountId
901
+ })
902
+ }));
903
+ }
904
+ /**
905
+ * List Ai Stacks
906
+ */
907
+ export function listAiStacksV1AiStacksGet({ visibility, order, authorization, xAccountId }: {
908
+ visibility?: VisibilityLevelEnum;
909
+ order?: OrderEnum;
910
+ authorization: string;
911
+ xAccountId?: string;
912
+ }, opts?: Oazapfts.RequestOpts) {
913
+ return oazapfts.ok(oazapfts.fetchJson<{
914
+ status: 200;
915
+ data: GetAiStackResponse[];
916
+ } | {
917
+ status: 404;
918
+ } | {
919
+ status: 422;
920
+ data: HttpValidationError;
921
+ }>(`/v1/ai-stacks${QS.query(QS.explode({
922
+ visibility,
923
+ order
924
+ }))}`, {
925
+ ...opts,
926
+ headers: oazapfts.mergeHeaders(opts?.headers, {
927
+ authorization,
928
+ "x-account-id": xAccountId
929
+ })
930
+ }));
931
+ }
932
+ /**
933
+ * Create Ai Stack
934
+ */
935
+ export function createAiStackV1AiStacksPost({ authorization, xAccountId, newAiStackRequest }: {
936
+ authorization: string;
937
+ xAccountId?: string;
938
+ newAiStackRequest: NewAiStackRequest;
939
+ }, opts?: Oazapfts.RequestOpts) {
940
+ return oazapfts.ok(oazapfts.fetchJson<{
941
+ status: 201;
942
+ data: NewAiStackResponse;
943
+ } | {
944
+ status: 404;
945
+ } | {
946
+ status: 422;
947
+ data: HttpValidationError;
948
+ }>("/v1/ai-stacks", oazapfts.json({
949
+ ...opts,
950
+ method: "POST",
951
+ body: newAiStackRequest,
952
+ headers: oazapfts.mergeHeaders(opts?.headers, {
953
+ authorization,
954
+ "x-account-id": xAccountId
955
+ })
956
+ })));
957
+ }
958
+ /**
959
+ * Get Ai Stack
960
+ */
961
+ export function getAiStackV1AiStacksStackIdGet({ stackId, authorization, xAccountId }: {
962
+ stackId: string;
963
+ authorization: string;
964
+ xAccountId?: string;
965
+ }, opts?: Oazapfts.RequestOpts) {
966
+ return oazapfts.ok(oazapfts.fetchJson<{
967
+ status: 200;
968
+ data: GetAiStackResponse;
969
+ } | {
970
+ status: 404;
971
+ } | {
972
+ status: 422;
973
+ data: HttpValidationError;
974
+ }>(`/v1/ai-stacks/${encodeURIComponent(stackId)}`, {
975
+ ...opts,
976
+ headers: oazapfts.mergeHeaders(opts?.headers, {
977
+ authorization,
978
+ "x-account-id": xAccountId
979
+ })
980
+ }));
981
+ }
982
+ /**
983
+ * Remove Ai Stack
984
+ */
985
+ export function removeAiStackV1AiStacksStackIdDelete({ stackId, authorization, xAccountId }: {
986
+ stackId: string;
987
+ authorization: string;
988
+ xAccountId?: string;
989
+ }, opts?: Oazapfts.RequestOpts) {
990
+ return oazapfts.ok(oazapfts.fetchJson<{
991
+ status: 200;
992
+ data: any;
993
+ } | {
994
+ status: 404;
995
+ } | {
996
+ status: 422;
997
+ data: HttpValidationError;
998
+ }>(`/v1/ai-stacks/${encodeURIComponent(stackId)}`, {
999
+ ...opts,
1000
+ method: "DELETE",
1001
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1002
+ authorization,
1003
+ "x-account-id": xAccountId
1004
+ })
1005
+ }));
1006
+ }
1007
+ /**
1008
+ * Update Ai Stack
1009
+ */
1010
+ export function updateAiStackV1AiStacksStackIdPatch({ stackId, authorization, xAccountId, updateAiStackRequest }: {
1011
+ stackId: string;
1012
+ authorization: string;
1013
+ xAccountId?: string;
1014
+ updateAiStackRequest: UpdateAiStackRequest;
1015
+ }, opts?: Oazapfts.RequestOpts) {
1016
+ return oazapfts.ok(oazapfts.fetchJson<{
1017
+ status: 204;
1018
+ } | {
1019
+ status: 404;
1020
+ } | {
1021
+ status: 422;
1022
+ data: HttpValidationError;
1023
+ }>(`/v1/ai-stacks/${encodeURIComponent(stackId)}`, oazapfts.json({
1024
+ ...opts,
1025
+ method: "PATCH",
1026
+ body: updateAiStackRequest,
1027
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1028
+ authorization,
1029
+ "x-account-id": xAccountId
1030
+ })
1031
+ })));
1032
+ }
1033
+ /**
1034
+ * Fork
1035
+ */
1036
+ export function forkV1AiStacksStackIdForkPost({ stackId, authorization, xAccountId, aiStackForkRequest }: {
1037
+ stackId: string;
1038
+ authorization: string;
1039
+ xAccountId?: string;
1040
+ aiStackForkRequest: AiStackForkRequest;
1041
+ }, opts?: Oazapfts.RequestOpts) {
1042
+ return oazapfts.ok(oazapfts.fetchJson<{
1043
+ status: 200;
1044
+ data: NewAiStackResponse;
1045
+ } | {
1046
+ status: 404;
1047
+ } | {
1048
+ status: 422;
1049
+ data: HttpValidationError;
1050
+ }>(`/v1/ai-stacks/${encodeURIComponent(stackId)}/fork`, oazapfts.json({
1051
+ ...opts,
1052
+ method: "POST",
1053
+ body: aiStackForkRequest,
1054
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1055
+ authorization,
1056
+ "x-account-id": xAccountId
1057
+ })
1058
+ })));
1059
+ }
1060
+ /**
1061
+ * Share
1062
+ */
1063
+ export function shareV1AiStacksStackIdSharePost({ stackId, authorization, xAccountId, shareContentRequest }: {
1064
+ stackId: string;
1065
+ authorization: string;
1066
+ xAccountId?: string;
1067
+ shareContentRequest: ShareContentRequest;
1068
+ }, opts?: Oazapfts.RequestOpts) {
1069
+ return oazapfts.ok(oazapfts.fetchJson<{
1070
+ status: 204;
1071
+ } | {
1072
+ status: 404;
1073
+ } | {
1074
+ status: 422;
1075
+ data: HttpValidationError;
1076
+ }>(`/v1/ai-stacks/${encodeURIComponent(stackId)}/share`, oazapfts.json({
1077
+ ...opts,
1078
+ method: "POST",
1079
+ body: shareContentRequest,
1080
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1081
+ authorization,
1082
+ "x-account-id": xAccountId
1083
+ })
1084
+ })));
1085
+ }
1086
+ /**
1087
+ * Project Files
1088
+ */
1089
+ export function projectFilesV1ProjectFilesPost({ authorization, xAccountId, newProjectFilesRequest }: {
1090
+ authorization: string;
1091
+ xAccountId?: string;
1092
+ newProjectFilesRequest: NewProjectFilesRequest;
1093
+ }, opts?: Oazapfts.RequestOpts) {
1094
+ return oazapfts.ok(oazapfts.fetchJson<{
1095
+ status: 202;
1096
+ data: any;
1097
+ } | {
1098
+ status: 404;
1099
+ } | {
1100
+ status: 422;
1101
+ data: HttpValidationError;
1102
+ }>("/v1/project-files", oazapfts.json({
1103
+ ...opts,
1104
+ method: "POST",
1105
+ body: newProjectFilesRequest,
1106
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1107
+ authorization,
1108
+ "x-account-id": xAccountId
1109
+ })
1110
+ })));
1111
+ }
1112
+ /**
1113
+ * Code Understanding Assistant
1114
+ */
1115
+ export function codeUnderstandingAssistantV1CodeUnderstandingAssistantPost({ authorization, xAccountId, codeUnderstandingRequest }: {
1116
+ authorization: string;
1117
+ xAccountId?: string;
1118
+ codeUnderstandingRequest: CodeUnderstandingRequest;
1119
+ }, opts?: Oazapfts.RequestOpts) {
1120
+ return oazapfts.ok(oazapfts.fetchJson<{
1121
+ status: 200;
1122
+ data: CodeUnderstandingResponse;
1123
+ } | {
1124
+ status: 404;
1125
+ } | {
1126
+ status: 422;
1127
+ data: HttpValidationError;
1128
+ }>("/v1/code-understanding-assistant", oazapfts.json({
1129
+ ...opts,
1130
+ method: "POST",
1131
+ body: codeUnderstandingRequest,
1132
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1133
+ authorization,
1134
+ "x-account-id": xAccountId
1135
+ })
1136
+ })));
1137
+ }
1138
+ /**
1139
+ * Code Scan
1140
+ */
1141
+ export function codeScanV1CodeScanPost({ authorization, xAccountId, codeScanRequest }: {
1142
+ authorization: string;
1143
+ xAccountId?: string;
1144
+ codeScanRequest: CodeScanRequest;
1145
+ }, opts?: Oazapfts.RequestOpts) {
1146
+ return oazapfts.ok(oazapfts.fetchJson<{
1147
+ status: 200;
1148
+ data: CodeUnderstandingResponse[];
1149
+ } | {
1150
+ status: 404;
1151
+ } | {
1152
+ status: 422;
1153
+ data: HttpValidationError;
1154
+ }>("/v1/code-scan", oazapfts.json({
1155
+ ...opts,
1156
+ method: "POST",
1157
+ body: codeScanRequest,
1158
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1159
+ authorization,
1160
+ "x-account-id": xAccountId
1161
+ })
1162
+ })));
1163
+ }
1164
+ /**
1165
+ * Quick Actions
1166
+ */
1167
+ export function quickActionsV1QuickActionsPost({ authorization, xAccountId, quickActionsRequest }: {
1168
+ authorization: string;
1169
+ xAccountId?: string;
1170
+ quickActionsRequest: QuickActionsRequest;
1171
+ }, opts?: Oazapfts.RequestOpts) {
1172
+ return oazapfts.ok(oazapfts.fetchJson<{
1173
+ status: 200;
1174
+ data: SimpleResponse;
1175
+ } | {
1176
+ status: 404;
1177
+ } | {
1178
+ status: 422;
1179
+ data: HttpValidationError;
1180
+ }>("/v1/quick-actions", oazapfts.json({
1181
+ ...opts,
1182
+ method: "POST",
1183
+ body: quickActionsRequest,
1184
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1185
+ authorization,
1186
+ "x-account-id": xAccountId
1187
+ })
1188
+ })));
1189
+ }
1190
+ /**
1191
+ * Dev Assistant
1192
+ */
1193
+ export function devAssistantV1ChatPost({ authorization, xAccountId, codeBuddyApiV1SchemasChatRequest }: {
1194
+ authorization: string;
1195
+ xAccountId?: string;
1196
+ codeBuddyApiV1SchemasChatRequest: ChatRequest;
1197
+ }, opts?: Oazapfts.RequestOpts) {
1198
+ return oazapfts.ok(oazapfts.fetchJson<{
1199
+ status: 200;
1200
+ data: ChatResponse;
1201
+ } | {
1202
+ status: 404;
1203
+ } | {
1204
+ status: 422;
1205
+ data: HttpValidationError;
1206
+ }>("/v1/chat", oazapfts.json({
1207
+ ...opts,
1208
+ method: "POST",
1209
+ body: codeBuddyApiV1SchemasChatRequest,
1210
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1211
+ authorization,
1212
+ "x-account-id": xAccountId
1213
+ })
1214
+ })));
1215
+ }
1216
+ /**
1217
+ * Autocomplete Code Generator
1218
+ */
1219
+ export function autocompleteCodeGeneratorV1AutocompletePost({ authorization, xAccountId, autocompleteCodeGeneratorRequest }: {
1220
+ authorization: string;
1221
+ xAccountId?: string;
1222
+ autocompleteCodeGeneratorRequest: AutocompleteCodeGeneratorRequest;
1223
+ }, opts?: Oazapfts.RequestOpts) {
1224
+ return oazapfts.ok(oazapfts.fetchJson<{
1225
+ status: 200;
1226
+ data: SimpleResponse;
1227
+ } | {
1228
+ status: 404;
1229
+ } | {
1230
+ status: 422;
1231
+ data: HttpValidationError;
1232
+ }>("/v1/autocomplete", oazapfts.json({
1233
+ ...opts,
1234
+ method: "POST",
1235
+ body: autocompleteCodeGeneratorRequest,
1236
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1237
+ authorization,
1238
+ "x-account-id": xAccountId
1239
+ })
1240
+ })));
1241
+ }
1242
+ /**
1243
+ * Post Event
1244
+ */
1245
+ export function postEventV1EventsPost({ authorization, xAccountId, body }: {
1246
+ authorization: string;
1247
+ xAccountId?: string;
1248
+ body: (UserFeedbackProvidedEventRequest | GenericEventRequest)[];
1249
+ }, opts?: Oazapfts.RequestOpts) {
1250
+ return oazapfts.ok(oazapfts.fetchJson<{
1251
+ status: 204;
1252
+ } | {
1253
+ status: 404;
1254
+ } | {
1255
+ status: 422;
1256
+ data: HttpValidationError;
1257
+ }>("/v1/events", oazapfts.json({
1258
+ ...opts,
1259
+ method: "POST",
1260
+ body,
1261
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1262
+ authorization,
1263
+ "x-account-id": xAccountId
1264
+ })
1265
+ })));
1266
+ }
1267
+ /**
1268
+ * Get Upload Url
1269
+ */
1270
+ export function getUploadUrlV1FileUploadUrlPost({ authorization, xAccountId, newFileUploadUrlRequest }: {
1271
+ authorization: string;
1272
+ xAccountId?: string;
1273
+ newFileUploadUrlRequest: NewFileUploadUrlRequest;
1274
+ }, opts?: Oazapfts.RequestOpts) {
1275
+ return oazapfts.ok(oazapfts.fetchJson<{
1276
+ status: 201;
1277
+ data: NewFileUploadUrlResponse;
1278
+ } | {
1279
+ status: 404;
1280
+ } | {
1281
+ status: 422;
1282
+ data: HttpValidationError;
1283
+ }>("/v1/file-upload/url", oazapfts.json({
1284
+ ...opts,
1285
+ method: "POST",
1286
+ body: newFileUploadUrlRequest,
1287
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1288
+ authorization,
1289
+ "x-account-id": xAccountId
1290
+ })
1291
+ })));
1292
+ }
1293
+ /**
1294
+ * Get Upload Form
1295
+ */
1296
+ export function getUploadFormV1FileUploadFormPost({ authorization, xAccountId, newFileUploadUrlRequest }: {
1297
+ authorization: string;
1298
+ xAccountId?: string;
1299
+ newFileUploadUrlRequest: NewFileUploadUrlRequest;
1300
+ }, opts?: Oazapfts.RequestOpts) {
1301
+ return oazapfts.ok(oazapfts.fetchJson<{
1302
+ status: 201;
1303
+ data: NewFileUploadFormResponse;
1304
+ } | {
1305
+ status: 404;
1306
+ } | {
1307
+ status: 422;
1308
+ data: HttpValidationError;
1309
+ }>("/v1/file-upload/form", oazapfts.json({
1310
+ ...opts,
1311
+ method: "POST",
1312
+ body: newFileUploadUrlRequest,
1313
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1314
+ authorization,
1315
+ "x-account-id": xAccountId
1316
+ })
1317
+ })));
1318
+ }
1319
+ /**
1320
+ * Get File Upload Status
1321
+ */
1322
+ export function getFileUploadStatusV1FileUploadFileUploadIdGet({ fileUploadId, authorization, xAccountId }: {
1323
+ fileUploadId: string;
1324
+ authorization: string;
1325
+ xAccountId?: string;
1326
+ }, opts?: Oazapfts.RequestOpts) {
1327
+ return oazapfts.ok(oazapfts.fetchJson<{
1328
+ status: 200;
1329
+ data: FileUploadStatusResponse;
1330
+ } | {
1331
+ status: 404;
1332
+ } | {
1333
+ status: 422;
1334
+ data: HttpValidationError;
1335
+ }>(`/v1/file-upload/${encodeURIComponent(fileUploadId)}`, {
1336
+ ...opts,
1337
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1338
+ authorization,
1339
+ "x-account-id": xAccountId
1340
+ })
1341
+ }));
1342
+ }
1343
+ /**
1344
+ * Report Health
1345
+ */
1346
+ export function reportHealthHealthzGet(opts?: Oazapfts.RequestOpts) {
1347
+ return oazapfts.ok(oazapfts.fetchJson<{
1348
+ status: 200;
1349
+ data: any;
1350
+ } | {
1351
+ status: 404;
1352
+ }>("/healthz", {
1353
+ ...opts
1354
+ }));
1355
+ }
1356
+ /**
1357
+ * List Knowledge Sources
1358
+ */
1359
+ export function listKnowledgeSourcesV1KnowledgeSourcesGet({ visibility, order, $default, types, authorization, xAccountId }: {
1360
+ visibility?: VisibilityLevelEnum;
1361
+ order?: OrderEnum;
1362
+ $default?: boolean;
1363
+ types?: KnowledgeSourceTypeEnum[];
1364
+ authorization: string;
1365
+ xAccountId?: string;
1366
+ }, opts?: Oazapfts.RequestOpts) {
1367
+ return oazapfts.ok(oazapfts.fetchJson<{
1368
+ status: 200;
1369
+ data: KnowledgeSourceItemResponse[];
1370
+ } | {
1371
+ status: 404;
1372
+ } | {
1373
+ status: 422;
1374
+ data: HttpValidationError;
1375
+ }>(`/v1/knowledge-sources${QS.query(QS.explode({
1376
+ visibility,
1377
+ order,
1378
+ "default": $default,
1379
+ types
1380
+ }))}`, {
1381
+ ...opts,
1382
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1383
+ authorization,
1384
+ "x-account-id": xAccountId
1385
+ })
1386
+ }));
1387
+ }
1388
+ /**
1389
+ * Create Knowledge Source
1390
+ */
1391
+ export function createKnowledgeSourceV1KnowledgeSourcesPost({ authorization, xAccountId, newKnowledgeSourceRequest }: {
1392
+ authorization: string;
1393
+ xAccountId?: string;
1394
+ newKnowledgeSourceRequest: NewKnowledgeSourceRequest;
1395
+ }, opts?: Oazapfts.RequestOpts) {
1396
+ return oazapfts.ok(oazapfts.fetchJson<{
1397
+ status: 204;
1398
+ } | {
1399
+ status: 404;
1400
+ } | {
1401
+ status: 422;
1402
+ data: HttpValidationError;
1403
+ }>("/v1/knowledge-sources", oazapfts.json({
1404
+ ...opts,
1405
+ method: "POST",
1406
+ body: newKnowledgeSourceRequest,
1407
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1408
+ authorization,
1409
+ "x-account-id": xAccountId
1410
+ })
1411
+ })));
1412
+ }
1413
+ /**
1414
+ * Find Knowledge Source
1415
+ */
1416
+ export function findKnowledgeSourceV1KnowledgeSourcesSlugGet({ slug, authorization, xAccountId }: {
1417
+ slug: string;
1418
+ authorization: string;
1419
+ xAccountId?: string;
1420
+ }, opts?: Oazapfts.RequestOpts) {
1421
+ return oazapfts.ok(oazapfts.fetchJson<{
1422
+ status: 200;
1423
+ data: KnowledgeSourceResponse;
1424
+ } | {
1425
+ status: 404;
1426
+ } | {
1427
+ status: 422;
1428
+ data: HttpValidationError;
1429
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, {
1430
+ ...opts,
1431
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1432
+ authorization,
1433
+ "x-account-id": xAccountId
1434
+ })
1435
+ }));
1436
+ }
1437
+ /**
1438
+ * Delete Knowledge Source
1439
+ */
1440
+ export function deleteKnowledgeSourceV1KnowledgeSourcesSlugDelete({ slug, authorization, xAccountId }: {
1441
+ slug: string;
1442
+ authorization: string;
1443
+ xAccountId?: string;
1444
+ }, opts?: Oazapfts.RequestOpts) {
1445
+ return oazapfts.ok(oazapfts.fetchJson<{
1446
+ status: 204;
1447
+ } | {
1448
+ status: 404;
1449
+ } | {
1450
+ status: 422;
1451
+ data: HttpValidationError;
1452
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, {
1453
+ ...opts,
1454
+ method: "DELETE",
1455
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1456
+ authorization,
1457
+ "x-account-id": xAccountId
1458
+ })
1459
+ }));
1460
+ }
1461
+ /**
1462
+ * Update Knowledge Source
1463
+ */
1464
+ export function updateKnowledgeSourceV1KnowledgeSourcesSlugPatch({ slug, authorization, xAccountId, knowledgeSourcePatchesRequest }: {
1465
+ slug: string;
1466
+ authorization: string;
1467
+ xAccountId?: string;
1468
+ knowledgeSourcePatchesRequest: KnowledgeSourcePatchesRequest;
1469
+ }, opts?: Oazapfts.RequestOpts) {
1470
+ return oazapfts.ok(oazapfts.fetchJson<{
1471
+ status: 204;
1472
+ } | {
1473
+ status: 404;
1474
+ } | {
1475
+ status: 422;
1476
+ data: HttpValidationError;
1477
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}`, oazapfts.json({
1478
+ ...opts,
1479
+ method: "PATCH",
1480
+ body: knowledgeSourcePatchesRequest,
1481
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1482
+ authorization,
1483
+ "x-account-id": xAccountId
1484
+ })
1485
+ })));
1486
+ }
1487
+ /**
1488
+ * Find Knowledge Source Dependencies
1489
+ */
1490
+ export function findKnowledgeSourceDependenciesV1KnowledgeSourcesSlugDependenciesGet({ slug, authorization, xAccountId }: {
1491
+ slug: string;
1492
+ authorization: string;
1493
+ xAccountId?: string;
1494
+ }, opts?: Oazapfts.RequestOpts) {
1495
+ return oazapfts.ok(oazapfts.fetchJson<{
1496
+ status: 200;
1497
+ data: KnowledgeSourceDependenciesResponse;
1498
+ } | {
1499
+ status: 404;
1500
+ } | {
1501
+ status: 422;
1502
+ data: HttpValidationError;
1503
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/dependencies`, {
1504
+ ...opts,
1505
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1506
+ authorization,
1507
+ "x-account-id": xAccountId
1508
+ })
1509
+ }));
1510
+ }
1511
+ /**
1512
+ * Search
1513
+ */
1514
+ export function searchV1KnowledgeSourcesSlugSimilaritySearchGet({ slug, q, size, authorization, xAccountId }: {
1515
+ slug: string;
1516
+ q: string;
1517
+ size?: number;
1518
+ authorization: string;
1519
+ xAccountId?: string;
1520
+ }, opts?: Oazapfts.RequestOpts) {
1521
+ return oazapfts.ok(oazapfts.fetchJson<{
1522
+ status: 200;
1523
+ data: KnowledgeSourceSimilaritySearchItemResponse[];
1524
+ } | {
1525
+ status: 404;
1526
+ } | {
1527
+ status: 422;
1528
+ data: HttpValidationError;
1529
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/similarity-search${QS.query(QS.explode({
1530
+ q,
1531
+ size
1532
+ }))}`, {
1533
+ ...opts,
1534
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1535
+ authorization,
1536
+ "x-account-id": xAccountId
1537
+ })
1538
+ }));
1539
+ }
1540
+ /**
1541
+ * Share Knowledge Source
1542
+ */
1543
+ export function shareKnowledgeSourceV1KnowledgeSourcesSlugSharePost({ slug, authorization, xAccountId }: {
1544
+ slug: string;
1545
+ authorization: string;
1546
+ xAccountId?: string;
1547
+ }, opts?: Oazapfts.RequestOpts) {
1548
+ return oazapfts.ok(oazapfts.fetchJson<{
1549
+ status: 204;
1550
+ } | {
1551
+ status: 404;
1552
+ } | {
1553
+ status: 422;
1554
+ data: HttpValidationError;
1555
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/share`, {
1556
+ ...opts,
1557
+ method: "POST",
1558
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1559
+ authorization,
1560
+ "x-account-id": xAccountId
1561
+ })
1562
+ }));
1563
+ }
1564
+ /**
1565
+ * Configure Knowledge Source Default Flag
1566
+ */
1567
+ export function configureKnowledgeSourceDefaultFlagV1KnowledgeSourcesSlugDefaultPut({ slug, value, authorization, xAccountId }: {
1568
+ slug: string;
1569
+ value: boolean;
1570
+ authorization: string;
1571
+ xAccountId?: string;
1572
+ }, opts?: Oazapfts.RequestOpts) {
1573
+ return oazapfts.ok(oazapfts.fetchJson<{
1574
+ status: 204;
1575
+ } | {
1576
+ status: 404;
1577
+ } | {
1578
+ status: 422;
1579
+ data: HttpValidationError;
1580
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/default${QS.query(QS.explode({
1581
+ value
1582
+ }))}`, {
1583
+ ...opts,
1584
+ method: "PUT",
1585
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1586
+ authorization,
1587
+ "x-account-id": xAccountId
1588
+ })
1589
+ }));
1590
+ }
1591
+ /**
1592
+ * Fork Knowledge Source
1593
+ */
1594
+ export function forkKnowledgeSourceV1KnowledgeSourcesSlugForkPost({ slug, authorization, xAccountId, forkKnowledgeSourceRequest }: {
1595
+ slug: string;
1596
+ authorization: string;
1597
+ xAccountId?: string;
1598
+ forkKnowledgeSourceRequest: ForkKnowledgeSourceRequest;
1599
+ }, opts?: Oazapfts.RequestOpts) {
1600
+ return oazapfts.ok(oazapfts.fetchJson<{
1601
+ status: 204;
1602
+ } | {
1603
+ status: 404;
1604
+ } | {
1605
+ status: 422;
1606
+ data: HttpValidationError;
1607
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/fork`, oazapfts.json({
1608
+ ...opts,
1609
+ method: "POST",
1610
+ body: forkKnowledgeSourceRequest,
1611
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1612
+ authorization,
1613
+ "x-account-id": xAccountId
1614
+ })
1615
+ })));
1616
+ }
1617
+ /**
1618
+ * List Knowledge Objects
1619
+ */
1620
+ export function listKnowledgeObjectsV1KnowledgeSourcesSlugObjectsGet({ slug, standalone, authorization, xAccountId }: {
1621
+ slug: string;
1622
+ standalone?: boolean;
1623
+ authorization: string;
1624
+ xAccountId?: string;
1625
+ }, opts?: Oazapfts.RequestOpts) {
1626
+ return oazapfts.ok(oazapfts.fetchJson<{
1627
+ status: 200;
1628
+ data: DocumentResponse[];
1629
+ } | {
1630
+ status: 404;
1631
+ } | {
1632
+ status: 422;
1633
+ data: HttpValidationError;
1634
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/objects${QS.query(QS.explode({
1635
+ standalone
1636
+ }))}`, {
1637
+ ...opts,
1638
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1639
+ authorization,
1640
+ "x-account-id": xAccountId
1641
+ })
1642
+ }));
1643
+ }
1644
+ /**
1645
+ * Vectorize Objects From File
1646
+ */
1647
+ export function vectorizeObjectsFromFileV1KnowledgeSourcesSlugObjectsPost({ slug, authorization, xAccountId, bodyVectorizeObjectsFromFileV1KnowledgeSourcesSlugObjectsPost }: {
1648
+ slug: string;
1649
+ authorization: string;
1650
+ xAccountId?: string;
1651
+ bodyVectorizeObjectsFromFileV1KnowledgeSourcesSlugObjectsPost: BodyVectorizeObjectsFromFileV1KnowledgeSourcesSlugObjectsPost;
1652
+ }, opts?: Oazapfts.RequestOpts) {
1653
+ return oazapfts.ok(oazapfts.fetchJson<{
1654
+ status: 204;
1655
+ } | {
1656
+ status: 404;
1657
+ } | {
1658
+ status: 422;
1659
+ data: HttpValidationError;
1660
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/objects`, oazapfts.multipart({
1661
+ ...opts,
1662
+ method: "POST",
1663
+ body: bodyVectorizeObjectsFromFileV1KnowledgeSourcesSlugObjectsPost,
1664
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1665
+ authorization,
1666
+ "x-account-id": xAccountId
1667
+ })
1668
+ })));
1669
+ }
1670
+ /**
1671
+ * Reset Knowledge Objects
1672
+ */
1673
+ export function resetKnowledgeObjectsV1KnowledgeSourcesSlugObjectsDelete({ slug, standalone, authorization, xAccountId }: {
1674
+ slug: string;
1675
+ standalone?: boolean;
1676
+ authorization: string;
1677
+ xAccountId?: string;
1678
+ }, opts?: Oazapfts.RequestOpts) {
1679
+ return oazapfts.ok(oazapfts.fetchJson<{
1680
+ status: 204;
1681
+ } | {
1682
+ status: 404;
1683
+ } | {
1684
+ status: 422;
1685
+ data: HttpValidationError;
1686
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/objects${QS.query(QS.explode({
1687
+ standalone
1688
+ }))}`, {
1689
+ ...opts,
1690
+ method: "DELETE",
1691
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1692
+ authorization,
1693
+ "x-account-id": xAccountId
1694
+ })
1695
+ }));
1696
+ }
1697
+ /**
1698
+ * Upload Knowledge Objects Zip
1699
+ */
1700
+ export function uploadKnowledgeObjectsZipV1KnowledgeSourcesSlugObjectsBatchPost({ slug, autoDelete, authorization, xAccountId, bodyUploadKnowledgeObjectsZipV1KnowledgeSourcesSlugObjectsBatchPost }: {
1701
+ slug: string;
1702
+ autoDelete?: boolean;
1703
+ authorization: string;
1704
+ xAccountId?: string;
1705
+ bodyUploadKnowledgeObjectsZipV1KnowledgeSourcesSlugObjectsBatchPost: BodyUploadKnowledgeObjectsZipV1KnowledgeSourcesSlugObjectsBatchPost;
1706
+ }, opts?: Oazapfts.RequestOpts) {
1707
+ return oazapfts.ok(oazapfts.fetchJson<{
1708
+ status: 204;
1709
+ } | {
1710
+ status: 404;
1711
+ } | {
1712
+ status: 422;
1713
+ data: HttpValidationError;
1714
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/objects/batch${QS.query(QS.explode({
1715
+ "auto-delete": autoDelete
1716
+ }))}`, oazapfts.multipart({
1717
+ ...opts,
1718
+ method: "POST",
1719
+ body: bodyUploadKnowledgeObjectsZipV1KnowledgeSourcesSlugObjectsBatchPost,
1720
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1721
+ authorization,
1722
+ "x-account-id": xAccountId
1723
+ })
1724
+ })));
1725
+ }
1726
+ /**
1727
+ * Find Knowledge Object By Custom Id
1728
+ */
1729
+ export function findKnowledgeObjectByCustomIdV1KnowledgeSourcesSlugObjectsCustomIdGet({ slug, customId, authorization, xAccountId }: {
1730
+ slug: string;
1731
+ customId: string;
1732
+ authorization: string;
1733
+ xAccountId?: string;
1734
+ }, opts?: Oazapfts.RequestOpts) {
1735
+ return oazapfts.ok(oazapfts.fetchJson<{
1736
+ status: 200;
1737
+ data: DocumentResponse;
1738
+ } | {
1739
+ status: 404;
1740
+ } | {
1741
+ status: 422;
1742
+ data: HttpValidationError;
1743
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/objects/${encodeURIComponent(customId)}`, {
1744
+ ...opts,
1745
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1746
+ authorization,
1747
+ "x-account-id": xAccountId
1748
+ })
1749
+ }));
1750
+ }
1751
+ /**
1752
+ * Delete Knowledge Object By Custom Id
1753
+ */
1754
+ export function deleteKnowledgeObjectByCustomIdV1KnowledgeSourcesSlugObjectsCustomIdDelete({ customId, slug, authorization, xAccountId }: {
1755
+ customId: string;
1756
+ slug: string;
1757
+ authorization: string;
1758
+ xAccountId?: string;
1759
+ }, opts?: Oazapfts.RequestOpts) {
1760
+ return oazapfts.ok(oazapfts.fetchJson<{
1761
+ status: 204;
1762
+ } | {
1763
+ status: 404;
1764
+ } | {
1765
+ status: 422;
1766
+ data: HttpValidationError;
1767
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/objects/${encodeURIComponent(customId)}`, {
1768
+ ...opts,
1769
+ method: "DELETE",
1770
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1771
+ authorization,
1772
+ "x-account-id": xAccountId
1773
+ })
1774
+ }));
1775
+ }
1776
+ /**
1777
+ * Find Snippet Doc By Custom Id
1778
+ */
1779
+ export function findSnippetDocByCustomIdV1KnowledgeSourcesSlugSnippetsIdGet({ slug, id, authorization, xAccountId }: {
1780
+ slug: string;
1781
+ id: string;
1782
+ authorization: string;
1783
+ xAccountId?: string;
1784
+ }, opts?: Oazapfts.RequestOpts) {
1785
+ return oazapfts.ok(oazapfts.fetchJson<{
1786
+ status: 200;
1787
+ data: DocumentResponse;
1788
+ } | {
1789
+ status: 404;
1790
+ } | {
1791
+ status: 422;
1792
+ data: HttpValidationError;
1793
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/snippets/${encodeURIComponent(id)}`, {
1794
+ ...opts,
1795
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1796
+ authorization,
1797
+ "x-account-id": xAccountId
1798
+ })
1799
+ }));
1800
+ }
1801
+ /**
1802
+ * Vectorize Snippet Knowledge Source
1803
+ */
1804
+ export function vectorizeSnippetKnowledgeSourceV1KnowledgeSourcesSlugSnippetsPost({ slug, authorization, xAccountId, snippetKnowledgeSourceRequest }: {
1805
+ slug: string;
1806
+ authorization: string;
1807
+ xAccountId?: string;
1808
+ snippetKnowledgeSourceRequest: SnippetKnowledgeSourceRequest;
1809
+ }, opts?: Oazapfts.RequestOpts) {
1810
+ return oazapfts.ok(oazapfts.fetchJson<{
1811
+ status: 204;
1812
+ } | {
1813
+ status: 404;
1814
+ } | {
1815
+ status: 422;
1816
+ data: HttpValidationError;
1817
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/snippets`, oazapfts.json({
1818
+ ...opts,
1819
+ method: "POST",
1820
+ body: snippetKnowledgeSourceRequest,
1821
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1822
+ authorization,
1823
+ "x-account-id": xAccountId
1824
+ })
1825
+ })));
1826
+ }
1827
+ /**
1828
+ * Find Api Doc By Custom Id
1829
+ */
1830
+ export function findApiDocByCustomIdV1KnowledgeSourcesSlugApisIdGet({ slug, id, authorization, xAccountId }: {
1831
+ slug: string;
1832
+ id: string;
1833
+ authorization: string;
1834
+ xAccountId?: string;
1835
+ }, opts?: Oazapfts.RequestOpts) {
1836
+ return oazapfts.ok(oazapfts.fetchJson<{
1837
+ status: 200;
1838
+ data: DocumentResponse;
1839
+ } | {
1840
+ status: 404;
1841
+ } | {
1842
+ status: 422;
1843
+ data: HttpValidationError;
1844
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/apis/${encodeURIComponent(id)}`, {
1845
+ ...opts,
1846
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1847
+ authorization,
1848
+ "x-account-id": xAccountId
1849
+ })
1850
+ }));
1851
+ }
1852
+ /**
1853
+ * Vectorize Api Knowledge Source
1854
+ */
1855
+ export function vectorizeApiKnowledgeSourceV1KnowledgeSourcesSlugApisPost({ slug, authorization, xAccountId, body }: {
1856
+ slug: string;
1857
+ authorization: string;
1858
+ xAccountId?: string;
1859
+ body: object;
1860
+ }, opts?: Oazapfts.RequestOpts) {
1861
+ return oazapfts.ok(oazapfts.fetchJson<{
1862
+ status: 204;
1863
+ } | {
1864
+ status: 404;
1865
+ } | {
1866
+ status: 422;
1867
+ data: HttpValidationError;
1868
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/apis`, oazapfts.json({
1869
+ ...opts,
1870
+ method: "POST",
1871
+ body,
1872
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1873
+ authorization,
1874
+ "x-account-id": xAccountId
1875
+ })
1876
+ })));
1877
+ }
1878
+ /**
1879
+ * Find Event Doc By Custom Id
1880
+ */
1881
+ export function findEventDocByCustomIdV1KnowledgeSourcesSlugEventsIdGet({ slug, id, authorization, xAccountId }: {
1882
+ slug: string;
1883
+ id: string;
1884
+ authorization: string;
1885
+ xAccountId?: string;
1886
+ }, opts?: Oazapfts.RequestOpts) {
1887
+ return oazapfts.ok(oazapfts.fetchJson<{
1888
+ status: 200;
1889
+ data: DocumentResponse;
1890
+ } | {
1891
+ status: 404;
1892
+ } | {
1893
+ status: 422;
1894
+ data: HttpValidationError;
1895
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/events/${encodeURIComponent(id)}`, {
1896
+ ...opts,
1897
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1898
+ authorization,
1899
+ "x-account-id": xAccountId
1900
+ })
1901
+ }));
1902
+ }
1903
+ /**
1904
+ * Vectorize Event Knowledge Source
1905
+ */
1906
+ export function vectorizeEventKnowledgeSourceV1KnowledgeSourcesSlugEventsPost({ slug, authorization, xAccountId, body }: {
1907
+ slug: string;
1908
+ authorization: string;
1909
+ xAccountId?: string;
1910
+ body: object;
1911
+ }, opts?: Oazapfts.RequestOpts) {
1912
+ return oazapfts.ok(oazapfts.fetchJson<{
1913
+ status: 204;
1914
+ } | {
1915
+ status: 404;
1916
+ } | {
1917
+ status: 422;
1918
+ data: HttpValidationError;
1919
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/events`, oazapfts.json({
1920
+ ...opts,
1921
+ method: "POST",
1922
+ body,
1923
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1924
+ authorization,
1925
+ "x-account-id": xAccountId
1926
+ })
1927
+ })));
1928
+ }
1929
+ /**
1930
+ * Find Custom Doc By Custom Id
1931
+ */
1932
+ export function findCustomDocByCustomIdV1KnowledgeSourcesSlugCustomIdGet({ slug, id, authorization, xAccountId }: {
1933
+ slug: string;
1934
+ id: string;
1935
+ authorization: string;
1936
+ xAccountId?: string;
1937
+ }, opts?: Oazapfts.RequestOpts) {
1938
+ return oazapfts.ok(oazapfts.fetchJson<{
1939
+ status: 200;
1940
+ data: DocumentResponse;
1941
+ } | {
1942
+ status: 404;
1943
+ } | {
1944
+ status: 422;
1945
+ data: HttpValidationError;
1946
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/custom/${encodeURIComponent(id)}`, {
1947
+ ...opts,
1948
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1949
+ authorization,
1950
+ "x-account-id": xAccountId
1951
+ })
1952
+ }));
1953
+ }
1954
+ /**
1955
+ * Vectorize Custom Knowledge Source
1956
+ */
1957
+ export function vectorizeCustomKnowledgeSourceV1KnowledgeSourcesSlugCustomPost({ slug, authorization, xAccountId, customKnowledgeSourceRequest }: {
1958
+ slug: string;
1959
+ authorization: string;
1960
+ xAccountId?: string;
1961
+ customKnowledgeSourceRequest: CustomKnowledgeSourceRequest;
1962
+ }, opts?: Oazapfts.RequestOpts) {
1963
+ return oazapfts.ok(oazapfts.fetchJson<{
1964
+ status: 204;
1965
+ } | {
1966
+ status: 404;
1967
+ } | {
1968
+ status: 422;
1969
+ data: HttpValidationError;
1970
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/custom`, oazapfts.json({
1971
+ ...opts,
1972
+ method: "POST",
1973
+ body: customKnowledgeSourceRequest,
1974
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1975
+ authorization,
1976
+ "x-account-id": xAccountId
1977
+ })
1978
+ })));
1979
+ }
1980
+ /**
1981
+ * Sync Embedding Model
1982
+ */
1983
+ export function syncEmbeddingModelV1KnowledgeSourcesSyncPost(opts?: Oazapfts.RequestOpts) {
1984
+ return oazapfts.ok(oazapfts.fetchJson<{
1985
+ status: 202;
1986
+ data: any;
1987
+ } | {
1988
+ status: 404;
1989
+ }>("/v1/knowledge-sources/sync", {
1990
+ ...opts,
1991
+ method: "POST"
1992
+ }));
1993
+ }
1994
+ /**
1995
+ * Change Llm
1996
+ */
1997
+ export function changeLlmV1AccountsLlmPatch({ authorization, xAccountId, accountSettingsChangeLlmRequest }: {
1998
+ authorization: string;
1999
+ xAccountId?: string;
2000
+ accountSettingsChangeLlmRequest: AccountSettingsChangeLlmRequest;
2001
+ }, opts?: Oazapfts.RequestOpts) {
2002
+ return oazapfts.ok(oazapfts.fetchJson<{
2003
+ status: 204;
2004
+ } | {
2005
+ status: 404;
2006
+ } | {
2007
+ status: 422;
2008
+ data: HttpValidationError;
2009
+ }>("/v1/accounts/llm", oazapfts.json({
2010
+ ...opts,
2011
+ method: "PATCH",
2012
+ body: accountSettingsChangeLlmRequest,
2013
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2014
+ authorization,
2015
+ "x-account-id": xAccountId
2016
+ })
2017
+ })));
2018
+ }
2019
+ /**
2020
+ * Change Limit
2021
+ */
2022
+ export function changeLimitV1AccountsTokenLimitsPut({ authorization, xAccountId, accountSettingsChangeLimitRequest }: {
2023
+ authorization: string;
2024
+ xAccountId?: string;
2025
+ accountSettingsChangeLimitRequest: AccountSettingsChangeLimitRequest;
2026
+ }, opts?: Oazapfts.RequestOpts) {
2027
+ return oazapfts.ok(oazapfts.fetchJson<{
2028
+ status: 204;
2029
+ } | {
2030
+ status: 404;
2031
+ } | {
2032
+ status: 422;
2033
+ data: HttpValidationError;
2034
+ }>("/v1/accounts/token-limits", oazapfts.json({
2035
+ ...opts,
2036
+ method: "PUT",
2037
+ body: accountSettingsChangeLimitRequest,
2038
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2039
+ authorization,
2040
+ "x-account-id": xAccountId
2041
+ })
2042
+ })));
2043
+ }
2044
+ /**
2045
+ * Reset Limit
2046
+ */
2047
+ export function resetLimitV1AccountsTokenLimitsDelete({ authorization, xAccountId }: {
2048
+ authorization: string;
2049
+ xAccountId?: string;
2050
+ }, opts?: Oazapfts.RequestOpts) {
2051
+ return oazapfts.ok(oazapfts.fetchJson<{
2052
+ status: 204;
2053
+ } | {
2054
+ status: 404;
2055
+ } | {
2056
+ status: 422;
2057
+ data: HttpValidationError;
2058
+ }>("/v1/accounts/token-limits", {
2059
+ ...opts,
2060
+ method: "DELETE",
2061
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2062
+ authorization,
2063
+ "x-account-id": xAccountId
2064
+ })
2065
+ }));
2066
+ }
2067
+ /**
2068
+ * Current
2069
+ */
2070
+ export function currentV1TokensUsageCurrentGet({ year, month, authorization, xAccountId }: {
2071
+ year: number;
2072
+ month: number;
2073
+ authorization: string;
2074
+ xAccountId?: string;
2075
+ }, opts?: Oazapfts.RequestOpts) {
2076
+ return oazapfts.ok(oazapfts.fetchJson<{
2077
+ status: 200;
2078
+ data: TokensCurrentUsageResponse;
2079
+ } | {
2080
+ status: 404;
2081
+ } | {
2082
+ status: 422;
2083
+ data: HttpValidationError;
2084
+ }>(`/v1/tokens-usage/current${QS.query(QS.explode({
2085
+ year,
2086
+ month
2087
+ }))}`, {
2088
+ ...opts,
2089
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2090
+ authorization,
2091
+ "x-account-id": xAccountId
2092
+ })
2093
+ }));
2094
+ }
2095
+ /**
2096
+ * Monthly
2097
+ */
2098
+ export function monthlyV1TokensUsageMonthlyGet({ year, authorization, xAccountId }: {
2099
+ year: number;
2100
+ authorization: string;
2101
+ xAccountId?: string;
2102
+ }, opts?: Oazapfts.RequestOpts) {
2103
+ return oazapfts.ok(oazapfts.fetchJson<{
2104
+ status: 200;
2105
+ data: TokensMonthlyUsageResponse[];
2106
+ } | {
2107
+ status: 404;
2108
+ } | {
2109
+ status: 422;
2110
+ data: HttpValidationError;
2111
+ }>(`/v1/tokens-usage/monthly${QS.query(QS.explode({
2112
+ year
2113
+ }))}`, {
2114
+ ...opts,
2115
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2116
+ authorization,
2117
+ "x-account-id": xAccountId
2118
+ })
2119
+ }));
2120
+ }
2121
+ /**
2122
+ * Top Users
2123
+ */
2124
+ export function topUsersV1TokensUsageTopUsersGet({ year, month, authorization, xAccountId }: {
2125
+ year: number;
2126
+ month: number;
2127
+ authorization: string;
2128
+ xAccountId?: string;
2129
+ }, opts?: Oazapfts.RequestOpts) {
2130
+ return oazapfts.ok(oazapfts.fetchJson<{
2131
+ status: 200;
2132
+ data: any;
2133
+ } | {
2134
+ status: 404;
2135
+ } | {
2136
+ status: 422;
2137
+ data: HttpValidationError;
2138
+ }>(`/v1/tokens-usage/top-users${QS.query(QS.explode({
2139
+ year,
2140
+ month
2141
+ }))}`, {
2142
+ ...opts,
2143
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2144
+ authorization,
2145
+ "x-account-id": xAccountId
2146
+ })
2147
+ }));
2148
+ }
2149
+ /**
2150
+ * List Association
2151
+ */
2152
+ export function listAssociationV1WorkspaceWorkspaceIdGet({ workspaceId, authorization, xAccountId }: {
2153
+ workspaceId: string;
2154
+ authorization: string;
2155
+ xAccountId?: string;
2156
+ }, opts?: Oazapfts.RequestOpts) {
2157
+ return oazapfts.ok(oazapfts.fetchJson<{
2158
+ status: 200;
2159
+ data: KnowledgeSourceResponse[];
2160
+ } | {
2161
+ status: 404;
2162
+ } | {
2163
+ status: 422;
2164
+ data: HttpValidationError;
2165
+ }>(`/v1/workspace/${encodeURIComponent(workspaceId)}`, {
2166
+ ...opts,
2167
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2168
+ authorization,
2169
+ "x-account-id": xAccountId
2170
+ })
2171
+ }));
2172
+ }
2173
+ /**
2174
+ * Add Association
2175
+ */
2176
+ export function addAssociationV1WorkspaceWorkspaceIdPost({ workspaceId, authorization, xAccountId, addWorkspaceKnowledgeSourceRequest }: {
2177
+ workspaceId: string;
2178
+ authorization: string;
2179
+ xAccountId?: string;
2180
+ addWorkspaceKnowledgeSourceRequest: AddWorkspaceKnowledgeSourceRequest;
2181
+ }, opts?: Oazapfts.RequestOpts) {
2182
+ return oazapfts.ok(oazapfts.fetchJson<{
2183
+ status: 204;
2184
+ } | {
2185
+ status: 404;
2186
+ } | {
2187
+ status: 422;
2188
+ data: HttpValidationError;
2189
+ }>(`/v1/workspace/${encodeURIComponent(workspaceId)}`, oazapfts.json({
2190
+ ...opts,
2191
+ method: "POST",
2192
+ body: addWorkspaceKnowledgeSourceRequest,
2193
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2194
+ authorization,
2195
+ "x-account-id": xAccountId
2196
+ })
2197
+ })));
2198
+ }
2199
+ /**
2200
+ * Delete Association
2201
+ */
2202
+ export function deleteAssociationV1WorkspaceWorkspaceIdKnowledgeSourceKnowledgeSourceSlugDelete({ workspaceId, knowledgeSourceSlug, authorization, xAccountId }: {
2203
+ workspaceId: string;
2204
+ knowledgeSourceSlug: string;
2205
+ authorization: string;
2206
+ xAccountId?: string;
2207
+ }, opts?: Oazapfts.RequestOpts) {
2208
+ return oazapfts.ok(oazapfts.fetchJson<{
2209
+ status: 204;
2210
+ } | {
2211
+ status: 404;
2212
+ } | {
2213
+ status: 422;
2214
+ data: HttpValidationError;
2215
+ }>(`/v1/workspace/${encodeURIComponent(workspaceId)}/knowledge_source/${encodeURIComponent(knowledgeSourceSlug)}`, {
2216
+ ...opts,
2217
+ method: "DELETE",
2218
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2219
+ authorization,
2220
+ "x-account-id": xAccountId
2221
+ })
2222
+ }));
2223
+ }
2224
+ /**
2225
+ * Create Quick Command
2226
+ */
2227
+ export function createQuickCommandV1QuickCommandsPost({ authorization, xAccountId, quickCommandsCreateRequest }: {
2228
+ authorization: string;
2229
+ xAccountId?: string;
2230
+ quickCommandsCreateRequest: QuickCommandsCreateRequest;
2231
+ }, opts?: Oazapfts.RequestOpts) {
2232
+ return oazapfts.ok(oazapfts.fetchJson<{
2233
+ status: 200;
2234
+ data: any;
2235
+ } | {
2236
+ status: 404;
2237
+ } | {
2238
+ status: 422;
2239
+ data: HttpValidationError;
2240
+ }>("/v1/quick-commands", oazapfts.json({
2241
+ ...opts,
2242
+ method: "POST",
2243
+ body: quickCommandsCreateRequest,
2244
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2245
+ authorization,
2246
+ "x-account-id": xAccountId
2247
+ })
2248
+ })));
2249
+ }
2250
+ /**
2251
+ * List All
2252
+ */
2253
+ export function listAllV1QuickCommandsAllGet({ visibility, order, workspaceId, types, authorization, xAccountId }: {
2254
+ visibility?: VisibilityLevelEnum;
2255
+ order?: OrderEnum;
2256
+ workspaceId?: string;
2257
+ types?: QuickCommandTypeRequest[];
2258
+ authorization: string;
2259
+ xAccountId?: string;
2260
+ }, opts?: Oazapfts.RequestOpts) {
2261
+ return oazapfts.ok(oazapfts.fetchJson<{
2262
+ status: 200;
2263
+ data: QuickCommandListResponse[];
2264
+ } | {
2265
+ status: 404;
2266
+ } | {
2267
+ status: 422;
2268
+ data: HttpValidationError;
2269
+ }>(`/v1/quick-commands/all${QS.query(QS.explode({
2270
+ visibility,
2271
+ order,
2272
+ workspace_id: workspaceId,
2273
+ types
2274
+ }))}`, {
2275
+ ...opts,
2276
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2277
+ authorization,
2278
+ "x-account-id": xAccountId
2279
+ })
2280
+ }));
2281
+ }
2282
+ /**
2283
+ * List All Deprecated
2284
+ */
2285
+ export function listAllDeprecatedV1QuickCommandsAllPost({ origin, authorization, xAccountId, baseContextualRequest }: {
2286
+ origin?: string;
2287
+ authorization: string;
2288
+ xAccountId?: string;
2289
+ baseContextualRequest: BaseContextualRequest;
2290
+ }, opts?: Oazapfts.RequestOpts) {
2291
+ return oazapfts.ok(oazapfts.fetchJson<{
2292
+ status: 200;
2293
+ data: QuickCommandListResponse[];
2294
+ } | {
2295
+ status: 404;
2296
+ } | {
2297
+ status: 422;
2298
+ data: HttpValidationError;
2299
+ }>("/v1/quick-commands/all", oazapfts.json({
2300
+ ...opts,
2301
+ method: "POST",
2302
+ body: baseContextualRequest,
2303
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2304
+ origin,
2305
+ authorization,
2306
+ "x-account-id": xAccountId
2307
+ })
2308
+ })));
2309
+ }
2310
+ /**
2311
+ * Get Quick Command
2312
+ */
2313
+ export function getQuickCommandV1QuickCommandsSlugGet({ slug, authorization, xAccountId }: {
2314
+ slug: string;
2315
+ authorization: string;
2316
+ xAccountId?: string;
2317
+ }, opts?: Oazapfts.RequestOpts) {
2318
+ return oazapfts.ok(oazapfts.fetchJson<{
2319
+ status: 200;
2320
+ data: QuickCommandResponse;
2321
+ } | {
2322
+ status: 404;
2323
+ } | {
2324
+ status: 422;
2325
+ data: HttpValidationError;
2326
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}`, {
2327
+ ...opts,
2328
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2329
+ authorization,
2330
+ "x-account-id": xAccountId
2331
+ })
2332
+ }));
2333
+ }
2334
+ /**
2335
+ * Delete Quick Command
2336
+ */
2337
+ export function deleteQuickCommandV1QuickCommandsSlugDelete({ slug, authorization, xAccountId }: {
2338
+ slug: string;
2339
+ authorization: string;
2340
+ xAccountId?: string;
2341
+ }, opts?: Oazapfts.RequestOpts) {
2342
+ return oazapfts.ok(oazapfts.fetchJson<{
2343
+ status: 204;
2344
+ } | {
2345
+ status: 404;
2346
+ } | {
2347
+ status: 422;
2348
+ data: HttpValidationError;
2349
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}`, {
2350
+ ...opts,
2351
+ method: "DELETE",
2352
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2353
+ authorization,
2354
+ "x-account-id": xAccountId
2355
+ })
2356
+ }));
2357
+ }
2358
+ /**
2359
+ * Update Quick Command
2360
+ */
2361
+ export function updateQuickCommandV1QuickCommandsSlugPatch({ slug, authorization, xAccountId, quickCommandsUpdateRequest }: {
2362
+ slug: string;
2363
+ authorization: string;
2364
+ xAccountId?: string;
2365
+ quickCommandsUpdateRequest: QuickCommandsUpdateRequest;
2366
+ }, opts?: Oazapfts.RequestOpts) {
2367
+ return oazapfts.ok(oazapfts.fetchJson<{
2368
+ status: 204;
2369
+ } | {
2370
+ status: 404;
2371
+ } | {
2372
+ status: 422;
2373
+ data: HttpValidationError;
2374
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}`, oazapfts.json({
2375
+ ...opts,
2376
+ method: "PATCH",
2377
+ body: quickCommandsUpdateRequest,
2378
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2379
+ authorization,
2380
+ "x-account-id": xAccountId
2381
+ })
2382
+ })));
2383
+ }
2384
+ /**
2385
+ * Share
2386
+ */
2387
+ export function shareV1QuickCommandsSlugSharePost({ slug, authorization, xAccountId, shareContentRequest }: {
2388
+ slug: string;
2389
+ authorization: string;
2390
+ xAccountId?: string;
2391
+ shareContentRequest: ShareContentRequest;
2392
+ }, opts?: Oazapfts.RequestOpts) {
2393
+ return oazapfts.ok(oazapfts.fetchJson<{
2394
+ status: 204;
2395
+ } | {
2396
+ status: 404;
2397
+ } | {
2398
+ status: 422;
2399
+ data: HttpValidationError;
2400
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/share`, oazapfts.json({
2401
+ ...opts,
2402
+ method: "POST",
2403
+ body: shareContentRequest,
2404
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2405
+ authorization,
2406
+ "x-account-id": xAccountId
2407
+ })
2408
+ })));
2409
+ }
2410
+ /**
2411
+ * Fork
2412
+ */
2413
+ export function forkV1QuickCommandsSlugForkPost({ slug, authorization, xAccountId, quickCommandsMakeACopyRequest }: {
2414
+ slug: string;
2415
+ authorization: string;
2416
+ xAccountId?: string;
2417
+ quickCommandsMakeACopyRequest: QuickCommandsMakeACopyRequest;
2418
+ }, opts?: Oazapfts.RequestOpts) {
2419
+ return oazapfts.ok(oazapfts.fetchJson<{
2420
+ status: 200;
2421
+ data: any;
2422
+ } | {
2423
+ status: 404;
2424
+ } | {
2425
+ status: 422;
2426
+ data: HttpValidationError;
2427
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/fork`, oazapfts.json({
2428
+ ...opts,
2429
+ method: "POST",
2430
+ body: quickCommandsMakeACopyRequest,
2431
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2432
+ authorization,
2433
+ "x-account-id": xAccountId
2434
+ })
2435
+ })));
2436
+ }
2437
+ /**
2438
+ * Get Quick Command By Ks Slug
2439
+ */
2440
+ export function getQuickCommandByKsSlugV1QuickCommandsKnowledgeSourcesSlugGet({ slug, authorization, xAccountId }: {
2441
+ slug: string;
2442
+ authorization: string;
2443
+ xAccountId?: string;
2444
+ }, opts?: Oazapfts.RequestOpts) {
2445
+ return oazapfts.ok(oazapfts.fetchJson<{
2446
+ status: 200;
2447
+ data: QuickCommandListResponse[];
2448
+ } | {
2449
+ status: 404;
2450
+ } | {
2451
+ status: 422;
2452
+ data: HttpValidationError;
2453
+ }>(`/v1/quick-commands/knowledge-sources/${encodeURIComponent(slug)}`, {
2454
+ ...opts,
2455
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2456
+ authorization,
2457
+ "x-account-id": xAccountId
2458
+ })
2459
+ }));
2460
+ }
2461
+ /**
2462
+ * List By Workspace Id
2463
+ */
2464
+ export function listByWorkspaceIdV1QuickCommandsWorkspacesWorkspaceIdGet({ workspaceId, authorization, xAccountId }: {
2465
+ workspaceId: string;
2466
+ authorization: string;
2467
+ xAccountId?: string;
2468
+ }, opts?: Oazapfts.RequestOpts) {
2469
+ return oazapfts.ok(oazapfts.fetchJson<{
2470
+ status: 200;
2471
+ data: QuickCommandListResponse[];
2472
+ } | {
2473
+ status: 404;
2474
+ } | {
2475
+ status: 422;
2476
+ data: HttpValidationError;
2477
+ }>(`/v1/quick-commands/workspaces/${encodeURIComponent(workspaceId)}`, {
2478
+ ...opts,
2479
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2480
+ authorization,
2481
+ "x-account-id": xAccountId
2482
+ })
2483
+ }));
2484
+ }
2485
+ /**
2486
+ * Dependencies
2487
+ */
2488
+ export function dependenciesV1QuickCommandsSlugDependenciesGet({ slug, authorization, xAccountId }: {
2489
+ slug: string;
2490
+ authorization: string;
2491
+ xAccountId?: string;
2492
+ }, opts?: Oazapfts.RequestOpts) {
2493
+ return oazapfts.ok(oazapfts.fetchJson<{
2494
+ status: 200;
2495
+ data: QuickCommandDependenciesResponse;
2496
+ } | {
2497
+ status: 404;
2498
+ } | {
2499
+ status: 422;
2500
+ data: HttpValidationError;
2501
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/dependencies`, {
2502
+ ...opts,
2503
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2504
+ authorization,
2505
+ "x-account-id": xAccountId
2506
+ })
2507
+ }));
2508
+ }
2509
+ /**
2510
+ * Quick Commands Run
2511
+ */
2512
+ export function quickCommandsRunV1QuickCommandsSlugStepsStepSlugRunPost({ slug, stepSlug, authorization, xAccountId, quickCommandsExecutionRequest }: {
2513
+ slug: string;
2514
+ stepSlug: string;
2515
+ authorization: string;
2516
+ xAccountId?: string;
2517
+ quickCommandsExecutionRequest: QuickCommandsExecutionRequest;
2518
+ }, opts?: Oazapfts.RequestOpts) {
2519
+ return oazapfts.ok(oazapfts.fetchJson<{
2520
+ status: 200;
2521
+ data: SimpleResponse;
2522
+ } | {
2523
+ status: 404;
2524
+ } | {
2525
+ status: 422;
2526
+ data: HttpValidationError;
2527
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/steps/${encodeURIComponent(stepSlug)}/run`, oazapfts.json({
2528
+ ...opts,
2529
+ method: "POST",
2530
+ body: quickCommandsExecutionRequest,
2531
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2532
+ authorization,
2533
+ "x-account-id": xAccountId
2534
+ })
2535
+ })));
2536
+ }
2537
+ /**
2538
+ * Format Fetch Step
2539
+ */
2540
+ export function formatFetchStepV1QuickCommandsSlugStepsStepSlugFetchFormatPost({ slug, stepSlug, authorization, xAccountId, quickCommandsExecutionRequest }: {
2541
+ slug: string;
2542
+ stepSlug: string;
2543
+ authorization: string;
2544
+ xAccountId?: string;
2545
+ quickCommandsExecutionRequest: QuickCommandsExecutionRequest;
2546
+ }, opts?: Oazapfts.RequestOpts) {
2547
+ return oazapfts.ok(oazapfts.fetchJson<{
2548
+ status: 200;
2549
+ data: QuickCommandStepFetchResponse;
2550
+ } | {
2551
+ status: 404;
2552
+ } | {
2553
+ status: 422;
2554
+ data: HttpValidationError;
2555
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/steps/${encodeURIComponent(stepSlug)}/fetch_format`, oazapfts.json({
2556
+ ...opts,
2557
+ method: "POST",
2558
+ body: quickCommandsExecutionRequest,
2559
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2560
+ authorization,
2561
+ "x-account-id": xAccountId
2562
+ })
2563
+ })));
2564
+ }
2565
+ /**
2566
+ * Format Result
2567
+ */
2568
+ export function formatResultV1QuickCommandsSlugResultFormatPost({ slug, authorization, xAccountId, quickCommandsExecutionRequest }: {
2569
+ slug: string;
2570
+ authorization: string;
2571
+ xAccountId?: string;
2572
+ quickCommandsExecutionRequest: QuickCommandsExecutionRequest;
2573
+ }, opts?: Oazapfts.RequestOpts) {
2574
+ return oazapfts.ok(oazapfts.fetchJson<{
2575
+ status: 200;
2576
+ data: QuickCommandFinalResultResponse;
2577
+ } | {
2578
+ status: 404;
2579
+ } | {
2580
+ status: 422;
2581
+ data: HttpValidationError;
2582
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/result_format`, oazapfts.json({
2583
+ ...opts,
2584
+ method: "POST",
2585
+ body: quickCommandsExecutionRequest,
2586
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2587
+ authorization,
2588
+ "x-account-id": xAccountId
2589
+ })
2590
+ })));
2591
+ }
2592
+ /**
2593
+ * Add Workspace
2594
+ */
2595
+ export function addWorkspaceV1QuickCommandsSlugWorkspacesWorkspaceIdAddPost({ slug, workspaceId, authorization, xAccountId }: {
2596
+ slug: string;
2597
+ workspaceId: string;
2598
+ authorization: string;
2599
+ xAccountId?: string;
2600
+ }, opts?: Oazapfts.RequestOpts) {
2601
+ return oazapfts.ok(oazapfts.fetchJson<{
2602
+ status: 204;
2603
+ } | {
2604
+ status: 404;
2605
+ } | {
2606
+ status: 422;
2607
+ data: HttpValidationError;
2608
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/workspaces/${encodeURIComponent(workspaceId)}/add`, {
2609
+ ...opts,
2610
+ method: "POST",
2611
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2612
+ authorization,
2613
+ "x-account-id": xAccountId
2614
+ })
2615
+ }));
2616
+ }
2617
+ /**
2618
+ * Remove Workspace
2619
+ */
2620
+ export function removeWorkspaceV1QuickCommandsSlugWorkspacesWorkspaceIdRemoveDelete({ slug, workspaceId, authorization, xAccountId }: {
2621
+ slug: string;
2622
+ workspaceId: string;
2623
+ authorization: string;
2624
+ xAccountId?: string;
2625
+ }, opts?: Oazapfts.RequestOpts) {
2626
+ return oazapfts.ok(oazapfts.fetchJson<{
2627
+ status: 204;
2628
+ } | {
2629
+ status: 404;
2630
+ } | {
2631
+ status: 422;
2632
+ data: HttpValidationError;
2633
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/workspaces/${encodeURIComponent(workspaceId)}/remove`, {
2634
+ ...opts,
2635
+ method: "DELETE",
2636
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2637
+ authorization,
2638
+ "x-account-id": xAccountId
2639
+ })
2640
+ }));
2641
+ }
2642
+ /**
2643
+ * Create Execution
2644
+ */
2645
+ export function createExecutionV1QuickCommandsCreateExecutionSlugPost({ slug, conversationId, authorization, xAccountId, quickCommandCreateRequest }: {
2646
+ slug: string;
2647
+ conversationId?: string;
2648
+ authorization: string;
2649
+ xAccountId?: string;
2650
+ quickCommandCreateRequest?: QuickCommandCreateRequest;
2651
+ }, opts?: Oazapfts.RequestOpts) {
2652
+ return oazapfts.ok(oazapfts.fetchJson<{
2653
+ status: 200;
2654
+ data: any;
2655
+ } | {
2656
+ status: 404;
2657
+ } | {
2658
+ status: 422;
2659
+ data: HttpValidationError;
2660
+ }>(`/v1/quick-commands/create-execution/${encodeURIComponent(slug)}${QS.query(QS.explode({
2661
+ conversation_id: conversationId
2662
+ }))}`, oazapfts.json({
2663
+ ...opts,
2664
+ method: "POST",
2665
+ body: quickCommandCreateRequest,
2666
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2667
+ authorization,
2668
+ "x-account-id": xAccountId
2669
+ })
2670
+ })));
2671
+ }
2672
+ /**
2673
+ * Callback
2674
+ */
2675
+ export function callbackV1QuickCommandsCallbackExecutionIdGet({ executionId, authorization, xAccountId }: {
2676
+ executionId: string;
2677
+ authorization: string;
2678
+ xAccountId?: string;
2679
+ }, opts?: Oazapfts.RequestOpts) {
2680
+ return oazapfts.ok(oazapfts.fetchJson<{
2681
+ status: 200;
2682
+ data: QuickCommandExecutionResponse;
2683
+ } | {
2684
+ status: 404;
2685
+ } | {
2686
+ status: 422;
2687
+ data: HttpValidationError;
2688
+ }>(`/v1/quick-commands/callback/${encodeURIComponent(executionId)}`, {
2689
+ ...opts,
2690
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2691
+ authorization,
2692
+ "x-account-id": xAccountId
2693
+ })
2694
+ }));
2695
+ }
2696
+ /**
2697
+ * Import Content
2698
+ */
2699
+ export function importContentV1ImportPost({ authorization, xAccountId, importPublicContent }: {
2700
+ authorization: string;
2701
+ xAccountId?: string;
2702
+ importPublicContent: ImportPublicContent;
2703
+ }, opts?: Oazapfts.RequestOpts) {
2704
+ return oazapfts.ok(oazapfts.fetchJson<{
2705
+ status: 204;
2706
+ } | {
2707
+ status: 404;
2708
+ } | {
2709
+ status: 422;
2710
+ data: HttpValidationError;
2711
+ }>("/v1/import", oazapfts.json({
2712
+ ...opts,
2713
+ method: "POST",
2714
+ body: importPublicContent,
2715
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2716
+ authorization,
2717
+ "x-account-id": xAccountId
2718
+ })
2719
+ })));
2720
+ }
2721
+ /**
2722
+ * Change Ai Stack Visibility
2723
+ */
2724
+ export function changeAiStackVisibilityV1StudiosStudioIdAiStacksStackIdVisibilityPut({ studioId, stackId, changeContentVisibility }: {
2725
+ studioId: string;
2726
+ stackId: string;
2727
+ changeContentVisibility: ChangeContentVisibility;
2728
+ }, opts?: Oazapfts.RequestOpts) {
2729
+ return oazapfts.ok(oazapfts.fetchJson<{
2730
+ status: 202;
2731
+ data: any;
2732
+ } | {
2733
+ status: 404;
2734
+ } | {
2735
+ status: 422;
2736
+ data: HttpValidationError;
2737
+ }>(`/v1/studios/${encodeURIComponent(studioId)}/ai-stacks/${encodeURIComponent(stackId)}/visibility`, oazapfts.json({
2738
+ ...opts,
2739
+ method: "PUT",
2740
+ body: changeContentVisibility
2741
+ })));
2742
+ }
2743
+ /**
2744
+ * Change Knowledge Source Visibility
2745
+ */
2746
+ export function changeKnowledgeSourceVisibilityV1KnowledgeSourcesSlugVisibilityPut({ slug, changeContentVisibility }: {
2747
+ slug: string;
2748
+ changeContentVisibility: ChangeContentVisibility;
2749
+ }, opts?: Oazapfts.RequestOpts) {
2750
+ return oazapfts.ok(oazapfts.fetchJson<{
2751
+ status: 202;
2752
+ data: any;
2753
+ } | {
2754
+ status: 404;
2755
+ } | {
2756
+ status: 422;
2757
+ data: HttpValidationError;
2758
+ }>(`/v1/knowledge-sources/${encodeURIComponent(slug)}/visibility`, oazapfts.json({
2759
+ ...opts,
2760
+ method: "PUT",
2761
+ body: changeContentVisibility
2762
+ })));
2763
+ }
2764
+ /**
2765
+ * Change Quick Command Visibility
2766
+ */
2767
+ export function changeQuickCommandVisibilityV1QuickCommandsSlugVisibilityPut({ slug, changeContentVisibility }: {
2768
+ slug: string;
2769
+ changeContentVisibility: ChangeContentVisibility;
2770
+ }, opts?: Oazapfts.RequestOpts) {
2771
+ return oazapfts.ok(oazapfts.fetchJson<{
2772
+ status: 202;
2773
+ data: any;
2774
+ } | {
2775
+ status: 404;
2776
+ } | {
2777
+ status: 422;
2778
+ data: HttpValidationError;
2779
+ }>(`/v1/quick-commands/${encodeURIComponent(slug)}/visibility`, oazapfts.json({
2780
+ ...opts,
2781
+ method: "PUT",
2782
+ body: changeContentVisibility
2783
+ })));
2784
+ }
2785
+ /**
2786
+ * List Conversations
2787
+ */
2788
+ export function listConversationsV1ConversationsGet({ size, page, authorization, xAccountId }: {
2789
+ size?: number;
2790
+ page?: number;
2791
+ authorization: string;
2792
+ xAccountId?: string;
2793
+ }, opts?: Oazapfts.RequestOpts) {
2794
+ return oazapfts.ok(oazapfts.fetchJson<{
2795
+ status: 200;
2796
+ data: ConversationResponse[];
2797
+ } | {
2798
+ status: 404;
2799
+ } | {
2800
+ status: 422;
2801
+ data: HttpValidationError;
2802
+ }>(`/v1/conversations${QS.query(QS.explode({
2803
+ size,
2804
+ page
2805
+ }))}`, {
2806
+ ...opts,
2807
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2808
+ authorization,
2809
+ "x-account-id": xAccountId
2810
+ })
2811
+ }));
2812
+ }
2813
+ /**
2814
+ * Conversation History
2815
+ */
2816
+ export function conversationHistoryV1ConversationsConversationIdGet({ conversationId, authorization, xAccountId }: {
2817
+ conversationId: string;
2818
+ authorization: string;
2819
+ xAccountId?: string;
2820
+ }, opts?: Oazapfts.RequestOpts) {
2821
+ return oazapfts.ok(oazapfts.fetchJson<{
2822
+ status: 200;
2823
+ data: ConversationResponse;
2824
+ } | {
2825
+ status: 404;
2826
+ } | {
2827
+ status: 422;
2828
+ data: HttpValidationError;
2829
+ }>(`/v1/conversations/${encodeURIComponent(conversationId)}`, {
2830
+ ...opts,
2831
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2832
+ authorization,
2833
+ "x-account-id": xAccountId
2834
+ })
2835
+ }));
2836
+ }
2837
+ /**
2838
+ * Delete Conversation
2839
+ */
2840
+ export function deleteConversationV1ConversationsConversationIdDelete({ conversationId, authorization, xAccountId }: {
2841
+ conversationId: string;
2842
+ authorization: string;
2843
+ xAccountId?: string;
2844
+ }, opts?: Oazapfts.RequestOpts) {
2845
+ return oazapfts.ok(oazapfts.fetchJson<{
2846
+ status: 204;
2847
+ } | {
2848
+ status: 404;
2849
+ } | {
2850
+ status: 422;
2851
+ data: HttpValidationError;
2852
+ }>(`/v1/conversations/${encodeURIComponent(conversationId)}`, {
2853
+ ...opts,
2854
+ method: "DELETE",
2855
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2856
+ authorization,
2857
+ "x-account-id": xAccountId
2858
+ })
2859
+ }));
2860
+ }
2861
+ /**
2862
+ * Update Title
2863
+ */
2864
+ export function updateTitleV1ConversationsConversationIdPatch({ conversationId, authorization, xAccountId, conversationUpdateTitleRequest }: {
2865
+ conversationId: string;
2866
+ authorization: string;
2867
+ xAccountId?: string;
2868
+ conversationUpdateTitleRequest: ConversationUpdateTitleRequest;
2869
+ }, opts?: Oazapfts.RequestOpts) {
2870
+ return oazapfts.ok(oazapfts.fetchJson<{
2871
+ status: 200;
2872
+ data: ConversationResponse;
2873
+ } | {
2874
+ status: 404;
2875
+ } | {
2876
+ status: 422;
2877
+ data: HttpValidationError;
2878
+ }>(`/v1/conversations/${encodeURIComponent(conversationId)}`, oazapfts.json({
2879
+ ...opts,
2880
+ method: "PATCH",
2881
+ body: conversationUpdateTitleRequest,
2882
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2883
+ authorization,
2884
+ "x-account-id": xAccountId
2885
+ })
2886
+ })));
2887
+ }
2888
+ /**
2889
+ * Download Conversation
2890
+ */
2891
+ export function downloadConversationV1ConversationsConversationIdDownloadGet({ conversationId, authorization, xAccountId }: {
2892
+ conversationId: string;
2893
+ authorization: string;
2894
+ xAccountId?: string;
2895
+ }, opts?: Oazapfts.RequestOpts) {
2896
+ return oazapfts.ok(oazapfts.fetchJson<{
2897
+ status: 200;
2898
+ data: any;
2899
+ } | {
2900
+ status: 404;
2901
+ } | {
2902
+ status: 422;
2903
+ data: HttpValidationError;
2904
+ }>(`/v1/conversations/${encodeURIComponent(conversationId)}/download`, {
2905
+ ...opts,
2906
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2907
+ authorization,
2908
+ "x-account-id": xAccountId
2909
+ })
2910
+ }));
2911
+ }
2912
+ /**
2913
+ * Create Knowledge Source
2914
+ */
2915
+ export function createKnowledgeSourceV1DefaultKnowledgeSourcesPost({ authorization, newKnowledgeSourceRequest }: {
2916
+ authorization: string;
2917
+ newKnowledgeSourceRequest: NewKnowledgeSourceRequest;
2918
+ }, opts?: Oazapfts.RequestOpts) {
2919
+ return oazapfts.ok(oazapfts.fetchJson<{
2920
+ status: 204;
2921
+ } | {
2922
+ status: 404;
2923
+ } | {
2924
+ status: 422;
2925
+ data: HttpValidationError;
2926
+ }>("/v1/default-knowledge-sources", oazapfts.json({
2927
+ ...opts,
2928
+ method: "POST",
2929
+ body: newKnowledgeSourceRequest,
2930
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2931
+ authorization
2932
+ })
2933
+ })));
2934
+ }
2935
+ /**
2936
+ * Delete Knowledge Source
2937
+ */
2938
+ export function deleteKnowledgeSourceV1DefaultKnowledgeSourcesSlugDelete({ slug }: {
2939
+ slug: string;
2940
+ }, opts?: Oazapfts.RequestOpts) {
2941
+ return oazapfts.ok(oazapfts.fetchJson<{
2942
+ status: 204;
2943
+ } | {
2944
+ status: 404;
2945
+ } | {
2946
+ status: 422;
2947
+ data: HttpValidationError;
2948
+ }>(`/v1/default-knowledge-sources/${encodeURIComponent(slug)}`, {
2949
+ ...opts,
2950
+ method: "DELETE"
2951
+ }));
2952
+ }
2953
+ /**
2954
+ * Upload Knowledge Objects Zip
2955
+ */
2956
+ export function uploadKnowledgeObjectsZipV1DefaultKnowledgeSourcesSlugObjectsBatchPost({ slug, autoDelete, bodyUploadKnowledgeObjectsZipV1DefaultKnowledgeSourcesSlugObjectsBatchPost }: {
2957
+ slug: string;
2958
+ autoDelete?: boolean;
2959
+ bodyUploadKnowledgeObjectsZipV1DefaultKnowledgeSourcesSlugObjectsBatchPost: BodyUploadKnowledgeObjectsZipV1DefaultKnowledgeSourcesSlugObjectsBatchPost;
2960
+ }, opts?: Oazapfts.RequestOpts) {
2961
+ return oazapfts.ok(oazapfts.fetchJson<{
2962
+ status: 204;
2963
+ } | {
2964
+ status: 404;
2965
+ } | {
2966
+ status: 422;
2967
+ data: HttpValidationError;
2968
+ }>(`/v1/default-knowledge-sources/${encodeURIComponent(slug)}/objects/batch${QS.query(QS.explode({
2969
+ "auto-delete": autoDelete
2970
+ }))}`, oazapfts.multipart({
2971
+ ...opts,
2972
+ method: "POST",
2973
+ body: bodyUploadKnowledgeObjectsZipV1DefaultKnowledgeSourcesSlugObjectsBatchPost
2974
+ })));
2975
+ }
2976
+ /**
2977
+ * Dev Assistant V2
2978
+ */
2979
+ export function devAssistantV2V2ChatPost({ accept, authorization, xAccountId, codeBuddyApiV2SchemasChatRequest }: {
2980
+ accept?: string;
2981
+ authorization: string;
2982
+ xAccountId?: string;
2983
+ codeBuddyApiV2SchemasChatRequest: ChatRequest2;
2984
+ }, opts?: Oazapfts.RequestOpts) {
2985
+ return oazapfts.ok(oazapfts.fetchJson<{
2986
+ status: 200;
2987
+ data: string | ChatResponse2;
2988
+ } | {
2989
+ status: 404;
2990
+ } | {
2991
+ status: 422;
2992
+ data: HttpValidationError;
2993
+ }>("/v2/chat", oazapfts.json({
2994
+ ...opts,
2995
+ method: "POST",
2996
+ body: codeBuddyApiV2SchemasChatRequest,
2997
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2998
+ accept,
2999
+ authorization,
3000
+ "x-account-id": xAccountId
3001
+ })
3002
+ })));
3003
+ }
3004
+ /**
3005
+ * Quick Commands Run V2
3006
+ */
3007
+ export function quickCommandsRunV2V2QuickCommandsSlugStepsStepSlugRunPost({ slug, stepSlug, accept, authorization, xAccountId, quickCommandsExecutionRequest }: {
3008
+ slug: string;
3009
+ stepSlug: string;
3010
+ accept?: string;
3011
+ authorization: string;
3012
+ xAccountId?: string;
3013
+ quickCommandsExecutionRequest: QuickCommandsExecutionRequest;
3014
+ }, opts?: Oazapfts.RequestOpts) {
3015
+ return oazapfts.ok(oazapfts.fetchJson<{
3016
+ status: 200;
3017
+ data: string | SimpleResponse;
3018
+ } | {
3019
+ status: 404;
3020
+ } | {
3021
+ status: 422;
3022
+ data: HttpValidationError;
3023
+ }>(`/v2/quick-commands/${encodeURIComponent(slug)}/steps/${encodeURIComponent(stepSlug)}/run`, oazapfts.json({
3024
+ ...opts,
3025
+ method: "POST",
3026
+ body: quickCommandsExecutionRequest,
3027
+ headers: oazapfts.mergeHeaders(opts?.headers, {
3028
+ accept,
3029
+ authorization,
3030
+ "x-account-id": xAccountId
3031
+ })
3032
+ })));
3033
+ }
3034
+ /**
3035
+ * Vectorize Objects From File
3036
+ */
3037
+ export function vectorizeObjectsFromFileV2KnowledgeSourcesSlugObjectsPost({ slug, authorization, xAccountId, bodyVectorizeObjectsFromFileV2KnowledgeSourcesSlugObjectsPost }: {
3038
+ slug: string;
3039
+ authorization: string;
3040
+ xAccountId?: string;
3041
+ bodyVectorizeObjectsFromFileV2KnowledgeSourcesSlugObjectsPost: BodyVectorizeObjectsFromFileV2KnowledgeSourcesSlugObjectsPost;
3042
+ }, opts?: Oazapfts.RequestOpts) {
3043
+ return oazapfts.ok(oazapfts.fetchJson<{
3044
+ status: 200;
3045
+ data: SyncResponse;
3046
+ } | {
3047
+ status: 404;
3048
+ } | {
3049
+ status: 422;
3050
+ data: HttpValidationError;
3051
+ }>(`/v2/knowledge-sources/${encodeURIComponent(slug)}/objects`, oazapfts.multipart({
3052
+ ...opts,
3053
+ method: "POST",
3054
+ body: bodyVectorizeObjectsFromFileV2KnowledgeSourcesSlugObjectsPost,
3055
+ headers: oazapfts.mergeHeaders(opts?.headers, {
3056
+ authorization,
3057
+ "x-account-id": xAccountId
3058
+ })
3059
+ })));
3060
+ }
3061
+ /**
3062
+ * Upload Knowledge Objects Zip
3063
+ */
3064
+ export function uploadKnowledgeObjectsZipV2KnowledgeSourcesSlugObjectsBatchPost({ slug, autoDelete, authorization, xAccountId, bodyUploadKnowledgeObjectsZipV2KnowledgeSourcesSlugObjectsBatchPost }: {
3065
+ slug: string;
3066
+ autoDelete?: boolean;
3067
+ authorization: string;
3068
+ xAccountId?: string;
3069
+ bodyUploadKnowledgeObjectsZipV2KnowledgeSourcesSlugObjectsBatchPost: BodyUploadKnowledgeObjectsZipV2KnowledgeSourcesSlugObjectsBatchPost;
3070
+ }, opts?: Oazapfts.RequestOpts) {
3071
+ return oazapfts.ok(oazapfts.fetchJson<{
3072
+ status: 200;
3073
+ data: SyncResponse;
3074
+ } | {
3075
+ status: 207;
3076
+ data: SyncResponse;
3077
+ } | {
3078
+ status: 404;
3079
+ } | {
3080
+ status: 422;
3081
+ data: HttpValidationError;
3082
+ }>(`/v2/knowledge-sources/${encodeURIComponent(slug)}/objects/batch${QS.query(QS.explode({
3083
+ "auto-delete": autoDelete
3084
+ }))}`, oazapfts.multipart({
3085
+ ...opts,
3086
+ method: "POST",
3087
+ body: bodyUploadKnowledgeObjectsZipV2KnowledgeSourcesSlugObjectsBatchPost,
3088
+ headers: oazapfts.mergeHeaders(opts?.headers, {
3089
+ authorization,
3090
+ "x-account-id": xAccountId
3091
+ })
3092
+ })));
3093
+ }
3094
+ /**
3095
+ * Dev Assistant V3
3096
+ */
3097
+ export function devAssistantV3V3ChatPost({ accept, authorization, xAccountId, codeBuddyApiV2SchemasChatRequest }: {
3098
+ accept?: string;
3099
+ authorization: string;
3100
+ xAccountId?: string;
3101
+ codeBuddyApiV2SchemasChatRequest: ChatRequest2;
3102
+ }, opts?: Oazapfts.RequestOpts) {
3103
+ return oazapfts.ok(oazapfts.fetchJson<{
3104
+ status: 200;
3105
+ data: string | ChatResponse3;
3106
+ } | {
3107
+ status: 404;
3108
+ } | {
3109
+ status: 422;
3110
+ data: HttpValidationError;
3111
+ }>("/v3/chat", oazapfts.json({
3112
+ ...opts,
3113
+ method: "POST",
3114
+ body: codeBuddyApiV2SchemasChatRequest,
3115
+ headers: oazapfts.mergeHeaders(opts?.headers, {
3116
+ accept,
3117
+ authorization,
3118
+ "x-account-id": xAccountId
3119
+ })
3120
+ })));
3121
+ }