@liquidcommercedev/rmn-sdk 1.5.0-beta.27 → 1.5.0-beta.29

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>;
@@ -9,6 +9,6 @@ export interface ICustomSkeletonElement extends HTMLElement {
9
9
  data: ICustomSkeletonElementData;
10
10
  }
11
11
  export interface ICreateSkeletonElementParams {
12
- fluid: boolean;
12
+ fluid?: boolean;
13
13
  spotType: RMN_SPOT_TYPE;
14
14
  }
@@ -1,4 +1,5 @@
1
1
  import { RMN_EVENT } from 'enums';
2
+ import type { ISpot } from 'modules/selection';
2
3
  import type { ILifecycleState, IRegisterSpotParams, IRmnEventMap } from './event.interface';
3
4
  export declare class EventService {
4
5
  private static instance;
@@ -23,6 +24,7 @@ export declare class EventService {
23
24
  * @returns {void}
24
25
  */
25
26
  handleSpotState(placementId: string, updates: Partial<ILifecycleState>, publish?: boolean): void;
27
+ saveSpotDataToLocalStorage(placementId: string, spot: ISpot): void;
26
28
  private handleClickEvent;
27
29
  private handleImpressionEvent;
28
30
  private getSpotIdByPlacementId;
@@ -25,6 +25,14 @@ export declare class LiquidCommerceRmnClient implements IRmnClient {
25
25
  spotSelection(params: ISpotSelectionParams): Promise<ISpots | {
26
26
  error: string;
27
27
  }>;
28
+ /**
29
+ * Publishes the spot data for a given placement ID to the RMN.
30
+ *
31
+ * @param {string} placementId - The unique identifier for the placement.
32
+ * @param {ISpot} spot - The spot data.
33
+ * @return {void} - Does not return any value.
34
+ */
35
+ publishSpotToRmn(placementId: string, spot: ISpot): void;
28
36
  /**
29
37
  * Injects the spot elements into their provided placement.
30
38
  *
@@ -6,11 +6,12 @@ export { ISpot, ISpotEvent, ISpotSelectionParams } from 'modules/selection';
6
6
  import type { RMN_ENV, RMN_EVENT } from 'enums';
7
7
  import type { IInjectSpotElementParams } from 'modules/element';
8
8
  import type { IRmnEventMap } from 'modules/event';
9
- import type { ISpots, ISpotSelectionParams } from 'modules/selection';
9
+ import type { ISpot, ISpots, ISpotSelectionParams } from 'modules/selection';
10
10
  export interface IRmnClient {
11
11
  spotSelection(params: ISpotSelectionParams): Promise<ISpots | {
12
12
  error: string;
13
13
  }>;
14
+ publishSpotToRmn(placementId: string, spot: ISpot): void;
14
15
  injectSpotElement(params: IInjectSpotElementParams): Promise<void>;
15
16
  }
16
17
  export interface IRmnEventManager {
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.27",
5
+ "version": "1.5.0-beta.29",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",