@nuskin/ns-product-lib 2.5.0-cx24-2931.1.3 → 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 +20 -0
- package/package.json +1 -1
- package/src/contentstack/contentstack.js +0 -1
- package/src/productData.js +8 -11
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
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
|
+
|
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)
|
15
|
+
|
16
|
+
|
17
|
+
### Update
|
18
|
+
|
19
|
+
* use configuration-sdk to pull the configurations (CX24-2931) ([9abdf43](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/9abdf4326fa55692045f5a3cc91f5725afe94cb2))
|
20
|
+
|
1
21
|
# [2.5.0-cx24-2931.1.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.5.0-cx24-2931.1.2...v2.5.0-cx24-2931.1.3) (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
@@ -17,34 +17,31 @@ const ProductData = {
|
|
17
17
|
const localeMarket = `${locale}_${market}`;
|
18
18
|
|
19
19
|
if (isEquinoxEnabled) {
|
20
|
-
const config = await getConfiguration({
|
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
|
-
});
|
26
|
-
console.log(config);
|
25
|
+
})).Equinox_Markets;
|
27
26
|
|
28
|
-
|
29
|
-
// return await this.getProductFromEquinox(skus, localeMarket, 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'
|