@caido/sdk-frontend 0.57.1-beta.11 → 0.57.1-beta.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-frontend",
3
- "version": "0.57.1-beta.11",
3
+ "version": "0.57.1-beta.12",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "repository": "https://github.com/caido/sdk-js/",
@@ -134,38 +134,23 @@ export declare const AiErrorReason: {
134
134
  readonly RequestMalformed: "REQUEST_MALFORMED";
135
135
  };
136
136
  export type AiErrorReason = (typeof AiErrorReason)[keyof typeof AiErrorReason];
137
- export type AiProviderAnthropic = {
138
- apiKey: Scalars["Sensitive"]["output"];
139
- };
140
- export type AiProviderAnthropicInput = {
141
- apiKey: Scalars["Sensitive"]["input"];
142
- };
143
- export type AiProviderGoogle = {
144
- apiKey: Scalars["Sensitive"]["output"];
145
- };
146
- export type AiProviderGoogleInput = {
147
- apiKey: Scalars["Sensitive"]["input"];
148
- };
149
- export type AiProviderOpenAi = {
137
+ export type AiProvider = {
138
+ alias: Scalars["Alias"]["output"];
139
+ api: AiProviderApi;
150
140
  apiKey: Scalars["Sensitive"]["output"];
141
+ createdAt: Scalars["DateTime"]["output"];
142
+ id: Scalars["ID"]["output"];
143
+ updatedAt: Scalars["DateTime"]["output"];
151
144
  url?: Maybe<Scalars["Url"]["output"]>;
152
145
  };
153
- export type AiProviderOpenAiInput = {
154
- apiKey: Scalars["Sensitive"]["input"];
155
- url?: InputMaybe<Scalars["Url"]["input"]>;
156
- };
157
- export type AiProviderOpenRouter = {
158
- apiKey: Scalars["Sensitive"]["output"];
159
- };
160
- export type AiProviderOpenRouterInput = {
161
- apiKey: Scalars["Sensitive"]["input"];
162
- };
163
- export type AiProviders = {
164
- anthropic?: Maybe<AiProviderAnthropic>;
165
- google?: Maybe<AiProviderGoogle>;
166
- openai?: Maybe<AiProviderOpenAi>;
167
- openrouter?: Maybe<AiProviderOpenRouter>;
146
+ export declare const AiProviderApi: {
147
+ readonly Anthropic: "ANTHROPIC";
148
+ readonly Gemini: "GEMINI";
149
+ readonly OpenaiCompletion: "OPENAI_COMPLETION";
150
+ readonly OpenaiResponse: "OPENAI_RESPONSE";
151
+ readonly Openrouter: "OPENROUTER";
168
152
  };
153
+ export type AiProviderApi = (typeof AiProviderApi)[keyof typeof AiProviderApi];
169
154
  export type AiUserError = UserError & {
170
155
  code: Scalars["String"]["output"];
171
156
  message: Scalars["String"]["output"];
@@ -758,6 +743,17 @@ export type Count = {
758
743
  snapshot: Scalars["Snapshot"]["output"];
759
744
  value: Scalars["Int"]["output"];
760
745
  };
746
+ export type CreateAiProviderError = AliasTakenUserError | OtherUserError;
747
+ export type CreateAiProviderInput = {
748
+ alias: Scalars["Alias"]["input"];
749
+ api: AiProviderApi;
750
+ apiKey: Scalars["Sensitive"]["input"];
751
+ url?: InputMaybe<Scalars["Url"]["input"]>;
752
+ };
753
+ export type CreateAiProviderPayload = {
754
+ error?: Maybe<CreateAiProviderError>;
755
+ provider?: Maybe<AiProvider>;
756
+ };
761
757
  export type CreateAssistantSessionError = CloudUserError | OtherUserError | PermissionDeniedUserError;
762
758
  export type CreateAssistantSessionInput = {
763
759
  modelId: Scalars["ID"]["input"];
@@ -952,6 +948,9 @@ export type CreateWorkflowPayload = {
952
948
  error?: Maybe<CreateWorkflowError>;
953
949
  workflow?: Maybe<Workflow>;
954
950
  };
951
+ export type CreatedAiProviderPayload = {
952
+ provider: AiProvider;
953
+ };
955
954
  export type CreatedAssistantMessagePayload = {
956
955
  messageEdge: AssistantMessageEdge;
957
956
  snapshot: Scalars["Snapshot"]["output"];
@@ -1193,6 +1192,11 @@ export type DataImportResult = {
1193
1192
  summary?: Maybe<DataImportSummary>;
1194
1193
  };
1195
1194
  export type DataImportSummary = FindingsSummary | TamperSummary;
1195
+ export type DeleteAiProviderError = OtherUserError | UnknownIdUserError;
1196
+ export type DeleteAiProviderPayload = {
1197
+ deletedId?: Maybe<Scalars["ID"]["output"]>;
1198
+ error?: Maybe<DeleteAiProviderError>;
1199
+ };
1196
1200
  export type DeleteAssistantSessionPayload = {
1197
1201
  deletedId?: Maybe<Scalars["ID"]["output"]>;
1198
1202
  };
@@ -1302,6 +1306,9 @@ export type DeleteWorkflowPayload = {
1302
1306
  deletedId?: Maybe<Scalars["ID"]["output"]>;
1303
1307
  error?: Maybe<DeleteWorkflowError>;
1304
1308
  };
1309
+ export type DeletedAiProviderPayload = {
1310
+ deletedProviderId: Scalars["ID"]["output"];
1311
+ };
1305
1312
  export type DeletedAssistantSessionPayload = {
1306
1313
  deletedSessionId: Scalars["ID"]["output"];
1307
1314
  snapshot: Scalars["Snapshot"]["output"];
@@ -1695,7 +1702,6 @@ export type InstallPluginPackagesPayload = {
1695
1702
  packages: Array<PluginPackage>;
1696
1703
  };
1697
1704
  export type InstanceSettings = {
1698
- aiProviders: AiProviders;
1699
1705
  analytic: AnalyticStatus;
1700
1706
  network: NetworkState;
1701
1707
  onboarding: OnboardingState;
@@ -1887,6 +1893,7 @@ export type MutationRoot = {
1887
1893
  cancelTask: CancelTaskPayload;
1888
1894
  clearReplayEntryDraft: ClearReplayEntryDraftPayload;
1889
1895
  clearSitemapEntries: ClearSitemapEntriesPayload;
1896
+ createAIProvider: CreateAiProviderPayload;
1890
1897
  createAssistantSession: CreateAssistantSessionPayload;
1891
1898
  createAutomateSession: CreateAutomateSessionPayload;
1892
1899
  createBackup: CreateBackupPayload;
@@ -1908,6 +1915,7 @@ export type MutationRoot = {
1908
1915
  createUpstreamProxyHttp: CreateUpstreamProxyHttpPayload;
1909
1916
  createUpstreamProxySocks: CreateUpstreamProxySocksPayload;
1910
1917
  createWorkflow: CreateWorkflowPayload;
1918
+ deleteAIProvider: DeleteAiProviderPayload;
1911
1919
  deleteAssistantSession: DeleteAssistantSessionPayload;
1912
1920
  deleteAutomateEntries: DeleteAutomateEntriesPayload;
1913
1921
  deleteAutomateSession: DeleteAutomateSessionPayload;
@@ -2003,7 +2011,7 @@ export type MutationRoot = {
2003
2011
  startExportRequestsTask: StartExportRequestsTaskPayload;
2004
2012
  startReplayTask: StartReplayTaskPayload;
2005
2013
  stopReplayWsTasks: StopReplayWsTaskPayload;
2006
- testAiProvider: TestAiProviderPayload;
2014
+ testAIProvider: TestAiProviderPayload;
2007
2015
  testExtractor: TestExtractorPayload;
2008
2016
  testTamperRule: TestTamperRulePayload;
2009
2017
  testUpstreamProxyHttp: TestUpstreamProxyHttpPayload;
@@ -2021,6 +2029,7 @@ export type MutationRoot = {
2021
2029
  track: TrackPayload;
2022
2030
  uninstallPluginPackage: UninstallPluginPackagePayload;
2023
2031
  uninstallPluginPackages: UninstallPluginPackagesPayload;
2032
+ updateAIProvider: UpdateAiProviderPayload;
2024
2033
  updateAutomateSession: UpdateAutomateSessionPayload;
2025
2034
  updateBrowser: UpdateBrowserPayload;
2026
2035
  updateDnsRewrite: UpdateDnsRewritePayload;
@@ -2057,6 +2066,9 @@ export type MutationRootClearReplayEntryDraftArgs = {
2057
2066
  id: Scalars["ID"]["input"];
2058
2067
  kind: ReplaySessionKind;
2059
2068
  };
2069
+ export type MutationRootCreateAiProviderArgs = {
2070
+ input: CreateAiProviderInput;
2071
+ };
2060
2072
  export type MutationRootCreateAssistantSessionArgs = {
2061
2073
  input: CreateAssistantSessionInput;
2062
2074
  };
@@ -2121,6 +2133,9 @@ export type MutationRootCreateUpstreamProxySocksArgs = {
2121
2133
  export type MutationRootCreateWorkflowArgs = {
2122
2134
  input: CreateWorkflowInput;
2123
2135
  };
2136
+ export type MutationRootDeleteAiProviderArgs = {
2137
+ id: Scalars["ID"]["input"];
2138
+ };
2124
2139
  export type MutationRootDeleteAssistantSessionArgs = {
2125
2140
  id: Scalars["ID"]["input"];
2126
2141
  };
@@ -2472,6 +2487,10 @@ export type MutationRootUninstallPluginPackageArgs = {
2472
2487
  export type MutationRootUninstallPluginPackagesArgs = {
2473
2488
  ids: Array<Scalars["ID"]["input"]>;
2474
2489
  };
2490
+ export type MutationRootUpdateAiProviderArgs = {
2491
+ id: Scalars["ID"]["input"];
2492
+ input: UpdateAiProviderInput;
2493
+ };
2475
2494
  export type MutationRootUpdateAutomateSessionArgs = {
2476
2495
  id: Scalars["ID"]["input"];
2477
2496
  input: UpdateAutomateSessionInput;
@@ -2785,6 +2804,7 @@ export type QueryInput = {
2785
2804
  streamQL: StreamQlInput;
2786
2805
  };
2787
2806
  export type QueryRoot = {
2807
+ aiProviders: Array<AiProvider>;
2788
2808
  assistantModels: Array<AssistantModel>;
2789
2809
  assistantSession?: Maybe<AssistantSession>;
2790
2810
  assistantSessions: Array<AssistantSession>;
@@ -3704,22 +3724,14 @@ export type SetConfigProjectPayload = {
3704
3724
  config: GlobalConfig;
3705
3725
  };
3706
3726
  export type SetInstanceSettingsInput = {
3707
- aiProvider: SettingsAiProviderInput;
3708
- analytics?: never;
3709
- network?: never;
3710
- onboarding?: never;
3711
- } | {
3712
- aiProvider?: never;
3713
3727
  analytics: SettingsAnalyticInput;
3714
3728
  network?: never;
3715
3729
  onboarding?: never;
3716
3730
  } | {
3717
- aiProvider?: never;
3718
3731
  analytics?: never;
3719
3732
  network: SettingsNetworkInput;
3720
3733
  onboarding?: never;
3721
3734
  } | {
3722
- aiProvider?: never;
3723
3735
  analytics?: never;
3724
3736
  network?: never;
3725
3737
  onboarding: SettingsOnboardingInput;
@@ -3741,27 +3753,6 @@ export type SetPluginDataPayload = {
3741
3753
  export type SetProjectConfigStreamPayload = {
3742
3754
  config: ProjectConfigStream;
3743
3755
  };
3744
- export type SettingsAiProviderInput = {
3745
- anthropic: AiProviderAnthropicInput;
3746
- google?: never;
3747
- openai?: never;
3748
- openrouter?: never;
3749
- } | {
3750
- anthropic?: never;
3751
- google: AiProviderGoogleInput;
3752
- openai?: never;
3753
- openrouter?: never;
3754
- } | {
3755
- anthropic?: never;
3756
- google?: never;
3757
- openai: AiProviderOpenAiInput;
3758
- openrouter?: never;
3759
- } | {
3760
- anthropic?: never;
3761
- google?: never;
3762
- openai?: never;
3763
- openrouter: AiProviderOpenRouterInput;
3764
- };
3765
3756
  export type SettingsAnalyticInput = {
3766
3757
  enabled: Scalars["Boolean"]["input"];
3767
3758
  };
@@ -4036,6 +4027,7 @@ export type StreamWsMessageOrderInput = {
4036
4027
  ordering: Ordering;
4037
4028
  };
4038
4029
  export type SubscriptionRoot = {
4030
+ createdAIProvider: CreatedAiProviderPayload;
4039
4031
  createdAssistantMessage: CreatedAssistantMessagePayload;
4040
4032
  createdAssistantMessageTask: CreatedAssistantMessageTaskPayload;
4041
4033
  createdAssistantSession: CreatedAssistantSessionPayload;
@@ -4070,6 +4062,7 @@ export type SubscriptionRoot = {
4070
4062
  createdUpstreamProxyHttp: CreatedUpstreamProxyHttpPayload;
4071
4063
  createdUpstreamProxySocks: CreatedUpstreamProxySocksPayload;
4072
4064
  createdWorkflow: CreatedWorkflowPayload;
4065
+ deletedAIProvider: DeletedAiProviderPayload;
4073
4066
  deletedAssistantSession: DeletedAssistantSessionPayload;
4074
4067
  deletedAutomateEntry: DeletedAutomateEntryPayload;
4075
4068
  deletedAutomateSession: DeletedAutomateSessionPayload;
@@ -4109,6 +4102,7 @@ export type SubscriptionRoot = {
4109
4102
  startedDeleteInterceptEntriesTask: StartedDeleteInterceptEntriesTaskPayload;
4110
4103
  startedRestoreBackupTask: StartedRestoreBackupTaskPayload;
4111
4104
  startedTask: StartedTaskPayload;
4105
+ updatedAIProvider: UpdatedAiProviderPayload;
4112
4106
  updatedAssistantMessageTask: UpdatedAssistantMessageTaskPayload;
4113
4107
  updatedAssistantSession: UpdatedAssistantSessionPayload;
4114
4108
  updatedAutomateEntry: UpdatedAutomateEntryPayload;
@@ -4827,25 +4821,9 @@ export declare const TaskStatus: {
4827
4821
  export type TaskStatus = (typeof TaskStatus)[keyof typeof TaskStatus];
4828
4822
  export type TestAiProviderError = AiUserError | OtherUserError;
4829
4823
  export type TestAiProviderInput = {
4830
- anthropic: AiProviderAnthropicInput;
4831
- google?: never;
4832
- openai?: never;
4833
- openrouter?: never;
4834
- } | {
4835
- anthropic?: never;
4836
- google: AiProviderGoogleInput;
4837
- openai?: never;
4838
- openrouter?: never;
4839
- } | {
4840
- anthropic?: never;
4841
- google?: never;
4842
- openai: AiProviderOpenAiInput;
4843
- openrouter?: never;
4844
- } | {
4845
- anthropic?: never;
4846
- google?: never;
4847
- openai?: never;
4848
- openrouter: AiProviderOpenRouterInput;
4824
+ api: AiProviderApi;
4825
+ apiKey: Scalars["Sensitive"]["input"];
4826
+ url?: InputMaybe<Scalars["Url"]["input"]>;
4849
4827
  };
4850
4828
  export type TestAiProviderPayload = {
4851
4829
  error?: Maybe<TestAiProviderError>;
@@ -4964,6 +4942,17 @@ export type UnknownIdUserError = UserError & {
4964
4942
  export type UnsupportedPlatformUserError = UserError & {
4965
4943
  code: Scalars["String"]["output"];
4966
4944
  };
4945
+ export type UpdateAiProviderError = AliasTakenUserError | OtherUserError | UnknownIdUserError;
4946
+ export type UpdateAiProviderInput = {
4947
+ alias: Scalars["Alias"]["input"];
4948
+ api: AiProviderApi;
4949
+ apiKey: Scalars["Sensitive"]["input"];
4950
+ url?: InputMaybe<Scalars["Url"]["input"]>;
4951
+ };
4952
+ export type UpdateAiProviderPayload = {
4953
+ error?: Maybe<UpdateAiProviderError>;
4954
+ provider?: Maybe<AiProvider>;
4955
+ };
4967
4956
  export type UpdateAutomateSessionError = CloudUserError | OtherUserError | PermissionDeniedUserError;
4968
4957
  export type UpdateAutomateSessionInput = {
4969
4958
  connection: ConnectionInfoInput;
@@ -5144,6 +5133,9 @@ export type UpdateWorkflowPayload = {
5144
5133
  error?: Maybe<UpdateWorkflowError>;
5145
5134
  workflow?: Maybe<Workflow>;
5146
5135
  };
5136
+ export type UpdatedAiProviderPayload = {
5137
+ provider: AiProvider;
5138
+ };
5147
5139
  export type UpdatedAssistantMessageTaskPayload = {
5148
5140
  task: AssistantMessageTask;
5149
5141
  };
@@ -5454,6 +5446,149 @@ export type Workspace = {
5454
5446
  id: Scalars["ID"]["output"];
5455
5447
  name: Scalars["String"]["output"];
5456
5448
  };
5449
+ export type AiProviderFullFragment = {
5450
+ __typename: "AIProvider";
5451
+ id: string;
5452
+ alias: string;
5453
+ api: AiProviderApi;
5454
+ apiKey: string;
5455
+ url?: string | undefined | null;
5456
+ };
5457
+ export type TestAiProviderPayloadFullFragment = {
5458
+ success?: boolean | undefined | null;
5459
+ error?: {
5460
+ code: string;
5461
+ message: string;
5462
+ reason: AiErrorReason;
5463
+ } | {
5464
+ code: string;
5465
+ } | undefined | null;
5466
+ };
5467
+ export type AiProvidersQueryVariables = Exact<{
5468
+ [key: string]: never;
5469
+ }>;
5470
+ export type AiProvidersQuery = {
5471
+ aiProviders: Array<{
5472
+ __typename: "AIProvider";
5473
+ id: string;
5474
+ alias: string;
5475
+ api: AiProviderApi;
5476
+ apiKey: string;
5477
+ url?: string | undefined | null;
5478
+ }>;
5479
+ };
5480
+ export type CreateAiProviderMutationVariables = Exact<{
5481
+ input: CreateAiProviderInput;
5482
+ }>;
5483
+ export type CreateAiProviderMutation = {
5484
+ createAIProvider: {
5485
+ provider?: {
5486
+ __typename: "AIProvider";
5487
+ id: string;
5488
+ alias: string;
5489
+ api: AiProviderApi;
5490
+ apiKey: string;
5491
+ url?: string | undefined | null;
5492
+ } | undefined | null;
5493
+ error?: {
5494
+ __typename: "AliasTakenUserError";
5495
+ alias: string;
5496
+ code: string;
5497
+ } | {
5498
+ __typename: "OtherUserError";
5499
+ code: string;
5500
+ } | undefined | null;
5501
+ };
5502
+ };
5503
+ export type UpdateAiProviderMutationVariables = Exact<{
5504
+ id: Scalars["ID"]["input"];
5505
+ input: UpdateAiProviderInput;
5506
+ }>;
5507
+ export type UpdateAiProviderMutation = {
5508
+ updateAIProvider: {
5509
+ provider?: {
5510
+ __typename: "AIProvider";
5511
+ id: string;
5512
+ alias: string;
5513
+ api: AiProviderApi;
5514
+ apiKey: string;
5515
+ url?: string | undefined | null;
5516
+ } | undefined | null;
5517
+ error?: {
5518
+ __typename: "AliasTakenUserError";
5519
+ alias: string;
5520
+ code: string;
5521
+ } | {
5522
+ __typename: "OtherUserError";
5523
+ code: string;
5524
+ } | {
5525
+ __typename: "UnknownIdUserError";
5526
+ id: string;
5527
+ code: string;
5528
+ } | undefined | null;
5529
+ };
5530
+ };
5531
+ export type DeleteAiProviderMutationVariables = Exact<{
5532
+ id: Scalars["ID"]["input"];
5533
+ }>;
5534
+ export type DeleteAiProviderMutation = {
5535
+ deleteAIProvider: {
5536
+ deletedId?: string | undefined | null;
5537
+ };
5538
+ };
5539
+ export type TestAiProviderMutationVariables = Exact<{
5540
+ input: TestAiProviderInput;
5541
+ }>;
5542
+ export type TestAiProviderMutation = {
5543
+ testAIProvider: {
5544
+ success?: boolean | undefined | null;
5545
+ error?: {
5546
+ code: string;
5547
+ message: string;
5548
+ reason: AiErrorReason;
5549
+ } | {
5550
+ code: string;
5551
+ } | undefined | null;
5552
+ };
5553
+ };
5554
+ export type CreatedAiProviderSubscriptionVariables = Exact<{
5555
+ [key: string]: never;
5556
+ }>;
5557
+ export type CreatedAiProviderSubscription = {
5558
+ createdAIProvider: {
5559
+ provider: {
5560
+ __typename: "AIProvider";
5561
+ id: string;
5562
+ alias: string;
5563
+ api: AiProviderApi;
5564
+ apiKey: string;
5565
+ url?: string | undefined | null;
5566
+ };
5567
+ };
5568
+ };
5569
+ export type UpdatedAiProviderSubscriptionVariables = Exact<{
5570
+ [key: string]: never;
5571
+ }>;
5572
+ export type UpdatedAiProviderSubscription = {
5573
+ updatedAIProvider: {
5574
+ provider: {
5575
+ __typename: "AIProvider";
5576
+ id: string;
5577
+ alias: string;
5578
+ api: AiProviderApi;
5579
+ apiKey: string;
5580
+ url?: string | undefined | null;
5581
+ };
5582
+ };
5583
+ };
5584
+ export type DeletedAiProviderSubscriptionVariables = Exact<{
5585
+ [key: string]: never;
5586
+ }>;
5587
+ export type DeletedAiProviderSubscription = {
5588
+ deletedAIProvider: {
5589
+ deletedProviderId: string;
5590
+ };
5591
+ };
5457
5592
  export type TrackMutationVariables = Exact<{
5458
5593
  input: TrackInput;
5459
5594
  }>;
@@ -11400,21 +11535,6 @@ export type OnUpdatedHostedFileSubscription = {
11400
11535
  };
11401
11536
  export type InstanceSettingsFullFragment = {
11402
11537
  __typename: "InstanceSettings";
11403
- aiProviders: {
11404
- anthropic?: {
11405
- apiKey: string;
11406
- } | undefined | null;
11407
- google?: {
11408
- apiKey: string;
11409
- } | undefined | null;
11410
- openai?: {
11411
- apiKey: string;
11412
- url?: string | undefined | null;
11413
- } | undefined | null;
11414
- openrouter?: {
11415
- apiKey: string;
11416
- } | undefined | null;
11417
- };
11418
11538
  onboarding: {
11419
11539
  __typename: "OnboardingState";
11420
11540
  analytic: boolean;
@@ -11426,16 +11546,6 @@ export type InstanceSettingsFullFragment = {
11426
11546
  cloud: boolean;
11427
11547
  };
11428
11548
  };
11429
- export type TestAiProviderPayloadFullFragment = {
11430
- success?: boolean | undefined | null;
11431
- error?: {
11432
- code: string;
11433
- message: string;
11434
- reason: AiErrorReason;
11435
- } | {
11436
- code: string;
11437
- } | undefined | null;
11438
- };
11439
11549
  export type SetInstanceSettingsMutationVariables = Exact<{
11440
11550
  input: SetInstanceSettingsInput;
11441
11551
  }>;
@@ -11443,21 +11553,6 @@ export type SetInstanceSettingsMutation = {
11443
11553
  setInstanceSettings: {
11444
11554
  settings: {
11445
11555
  __typename: "InstanceSettings";
11446
- aiProviders: {
11447
- anthropic?: {
11448
- apiKey: string;
11449
- } | undefined | null;
11450
- google?: {
11451
- apiKey: string;
11452
- } | undefined | null;
11453
- openai?: {
11454
- apiKey: string;
11455
- url?: string | undefined | null;
11456
- } | undefined | null;
11457
- openrouter?: {
11458
- apiKey: string;
11459
- } | undefined | null;
11460
- };
11461
11556
  onboarding: {
11462
11557
  __typename: "OnboardingState";
11463
11558
  analytic: boolean;
@@ -11471,42 +11566,12 @@ export type SetInstanceSettingsMutation = {
11471
11566
  };
11472
11567
  };
11473
11568
  };
11474
- export type TestAiProviderMutationVariables = Exact<{
11475
- input: TestAiProviderInput;
11476
- }>;
11477
- export type TestAiProviderMutation = {
11478
- testAiProvider: {
11479
- success?: boolean | undefined | null;
11480
- error?: {
11481
- code: string;
11482
- message: string;
11483
- reason: AiErrorReason;
11484
- } | {
11485
- code: string;
11486
- } | undefined | null;
11487
- };
11488
- };
11489
11569
  export type InstanceSettingsQueryVariables = Exact<{
11490
11570
  [key: string]: never;
11491
11571
  }>;
11492
11572
  export type InstanceSettingsQuery = {
11493
11573
  instanceSettings: {
11494
11574
  __typename: "InstanceSettings";
11495
- aiProviders: {
11496
- anthropic?: {
11497
- apiKey: string;
11498
- } | undefined | null;
11499
- google?: {
11500
- apiKey: string;
11501
- } | undefined | null;
11502
- openai?: {
11503
- apiKey: string;
11504
- url?: string | undefined | null;
11505
- } | undefined | null;
11506
- openrouter?: {
11507
- apiKey: string;
11508
- } | undefined | null;
11509
- };
11510
11575
  onboarding: {
11511
11576
  __typename: "OnboardingState";
11512
11577
  analytic: boolean;
@@ -11526,21 +11591,6 @@ export type UpdatedInstanceSettingsSubscription = {
11526
11591
  updatedInstanceSettings: {
11527
11592
  settings: {
11528
11593
  __typename: "InstanceSettings";
11529
- aiProviders: {
11530
- anthropic?: {
11531
- apiKey: string;
11532
- } | undefined | null;
11533
- google?: {
11534
- apiKey: string;
11535
- } | undefined | null;
11536
- openai?: {
11537
- apiKey: string;
11538
- url?: string | undefined | null;
11539
- } | undefined | null;
11540
- openrouter?: {
11541
- apiKey: string;
11542
- } | undefined | null;
11543
- };
11544
11594
  onboarding: {
11545
11595
  __typename: "OnboardingState";
11546
11596
  analytic: boolean;
@@ -123501,6 +123551,8 @@ export type TestWorkflowPassiveMutation = {
123501
123551
  } | undefined | null;
123502
123552
  };
123503
123553
  };
123554
+ export declare const AiProviderFullFragmentDoc = "\n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n api\n apiKey\n url\n}\n ";
123555
+ export declare const TestAiProviderPayloadFullFragmentDoc = "\n fragment testAIProviderPayloadFull on TestAIProviderPayload {\n error {\n ... on AIUserError {\n code\n message\n reason\n }\n ... on OtherUserError {\n code\n }\n }\n success\n}\n ";
123504
123556
  export declare const AssistantModelFullFragmentDoc = "\n fragment assistantModelFull on AssistantModel {\n __typename\n id\n name\n tokenCredit\n}\n ";
123505
123557
  export declare const AssistantSessionMetaFragmentDoc = "\n fragment assistantSessionMeta on AssistantSession {\n __typename\n id\n modelId\n name\n updatedAt\n createdAt\n}\n ";
123506
123558
  export declare const AssistantMessageFullFragmentDoc = "\n fragment assistantMessageFull on AssistantMessage {\n __typename\n id\n content\n role\n session {\n id\n }\n}\n ";
@@ -123609,8 +123661,7 @@ export declare const InterceptEntryFullFragmentDoc = "\n fragment interceptEn
123609
123661
  export declare const InterceptEntryEdgeMetaFragmentDoc = "\n fragment interceptEntryEdgeMeta on InterceptEntryEdge {\n __typename\n cursor\n node {\n ...interceptEntryMeta\n }\n}\n ";
123610
123662
  export declare const DeleteInterceptEntriesTaskFullFragmentDoc = "\n fragment deleteInterceptEntriesTaskFull on DeleteInterceptEntriesTask {\n __typename\n id\n deletedEntryIds\n}\n ";
123611
123663
  export declare const HostedFileFullFragmentDoc = "\n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n status\n updatedAt\n createdAt\n}\n ";
123612
- export declare const InstanceSettingsFullFragmentDoc = "\n fragment instanceSettingsFull on InstanceSettings {\n __typename\n aiProviders {\n anthropic {\n apiKey\n }\n google {\n apiKey\n }\n openai {\n apiKey\n url\n }\n openrouter {\n apiKey\n }\n }\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
123613
- export declare const TestAiProviderPayloadFullFragmentDoc = "\n fragment testAiProviderPayloadFull on TestAIProviderPayload {\n error {\n ... on AIUserError {\n code\n message\n reason\n }\n ... on OtherUserError {\n code\n }\n }\n success\n}\n ";
123664
+ export declare const InstanceSettingsFullFragmentDoc = "\n fragment instanceSettingsFull on InstanceSettings {\n __typename\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
123614
123665
  export declare const InterceptRequestMessageFullFragmentDoc = "\n fragment interceptRequestMessageFull on InterceptRequestMessage {\n __typename\n id\n request {\n ...requestFull\n }\n}\n ";
123615
123666
  export declare const InterceptRequestMessageMetaFragmentDoc = "\n fragment interceptRequestMessageMeta on InterceptRequestMessage {\n __typename\n id\n request {\n ...requestMeta\n }\n}\n ";
123616
123667
  export declare const InterceptResponseMessageMetaFragmentDoc = "\n fragment interceptResponseMessageMeta on InterceptResponseMessage {\n __typename\n id\n response {\n ...responseMeta\n }\n request {\n ...requestMeta\n }\n}\n ";
@@ -123728,6 +123779,14 @@ export declare const WorkflowFullFragmentDoc = "\n fragment workflowFull on W
123728
123779
  export declare const WorkflowEdgeFullFragmentDoc = "\n fragment workflowEdgeFull on WorkflowEdge {\n cursor\n node {\n ...workflowFull\n }\n}\n ";
123729
123780
  export declare const WorkflowNodeDefinitionFullFragmentDoc = "\n fragment workflowNodeDefinitionFull on WorkflowNodeDefinition {\n __typename\n raw\n}\n ";
123730
123781
  export declare const WorkflowTaskMetaFragmentDoc = "\n fragment workflowTaskMeta on WorkflowTask {\n ...taskMeta\n workflow {\n ...workflowMeta\n }\n}\n ";
123782
+ export declare const AiProvidersDocument = "\n query aiProviders {\n aiProviders {\n ...aiProviderFull\n }\n}\n \n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n api\n apiKey\n url\n}\n ";
123783
+ export declare const CreateAiProviderDocument = "\n mutation createAIProvider($input: CreateAIProviderInput!) {\n createAIProvider(input: $input) {\n provider {\n ...aiProviderFull\n }\n error {\n ... on AliasTakenUserError {\n ...aliasTakenUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n api\n apiKey\n url\n}\n \n\n fragment aliasTakenUserErrorFull on AliasTakenUserError {\n ...userErrorFull\n alias\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
123784
+ export declare const UpdateAiProviderDocument = "\n mutation updateAIProvider($id: ID!, $input: UpdateAIProviderInput!) {\n updateAIProvider(id: $id, input: $input) {\n provider {\n ...aiProviderFull\n }\n error {\n ... on AliasTakenUserError {\n ...aliasTakenUserErrorFull\n }\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n api\n apiKey\n url\n}\n \n\n fragment aliasTakenUserErrorFull on AliasTakenUserError {\n ...userErrorFull\n alias\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment unknownIdUserErrorFull on UnknownIdUserError {\n ...userErrorFull\n id\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
123785
+ export declare const DeleteAiProviderDocument = "\n mutation deleteAIProvider($id: ID!) {\n deleteAIProvider(id: $id) {\n deletedId\n }\n}\n ";
123786
+ export declare const TestAiProviderDocument = "\n mutation testAIProvider($input: TestAIProviderInput!) {\n testAIProvider(input: $input) {\n ...testAIProviderPayloadFull\n }\n}\n \n fragment testAIProviderPayloadFull on TestAIProviderPayload {\n error {\n ... on AIUserError {\n code\n message\n reason\n }\n ... on OtherUserError {\n code\n }\n }\n success\n}\n ";
123787
+ export declare const CreatedAiProviderDocument = "\n subscription createdAIProvider {\n createdAIProvider {\n provider {\n ...aiProviderFull\n }\n }\n}\n \n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n api\n apiKey\n url\n}\n ";
123788
+ export declare const UpdatedAiProviderDocument = "\n subscription updatedAIProvider {\n updatedAIProvider {\n provider {\n ...aiProviderFull\n }\n }\n}\n \n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n api\n apiKey\n url\n}\n ";
123789
+ export declare const DeletedAiProviderDocument = "\n subscription deletedAIProvider {\n deletedAIProvider {\n deletedProviderId\n }\n}\n ";
123731
123790
  export declare const TrackDocument = "\n mutation track($input: TrackInput!) {\n track(input: $input) {\n success\n }\n}\n ";
123732
123791
  export declare const AssistantSessionsDocument = "\n query assistantSessions {\n assistantSessions {\n ...assistantSessionMeta\n }\n}\n \n fragment assistantSessionMeta on AssistantSession {\n __typename\n id\n modelId\n name\n updatedAt\n createdAt\n}\n ";
123733
123792
  export declare const AssistantSessionDocument = "\n query assistantSession($id: ID!) {\n assistantSession(id: $id) {\n ...assistantSessionFull\n }\n}\n \n fragment assistantSessionFull on AssistantSession {\n ...assistantSessionMeta\n messages {\n ...assistantMessageFull\n }\n}\n \n\n fragment assistantSessionMeta on AssistantSession {\n __typename\n id\n modelId\n name\n updatedAt\n createdAt\n}\n \n\n fragment assistantMessageFull on AssistantMessage {\n __typename\n id\n content\n role\n session {\n id\n }\n}\n ";
@@ -123878,10 +123937,9 @@ export declare const HostedFilesDocument = "\n query hostedFiles {\n hostedF
123878
123937
  export declare const OnUploadedHostedFileDocument = "\n subscription onUploadedHostedFile {\n uploadedHostedFile {\n hostedFile {\n ...hostedFileFull\n }\n }\n}\n \n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n status\n updatedAt\n createdAt\n}\n ";
123879
123938
  export declare const OnDeletedHostedFileDocument = "\n subscription onDeletedHostedFile {\n deletedHostedFile {\n deletedHostedFileId\n }\n}\n ";
123880
123939
  export declare const OnUpdatedHostedFileDocument = "\n subscription onUpdatedHostedFile {\n updatedHostedFile {\n hostedFile {\n ...hostedFileFull\n }\n }\n}\n \n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n status\n updatedAt\n createdAt\n}\n ";
123881
- export declare const SetInstanceSettingsDocument = "\n mutation setInstanceSettings($input: SetInstanceSettingsInput!) {\n setInstanceSettings(input: $input) {\n settings {\n ...instanceSettingsFull\n }\n }\n}\n \n fragment instanceSettingsFull on InstanceSettings {\n __typename\n aiProviders {\n anthropic {\n apiKey\n }\n google {\n apiKey\n }\n openai {\n apiKey\n url\n }\n openrouter {\n apiKey\n }\n }\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
123882
- export declare const TestAiProviderDocument = "\n mutation testAiProvider($input: TestAIProviderInput!) {\n testAiProvider(input: $input) {\n ...testAiProviderPayloadFull\n }\n}\n \n fragment testAiProviderPayloadFull on TestAIProviderPayload {\n error {\n ... on AIUserError {\n code\n message\n reason\n }\n ... on OtherUserError {\n code\n }\n }\n success\n}\n ";
123883
- export declare const InstanceSettingsDocument = "\n query instanceSettings {\n instanceSettings {\n ...instanceSettingsFull\n }\n}\n \n fragment instanceSettingsFull on InstanceSettings {\n __typename\n aiProviders {\n anthropic {\n apiKey\n }\n google {\n apiKey\n }\n openai {\n apiKey\n url\n }\n openrouter {\n apiKey\n }\n }\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
123884
- export declare const UpdatedInstanceSettingsDocument = "\n subscription updatedInstanceSettings {\n updatedInstanceSettings {\n settings {\n ...instanceSettingsFull\n }\n }\n}\n \n fragment instanceSettingsFull on InstanceSettings {\n __typename\n aiProviders {\n anthropic {\n apiKey\n }\n google {\n apiKey\n }\n openai {\n apiKey\n url\n }\n openrouter {\n apiKey\n }\n }\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
123940
+ export declare const SetInstanceSettingsDocument = "\n mutation setInstanceSettings($input: SetInstanceSettingsInput!) {\n setInstanceSettings(input: $input) {\n settings {\n ...instanceSettingsFull\n }\n }\n}\n \n fragment instanceSettingsFull on InstanceSettings {\n __typename\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
123941
+ export declare const InstanceSettingsDocument = "\n query instanceSettings {\n instanceSettings {\n ...instanceSettingsFull\n }\n}\n \n fragment instanceSettingsFull on InstanceSettings {\n __typename\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
123942
+ export declare const UpdatedInstanceSettingsDocument = "\n subscription updatedInstanceSettings {\n updatedInstanceSettings {\n settings {\n ...instanceSettingsFull\n }\n }\n}\n \n fragment instanceSettingsFull on InstanceSettings {\n __typename\n onboarding {\n __typename\n analytic\n }\n analytic {\n __typename\n enabled\n local\n cloud\n }\n}\n ";
123885
123943
  export declare const ForwardInterceptMessageDocument = "\n mutation forwardInterceptMessage($id: ID!, $input: ForwardInterceptMessageInput) {\n forwardInterceptMessage(id: $id, input: $input) {\n forwardedId\n }\n}\n ";
123886
123944
  export declare const DropInterceptMesageDocument = "\n mutation dropInterceptMesage($id: ID!) {\n dropInterceptMessage(id: $id) {\n droppedId\n }\n}\n ";
123887
123945
  export declare const SetInterceptOptionsDocument = "\n mutation setInterceptOptions($input: InterceptOptionsInput!) {\n setInterceptOptions(input: $input) {\n options {\n ...interceptOptionsMeta\n }\n }\n}\n \n fragment interceptOptionsMeta on InterceptOptions {\n request {\n ...interceptRequestOptionsMeta\n }\n response {\n ...interceptResponseOptionsMeta\n }\n streamWs {\n ...interceptStreamWsOptionsMeta\n }\n scope {\n ...interceptScopeOptionsMeta\n }\n}\n \n\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n filter {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n \n\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n filter {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment interceptStreamWsOptionsMeta on InterceptStreamWsOptions {\n enabled\n}\n \n\n fragment interceptScopeOptionsMeta on InterceptScopeOptions {\n scopeId\n}\n ";
@@ -124079,6 +124137,14 @@ export declare const TestWorkflowActiveDocument = "\n mutation testWorkflowAc
124079
124137
  export declare const TestWorkflowPassiveDocument = "\n mutation testWorkflowPassive($input: TestWorkflowPassiveInput!) {\n testWorkflowPassive(input: $input) {\n error {\n ... on WorkflowUserError {\n ...workflowUserErrorFull\n }\n ... on PermissionDeniedUserError {\n ...permissionDeniedUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n runState\n }\n}\n \n fragment workflowUserErrorFull on WorkflowUserError {\n ...userErrorFull\n node\n message\n reason\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment permissionDeniedUserErrorFull on PermissionDeniedUserError {\n ...userErrorFull\n permissionDeniedReason: reason\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
124080
124138
  export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterable<R>;
124081
124139
  export declare function getSdk<C>(requester: Requester<C>): {
124140
+ aiProviders(variables?: AiProvidersQueryVariables, options?: C): Promise<AiProvidersQuery>;
124141
+ createAIProvider(variables: CreateAiProviderMutationVariables, options?: C): Promise<CreateAiProviderMutation>;
124142
+ updateAIProvider(variables: UpdateAiProviderMutationVariables, options?: C): Promise<UpdateAiProviderMutation>;
124143
+ deleteAIProvider(variables: DeleteAiProviderMutationVariables, options?: C): Promise<DeleteAiProviderMutation>;
124144
+ testAIProvider(variables: TestAiProviderMutationVariables, options?: C): Promise<TestAiProviderMutation>;
124145
+ createdAIProvider(variables?: CreatedAiProviderSubscriptionVariables, options?: C): AsyncIterable<CreatedAiProviderSubscription>;
124146
+ updatedAIProvider(variables?: UpdatedAiProviderSubscriptionVariables, options?: C): AsyncIterable<UpdatedAiProviderSubscription>;
124147
+ deletedAIProvider(variables?: DeletedAiProviderSubscriptionVariables, options?: C): AsyncIterable<DeletedAiProviderSubscription>;
124082
124148
  track(variables: TrackMutationVariables, options?: C): Promise<TrackMutation>;
124083
124149
  assistantSessions(variables?: AssistantSessionsQueryVariables, options?: C): Promise<AssistantSessionsQuery>;
124084
124150
  assistantSession(variables: AssistantSessionQueryVariables, options?: C): Promise<AssistantSessionQuery>;
@@ -124230,7 +124296,6 @@ export declare function getSdk<C>(requester: Requester<C>): {
124230
124296
  onDeletedHostedFile(variables?: OnDeletedHostedFileSubscriptionVariables, options?: C): AsyncIterable<OnDeletedHostedFileSubscription>;
124231
124297
  onUpdatedHostedFile(variables?: OnUpdatedHostedFileSubscriptionVariables, options?: C): AsyncIterable<OnUpdatedHostedFileSubscription>;
124232
124298
  setInstanceSettings(variables: SetInstanceSettingsMutationVariables, options?: C): Promise<SetInstanceSettingsMutation>;
124233
- testAiProvider(variables: TestAiProviderMutationVariables, options?: C): Promise<TestAiProviderMutation>;
124234
124299
  instanceSettings(variables?: InstanceSettingsQueryVariables, options?: C): Promise<InstanceSettingsQuery>;
124235
124300
  updatedInstanceSettings(variables?: UpdatedInstanceSettingsSubscriptionVariables, options?: C): AsyncIterable<UpdatedInstanceSettingsSubscription>;
124236
124301
  forwardInterceptMessage(variables: ForwardInterceptMessageMutationVariables, options?: C): Promise<ForwardInterceptMessageMutation>;
@@ -25,7 +25,7 @@ export { SettingsSlot, type SettingsSlotContent, type SettingsPluginSlotContent,
25
25
  export type { EnvironmentVariable } from "./types/environment";
26
26
  export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkflowCallback, OnDeletedWorkflowCallback, } from "./types/workflows";
27
27
  export type { ListenerHandle, AddIndicatorOptions, Indicator, ComponentProps, ComponentPropsWithSdk, } from "./types/utils";
28
- export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderId, AIUpstreamProviderStatus, } from "./types/ai";
28
+ export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderApi, AIUpstreamProviderId, } from "./types/ai";
29
29
  export type { SelectedProjectChangeEvent } from "./types/projects";
30
30
  export type { CommandPaletteViewProps, CommandPaletteViewPropsInternal, } from "./types/commandPalette";
31
31
  export type { CommandPaletteView } from "./sdks/commandPalette";
@@ -10,8 +10,8 @@ export type AiSDK = {
10
10
  */
11
11
  createProvider: () => AIProvider;
12
12
  /**
13
- * Gets the list of upstream AI providers with their configuration status.
14
- * @returns An array of AI upstream providers with their configuration status.
13
+ * Gets the list of configured upstream AI providers.
14
+ * @returns An array of configured AI upstream providers.
15
15
  */
16
16
  getUpstreamProviders: () => AIUpstreamProvider[];
17
17
  };
@@ -26,19 +26,18 @@ export type AIProvider = ProviderV3 & ((modelId: string, settings?: AILanguageMo
26
26
  * AI upstream provider ID.
27
27
  * @category AI
28
28
  */
29
- export type AIUpstreamProviderId = "anthropic" | "google" | "openai" | "openrouter";
29
+ export type AIUpstreamProviderId = string;
30
+ /**
31
+ * The response API a provider speaks.
32
+ * @category AI
33
+ */
34
+ export type AIUpstreamProviderApi = "ANTHROPIC" | "GEMINI" | "OPENAI_COMPLETION" | "OPENAI_RESPONSE" | "OPENROUTER";
30
35
  /**
31
36
  * AI upstream provider information.
37
+ * Only configured providers are returned.
32
38
  * @category AI
33
39
  */
34
40
  export type AIUpstreamProvider = {
35
41
  id: AIUpstreamProviderId;
36
- status: AIUpstreamProviderStatus;
42
+ api: AIUpstreamProviderApi;
37
43
  };
38
- /**
39
- * AI upstream provider status.
40
- * Ready: The upstream provider is ready to use.
41
- * Missing: The upstream provider is not configured.
42
- * @category AI
43
- */
44
- export type AIUpstreamProviderStatus = "Ready" | "Missing";