@caido/sdk-frontend 0.57.1 → 0.57.2-beta.0

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,10 +1,12 @@
1
+ import type { DefineComponent } from "vue";
2
+ import type { HTTPQLEditorProps } from "./types/httpqlEditor";
1
3
  export { FooterSlot, type FooterSlotContent } from "./types/footer";
2
- export type { DialogOptions } from "./types/window";
4
+ export type { DialogOptions, DialogComponent } from "./types/window";
3
5
  export type { _AnalyticsSDK } from "./private/analytics";
4
- export type { MessageViewModeOptions, StreamWsMessageMeta, } from "./types/websocket";
6
+ export type { MessageViewModeOptions, StreamWsMessageMeta, MessageViewModePropsInternal, MessageViewModeProps, } from "./types/websocket";
5
7
  export type { CommandContext, CommandContextRequest, CommandContextRequestRow, CommandContextResponse, CommandContextBase, } from "./types/commands";
6
8
  export type { MenuItem } from "./types/menu";
7
- export { type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
9
+ export { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, ReplaySessionKind, type ReplayPageContext, } from "./types/replay";
8
10
  export type { AutomateSession, AutomateEntry } from "./types/automate";
9
11
  export type { SitemapEntry, SitemapRootEntry, ChildState, } from "./types/sitemap";
10
12
  export { SearchSlot, type SearchSlotContent } from "./types/search";
@@ -12,9 +14,9 @@ export type { HostedFile } from "./types/files";
12
14
  export { FilterSlot, type Filter, type FilterSlotContent, type CurrentFilterChangeEvent, } from "./types/filter";
13
15
  export type { HTTPQL, StreamQL, ID, ComponentDefinition, Selection, QueryInput, } from "./types/utils";
14
16
  export type { JSONValue, JSONCompatible } from "./types/json";
15
- export type { SlotContent, ButtonSlotContent, CustomSlotContent, CommandSlotContent, } from "./types/slots";
16
- export type { RequestViewModeOptions, RequestFull, RequestDraft, RequestMeta, } from "./types/request";
17
- export type { ResponseViewModeOptions, ResponseFull } from "./types/response";
17
+ export type { SlotContent, ButtonSlotContent, CustomSlotContent, CommandSlotContent, SlotContentPropsInternal, SlotContentProps, } from "./types/slots";
18
+ export type { RequestViewModeOptions, RequestWritableViewModeProps, RequestReadableViewModeProps, RequestReadableViewModePropsInternal, RequestWritableViewModePropsInternal, RequestViewModeProps, RequestFull, RequestDraft, RequestMeta, } from "./types/request";
19
+ export type { ResponseViewModePropsInternal, ResponseViewModeOptions, ResponseViewModeProps, ResponseFull, } from "./types/response";
18
20
  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";
19
21
  export { MatchReplaceSlot, type MatchReplaceSlotContent, } from "./types/matchReplace";
20
22
  export { ScopeSlot, type CurrentScopeChangeEvent, type Scope, type ScopeSlotContent, } from "./types/scopes";
@@ -22,9 +24,10 @@ export { HTTPHistorySlot, type HTTPHistorySlotContent, } from "./types/httpHisto
22
24
  export { SettingsSlot, type SettingsSlotContent, type SettingsPluginSlotContent, } from "./types/settings";
23
25
  export type { EnvironmentVariable } from "./types/environment";
24
26
  export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkflowCallback, OnDeletedWorkflowCallback, } from "./types/workflows";
25
- export type { ListenerHandle, AddIndicatorOptions, Indicator, } from "./types/utils";
26
- export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderId, AIUpstreamProviderStatus, } from "./types/ai";
27
+ export type { ListenerHandle, AddIndicatorOptions, Indicator, ComponentProps, ComponentPropsWithSdk, } from "./types/utils";
28
+ export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderApi, AIUpstreamProviderId, } from "./types/ai";
27
29
  export type { SelectedProjectChangeEvent } from "./types/projects";
30
+ export type { CommandPaletteViewProps, CommandPaletteViewPropsInternal, } from "./types/commandPalette";
28
31
  export type { CommandPaletteView } from "./sdks/commandPalette";
29
32
  export type { LogSDK } from "./sdks/log";
30
33
  export type { API } from "./sdks";
@@ -42,9 +45,12 @@ export type { FindingsPageContext } from "./types/findings";
42
45
  export type { HTTPHistoryPageContext } from "./types/httpHistory";
43
46
  export type { InterceptPageContext } from "./types/intercept";
44
47
  export type { ProjectsPageContext } from "./types/projects";
45
- export type { ReplayPageContext } from "./types/replay";
46
48
  export type { ScopePageContext } from "./types/scopes";
47
49
  export type { SearchPageContext } from "./types/search";
48
50
  export type { SitemapPageContext } from "./types/sitemap";
49
51
  export type { MatchReplacePageContext } from "./types/matchReplace";
50
52
  export type { WorkflowsPageContext } from "./types/workflows";
53
+ export type { HTTPQLEditorProps };
54
+ export declare const HTTPQLEditor: DefineComponent<HTTPQLEditorProps & {
55
+ modelValue?: string;
56
+ }>;
@@ -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
  };
@@ -1,7 +1,7 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import type { AutomateEntry, AutomateSession } from "../types/automate";
3
- import type { RequestViewModeOptions } from "../types/request";
4
- import type { ResponseViewModeOptions } 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.
@@ -17,12 +17,12 @@ export type AutomateSDK = {
17
17
  * Add a custom request view mode.
18
18
  * @param options The view mode options.
19
19
  */
20
- addRequestViewMode: (options: RequestViewModeOptions) => void;
20
+ addRequestViewMode: (options: RequestViewModeOptions<RequestReadableViewModeProps>) => void;
21
21
  /**
22
22
  * Add a custom response view mode.
23
23
  * @param options The view mode options.
24
24
  */
25
- addResponseViewMode: (options: ResponseViewModeOptions) => void;
25
+ addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
26
26
  /**
27
27
  * Get the list of all automate sessions.
28
28
  * @returns The list of all automate sessions.
@@ -1,3 +1,4 @@
1
+ import { type CommandPaletteViewProps } from "../types/commandPalette";
1
2
  import { type CommandID } from "../types/commands";
2
3
  import { type ComponentDefinition } from "../types/utils";
3
4
  /**
@@ -6,7 +7,7 @@ import { type ComponentDefinition } from "../types/utils";
6
7
  */
7
8
  export type CommandPaletteView = {
8
9
  type: "Custom";
9
- definition: ComponentDefinition;
10
+ definition: ComponentDefinition<CommandPaletteViewProps>;
10
11
  };
11
12
  /**
12
13
  * Utilities to interact with the command palette.
@@ -1,5 +1,5 @@
1
- import { type ListenerHandle } from "src/types/utils";
2
1
  import { type HostedFile } from "../types/files";
2
+ import { type ListenerHandle } from "../types/utils";
3
3
  /**
4
4
  * SDK for interacting with the Files page.
5
5
  * @category Files
@@ -1,7 +1,7 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import { type Finding } from "../types/findings";
3
- import type { RequestViewModeOptions } from "../types/request";
4
- import type { ResponseViewModeOptions } 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
@@ -33,10 +33,10 @@ export type FindingsSDK = {
33
33
  * Add a custom request view mode.
34
34
  * @param options The view mode options.
35
35
  */
36
- addRequestViewMode: (options: RequestViewModeOptions) => void;
36
+ addRequestViewMode: (options: RequestViewModeOptions<RequestReadableViewModeProps>) => void;
37
37
  /**
38
38
  * Add a custom response view mode.
39
39
  * @param options The view mode options.
40
40
  */
41
- addResponseViewMode: (options: ResponseViewModeOptions) => void;
41
+ addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
42
42
  };
@@ -1,7 +1,7 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import type { HTTPHistorySlotContent } from "../types/httpHistory";
3
- import type { RequestViewModeOptions } from "../types/request";
4
- import type { ResponseViewModeOptions } 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
  /**
@@ -43,12 +43,12 @@ export type HTTPHistorySDK = {
43
43
  * Add a custom request view mode.
44
44
  * @param options The view mode options.
45
45
  */
46
- addRequestViewMode: (options: RequestViewModeOptions) => void;
46
+ addRequestViewMode: (options: RequestViewModeOptions<RequestReadableViewModeProps>) => void;
47
47
  /**
48
48
  * Add a custom response view mode.
49
49
  * @param options The view mode options.
50
50
  */
51
- addResponseViewMode: (options: ResponseViewModeOptions) => void;
51
+ addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
52
52
  /**
53
53
  * Scrolls the HTTP History table to a specific entry.
54
54
  * @param id The ID of the entry to scroll to.
@@ -39,6 +39,23 @@ import type { WorkflowSDK } from "./workflows";
39
39
  export type API<T extends BackendEndpoints | BackendSpec = Record<string, never>, E extends BackendEvents = Record<string, never>> = {
40
40
  /**
41
41
  * Utilities to interact with the GraphQL API.
42
+ *
43
+ * Queries and mutations return a promise; subscriptions return an
44
+ * `AsyncIterable`. On success they resolve with the response data or yield
45
+ * it. On failure (network error or any GraphQL errors returned by the
46
+ * server) the promise rejects, or the iterator throws into the `for await`
47
+ * loop, with the underlying error. Failures can be handled with `try`/
48
+ * `catch` or `.catch()`.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * try {
53
+ * const result = await sdk.graphql.automateEntry({ id: "1" });
54
+ * // use result
55
+ * } catch (err) {
56
+ * // err.message, err.graphQLErrors, err.networkError
57
+ * }
58
+ * ```
42
59
  */
43
60
  graphql: GraphqlSDK;
44
61
  /**
@@ -1,5 +1,5 @@
1
- import type { RequestViewModeOptions } from "../types/request";
2
- import type { ResponseViewModeOptions } 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.
@@ -20,10 +20,10 @@ export type InterceptSDK = {
20
20
  * Add a custom request view mode.
21
21
  * @param options The view mode options.
22
22
  */
23
- addRequestViewMode: (options: RequestViewModeOptions) => void;
23
+ addRequestViewMode: (options: RequestViewModeOptions<RequestWritableViewModeProps>) => void;
24
24
  /**
25
25
  * Add a custom response view mode.
26
26
  * @param options The view mode options.
27
27
  */
28
- addResponseViewMode: (options: ResponseViewModeOptions) => void;
28
+ addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
29
29
  };
@@ -1,9 +1,10 @@
1
1
  import { type Extension } from "@codemirror/state";
2
- import { 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 } from "../types/request";
4
- import type { ResponseViewModeOptions } from "../types/response";
2
+ import { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type CurrentReplaySessionChangeEvent, type OpenTabOptions, type ReplayCollection, type ReplayCollectionCreatedEvent, type ReplayEntry, type ReplaySession, type ReplaySessionCreatedEvent, type ReplaySessionKind, 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
- import type { AddIndicatorOptions, ID, Indicator, ListenerHandle } from "../types/utils";
6
+ import type { ID, Indicator, ListenerHandle } from "../types/utils";
7
+ import type { MessageViewModeOptions, MessageViewModeProps } from "../types/websocket";
7
8
  /**
8
9
  * Utilities to interact with Replay.
9
10
  * @category Replay
@@ -27,9 +28,13 @@ export type ReplaySDK = {
27
28
  getTabs: () => ReplayTab[];
28
29
  /**
29
30
  * 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.
30
33
  * @returns The list of all replay sessions.
31
34
  */
32
- getSessions: () => ReplaySession[];
35
+ getSessions: (options?: {
36
+ collectionId?: ID;
37
+ }) => ReplaySession[];
33
38
  /**
34
39
  * Get the currently selected replay session.
35
40
  * @returns The currently selected replay session, or undefined if no session is selected.
@@ -44,6 +49,20 @@ export type ReplaySDK = {
44
49
  * ```
45
50
  */
46
51
  getCurrentSession: () => ReplaySession | undefined;
52
+ /**
53
+ * Get the entry currently displayed in the active replay session.
54
+ * @returns The active entry, or undefined if no entry is currently loaded.
55
+ * @example
56
+ * ```ts
57
+ * const currentEntry = sdk.replay.getCurrentEntry();
58
+ * if (currentEntry) {
59
+ * console.log(`Currently viewing entry ${currentEntry.id}`);
60
+ * } else {
61
+ * console.log("No entry is currently displayed");
62
+ * }
63
+ * ```
64
+ */
65
+ getCurrentEntry: () => ReplayEntry | undefined;
47
66
  /**
48
67
  * Rename a session.
49
68
  * @param id The ID of the session to rename.
@@ -65,10 +84,22 @@ export type ReplaySDK = {
65
84
  deleteSessions: (sessionIds: ID[]) => Promise<ID[]>;
66
85
  /**
67
86
  * Create a session.
68
- * @param sessionId The ID of the request to add.
69
- * @param collectionId The ID of the collection to add the request.
87
+ * @param source The source of the session to create.
88
+ * @param collectionId The ID of the collection to add the session to.
89
+ * @example
90
+ * ```ts
91
+ * sdk.replay.createSession({
92
+ * type: "Raw",
93
+ * raw: "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n",
94
+ * connectionInfo: {
95
+ * host: "example.com",
96
+ * port: 443,
97
+ * isTLS: true,
98
+ * },
99
+ * });
100
+ * ```
70
101
  */
71
- createSession: (source: RequestSource, collectionId?: ID) => Promise<void>;
102
+ createSession: (source: RequestSource, collectionId?: ID, sessionKind?: ReplaySessionKind) => Promise<ReplaySession>;
72
103
  /**
73
104
  * Get the list of all replay collections.
74
105
  * @returns The list of all replay collections.
@@ -129,12 +160,17 @@ export type ReplaySDK = {
129
160
  * Add a custom view mode for requests.
130
161
  * @param options The view mode options.
131
162
  */
132
- addRequestViewMode: (options: RequestViewModeOptions) => void;
163
+ addRequestViewMode: (options: RequestViewModeOptions<RequestWritableViewModeProps>) => void;
133
164
  /**
134
165
  * Add a custom response view mode.
135
166
  * @param options The view mode options.
136
167
  */
137
- addResponseViewMode: (options: ResponseViewModeOptions) => void;
168
+ addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
169
+ /**
170
+ * Add a custom WebSocket message view mode.
171
+ * @param options The view mode options.
172
+ */
173
+ addWebsocketMessageViewMode: (options: MessageViewModeOptions<MessageViewModeProps>) => void;
138
174
  /**
139
175
  * Send a request to the Replay backend.
140
176
  * @param request The request to send.
@@ -235,11 +271,30 @@ export type ReplaySDK = {
235
271
  * const indicator = sdk.replay.addSessionIndicator(sessionId, {
236
272
  * icon: "fas fa-exclamation-triangle",
237
273
  * description: "Security warning",
274
+ * showTabIcon: true,
275
+ * });
276
+ *
277
+ * // Later, remove the indicator
278
+ * indicator.remove();
279
+ *
280
+ */
281
+ addSessionIndicator: (sessionId: ID, indicator: AddSessionIndicatorOptions) => Indicator;
282
+ /**
283
+ * Add an indicator to a replay collection.
284
+ * Indicators are displayed next to the collection name in the collections tree.
285
+ * @param collectionId The ID of the collection to add the indicator to.
286
+ * @param indicator The indicator configuration.
287
+ * @returns A handle object with a `remove` method to remove the indicator.
288
+ * @example
289
+ *
290
+ * const indicator = sdk.replay.addCollectionIndicator(collectionId, {
291
+ * icon: "fas fa-folder-open",
292
+ * description: "Has unresolved findings",
238
293
  * });
239
294
  *
240
295
  * // Later, remove the indicator
241
296
  * indicator.remove();
242
297
  *
243
298
  */
244
- addSessionIndicator: (sessionId: ID, indicator: AddIndicatorOptions) => Indicator;
299
+ addCollectionIndicator: (collectionId: ID, indicator: AddCollectionIndicatorOptions) => Indicator;
245
300
  };
@@ -1,6 +1,6 @@
1
1
  import type { Extension } from "@codemirror/state";
2
- import type { RequestViewModeOptions } from "../types/request";
3
- import type { ResponseViewModeOptions } 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
5
  import type { HTTPQL, ID } from "../types/utils";
6
6
  /**
@@ -37,12 +37,12 @@ export type SearchSDK = {
37
37
  * Add a custom request view mode.
38
38
  * @param options The view mode options.
39
39
  */
40
- addRequestViewMode: (options: RequestViewModeOptions) => void;
40
+ addRequestViewMode: (options: RequestViewModeOptions<RequestReadableViewModeProps>) => void;
41
41
  /**
42
42
  * Add a custom response view mode.
43
43
  * @param options The view mode options.
44
44
  */
45
- addResponseViewMode: (options: ResponseViewModeOptions) => void;
45
+ addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
46
46
  /**
47
47
  * Scrolls the Search table to a specific request.
48
48
  * @param id The ID of the request to scroll to.
@@ -1,6 +1,6 @@
1
1
  import type { Extension } from "@codemirror/state";
2
- import type { RequestViewModeOptions } from "../types/request";
3
- import type { ResponseViewModeOptions } 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
  /**
@@ -53,12 +53,12 @@ export type SitemapSDK = {
53
53
  * Add a custom request view mode.
54
54
  * @param options The view mode options.
55
55
  */
56
- addRequestViewMode: (options: RequestViewModeOptions) => void;
56
+ addRequestViewMode: (options: RequestViewModeOptions<RequestReadableViewModeProps>) => void;
57
57
  /**
58
58
  * Add a custom response view mode.
59
59
  * @param options The view mode options.
60
60
  */
61
- addResponseViewMode: (options: ResponseViewModeOptions) => void;
61
+ addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
62
62
  /**
63
63
  * Add an indicator to a sitemap session.
64
64
  * Indicators are displayed next to the entry name in the collections tree.
@@ -1,4 +1,4 @@
1
- import type { MessageViewModeOptions } from "../types/websocket";
1
+ import type { MessageViewModeOptions, MessageViewModeProps } from "../types/websocket";
2
2
  /**
3
3
  * Utilities to interact with websockets
4
4
  * @category Websockets
@@ -8,5 +8,5 @@ export type WebsocketSDK = {
8
8
  * Add a custom message view mode.
9
9
  * @param options The view mode options.
10
10
  */
11
- addMessageViewMode: (options: MessageViewModeOptions) => void;
11
+ addMessageViewMode: (options: MessageViewModeOptions<MessageViewModeProps>) => void;
12
12
  };
@@ -1,6 +1,6 @@
1
1
  import type { Editor } from "../types/editor";
2
- import type { ComponentDefinition, ListenerHandle } from "../types/utils";
3
- import { type Dialog, type DialogOptions, type GlobalContext } from "../types/window";
2
+ import type { ListenerHandle } from "../types/utils";
3
+ import { type Dialog, type DialogComponent, type DialogOptions, type GlobalContext } from "../types/window";
4
4
  /**
5
5
  * Utilities to interact with the active page.
6
6
  * @category Window
@@ -34,7 +34,7 @@ export type WindowSDK = {
34
34
  * @param options.closable Whether the close icon is hidden . Defaults to false
35
35
  * @returns A dialog object that can be used to close the dialog.
36
36
  */
37
- showDialog: (component: ComponentDefinition, options?: DialogOptions) => Dialog;
37
+ showDialog: (component: DialogComponent, options?: DialogOptions) => Dialog;
38
38
  /**
39
39
  * Get the current global context.
40
40
  * @returns The current global context.
@@ -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";
@@ -0,0 +1,22 @@
1
+ import { type API } from "../sdks";
2
+ /**
3
+ * The internal props for the command palette view.
4
+ * @category Command Palette
5
+ */
6
+ export type CommandPaletteViewPropsInternal = {
7
+ /**
8
+ * The function to call when the command palette is closed.
9
+ */
10
+ onClose: () => void;
11
+ /**
12
+ * The function to call when the command palette is backed.
13
+ */
14
+ onBack: () => void;
15
+ };
16
+ /**
17
+ * The props for the command palette view.
18
+ * @category Command Palette
19
+ */
20
+ export type CommandPaletteViewProps = CommandPaletteViewPropsInternal & {
21
+ sdk: API;
22
+ };
@@ -1,4 +1,4 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
2
2
  import { type HTTPQL, type ID, type Selection } from "./utils";
3
3
  /**
4
4
  * Represents a filter.
@@ -42,9 +42,8 @@ export type FilterSlot = (typeof FilterSlot)[keyof typeof FilterSlot];
42
42
  * Content that can be added to filter slots.
43
43
  * @category Filter
44
44
  */
45
- export type FilterSlotContent = {
46
- [FilterSlot.UpdateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
47
- [FilterSlot.CreateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
45
+ export type FilterSlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = {
46
+ [K in FilterSlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
48
47
  };
49
48
  /**
50
49
  * Event fired when the current filter changes.
@@ -1,4 +1,4 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
2
2
  /**
3
3
  * The slots in the Footer UI.
4
4
  * @category Footer
@@ -12,7 +12,6 @@ export type FooterSlot = (typeof FooterSlot)[keyof typeof FooterSlot];
12
12
  * Content that can be added to footer slots.
13
13
  * @category Footer
14
14
  */
15
- export type FooterSlotContent = {
16
- [FooterSlot.FooterSlotPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
17
- [FooterSlot.FooterSlotSecondary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
15
+ export type FooterSlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = {
16
+ [K in FooterSlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
18
17
  };
@@ -1,4 +1,4 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
2
2
  import { type ID, type Selection } from "./utils";
3
3
  /**
4
4
  * The slots in the HTTP History UI.
@@ -11,8 +11,12 @@ export declare const HTTPHistorySlot: {
11
11
  readonly ToolbarPrimary: "toolbar-primary";
12
12
  };
13
13
  export type HTTPHistorySlot = (typeof HTTPHistorySlot)[keyof typeof HTTPHistorySlot];
14
- export type HTTPHistorySlotContent = {
15
- [HTTPHistorySlot.ToolbarPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
14
+ /**
15
+ * Content that can be added to HTTP history slots.
16
+ * @category HTTP History
17
+ */
18
+ export type HTTPHistorySlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = {
19
+ [K in HTTPHistorySlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
16
20
  };
17
21
  /**
18
22
  * HTTP history page context.
@@ -0,0 +1,3 @@
1
+ export type HTTPQLEditorProps = {
2
+ isReadOnly?: boolean;
3
+ };
@@ -1,4 +1,4 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
2
2
  import { type HTTPQL, type ID, type Selection } from "./utils";
3
3
  /**
4
4
  * A rule in Match and Replace.
@@ -448,9 +448,8 @@ export type MatchReplaceSlot = (typeof MatchReplaceSlot)[keyof typeof MatchRepla
448
448
  * Content that can be added to match and replace slots.
449
449
  * @category Match and Replace
450
450
  */
451
- export type MatchReplaceSlotContent = {
452
- [MatchReplaceSlot.UpdateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
453
- [MatchReplaceSlot.CreateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
451
+ export type MatchReplaceSlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = {
452
+ [K in MatchReplaceSlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
454
453
  };
455
454
  /**
456
455
  * Event fired when the current match and replace rule changes.
@@ -1,5 +1,5 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
2
- import { type ID, type Selection } from "./utils";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
2
+ import { type AddIndicatorOptions, type ID, type Selection } from "./utils";
3
3
  /**
4
4
  * The connection information to use for the request.
5
5
  * @category Replay
@@ -42,10 +42,12 @@ export declare const ReplaySlot: {
42
42
  readonly Topbar: "topbar";
43
43
  };
44
44
  export type ReplaySlot = (typeof ReplaySlot)[keyof typeof ReplaySlot];
45
- export type ReplaySlotContent = {
46
- [ReplaySlot.SessionToolbarPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
47
- [ReplaySlot.SessionToolbarSecondary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
48
- [ReplaySlot.Topbar]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
45
+ /**
46
+ * Content that can be added to replay slots.
47
+ * @category Replay
48
+ */
49
+ export type ReplaySlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = {
50
+ [K in ReplaySlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
49
51
  };
50
52
  /**
51
53
  * Options for opening a tab.
@@ -206,6 +208,35 @@ export type ReplayPageContext = {
206
208
  kind: "Replay";
207
209
  selection: Selection<ReplaySessionId>;
208
210
  };
211
+ /**
212
+ * Options for adding an indicator to a replay session.
213
+ * @category Replay
214
+ */
215
+ export type AddSessionIndicatorOptions = AddIndicatorOptions & {
216
+ /**
217
+ * Includes the indicator icon on the session's replay tab.
218
+ * @default false
219
+ */
220
+ showTabIcon?: boolean;
221
+ };
222
+ /**
223
+ * Options for adding an indicator to a replay collection.
224
+ * @category Replay
225
+ */
226
+ export type AddCollectionIndicatorOptions = AddIndicatorOptions;
227
+ /**
228
+ * The kind of a replay session.
229
+ * @category Replay
230
+ */
231
+ export declare const ReplaySessionKind: {
232
+ readonly Http: "HTTP";
233
+ readonly Ws: "WS";
234
+ };
235
+ /**
236
+ * The kind of a replay session.
237
+ * @category Replay
238
+ */
239
+ export type ReplaySessionKind = (typeof ReplaySessionKind)[keyof typeof ReplaySessionKind];
209
240
  /**
210
241
  * A unique replay session identifier.
211
242
  * @category Replay