@liquidcommercedev/rmn-sdk 1.1.6 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/dist/index.d.ts +37 -38
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [1.1.8](https://github.com/liquidcommerce/rmn-sdk/compare/v1.1.7...v1.1.8) (2024-09-27)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* new rb templates ([#30](https://github.com/liquidcommerce/rmn-sdk/issues/30)) ([7137d13](https://github.com/liquidcommerce/rmn-sdk/commit/7137d13513a0f9fa0175ec1e96331852e372aa94))
|
7
|
+
|
8
|
+
## [1.1.7](https://github.com/liquidcommerce/rmn-sdk/compare/v1.1.6...v1.1.7) (2024-09-24)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* types fix & designs update ([#29](https://github.com/liquidcommerce/rmn-sdk/issues/29)) ([2242b9b](https://github.com/liquidcommerce/rmn-sdk/commit/2242b9b1afc8b6db49a421cece71509c1fba872f))
|
14
|
+
|
1
15
|
## [1.1.6](https://github.com/liquidcommerce/rmn-sdk/compare/v1.1.5...v1.1.6) (2024-09-23)
|
2
16
|
|
3
17
|
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
declare enum RMN_SPOT_TYPE {
|
2
|
+
RB_HOMEPAGE_HERO_THREE_TILE = "rbHomepageHeroThreeTile",
|
3
|
+
RB_HOMEPAGE_HERO_FULL_IMAGE = "rbHomepageHeroFullImage",
|
4
|
+
RB_LARGE_CATEGORY_IMAGE_TOUT = "rbLargeCategoryImageTout",
|
5
|
+
RB_SMALL_DISCOVER_TOUT = "rbSmallDiscoverTout",
|
6
|
+
RB_SMALL_CATEGORY_IMAGE_TOUT = "rbSmallCategoryImageTout",
|
7
|
+
RB_COLLECTION_BANNER_WITHOUT_TEXT_BLOCK = "rbCollectionBannerWithoutTextBlock",
|
8
|
+
RB_PRODUCT_UPCS = "rbProductUpcs",
|
9
|
+
RB_NAVIGATION_BANNER = "rbNavigationBanner",
|
2
10
|
BILLBOARD = "billboard",
|
3
11
|
LARGE_RECTANGLE = "largeRectangle",
|
4
12
|
VERTICAL_RECTANGLE = "verticalRectangle",
|
@@ -6,9 +14,6 @@ declare enum RMN_SPOT_TYPE {
|
|
6
14
|
LARGE_LEADERBOARD = "largeLeaderboard",
|
7
15
|
WIDE_SKYSCRAPER = "wideSkyscraper",
|
8
16
|
IN_TEXT = "inText",
|
9
|
-
/**
|
10
|
-
* CURRENTLY NOT SUPPORTED YET
|
11
|
-
* */
|
12
17
|
SMALL_RECTANGLE = "smallRectangle",
|
13
18
|
MEDIUM_RECTANGLE = "mediumRectangle",
|
14
19
|
BANNER = "banner",
|
@@ -38,11 +43,7 @@ declare enum RMN_FILTER_PROPERTIES {
|
|
38
43
|
TYPE = "type",
|
39
44
|
CLASSIFICATION = "classification",
|
40
45
|
HOLIDAY = "holiday",
|
41
|
-
|
42
|
-
PUBLISHERS = "publishers",
|
43
|
-
DEVICE_TYPE = "deviceType",
|
44
|
-
BROWSER_TYPE = "browserType",
|
45
|
-
LOCATION = "location"
|
46
|
+
PUBLISHERS = "publishers"
|
46
47
|
}
|
47
48
|
|
48
49
|
declare enum RMN_ENV {
|
@@ -59,21 +60,30 @@ interface IAuthCredentials {
|
|
59
60
|
env: RMN_ENV;
|
60
61
|
}
|
61
62
|
|
62
|
-
type
|
63
|
-
[key in RMN_FILTER_PROPERTIES]
|
63
|
+
type RmnFilterType = {
|
64
|
+
[key in RMN_FILTER_PROPERTIES]?: string[];
|
64
65
|
};
|
65
66
|
type SpotFilterType = {
|
66
67
|
spot: RMN_SPOT_TYPE | string;
|
67
68
|
count: number;
|
68
|
-
|
69
|
+
exactMatch?: string;
|
70
|
+
} & Omit<RmnFilterType, RMN_FILTER_PROPERTIES.KEYWORDS>;
|
69
71
|
type SpotIdentifierType = RMN_SPOT_TYPE | `${RMN_SPOT_TYPE}${number}`;
|
70
|
-
type
|
71
|
-
type
|
72
|
+
type RmnSpotType = RMN_SPOT_TYPE | string | SpotFilterType;
|
73
|
+
type RBSpotTypeKeys = keyof {
|
74
|
+
[K in keyof typeof RMN_SPOT_TYPE as K extends `RB_${string}` ? K : never]: (typeof RMN_SPOT_TYPE)[K];
|
75
|
+
};
|
76
|
+
type IABSpotTypeKeys = keyof {
|
77
|
+
[K in keyof typeof RMN_SPOT_TYPE as K extends `RB_${string}` ? never : K]: (typeof RMN_SPOT_TYPE)[K];
|
78
|
+
};
|
79
|
+
type RBSpotTypeValues = (typeof RMN_SPOT_TYPE)[RBSpotTypeKeys];
|
80
|
+
type IABSpotTypeValues = (typeof RMN_SPOT_TYPE)[IABSpotTypeKeys];
|
81
|
+
type SpotVariantType = RBSpotTypeValues | `${IABSpotTypeValues}V${number}`;
|
72
82
|
type SpotEventType = Record<number, string>;
|
73
83
|
|
74
84
|
interface ISpotSelectionParams {
|
75
|
-
spots:
|
76
|
-
filter?: Partial<
|
85
|
+
spots: RmnSpotType[];
|
86
|
+
filter?: Partial<RmnFilterType>;
|
77
87
|
}
|
78
88
|
interface ISpot {
|
79
89
|
clickUrl: string;
|
@@ -83,28 +93,17 @@ interface ISpot {
|
|
83
93
|
variant: SpotVariantType;
|
84
94
|
width: number;
|
85
95
|
height: number;
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
96
|
+
preHeader?: string;
|
97
|
+
header?: string;
|
98
|
+
description?: string;
|
99
|
+
primaryImage?: string;
|
100
|
+
secondaryImage?: string;
|
101
|
+
mobilePrimaryImage?: string;
|
102
|
+
mobileSecondaryImage?: string;
|
103
|
+
ctaText?: string;
|
104
|
+
productUpcs?: string[];
|
92
105
|
customData?: Record<string, any>;
|
93
106
|
}
|
94
|
-
interface IFilterPropertiesType {
|
95
|
-
[RMN_FILTER_PROPERTIES.EXACT_MATCH]: string;
|
96
|
-
[RMN_FILTER_PROPERTIES.KEYWORDS]: string[];
|
97
|
-
[RMN_FILTER_PROPERTIES.PARENTCO]: string[];
|
98
|
-
[RMN_FILTER_PROPERTIES.BRAND]: string[];
|
99
|
-
[RMN_FILTER_PROPERTIES.CATEGORY]: string[];
|
100
|
-
[RMN_FILTER_PROPERTIES.TYPE]: string[];
|
101
|
-
[RMN_FILTER_PROPERTIES.CLASSIFICATION]: string[];
|
102
|
-
[RMN_FILTER_PROPERTIES.HOLIDAY]: string[];
|
103
|
-
[RMN_FILTER_PROPERTIES.PUBLISHERS]: string[];
|
104
|
-
[RMN_FILTER_PROPERTIES.DEVICE_TYPE]: string[];
|
105
|
-
[RMN_FILTER_PROPERTIES.BROWSER_TYPE]: string[];
|
106
|
-
[RMN_FILTER_PROPERTIES.LOCATION]: string[];
|
107
|
-
}
|
108
107
|
type ISpots = Record<SpotIdentifierType, ISpot[]>;
|
109
108
|
|
110
109
|
interface IRmnClient {
|
@@ -116,8 +115,8 @@ interface IRmnConfig {
|
|
116
115
|
}
|
117
116
|
|
118
117
|
declare class LiquidCommerceRmnClient implements IRmnClient {
|
119
|
-
private spotSelectionService;
|
120
|
-
private spotHtmlService;
|
118
|
+
private readonly spotSelectionService;
|
119
|
+
private readonly spotHtmlService;
|
121
120
|
constructor(auth: IAuthCredentials);
|
122
121
|
/**
|
123
122
|
* Makes a selection request on our server based on the provided data.
|
@@ -164,4 +163,4 @@ declare function RmnClient(apiKey: string, config: IRmnConfig): Promise<IRmnClie
|
|
164
163
|
*/
|
165
164
|
declare function RmnCreateSpotElement(spot: ISpot, fluid?: boolean): HTMLElement | null;
|
166
165
|
|
167
|
-
export { type IRmnClient, type IRmnConfig, type ISpot, type ISpotSelectionParams, LiquidCommerceRmnClient, RMN_ENV, RMN_FILTER_PROPERTIES, RMN_SPOT_TYPE, RmnClient, RmnCreateSpotElement };
|
166
|
+
export { type IRmnClient, type IRmnConfig, type ISpot, type ISpotSelectionParams, type ISpots, LiquidCommerceRmnClient, RMN_ENV, RMN_FILTER_PROPERTIES, RMN_SPOT_TYPE, RmnClient, RmnCreateSpotElement, type RmnFilterType, type RmnSpotType };
|