@caido/sdk-frontend 0.58.3-beta.2 → 0.58.3-beta.4

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.58.3-beta.2",
3
+ "version": "0.58.3-beta.4",
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/",
@@ -138,8 +138,10 @@ export type AiProvider = {
138
138
  alias: Scalars["Alias"]["output"];
139
139
  api: AiProviderApi;
140
140
  apiKey: Scalars["Sensitive"]["output"];
141
+ authenticationStatus: AiProviderAuthenticationStatus;
141
142
  createdAt: Scalars["DateTime"]["output"];
142
143
  id: Scalars["ID"]["output"];
144
+ kind: AiProviderKind;
143
145
  updatedAt: Scalars["DateTime"]["output"];
144
146
  url?: Maybe<Scalars["Url"]["output"]>;
145
147
  };
@@ -151,6 +153,51 @@ export declare const AiProviderApi: {
151
153
  readonly Openrouter: "OPENROUTER";
152
154
  };
153
155
  export type AiProviderApi = (typeof AiProviderApi)[keyof typeof AiProviderApi];
156
+ export declare const AiProviderAuthenticationStatus: {
157
+ readonly Invalid: "INVALID";
158
+ readonly Unverified: "UNVERIFIED";
159
+ readonly Valid: "VALID";
160
+ };
161
+ export type AiProviderAuthenticationStatus = (typeof AiProviderAuthenticationStatus)[keyof typeof AiProviderAuthenticationStatus];
162
+ export type AiProviderConfigurationInput = {
163
+ anthropic: AnthropicProviderConfigurationInput;
164
+ custom?: never;
165
+ gemini?: never;
166
+ openAI?: never;
167
+ openRouter?: never;
168
+ } | {
169
+ anthropic?: never;
170
+ custom: CustomAiProviderConfigurationInput;
171
+ gemini?: never;
172
+ openAI?: never;
173
+ openRouter?: never;
174
+ } | {
175
+ anthropic?: never;
176
+ custom?: never;
177
+ gemini: GeminiProviderConfigurationInput;
178
+ openAI?: never;
179
+ openRouter?: never;
180
+ } | {
181
+ anthropic?: never;
182
+ custom?: never;
183
+ gemini?: never;
184
+ openAI: OpenAiProviderConfigurationInput;
185
+ openRouter?: never;
186
+ } | {
187
+ anthropic?: never;
188
+ custom?: never;
189
+ gemini?: never;
190
+ openAI?: never;
191
+ openRouter: OpenRouterProviderConfigurationInput;
192
+ };
193
+ export declare const AiProviderKind: {
194
+ readonly Anthropic: "ANTHROPIC";
195
+ readonly Custom: "CUSTOM";
196
+ readonly Gemini: "GEMINI";
197
+ readonly Openai: "OPENAI";
198
+ readonly Openrouter: "OPENROUTER";
199
+ };
200
+ export type AiProviderKind = (typeof AiProviderKind)[keyof typeof AiProviderKind];
154
201
  export type AiUserError = UserError & {
155
202
  code: Scalars["String"]["output"];
156
203
  message: Scalars["String"]["output"];
@@ -171,6 +218,9 @@ export type AnalyticStatus = {
171
218
  enabled: Scalars["Boolean"]["output"];
172
219
  local: Scalars["Boolean"]["output"];
173
220
  };
221
+ export type AnthropicProviderConfigurationInput = {
222
+ url?: InputMaybe<Scalars["Url"]["input"]>;
223
+ };
174
224
  export declare const AssistantErrorReason: {
175
225
  readonly ContextExceeded: "CONTEXT_EXCEEDED";
176
226
  readonly InvalidModel: "INVALID_MODEL";
@@ -743,12 +793,11 @@ export type Count = {
743
793
  snapshot: Scalars["Snapshot"]["output"];
744
794
  value: Scalars["Int"]["output"];
745
795
  };
746
- export type CreateAiProviderError = AliasTakenUserError | OtherUserError;
796
+ export type CreateAiProviderError = AiUserError | AliasTakenUserError | OtherUserError;
747
797
  export type CreateAiProviderInput = {
748
798
  alias: Scalars["Alias"]["input"];
749
- api: AiProviderApi;
750
799
  apiKey: Scalars["Sensitive"]["input"];
751
- url?: InputMaybe<Scalars["Url"]["input"]>;
800
+ configuration: AiProviderConfigurationInput;
752
801
  };
753
802
  export type CreateAiProviderPayload = {
754
803
  error?: Maybe<CreateAiProviderError>;
@@ -1109,6 +1158,18 @@ export type CurrentProject = {
1109
1158
  /** Defines if the selected project is read-only */
1110
1159
  readOnly: Scalars["Boolean"]["output"];
1111
1160
  };
1161
+ export declare const CustomAiProviderApi: {
1162
+ readonly Anthropic: "ANTHROPIC";
1163
+ readonly Gemini: "GEMINI";
1164
+ readonly OpenaiCompletion: "OPENAI_COMPLETION";
1165
+ readonly OpenaiResponse: "OPENAI_RESPONSE";
1166
+ readonly Openrouter: "OPENROUTER";
1167
+ };
1168
+ export type CustomAiProviderApi = (typeof CustomAiProviderApi)[keyof typeof CustomAiProviderApi];
1169
+ export type CustomAiProviderConfigurationInput = {
1170
+ api: CustomAiProviderApi;
1171
+ url: Scalars["Url"]["input"];
1172
+ };
1112
1173
  export type DnsIpResolver = {
1113
1174
  ip: Scalars["String"]["output"];
1114
1175
  };
@@ -1639,6 +1700,9 @@ export type ForwardInterceptResponseMessageInput = {
1639
1700
  export type ForwardInterceptStreamWsMessageInput = {
1640
1701
  updateRaw: Scalars["Blob"]["input"];
1641
1702
  };
1703
+ export type GeminiProviderConfigurationInput = {
1704
+ url?: InputMaybe<Scalars["Url"]["input"]>;
1705
+ };
1642
1706
  export type GlobalConfig = {
1643
1707
  address: Scalars["String"]["output"];
1644
1708
  project: GlobalConfigProject;
@@ -2645,6 +2709,18 @@ export type NewerVersionUserError = UserError & {
2645
2709
  export type OnboardingState = {
2646
2710
  analytic: Scalars["Boolean"]["output"];
2647
2711
  };
2712
+ export declare const OpenAiProviderApi: {
2713
+ readonly Completion: "COMPLETION";
2714
+ readonly Response: "RESPONSE";
2715
+ };
2716
+ export type OpenAiProviderApi = (typeof OpenAiProviderApi)[keyof typeof OpenAiProviderApi];
2717
+ export type OpenAiProviderConfigurationInput = {
2718
+ api: OpenAiProviderApi;
2719
+ url?: InputMaybe<Scalars["Url"]["input"]>;
2720
+ };
2721
+ export type OpenRouterProviderConfigurationInput = {
2722
+ url?: InputMaybe<Scalars["Url"]["input"]>;
2723
+ };
2648
2724
  export declare const Ordering: {
2649
2725
  readonly Asc: "ASC";
2650
2726
  readonly Desc: "DESC";
@@ -4224,6 +4300,7 @@ export type SubscriptionRoot = {
4224
4300
  startedRestoreBackupTask: StartedRestoreBackupTaskPayload;
4225
4301
  startedTask: StartedTaskPayload;
4226
4302
  updatedAIProvider: UpdatedAiProviderPayload;
4303
+ updatedAIProviderAuthenticationStatus: UpdatedAiProviderAuthenticationStatusPayload;
4227
4304
  updatedAssistantMessageTask: UpdatedAssistantMessageTaskPayload;
4228
4305
  updatedAssistantSession: UpdatedAssistantSessionPayload;
4229
4306
  updatedAutomateEntry: UpdatedAutomateEntryPayload;
@@ -4949,9 +5026,8 @@ export declare const TaskStatus: {
4949
5026
  export type TaskStatus = (typeof TaskStatus)[keyof typeof TaskStatus];
4950
5027
  export type TestAiProviderError = AiUserError | OtherUserError;
4951
5028
  export type TestAiProviderInput = {
4952
- api: AiProviderApi;
4953
5029
  apiKey: Scalars["Sensitive"]["input"];
4954
- url?: InputMaybe<Scalars["Url"]["input"]>;
5030
+ configuration: AiProviderConfigurationInput;
4955
5031
  };
4956
5032
  export type TestAiProviderPayload = {
4957
5033
  error?: Maybe<TestAiProviderError>;
@@ -5070,12 +5146,11 @@ export type UnknownIdUserError = UserError & {
5070
5146
  export type UnsupportedPlatformUserError = UserError & {
5071
5147
  code: Scalars["String"]["output"];
5072
5148
  };
5073
- export type UpdateAiProviderError = AliasTakenUserError | OtherUserError | UnknownIdUserError;
5149
+ export type UpdateAiProviderError = AiUserError | AliasTakenUserError | OtherUserError | UnknownIdUserError;
5074
5150
  export type UpdateAiProviderInput = {
5075
5151
  alias: Scalars["Alias"]["input"];
5076
- api: AiProviderApi;
5077
5152
  apiKey: Scalars["Sensitive"]["input"];
5078
- url?: InputMaybe<Scalars["Url"]["input"]>;
5153
+ configuration: AiProviderConfigurationInput;
5079
5154
  };
5080
5155
  export type UpdateAiProviderPayload = {
5081
5156
  error?: Maybe<UpdateAiProviderError>;
@@ -5261,6 +5336,10 @@ export type UpdateWorkflowPayload = {
5261
5336
  error?: Maybe<UpdateWorkflowError>;
5262
5337
  workflow?: Maybe<Workflow>;
5263
5338
  };
5339
+ export type UpdatedAiProviderAuthenticationStatusPayload = {
5340
+ providerId: Scalars["ID"]["output"];
5341
+ status: AiProviderAuthenticationStatus;
5342
+ };
5264
5343
  export type UpdatedAiProviderPayload = {
5265
5344
  provider: AiProvider;
5266
5345
  };
@@ -5581,7 +5660,9 @@ export type AiProviderFullFragment = {
5581
5660
  __typename: "AIProvider";
5582
5661
  id: string;
5583
5662
  alias: string;
5663
+ kind: AiProviderKind;
5584
5664
  api: AiProviderApi;
5665
+ authenticationStatus: AiProviderAuthenticationStatus;
5585
5666
  apiKey: string;
5586
5667
  url?: string | undefined | null;
5587
5668
  };
@@ -5605,7 +5686,9 @@ export type AiProvidersQuery = {
5605
5686
  __typename: "AIProvider";
5606
5687
  id: string;
5607
5688
  alias: string;
5689
+ kind: AiProviderKind;
5608
5690
  api: AiProviderApi;
5691
+ authenticationStatus: AiProviderAuthenticationStatus;
5609
5692
  apiKey: string;
5610
5693
  url?: string | undefined | null;
5611
5694
  }>;
@@ -5619,11 +5702,18 @@ export type CreateAiProviderMutation = {
5619
5702
  __typename: "AIProvider";
5620
5703
  id: string;
5621
5704
  alias: string;
5705
+ kind: AiProviderKind;
5622
5706
  api: AiProviderApi;
5707
+ authenticationStatus: AiProviderAuthenticationStatus;
5623
5708
  apiKey: string;
5624
5709
  url?: string | undefined | null;
5625
5710
  } | undefined | null;
5626
5711
  error?: {
5712
+ __typename: "AIUserError";
5713
+ message: string;
5714
+ reason: AiErrorReason;
5715
+ code: string;
5716
+ } | {
5627
5717
  __typename: "AliasTakenUserError";
5628
5718
  alias: string;
5629
5719
  code: string;
@@ -5643,11 +5733,18 @@ export type UpdateAiProviderMutation = {
5643
5733
  __typename: "AIProvider";
5644
5734
  id: string;
5645
5735
  alias: string;
5736
+ kind: AiProviderKind;
5646
5737
  api: AiProviderApi;
5738
+ authenticationStatus: AiProviderAuthenticationStatus;
5647
5739
  apiKey: string;
5648
5740
  url?: string | undefined | null;
5649
5741
  } | undefined | null;
5650
5742
  error?: {
5743
+ __typename: "AIUserError";
5744
+ message: string;
5745
+ reason: AiErrorReason;
5746
+ code: string;
5747
+ } | {
5651
5748
  __typename: "AliasTakenUserError";
5652
5749
  alias: string;
5653
5750
  code: string;
@@ -5695,7 +5792,9 @@ export type CreatedAiProviderSubscription = {
5695
5792
  __typename: "AIProvider";
5696
5793
  id: string;
5697
5794
  alias: string;
5795
+ kind: AiProviderKind;
5698
5796
  api: AiProviderApi;
5797
+ authenticationStatus: AiProviderAuthenticationStatus;
5699
5798
  apiKey: string;
5700
5799
  url?: string | undefined | null;
5701
5800
  };
@@ -5710,12 +5809,23 @@ export type UpdatedAiProviderSubscription = {
5710
5809
  __typename: "AIProvider";
5711
5810
  id: string;
5712
5811
  alias: string;
5812
+ kind: AiProviderKind;
5713
5813
  api: AiProviderApi;
5814
+ authenticationStatus: AiProviderAuthenticationStatus;
5714
5815
  apiKey: string;
5715
5816
  url?: string | undefined | null;
5716
5817
  };
5717
5818
  };
5718
5819
  };
5820
+ export type UpdatedAiProviderAuthenticationStatusSubscriptionVariables = Exact<{
5821
+ [key: string]: never;
5822
+ }>;
5823
+ export type UpdatedAiProviderAuthenticationStatusSubscription = {
5824
+ updatedAIProviderAuthenticationStatus: {
5825
+ providerId: string;
5826
+ status: AiProviderAuthenticationStatus;
5827
+ };
5828
+ };
5719
5829
  export type DeletedAiProviderSubscriptionVariables = Exact<{
5720
5830
  [key: string]: never;
5721
5831
  }>;
@@ -125244,7 +125354,7 @@ export type TestWorkflowPassiveMutation = {
125244
125354
  } | undefined | null;
125245
125355
  };
125246
125356
  };
125247
- export declare const AiProviderFullFragmentDoc = "\n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n api\n apiKey\n url\n}\n ";
125357
+ export declare const AiProviderFullFragmentDoc = "\n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n kind\n api\n authenticationStatus\n apiKey\n url\n}\n ";
125248
125358
  export declare const UserErrorFullFragmentDoc = "\n fragment userErrorFull on UserError {\n __typename\n code\n}\n ";
125249
125359
  export declare const AiUserErrorFullFragmentDoc = "\n fragment aiUserErrorFull on AIUserError {\n ...userErrorFull\n message\n reason\n}\n ";
125250
125360
  export declare const OtherUserErrorFullFragmentDoc = "\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
@@ -125474,13 +125584,14 @@ export declare const WorkflowFullFragmentDoc = "\n fragment workflowFull on W
125474
125584
  export declare const WorkflowEdgeFullFragmentDoc = "\n fragment workflowEdgeFull on WorkflowEdge {\n cursor\n node {\n ...workflowFull\n }\n}\n ";
125475
125585
  export declare const WorkflowNodeDefinitionFullFragmentDoc = "\n fragment workflowNodeDefinitionFull on WorkflowNodeDefinition {\n __typename\n raw\n}\n ";
125476
125586
  export declare const WorkflowTaskMetaFragmentDoc = "\n fragment workflowTaskMeta on WorkflowTask {\n ...taskMeta\n workflow {\n ...workflowMeta\n }\n}\n ";
125477
- 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 ";
125478
- 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 ";
125479
- 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 ";
125587
+ 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 kind\n api\n authenticationStatus\n apiKey\n url\n}\n ";
125588
+ 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 AIUserError {\n ...aiUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n kind\n api\n authenticationStatus\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 aiUserErrorFull on AIUserError {\n ...userErrorFull\n message\n reason\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
125589
+ 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 AIUserError {\n ...aiUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment aiProviderFull on AIProvider {\n __typename\n id\n alias\n kind\n api\n authenticationStatus\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 aiUserErrorFull on AIUserError {\n ...userErrorFull\n message\n reason\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
125480
125590
  export declare const DeleteAiProviderDocument = "\n mutation deleteAIProvider($id: ID!) {\n deleteAIProvider(id: $id) {\n deletedId\n }\n}\n ";
125481
125591
  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 ...aiUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n success\n}\n \n\n fragment aiUserErrorFull on AIUserError {\n ...userErrorFull\n message\n reason\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
125482
- 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 ";
125483
- 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 ";
125592
+ 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 kind\n api\n authenticationStatus\n apiKey\n url\n}\n ";
125593
+ 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 kind\n api\n authenticationStatus\n apiKey\n url\n}\n ";
125594
+ export declare const UpdatedAiProviderAuthenticationStatusDocument = "\n subscription updatedAIProviderAuthenticationStatus {\n updatedAIProviderAuthenticationStatus {\n providerId\n status\n }\n}\n ";
125484
125595
  export declare const DeletedAiProviderDocument = "\n subscription deletedAIProvider {\n deletedAIProvider {\n deletedProviderId\n }\n}\n ";
125485
125596
  export declare const TrackDocument = "\n mutation track($input: TrackInput!) {\n track(input: $input) {\n success\n }\n}\n ";
125486
125597
  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 ";
@@ -125846,6 +125957,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
125846
125957
  testAIProvider(variables: TestAiProviderMutationVariables, options?: C): Promise<TestAiProviderMutation>;
125847
125958
  createdAIProvider(variables?: CreatedAiProviderSubscriptionVariables, options?: C): AsyncIterable<CreatedAiProviderSubscription>;
125848
125959
  updatedAIProvider(variables?: UpdatedAiProviderSubscriptionVariables, options?: C): AsyncIterable<UpdatedAiProviderSubscription>;
125960
+ updatedAIProviderAuthenticationStatus(variables?: UpdatedAiProviderAuthenticationStatusSubscriptionVariables, options?: C): AsyncIterable<UpdatedAiProviderAuthenticationStatusSubscription>;
125849
125961
  deletedAIProvider(variables?: DeletedAiProviderSubscriptionVariables, options?: C): AsyncIterable<DeletedAiProviderSubscription>;
125850
125962
  track(variables: TrackMutationVariables, options?: C): Promise<TrackMutation>;
125851
125963
  assistantSessions(variables?: AssistantSessionsQueryVariables, options?: C): Promise<AssistantSessionsQuery>;
@@ -16,7 +16,7 @@ export { FilterSlot, type Filter, type FilterSlotContent, type CurrentFilterChan
16
16
  export type { HTTPQL, StreamQL, ID, ComponentDefinition, Selection, QueryInput, } from "./types/utils";
17
17
  export type { JSONValue, JSONCompatible } from "./types/json";
18
18
  export type { KVValue, KVEvents } from "./types/kv";
19
- export type { SlotContent, ButtonSlotContent, CustomSlotContent, CommandSlotContent, SlotContentPropsInternal, SlotContentProps, } from "./types/slots";
19
+ export type { SlotContent, ButtonSlotContent, CustomSlotContent, CommandSlotContent, SlotContentPropsInternal, SlotContentProps, SlotHandle, } from "./types/slots";
20
20
  export type { RequestViewModeOptions, RequestWritableViewModeProps, RequestReadableViewModeProps, RequestReadableViewModePropsInternal, RequestWritableViewModePropsInternal, RequestViewModeProps, RequestFull, RequestDraft, RequestMeta, } from "./types/request";
21
21
  export type { ResponseViewModePropsInternal, ResponseViewModeOptions, ResponseViewModeProps, ResponseFull, } from "./types/response";
22
22
  export type { CurrentMatchReplaceRuleChangeEvent, MatchReplaceRule, MatchReplaceCollection, MatchReplaceSection, MatchReplaceSectionRequestAll, MatchReplaceSectionRequestBody, MatchReplaceSectionRequestFirstLine, MatchReplaceSectionRequestHeader, MatchReplaceSectionRequestMethod, MatchReplaceSectionRequestPath, MatchReplaceSectionRequestQuery, MatchReplaceSectionRequestSNI, MatchReplaceSectionResponseAll, MatchReplaceSectionResponseBody, MatchReplaceSectionResponseFirstLine, MatchReplaceSectionResponseHeader, MatchReplaceSectionResponseStatusCode, MatchReplaceOperationStatusCode, MatchReplaceOperationStatusCodeUpdate, MatchReplaceOperationQuery, MatchReplaceOperationQueryRaw, MatchReplaceOperationQueryAdd, MatchReplaceOperationQueryRemove, MatchReplaceOperationQueryUpdate, MatchReplaceOperationPath, MatchReplaceOperationPathRaw, MatchReplaceOperationAll, MatchReplaceOperationAllRaw, MatchReplaceOperationMethod, MatchReplaceOperationMethodUpdate, MatchReplaceOperationHeader, MatchReplaceOperationHeaderRaw, MatchReplaceOperationHeaderAdd, MatchReplaceOperationHeaderRemove, MatchReplaceOperationHeaderUpdate, MatchReplaceOperationBody, MatchReplaceOperationBodyRaw, MatchReplaceOperationFirstLine, MatchReplaceOperationFirstLineRaw, MatchReplaceOperationSNI, MatchReplaceOperationSNIRaw, MatchReplaceReplacer, MatchReplaceReplacerTerm, MatchReplaceReplacerWorkflow, MatchReplaceMatcherName, MatchReplaceMatcherRaw, MatchReplaceMatcherRawFull, MatchReplaceMatcherRawRegex, MatchReplaceMatcherRawValue, MatchReplaceSectionResponseWebsocket, MatchReplaceSectionRequestWebsocket, MatchReplaceOperationWebsocket, MatchReplaceOperationWebsocketRaw, } from "./types/matchReplace";
@@ -71,6 +71,7 @@ export type FiltersSDK = {
71
71
  * Add a component to a slot.
72
72
  * @param slot The slot to add the component to.
73
73
  * @param content The content to add to the slot.
74
+ * @returns A handle object with a `remove` method to remove the content from the slot.
74
75
  * @example
75
76
  * ```ts
76
77
  * sdk.filters.addToSlot(FilterSlot.UpdateHeader, {
@@ -9,6 +9,7 @@ export type FooterSDK = {
9
9
  * Add a component to a slot.
10
10
  * @param slot The slot to add the component to.
11
11
  * @param content The content to add to the slot.
12
+ * @returns A handle object with a `remove` method to remove the content from the slot.
12
13
  * @example
13
14
  * ```ts
14
15
  * addToSlot(FooterSlot.FooterSlotPrimary, {
@@ -68,6 +68,7 @@ export type HTTPHistorySDK = {
68
68
  * Add a component to a slot.
69
69
  * @param slot The slot to add the component to.
70
70
  * @param content The content to add to the slot.
71
+ * @returns A handle object with a `remove` method to remove the content from the slot.
71
72
  * @example
72
73
  * ```ts
73
74
  * sdk.httpHistory.addToSlot(HTTPHistorySlot.ToolbarPrimary, {
@@ -114,6 +114,7 @@ export type MatchReplaceSDK = {
114
114
  * Add a component to a slot.
115
115
  * @param slot The slot to add the component to.
116
116
  * @param content The content to add to the slot.
117
+ * @returns A handle object with a `remove` method to remove the content from the slot.
117
118
  * @example
118
119
  * ```ts
119
120
  * sdk.matchReplace.addToSlot(MatchReplaceSlot.UpdateHeader, {
@@ -142,27 +142,29 @@ export type ReplaySDK = {
142
142
  * Add a component to a slot.
143
143
  * @param slot The slot to add the component to.
144
144
  * @param content The content to add to the slot.
145
+ * @returns A handle object with a `remove` method to remove the content from the slot.
145
146
  * @example
146
147
  * ```ts
147
- * addToSlot(ReplaySlot.SessionToolbarPrimary, {
148
- * kind: "Command",
148
+ * const command = sdk.replay.addToSlot(ReplaySlot.SessionToolbarPrimary, {
149
+ * type: "Command",
149
150
  * commandId: "my-command",
150
151
  * icon: "my-icon",
151
152
  * });
152
153
  *
153
- * addToSlot(ReplaySlot.SessionToolbarSecondary, {
154
- * kind: "Custom",
155
- * component: MyComponent,
154
+ * const custom = sdk.replay.addToSlot(ReplaySlot.SessionToolbarSecondary, {
155
+ * type: "Custom",
156
+ * definition: MyComponent,
156
157
  * });
157
158
  *
158
- * addToSlot(ReplaySlot.Topbar, {
159
- * kind: "Button",
160
- * label: "My Button",
161
- * icon: "my-icon",
162
- * onClick: () => {
163
- * console.log("Button clicked");
164
- * },
159
+ * const button = sdk.replay.addToSlot(ReplaySlot.Topbar, {
160
+ * type: "Button",
161
+ * label: "Hello",
162
+ * icon: "fas fa-user",
163
+ * onClick: () => {},
165
164
  * });
165
+ *
166
+ * // Later, remove the content
167
+ * button.remove();
166
168
  * ```
167
169
  */
168
170
  addToSlot: DefineAddToSlotFn<ReplaySlotContent>;
@@ -78,6 +78,7 @@ export type ScopesSDK = {
78
78
  * Add a component to a slot.
79
79
  * @param slot The slot to add the component to.
80
80
  * @param content The content to add to the slot.
81
+ * @returns A handle object with a `remove` method to remove the content from the slot.
81
82
  * @example
82
83
  * ```ts
83
84
  * sdk.scopes.addToSlot(ScopeSlot.UpdateHeader, {
@@ -2,6 +2,7 @@ import type { Extension } from "@codemirror/state";
2
2
  import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
3
3
  import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
4
4
  import type { SearchSlot, SearchSlotContent } from "../types/search";
5
+ import type { SlotHandle } from "../types/slots";
5
6
  import type { HTTPQL, ID } from "../types/utils";
6
7
  /**
7
8
  * Utilities to interact with the Search page.
@@ -62,6 +63,7 @@ export type SearchSDK = {
62
63
  * Add content to a slot in the Search UI.
63
64
  * @param slot The slot to add content to.
64
65
  * @param content The content to add.
66
+ * @returns A handle object with a `remove` method to remove the content from the slot.
65
67
  */
66
- addToSlot: <T extends SearchSlot>(slot: T, content: SearchSlotContent[T]) => void;
68
+ addToSlot: <T extends SearchSlot>(slot: T, content: SearchSlotContent[T]) => SlotHandle;
67
69
  };
@@ -9,6 +9,7 @@ export type SettingsSDK = {
9
9
  * Add a component to a slot.
10
10
  * @param slot The slot to add the component to.
11
11
  * @param content The content to add to the slot.
12
+ * @returns A handle object with a `remove` method to remove the content from the slot.
12
13
  * @example
13
14
  * ```ts
14
15
  * sdk.settings.addToSlot(SettingsSlot.PluginsSection, {
@@ -50,11 +50,21 @@ export type CommandSlotContent = DefineSlotContent<"Command", {
50
50
  * @category Slots
51
51
  */
52
52
  export type SlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
53
+ /**
54
+ * A handle for slot content added through the SDK.
55
+ * @category Slots
56
+ */
57
+ export type SlotHandle = {
58
+ /**
59
+ * Remove the content from the slot.
60
+ */
61
+ remove: () => void;
62
+ };
53
63
  /**
54
64
  * A function type for adding content to slots.
55
65
  * @category Slots
56
66
  */
57
67
  export type DefineAddToSlotFn<TMap extends Record<string, DefineSlotContent<string, Record<string, unknown>>>> = {
58
- <K extends keyof TMap>(slot: K, spec: TMap[K]): void;
68
+ <K extends keyof TMap>(slot: K, spec: TMap[K]): SlotHandle;
59
69
  };
60
70
  export {};