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

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.
@@ -1,13 +1,10 @@
1
- import type { DefineComponent } from "vue";
2
- import type { HTTPQLEditorProps } from "./types/httpqlEditor";
3
1
  export { FooterSlot, type FooterSlotContent } from "./types/footer";
4
2
  export type { DialogOptions, DialogComponent } from "./types/window";
5
- export type { Editor } from "./types/editor";
6
3
  export type { _AnalyticsSDK } from "./private/analytics";
7
4
  export type { MessageViewModeOptions, StreamWsMessageMeta, MessageViewModePropsInternal, MessageViewModeProps, } from "./types/websocket";
8
5
  export type { CommandContext, CommandContextRequest, CommandContextRequestRow, CommandContextResponse, CommandContextBase, } from "./types/commands";
9
6
  export type { MenuItem } from "./types/menu";
10
- export { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type ReplayTab, type ReplaySession, type ReplayEntry, type ReplaySelectedExchange, type ReplayWebSocketMessage, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, ReplaySessionKind, type ReplayPageContext, } from "./types/replay";
7
+ export { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
11
8
  export type { AutomateSession, AutomateEntry } from "./types/automate";
12
9
  export type { SitemapEntry, SitemapRootEntry, ChildState, } from "./types/sitemap";
13
10
  export { SearchSlot, type SearchSlotContent } from "./types/search";
@@ -15,8 +12,7 @@ export type { HostedFile } from "./types/files";
15
12
  export { FilterSlot, type Filter, type FilterSlotContent, type CurrentFilterChangeEvent, } from "./types/filter";
16
13
  export type { HTTPQL, StreamQL, ID, ComponentDefinition, Selection, QueryInput, } from "./types/utils";
17
14
  export type { JSONValue, JSONCompatible } from "./types/json";
18
- export type { KVValue, KVEvents } from "./types/kv";
19
- export type { SlotContent, ButtonSlotContent, CustomSlotContent, CommandSlotContent, SlotContentPropsInternal, SlotContentProps, SlotHandle, } from "./types/slots";
15
+ export type { SlotContent, ButtonSlotContent, CustomSlotContent, CommandSlotContent, SlotContentPropsInternal, SlotContentProps, } from "./types/slots";
20
16
  export type { RequestViewModeOptions, RequestWritableViewModeProps, RequestReadableViewModeProps, RequestReadableViewModePropsInternal, RequestWritableViewModePropsInternal, RequestViewModeProps, RequestFull, RequestDraft, RequestMeta, } from "./types/request";
21
17
  export type { ResponseViewModePropsInternal, ResponseViewModeOptions, ResponseViewModeProps, ResponseFull, } from "./types/response";
22
18
  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";
@@ -27,12 +23,11 @@ export { SettingsSlot, type SettingsSlotContent, type SettingsPluginSlotContent,
27
23
  export type { EnvironmentVariable } from "./types/environment";
28
24
  export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkflowCallback, OnDeletedWorkflowCallback, } from "./types/workflows";
29
25
  export type { ListenerHandle, AddIndicatorOptions, Indicator, ComponentProps, ComponentPropsWithSdk, } from "./types/utils";
30
- export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderApi, AIUpstreamProviderId, } from "./types/ai";
26
+ export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderId, AIUpstreamProviderStatus, } from "./types/ai";
31
27
  export type { SelectedProjectChangeEvent } from "./types/projects";
32
28
  export type { CommandPaletteViewProps, CommandPaletteViewPropsInternal, } from "./types/commandPalette";
33
29
  export type { CommandPaletteView } from "./sdks/commandPalette";
34
30
  export type { LogSDK } from "./sdks/log";
35
- export type { KVSDK, KVDefineOptions } from "./sdks/kv";
36
31
  export type { API } from "./sdks";
37
32
  export { Routes } from "./types/navigation";
38
33
  export { type GlobalContext, type PageContext } from "./types/window";
@@ -48,12 +43,9 @@ export type { FindingsPageContext } from "./types/findings";
48
43
  export type { HTTPHistoryPageContext } from "./types/httpHistory";
49
44
  export type { InterceptPageContext } from "./types/intercept";
50
45
  export type { ProjectsPageContext } from "./types/projects";
46
+ export type { ReplayPageContext } from "./types/replay";
51
47
  export type { ScopePageContext } from "./types/scopes";
52
48
  export type { SearchPageContext } from "./types/search";
53
49
  export type { SitemapPageContext } from "./types/sitemap";
54
50
  export type { MatchReplacePageContext } from "./types/matchReplace";
55
51
  export type { WorkflowsPageContext } from "./types/workflows";
56
- export type { HTTPQLEditorProps };
57
- export declare const HTTPQLEditor: DefineComponent<HTTPQLEditorProps & {
58
- modelValue?: string;
59
- }>;
@@ -10,8 +10,8 @@ export type AiSDK = {
10
10
  */
11
11
  createProvider: () => AIProvider;
12
12
  /**
13
- * Gets the list of configured upstream AI providers.
14
- * @returns An array of configured AI upstream providers.
13
+ * Gets the list of upstream AI providers with their configuration status.
14
+ * @returns An array of AI upstream providers with their configuration status.
15
15
  */
16
16
  getUpstreamProviders: () => AIUpstreamProvider[];
17
17
  };
@@ -1,23 +1,13 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import type { AutomateEntry, AutomateSession } from "../types/automate";
3
- import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
- import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
3
+ import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
+ import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
5
5
  import type { AddIndicatorOptions, ID, Indicator } from "../types/utils";
6
6
  /**
7
7
  * Utilities to interact with the Automate page.
8
8
  * @category Automate
9
9
  */
10
10
  export type AutomateSDK = {
11
- /**
12
- * Get the currently selected request.
13
- * @returns The currently selected request.
14
- */
15
- getSelectedRequest: () => RequestFull | undefined;
16
- /**
17
- * Get the currently selected response.
18
- * @returns The currently selected response.
19
- */
20
- getSelectedResponse: () => ResponseFull | undefined;
21
11
  /**
22
12
  * Add an extension to the request editor.
23
13
  * @param extension The extension to add.
@@ -71,7 +71,6 @@ 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.
75
74
  * @example
76
75
  * ```ts
77
76
  * sdk.filters.addToSlot(FilterSlot.UpdateHeader, {
@@ -1,7 +1,7 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import { type Finding } from "../types/findings";
3
- import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
- import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
3
+ import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
+ import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
5
5
  import type { ID } from "../types/utils";
6
6
  /**
7
7
  * Utilities to interact with findings
@@ -24,16 +24,6 @@ export type FindingsSDK = {
24
24
  reporter: string;
25
25
  dedupeKey?: string;
26
26
  }) => Promise<Finding | undefined>;
27
- /**
28
- * Get the currently selected request.
29
- * @returns The currently selected request.
30
- */
31
- getSelectedRequest: () => RequestFull | undefined;
32
- /**
33
- * Get the currently selected response.
34
- * @returns The currently selected response.
35
- */
36
- getSelectedResponse: () => ResponseFull | undefined;
37
27
  /**
38
28
  * Add an extension to the request editor.
39
29
  * @param extension The extension to add.
@@ -9,7 +9,6 @@ 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.
13
12
  * @example
14
13
  * ```ts
15
14
  * addToSlot(FooterSlot.FooterSlotPrimary, {
@@ -1,7 +1,7 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import type { HTTPHistorySlotContent } from "../types/httpHistory";
3
- import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
- import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
3
+ import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
+ import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
5
5
  import { type DefineAddToSlotFn } from "../types/slots";
6
6
  import type { HTTPQL, ID } from "../types/utils";
7
7
  /**
@@ -24,16 +24,6 @@ export type HTTPHistorySDK = {
24
24
  * @returns The current scope ID.
25
25
  */
26
26
  getScopeId: () => ID | undefined;
27
- /**
28
- * Get the currently selected request.
29
- * @returns The currently selected request.
30
- */
31
- getSelectedRequest: () => RequestFull | undefined;
32
- /**
33
- * Get the currently selected response.
34
- * @returns The currently selected response.
35
- */
36
- getSelectedResponse: () => ResponseFull | undefined;
37
27
  /**
38
28
  * Set the current scope.
39
29
  * @param id The ID of the scope to set.
@@ -68,7 +58,6 @@ export type HTTPHistorySDK = {
68
58
  * Add a component to a slot.
69
59
  * @param slot The slot to add the component to.
70
60
  * @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.
72
61
  * @example
73
62
  * ```ts
74
63
  * sdk.httpHistory.addToSlot(HTTPHistorySlot.ToolbarPrimary, {
@@ -14,7 +14,6 @@ import type { FindingsSDK } from "./findings";
14
14
  import type { FooterSDK } from "./footer";
15
15
  import type { HTTPHistorySDK } from "./httpHistory";
16
16
  import type { InterceptSDK } from "./intercept";
17
- import type { KVSDK } from "./kv";
18
17
  import type { LogSDK } from "./log";
19
18
  import type { MatchReplaceSDK } from "./matchReplace";
20
19
  import type { MenuSDK } from "./menu";
@@ -40,23 +39,6 @@ import type { WorkflowSDK } from "./workflows";
40
39
  export type API<T extends BackendEndpoints | BackendSpec = Record<string, never>, E extends BackendEvents = Record<string, never>> = {
41
40
  /**
42
41
  * Utilities to interact with the GraphQL API.
43
- *
44
- * Queries and mutations return a promise; subscriptions return an
45
- * `AsyncIterable`. On success they resolve with the response data or yield
46
- * it. On failure (network error or any GraphQL errors returned by the
47
- * server) the promise rejects, or the iterator throws into the `for await`
48
- * loop, with the underlying error. Failures can be handled with `try`/
49
- * `catch` or `.catch()`.
50
- *
51
- * @example
52
- * ```ts
53
- * try {
54
- * const result = await sdk.graphql.automateEntry({ id: "1" });
55
- * // use result
56
- * } catch (err) {
57
- * // err.message, err.graphQLErrors, err.networkError
58
- * }
59
- * ```
60
42
  */
61
43
  graphql: GraphqlSDK;
62
44
  /**
@@ -103,10 +85,6 @@ export type API<T extends BackendEndpoints | BackendSpec = Record<string, never>
103
85
  * Utilities to interact with frontend-plugin storage.
104
86
  */
105
87
  storage: StorageSDK;
106
- /**
107
- * Utilities to interact with plugin package data (key-value store).
108
- */
109
- kv: KVSDK;
110
88
  /**
111
89
  * Utilities to interact with the plugin's static assets.
112
90
  */
@@ -1,5 +1,5 @@
1
- import type { RequestFull, RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
2
- import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
1
+ import type { RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
2
+ import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
3
3
  import type { ID } from "../types/utils";
4
4
  /**
5
5
  * Utilities to interact with the Intercept page.
@@ -11,16 +11,6 @@ export type InterceptSDK = {
11
11
  * @returns The current scope ID.
12
12
  */
13
13
  getScopeId: () => ID | undefined;
14
- /**
15
- * Get the currently selected request.
16
- * @returns The currently selected request.
17
- */
18
- getSelectedRequest: () => RequestFull | undefined;
19
- /**
20
- * Get the currently selected response.
21
- * @returns The currently selected response.
22
- */
23
- getSelectedResponse: () => ResponseFull | undefined;
24
14
  /**
25
15
  * Set the current scope.
26
16
  * @param scopeId The ID of the scope to set.
@@ -114,7 +114,6 @@ 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.
118
117
  * @example
119
118
  * ```ts
120
119
  * sdk.matchReplace.addToSlot(MatchReplaceSlot.UpdateHeader, {
@@ -1,10 +1,9 @@
1
1
  import { type Extension } from "@codemirror/state";
2
- import { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type CurrentReplaySessionChangeEvent, type OpenTabOptions, type ReplayCollection, type ReplayCollectionCreatedEvent, type ReplayEntry, type ReplaySelectedExchange, type ReplaySession, type ReplaySessionCreatedEvent, type ReplaySessionKind, type ReplaySlotContent, type ReplayTab, type RequestSource, type SendRequestOptions } from "../types/replay";
3
- import type { RequestFull, RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
4
- import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
2
+ import { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type CurrentReplaySessionChangeEvent, type OpenTabOptions, type ReplayCollection, type ReplayCollectionCreatedEvent, type ReplayEntry, type ReplaySession, type ReplaySessionCreatedEvent, type ReplaySlotContent, type ReplayTab, type RequestSource, type SendRequestOptions } from "../types/replay";
3
+ import type { RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
4
+ import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
5
5
  import { type DefineAddToSlotFn } from "../types/slots";
6
6
  import type { ID, Indicator, ListenerHandle } from "../types/utils";
7
- import type { MessageViewModeOptions, MessageViewModeProps } from "../types/websocket";
8
7
  /**
9
8
  * Utilities to interact with Replay.
10
9
  * @category Replay
@@ -28,13 +27,9 @@ export type ReplaySDK = {
28
27
  getTabs: () => ReplayTab[];
29
28
  /**
30
29
  * Get the list of all replay sessions.
31
- * @param options The options for getting the sessions.
32
- * @param options.collectionId The ID of the collection to get the sessions for.
33
30
  * @returns The list of all replay sessions.
34
31
  */
35
- getSessions: (options?: {
36
- collectionId?: ID;
37
- }) => ReplaySession[];
32
+ getSessions: () => ReplaySession[];
38
33
  /**
39
34
  * Get the currently selected replay session.
40
35
  * @returns The currently selected replay session, or undefined if no session is selected.
@@ -63,21 +58,6 @@ export type ReplaySDK = {
63
58
  * ```
64
59
  */
65
60
  getCurrentEntry: () => ReplayEntry | undefined;
66
- /**
67
- * Get the currently selected Replay exchange.
68
- * @returns The currently selected Replay exchange.
69
- */
70
- getSelectedExchange: () => ReplaySelectedExchange | undefined;
71
- /**
72
- * Get the currently selected request.
73
- * @returns The currently selected request.
74
- */
75
- getSelectedRequest: () => RequestFull | undefined;
76
- /**
77
- * Get the currently selected response.
78
- * @returns The currently selected response.
79
- */
80
- getSelectedResponse: () => ResponseFull | undefined;
81
61
  /**
82
62
  * Rename a session.
83
63
  * @param id The ID of the session to rename.
@@ -99,22 +79,10 @@ export type ReplaySDK = {
99
79
  deleteSessions: (sessionIds: ID[]) => Promise<ID[]>;
100
80
  /**
101
81
  * Create a session.
102
- * @param source The source of the session to create.
103
- * @param collectionId The ID of the collection to add the session to.
104
- * @example
105
- * ```ts
106
- * sdk.replay.createSession({
107
- * type: "Raw",
108
- * raw: "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n",
109
- * connectionInfo: {
110
- * host: "example.com",
111
- * port: 443,
112
- * isTLS: true,
113
- * },
114
- * });
115
- * ```
82
+ * @param sessionId The ID of the request to add.
83
+ * @param collectionId The ID of the collection to add the request.
116
84
  */
117
- createSession: (source: RequestSource, collectionId?: ID, sessionKind?: ReplaySessionKind) => Promise<ReplaySession>;
85
+ createSession: (source: RequestSource, collectionId?: ID) => Promise<void>;
118
86
  /**
119
87
  * Get the list of all replay collections.
120
88
  * @returns The list of all replay collections.
@@ -142,29 +110,27 @@ export type ReplaySDK = {
142
110
  * Add a component to a slot.
143
111
  * @param slot The slot to add the component to.
144
112
  * @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.
146
113
  * @example
147
114
  * ```ts
148
- * const command = sdk.replay.addToSlot(ReplaySlot.SessionToolbarPrimary, {
149
- * type: "Command",
115
+ * addToSlot(ReplaySlot.SessionToolbarPrimary, {
116
+ * kind: "Command",
150
117
  * commandId: "my-command",
151
118
  * icon: "my-icon",
152
119
  * });
153
120
  *
154
- * const custom = sdk.replay.addToSlot(ReplaySlot.SessionToolbarSecondary, {
155
- * type: "Custom",
156
- * definition: MyComponent,
121
+ * addToSlot(ReplaySlot.SessionToolbarSecondary, {
122
+ * kind: "Custom",
123
+ * component: MyComponent,
157
124
  * });
158
125
  *
159
- * const button = sdk.replay.addToSlot(ReplaySlot.Topbar, {
160
- * type: "Button",
161
- * label: "Hello",
162
- * icon: "fas fa-user",
163
- * onClick: () => {},
126
+ * addToSlot(ReplaySlot.Topbar, {
127
+ * kind: "Button",
128
+ * label: "My Button",
129
+ * icon: "my-icon",
130
+ * onClick: () => {
131
+ * console.log("Button clicked");
132
+ * },
164
133
  * });
165
- *
166
- * // Later, remove the content
167
- * button.remove();
168
134
  * ```
169
135
  */
170
136
  addToSlot: DefineAddToSlotFn<ReplaySlotContent>;
@@ -183,11 +149,6 @@ export type ReplaySDK = {
183
149
  * @param options The view mode options.
184
150
  */
185
151
  addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
186
- /**
187
- * Add a custom WebSocket message view mode.
188
- * @param options The view mode options.
189
- */
190
- addWebsocketMessageViewMode: (options: MessageViewModeOptions<MessageViewModeProps>) => void;
191
152
  /**
192
153
  * Send a request to the Replay backend.
193
154
  * @param request The request to send.
@@ -78,7 +78,6 @@ 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.
82
81
  * @example
83
82
  * ```ts
84
83
  * sdk.scopes.addToSlot(ScopeSlot.UpdateHeader, {
@@ -1,8 +1,7 @@
1
1
  import type { Extension } from "@codemirror/state";
2
- import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
3
- import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
2
+ import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
3
+ import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
4
4
  import type { SearchSlot, SearchSlotContent } from "../types/search";
5
- import type { SlotHandle } from "../types/slots";
6
5
  import type { HTTPQL, ID } from "../types/utils";
7
6
  /**
8
7
  * Utilities to interact with the Search page.
@@ -24,16 +23,6 @@ export type SearchSDK = {
24
23
  * @returns The current scope ID.
25
24
  */
26
25
  getScopeId: () => ID | undefined;
27
- /**
28
- * Get the currently selected request.
29
- * @returns The currently selected request.
30
- */
31
- getSelectedRequest: () => RequestFull | undefined;
32
- /**
33
- * Get the currently selected response.
34
- * @returns The currently selected response.
35
- */
36
- getSelectedResponse: () => ResponseFull | undefined;
37
26
  /**
38
27
  * Set the current scope.
39
28
  * @param id The ID of the scope to set.
@@ -63,7 +52,6 @@ export type SearchSDK = {
63
52
  * Add content to a slot in the Search UI.
64
53
  * @param slot The slot to add content to.
65
54
  * @param content The content to add.
66
- * @returns A handle object with a `remove` method to remove the content from the slot.
67
55
  */
68
- addToSlot: <T extends SearchSlot>(slot: T, content: SearchSlotContent[T]) => SlotHandle;
56
+ addToSlot: <T extends SearchSlot>(slot: T, content: SearchSlotContent[T]) => void;
69
57
  };
@@ -9,7 +9,6 @@ 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.
13
12
  * @example
14
13
  * ```ts
15
14
  * sdk.settings.addToSlot(SettingsSlot.PluginsSection, {
@@ -1,6 +1,6 @@
1
1
  import type { Extension } from "@codemirror/state";
2
- import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
3
- import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
2
+ import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
3
+ import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
4
4
  import type { SitemapEntry, SitemapEntryChildStateUpdateEvent, SitemapRootEntry } from "../types/sitemap";
5
5
  import type { AddIndicatorOptions, ID, Indicator, ListenerHandle } from "../types/utils";
6
6
  /**
@@ -39,16 +39,6 @@ export type SitemapSDK = {
39
39
  * @returns The current scope ID.
40
40
  */
41
41
  getScopeId: () => ID | undefined;
42
- /**
43
- * Get the currently selected request.
44
- * @returns The currently selected request.
45
- */
46
- getSelectedRequest: () => RequestFull | undefined;
47
- /**
48
- * Get the currently selected response.
49
- * @returns The currently selected response.
50
- */
51
- getSelectedResponse: () => ResponseFull | undefined;
52
42
  /**
53
43
  * Set the current scope.
54
44
  * @param id The ID of the scope to set.
@@ -11,16 +11,6 @@ export type WindowSDK = {
11
11
  * @returns The active editor.
12
12
  */
13
13
  getActiveEditor: () => Editor | undefined;
14
- /**
15
- * Get the active request editor.
16
- * @returns The active request editor.
17
- */
18
- getActiveRequestEditor: () => Editor | undefined;
19
- /**
20
- * Get the active response editor.
21
- * @returns The active response editor.
22
- */
23
- getActiveResponseEditor: () => Editor | undefined;
24
14
  /**
25
15
  * Show a toast message.
26
16
  * @param message The message to show.
@@ -26,18 +26,19 @@ export type AIProvider = ProviderV3 & ((modelId: string, settings?: AILanguageMo
26
26
  * AI upstream provider ID.
27
27
  * @category AI
28
28
  */
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";
29
+ export type AIUpstreamProviderId = "anthropic" | "google" | "openai" | "openrouter";
35
30
  /**
36
31
  * AI upstream provider information.
37
- * Only configured providers are returned.
38
32
  * @category AI
39
33
  */
40
34
  export type AIUpstreamProvider = {
41
35
  id: AIUpstreamProviderId;
42
- api: AIUpstreamProviderApi;
36
+ status: AIUpstreamProviderStatus;
43
37
  };
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";
@@ -1,5 +1,3 @@
1
- import type { RequestFull } from "./request";
2
- import type { ResponseFull } from "./response";
3
1
  import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
4
2
  import { type AddIndicatorOptions, type ID, type Selection } from "./utils";
5
3
  /**
@@ -112,35 +110,6 @@ export type ReplayEntry = {
112
110
  */
113
111
  requestId?: ID;
114
112
  };
115
- /**
116
- * The currently selected Replay exchange.
117
- * @category Replay
118
- */
119
- export type ReplaySelectedExchange = {
120
- kind: typeof ReplaySessionKind.Http;
121
- entryId: ID;
122
- sessionId: ID;
123
- request: RequestFull;
124
- response?: ResponseFull;
125
- } | {
126
- kind: typeof ReplaySessionKind.Ws;
127
- entryId: ID;
128
- sessionId: ID;
129
- streamId?: ID;
130
- activeTab: "http-upgrade" | "messages";
131
- upgradeRequest?: RequestFull;
132
- upgradeResponse?: ResponseFull;
133
- message?: ReplayWebSocketMessage;
134
- };
135
- /**
136
- * The currently edited WebSocket message in Replay.
137
- * @category Replay
138
- */
139
- export type ReplayWebSocketMessage = {
140
- raw: string;
141
- direction: "CLIENT" | "SERVER";
142
- format: "BINARY" | "CLOSE" | "PING" | "PONG" | "TEXT";
143
- };
144
113
  /**
145
114
  * A collection in Replay.
146
115
  * @category Replay
@@ -255,19 +224,6 @@ export type AddSessionIndicatorOptions = AddIndicatorOptions & {
255
224
  * @category Replay
256
225
  */
257
226
  export type AddCollectionIndicatorOptions = AddIndicatorOptions;
258
- /**
259
- * The kind of a replay session.
260
- * @category Replay
261
- */
262
- export declare const ReplaySessionKind: {
263
- readonly Http: "HTTP";
264
- readonly Ws: "WS";
265
- };
266
- /**
267
- * The kind of a replay session.
268
- * @category Replay
269
- */
270
- export type ReplaySessionKind = (typeof ReplaySessionKind)[keyof typeof ReplaySessionKind];
271
227
  /**
272
228
  * A unique replay session identifier.
273
229
  * @category Replay
@@ -50,21 +50,11 @@ 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
- };
63
53
  /**
64
54
  * A function type for adding content to slots.
65
55
  * @category Slots
66
56
  */
67
57
  export type DefineAddToSlotFn<TMap extends Record<string, DefineSlotContent<string, Record<string, unknown>>>> = {
68
- <K extends keyof TMap>(slot: K, spec: TMap[K]): SlotHandle;
58
+ <K extends keyof TMap>(slot: K, spec: TMap[K]): void;
69
59
  };
70
60
  export {};