@caido/sdk-frontend 0.57.1-beta.9 → 0.57.1

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,10 @@
1
1
  export { FooterSlot, type FooterSlotContent } from "./types/footer";
2
- export type { DialogOptions, DialogComponent } from "./types/window";
2
+ export type { DialogOptions } from "./types/window";
3
3
  export type { _AnalyticsSDK } from "./private/analytics";
4
- export type { MessageViewModeOptions, StreamWsMessageMeta, MessageViewModePropsInternal, MessageViewModeProps, } from "./types/websocket";
4
+ export type { MessageViewModeOptions, StreamWsMessageMeta, } from "./types/websocket";
5
5
  export type { CommandContext, CommandContextRequest, CommandContextRequestRow, CommandContextResponse, CommandContextBase, } from "./types/commands";
6
6
  export type { MenuItem } from "./types/menu";
7
- 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";
7
+ export { type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
8
8
  export type { AutomateSession, AutomateEntry } from "./types/automate";
9
9
  export type { SitemapEntry, SitemapRootEntry, ChildState, } from "./types/sitemap";
10
10
  export { SearchSlot, type SearchSlotContent } from "./types/search";
@@ -12,9 +12,9 @@ export type { HostedFile } from "./types/files";
12
12
  export { FilterSlot, type Filter, type FilterSlotContent, type CurrentFilterChangeEvent, } from "./types/filter";
13
13
  export type { HTTPQL, StreamQL, ID, ComponentDefinition, Selection, QueryInput, } from "./types/utils";
14
14
  export type { JSONValue, JSONCompatible } from "./types/json";
15
- export type { SlotContent, ButtonSlotContent, CustomSlotContent, CommandSlotContent, SlotContentPropsInternal, SlotContentProps, } from "./types/slots";
16
- export type { RequestViewModeOptions, RequestWritableViewModeProps, RequestReadableViewModeProps, RequestReadableViewModePropsInternal, RequestWritableViewModePropsInternal, RequestViewModeProps, RequestFull, RequestDraft, RequestMeta, } from "./types/request";
17
- export type { ResponseViewModePropsInternal, ResponseViewModeOptions, ResponseViewModeProps, ResponseFull, } from "./types/response";
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";
18
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";
19
19
  export { MatchReplaceSlot, type MatchReplaceSlotContent, } from "./types/matchReplace";
20
20
  export { ScopeSlot, type CurrentScopeChangeEvent, type Scope, type ScopeSlotContent, } from "./types/scopes";
@@ -22,10 +22,9 @@ export { HTTPHistorySlot, type HTTPHistorySlotContent, } from "./types/httpHisto
22
22
  export { SettingsSlot, type SettingsSlotContent, type SettingsPluginSlotContent, } from "./types/settings";
23
23
  export type { EnvironmentVariable } from "./types/environment";
24
24
  export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkflowCallback, OnDeletedWorkflowCallback, } from "./types/workflows";
25
- export type { ListenerHandle, AddIndicatorOptions, Indicator, ComponentProps, ComponentPropsWithSdk, } from "./types/utils";
25
+ export type { ListenerHandle, AddIndicatorOptions, Indicator, } from "./types/utils";
26
26
  export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderId, AIUpstreamProviderStatus, } from "./types/ai";
27
27
  export type { SelectedProjectChangeEvent } from "./types/projects";
28
- export type { CommandPaletteViewProps, CommandPaletteViewPropsInternal, } from "./types/commandPalette";
29
28
  export type { CommandPaletteView } from "./sdks/commandPalette";
30
29
  export type { LogSDK } from "./sdks/log";
31
30
  export type { API } from "./sdks";
@@ -43,6 +42,7 @@ export type { FindingsPageContext } from "./types/findings";
43
42
  export type { HTTPHistoryPageContext } from "./types/httpHistory";
44
43
  export type { InterceptPageContext } from "./types/intercept";
45
44
  export type { ProjectsPageContext } from "./types/projects";
45
+ export type { ReplayPageContext } from "./types/replay";
46
46
  export type { ScopePageContext } from "./types/scopes";
47
47
  export type { SearchPageContext } from "./types/search";
48
48
  export type { SitemapPageContext } from "./types/sitemap";
@@ -1,7 +1,7 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import type { AutomateEntry, AutomateSession } from "../types/automate";
3
- import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
- import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
3
+ import type { RequestViewModeOptions } from "../types/request";
4
+ import type { ResponseViewModeOptions } 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<RequestReadableViewModeProps>) => void;
20
+ addRequestViewMode: (options: RequestViewModeOptions) => 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<ResponseViewModeProps>) => void;
25
+ addResponseViewMode: (options: ResponseViewModeOptions) => void;
26
26
  /**
27
27
  * Get the list of all automate sessions.
28
28
  * @returns The list of all automate sessions.
@@ -1,4 +1,3 @@
1
- import { type CommandPaletteViewProps } from "../types/commandPalette";
2
1
  import { type CommandID } from "../types/commands";
3
2
  import { type ComponentDefinition } from "../types/utils";
4
3
  /**
@@ -7,7 +6,7 @@ import { type ComponentDefinition } from "../types/utils";
7
6
  */
8
7
  export type CommandPaletteView = {
9
8
  type: "Custom";
10
- definition: ComponentDefinition<CommandPaletteViewProps>;
9
+ definition: ComponentDefinition;
11
10
  };
12
11
  /**
13
12
  * Utilities to interact with the command palette.
@@ -1,5 +1,5 @@
1
+ import { type ListenerHandle } from "src/types/utils";
1
2
  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 { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
- import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
3
+ import type { RequestViewModeOptions } from "../types/request";
4
+ import type { ResponseViewModeOptions } 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<RequestReadableViewModeProps>) => void;
36
+ addRequestViewMode: (options: RequestViewModeOptions) => 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<ResponseViewModeProps>) => void;
41
+ addResponseViewMode: (options: ResponseViewModeOptions) => 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 { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
4
- import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
3
+ import type { RequestViewModeOptions } from "../types/request";
4
+ import type { ResponseViewModeOptions } 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<RequestReadableViewModeProps>) => void;
46
+ addRequestViewMode: (options: RequestViewModeOptions) => 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<ResponseViewModeProps>) => void;
51
+ addResponseViewMode: (options: ResponseViewModeOptions) => 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,23 +39,6 @@ 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
- * ```
59
42
  */
60
43
  graphql: GraphqlSDK;
61
44
  /**
@@ -1,5 +1,5 @@
1
- import type { RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
2
- import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
1
+ import type { RequestViewModeOptions } from "../types/request";
2
+ import type { ResponseViewModeOptions } 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<RequestWritableViewModeProps>) => void;
23
+ addRequestViewMode: (options: RequestViewModeOptions) => 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<ResponseViewModeProps>) => void;
28
+ addResponseViewMode: (options: ResponseViewModeOptions) => void;
29
29
  };
@@ -1,9 +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 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";
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";
5
5
  import { type DefineAddToSlotFn } from "../types/slots";
6
- import type { ID, Indicator, ListenerHandle } from "../types/utils";
6
+ import type { AddIndicatorOptions, ID, Indicator, ListenerHandle } from "../types/utils";
7
7
  /**
8
8
  * Utilities to interact with Replay.
9
9
  * @category Replay
@@ -27,13 +27,9 @@ export type ReplaySDK = {
27
27
  getTabs: () => ReplayTab[];
28
28
  /**
29
29
  * Get the list of all replay sessions.
30
- * @param options The options for getting the sessions.
31
- * @param options.collectionId The ID of the collection to get the sessions for.
32
30
  * @returns The list of all replay sessions.
33
31
  */
34
- getSessions: (options?: {
35
- collectionId?: ID;
36
- }) => ReplaySession[];
32
+ getSessions: () => ReplaySession[];
37
33
  /**
38
34
  * Get the currently selected replay session.
39
35
  * @returns The currently selected replay session, or undefined if no session is selected.
@@ -48,20 +44,6 @@ export type ReplaySDK = {
48
44
  * ```
49
45
  */
50
46
  getCurrentSession: () => ReplaySession | undefined;
51
- /**
52
- * Get the entry currently displayed in the active replay session.
53
- * @returns The active entry, or undefined if no entry is currently loaded.
54
- * @example
55
- * ```ts
56
- * const currentEntry = sdk.replay.getCurrentEntry();
57
- * if (currentEntry) {
58
- * console.log(`Currently viewing entry ${currentEntry.id}`);
59
- * } else {
60
- * console.log("No entry is currently displayed");
61
- * }
62
- * ```
63
- */
64
- getCurrentEntry: () => ReplayEntry | undefined;
65
47
  /**
66
48
  * Rename a session.
67
49
  * @param id The ID of the session to rename.
@@ -83,22 +65,10 @@ export type ReplaySDK = {
83
65
  deleteSessions: (sessionIds: ID[]) => Promise<ID[]>;
84
66
  /**
85
67
  * Create a session.
86
- * @param source The source of the session to create.
87
- * @param collectionId The ID of the collection to add the session to.
88
- * @example
89
- * ```ts
90
- * sdk.replay.createSession({
91
- * type: "Raw",
92
- * raw: "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n",
93
- * connectionInfo: {
94
- * host: "example.com",
95
- * port: 443,
96
- * isTLS: true,
97
- * },
98
- * });
99
- * ```
68
+ * @param sessionId The ID of the request to add.
69
+ * @param collectionId The ID of the collection to add the request.
100
70
  */
101
- createSession: (source: RequestSource, collectionId?: ID, sessionKind?: ReplaySessionKind) => Promise<ReplaySession>;
71
+ createSession: (source: RequestSource, collectionId?: ID) => Promise<void>;
102
72
  /**
103
73
  * Get the list of all replay collections.
104
74
  * @returns The list of all replay collections.
@@ -159,12 +129,12 @@ export type ReplaySDK = {
159
129
  * Add a custom view mode for requests.
160
130
  * @param options The view mode options.
161
131
  */
162
- addRequestViewMode: (options: RequestViewModeOptions<RequestWritableViewModeProps>) => void;
132
+ addRequestViewMode: (options: RequestViewModeOptions) => void;
163
133
  /**
164
134
  * Add a custom response view mode.
165
135
  * @param options The view mode options.
166
136
  */
167
- addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
137
+ addResponseViewMode: (options: ResponseViewModeOptions) => void;
168
138
  /**
169
139
  * Send a request to the Replay backend.
170
140
  * @param request The request to send.
@@ -265,30 +235,11 @@ export type ReplaySDK = {
265
235
  * const indicator = sdk.replay.addSessionIndicator(sessionId, {
266
236
  * icon: "fas fa-exclamation-triangle",
267
237
  * description: "Security warning",
268
- * showTabIcon: true,
269
- * });
270
- *
271
- * // Later, remove the indicator
272
- * indicator.remove();
273
- *
274
- */
275
- addSessionIndicator: (sessionId: ID, indicator: AddSessionIndicatorOptions) => Indicator;
276
- /**
277
- * Add an indicator to a replay collection.
278
- * Indicators are displayed next to the collection name in the collections tree.
279
- * @param collectionId The ID of the collection to add the indicator to.
280
- * @param indicator The indicator configuration.
281
- * @returns A handle object with a `remove` method to remove the indicator.
282
- * @example
283
- *
284
- * const indicator = sdk.replay.addCollectionIndicator(collectionId, {
285
- * icon: "fas fa-folder-open",
286
- * description: "Has unresolved findings",
287
238
  * });
288
239
  *
289
240
  * // Later, remove the indicator
290
241
  * indicator.remove();
291
242
  *
292
243
  */
293
- addCollectionIndicator: (collectionId: ID, indicator: AddCollectionIndicatorOptions) => Indicator;
244
+ addSessionIndicator: (sessionId: ID, indicator: AddIndicatorOptions) => Indicator;
294
245
  };
@@ -1,6 +1,6 @@
1
1
  import type { Extension } from "@codemirror/state";
2
- import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
3
- import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
2
+ import type { RequestViewModeOptions } from "../types/request";
3
+ import type { ResponseViewModeOptions } 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<RequestReadableViewModeProps>) => void;
40
+ addRequestViewMode: (options: RequestViewModeOptions) => 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<ResponseViewModeProps>) => void;
45
+ addResponseViewMode: (options: ResponseViewModeOptions) => 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 { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
3
- import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
2
+ import type { RequestViewModeOptions } from "../types/request";
3
+ import type { ResponseViewModeOptions } 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<RequestReadableViewModeProps>) => void;
56
+ addRequestViewMode: (options: RequestViewModeOptions) => 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<ResponseViewModeProps>) => void;
61
+ addResponseViewMode: (options: ResponseViewModeOptions) => 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, MessageViewModeProps } from "../types/websocket";
1
+ import type { MessageViewModeOptions } 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<MessageViewModeProps>) => void;
11
+ addMessageViewMode: (options: MessageViewModeOptions) => void;
12
12
  };
@@ -1,6 +1,6 @@
1
1
  import type { Editor } from "../types/editor";
2
- import type { ListenerHandle } from "../types/utils";
3
- import { type Dialog, type DialogComponent, type DialogOptions, type GlobalContext } from "../types/window";
2
+ import type { ComponentDefinition, ListenerHandle } from "../types/utils";
3
+ import { type Dialog, 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: DialogComponent, options?: DialogOptions) => Dialog;
37
+ showDialog: (component: ComponentDefinition, options?: DialogOptions) => Dialog;
38
38
  /**
39
39
  * Get the current global context.
40
40
  * @returns The current global context.
@@ -1,4 +1,4 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
2
2
  import { type HTTPQL, type ID, type Selection } from "./utils";
3
3
  /**
4
4
  * Represents a filter.
@@ -42,8 +42,9 @@ 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<TProps extends SlotContentPropsGroup = SlotContentProps> = {
46
- [K in FilterSlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
45
+ export type FilterSlotContent = {
46
+ [FilterSlot.UpdateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
47
+ [FilterSlot.CreateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
47
48
  };
48
49
  /**
49
50
  * Event fired when the current filter changes.
@@ -1,4 +1,4 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
2
2
  /**
3
3
  * The slots in the Footer UI.
4
4
  * @category Footer
@@ -12,6 +12,7 @@ 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<TProps extends SlotContentPropsGroup = SlotContentProps> = {
16
- [K in FooterSlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
15
+ export type FooterSlotContent = {
16
+ [FooterSlot.FooterSlotPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
17
+ [FooterSlot.FooterSlotSecondary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
17
18
  };
@@ -1,4 +1,4 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
2
2
  import { type ID, type Selection } from "./utils";
3
3
  /**
4
4
  * The slots in the HTTP History UI.
@@ -11,12 +11,8 @@ export declare const HTTPHistorySlot: {
11
11
  readonly ToolbarPrimary: "toolbar-primary";
12
12
  };
13
13
  export type HTTPHistorySlot = (typeof HTTPHistorySlot)[keyof typeof HTTPHistorySlot];
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;
14
+ export type HTTPHistorySlotContent = {
15
+ [HTTPHistorySlot.ToolbarPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
20
16
  };
21
17
  /**
22
18
  * HTTP history page context.
@@ -1,4 +1,4 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
2
2
  import { type HTTPQL, type ID, type Selection } from "./utils";
3
3
  /**
4
4
  * A rule in Match and Replace.
@@ -448,8 +448,9 @@ 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<TProps extends SlotContentPropsGroup = SlotContentProps> = {
452
- [K in MatchReplaceSlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
451
+ export type MatchReplaceSlotContent = {
452
+ [MatchReplaceSlot.UpdateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
453
+ [MatchReplaceSlot.CreateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
453
454
  };
454
455
  /**
455
456
  * Event fired when the current match and replace rule changes.
@@ -1,5 +1,5 @@
1
- import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
2
- import { type AddIndicatorOptions, type ID, type Selection } from "./utils";
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
2
+ import { type ID, type Selection } from "./utils";
3
3
  /**
4
4
  * The connection information to use for the request.
5
5
  * @category Replay
@@ -42,12 +42,10 @@ export declare const ReplaySlot: {
42
42
  readonly Topbar: "topbar";
43
43
  };
44
44
  export type ReplaySlot = (typeof ReplaySlot)[keyof typeof ReplaySlot];
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;
45
+ export type ReplaySlotContent = {
46
+ [ReplaySlot.SessionToolbarPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
47
+ [ReplaySlot.SessionToolbarSecondary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
48
+ [ReplaySlot.Topbar]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
51
49
  };
52
50
  /**
53
51
  * Options for opening a tab.
@@ -208,35 +206,6 @@ export type ReplayPageContext = {
208
206
  kind: "Replay";
209
207
  selection: Selection<ReplaySessionId>;
210
208
  };
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];
240
209
  /**
241
210
  * A unique replay session identifier.
242
211
  * @category Replay
@@ -1,5 +1,3 @@
1
- import { type EditorView } from "@codemirror/view";
2
- import { type API } from "../sdks";
3
1
  import { type As, type ComponentDefinition, type ID, type Prettify } from "./utils";
4
2
  /**
5
3
  * A draft request that has not yet been saved to the database.
@@ -40,47 +38,11 @@ export type RequestFull = Prettify<As<"RequestFull"> & {
40
38
  streamId: ID | undefined;
41
39
  raw: string;
42
40
  }>;
43
- /**
44
- * The internal props for the request read-only view mode.
45
- * @category Request
46
- */
47
- export type RequestReadableViewModePropsInternal = {
48
- request: RequestFull;
49
- view: EditorView;
50
- };
51
- /**
52
- * The internal props for the request writable view mode.
53
- * @category Request
54
- */
55
- export type RequestWritableViewModePropsInternal = {
56
- request: RequestFull | undefined;
57
- draft: RequestDraft;
58
- view: EditorView;
59
- };
60
- /**
61
- * The props for the request writable view mode.
62
- * @category Request
63
- */
64
- export type RequestWritableViewModeProps = RequestWritableViewModePropsInternal & {
65
- sdk: API;
66
- };
67
- /**
68
- * The props for the request read-only view mode.
69
- * @category Request
70
- */
71
- export type RequestReadableViewModeProps = RequestReadableViewModePropsInternal & {
72
- sdk: API;
73
- };
74
- /**
75
- * The props group for the request view mode.
76
- * @category Request
77
- */
78
- export type RequestViewModeProps = RequestReadableViewModeProps | RequestWritableViewModeProps | RequestReadableViewModePropsInternal | RequestWritableViewModePropsInternal;
79
41
  /**
80
42
  * Options for defining a custom request view mode.
81
43
  * @category Request
82
44
  */
83
- export type RequestViewModeOptions<TProps extends RequestViewModeProps> = {
45
+ export type RequestViewModeOptions = {
84
46
  /**
85
47
  * The label of the view mode.
86
48
  */
@@ -88,7 +50,7 @@ export type RequestViewModeOptions<TProps extends RequestViewModeProps> = {
88
50
  /**
89
51
  * The component to render when the view mode is selected.
90
52
  */
91
- view: ComponentDefinition<TProps>;
53
+ view: ComponentDefinition;
92
54
  /**
93
55
  * A function that determines if the view mode should be shown for a given request.
94
56
  */
@@ -1,5 +1,3 @@
1
- import { type EditorView } from "@codemirror/view";
2
- import { type API } from "../sdks";
3
1
  import type { RequestFull, RequestMeta } from "./request";
4
2
  import type { As, ComponentDefinition, ID, Prettify } from "./utils";
5
3
  /**
@@ -14,26 +12,11 @@ export type ResponseFull = Prettify<As<"ResponseFull"> & {
14
12
  length: number;
15
13
  createdAt: Date;
16
14
  }>;
17
- /**
18
- * The internal props for the response view mode.
19
- * @category Response
20
- */
21
- export type ResponseViewModePropsInternal = {
22
- response: ResponseFull;
23
- view: EditorView;
24
- };
25
- /**
26
- * The props for the response view mode.
27
- * @category Response
28
- */
29
- export type ResponseViewModeProps = ResponseViewModePropsInternal & {
30
- sdk: API;
31
- };
32
15
  /**
33
16
  * Options for defining a custom response view mode.
34
17
  * @category Response
35
18
  */
36
- export type ResponseViewModeOptions<TProps extends ResponseViewModeProps | ResponseViewModePropsInternal> = {
19
+ export type ResponseViewModeOptions = {
37
20
  /**
38
21
  * The label of the view mode.
39
22
  */
@@ -41,7 +24,7 @@ export type ResponseViewModeOptions<TProps extends ResponseViewModeProps | Respo
41
24
  /**
42
25
  * The component to render when the view mode is selected.
43
26
  */
44
- view: ComponentDefinition<TProps>;
27
+ view: ComponentDefinition;
45
28
  /**
46
29
  * A function that determines if the view mode should be shown for a given response.
47
30
  */