@nuskin/ns-product-lib 1.5.0-cx24-1810.9 → 1.5.0-cx24-1810.12
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 +24 -0
- package/package.json +1 -1
- package/src/productData.js +21 -18
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
# [1.5.0-cx24-1810.12](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.5.0-cx24-1810.11...v1.5.0-cx24-1810.12) (2022-07-29)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* Get Product Data from Equinox (#CX24-1810) ([650d44a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/650d44a7419f4e28ac27cc15d6f713a5bcecfb72)), 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) ([f5f9126](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/f5f91260746a05ccb6b0a4db06c5dafc2949a300)), closes [#CX24-1810](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-1810)
|
8
|
+
* Get Product Data from Equinox (#CX24-1810) ([cde96a3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/cde96a33031275b8582ae590d12e9004f89dd6e0)), closes [#CX24-1810](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-1810)
|
9
|
+
|
10
|
+
# [1.5.0-cx24-1810.11](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.5.0-cx24-1810.10...v1.5.0-cx24-1810.11) (2022-07-28)
|
11
|
+
|
12
|
+
|
13
|
+
### New
|
14
|
+
|
15
|
+
* Get Product Data from Equinox (#CX24-1810) ([5fb16af](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/5fb16af25c8e903804f56955b249b62750d2b176)), closes [#CX24-1810](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-1810)
|
16
|
+
* Get Product Data from Equinox (#CX24-1810) ([fc28352](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fc283527c23dbf4d1b8861646a0617ecdac258c7)), closes [#CX24-1810](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-1810)
|
17
|
+
|
18
|
+
# [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)
|
19
|
+
|
20
|
+
|
21
|
+
### New
|
22
|
+
|
23
|
+
* 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)
|
24
|
+
|
1
25
|
# [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
26
|
|
3
27
|
|
package/package.json
CHANGED
package/src/productData.js
CHANGED
@@ -9,18 +9,23 @@ const ProductData = {
|
|
9
9
|
let filter = '{"filters":[{"field":"index_key_skuId","operation":"IN","value":"' +
|
10
10
|
skus.toString() +
|
11
11
|
'"}]}'
|
12
|
-
|
12
|
+
let cookie = 'x-sk-session-id=caf82f68da80f14310652fa2acc94c43'
|
13
13
|
let productDataResponse = await axios.request({
|
14
14
|
method: 'get',
|
15
|
-
url: 'https://
|
15
|
+
url: 'https://storefront.api.wts.nuskin.io/orchestrationservices/storefront/catalogs/search/',
|
16
16
|
params: {
|
17
|
+
locale: locale,
|
17
18
|
storeId: '406',
|
18
19
|
filter: filter
|
20
|
+
},
|
21
|
+
headers: {
|
22
|
+
'Cookie': cookie
|
19
23
|
}
|
20
24
|
});
|
21
25
|
productResponse = this.eqProductMapper(productDataResponse.data.product)
|
26
|
+
console.log(productDataResponse.headers)
|
27
|
+
cookie = productDataResponse.headers.cookie
|
22
28
|
|
23
|
-
|
24
29
|
} else {
|
25
30
|
let lambdaUrl = `${marketConfig.awsUrl}/productData/v1`;
|
26
31
|
const payload = {
|
@@ -81,18 +86,18 @@ const ProductData = {
|
|
81
86
|
"availableQuantity": 999,
|
82
87
|
"maxQuantity": 999,
|
83
88
|
"points": "",
|
84
|
-
"cv": 99,
|
85
|
-
"pv": 99,
|
89
|
+
"cv": 99.1,
|
90
|
+
"pv": 99.01,
|
86
91
|
"priceType": "WRTL",
|
87
|
-
"price": 9999,
|
92
|
+
"price": 9999.11,
|
88
93
|
"priceMap": {
|
89
|
-
"WRTL": 9999,
|
90
|
-
"WADW-WRTL": 9999,
|
91
|
-
"WADR": 9999,
|
92
|
-
"RTL": 9999,
|
93
|
-
"WWHL": 9998,
|
94
|
-
"WADW": 9998,
|
95
|
-
"WHL": 9998
|
94
|
+
"WRTL": 9999.11,
|
95
|
+
"WADW-WRTL": 9999.11,
|
96
|
+
"WADR": 9999.01,
|
97
|
+
"RTL": 9999.11,
|
98
|
+
"WWHL": 9998.01,
|
99
|
+
"WADW": 9998.01,
|
100
|
+
"WHL": 9998.01
|
96
101
|
},
|
97
102
|
"cvMap": {
|
98
103
|
"WWHL": 8888,
|
@@ -153,11 +158,9 @@ const ProductData = {
|
|
153
158
|
"addOns": []
|
154
159
|
};
|
155
160
|
});
|
156
|
-
|
157
|
-
|
158
|
-
products.push(prodArr);
|
161
|
+
|
159
162
|
let data = {
|
160
|
-
products:
|
163
|
+
products: prodArr
|
161
164
|
};
|
162
165
|
return {
|
163
166
|
"status": 200,
|
@@ -176,4 +179,4 @@ const ProductData = {
|
|
176
179
|
}
|
177
180
|
}
|
178
181
|
|
179
|
-
module.exports = ProductData;
|
182
|
+
module.exports = ProductData;
|