@caido/sdk-frontend 0.56.3-beta.1 → 0.57.1-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-frontend",
3
- "version": "0.56.3-beta.1",
3
+ "version": "0.57.1-beta.1",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "repository": "https://github.com/caido/sdk-js/",
@@ -4,7 +4,7 @@ export type { _AnalyticsSDK } from "./private/analytics";
4
4
  export type { MessageViewModeOptions, StreamWsMessageMeta, MessageViewModePropsInternal, MessageViewModeProps, } 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 ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
7
+ export { type AddSessionIndicatorOptions, 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";
@@ -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,9 +1,9 @@
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";
2
+ import { 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
3
  import type { RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
4
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
7
  /**
8
8
  * Utilities to interact with Replay.
9
9
  * @category Replay
@@ -235,11 +235,12 @@ export type ReplaySDK = {
235
235
  * const indicator = sdk.replay.addSessionIndicator(sessionId, {
236
236
  * icon: "fas fa-exclamation-triangle",
237
237
  * description: "Security warning",
238
+ * showTabIcon: true,
238
239
  * });
239
240
  *
240
241
  * // Later, remove the indicator
241
242
  * indicator.remove();
242
243
  *
243
244
  */
244
- addSessionIndicator: (sessionId: ID, indicator: AddIndicatorOptions) => Indicator;
245
+ addSessionIndicator: (sessionId: ID, indicator: AddSessionIndicatorOptions) => Indicator;
245
246
  };
@@ -1,5 +1,5 @@
1
1
  import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
2
- import { type ID, type Selection } from "./utils";
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
@@ -208,6 +208,17 @@ export type ReplayPageContext = {
208
208
  kind: "Replay";
209
209
  selection: Selection<ReplaySessionId>;
210
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
+ };
211
222
  /**
212
223
  * A unique replay session identifier.
213
224
  * @category Replay