@alwaysmeticulous/api 2.214.0 → 2.217.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
@@ -10,7 +10,7 @@ export { Cookie, SessionData, UrlHistoryEvent, WindowData, ApplicationSpecificDa
10
10
  export { SequenceNumber, WebSocketConnectionData, WebSocketConnectionEvent, WebSocketConnectionCreatedEvent, WebSocketConnectionOpenedEvent, EncodedArrayBuffer, EncodedBlob, WebSocketConnectionMessageEvent, WebSocketConnectionErrorEvent, WebSocketConnectionClosedEvent, } from "./sdk-bundle-api/sdk-to-bundle/websocket-data";
11
11
  export { Replay } from "./replay/replay.types";
12
12
  export { ScreenshotAssertionsOptions, ScreenshotAssertionsEnabledOptions, ScreenshottingEnabledOptions, StoryboardOptions, ScreenshotDiffOptions, ElementToIgnore, CSSSelectorToIgnore, } from "./sdk-bundle-api/sdk-to-bundle/screenshotting-options";
13
- export { NetworkStubbingMode, StubAllRequests, StubNonSSRRequests, NoStubbing, CustomStubbing, RequestFilter, CustomTransformation, } from "./sdk-bundle-api/sdk-to-bundle/network-stubbing";
13
+ export { NetworkStubbingMode, StubAllRequests, StubNonSSRRequests, NoStubbing, CustomStubbing, RequestFilter, CustomTransformation, CustomTransformationWhere, } from "./sdk-bundle-api/sdk-to-bundle/network-stubbing";
14
14
  export { ConsoleMessageWithStackTracePointer, VirtualTimeChange, MeticulousConsoleMessage, ApplicationConsoleMessage, ConsoleMessageCoreData, ConsoleMessageType, ConsoleMessageLocation, } from "./sdk-bundle-api/bundle-to-sdk/console-message";
15
15
  export { InjectableRequestHeader, StaticHeaderValue, DynamicHeaderValue, AllRequests, AppUrlRequestsOnly, CustomRequests, } from "./sdk-bundle-api/sdk-to-bundle/header-injection";
16
16
  export { ConsoleErrorDivergenceIndicator, Divergence, DivergenceConsoleError, DivergenceIndicator, InitialNavigationDivergenceIndicator, NetworkActivityDivergenceIndicator, ScreenshotDivergenceIdentifier, UrlChangeEventDivergenceIndicator, UserEventDivergenceIndicator, } from "./sdk-bundle-api/bundle-to-sdk/replay-divergence";
@@ -1,7 +1,15 @@
1
1
  export type NetworkStubbingMode = StubAllRequests | StubNonSSRRequests | CustomStubbing;
2
2
  interface NetworkStubbingBase {
3
3
  /**
4
- * When looking for a request to use as a stub, these transformations will be applied to the request before any other transformations.
4
+ * When looking for a request to use as a stub, these transformations will be applied to the request first.
5
+ * If not defined, the default identity transformation will be used (i.e., exact matching of the request).
6
+ * These transformations take precedence over any other transformations.
7
+ * They will be applied in the order they are defined.
8
+ */
9
+ identityRequestTransformations?: CustomTransformation[];
10
+ /**
11
+ * When looking for a request to use as a stub, these transformations will be applied after the identity transformations.
12
+ * These transformations are applied in addition to (and after) any identity transformations.
5
13
  * They will be applied in the order they are defined.
6
14
  */
7
15
  customRequestTransformations?: CustomTransformation[];
@@ -57,6 +65,7 @@ interface CustomTransformationBase {
57
65
  */
58
66
  replacement: string;
59
67
  requestComponent: keyof TransformableRequestData;
68
+ where?: CustomTransformationWhere;
60
69
  }
61
70
  type TransformableUrlFields = keyof Pick<URL, "hash" | "host" | "hostname" | "href" | "password" | "pathname" | "port" | "protocol" | "search" | "username">;
62
71
  interface CustomUrlTransformation extends CustomTransformationBase {
@@ -67,4 +76,5 @@ interface CustomRequestTransformation extends CustomTransformationBase {
67
76
  requestComponent: keyof Omit<TransformableRequestData, "url">;
68
77
  }
69
78
  export type CustomTransformation = CustomRequestTransformation | CustomUrlTransformation;
79
+ export type CustomTransformationWhere = Omit<CustomRequestTransformation, "replacement"> | Omit<CustomUrlTransformation, "replacement">;
70
80
  export {};
@@ -231,7 +231,12 @@ export declare enum CustomDataSingletonInternalKey {
231
231
  * The email address of the logged in user. This must be set by the recording application
232
232
  * by calling `window.Meticulous.record.recordUserEmail(email)`.
233
233
  */
234
- UserEmail = "met-user-email"
234
+ UserEmail = "met-user-email",
235
+ /**
236
+ * The user agent of the browser the session was recorded on. As returned by `navigator.userAgent`.
237
+ * Present on recordings since ~May 2025.
238
+ */
239
+ UserAgent = "met-user-agent"
235
240
  }
236
241
  export type CustomDataSingletonInternalValues = {
237
242
  [CustomDataSingletonInternalKey.SystemThemePreferredColor]: "light" | "dark";
@@ -239,6 +244,7 @@ export type CustomDataSingletonInternalValues = {
239
244
  [CustomDataSingletonInternalKey.Languages]: string;
240
245
  [CustomDataSingletonInternalKey.UserId]: string;
241
246
  [CustomDataSingletonInternalKey.UserEmail]: string;
247
+ [CustomDataSingletonInternalKey.UserAgent]: string;
242
248
  };
243
249
  export type CustomData = {
244
250
  singletons: Record<string, string> & Partial<CustomDataSingletonInternalValues>;
@@ -28,5 +28,10 @@ var CustomDataSingletonInternalKey;
28
28
  * by calling `window.Meticulous.record.recordUserEmail(email)`.
29
29
  */
30
30
  CustomDataSingletonInternalKey["UserEmail"] = "met-user-email";
31
+ /**
32
+ * The user agent of the browser the session was recorded on. As returned by `navigator.userAgent`.
33
+ * Present on recordings since ~May 2025.
34
+ */
35
+ CustomDataSingletonInternalKey["UserAgent"] = "met-user-agent";
31
36
  })(CustomDataSingletonInternalKey = exports.CustomDataSingletonInternalKey || (exports.CustomDataSingletonInternalKey = {}));
32
37
  //# sourceMappingURL=session-data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-data.js","sourceRoot":"","sources":["../../../src/sdk-bundle-api/sdk-to-bundle/session-data.ts"],"names":[],"mappings":";;;AA2OA,IAAY,8BA8BX;AA9BD,WAAY,8BAA8B;IACxC,gGAA8D,CAAA;IAE9D;;;;;OAKG;IACH,oEAAkC,CAAA;IAElC;;;;;OAKG;IACH,6DAA2B,CAAA;IAE3B;;;OAGG;IACH,wDAAsB,CAAA;IAEtB;;;OAGG;IACH,8DAA4B,CAAA;AAC9B,CAAC,EA9BW,8BAA8B,GAA9B,sCAA8B,KAA9B,sCAA8B,QA8BzC"}
1
+ {"version":3,"file":"session-data.js","sourceRoot":"","sources":["../../../src/sdk-bundle-api/sdk-to-bundle/session-data.ts"],"names":[],"mappings":";;;AA2OA,IAAY,8BAoCX;AApCD,WAAY,8BAA8B;IACxC,gGAA8D,CAAA;IAE9D;;;;;OAKG;IACH,oEAAkC,CAAA;IAElC;;;;;OAKG;IACH,6DAA2B,CAAA;IAE3B;;;OAGG;IACH,wDAAsB,CAAA;IAEtB;;;OAGG;IACH,8DAA4B,CAAA;IAE5B;;;OAGG;IACH,8DAA4B,CAAA;AAC9B,CAAC,EApCW,8BAA8B,GAA9B,sCAA8B,KAA9B,sCAA8B,QAoCzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/api",
3
- "version": "2.214.0",
3
+ "version": "2.217.0",
4
4
  "description": "Meticulous API types",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -35,5 +35,5 @@
35
35
  "bugs": {
36
36
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
37
37
  },
38
- "gitHead": "5b1e71ac1f70ef9468b916c96e34a433370e0e3e"
38
+ "gitHead": "59ed023e008f2ca41ece40339690e775702861b4"
39
39
  }