@liquidcommercedev/rmn-sdk 1.5.0-beta.13 → 1.5.0-beta.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,7 @@ export declare class LiquidCommerceRmnClient implements IRmnClient {
6
6
  private readonly selectionService;
7
7
  private readonly elementService;
8
8
  private readonly eventService;
9
+ private intersectionObserver;
9
10
  constructor(auth: IAuthCredentials);
10
11
  /**
11
12
  * Makes a selection request on our server based on the provided data.
@@ -27,14 +28,7 @@ export declare class LiquidCommerceRmnClient implements IRmnClient {
27
28
  * @return {Promise<void>} - A promise that resolves when the spot elements are injected.
28
29
  */
29
30
  injectSpotElement(params: IInjectSpotElementParams): Promise<void>;
30
- /**
31
- * Makes a selection request on our server based on the provided data.
32
- *
33
- * @param {IInjectSpotElementParams} params - Parameters for injecting spot elements.
34
- *
35
- * @return {Promise<ISpots | {error: string}>} - The spots response object.
36
- */
37
- private spotSelectionRequest;
31
+ /** ========================= HELPER METHODS ========================= **/
38
32
  /**
39
33
  * Injects a carousel element with the provided spots into the placement.
40
34
  *
@@ -56,6 +50,22 @@ export declare class LiquidCommerceRmnClient implements IRmnClient {
56
50
  * @return {void}
57
51
  */
58
52
  private injectOneSpotElement;
53
+ /**
54
+ * Clears the placement element by removing all its children.
55
+ *
56
+ * @param {string} placementId - The placement id.
57
+ *
58
+ * @return {void}
59
+ */
60
+ private clearPlacement;
61
+ /**
62
+ * Makes a selection request on our server based on the provided data.
63
+ *
64
+ * @param {IInjectSpotElementParams} params - Parameters for injecting spot elements.
65
+ *
66
+ * @return {Promise<ISpots | {error: string}>} - The spots response object.
67
+ */
68
+ private spotSelectionRequest;
59
69
  /**
60
70
  * Prevents duplicate placement ids in the inject data.
61
71
  *
@@ -66,8 +76,13 @@ export declare class LiquidCommerceRmnClient implements IRmnClient {
66
76
  * @return {void}
67
77
  */
68
78
  private preventDuplicateSpotPlacementIds;
79
+ /**
80
+ * Prevents non-existent spot types in the inject data.
81
+ *
82
+ * @param {IInjectSpotElement[]} inject - The inject data.
83
+ * @return {IInjectSpotElement[]} - The filtered inject data.
84
+ */
69
85
  private preventNonExistentSpotTypes;
70
- private updateSpotsState;
71
86
  private useSpotSelectionExample;
72
87
  }
73
88
  /**
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.13",
5
+ "version": "1.5.0-beta.15",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",