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