vwo-fme-node-sdk 1.5.2 → 1.6.0

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
@@ -5,17 +5,50 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.6.0] - 2024-08-27
9
+
10
+ ### Fixed
11
+
12
+ - Update key name from `user` to `userId` for storing User ID in storage connector.
13
+
14
+ ```javascript
15
+ class StorageConnector extends StorageConnector {
16
+ constructor() {
17
+ super();
18
+ }
19
+
20
+ /**
21
+ * Get data from storage
22
+ * @param {string} featureKey
23
+ * @param {string} userId
24
+ * @returns {Promise<any>}
25
+ */
26
+ async get(featureKey, userId) {
27
+ // return await data (based on featureKey and userId)
28
+ }
29
+
30
+ /**
31
+ * Set data in storage
32
+ * @param {object} data
33
+ */
34
+ async set(data) {
35
+ // Set data corresponding to a featureKey and user ID
36
+ // Use data.featureKey and data.userId to store the above data for a specific feature and a user
37
+ }
38
+ }
39
+ ```
40
+
8
41
  ## [1.5.2] - 2024-08-20
9
42
 
10
43
  ### Fixed
11
44
 
12
- - fix: Updated regular expressions for `GREATER_THAN_MATCH`, `GREATER_THAN_EQUAL_TO_MATCH`, `LESS_THAN_MATCH`, and `LESS_THAN_EQUAL_TO_MATCH` segmentation operators
45
+ - Updated regular expressions for `GREATER_THAN_MATCH`, `GREATER_THAN_EQUAL_TO_MATCH`, `LESS_THAN_MATCH`, and `LESS_THAN_EQUAL_TO_MATCH` segmentation operators
13
46
 
14
47
  ## [1.5.1] - 2024-08-13
15
48
 
16
49
  ### Fixed
17
50
 
18
- - fix: Encode user-agent in `setAttribute` and `trackEvent` APIs before making a call to VWO server`
51
+ - Encode user-agent in `setAttribute` and `trackEvent` APIs before making a call to VWO server`
19
52
 
20
53
  ## [1.5.0] - 2024-08-01
21
54
 
@@ -115,14 +148,23 @@ Client-side Javascript SDK
115
148
  super();
116
149
  }
117
150
 
118
- async get(key) {
119
- // return promise based data for feature-key
120
- // return await this.map[key];
151
+ /**
152
+ * Get data from storage
153
+ * @param {string} featureKey
154
+ * @param {string} userId
155
+ * @returns {Promise<any>}
156
+ */
157
+ async get(featureKey, userId) {
158
+ // return await data (based on featureKey and userId)
121
159
  }
122
160
 
123
- async set(key, data) {
124
- // Set data for feature-key
125
- // this.map[key] = data;
161
+ /**
162
+ * Set data in storage
163
+ * @param {object} data
164
+ */
165
+ async set(data) {
166
+ // Set data corresponding to a featureKey and user ID
167
+ // Use data.featureKey and data.userId to store the above data for a specific feature and a user
126
168
  }
127
169
  }
128
170
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * vwo-fme-javascript-sdk - v1.5.1
2
+ * vwo-fme-javascript-sdk - v1.5.2
3
3
  * URL - https://github.com/wingify/vwo-node-sdk
4
4
  *
5
5
  * Copyright 2024 Wingify Software Pvt. Ltd.
@@ -1530,7 +1530,7 @@ if (true) {
1530
1530
  packageFile = {
1531
1531
  name: 'vwo-fme-javascript-sdk', // will be replaced by webpack for browser build
1532
1532
  // @ts-expect-error This will be relaved by webpack at the time of build for browser
1533
- version: "1.5.1", // will be replaced by webpack for browser build
1533
+ version: "1.5.2", // will be replaced by webpack for browser build
1534
1534
  };
1535
1535
  platform = PlatformEnum_1.PlatformEnum.CLIENT;
1536
1536
  }
@@ -1711,7 +1711,7 @@ var StorageDecorator = /** @class */ (function () {
1711
1711
  }
1712
1712
  storageService.setDataInStorage({
1713
1713
  featureKey: featureKey,
1714
- user: context.id,
1714
+ userId: context.id,
1715
1715
  rolloutId: rolloutId,
1716
1716
  rolloutKey: rolloutKey,
1717
1717
  rolloutVariationId: rolloutVariationId,