@liquidcommercedev/rmn-sdk 1.5.0-beta.26 → 1.5.0-beta.28

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.
@@ -18,11 +18,11 @@ export declare function extractDeepValues(data: unknown, target: ExtractorTarget
18
18
  * 3. Removing leading zeros while preserving single "0"
19
19
  * 4. Filtering out empty/invalid values
20
20
  *
21
- * @param productIds - Array of product IDs that can be either strings or numbers
21
+ * @param ids - Array of product IDs that can be either strings or numbers
22
22
  * @returns Array of cleaned string IDs
23
23
  *
24
24
  * @example
25
25
  * cleanProductIds(["001", " 123 ", 456, "0"]) // ["1", "123", "456", "0"]
26
26
  */
27
- export declare function cleanProductIds(productIds: Array<string | number>): string[];
27
+ export declare function cleanProductIds(ids: Array<string | number>): string[];
28
28
  export {};
@@ -0,0 +1,2 @@
1
+ export * from './example.constant';
2
+ export * from './special-char.constant';
@@ -0,0 +1 @@
1
+ export declare const SPECIAL_CHARACTER_MAPPING: Record<string, string>;
@@ -1,5 +1,6 @@
1
1
  import type { RMN_SPOT_TYPE } from 'enums';
2
2
  export interface ICustomSkeletonElementData {
3
+ spotType: RMN_SPOT_TYPE;
3
4
  fluid: boolean;
4
5
  width: number;
5
6
  height: number;
@@ -8,6 +9,6 @@ export interface ICustomSkeletonElement extends HTMLElement {
8
9
  data: ICustomSkeletonElementData;
9
10
  }
10
11
  export interface ICreateSkeletonElementParams {
11
- fluid: boolean;
12
+ fluid?: boolean;
12
13
  spotType: RMN_SPOT_TYPE;
13
14
  }
@@ -1,2 +1,2 @@
1
1
  import type { ICustomSkeletonElementData } from './skeleton.interface';
2
- export declare function SkeletonTemplate({ fluid, width, height }: ICustomSkeletonElementData): string;
2
+ export declare function SkeletonTemplate({ fluid, width, height, spotType, }: ICustomSkeletonElementData): string;
@@ -1,7 +1,7 @@
1
1
  import type { RMN_SPOT_EVENT } from 'enums';
2
2
  export interface IDataLayerEvent {
3
- event: string;
4
- [key: string]: any;
3
+ event: RMN_SPOT_EVENT;
4
+ products: IProductData[];
5
5
  }
6
6
  export interface INormalizedEventData {
7
7
  event: RMN_SPOT_EVENT;
@@ -15,3 +15,12 @@ export interface IFireAndPublishSpotEventParams {
15
15
  placementId: string;
16
16
  spotId: string;
17
17
  }
18
+ export interface IProductData {
19
+ id: string | number;
20
+ name: string;
21
+ brand: string;
22
+ variant: string;
23
+ price: number;
24
+ quantity: number;
25
+ discount?: number;
26
+ }
@@ -1,12 +1,12 @@
1
- import type { INormalizedEventData } from '../monitor.interface';
1
+ import type { IDataLayerEvent } from '../monitor.interface';
2
2
  export declare class DataLayerMonitor {
3
3
  private static instance;
4
4
  private readonly originalPush;
5
5
  private listener?;
6
6
  private constructor();
7
7
  static getInstance(): DataLayerMonitor;
8
- setListener(listener: (data: INormalizedEventData) => void): void;
8
+ setListener(listener: (data: IDataLayerEvent) => void): void;
9
9
  start(): void;
10
- private cleanEventData;
10
+ private extractProductData;
11
11
  stop(): void;
12
12
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@liquidcommercedev/rmn-sdk",
3
3
  "description": "LiquidCommerce RMN SDK",
4
4
  "author": "LiquidCommerce Tech",
5
- "version": "1.5.0-beta.26",
5
+ "version": "1.5.0-beta.28",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",