@nuskin/ns-product-lib 1.5.0-cx24-1810.7 → 1.5.0-cx24-1810.10
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 +22 -0
- package/package.json +3 -2
- package/src/productData.js +9 -11
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
# [1.5.0-cx24-1810.10](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.5.0-cx24-1810.9...v1.5.0-cx24-1810.10) (2022-07-27)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* Get Product Data from Equinox (#CX24-1810) ([2c60ab4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/2c60ab4155d776df57a5e21476a8c22ee3c8876b)), closes [#CX24-1810](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-1810)
|
7
|
+
|
8
|
+
# [1.5.0-cx24-1810.9](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.5.0-cx24-1810.8...v1.5.0-cx24-1810.9) (2022-07-27)
|
9
|
+
|
10
|
+
|
11
|
+
### New
|
12
|
+
|
13
|
+
* Get Product Data from Equinox (#CX24-1810) ([1e301bd](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1e301bdcfa7c7b7fe347326fc442908176128596)), closes [#CX24-1810](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-1810)
|
14
|
+
* Get Product Data from Equinox (#CX24-1810) ([35efae3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/35efae31f0b48f2e6de445828a3cde996c38910a)), closes [#CX24-1810](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-1810)
|
15
|
+
|
16
|
+
# [1.5.0-cx24-1810.8](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.5.0-cx24-1810.7...v1.5.0-cx24-1810.8) (2022-07-27)
|
17
|
+
|
18
|
+
|
19
|
+
### New
|
20
|
+
|
21
|
+
* Get Product Data from Equinox (#CX24-1810) ([219fb37](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/219fb379cd942f0b6b11a84df5c222b25b2cdd87)), closes [#CX24-1810](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-1810)
|
22
|
+
|
1
23
|
# [1.5.0-cx24-1810.7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.5.0-cx24-1810.6...v1.5.0-cx24-1810.7) (2022-07-27)
|
2
24
|
|
3
25
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nuskin/ns-product-lib",
|
3
|
-
"version": "1.5.0-cx24-1810.
|
3
|
+
"version": "1.5.0-cx24-1810.10",
|
4
4
|
"description": "This project contains shared Product models and code between the backend and frontend.",
|
5
5
|
"main": "src/index.js",
|
6
6
|
"scripts": {
|
@@ -31,7 +31,8 @@
|
|
31
31
|
"dependencies": {
|
32
32
|
"@nuskin/ns-common-lib": "1.3.0",
|
33
33
|
"@nuskin/ns-util": "3.103.0-cx24-1810.2",
|
34
|
-
"axios": "^0.27.2"
|
34
|
+
"axios": "^0.27.2",
|
35
|
+
"qs": "^6.11.0"
|
35
36
|
},
|
36
37
|
"files": [
|
37
38
|
"src/"
|
package/src/productData.js
CHANGED
@@ -6,22 +6,20 @@ const ProductData = {
|
|
6
6
|
let productResponse = {};
|
7
7
|
let locale = `${runConfig.language}_${runConfig.country}`;
|
8
8
|
if (isEqEnabled) {
|
9
|
+
let filter = '{"filters":[{"field":"index_key_skuId","operation":"IN","value":"' +
|
10
|
+
skus.toString() +
|
11
|
+
'"}]}'
|
9
12
|
let productDataResponse = await axios.request({
|
10
13
|
method: 'get',
|
11
|
-
url: 'https://
|
12
|
-
headers: {
|
13
|
-
'Cookie': 'x-sk-session-id=5da6d8b24af753cfcefa88f905dfd439'
|
14
|
-
},
|
14
|
+
url: 'https://storefront.api.wts.nuskin.io/orchestrationservices/storefront/catalogs/search/',
|
15
15
|
params: {
|
16
|
-
storeId: '
|
17
|
-
filter:
|
18
|
-
skus.toString() +
|
19
|
-
'"}]}'
|
16
|
+
storeId: '406',
|
17
|
+
filter: filter
|
20
18
|
}
|
21
19
|
});
|
22
20
|
productResponse = this.eqProductMapper(productDataResponse.data.product)
|
23
21
|
|
24
|
-
|
22
|
+
|
25
23
|
} else {
|
26
24
|
let lambdaUrl = `${marketConfig.awsUrl}/productData/v1`;
|
27
25
|
const payload = {
|
@@ -155,7 +153,7 @@ const ProductData = {
|
|
155
153
|
};
|
156
154
|
});
|
157
155
|
let products = [];
|
158
|
-
|
156
|
+
|
159
157
|
products.push(prodArr);
|
160
158
|
let data = {
|
161
159
|
products: products
|
@@ -177,4 +175,4 @@ const ProductData = {
|
|
177
175
|
}
|
178
176
|
}
|
179
177
|
|
180
|
-
module.exports = ProductData;
|
178
|
+
module.exports = ProductData;
|