@nuskin/ns-product-lib 2.6.0-cx24-11112.2 → 2.6.0-cx24-3372.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,16 +1,17 @@
1
- # [2.6.0-cx24-11112.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-11112.1...v2.6.0-cx24-11112.2) (2023-02-23)
1
+ # [2.6.0-cx24-3372.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3372.1...v2.6.0-cx24-3372.2) (2023-03-01)
2
2
 
3
3
 
4
- ### Update
4
+ ### New
5
5
 
6
- * Version Bump ns-util ([b260de3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/b260de32b3a25afc81398d1e5c056284bdf32a05))
6
+ * Product Kit API search ([4260768](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/426076856ed7d1d90f536fc249d84e1bd88e2d12))
7
7
 
8
- # [2.6.0-cx24-11112.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0...v2.6.0-cx24-11112.1) (2023-02-22)
8
+ # [2.6.0-cx24-3372.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0...v2.6.0-cx24-3372.1) (2023-03-01)
9
9
 
10
10
 
11
- ### Update
11
+ ### New
12
12
 
13
- * version bump config sdk and required libs ([8ead54f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/8ead54fdc122f0e0f1c094c82c1e36b590614179))
13
+ * Product Kit API search ([0d69d93](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0d69d931b989ccc250b698148c78db17a003bc13))
14
+ * Product Kit API search ([d549e15](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d549e15fa7c967d1b2bbede6d3c2695ecc66265c))
14
15
 
15
16
  # [2.5.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.4.1...v2.5.0) (2023-02-22)
16
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.6.0-cx24-11112.2",
3
+ "version": "2.6.0-cx24-3372.2",
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": {
@@ -28,20 +28,15 @@
28
28
  "jest": "29.2.2",
29
29
  "jest-environment-jsdom": "29.2.2",
30
30
  "jest-sonar-reporter": "2.0.0",
31
- "prettier": "1.19.1",
32
- "@nuskin/configuration-sdk": "2.0.0",
33
- "jquery": "3.3.1"
31
+ "prettier": "1.19.1"
34
32
  },
35
33
  "dependencies": {
34
+ "@nuskin/configuration-sdk": "1.0.1",
36
35
  "@nuskin/ns-common-lib": "1.4.5",
37
- "@nuskin/ns-util": "4.1.0",
38
- "@nuskin/nuskinjquery": "2.3.1",
36
+ "@nuskin/ns-util": "3.107.0",
39
37
  "axios": "0.27.2",
40
38
  "qs": "6.11.0"
41
39
  },
42
- "peerDependencies": {
43
- "@nuskin/configuration-sdk": "2.x"
44
- },
45
40
  "files": [
46
41
  "src/"
47
42
  ]
@@ -33,11 +33,18 @@ const ProductData = {
33
33
  },
34
34
 
35
35
  getProductFromEquinox: async function (skus, locale, config) {
36
- const filter = `{"filters": [{"field": "index_key_skuId","operation": "IN", "value": "${skus.toString()}"}]}`;
36
+
37
+ let skuFilter = [];
38
+
39
+ skus.forEach((sku) => {
40
+ skuFilter.push(`index_key_productId="${sku}" OR index_key_skuId="${sku}"`)
41
+ })
42
+
43
+ const filter = skuFilter.join(" OR ")
37
44
  axios.defaults.withCredentials = true;
38
45
 
39
46
  const url = `${config.Equinox_Markets.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
40
- const href = `${url}?filter=${encodeURI(filter)}`;
47
+ const href = `${url}?filter='\\\\''${encodeURI(filter)}'\\''`;
41
48
  const response = await axios.request({
42
49
  method: 'get',
43
50
  url: href,