@alwaysmeticulous/sdk-bundles-api 2.36.0 → 2.38.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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { RecordConfig, RecordSettings, RecordState } from "./record";
2
2
  export { MeticulousWindowConfig, NetworkResponseSanitizer, } from "./record/record-settings";
3
3
  export { ReplayUserInteractionsResult, ReplayUserInteractionsResultFull, ReplayUserInteractionsResultShort, BeforeUserEventOptions, } from "./replay/bundle-to-sdk/index";
4
- export { BootstrapReplayUserInteractionsFn, BootstrapReplayUserInteractionsOptions, OnReplayTimelineEventFn, ReplayUserInteractionsFn, ReplayUserInteractionsOptions, VirtualTimeOptions, InstallVirtualEventLoopOpts, SetupReplayNetworkStubbingFn, NetworkStubbingOptions, StoryboardOptions, BrowserContextSeedingOptions, SetupBrowserContextSeedingFn, } from "./replay/sdk-to-bundle";
4
+ export { BootstrapReplayUserInteractionsFn, BootstrapReplayUserInteractionsOptions, OnReplayTimelineEventFn, ReplayUserInteractionsFn, ReplayUserInteractionsOptions, VirtualTimeOptions, InstallVirtualEventLoopOpts, SetupReplayNetworkStubbingFn, NetworkStubbingOptions, BrowserContextSeedingOptions, SetupBrowserContextSeedingFn, ScreenshottingOptions, } from "./replay/sdk-to-bundle";
@@ -3,15 +3,23 @@ import type { LogLevelDesc } from "loglevel";
3
3
  import type { Page } from "puppeteer";
4
4
  import { BeforeUserEventOptions, ReplayUserInteractionsResult } from "../bundle-to-sdk";
5
5
  export interface ReplayUserInteractionsOptions {
6
+ /**
7
+ * A semantic version number for the SDK calling into the replay code.
8
+ *
9
+ * This version number is bumped on every API change, and allows the replay
10
+ * code to detect if it's being called by an old version, and if so throw
11
+ * and request the user updates to a newer version.
12
+ */
13
+ sdkSemanticVersion: number;
6
14
  page: Page;
7
15
  sessionData: unknown;
8
16
  moveBeforeClick: boolean;
9
17
  virtualTime?: VirtualTimeOptions;
10
- storyboard?: StoryboardOptions;
11
18
  maxDurationMs?: number;
12
19
  maxEventCount?: number;
13
- sessionDurationMs?: number;
20
+ sessionDurationMs: number;
14
21
  logLevel: LogLevelDesc;
22
+ screenshots: ScreenshottingOptions;
15
23
  onTimelineEvent: OnReplayTimelineEventFn;
16
24
  /**
17
25
  * If present then will be called before executing each next user event,
@@ -19,6 +27,11 @@ export interface ReplayUserInteractionsOptions {
19
27
  */
20
28
  onBeforeUserEvent?: OnBeforeUserEventFn;
21
29
  }
30
+ export interface ScreenshottingOptions {
31
+ screenshotsDirectory: string;
32
+ takeIntermediateScreenshots: boolean;
33
+ takeEndStateScreenshot: boolean;
34
+ }
22
35
  /** Replay function for user interaction events */
23
36
  export type ReplayUserInteractionsFn = (options: ReplayUserInteractionsOptions) => Promise<ReplayUserInteractionsResult>;
24
37
  export interface BootstrapReplayUserInteractionsOptions {
@@ -31,13 +44,6 @@ export type VirtualTimeOptions = {
31
44
  } | {
32
45
  enabled: true;
33
46
  };
34
- /** Options for capturing a storyboard made of screenshots during replay */
35
- export type StoryboardOptions = {
36
- enabled: false;
37
- } | {
38
- enabled: true;
39
- screenshotsDir: string;
40
- };
41
47
  export type OnReplayTimelineEventFn = (entry: SDKReplayTimelineEntry) => void;
42
48
  export type OnBeforeUserEventFn = (options: BeforeUserEventOptions) => Promise<void>;
43
49
  export interface NetworkStubbingOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/sdk-bundles-api",
3
- "version": "2.36.0",
3
+ "version": "2.38.0",
4
4
  "description": "Meticulous common types",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "lint:fix": "eslint src --ext=ts,tsx,js --cache --fix"
19
19
  },
20
20
  "devDependencies": {
21
- "@alwaysmeticulous/api": "^2.36.0"
21
+ "@alwaysmeticulous/api": "^2.37.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "loglevel": "^1.8.0",
@@ -49,5 +49,5 @@
49
49
  "bugs": {
50
50
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
51
51
  },
52
- "gitHead": "fda3a87f90ef42bab4f7e51620494083e95c4b5e"
52
+ "gitHead": "2c4fbc9225d5e0dc09f14a1e90a67008a5e3f376"
53
53
  }