@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.
- package/dist/index.cjs +14787 -13960
- package/dist/index.esm.js +14787 -13960
- package/dist/types/common/helpers/extract-deep.helper.d.ts +2 -2
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/constants/special-char.constant.d.ts +1 -0
- package/dist/types/modules/element/component/skeleton/skeleton.interface.d.ts +1 -1
- package/dist/types/modules/event/event.service.d.ts +2 -0
- package/dist/types/rmn-client.d.ts +8 -0
- package/dist/types/types.d.ts +2 -1
- package/package.json +1 -1
- package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
- /package/dist/types/{example.constant.d.ts → constants/example.constant.d.ts} +0 -0
@@ -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
|
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(
|
27
|
+
export declare function cleanProductIds(ids: Array<string | number>): string[];
|
28
28
|
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const SPECIAL_CHARACTER_MAPPING: Record<string, string>;
|
@@ -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
|
*
|
package/dist/types/types.d.ts
CHANGED
@@ -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.
|
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",
|