@dazl/api-client 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/sdk.gen.d.ts +7 -2
- package/dist/internal/sdk.gen.d.ts.map +1 -1
- package/dist/internal/sdk.gen.js +32 -0
- package/dist/internal/sdk.gen.js.map +1 -1
- package/dist/internal/types.gen.d.ts +443 -0
- package/dist/internal/types.gen.d.ts.map +1 -1
- package/dist/public/index.d.ts +2 -2
- package/dist/public/index.d.ts.map +1 -1
- package/dist/public/index.js +1 -1
- package/dist/public/index.js.map +1 -1
- package/dist/public/sdk.gen.d.ts +7 -2
- package/dist/public/sdk.gen.d.ts.map +1 -1
- package/dist/public/sdk.gen.js +32 -0
- package/dist/public/sdk.gen.js.map +1 -1
- package/dist/public/types.gen.d.ts +442 -0
- package/dist/public/types.gen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/internal/index.ts +2 -2
- package/src/internal/sdk.gen.ts +37 -2
- package/src/internal/types.gen.ts +491 -0
- package/src/public/index.ts +2 -2
- package/src/public/sdk.gen.ts +37 -2
- package/src/public/types.gen.ts +490 -0
|
@@ -41,6 +41,11 @@ export type PromotionNames = {
|
|
|
41
41
|
];
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
export type StreamTextChunk = {
|
|
45
|
+
type: 'text-delta' | 'reasoning-delta';
|
|
46
|
+
text: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
44
49
|
export type UserRaw = {
|
|
45
50
|
id: number;
|
|
46
51
|
createdAt: string;
|
|
@@ -580,6 +585,335 @@ export type ConnectionStatus = {
|
|
|
580
585
|
isConnected: boolean;
|
|
581
586
|
};
|
|
582
587
|
|
|
588
|
+
export type GenerateTextResponse = {
|
|
589
|
+
text: string;
|
|
590
|
+
output?: unknown;
|
|
591
|
+
reasoningText?: string;
|
|
592
|
+
/**
|
|
593
|
+
* Tool calls in ToolCallPart shape, directly reusable as assistant message content parts
|
|
594
|
+
*/
|
|
595
|
+
toolCalls: Array<ToolCallPart>;
|
|
596
|
+
usage: TextGenerationUsage;
|
|
597
|
+
finishReason: FinishReason;
|
|
598
|
+
providerMetadata?: ProviderMetadata;
|
|
599
|
+
files?: Array<GeneratedFile>;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
export type ToolCallPart = {
|
|
603
|
+
type: 'tool-call';
|
|
604
|
+
toolCallId: string;
|
|
605
|
+
toolName: string;
|
|
606
|
+
input?: unknown;
|
|
607
|
+
providerExecuted?: boolean;
|
|
608
|
+
providerOptions?: ProviderOptions;
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Provider-specific options passed through to the underlying provider, keyed by provider name
|
|
613
|
+
*/
|
|
614
|
+
export type ProviderOptions = {
|
|
615
|
+
[key: string]: {
|
|
616
|
+
[key: string]: unknown;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
export type TextGenerationUsage = {
|
|
621
|
+
/**
|
|
622
|
+
* Model that actually served the request
|
|
623
|
+
*/
|
|
624
|
+
model: 'claude-sonnet-5-anthropic' | 'claude-sonnet-5-vertex' | 'claude-sonnet-4-6-anthropic' | 'claude-sonnet-4-6-vertex' | 'claude-opus-4-8-anthropic' | 'claude-opus-4-8-vertex' | 'claude-opus-4-7-anthropic' | 'claude-opus-4-7-vertex' | 'claude-haiku-4-5-anthropic' | 'claude-haiku-4-5-vertex' | 'gemini-3-0-flash-vertex' | 'gemini-3-5-flash-vertex' | 'gemini-3-1-pro-vertex' | 'qwen-3-coder-openrouter' | 'qwen-3-coder-next-openrouter' | 'qwen-3-6-plus-openrouter' | 'qwen-3-5-flash-openrouter' | 'grok-code-fast-openrouter' | 'deepseek-v3-1-openrouter' | 'deepseek-v4-pro-openrouter' | 'deepseek-v4-flash-openrouter' | 'kimi-k-2-6-openrouter' | 'gpt-5-5-bedrock' | 'gpt-5-4-bedrock' | 'grok-4-3-bedrock' | 'glm-5-bedrock' | 'gpt-5-4-nano-openrouter' | 'gpt-5-4-mini-openrouter' | 'gpt-5-3-codex-openrouter' | 'minimax-m-2-7-openrouter' | 'hy3-preview-openrouter' | 'gemini-3-0-pro-image' | 'gemini-3-1-flash-image';
|
|
625
|
+
inputTokens: number;
|
|
626
|
+
inputTokensCost: number;
|
|
627
|
+
outputTokens: number;
|
|
628
|
+
outputTokensCost: number;
|
|
629
|
+
cacheWriteTokens: number;
|
|
630
|
+
cacheWriteTokensCost: number;
|
|
631
|
+
cacheReadTokens: number;
|
|
632
|
+
cacheReadTokensCost: number;
|
|
633
|
+
totalCost: number;
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
export type FinishReason = 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other';
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Provider-specific metadata returned by the underlying provider, keyed by provider name
|
|
640
|
+
*/
|
|
641
|
+
export type ProviderMetadata = {
|
|
642
|
+
[key: string]: {
|
|
643
|
+
[key: string]: unknown;
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
export type GeneratedFile = {
|
|
648
|
+
base64: string;
|
|
649
|
+
mediaType: string;
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
export type GenerateTextRequest = {
|
|
653
|
+
/**
|
|
654
|
+
* Primary model id
|
|
655
|
+
*/
|
|
656
|
+
model: 'claude-sonnet-5-anthropic' | 'claude-sonnet-5-vertex' | 'claude-sonnet-4-6-anthropic' | 'claude-sonnet-4-6-vertex' | 'claude-opus-4-8-anthropic' | 'claude-opus-4-8-vertex' | 'claude-opus-4-7-anthropic' | 'claude-opus-4-7-vertex' | 'claude-haiku-4-5-anthropic' | 'claude-haiku-4-5-vertex' | 'gemini-3-0-flash-vertex' | 'gemini-3-5-flash-vertex' | 'gemini-3-1-pro-vertex' | 'qwen-3-coder-openrouter' | 'qwen-3-coder-next-openrouter' | 'qwen-3-6-plus-openrouter' | 'qwen-3-5-flash-openrouter' | 'grok-code-fast-openrouter' | 'deepseek-v3-1-openrouter' | 'deepseek-v4-pro-openrouter' | 'deepseek-v4-flash-openrouter' | 'kimi-k-2-6-openrouter' | 'gpt-5-5-bedrock' | 'gpt-5-4-bedrock' | 'grok-4-3-bedrock' | 'glm-5-bedrock' | 'gpt-5-4-nano-openrouter' | 'gpt-5-4-mini-openrouter' | 'gpt-5-3-codex-openrouter' | 'minimax-m-2-7-openrouter' | 'hy3-preview-openrouter' | 'gemini-3-0-pro-image' | 'gemini-3-1-flash-image';
|
|
657
|
+
/**
|
|
658
|
+
* Ordered fallback models, tried when the primary model fails before any output is produced
|
|
659
|
+
*/
|
|
660
|
+
fallbackModels?: Array<TextGenerationModelId>;
|
|
661
|
+
/**
|
|
662
|
+
* Conversation messages: user, assistant, and tool
|
|
663
|
+
*/
|
|
664
|
+
messages: Array<ModelMessage>;
|
|
665
|
+
/**
|
|
666
|
+
* System prompt: plain string, a single system message, or an array of system messages
|
|
667
|
+
*/
|
|
668
|
+
system?: string | SystemModelMessage | Array<SystemModelMessage>;
|
|
669
|
+
/**
|
|
670
|
+
* Tool definitions available to the model, keyed by tool name
|
|
671
|
+
*/
|
|
672
|
+
tools?: {
|
|
673
|
+
[key: string]: ToolDefinition;
|
|
674
|
+
};
|
|
675
|
+
/**
|
|
676
|
+
* Subset of tool names from tools enabled for this call
|
|
677
|
+
*/
|
|
678
|
+
activeTools?: Array<string>;
|
|
679
|
+
reasoning?: ReasoningEffort;
|
|
680
|
+
maxOutputTokens?: number;
|
|
681
|
+
temperature?: number;
|
|
682
|
+
maxRetries?: number;
|
|
683
|
+
providerOptions?: ProviderOptions;
|
|
684
|
+
output?: TextGenerationOutput;
|
|
685
|
+
/**
|
|
686
|
+
* Correlation id attached to the operation logs; generated when omitted
|
|
687
|
+
*/
|
|
688
|
+
opId?: string;
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
export type TextGenerationModelId = 'claude-sonnet-5-anthropic' | 'claude-sonnet-5-vertex' | 'claude-sonnet-4-6-anthropic' | 'claude-sonnet-4-6-vertex' | 'claude-opus-4-8-anthropic' | 'claude-opus-4-8-vertex' | 'claude-opus-4-7-anthropic' | 'claude-opus-4-7-vertex' | 'claude-haiku-4-5-anthropic' | 'claude-haiku-4-5-vertex' | 'gemini-3-0-flash-vertex' | 'gemini-3-5-flash-vertex' | 'gemini-3-1-pro-vertex' | 'qwen-3-coder-openrouter' | 'qwen-3-coder-next-openrouter' | 'qwen-3-6-plus-openrouter' | 'qwen-3-5-flash-openrouter' | 'grok-code-fast-openrouter' | 'deepseek-v3-1-openrouter' | 'deepseek-v4-pro-openrouter' | 'deepseek-v4-flash-openrouter' | 'kimi-k-2-6-openrouter' | 'gpt-5-5-bedrock' | 'gpt-5-4-bedrock' | 'grok-4-3-bedrock' | 'glm-5-bedrock' | 'gpt-5-4-nano-openrouter' | 'gpt-5-4-mini-openrouter' | 'gpt-5-3-codex-openrouter' | 'minimax-m-2-7-openrouter' | 'hy3-preview-openrouter' | 'gemini-3-0-pro-image' | 'gemini-3-1-flash-image';
|
|
692
|
+
|
|
693
|
+
export type ModelMessage = ({
|
|
694
|
+
role: 'user';
|
|
695
|
+
} & UserModelMessage) | ({
|
|
696
|
+
role: 'assistant';
|
|
697
|
+
} & AssistantModelMessage) | ({
|
|
698
|
+
role: 'tool';
|
|
699
|
+
} & ToolModelMessage);
|
|
700
|
+
|
|
701
|
+
export type UserModelMessage = {
|
|
702
|
+
role: 'user';
|
|
703
|
+
content: string | Array<TextPart | ImagePart | FilePart>;
|
|
704
|
+
providerOptions?: ProviderOptions;
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
export type TextPart = {
|
|
708
|
+
type: 'text';
|
|
709
|
+
text: string;
|
|
710
|
+
providerOptions?: ProviderOptions;
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
export type ImagePart = {
|
|
714
|
+
type: 'image';
|
|
715
|
+
/**
|
|
716
|
+
* Base64-encoded image data, a data url, or an http(s) url
|
|
717
|
+
*/
|
|
718
|
+
image: string;
|
|
719
|
+
mediaType?: string;
|
|
720
|
+
providerOptions?: ProviderOptions;
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
export type FilePart = {
|
|
724
|
+
type: 'file';
|
|
725
|
+
/**
|
|
726
|
+
* Base64-encoded file data, a data url, or an http(s) url
|
|
727
|
+
*/
|
|
728
|
+
data: string;
|
|
729
|
+
filename?: string;
|
|
730
|
+
/**
|
|
731
|
+
* IANA media type (e.g. image/png) or top-level segment (e.g. image)
|
|
732
|
+
*/
|
|
733
|
+
mediaType: string;
|
|
734
|
+
providerOptions?: ProviderOptions;
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
export type AssistantModelMessage = {
|
|
738
|
+
role: 'assistant';
|
|
739
|
+
content: string | Array<TextPart | ReasoningPart | FilePart | ToolCallPart>;
|
|
740
|
+
providerOptions?: ProviderOptions;
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
export type ReasoningPart = {
|
|
744
|
+
type: 'reasoning';
|
|
745
|
+
text: string;
|
|
746
|
+
providerOptions?: ProviderOptions;
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
export type ToolModelMessage = {
|
|
750
|
+
role: 'tool';
|
|
751
|
+
content: Array<ToolResultPart>;
|
|
752
|
+
providerOptions?: ProviderOptions;
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
export type ToolResultPart = {
|
|
756
|
+
type: 'tool-result';
|
|
757
|
+
/**
|
|
758
|
+
* Must match the toolCallId of the corresponding tool call
|
|
759
|
+
*/
|
|
760
|
+
toolCallId: string;
|
|
761
|
+
toolName: string;
|
|
762
|
+
output: ToolResultOutput;
|
|
763
|
+
providerOptions?: ProviderOptions;
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
export type ToolResultOutput = {
|
|
767
|
+
type: 'text';
|
|
768
|
+
value: string;
|
|
769
|
+
} | {
|
|
770
|
+
type: 'json';
|
|
771
|
+
value?: unknown;
|
|
772
|
+
} | {
|
|
773
|
+
type: 'error-text';
|
|
774
|
+
value: string;
|
|
775
|
+
} | {
|
|
776
|
+
type: 'error-json';
|
|
777
|
+
value?: unknown;
|
|
778
|
+
} | {
|
|
779
|
+
type: 'content';
|
|
780
|
+
value: Array<{
|
|
781
|
+
type: 'text';
|
|
782
|
+
text: string;
|
|
783
|
+
} | {
|
|
784
|
+
type: 'file-data';
|
|
785
|
+
data: string;
|
|
786
|
+
mediaType: string;
|
|
787
|
+
}>;
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
export type SystemModelMessage = {
|
|
791
|
+
role: 'system';
|
|
792
|
+
content: string;
|
|
793
|
+
providerOptions?: ProviderOptions;
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
export type ToolDefinition = {
|
|
797
|
+
description?: string;
|
|
798
|
+
/**
|
|
799
|
+
* JSON Schema of the tool input
|
|
800
|
+
*/
|
|
801
|
+
inputSchema: {
|
|
802
|
+
[key: string]: unknown;
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Reasoning effort for models that support it
|
|
808
|
+
*/
|
|
809
|
+
export type ReasoningEffort = 'none' | 'low' | 'medium' | 'high';
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Requested output mode: plain text, an object matching schema, or an array of elements matching elementSchema
|
|
813
|
+
*/
|
|
814
|
+
export type TextGenerationOutput = {
|
|
815
|
+
type: 'text';
|
|
816
|
+
} | {
|
|
817
|
+
type: 'object';
|
|
818
|
+
schema: {
|
|
819
|
+
[key: string]: unknown;
|
|
820
|
+
};
|
|
821
|
+
} | {
|
|
822
|
+
type: 'array';
|
|
823
|
+
elementSchema: {
|
|
824
|
+
[key: string]: unknown;
|
|
825
|
+
};
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Data payload of one server-sent event: text-delta and reasoning-delta events carry StreamTextChunk, the done event carries the final GenerateTextResponse, the error event carries ErrorResponse. A stream ending without done or error was aborted or truncated.
|
|
830
|
+
*/
|
|
831
|
+
export type StreamTextEvent = StreamTextChunk | StreamTextResult | ErrorResponse;
|
|
832
|
+
|
|
833
|
+
export type StreamTextResult = {
|
|
834
|
+
text: string;
|
|
835
|
+
output?: unknown;
|
|
836
|
+
reasoningText?: string;
|
|
837
|
+
/**
|
|
838
|
+
* Tool calls in ToolCallPart shape, directly reusable as assistant message content parts
|
|
839
|
+
*/
|
|
840
|
+
toolCalls: Array<ToolCallPart>;
|
|
841
|
+
usage: TextGenerationUsage;
|
|
842
|
+
finishReason: FinishReason;
|
|
843
|
+
providerMetadata?: ProviderMetadata;
|
|
844
|
+
files?: Array<GeneratedFile>;
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
export type StreamTextRequest = {
|
|
848
|
+
/**
|
|
849
|
+
* Primary model id
|
|
850
|
+
*/
|
|
851
|
+
model: 'claude-sonnet-5-anthropic' | 'claude-sonnet-5-vertex' | 'claude-sonnet-4-6-anthropic' | 'claude-sonnet-4-6-vertex' | 'claude-opus-4-8-anthropic' | 'claude-opus-4-8-vertex' | 'claude-opus-4-7-anthropic' | 'claude-opus-4-7-vertex' | 'claude-haiku-4-5-anthropic' | 'claude-haiku-4-5-vertex' | 'gemini-3-0-flash-vertex' | 'gemini-3-5-flash-vertex' | 'gemini-3-1-pro-vertex' | 'qwen-3-coder-openrouter' | 'qwen-3-coder-next-openrouter' | 'qwen-3-6-plus-openrouter' | 'qwen-3-5-flash-openrouter' | 'grok-code-fast-openrouter' | 'deepseek-v3-1-openrouter' | 'deepseek-v4-pro-openrouter' | 'deepseek-v4-flash-openrouter' | 'kimi-k-2-6-openrouter' | 'gpt-5-5-bedrock' | 'gpt-5-4-bedrock' | 'grok-4-3-bedrock' | 'glm-5-bedrock' | 'gpt-5-4-nano-openrouter' | 'gpt-5-4-mini-openrouter' | 'gpt-5-3-codex-openrouter' | 'minimax-m-2-7-openrouter' | 'hy3-preview-openrouter' | 'gemini-3-0-pro-image' | 'gemini-3-1-flash-image';
|
|
852
|
+
/**
|
|
853
|
+
* Ordered fallback models, tried when the primary model fails before any output is produced
|
|
854
|
+
*/
|
|
855
|
+
fallbackModels?: Array<TextGenerationModelId>;
|
|
856
|
+
/**
|
|
857
|
+
* Conversation messages: user, assistant, and tool
|
|
858
|
+
*/
|
|
859
|
+
messages: Array<ModelMessage>;
|
|
860
|
+
/**
|
|
861
|
+
* System prompt: plain string, a single system message, or an array of system messages
|
|
862
|
+
*/
|
|
863
|
+
system?: string | SystemModelMessage | Array<SystemModelMessage>;
|
|
864
|
+
/**
|
|
865
|
+
* Tool definitions available to the model, keyed by tool name
|
|
866
|
+
*/
|
|
867
|
+
tools?: {
|
|
868
|
+
[key: string]: ToolDefinition;
|
|
869
|
+
};
|
|
870
|
+
/**
|
|
871
|
+
* Subset of tool names from tools enabled for this call
|
|
872
|
+
*/
|
|
873
|
+
activeTools?: Array<string>;
|
|
874
|
+
reasoning?: ReasoningEffort;
|
|
875
|
+
maxOutputTokens?: number;
|
|
876
|
+
temperature?: number;
|
|
877
|
+
maxRetries?: number;
|
|
878
|
+
providerOptions?: ProviderOptions;
|
|
879
|
+
output?: TextGenerationOutput;
|
|
880
|
+
/**
|
|
881
|
+
* Correlation id attached to the operation logs; generated when omitted
|
|
882
|
+
*/
|
|
883
|
+
opId?: string;
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
export type GenerateImageResponse = {
|
|
887
|
+
base64: string;
|
|
888
|
+
mediaType: ImageMediaType;
|
|
889
|
+
usage: ImageGenerationUsage;
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
export type ImageMediaType = 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
|
|
893
|
+
|
|
894
|
+
export type ImageGenerationUsage = {
|
|
895
|
+
model: ImageGenerationModelId;
|
|
896
|
+
totalCost: number;
|
|
897
|
+
inputTokens?: number;
|
|
898
|
+
outputTokens?: number;
|
|
899
|
+
totalTokens?: number;
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
export type ImageGenerationModelId = 'imagen-4-0-fast' | 'imagen-4-0' | 'imagen-4-0-ultra';
|
|
903
|
+
|
|
904
|
+
export type GenerateImageRequest = {
|
|
905
|
+
model: ImageGenerationModelId;
|
|
906
|
+
prompt: string;
|
|
907
|
+
aspectRatio: AspectRatio;
|
|
908
|
+
providerOptions?: ProviderOptions;
|
|
909
|
+
/**
|
|
910
|
+
* Correlation id attached to the operation logs; generated when omitted
|
|
911
|
+
*/
|
|
912
|
+
opId?: string;
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
export type AspectRatio = '1:1' | '3:4' | '4:3' | '9:16' | '16:9';
|
|
916
|
+
|
|
583
917
|
export type CreateCommentInput = {
|
|
584
918
|
content: string;
|
|
585
919
|
/**
|
|
@@ -2665,6 +2999,7 @@ export type UpdateProjectData = {
|
|
|
2665
2999
|
latestScreenshot?: string | null;
|
|
2666
3000
|
archivedAt?: string | string | null;
|
|
2667
3001
|
remoteEnvConfigId?: string | null;
|
|
3002
|
+
workspaceId?: string;
|
|
2668
3003
|
/**
|
|
2669
3004
|
* The dazl ID of the requesting user, used for permission checks
|
|
2670
3005
|
*/
|
|
@@ -7840,6 +8175,162 @@ export type GetConnectionStatusResponses = {
|
|
|
7840
8175
|
|
|
7841
8176
|
export type GetConnectionStatusResponse = GetConnectionStatusResponses[keyof GetConnectionStatusResponses];
|
|
7842
8177
|
|
|
8178
|
+
export type GenerateTextData = {
|
|
8179
|
+
body: GenerateTextRequest;
|
|
8180
|
+
path?: never;
|
|
8181
|
+
query?: never;
|
|
8182
|
+
url: '/ai-gateway/generate-text';
|
|
8183
|
+
};
|
|
8184
|
+
|
|
8185
|
+
export type GenerateTextErrors = {
|
|
8186
|
+
/**
|
|
8187
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
8188
|
+
*/
|
|
8189
|
+
400: {
|
|
8190
|
+
message: string;
|
|
8191
|
+
issues?: string;
|
|
8192
|
+
};
|
|
8193
|
+
/**
|
|
8194
|
+
* Unauthorized
|
|
8195
|
+
*/
|
|
8196
|
+
401: ErrorResponse;
|
|
8197
|
+
/**
|
|
8198
|
+
* Forbidden
|
|
8199
|
+
*/
|
|
8200
|
+
403: ErrorResponse;
|
|
8201
|
+
/**
|
|
8202
|
+
* Not Found
|
|
8203
|
+
*/
|
|
8204
|
+
404: ErrorResponse;
|
|
8205
|
+
/**
|
|
8206
|
+
* Conflict
|
|
8207
|
+
*/
|
|
8208
|
+
409: ErrorResponse;
|
|
8209
|
+
/**
|
|
8210
|
+
* Internal server error
|
|
8211
|
+
*/
|
|
8212
|
+
500: ErrorResponse;
|
|
8213
|
+
/**
|
|
8214
|
+
* Service Unavailable
|
|
8215
|
+
*/
|
|
8216
|
+
503: ErrorResponse;
|
|
8217
|
+
};
|
|
8218
|
+
|
|
8219
|
+
export type GenerateTextError = GenerateTextErrors[keyof GenerateTextErrors];
|
|
8220
|
+
|
|
8221
|
+
export type GenerateTextResponses = {
|
|
8222
|
+
/**
|
|
8223
|
+
* Generates text response from selected AI model
|
|
8224
|
+
*/
|
|
8225
|
+
200: GenerateTextResponse;
|
|
8226
|
+
};
|
|
8227
|
+
|
|
8228
|
+
export type GenerateTextResponse2 = GenerateTextResponses[keyof GenerateTextResponses];
|
|
8229
|
+
|
|
8230
|
+
export type StreamTextData = {
|
|
8231
|
+
body: StreamTextRequest;
|
|
8232
|
+
path?: never;
|
|
8233
|
+
query?: never;
|
|
8234
|
+
url: '/ai-gateway/stream-text';
|
|
8235
|
+
};
|
|
8236
|
+
|
|
8237
|
+
export type StreamTextErrors = {
|
|
8238
|
+
/**
|
|
8239
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
8240
|
+
*/
|
|
8241
|
+
400: {
|
|
8242
|
+
message: string;
|
|
8243
|
+
issues?: string;
|
|
8244
|
+
};
|
|
8245
|
+
/**
|
|
8246
|
+
* Unauthorized
|
|
8247
|
+
*/
|
|
8248
|
+
401: ErrorResponse;
|
|
8249
|
+
/**
|
|
8250
|
+
* Forbidden
|
|
8251
|
+
*/
|
|
8252
|
+
403: ErrorResponse;
|
|
8253
|
+
/**
|
|
8254
|
+
* Not Found
|
|
8255
|
+
*/
|
|
8256
|
+
404: ErrorResponse;
|
|
8257
|
+
/**
|
|
8258
|
+
* Conflict
|
|
8259
|
+
*/
|
|
8260
|
+
409: ErrorResponse;
|
|
8261
|
+
/**
|
|
8262
|
+
* Internal server error
|
|
8263
|
+
*/
|
|
8264
|
+
500: ErrorResponse;
|
|
8265
|
+
/**
|
|
8266
|
+
* Service Unavailable
|
|
8267
|
+
*/
|
|
8268
|
+
503: ErrorResponse;
|
|
8269
|
+
};
|
|
8270
|
+
|
|
8271
|
+
export type StreamTextError = StreamTextErrors[keyof StreamTextErrors];
|
|
8272
|
+
|
|
8273
|
+
export type StreamTextResponses = {
|
|
8274
|
+
/**
|
|
8275
|
+
* Streams text chunks using Server-Sent Events
|
|
8276
|
+
*/
|
|
8277
|
+
200: StreamTextEvent;
|
|
8278
|
+
};
|
|
8279
|
+
|
|
8280
|
+
export type StreamTextResponse = StreamTextResponses[keyof StreamTextResponses];
|
|
8281
|
+
|
|
8282
|
+
export type GenerateImageData = {
|
|
8283
|
+
body: GenerateImageRequest;
|
|
8284
|
+
path?: never;
|
|
8285
|
+
query?: never;
|
|
8286
|
+
url: '/ai-gateway/generate-image';
|
|
8287
|
+
};
|
|
8288
|
+
|
|
8289
|
+
export type GenerateImageErrors = {
|
|
8290
|
+
/**
|
|
8291
|
+
* Bad request - Invalid parameters or malformed JSON
|
|
8292
|
+
*/
|
|
8293
|
+
400: {
|
|
8294
|
+
message: string;
|
|
8295
|
+
issues?: string;
|
|
8296
|
+
};
|
|
8297
|
+
/**
|
|
8298
|
+
* Unauthorized
|
|
8299
|
+
*/
|
|
8300
|
+
401: ErrorResponse;
|
|
8301
|
+
/**
|
|
8302
|
+
* Forbidden
|
|
8303
|
+
*/
|
|
8304
|
+
403: ErrorResponse;
|
|
8305
|
+
/**
|
|
8306
|
+
* Not Found
|
|
8307
|
+
*/
|
|
8308
|
+
404: ErrorResponse;
|
|
8309
|
+
/**
|
|
8310
|
+
* Conflict
|
|
8311
|
+
*/
|
|
8312
|
+
409: ErrorResponse;
|
|
8313
|
+
/**
|
|
8314
|
+
* Internal server error
|
|
8315
|
+
*/
|
|
8316
|
+
500: ErrorResponse;
|
|
8317
|
+
/**
|
|
8318
|
+
* Service Unavailable
|
|
8319
|
+
*/
|
|
8320
|
+
503: ErrorResponse;
|
|
8321
|
+
};
|
|
8322
|
+
|
|
8323
|
+
export type GenerateImageError = GenerateImageErrors[keyof GenerateImageErrors];
|
|
8324
|
+
|
|
8325
|
+
export type GenerateImageResponses = {
|
|
8326
|
+
/**
|
|
8327
|
+
* Generates an image and returns base64 payload and usage
|
|
8328
|
+
*/
|
|
8329
|
+
200: GenerateImageResponse;
|
|
8330
|
+
};
|
|
8331
|
+
|
|
8332
|
+
export type GenerateImageResponse2 = GenerateImageResponses[keyof GenerateImageResponses];
|
|
8333
|
+
|
|
7843
8334
|
export type DeleteCommentData = {
|
|
7844
8335
|
body?: never;
|
|
7845
8336
|
path: {
|
package/src/public/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
-
export { Comments, EnvConfig, Mcp, type Options, Ping, User, UserKeyValue, UserSettings, Workspace } from './sdk.gen.ts';
|
|
4
|
-
export type { ClientOptions, CommentContext, CommentGitInfo, CommentResolved, ConnectionStatus, CreateCommentData, CreateCommentError, CreateCommentErrors, CreateCommentInput, CreateCommentResponse, CreateCommentResponses, CreateReplyData, CreateReplyError, CreateReplyErrors, CreateReplyInput, CreateReplyResponse, CreateReplyResponses, CreateSessionAuthorized, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSessionUnauthorized, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceErrors, CreateWorkspaceResponse, CreateWorkspaceResponses, DeleteCommentData, DeleteCommentError, DeleteCommentErrors, DeleteCommentResponse, DeleteCommentResponses, DeleteMyCategValuesData, DeleteMyCategValuesError, DeleteMyCategValuesErrors, DeleteMyCategValuesResponse, DeleteMyCategValuesResponses, DeleteReplyData, DeleteReplyError, DeleteReplyErrors, DeleteReplyResponse, DeleteReplyResponses, DeleteWorkspaceInvitationData, DeleteWorkspaceInvitationError, DeleteWorkspaceInvitationErrors, DeleteWorkspaceInvitationResponse, DeleteWorkspaceInvitationResponses, DeleteWorkspaceMemberData, DeleteWorkspaceMemberError, DeleteWorkspaceMemberErrors, DeleteWorkspaceMemberResponse, DeleteWorkspaceMemberResponses, EditCommentData, EditCommentError, EditCommentErrors, EditCommentInput, EditCommentResponse, EditCommentResponses, EditReplyData, EditReplyError, EditReplyErrors, EditReplyInput, EditReplyResponse, EditReplyResponses, EnsureMyUserData, EnsureMyUserError, EnsureMyUserErrors, EnsureMyUserResponse, EnsureMyUserResponses, ErrorResponse, FeatureToggle, FileCommentContext, FinalizeConnectionData, FinalizeConnectionError, FinalizeConnectionErrors, FinalizeConnectionResponse, FinalizeConnectionResponses, GetAllData, GetAllError, GetAllErrors, GetAllResponse, GetAllResponses, GetAllWorkspacesData, GetAllWorkspacesError, GetAllWorkspacesErrors, GetAllWorkspacesResponse, GetAllWorkspacesResponses, GetAllWorkspacesWithCreateData, GetAllWorkspacesWithCreateError, GetAllWorkspacesWithCreateErrors, GetAllWorkspacesWithCreateResponse, GetAllWorkspacesWithCreateResponses, GetCommentData, GetCommentError, GetCommentErrors, GetCommentResponse, GetCommentResponses, GetConnectionStatusData, GetConnectionStatusError, GetConnectionStatusErrors, GetConnectionStatusResponse, GetConnectionStatusResponses, GetFeatureTogglesData, GetFeatureTogglesError, GetFeatureTogglesErrors, GetFeatureTogglesResponse, GetFeatureTogglesResponses, GetMyUserData, GetMyUserError, GetMyUserErrors, GetMyUserResponse, GetMyUserResponses, GetMyValuesData, GetMyValuesError, GetMyValuesErrors, GetMyValuesResponse, GetMyValuesResponses, GetPingData, GetPingError, GetPingErrors, GetPingResponse, GetPingResponses, GetWorkspaceData, GetWorkspaceError, GetWorkspaceErrors, GetWorkspaceMembersData, GetWorkspaceMembersError, GetWorkspaceMembersErrors, GetWorkspaceMembersResponse, GetWorkspaceMembersResponses, GetWorkspaceResponse, GetWorkspaceResponses, InitiateConnectionData, InitiateConnectionError, InitiateConnectionErrors, InitiateConnectionResponse, InitiateConnectionResponses, IntegrationName, InviteWorkspaceMemberData, InviteWorkspaceMemberError, InviteWorkspaceMemberErrors, InviteWorkspaceMemberResponse, InviteWorkspaceMemberResponses, ListCommentsData, ListCommentsError, ListCommentsErrors, ListCommentsResponse, ListCommentsResponses, OverrideAllData, OverrideAllError, OverrideAllErrors, OverrideAllResponse, OverrideAllResponses, PageCommentContext, PlanCommentContext, ReopenCommentData, ReopenCommentError, ReopenCommentErrors, ReopenCommentResponse, ReopenCommentResponses, ReplaceMyCategValuesData, ReplaceMyCategValuesError, ReplaceMyCategValuesErrors, ReplaceMyCategValuesResponse, ReplaceMyCategValuesResponses, ResolveCommentData, ResolveCommentError, ResolveCommentErrors, ResolveCommentResponse, ResolveCommentResponses, SetMyValueData, SetMyValueError, SetMyValueErrors, SetMyValueResponse, SetMyValueResponses, StageCommentContext, UpdateMyUserData, UpdateMyUserError, UpdateMyUserErrors, UpdateMyUserResponse, UpdateMyUserResponses, UpdateWorkspaceData, UpdateWorkspaceError, UpdateWorkspaceErrors, UpdateWorkspaceResponse, UpdateWorkspaceResponses, UserMention, UserRaw, WorkspaceBase, WorkspaceWithRepoAndMembers } from './types.gen.ts';
|
|
3
|
+
export { AiGateway, Comments, EnvConfig, Mcp, type Options, Ping, User, UserKeyValue, UserSettings, Workspace } from './sdk.gen.ts';
|
|
4
|
+
export type { AspectRatio, AssistantModelMessage, ClientOptions, CommentContext, CommentGitInfo, CommentResolved, ConnectionStatus, CreateCommentData, CreateCommentError, CreateCommentErrors, CreateCommentInput, CreateCommentResponse, CreateCommentResponses, CreateReplyData, CreateReplyError, CreateReplyErrors, CreateReplyInput, CreateReplyResponse, CreateReplyResponses, CreateSessionAuthorized, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSessionUnauthorized, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceErrors, CreateWorkspaceResponse, CreateWorkspaceResponses, DeleteCommentData, DeleteCommentError, DeleteCommentErrors, DeleteCommentResponse, DeleteCommentResponses, DeleteMyCategValuesData, DeleteMyCategValuesError, DeleteMyCategValuesErrors, DeleteMyCategValuesResponse, DeleteMyCategValuesResponses, DeleteReplyData, DeleteReplyError, DeleteReplyErrors, DeleteReplyResponse, DeleteReplyResponses, DeleteWorkspaceInvitationData, DeleteWorkspaceInvitationError, DeleteWorkspaceInvitationErrors, DeleteWorkspaceInvitationResponse, DeleteWorkspaceInvitationResponses, DeleteWorkspaceMemberData, DeleteWorkspaceMemberError, DeleteWorkspaceMemberErrors, DeleteWorkspaceMemberResponse, DeleteWorkspaceMemberResponses, EditCommentData, EditCommentError, EditCommentErrors, EditCommentInput, EditCommentResponse, EditCommentResponses, EditReplyData, EditReplyError, EditReplyErrors, EditReplyInput, EditReplyResponse, EditReplyResponses, EnsureMyUserData, EnsureMyUserError, EnsureMyUserErrors, EnsureMyUserResponse, EnsureMyUserResponses, ErrorResponse, FeatureToggle, FileCommentContext, FilePart, FinalizeConnectionData, FinalizeConnectionError, FinalizeConnectionErrors, FinalizeConnectionResponse, FinalizeConnectionResponses, FinishReason, GeneratedFile, GenerateImageData, GenerateImageError, GenerateImageErrors, GenerateImageRequest, GenerateImageResponse, GenerateImageResponse2, GenerateImageResponses, GenerateTextData, GenerateTextError, GenerateTextErrors, GenerateTextRequest, GenerateTextResponse, GenerateTextResponse2, GenerateTextResponses, GetAllData, GetAllError, GetAllErrors, GetAllResponse, GetAllResponses, GetAllWorkspacesData, GetAllWorkspacesError, GetAllWorkspacesErrors, GetAllWorkspacesResponse, GetAllWorkspacesResponses, GetAllWorkspacesWithCreateData, GetAllWorkspacesWithCreateError, GetAllWorkspacesWithCreateErrors, GetAllWorkspacesWithCreateResponse, GetAllWorkspacesWithCreateResponses, GetCommentData, GetCommentError, GetCommentErrors, GetCommentResponse, GetCommentResponses, GetConnectionStatusData, GetConnectionStatusError, GetConnectionStatusErrors, GetConnectionStatusResponse, GetConnectionStatusResponses, GetFeatureTogglesData, GetFeatureTogglesError, GetFeatureTogglesErrors, GetFeatureTogglesResponse, GetFeatureTogglesResponses, GetMyUserData, GetMyUserError, GetMyUserErrors, GetMyUserResponse, GetMyUserResponses, GetMyValuesData, GetMyValuesError, GetMyValuesErrors, GetMyValuesResponse, GetMyValuesResponses, GetPingData, GetPingError, GetPingErrors, GetPingResponse, GetPingResponses, GetWorkspaceData, GetWorkspaceError, GetWorkspaceErrors, GetWorkspaceMembersData, GetWorkspaceMembersError, GetWorkspaceMembersErrors, GetWorkspaceMembersResponse, GetWorkspaceMembersResponses, GetWorkspaceResponse, GetWorkspaceResponses, ImageGenerationModelId, ImageGenerationUsage, ImageMediaType, ImagePart, InitiateConnectionData, InitiateConnectionError, InitiateConnectionErrors, InitiateConnectionResponse, InitiateConnectionResponses, IntegrationName, InviteWorkspaceMemberData, InviteWorkspaceMemberError, InviteWorkspaceMemberErrors, InviteWorkspaceMemberResponse, InviteWorkspaceMemberResponses, ListCommentsData, ListCommentsError, ListCommentsErrors, ListCommentsResponse, ListCommentsResponses, ModelMessage, OverrideAllData, OverrideAllError, OverrideAllErrors, OverrideAllResponse, OverrideAllResponses, PageCommentContext, PlanCommentContext, ProviderMetadata, ProviderOptions, ReasoningEffort, ReasoningPart, ReopenCommentData, ReopenCommentError, ReopenCommentErrors, ReopenCommentResponse, ReopenCommentResponses, ReplaceMyCategValuesData, ReplaceMyCategValuesError, ReplaceMyCategValuesErrors, ReplaceMyCategValuesResponse, ReplaceMyCategValuesResponses, ResolveCommentData, ResolveCommentError, ResolveCommentErrors, ResolveCommentResponse, ResolveCommentResponses, SetMyValueData, SetMyValueError, SetMyValueErrors, SetMyValueResponse, SetMyValueResponses, StageCommentContext, StreamTextChunk, StreamTextData, StreamTextError, StreamTextErrors, StreamTextEvent, StreamTextRequest, StreamTextResponse, StreamTextResponses, StreamTextResult, SystemModelMessage, TextGenerationModelId, TextGenerationOutput, TextGenerationUsage, TextPart, ToolCallPart, ToolDefinition, ToolModelMessage, ToolResultOutput, ToolResultPart, UpdateMyUserData, UpdateMyUserError, UpdateMyUserErrors, UpdateMyUserResponse, UpdateMyUserResponses, UpdateWorkspaceData, UpdateWorkspaceError, UpdateWorkspaceErrors, UpdateWorkspaceResponse, UpdateWorkspaceResponses, UserMention, UserModelMessage, UserRaw, WorkspaceBase, WorkspaceWithRepoAndMembers } from './types.gen.ts';
|
package/src/public/sdk.gen.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
-
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.ts';
|
|
4
|
-
import type { CreateCommentData, CreateCommentErrors, CreateCommentResponses, CreateReplyData, CreateReplyErrors, CreateReplyResponses, CreateSessionData, CreateSessionErrors, CreateSessionResponses, CreateWorkspaceData, CreateWorkspaceErrors, CreateWorkspaceResponses, DeleteCommentData, DeleteCommentErrors, DeleteCommentResponses, DeleteMyCategValuesData, DeleteMyCategValuesErrors, DeleteMyCategValuesResponses, DeleteReplyData, DeleteReplyErrors, DeleteReplyResponses, DeleteWorkspaceInvitationData, DeleteWorkspaceInvitationErrors, DeleteWorkspaceInvitationResponses, DeleteWorkspaceMemberData, DeleteWorkspaceMemberErrors, DeleteWorkspaceMemberResponses, EditCommentData, EditCommentErrors, EditCommentResponses, EditReplyData, EditReplyErrors, EditReplyResponses, EnsureMyUserData, EnsureMyUserErrors, EnsureMyUserResponses, FinalizeConnectionData, FinalizeConnectionErrors, FinalizeConnectionResponses, GetAllData, GetAllErrors, GetAllResponses, GetAllWorkspacesData, GetAllWorkspacesErrors, GetAllWorkspacesResponses, GetAllWorkspacesWithCreateData, GetAllWorkspacesWithCreateErrors, GetAllWorkspacesWithCreateResponses, GetCommentData, GetCommentErrors, GetCommentResponses, GetConnectionStatusData, GetConnectionStatusErrors, GetConnectionStatusResponses, GetFeatureTogglesData, GetFeatureTogglesErrors, GetFeatureTogglesResponses, GetMyUserData, GetMyUserErrors, GetMyUserResponses, GetMyValuesData, GetMyValuesErrors, GetMyValuesResponses, GetPingData, GetPingErrors, GetPingResponses, GetWorkspaceData, GetWorkspaceErrors, GetWorkspaceMembersData, GetWorkspaceMembersErrors, GetWorkspaceMembersResponses, GetWorkspaceResponses, InitiateConnectionData, InitiateConnectionErrors, InitiateConnectionResponses, InviteWorkspaceMemberData, InviteWorkspaceMemberErrors, InviteWorkspaceMemberResponses, ListCommentsData, ListCommentsErrors, ListCommentsResponses, OverrideAllData, OverrideAllErrors, OverrideAllResponses, ReopenCommentData, ReopenCommentErrors, ReopenCommentResponses, ReplaceMyCategValuesData, ReplaceMyCategValuesErrors, ReplaceMyCategValuesResponses, ResolveCommentData, ResolveCommentErrors, ResolveCommentResponses, SetMyValueData, SetMyValueErrors, SetMyValueResponses, UpdateMyUserData, UpdateMyUserErrors, UpdateMyUserResponses, UpdateWorkspaceData, UpdateWorkspaceErrors, UpdateWorkspaceResponses } from './types.gen.ts';
|
|
3
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, ServerSentEventsResult, TDataShape } from './client/index.ts';
|
|
4
|
+
import type { CreateCommentData, CreateCommentErrors, CreateCommentResponses, CreateReplyData, CreateReplyErrors, CreateReplyResponses, CreateSessionData, CreateSessionErrors, CreateSessionResponses, CreateWorkspaceData, CreateWorkspaceErrors, CreateWorkspaceResponses, DeleteCommentData, DeleteCommentErrors, DeleteCommentResponses, DeleteMyCategValuesData, DeleteMyCategValuesErrors, DeleteMyCategValuesResponses, DeleteReplyData, DeleteReplyErrors, DeleteReplyResponses, DeleteWorkspaceInvitationData, DeleteWorkspaceInvitationErrors, DeleteWorkspaceInvitationResponses, DeleteWorkspaceMemberData, DeleteWorkspaceMemberErrors, DeleteWorkspaceMemberResponses, EditCommentData, EditCommentErrors, EditCommentResponses, EditReplyData, EditReplyErrors, EditReplyResponses, EnsureMyUserData, EnsureMyUserErrors, EnsureMyUserResponses, FinalizeConnectionData, FinalizeConnectionErrors, FinalizeConnectionResponses, GenerateImageData, GenerateImageErrors, GenerateImageResponses, GenerateTextData, GenerateTextErrors, GenerateTextResponses, GetAllData, GetAllErrors, GetAllResponses, GetAllWorkspacesData, GetAllWorkspacesErrors, GetAllWorkspacesResponses, GetAllWorkspacesWithCreateData, GetAllWorkspacesWithCreateErrors, GetAllWorkspacesWithCreateResponses, GetCommentData, GetCommentErrors, GetCommentResponses, GetConnectionStatusData, GetConnectionStatusErrors, GetConnectionStatusResponses, GetFeatureTogglesData, GetFeatureTogglesErrors, GetFeatureTogglesResponses, GetMyUserData, GetMyUserErrors, GetMyUserResponses, GetMyValuesData, GetMyValuesErrors, GetMyValuesResponses, GetPingData, GetPingErrors, GetPingResponses, GetWorkspaceData, GetWorkspaceErrors, GetWorkspaceMembersData, GetWorkspaceMembersErrors, GetWorkspaceMembersResponses, GetWorkspaceResponses, InitiateConnectionData, InitiateConnectionErrors, InitiateConnectionResponses, InviteWorkspaceMemberData, InviteWorkspaceMemberErrors, InviteWorkspaceMemberResponses, ListCommentsData, ListCommentsErrors, ListCommentsResponses, OverrideAllData, OverrideAllErrors, OverrideAllResponses, ReopenCommentData, ReopenCommentErrors, ReopenCommentResponses, ReplaceMyCategValuesData, ReplaceMyCategValuesErrors, ReplaceMyCategValuesResponses, ResolveCommentData, ResolveCommentErrors, ResolveCommentResponses, SetMyValueData, SetMyValueErrors, SetMyValueResponses, StreamTextData, StreamTextErrors, StreamTextResponse, StreamTextResponses, UpdateMyUserData, UpdateMyUserErrors, UpdateMyUserResponses, UpdateWorkspaceData, UpdateWorkspaceErrors, UpdateWorkspaceResponses } from './types.gen.ts';
|
|
5
5
|
|
|
6
6
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
7
7
|
/**
|
|
@@ -209,6 +209,41 @@ export class Mcp {
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
export class AiGateway {
|
|
213
|
+
public static generateText<ThrowOnError extends boolean = false>(options: Options<GenerateTextData, ThrowOnError>): RequestResult<GenerateTextResponses, GenerateTextErrors, ThrowOnError> {
|
|
214
|
+
return options.client.post<GenerateTextResponses, GenerateTextErrors, ThrowOnError>({
|
|
215
|
+
url: '/ai-gateway/generate-text',
|
|
216
|
+
...options,
|
|
217
|
+
headers: {
|
|
218
|
+
'Content-Type': 'application/json',
|
|
219
|
+
...options.headers
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
public static streamText<ThrowOnError extends boolean = false>(options: Options<StreamTextData, ThrowOnError, StreamTextResponse>): Promise<ServerSentEventsResult<StreamTextResponses>> {
|
|
225
|
+
return options.client.sse.post<StreamTextResponses, StreamTextErrors, ThrowOnError>({
|
|
226
|
+
url: '/ai-gateway/stream-text',
|
|
227
|
+
...options,
|
|
228
|
+
headers: {
|
|
229
|
+
'Content-Type': 'application/json',
|
|
230
|
+
...options.headers
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
public static generateImage<ThrowOnError extends boolean = false>(options: Options<GenerateImageData, ThrowOnError>): RequestResult<GenerateImageResponses, GenerateImageErrors, ThrowOnError> {
|
|
236
|
+
return options.client.post<GenerateImageResponses, GenerateImageErrors, ThrowOnError>({
|
|
237
|
+
url: '/ai-gateway/generate-image',
|
|
238
|
+
...options,
|
|
239
|
+
headers: {
|
|
240
|
+
'Content-Type': 'application/json',
|
|
241
|
+
...options.headers
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
212
247
|
export class Comments {
|
|
213
248
|
public static deleteComment<ThrowOnError extends boolean = false>(options: Options<DeleteCommentData, ThrowOnError>): RequestResult<DeleteCommentResponses, DeleteCommentErrors, ThrowOnError> {
|
|
214
249
|
return options.client.delete<DeleteCommentResponses, DeleteCommentErrors, ThrowOnError>({ url: '/comments/{hostType}/{hostId}/{commentId}', ...options });
|