@dazl/api-client 1.0.26 → 1.0.28

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.
@@ -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;
@@ -523,7 +528,7 @@ export type WorkspaceBase = {
523
528
  repoId: string | null;
524
529
  };
525
530
 
526
- export type WorkspaceWithRepo = {
531
+ export type WorkspaceWithRepoAndMembers = {
527
532
  id: string;
528
533
  name: string;
529
534
  dazlUserId: string | null;
@@ -538,6 +543,27 @@ export type WorkspaceWithRepo = {
538
543
  * The host of the repo associated with this workspace, if any.
539
544
  */
540
545
  repoHost: string | null;
546
+ owner?: {
547
+ /**
548
+ * Dazl ID for the type = "user"
549
+ */
550
+ id: string;
551
+ email: string;
552
+ name?: string;
553
+ picture?: string;
554
+ role: 'workspace_member' | 'owner';
555
+ } | null;
556
+ members?: Array<{
557
+ /**
558
+ * Dazl ID for the type = "user"
559
+ */
560
+ id: string;
561
+ email: string;
562
+ name?: string;
563
+ picture?: string;
564
+ role: 'workspace_member' | 'owner';
565
+ }>;
566
+ projectCount?: number;
541
567
  };
542
568
 
543
569
  export type CreateSessionAuthorized = {
@@ -559,6 +585,335 @@ export type ConnectionStatus = {
559
585
  isConnected: boolean;
560
586
  };
561
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
+
562
917
  export type CreateCommentInput = {
563
918
  content: string;
564
919
  /**
@@ -6813,7 +7168,7 @@ export type GetWorkspaceResponses = {
6813
7168
  * Returns the workspace with the given ID
6814
7169
  */
6815
7170
  200: {
6816
- workspace: WorkspaceWithRepo;
7171
+ workspace: WorkspaceWithRepoAndMembers;
6817
7172
  };
6818
7173
  };
6819
7174
 
@@ -6966,42 +7321,7 @@ export type GetAllWorkspacesWithCreateResponses = {
6966
7321
  * Returns the list of workspaces for the current user
6967
7322
  */
6968
7323
  200: {
6969
- workspaces: Array<{
6970
- id: string;
6971
- name: string;
6972
- dazlUserId: string | null;
6973
- createdAt: string;
6974
- isDefault: boolean;
6975
- repoId: string | null;
6976
- /**
6977
- * The full name of the repo associated with this workspace, if any.
6978
- */
6979
- repoFullName: string | null;
6980
- /**
6981
- * The host of the repo associated with this workspace, if any.
6982
- */
6983
- repoHost: string | null;
6984
- owner?: {
6985
- /**
6986
- * Dazl ID for the type = "user"
6987
- */
6988
- id: string;
6989
- email: string;
6990
- name?: string;
6991
- picture?: string;
6992
- role: 'workspace_member' | 'owner';
6993
- } | null;
6994
- members?: Array<{
6995
- /**
6996
- * Dazl ID for the type = "user"
6997
- */
6998
- id: string;
6999
- email: string;
7000
- name?: string;
7001
- picture?: string;
7002
- role: 'workspace_member' | 'owner';
7003
- }>;
7004
- }>;
7324
+ workspaces: Array<WorkspaceWithRepoAndMembers>;
7005
7325
  };
7006
7326
  };
7007
7327
 
@@ -7854,6 +8174,162 @@ export type GetConnectionStatusResponses = {
7854
8174
 
7855
8175
  export type GetConnectionStatusResponse = GetConnectionStatusResponses[keyof GetConnectionStatusResponses];
7856
8176
 
8177
+ export type GenerateTextData = {
8178
+ body: GenerateTextRequest;
8179
+ path?: never;
8180
+ query?: never;
8181
+ url: '/ai-gateway/generate-text';
8182
+ };
8183
+
8184
+ export type GenerateTextErrors = {
8185
+ /**
8186
+ * Bad request - Invalid parameters or malformed JSON
8187
+ */
8188
+ 400: {
8189
+ message: string;
8190
+ issues?: string;
8191
+ };
8192
+ /**
8193
+ * Unauthorized
8194
+ */
8195
+ 401: ErrorResponse;
8196
+ /**
8197
+ * Forbidden
8198
+ */
8199
+ 403: ErrorResponse;
8200
+ /**
8201
+ * Not Found
8202
+ */
8203
+ 404: ErrorResponse;
8204
+ /**
8205
+ * Conflict
8206
+ */
8207
+ 409: ErrorResponse;
8208
+ /**
8209
+ * Internal server error
8210
+ */
8211
+ 500: ErrorResponse;
8212
+ /**
8213
+ * Service Unavailable
8214
+ */
8215
+ 503: ErrorResponse;
8216
+ };
8217
+
8218
+ export type GenerateTextError = GenerateTextErrors[keyof GenerateTextErrors];
8219
+
8220
+ export type GenerateTextResponses = {
8221
+ /**
8222
+ * Generates text response from selected AI model
8223
+ */
8224
+ 200: GenerateTextResponse;
8225
+ };
8226
+
8227
+ export type GenerateTextResponse2 = GenerateTextResponses[keyof GenerateTextResponses];
8228
+
8229
+ export type StreamTextData = {
8230
+ body: StreamTextRequest;
8231
+ path?: never;
8232
+ query?: never;
8233
+ url: '/ai-gateway/stream-text';
8234
+ };
8235
+
8236
+ export type StreamTextErrors = {
8237
+ /**
8238
+ * Bad request - Invalid parameters or malformed JSON
8239
+ */
8240
+ 400: {
8241
+ message: string;
8242
+ issues?: string;
8243
+ };
8244
+ /**
8245
+ * Unauthorized
8246
+ */
8247
+ 401: ErrorResponse;
8248
+ /**
8249
+ * Forbidden
8250
+ */
8251
+ 403: ErrorResponse;
8252
+ /**
8253
+ * Not Found
8254
+ */
8255
+ 404: ErrorResponse;
8256
+ /**
8257
+ * Conflict
8258
+ */
8259
+ 409: ErrorResponse;
8260
+ /**
8261
+ * Internal server error
8262
+ */
8263
+ 500: ErrorResponse;
8264
+ /**
8265
+ * Service Unavailable
8266
+ */
8267
+ 503: ErrorResponse;
8268
+ };
8269
+
8270
+ export type StreamTextError = StreamTextErrors[keyof StreamTextErrors];
8271
+
8272
+ export type StreamTextResponses = {
8273
+ /**
8274
+ * Streams text chunks using Server-Sent Events
8275
+ */
8276
+ 200: StreamTextEvent;
8277
+ };
8278
+
8279
+ export type StreamTextResponse = StreamTextResponses[keyof StreamTextResponses];
8280
+
8281
+ export type GenerateImageData = {
8282
+ body: GenerateImageRequest;
8283
+ path?: never;
8284
+ query?: never;
8285
+ url: '/ai-gateway/generate-image';
8286
+ };
8287
+
8288
+ export type GenerateImageErrors = {
8289
+ /**
8290
+ * Bad request - Invalid parameters or malformed JSON
8291
+ */
8292
+ 400: {
8293
+ message: string;
8294
+ issues?: string;
8295
+ };
8296
+ /**
8297
+ * Unauthorized
8298
+ */
8299
+ 401: ErrorResponse;
8300
+ /**
8301
+ * Forbidden
8302
+ */
8303
+ 403: ErrorResponse;
8304
+ /**
8305
+ * Not Found
8306
+ */
8307
+ 404: ErrorResponse;
8308
+ /**
8309
+ * Conflict
8310
+ */
8311
+ 409: ErrorResponse;
8312
+ /**
8313
+ * Internal server error
8314
+ */
8315
+ 500: ErrorResponse;
8316
+ /**
8317
+ * Service Unavailable
8318
+ */
8319
+ 503: ErrorResponse;
8320
+ };
8321
+
8322
+ export type GenerateImageError = GenerateImageErrors[keyof GenerateImageErrors];
8323
+
8324
+ export type GenerateImageResponses = {
8325
+ /**
8326
+ * Generates an image and returns base64 payload and usage
8327
+ */
8328
+ 200: GenerateImageResponse;
8329
+ };
8330
+
8331
+ export type GenerateImageResponse2 = GenerateImageResponses[keyof GenerateImageResponses];
8332
+
7857
8333
  export type DeleteCommentData = {
7858
8334
  body?: never;
7859
8335
  path: {
@@ -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, WorkspaceWithRepo } 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';
@@ -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 });