@nuskin/ns-product-lib 1.5.0-cx24-1810.8 → 1.5.0-cx24-1810.9
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 +8 -0
- package/package.json +1 -1
- package/src/productData.js +6 -8
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# [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)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* 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)
|
7
|
+
* 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)
|
8
|
+
|
1
9
|
# [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)
|
2
10
|
|
3
11
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -1,23 +1,21 @@
|
|
1
1
|
"use strict";
|
2
2
|
const axios = require("axios");
|
3
|
-
const qs = require("qs");
|
4
3
|
|
5
4
|
const ProductData = {
|
6
5
|
getProductData: async function (skus, runConfig, marketConfig, isEqEnabled) {
|
7
6
|
let productResponse = {};
|
8
7
|
let locale = `${runConfig.language}_${runConfig.country}`;
|
9
8
|
if (isEqEnabled) {
|
9
|
+
let filter = '{"filters":[{"field":"index_key_skuId","operation":"IN","value":"' +
|
10
|
+
skus.toString() +
|
11
|
+
'"}]}'
|
12
|
+
filter = encodeURIComponent(filter)
|
10
13
|
let productDataResponse = await axios.request({
|
11
14
|
method: 'get',
|
12
15
|
url: 'https://nuglobalbasev1-qa1.skavacommerce.com/orchestrationservices/storefront/catalogs/search/',
|
13
|
-
headers: {
|
14
|
-
'Cookie': 'x-sk-session-id=5da6d8b24af753cfcefa88f905dfd439'
|
15
|
-
},
|
16
16
|
params: {
|
17
|
-
storeId: '
|
18
|
-
filter:
|
19
|
-
skus.toString() +
|
20
|
-
'"}]}')
|
17
|
+
storeId: '406',
|
18
|
+
filter: filter
|
21
19
|
}
|
22
20
|
});
|
23
21
|
productResponse = this.eqProductMapper(productDataResponse.data.product)
|