@nuskin/ns-product-lib 2.5.0-cx24-2931.1.4 → 2.5.0-cx24-2931.1.5
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -0
- package/package.json +1 -1
- package/src/contentstack/contentstack.js +0 -1
- package/src/productData.js +6 -9
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
# [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)
|
2
|
+
|
3
|
+
|
4
|
+
### New
|
5
|
+
|
6
|
+
* 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))
|
7
|
+
* 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))
|
8
|
+
|
9
|
+
### Update
|
10
|
+
|
11
|
+
* 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))
|
12
|
+
* 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))
|
13
|
+
|
1
14
|
# [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
15
|
|
3
16
|
|
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
@@ -19,32 +19,29 @@ const ProductData = {
|
|
19
19
|
if (isEquinoxEnabled) {
|
20
20
|
const config = (await getConfiguration({
|
21
21
|
configMapNames: ['Equinox_Markets'],
|
22
|
-
country:
|
22
|
+
country: locale.split('_')[1],
|
23
23
|
environment: 'test',
|
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'
|