@nuskin/ns-product-lib 2.5.1-cx24-3503.2.1 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,27 +1,40 @@
1
- ## [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)
1
+ ## [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)
2
2
 
3
3
 
4
4
  ### Fix
5
5
 
6
- * 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)
6
+ * 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)
7
7
 
8
- # [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)
8
+ # [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)
9
9
 
10
10
 
11
- ### New
11
+ ### Fix
12
12
 
13
- * 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)
13
+ * 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)
14
+ * 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)
15
+ * 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)
16
+ * 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)
17
+ * 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)
18
+ * 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)
19
+ * 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)
20
+
21
+ ### Release
14
22
 
15
- # [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)
23
+ * Automated changes by GitLab pipeline [skip ci] ([fa35816](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fa35816ef50672ceaac01173d55615d88cb2c75b))
24
+
25
+ ## [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)
16
26
 
17
27
 
18
28
  ### Fix
19
29
 
20
- * 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)
30
+ * 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)
21
31
 
22
- ### Update
32
+ # [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)
23
33
 
24
- * 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)
34
+
35
+ ### New
36
+
37
+ * 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)
25
38
 
26
39
  # [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)
27
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.5.1-cx24-3503.2.1",
3
+ "version": "2.5.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
  }
@@ -36,14 +30,14 @@ const ProductData = {
36
30
  const filter = `{"filters": [{"field": "index_key_skuId","operation": "IN", "value": "${skus.toString()}"}]}`;
37
31
  axios.defaults.withCredentials = true;
38
32
 
39
- const url = `${config.Equinox_Markets.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
33
+ const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
40
34
  const href = `${url}?filter=${encodeURI(filter)}`;
41
35
  const response = await axios.request({
42
36
  method: 'get',
43
37
  url: href,
44
38
  params: {
45
39
  locale,
46
- storeId: config.Equinox_Markets.store_id
40
+ storeId: config.store_id
47
41
  },
48
42
  headers: this.getEquinoxRequestHeaders(),
49
43
  responseType: 'json'
@@ -602,12 +596,4 @@ const ProductData = {
602
596
  }
603
597
  }
604
598
 
605
- function contentstackEnv() {
606
- if (typeof window === 'undefined') {
607
- return 'test';
608
- }
609
-
610
- return (getEnvironmentFromUrl(window.location.host) != "prod") ? "test" : "prod";
611
- }
612
-
613
599
  module.exports = ProductData;