@nuskin/ns-shop 7.3.0-pa-1.6 → 7.3.0-td-924.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/ns-shop",
|
|
3
|
-
"version": "7.3.0-
|
|
3
|
+
"version": "7.3.0-td-924.1",
|
|
4
4
|
"description": "The description that will amaze and astound your audience when they read it",
|
|
5
5
|
"main": "src/shop.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"@nuskin/ns-common-lib": "1.4.7",
|
|
27
27
|
"@nuskin/ns-feature-flags": "1.4.7",
|
|
28
28
|
"@nuskin/ns-loyalty-web": "1.5.6",
|
|
29
|
-
"@nuskin/ns-product-lib": "2.
|
|
29
|
+
"@nuskin/ns-product-lib": "2.20.0-td-1000.1",
|
|
30
30
|
"@nuskin/nuskinjquery": "2.3.1",
|
|
31
31
|
"@nuskin/order-model": "3.1.3",
|
|
32
|
-
"@nuskin/product-lib": "2.
|
|
33
|
-
"axios": "1.
|
|
32
|
+
"@nuskin/product-lib": "2.4.0-td-1000.1",
|
|
33
|
+
"axios": "1.8.1",
|
|
34
34
|
"decimal.js": "10.4.3",
|
|
35
35
|
"jp-conversion": "0.0.7",
|
|
36
36
|
"lodash": "4.17.21",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@babel/preset-env": "^7.23.8",
|
|
41
|
-
"@nuskin/configuration-sdk": "
|
|
41
|
+
"@nuskin/configuration-sdk": "3.0.0",
|
|
42
42
|
"@nuskin/exclusive-offer-sdk": "1.2.4",
|
|
43
43
|
"@nuskin/ns-account": "5.9.2",
|
|
44
44
|
"@nuskin/ns-jsanalyzer": "1.0.1",
|
|
45
|
-
"@nuskin/ns-product": "3.
|
|
46
|
-
"@nuskin/ns-util": "4.
|
|
45
|
+
"@nuskin/ns-product": "3.51.0-td-1000.1",
|
|
46
|
+
"@nuskin/ns-util": "4.6.1",
|
|
47
47
|
"axios-mock-adapter": "1.22.0",
|
|
48
48
|
"babel-cli": "6.26.0",
|
|
49
49
|
"babel-core": "6.26.3",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"moment": "2.29.4",
|
|
91
91
|
"json5": "2.2.3",
|
|
92
92
|
"ip": "2.0.1",
|
|
93
|
-
"axios": "1.
|
|
93
|
+
"axios": "1.8.1",
|
|
94
94
|
"merge": "2.1.1",
|
|
95
95
|
"glob-parent": "6.0.2",
|
|
96
96
|
"follow-redirects": "1.15.5",
|
package/src/cart/cartService.js
CHANGED
|
@@ -821,7 +821,7 @@ function syncCartItemToSapItem(sapItemKey, cartItemKey = null) {
|
|
|
821
821
|
cartItem.qtyRedeemWithPoints = sapItem.qtyRedeemWithPoints;
|
|
822
822
|
cartItem.product.subPriceFlag = sapItem.product.subPriceFlag;
|
|
823
823
|
cart.addCartItem(cartItem, true);
|
|
824
|
-
setCart(cart);
|
|
824
|
+
setCart(cart, false);
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
827
|
|
|
@@ -296,7 +296,12 @@ async function getEquinoxRequestConfiguration() {
|
|
|
296
296
|
const config = (await getConfiguration(['Equinox_Markets'])).Equinox_Markets;
|
|
297
297
|
|
|
298
298
|
// Use MySite_API_Base_URLs if it is in MySite or MSCART
|
|
299
|
-
const
|
|
299
|
+
const isMysite = cartType === shoppingContextCartTypes.storefront || window.location.hostname.includes(".mynuskin.com");
|
|
300
|
+
const baseURL = isMysite ? config.MySite_API_Base_URLs : config.API_Base_URLs;
|
|
301
|
+
|
|
302
|
+
let mySiteKongURL = baseURL.includes(isMysite ? "storefront" : "apis")
|
|
303
|
+
? baseURL
|
|
304
|
+
: `${baseURL}/orchestrationservices/storefront`;
|
|
300
305
|
|
|
301
306
|
const equinoxMarket = {
|
|
302
307
|
market_name: config.market_name,
|
|
@@ -335,7 +340,7 @@ async function _equinoxRequest(options) {
|
|
|
335
340
|
|
|
336
341
|
let axiosRequest = {
|
|
337
342
|
method: options.method,
|
|
338
|
-
url: `${mySiteKongURL}
|
|
343
|
+
url: `${mySiteKongURL}/${options.endpoint}`,
|
|
339
344
|
headers:{...defaultHeaders, ... options.headers },
|
|
340
345
|
withCredentials: (options.method !== "DELETE"),
|
|
341
346
|
params: (options.params) ? options.params : defaultEquinoxParams
|
package/src/shop.js
CHANGED
|
@@ -65,7 +65,6 @@ export {default as AccertifyFraudService} from './payment/accertifyFraudService.
|
|
|
65
65
|
export {default as EquinoxCartService} from './cart/equinoxCartService.js';
|
|
66
66
|
export {default as eidLogin} from './eidLogin';
|
|
67
67
|
export {default as Receiver} from './receiver';
|
|
68
|
-
export {default as AgreementService} from './account/agreementService.js'
|
|
69
68
|
|
|
70
69
|
export {PriceType, Agelocme, Product, ProductStatus} from '@nuskin/ns-product-lib';
|
|
71
70
|
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {UrlService} from "@nuskin/ns-util";
|
|
2
|
-
import axios from 'axios'
|
|
3
|
-
|
|
4
|
-
const downConvertAgreedToTerms = async (sapId, authToken) => {
|
|
5
|
-
let retVal = true;
|
|
6
|
-
|
|
7
|
-
try {
|
|
8
|
-
const result = await axios.get(
|
|
9
|
-
`${UrlService.getApisUrl()}/account-enrollment/agreement-terms/${sapId}`,
|
|
10
|
-
{
|
|
11
|
-
headers: {
|
|
12
|
-
Authorization: `Bearer ${authToken}`
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
)
|
|
16
|
-
retVal = result.data.agreedTerms;
|
|
17
|
-
} catch (e) {
|
|
18
|
-
console.error('agreement-terms check failed', e)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return retVal
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const setDownConvertAgreedToTerms = async (sapId, authToken) => {
|
|
25
|
-
let succeeded = true
|
|
26
|
-
try {
|
|
27
|
-
await axios.post(`${UrlService.getApisUrl()}/account-enrollment/agreement-terms`, {
|
|
28
|
-
agreedTerms: true,
|
|
29
|
-
sapId
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
headers: {
|
|
33
|
-
Authorization: `Bearer ${authToken}`
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
} catch (e) {
|
|
37
|
-
console.error('Failed setting agreement to terms', e);
|
|
38
|
-
succeeded = false;
|
|
39
|
-
}
|
|
40
|
-
return succeeded;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
downConvertAgreedToTerms,
|
|
45
|
-
setDownConvertAgreedToTerms
|
|
46
|
-
};
|