@nuskin/ns-product-lib 2.9.0-cx24-4091.1 → 2.9.0-cx24-4460.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,18 @@
1
- # [2.9.0-cx24-4091.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0...v2.9.0-cx24-4091.1) (2023-05-15)
1
+ # [2.9.0-cx24-4460.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.9.0-cx24-4460.1...v2.9.0-cx24-4460.2) (2023-06-21)
2
2
 
3
3
 
4
- ### Update
4
+ ### New
5
+
6
+ * Change API Base URLs for My Site ([f6e2cbf](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/f6e2cbf3ce9bcbd1c8fa85c53b8000de8048d3fc))
7
+ * Change API Base URLs for My Site ([5621d64](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/5621d64be86d75c91837e11ca8f4267c49707971))
8
+
9
+ # [2.9.0-cx24-4460.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0...v2.9.0-cx24-4460.1) (2023-06-20)
10
+
11
+
12
+ ### New
5
13
 
6
- * Bump configuration sdk ([49e9d9f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/49e9d9f2e658a6f17a7d5df13ccb7d05f5aa9508))
14
+ * Change API Base URLs for My Site ([fb2e309](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/fb2e30953e6e9089da20ac367bad9bf63300a89c))
15
+ * Change API Base URLs for My Site ([1f9ba11](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1f9ba11f63ef85e9a444e39080e9277a41fa004d))
7
16
 
8
17
  # [2.8.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.1...v2.8.0) (2023-05-02)
9
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.9.0-cx24-4091.1",
3
+ "version": "2.9.0-cx24-4460.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": {
@@ -31,7 +31,7 @@
31
31
  "prettier": "1.19.1"
32
32
  },
33
33
  "dependencies": {
34
- "@nuskin/configuration-sdk": "2.2.5",
34
+ "@nuskin/configuration-sdk": "2.2.3",
35
35
  "@nuskin/ns-common-lib": "1.4.5",
36
36
  "@nuskin/ns-util": "4.3.2",
37
37
  "axios": "0.27.2",
@@ -68,7 +68,10 @@ const ProductData = {
68
68
 
69
69
  const filter = skuFilter.join(" OR ")
70
70
 
71
- const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
71
+ let url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
72
+ if (window && window.aem && window.aem.ShoppingContext && window.aem.ShoppingContext.getShoppingContext().context === 'storefront') {
73
+ url = `${config.MySite_API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
74
+ }
72
75
  const href = `${url}?filter='\\\\''${encodeURI(filter)}'\\''`;
73
76
  axios.interceptors.response.use((res) => res, productNotFoundInterceptor);
74
77
  const response = await axios.request({
@@ -513,7 +516,7 @@ const ProductData = {
513
516
  };
514
517
  },
515
518
 
516
- mapEquinoxSKUExists: function(exists) {
519
+ mapEquinoxSKUExists: function (exists) {
517
520
  // this could be avoided if only we are using response mapper
518
521
  // for equinox products that exists.
519
522
  // @todo: clean-up