@techstuff-dev/foundation-api-utils 1.34.0 → 1.34.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/dist/index.esm.js +0 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -897,14 +897,12 @@ var authDataBaseQueryWithReauth = function (args, api, extraOptions) { return __
|
|
|
897
897
|
case 0: return [4 /*yield*/, authDataBaseQuery(args, api, extraOptions)];
|
|
898
898
|
case 1:
|
|
899
899
|
result = _b.sent();
|
|
900
|
-
console.log('authDataBaseQueryWithReauth: ', result);
|
|
901
900
|
if (!(((_a = result === null || result === void 0 ? void 0 : result.error) === null || _a === void 0 ? void 0 : _a.status) === 401)) return [3 /*break*/, 6];
|
|
902
901
|
return [4 /*yield*/, Auth.currentAuthenticatedUser({
|
|
903
902
|
bypassCache: true, // Ensures that the user is refreshed from the server
|
|
904
903
|
})];
|
|
905
904
|
case 2:
|
|
906
905
|
authSession = _b.sent();
|
|
907
|
-
console.log('authDataBaseQueryWithReauth: ', authSession);
|
|
908
906
|
user = formatAuthSession(authSession);
|
|
909
907
|
api.dispatch(setCredentials(user));
|
|
910
908
|
if (!(authSession === null || authSession === void 0 ? void 0 : authSession.tokens)) return [3 /*break*/, 4];
|
|
@@ -1225,7 +1223,6 @@ var dataBaseQuery = fetchBaseQuery({
|
|
|
1225
1223
|
return [4 /*yield*/, Auth.currentSession()];
|
|
1226
1224
|
case 1:
|
|
1227
1225
|
session = _c.sent();
|
|
1228
|
-
console.log('session', session);
|
|
1229
1226
|
idToken = session.getIdToken().getJwtToken();
|
|
1230
1227
|
accessToken = session.getAccessToken().getJwtToken();
|
|
1231
1228
|
if (accessToken && idToken) {
|
|
@@ -1250,7 +1247,6 @@ var dataBaseQueryWithReauth = function (args, api, extraOptions) { return __awai
|
|
|
1250
1247
|
case 0: return [4 /*yield*/, dataBaseQuery(args, api, extraOptions)];
|
|
1251
1248
|
case 1:
|
|
1252
1249
|
result = _b.sent();
|
|
1253
|
-
console.log('result', result);
|
|
1254
1250
|
if (!(((_a = result === null || result === void 0 ? void 0 : result.error) === null || _a === void 0 ? void 0 : _a.status) === 401)) return [3 /*break*/, 6];
|
|
1255
1251
|
return [4 /*yield*/, Auth.currentAuthenticatedUser({
|
|
1256
1252
|
bypassCache: true, // Ensures that the user is refreshed from the server
|
|
@@ -1337,7 +1333,6 @@ var cartSlice = createSlice({
|
|
|
1337
1333
|
return __assign(__assign({}, state), { taxRate: action.payload, taxAmount: taxAmount, grossTotal: grossTotal });
|
|
1338
1334
|
},
|
|
1339
1335
|
resetTaxRate: function (state, action) {
|
|
1340
|
-
console.log('resetTaxRate', action);
|
|
1341
1336
|
return __assign(__assign({}, state), { taxRate: {
|
|
1342
1337
|
country: 'none',
|
|
1343
1338
|
percentage: 0,
|
|
@@ -1356,7 +1351,6 @@ var cartSlice = createSlice({
|
|
|
1356
1351
|
}, taxAmount: taxAmount, grossTotal: grossTotal });
|
|
1357
1352
|
},
|
|
1358
1353
|
removePromoCode: function (state, action) {
|
|
1359
|
-
console.log('removePromoCode', action);
|
|
1360
1354
|
var netTotal = state.netTotal, taxRate = state.taxRate;
|
|
1361
1355
|
var taxAmount = applyTax(taxRate, netTotal);
|
|
1362
1356
|
var grossTotal = netTotal + taxAmount;
|