@nuskin/ns-product-lib 1.5.0-cx24-1810.8 → 1.5.0-cx24-1810.11

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
@@ -1,3 +1,26 @@
1
+ # [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)
2
+
3
+
4
+ ### New
5
+
6
+ * 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)
7
+ * 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)
8
+
9
+ # [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)
10
+
11
+
12
+ ### New
13
+
14
+ * 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)
15
+
16
+ # [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)
17
+
18
+
19
+ ### New
20
+
21
+ * 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)
22
+ * 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)
23
+
1
24
  # [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
25
 
3
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "1.5.0-cx24-1810.8",
3
+ "version": "1.5.0-cx24-1810.11",
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": {
@@ -1,28 +1,25 @@
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
+ '"}]}'
10
12
  let productDataResponse = await axios.request({
11
13
  method: 'get',
12
- url: 'https://nuglobalbasev1-qa1.skavacommerce.com/orchestrationservices/storefront/catalogs/search/',
13
- headers: {
14
- 'Cookie': 'x-sk-session-id=5da6d8b24af753cfcefa88f905dfd439'
15
- },
14
+ url: 'https://storefront.api.wts.nuskin.io/orchestrationservices/storefront/catalogs/search/',
16
15
  params: {
17
- storeId: '422',
18
- filter: qs.stringify('{"filters":[{"field":"index_key_skuId","operation":"IN","value":"' +
19
- skus.toString() +
20
- '"}]}')
16
+ storeId: '406',
17
+ filter: filter
21
18
  }
22
19
  });
23
20
  productResponse = this.eqProductMapper(productDataResponse.data.product)
24
21
 
25
-
22
+
26
23
  } else {
27
24
  let lambdaUrl = `${marketConfig.awsUrl}/productData/v1`;
28
25
  const payload = {
@@ -83,18 +80,18 @@ const ProductData = {
83
80
  "availableQuantity": 999,
84
81
  "maxQuantity": 999,
85
82
  "points": "",
86
- "cv": 99,
87
- "pv": 99,
83
+ "cv": 99.1,
84
+ "pv": 99.01,
88
85
  "priceType": "WRTL",
89
- "price": 9999,
86
+ "price": 9999.11,
90
87
  "priceMap": {
91
- "WRTL": 9999,
92
- "WADW-WRTL": 9999,
93
- "WADR": 9999,
94
- "RTL": 9999,
95
- "WWHL": 9998,
96
- "WADW": 9998,
97
- "WHL": 9998
88
+ "WRTL": 9999.11,
89
+ "WADW-WRTL": 9999.11,
90
+ "WADR": 9999.01,
91
+ "RTL": 9999.11,
92
+ "WWHL": 9998.01,
93
+ "WADW": 9998.01,
94
+ "WHL": 9998.01
98
95
  },
99
96
  "cvMap": {
100
97
  "WWHL": 8888,
@@ -155,11 +152,9 @@ const ProductData = {
155
152
  "addOns": []
156
153
  };
157
154
  });
158
- let products = [];
159
-
160
- products.push(prodArr);
155
+
161
156
  let data = {
162
- products: products
157
+ products: prodArr
163
158
  };
164
159
  return {
165
160
  "status": 200,
@@ -178,4 +173,4 @@ const ProductData = {
178
173
  }
179
174
  }
180
175
 
181
- module.exports = ProductData;
176
+ module.exports = ProductData;