@liquidcommercedev/rmn-sdk 1.5.0-beta.10 → 1.5.0-beta.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +689 -571
- package/dist/index.esm.js +689 -571
- package/dist/types/common/helpers/event-type.helper.d.ts +8 -0
- package/dist/types/common/helpers/index.d.ts +4 -0
- package/dist/types/common/helpers/utils.helper.d.ts +0 -13
- package/dist/types/enums.d.ts +2 -0
- package/dist/types/modules/helper-service/localstorage.service.d.ts +16 -3
- package/package.json +1 -1
- package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
@@ -0,0 +1,8 @@
|
|
1
|
+
import { RMN_SPOT_EVENT } from 'enums';
|
2
|
+
/**
|
3
|
+
* Determines the event type from a raw event string by checking for keyword patterns.
|
4
|
+
*
|
5
|
+
* @param {string} [event] - The raw event string to evaluate
|
6
|
+
* @returns {RMN_SPOT_EVENT | null} - The corresponding RMN_SPOT_EVENT or null if no match
|
7
|
+
*/
|
8
|
+
export declare function getEventTypeFromRawEvent(event?: string): RMN_SPOT_EVENT | null;
|
@@ -1,17 +1,4 @@
|
|
1
|
-
import { RMN_SPOT_EVENT } from 'enums';
|
2
1
|
import type { IFireEventParams } from 'modules/event';
|
3
|
-
export interface IExtractIdsProps {
|
4
|
-
id?: string | number;
|
5
|
-
upc?: string | number;
|
6
|
-
[key: string]: string | number | undefined;
|
7
|
-
}
|
8
|
-
/**
|
9
|
-
* Determines the event type from a raw event string.
|
10
|
-
*
|
11
|
-
* @param {string} [event] - The raw event string to evaluate.
|
12
|
-
* @returns {RMN_SPOT_EVENT | null} - The corresponding RMN_SPOT_EVENT or null if no match is found.
|
13
|
-
*/
|
14
|
-
export declare function getEventTypeFromRawEvent(event?: string): RMN_SPOT_EVENT | null;
|
15
2
|
/**
|
16
3
|
* Recursively extracts ID values from a nested data structure.
|
17
4
|
* Searches for specified property names and collects their primitive values (strings/numbers).
|
package/dist/types/enums.d.ts
CHANGED
@@ -59,7 +59,9 @@ export declare enum RMN_SPOT_EVENT {
|
|
59
59
|
PURCHASE = "PURCHASE",
|
60
60
|
ADD_TO_CART = "ADD_TO_CART",
|
61
61
|
REMOVE_FROM_CART = "REMOVE_FROM_CART",
|
62
|
+
ADD_TO_CART_FROM_DETAILS = "ADD_TO_CART_FROM_DETAILS",
|
62
63
|
ADD_TO_WISHLIST = "ADD_TO_WISHLIST",
|
64
|
+
EXPAND_PRODUCT = "EXPAND_PRODUCT",
|
63
65
|
BUY_NOW = "BUY_NOW"
|
64
66
|
}
|
65
67
|
export declare enum RMN_ENV {
|
@@ -16,7 +16,7 @@ export type LocalStorageSpotArray = [
|
|
16
16
|
string,
|
17
17
|
string,
|
18
18
|
RMN_SPOT_TYPE,
|
19
|
-
|
19
|
+
string[],
|
20
20
|
Array<string | number>,
|
21
21
|
// PRODUCT_IDS = 4
|
22
22
|
number | undefined
|
@@ -29,6 +29,17 @@ export declare enum ENUM_LOCAL_STORAGE_SPOT_ARRAY_INDEX {
|
|
29
29
|
PRODUCT_IDS = 4,
|
30
30
|
CREATED_AT = 5
|
31
31
|
}
|
32
|
+
export declare const LOCAL_STORAGE_SPOT_EVENTS_ARRAY_INDEX: {
|
33
|
+
readonly IMPRESSION: 0;
|
34
|
+
readonly CLICK: 1;
|
35
|
+
readonly PURCHASE: 2;
|
36
|
+
readonly ADD_TO_CART: 3;
|
37
|
+
readonly REMOVE_FROM_CART: 4;
|
38
|
+
readonly ADD_TO_CART_FROM_DETAILS: 5;
|
39
|
+
readonly ADD_TO_WISHLIST: 6;
|
40
|
+
readonly EXPAND_PRODUCT: 7;
|
41
|
+
readonly BUY_NOW: 8;
|
42
|
+
};
|
32
43
|
export type LocalStorageSpotsArrayType = Record<string, // spotId
|
33
44
|
LocalStorageSpotArray>;
|
34
45
|
export declare class LocalStorageService {
|
@@ -49,8 +60,10 @@ export declare class LocalStorageService {
|
|
49
60
|
private removeExpiredSpots;
|
50
61
|
private mapToObject;
|
51
62
|
private objectToMap;
|
52
|
-
private
|
53
|
-
private
|
63
|
+
private spotEventObjectToArray;
|
64
|
+
private spotEventArrayToObject;
|
65
|
+
private spotObjectToArray;
|
66
|
+
private spotArrayToObject;
|
54
67
|
private encryptData;
|
55
68
|
private decryptData;
|
56
69
|
}
|
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.12",
|
6
6
|
"homepage": "https://docs.liquidcommerce.co/rmn-sdk",
|
7
7
|
"main": "./dist/index.cjs",
|
8
8
|
"module": "./dist/index.esm.js",
|