@nuskin/ns-product-lib 2.6.0-cx24-3372.7 → 2.6.0-cx24-33721.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,52 +1,40 @@
1
- # [2.6.0-cx24-3372.7](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3372.6...v2.6.0-cx24-3372.7) (2023-03-07)
1
+ # [2.6.0-cx24-33721.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.1...v2.6.0-cx24-33721.1) (2023-03-08)
2
2
 
3
3
 
4
- ### Update
5
-
6
- * Fixed regex expression for imageURL resize for non contentstack images ([a7c99b5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a7c99b504a6ab361150868e5f9153585c8e60412))
7
-
8
- # [2.6.0-cx24-3372.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3372.5...v2.6.0-cx24-3372.6) (2023-03-06)
9
-
10
-
11
- ### Update
12
-
13
- * Query for product equinox search ([7f873a5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/7f873a56cb579c68d7665947a2c5f9615eeb2101))
14
-
15
- # [2.6.0-cx24-3372.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3372.4...v2.6.0-cx24-3372.5) (2023-03-02)
16
-
17
-
18
- ### Fix
4
+ ### New
19
5
 
20
- * inventoryProperties atpQty ([3b271aa](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/3b271aa16960fbaaa2a68c08a2d1d1c93d54ec15))
6
+ * Update equinox query for KIT and its mapping ([7df6f96](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/7df6f9671c58eddb57c9acfd9d4b79b8dec6a78e))
21
7
 
22
- # [2.6.0-cx24-3372.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3372.3...v2.6.0-cx24-3372.4) (2023-03-02)
8
+ ## [2.5.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0...v2.5.1) (2023-03-07)
23
9
 
24
10
 
25
11
  ### Fix
26
12
 
27
- * inventoryProperties atpQty ([60ec521](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/60ec521223367abcd9570969c0e65522f76afe43))
13
+ * update getConfiguration call to work with new version of configuration-sdk #CX24-3503 ([8be370e](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/8be370ebfda910deea01fc562d28c199ed520467)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
28
14
 
29
- # [2.6.0-cx24-3372.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3372.2...v2.6.0-cx24-3372.3) (2023-03-02)
15
+ # [2.6.0-cx24-3503.2.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.6.0-cx24-3503.1...v2.6.0-cx24-3503.2.1) (2023-03-07)
30
16
 
31
17
 
32
18
  ### Fix
33
19
 
34
- * Kit mapping ([af76396](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/af76396940d95988bbcfad73fc047381945847bb))
20
+ * update dependencies #CX24-3503 ([0ea7523](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0ea752306f8e64d5f73d397d5ddf3cf1839865c3)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
21
+ * update dependencies #CX24-3503 ([53cea8d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/53cea8d5eb39ebaf9ff21b45d2310f02db98e25d)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
22
+ * update dependencies #CX24-3503 ([dd38c23](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/dd38c23b0094dea202fce7c6407c06c917d61676)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
23
+ * update dependencies #CX24-3503 ([ca67042](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/ca670420a7ed79e7c6fabeb4b7c722abc5811a18)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
24
+ * update dependencies #CX24-3503 ([2ac0b65](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/2ac0b652f84937d37716e861504ad8c424b20beb)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
25
+ * update dependencies #CX24-3503 ([682078f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/682078f703ccb8a0e84a559e828543f31f53ccd8)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
26
+ * update dependencies #CX24-3503 ([d48fb1a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d48fb1ac5e29dc7477be7b65522f25a2bbf25250)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
35
27
 
36
- # [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)
37
-
38
-
39
- ### New
28
+ ### Release
40
29
 
41
- * Product Kit API search ([4260768](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/426076856ed7d1d90f536fc249d84e1bd88e2d12))
30
+ * Automated changes by GitLab pipeline [skip ci] ([fa35816](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fa35816ef50672ceaac01173d55615d88cb2c75b))
42
31
 
43
- # [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)
32
+ ## [2.5.1-cx24-3503.2.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0...v2.5.1-cx24-3503.2.1) (2023-03-07)
44
33
 
45
34
 
46
- ### New
35
+ ### Fix
47
36
 
48
- * Product Kit API search ([0d69d93](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/0d69d931b989ccc250b698148c78db17a003bc13))
49
- * Product Kit API search ([d549e15](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/d549e15fa7c967d1b2bbede6d3c2695ecc66265c))
37
+ * update dependencies #CX24-3503 ([53cea8d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/53cea8d5eb39ebaf9ff21b45d2310f02db98e25d)), closes [#CX24-3503](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3503)
50
38
 
51
39
  # [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)
52
40
 
@@ -55,24 +43,6 @@
55
43
 
56
44
  * equinox API integration (#CX24) ([a169d58](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/a169d5806f20737fae42d0ebe18a7c746861a4fb)), closes [#CX24](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24)
57
45
 
58
- # [2.5.0-cx24-2179.2.20](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.19...v2.5.0-cx24-2179.2.20) (2023-02-16)
59
-
60
-
61
- ### Fix
62
-
63
- * Get test environment if not PROD ([913abb6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/913abb61f8bc6aa8a2cb271d67de08f2f9505c5e))
64
-
65
- # [2.5.0-cx24-2179.2.19](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.18...v2.5.0-cx24-2179.2.19) (2023-01-27)
66
-
67
-
68
- ### Fix
69
-
70
- * parent product customer types (#CX24-3175) ([411b2cc](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/411b2cc5a7cf687152dc346579766c8f923b795a)), closes [#CX24-3175](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3175)
71
-
72
- ### Update
73
-
74
- * clean ups - expose customerTypes (#CX24-3175) ([3b7d9b1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/3b7d9b12a9cf815b11a8af61621ab9ebc76c37b5)), closes [#CX24-3175](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3175)
75
-
76
46
  # [2.5.0-cx24-2179.2.18](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2179.2.17...v2.5.0-cx24-2179.2.18) (2023-01-26)
77
47
 
78
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.6.0-cx24-3372.7",
3
+ "version": "2.6.0-cx24-33721.1",
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,9 +31,9 @@
31
31
  "prettier": "1.19.1"
32
32
  },
33
33
  "dependencies": {
34
- "@nuskin/configuration-sdk": "1.0.1",
34
+ "@nuskin/configuration-sdk": "2.2.3",
35
35
  "@nuskin/ns-common-lib": "1.4.5",
36
- "@nuskin/ns-util": "3.107.0",
36
+ "@nuskin/ns-util": "4.2.4",
37
37
  "axios": "0.27.2",
38
38
  "qs": "6.11.0"
39
39
  },
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  const { getConfiguration } = require('@nuskin/configuration-sdk');
3
- const { getEnvironmentFromUrl } = require('@nuskin/ns-common-lib');
4
3
  const axios = require("axios");
5
4
  const contentstack = require('./contentstack/contentstack');
6
5
  const Product = require("./product");
@@ -18,14 +17,9 @@ const ProductData = {
18
17
  const localeMarket = `${locale}_${market}`;
19
18
 
20
19
  if (isEquinoxEnabled) {
21
- let config = (await getConfiguration({
22
- configMapNames: ['Equinox_Markets'],
23
- country: market,
24
- environment: contentstackEnv(),
25
- clientId: '735b1eb810304bba966af0891ab54053'
26
- }));
27
-
28
- if (config.Equinox_Markets.country_code === market && config.Equinox_Markets.active) {
20
+ const config = (await getConfiguration(['Equinox_Markets'])).Equinox_Markets;
21
+
22
+ if (config.country_code === market && config.active) {
29
23
  return await this.getProductFromEquinox(skus, localeMarket, config);
30
24
  }
31
25
  }
@@ -48,14 +42,14 @@ const ProductData = {
48
42
  const filter = skuFilter.join(" OR ")
49
43
  axios.defaults.withCredentials = true;
50
44
 
51
- const url = `${config.Equinox_Markets.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
45
+ const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
52
46
  const href = `${url}?filter='\\\\''${encodeURI(filter)}'\\''`;
53
47
  const response = await axios.request({
54
48
  method: 'get',
55
49
  url: href,
56
50
  params: {
57
51
  locale,
58
- storeId: config.Equinox_Markets.store_id
52
+ storeId: config.store_id
59
53
  },
60
54
  headers: this.getEquinoxRequestHeaders(),
61
55
  responseType: 'json'
@@ -615,12 +609,4 @@ const ProductData = {
615
609
  }
616
610
  }
617
611
 
618
- function contentstackEnv() {
619
- if (typeof window === 'undefined') {
620
- return 'test';
621
- }
622
-
623
- return (getEnvironmentFromUrl(window.location.host) != "prod") ? "test" : "prod";
624
- }
625
-
626
612
  module.exports = ProductData;