@nuskin/ns-product-lib 2.5.0-cx24-2931.1.4 → 2.5.0-cx24-2931.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +20 -0
- package/package.json +1 -1
- package/src/contentstack/contentstack.js +0 -1
- package/src/productData.js +5 -8
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
# [2.5.0-cx24-2931.1.6](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.5...v2.5.0-cx24-2931.1.6) (2022-12-14)
|
2
|
+
|
3
|
+
|
4
|
+
### Update
|
5
|
+
|
6
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([527d80f](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/527d80fee9396e87cf1e92c223790c33bcba681f))
|
7
|
+
|
8
|
+
# [2.5.0-cx24-2931.1.5](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.4...v2.5.0-cx24-2931.1.5) (2022-12-14)
|
9
|
+
|
10
|
+
|
11
|
+
### New
|
12
|
+
|
13
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([0373219](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/03732199ae3864b9d690b58523011598187356ea))
|
14
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([34b6954](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/34b6954dcd751a390ee2395fe1a3ca42481affc8))
|
15
|
+
|
16
|
+
### Update
|
17
|
+
|
18
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([6cf3a1d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/6cf3a1d38cc0af3affade68d441a30a4b9dc7789))
|
19
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([11655c4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/11655c46484aa6e6e359522c707c64f496755976))
|
20
|
+
|
1
21
|
# [2.5.0-cx24-2931.1.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.3...v2.5.0-cx24-2931.1.4) (2022-12-14)
|
2
22
|
|
3
23
|
|
package/package.json
CHANGED
@@ -21,7 +21,6 @@ function usePlatformSpecificVariables() {
|
|
21
21
|
}
|
22
22
|
|
23
23
|
function useWebEnvironment() {
|
24
|
-
console.log('web');
|
25
24
|
const env = getEnvironmentFromUrl(window.location.host);
|
26
25
|
const envConfig = config.getCredentials(env);
|
27
26
|
const baseURL = `${envConfig.url}/stacks/${envConfig.apiKey}?environment=${envConfig.env}`;
|
package/src/productData.js
CHANGED
@@ -24,27 +24,24 @@ const ProductData = {
|
|
24
24
|
clientId: '735b1eb810304bba966af0891ab54053'
|
25
25
|
})).Equinox_Markets;
|
26
26
|
|
27
|
-
|
28
|
-
console.log(skus, locale, market);
|
29
|
-
return await this.getProductFromEquinox(skus, localeMarket, config.store_id);
|
30
|
-
}
|
27
|
+
return await this.getProductFromEquinox(skus, localeMarket, config);
|
31
28
|
}
|
32
29
|
|
33
30
|
return await this.getProductFromLegacy(skus, localeMarket);
|
34
31
|
},
|
35
32
|
|
36
|
-
getProductFromEquinox: async function (skus, locale,
|
37
|
-
const filter =
|
33
|
+
getProductFromEquinox: async function (skus, locale, config) {
|
34
|
+
const filter = `{"filters": [{"field": "index_key_skuId","operation": "IN", "value": "${skus.toString()}"}]}`;
|
38
35
|
axios.defaults.withCredentials = true;
|
39
36
|
|
40
|
-
const url =
|
37
|
+
const url = `${config.API_Base_URLs}/orchestrationservices/storefront/catalogs/search/`;
|
41
38
|
const href = `${url}?filter=${encodeURI(filter)}`;
|
42
39
|
const response = await axios.request({
|
43
40
|
method: 'get',
|
44
41
|
url: href,
|
45
42
|
params: {
|
46
43
|
locale,
|
47
|
-
storeId:
|
44
|
+
storeId: config.store_id
|
48
45
|
},
|
49
46
|
headers: this.getEquinoxRequestHeaders(),
|
50
47
|
responseType: 'json'
|