@liquidcommercedev/rmn-sdk 1.1.5 → 1.1.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.1.7](https://github.com/liquidcommerce/rmn-sdk/compare/v1.1.6...v1.1.7) (2024-09-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * types fix & designs update ([#29](https://github.com/liquidcommerce/rmn-sdk/issues/29)) ([2242b9b](https://github.com/liquidcommerce/rmn-sdk/commit/2242b9b1afc8b6db49a421cece71509c1fba872f))
7
+
8
+ ## [1.1.6](https://github.com/liquidcommerce/rmn-sdk/compare/v1.1.5...v1.1.6) (2024-09-23)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * design updates ([#28](https://github.com/liquidcommerce/rmn-sdk/issues/28)) ([646b9b5](https://github.com/liquidcommerce/rmn-sdk/commit/646b9b59aaf2e8e2506d1e41177b50e6219e2ca3))
14
+
1
15
  ## [1.1.5](https://github.com/liquidcommerce/rmn-sdk/compare/v1.1.4...v1.1.5) (2024-09-20)
2
16
 
3
17
 
package/dist/index.d.ts CHANGED
@@ -38,7 +38,6 @@ declare enum RMN_FILTER_PROPERTIES {
38
38
  TYPE = "type",
39
39
  CLASSIFICATION = "classification",
40
40
  HOLIDAY = "holiday",
41
- EXACT_MATCH = "exactMatch",
42
41
  PUBLISHERS = "publishers",
43
42
  DEVICE_TYPE = "deviceType",
44
43
  BROWSER_TYPE = "browserType",
@@ -59,21 +58,22 @@ interface IAuthCredentials {
59
58
  env: RMN_ENV;
60
59
  }
61
60
 
62
- type SpotsFilterType = {
63
- [key in RMN_FILTER_PROPERTIES]: IFilterPropertiesType[key];
61
+ type RmnFilterType = {
62
+ [key in RMN_FILTER_PROPERTIES]?: string[];
64
63
  };
65
64
  type SpotFilterType = {
66
- type: RMN_SPOT_TYPE | string;
65
+ spot: RMN_SPOT_TYPE | string;
67
66
  count: number;
68
- } & Partial<Omit<SpotsFilterType, RMN_FILTER_PROPERTIES.KEYWORDS>>;
67
+ exactMatch?: string;
68
+ } & Omit<RmnFilterType, RMN_FILTER_PROPERTIES.KEYWORDS>;
69
69
  type SpotIdentifierType = RMN_SPOT_TYPE | `${RMN_SPOT_TYPE}${number}`;
70
- type SpotType = RMN_SPOT_TYPE | SpotFilterType | string;
70
+ type RmnSpotType = RMN_SPOT_TYPE | string | SpotFilterType;
71
71
  type SpotVariantType = `${RMN_SPOT_TYPE}V${number}`;
72
72
  type SpotEventType = Record<number, string>;
73
73
 
74
74
  interface ISpotSelectionParams {
75
- spots: SpotType[];
76
- filter?: Partial<SpotsFilterType>;
75
+ spots: RmnSpotType[];
76
+ filter?: Partial<RmnFilterType>;
77
77
  }
78
78
  interface ISpot {
79
79
  clickUrl: string;
@@ -91,20 +91,6 @@ interface ISpot {
91
91
  upc?: string;
92
92
  customData?: Record<string, any>;
93
93
  }
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
94
  type ISpots = Record<SpotIdentifierType, ISpot[]>;
109
95
 
110
96
  interface IRmnClient {
@@ -116,8 +102,8 @@ interface IRmnConfig {
116
102
  }
117
103
 
118
104
  declare class LiquidCommerceRmnClient implements IRmnClient {
119
- private spotSelectionService;
120
- private spotHtmlService;
105
+ private readonly spotSelectionService;
106
+ private readonly spotHtmlService;
121
107
  constructor(auth: IAuthCredentials);
122
108
  /**
123
109
  * Makes a selection request on our server based on the provided data.
@@ -164,4 +150,4 @@ declare function RmnClient(apiKey: string, config: IRmnConfig): Promise<IRmnClie
164
150
  */
165
151
  declare function RmnCreateSpotElement(spot: ISpot, fluid?: boolean): HTMLElement | null;
166
152
 
167
- export { type IRmnClient, type IRmnConfig, type ISpot, type ISpotSelectionParams, LiquidCommerceRmnClient, RMN_ENV, RMN_FILTER_PROPERTIES, RMN_SPOT_TYPE, RmnClient, RmnCreateSpotElement };
153
+ 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 };