@zeniai/client-epic-state 4.12.55 → 4.12.56
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/lib/entity/chargeCard/chargeCard.d.ts +5 -2
- package/lib/entity/chargeCard/chargeCard.js +2 -0
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +4 -2
- package/lib/entity/chargeCard/chargeCardPayload.js +44 -27
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
- package/lib/epic.d.ts +7 -1
- package/lib/epic.js +7 -1
- package/lib/index.d.ts +12 -8
- package/lib/index.js +40 -22
- package/lib/reducer.d.ts +4 -1
- package/lib/reducer.js +4 -1
- package/lib/view/addressView/addressViewReducer.d.ts +2 -0
- package/lib/view/addressView/addressViewReducer.js +13 -2
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
- package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +8 -1
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/settingsView/epic/fetchMyProfileEpic.d.ts +12 -2
- package/lib/view/settingsView/epic/fetchMyProfileEpic.js +10 -2
- package/lib/view/settingsView/epic/initializeMyProfileLocalDataEpic.d.ts +7 -0
- package/lib/view/settingsView/epic/initializeMyProfileLocalDataEpic.js +50 -0
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/settingsView/epic/updateMyProfileEpic.d.ts +11 -0
- package/lib/view/settingsView/epic/updateMyProfileEpic.js +86 -0
- package/lib/view/settingsView/settingsViewPayload.d.ts +12 -0
- package/lib/view/settingsView/settingsViewReducer.d.ts +13 -2
- package/lib/view/settingsView/settingsViewReducer.js +82 -7
- package/lib/view/settingsView/settingsViewSelector.js +14 -2
- package/lib/view/settingsView/settingsViewState.d.ts +16 -4
- package/lib/view/settingsView/types/settingsViewSelectorTypes.d.ts +11 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +13 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +94 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +18 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +34 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +20 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +50 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +16 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +2 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +20 -6
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +8 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +3 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +8 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +43 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +9 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +49 -9
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListEpic.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListEpic.js +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +6 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/issueChargeCardEpic.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/issueChargeCardEpic.js +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/resendCardInviteEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/resendCardInviteEpic.js +31 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/revokeCardInviteEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/revokeCardInviteEpic.js +29 -0
- package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
- package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
- package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +3 -1
- package/lib/view/twoFactorAuthentication/resendOtpEpic.js +30 -0
- package/lib/view/twoFactorAuthentication/sendOtpEpic.d.ts +3 -1
- package/lib/view/twoFactorAuthentication/sendOtpEpic.js +30 -0
- package/lib/view/twoFactorAuthentication/twoFactorAuthentication.d.ts +1 -1
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationSelector.d.ts +12 -0
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationSelector.js +7 -0
- package/lib/view/twoFactorAuthentication/verifyOtpEpic.d.ts +3 -1
- package/lib/view/twoFactorAuthentication/verifyOtpEpic.js +26 -0
- package/lib/view/userListView/fetchUserListByTypeEpic.js +3 -1
- package/lib/view/userListView/userListViewReducer.js +1 -0
- package/lib/view/userListView/userListViewState.d.ts +2 -1
- package/package.json +1 -1
|
@@ -8,6 +8,8 @@ const twoFactorAuthenticationReducer_1 = require("./twoFactorAuthenticationReduc
|
|
|
8
8
|
const setupViewReducer_1 = require("../spendManagement/commonSetup/setupViewReducer");
|
|
9
9
|
const vendorViewReducer_1 = require("../commonVendorView/vendorView/vendorViewReducer");
|
|
10
10
|
const onboardingCustomerViewReducer_1 = require("../onboardingView/customerView/onboardingCustomerViewReducer");
|
|
11
|
+
const settingsViewReducer_1 = require("../settingsView/settingsViewReducer");
|
|
12
|
+
const cardUserOnboardingReducer_1 = require("../spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer");
|
|
11
13
|
const resendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(twoFactorAuthenticationReducer_1.resendOtp.match), (0, operators_1.mergeMap)((action) => {
|
|
12
14
|
const resendOtpActions = [];
|
|
13
15
|
const { otpChallenge, twoFASource } = action.payload;
|
|
@@ -25,6 +27,12 @@ const resendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
25
27
|
case 'CustomerOnboarding':
|
|
26
28
|
resendOtpActions.push((0, onboardingCustomerViewReducer_1.resendOnboardingOfficerOtp)());
|
|
27
29
|
break;
|
|
30
|
+
case 'MyProfile':
|
|
31
|
+
resendOtpActions.push((0, settingsViewReducer_1.resendOtpMyProfile)());
|
|
32
|
+
break;
|
|
33
|
+
case 'CardUserOnboarding':
|
|
34
|
+
resendOtpActions.push((0, cardUserOnboardingReducer_1.resendOtpCardUserOnboarding)());
|
|
35
|
+
break;
|
|
28
36
|
}
|
|
29
37
|
const resendOtp$ = zeniAPI
|
|
30
38
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/otp/resend`, payload)
|
|
@@ -49,6 +57,16 @@ const resendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
49
57
|
otpChallenge: response.data.otp_challenge,
|
|
50
58
|
}));
|
|
51
59
|
break;
|
|
60
|
+
case 'MyProfile':
|
|
61
|
+
updateActions.push((0, settingsViewReducer_1.sendOtpMyProfileSuccess)({
|
|
62
|
+
otpChallenge: response.data.otp_challenge,
|
|
63
|
+
}));
|
|
64
|
+
break;
|
|
65
|
+
case 'CardUserOnboarding':
|
|
66
|
+
updateActions.push((0, cardUserOnboardingReducer_1.sendOtpCardUserOnboardingSuccess)({
|
|
67
|
+
otpChallenge: response.data.otp_challenge,
|
|
68
|
+
}));
|
|
69
|
+
break;
|
|
52
70
|
}
|
|
53
71
|
return (0, rxjs_1.from)(updateActions);
|
|
54
72
|
}
|
|
@@ -66,6 +84,12 @@ const resendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
66
84
|
case 'CustomerOnboarding':
|
|
67
85
|
updateActions.push((0, onboardingCustomerViewReducer_1.sendOnboardingOfficerOtpFailure)(response.status));
|
|
68
86
|
break;
|
|
87
|
+
case 'MyProfile':
|
|
88
|
+
updateActions.push((0, settingsViewReducer_1.sendOtpMyProfileFailure)(response.status));
|
|
89
|
+
break;
|
|
90
|
+
case 'CardUserOnboarding':
|
|
91
|
+
updateActions.push((0, cardUserOnboardingReducer_1.sendOtpCardUserOnboardingFailure)(response.status));
|
|
92
|
+
break;
|
|
69
93
|
}
|
|
70
94
|
return (0, rxjs_1.from)(updateActions);
|
|
71
95
|
}
|
|
@@ -82,6 +106,12 @@ const resendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
82
106
|
case 'CustomerOnboarding':
|
|
83
107
|
updateActions.push((0, onboardingCustomerViewReducer_1.sendOnboardingOfficerOtpFailure)(zeniAPIStatus));
|
|
84
108
|
break;
|
|
109
|
+
case 'MyProfile':
|
|
110
|
+
updateActions.push((0, settingsViewReducer_1.sendOtpMyProfileFailure)(zeniAPIStatus));
|
|
111
|
+
break;
|
|
112
|
+
case 'CardUserOnboarding':
|
|
113
|
+
updateActions.push((0, cardUserOnboardingReducer_1.sendOtpCardUserOnboardingFailure)(zeniAPIStatus));
|
|
114
|
+
break;
|
|
85
115
|
}
|
|
86
116
|
return (0, rxjs_1.from)(updateActions);
|
|
87
117
|
}));
|
|
@@ -6,5 +6,7 @@ import { sendOtp, sendOtpSuccess, sendOtpFailure } from './twoFactorAuthenticati
|
|
|
6
6
|
import { sendOtpSpendManagementSetUp, sendOtpSuccessSpendManagementSetUp, sendOtpFailureSpendManagementSetUp } from '../spendManagement/commonSetup/setupViewReducer';
|
|
7
7
|
import { sendOtpVendorView, sendOtpVendorViewSuccess, sendOtpVendorViewFailure } from '../commonVendorView/vendorView/vendorViewReducer';
|
|
8
8
|
import { sendOnboardingOfficerOtp, sendOnboardingOfficerOtpSuccess, sendOnboardingOfficerOtpFailure } from '../onboardingView/customerView/onboardingCustomerViewReducer';
|
|
9
|
-
|
|
9
|
+
import { sendOtpMyProfile, sendOtpMyProfileFailure, sendOtpMyProfileSuccess } from '../settingsView/settingsViewReducer';
|
|
10
|
+
import { sendOtpCardUserOnboardingSuccess, sendOtpCardUserOnboarding, sendOtpCardUserOnboardingFailure } from '../spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
|
|
11
|
+
export declare type ActionType = ReturnType<typeof sendOtp> | ReturnType<typeof sendOtpSuccess> | ReturnType<typeof sendOtpFailure> | ReturnType<typeof sendOtpSpendManagementSetUp> | ReturnType<typeof sendOtpSuccessSpendManagementSetUp> | ReturnType<typeof sendOtpFailureSpendManagementSetUp> | ReturnType<typeof sendOtpVendorView> | ReturnType<typeof sendOtpVendorViewSuccess> | ReturnType<typeof sendOtpVendorViewFailure> | ReturnType<typeof sendOnboardingOfficerOtp> | ReturnType<typeof sendOnboardingOfficerOtpSuccess> | ReturnType<typeof sendOnboardingOfficerOtpFailure> | ReturnType<typeof sendOtpCardUserOnboarding> | ReturnType<typeof sendOtpCardUserOnboardingSuccess> | ReturnType<typeof sendOtpCardUserOnboardingFailure> | ReturnType<typeof sendOtpMyProfile> | ReturnType<typeof sendOtpMyProfileFailure> | ReturnType<typeof sendOtpMyProfileSuccess>;
|
|
10
12
|
export declare const sendOtpEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -8,6 +8,8 @@ const twoFactorAuthenticationReducer_1 = require("./twoFactorAuthenticationReduc
|
|
|
8
8
|
const setupViewReducer_1 = require("../spendManagement/commonSetup/setupViewReducer");
|
|
9
9
|
const vendorViewReducer_1 = require("../commonVendorView/vendorView/vendorViewReducer");
|
|
10
10
|
const onboardingCustomerViewReducer_1 = require("../onboardingView/customerView/onboardingCustomerViewReducer");
|
|
11
|
+
const settingsViewReducer_1 = require("../settingsView/settingsViewReducer");
|
|
12
|
+
const cardUserOnboardingReducer_1 = require("../spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer");
|
|
11
13
|
const sendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(twoFactorAuthenticationReducer_1.sendOtp.match), (0, operators_1.mergeMap)((action) => {
|
|
12
14
|
const sendOtpActions = [];
|
|
13
15
|
const { phoneNumber, twoFASource } = action.payload;
|
|
@@ -28,6 +30,12 @@ const sendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_
|
|
|
28
30
|
case 'CustomerOnboarding':
|
|
29
31
|
sendOtpActions.push((0, onboardingCustomerViewReducer_1.sendOnboardingOfficerOtp)());
|
|
30
32
|
break;
|
|
33
|
+
case 'MyProfile':
|
|
34
|
+
sendOtpActions.push((0, settingsViewReducer_1.sendOtpMyProfile)());
|
|
35
|
+
break;
|
|
36
|
+
case 'CardUserOnboarding':
|
|
37
|
+
sendOtpActions.push((0, cardUserOnboardingReducer_1.sendOtpCardUserOnboarding)());
|
|
38
|
+
break;
|
|
31
39
|
}
|
|
32
40
|
const setOtp$ = zeniAPI
|
|
33
41
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/otp/send`, queryPayload)
|
|
@@ -52,6 +60,16 @@ const sendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_
|
|
|
52
60
|
otpChallenge: response.data.otp_challenge,
|
|
53
61
|
}));
|
|
54
62
|
break;
|
|
63
|
+
case 'MyProfile':
|
|
64
|
+
updateActions.push((0, settingsViewReducer_1.sendOtpMyProfileSuccess)({
|
|
65
|
+
otpChallenge: response.data.otp_challenge,
|
|
66
|
+
}));
|
|
67
|
+
break;
|
|
68
|
+
case 'CardUserOnboarding':
|
|
69
|
+
updateActions.push((0, cardUserOnboardingReducer_1.sendOtpCardUserOnboardingSuccess)({
|
|
70
|
+
otpChallenge: response.data.otp_challenge,
|
|
71
|
+
}));
|
|
72
|
+
break;
|
|
55
73
|
}
|
|
56
74
|
return (0, rxjs_1.from)(updateActions);
|
|
57
75
|
}
|
|
@@ -69,6 +87,12 @@ const sendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_
|
|
|
69
87
|
case 'CustomerOnboarding':
|
|
70
88
|
updateActions.push((0, onboardingCustomerViewReducer_1.sendOnboardingOfficerOtpFailure)(response.status));
|
|
71
89
|
break;
|
|
90
|
+
case 'MyProfile':
|
|
91
|
+
updateActions.push((0, settingsViewReducer_1.sendOtpMyProfileFailure)(response.status));
|
|
92
|
+
break;
|
|
93
|
+
case 'CardUserOnboarding':
|
|
94
|
+
updateActions.push((0, cardUserOnboardingReducer_1.sendOtpCardUserOnboardingFailure)(response.status));
|
|
95
|
+
break;
|
|
72
96
|
}
|
|
73
97
|
return (0, rxjs_1.from)(updateActions);
|
|
74
98
|
}
|
|
@@ -85,6 +109,12 @@ const sendOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_
|
|
|
85
109
|
case 'CustomerOnboarding':
|
|
86
110
|
updateActions.push((0, onboardingCustomerViewReducer_1.sendOnboardingOfficerOtpFailure)(zeniAPIStatus));
|
|
87
111
|
break;
|
|
112
|
+
case 'MyProfile':
|
|
113
|
+
updateActions.push((0, settingsViewReducer_1.sendOtpMyProfileFailure)(zeniAPIStatus));
|
|
114
|
+
break;
|
|
115
|
+
case 'CardUserOnboarding':
|
|
116
|
+
updateActions.push((0, cardUserOnboardingReducer_1.sendOtpCardUserOnboardingFailure)(zeniAPIStatus));
|
|
117
|
+
break;
|
|
88
118
|
}
|
|
89
119
|
return (0, rxjs_1.from)(updateActions);
|
|
90
120
|
}));
|
|
@@ -7,7 +7,7 @@ export interface TwoFactorAuthenticationState {
|
|
|
7
7
|
phone?: string;
|
|
8
8
|
otpChallenge?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare type TwoFASourceView = 'BillPayVendor' | 'ChargeCard' | 'SpendManagementSetup' | 'CustomerOnboarding';
|
|
10
|
+
export declare type TwoFASourceView = 'BillPayVendor' | 'ChargeCard' | 'SpendManagementSetup' | 'CardUserOnboarding' | 'MyProfile' | 'CustomerOnboarding';
|
|
11
11
|
export interface CustomerToken {
|
|
12
12
|
provider: string;
|
|
13
13
|
token: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FetchStateAndError } from '../../commonStateTypes/common';
|
|
2
|
+
import { View } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { RootState } from '../../reducer';
|
|
4
|
+
import { CustomerToken } from './twoFactorAuthentication';
|
|
5
|
+
export interface TwoFactorAuthenticationView extends View {
|
|
6
|
+
sendOtpStatus: FetchStateAndError;
|
|
7
|
+
otpVerificationStatus: FetchStateAndError;
|
|
8
|
+
customerToken?: CustomerToken;
|
|
9
|
+
phone?: string;
|
|
10
|
+
otpChallenge?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const getTwoFactorAuthenticationView: (state: RootState) => TwoFactorAuthenticationView;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTwoFactorAuthenticationView = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
exports.getTwoFactorAuthenticationView = (0, toolkit_1.createSelector)((state) => state.twoFactorAuthenticationState, (twoFAState) => {
|
|
6
|
+
return Object.assign({}, twoFAState);
|
|
7
|
+
});
|
|
@@ -6,5 +6,7 @@ import { verifyOtp, verifyOtpSuccess, verifyOtpFailure } from './twoFactorAuthen
|
|
|
6
6
|
import { verifyOtpFailureSpendManagementSetUp, verifyOtpSpendManagementSetUp, verifyOtpSuccessSpendManagementSetUp } from '../spendManagement/commonSetup/setupViewReducer';
|
|
7
7
|
import { verifyOtpVendorView, verifyOtpVendorViewFailure, verifyOtpVendorViewSuccess } from '../commonVendorView/vendorView/vendorViewReducer';
|
|
8
8
|
import { verifyOnboardingOfficerOtp, verifyOnboardingOfficerOtpSuccess, verifyOnboardingOfficerOtpFailure } from '../onboardingView/customerView/onboardingCustomerViewReducer';
|
|
9
|
-
|
|
9
|
+
import { verifyOtpMyProfile, verifyOtpMyProfileFailure, verifyOtpMyProfileSuccess } from '../settingsView/settingsViewReducer';
|
|
10
|
+
import { verifyOtpCardUserOnboardingSuccess, verifyOtpCardUserOnboarding, verifyOtpCardUserOnboardingFailure } from '../spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
|
|
11
|
+
export declare type ActionType = ReturnType<typeof verifyOtp> | ReturnType<typeof verifyOtpSuccess> | ReturnType<typeof verifyOtpFailure> | ReturnType<typeof verifyOtpSpendManagementSetUp> | ReturnType<typeof verifyOtpSuccessSpendManagementSetUp> | ReturnType<typeof verifyOtpFailureSpendManagementSetUp> | ReturnType<typeof verifyOtpVendorView> | ReturnType<typeof verifyOtpVendorViewSuccess> | ReturnType<typeof verifyOtpVendorViewFailure> | ReturnType<typeof verifyOnboardingOfficerOtp> | ReturnType<typeof verifyOnboardingOfficerOtpSuccess> | ReturnType<typeof verifyOnboardingOfficerOtpFailure> | ReturnType<typeof verifyOtpCardUserOnboarding> | ReturnType<typeof verifyOtpCardUserOnboardingSuccess> | ReturnType<typeof verifyOtpCardUserOnboardingFailure> | ReturnType<typeof verifyOtpMyProfile> | ReturnType<typeof verifyOtpMyProfileFailure> | ReturnType<typeof verifyOtpMyProfileSuccess>;
|
|
10
12
|
export declare const verifyOtpEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -8,6 +8,8 @@ const twoFactorAuthenticationReducer_1 = require("./twoFactorAuthenticationReduc
|
|
|
8
8
|
const setupViewReducer_1 = require("../spendManagement/commonSetup/setupViewReducer");
|
|
9
9
|
const vendorViewReducer_1 = require("../commonVendorView/vendorView/vendorViewReducer");
|
|
10
10
|
const onboardingCustomerViewReducer_1 = require("../onboardingView/customerView/onboardingCustomerViewReducer");
|
|
11
|
+
const settingsViewReducer_1 = require("../settingsView/settingsViewReducer");
|
|
12
|
+
const cardUserOnboardingReducer_1 = require("../spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer");
|
|
11
13
|
const verifyOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(twoFactorAuthenticationReducer_1.verifyOtp.match), (0, operators_1.mergeMap)((action) => {
|
|
12
14
|
const verifyOtpActions = [];
|
|
13
15
|
const { otpCode, otpChallenge, twoFASource } = action.payload;
|
|
@@ -25,6 +27,12 @@ const verifyOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
25
27
|
case 'CustomerOnboarding':
|
|
26
28
|
verifyOtpActions.push((0, onboardingCustomerViewReducer_1.verifyOnboardingOfficerOtp)());
|
|
27
29
|
break;
|
|
30
|
+
case 'MyProfile':
|
|
31
|
+
verifyOtpActions.push((0, settingsViewReducer_1.verifyOtpMyProfile)());
|
|
32
|
+
break;
|
|
33
|
+
case 'CardUserOnboarding':
|
|
34
|
+
verifyOtpActions.push((0, cardUserOnboardingReducer_1.verifyOtpCardUserOnboarding)());
|
|
35
|
+
break;
|
|
28
36
|
}
|
|
29
37
|
const verifyOtp$ = zeniAPI
|
|
30
38
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/otp/verify`, payload)
|
|
@@ -47,6 +55,12 @@ const verifyOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
47
55
|
case 'CustomerOnboarding':
|
|
48
56
|
updateActions.push((0, onboardingCustomerViewReducer_1.verifyOnboardingOfficerOtpSuccess)());
|
|
49
57
|
break;
|
|
58
|
+
case 'MyProfile':
|
|
59
|
+
updateActions.push((0, settingsViewReducer_1.verifyOtpMyProfileSuccess)());
|
|
60
|
+
break;
|
|
61
|
+
case 'CardUserOnboarding':
|
|
62
|
+
updateActions.push((0, cardUserOnboardingReducer_1.verifyOtpCardUserOnboardingSuccess)());
|
|
63
|
+
break;
|
|
50
64
|
}
|
|
51
65
|
return (0, rxjs_1.from)(updateActions);
|
|
52
66
|
}
|
|
@@ -64,6 +78,12 @@ const verifyOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
64
78
|
case 'CustomerOnboarding':
|
|
65
79
|
updateActions.push((0, onboardingCustomerViewReducer_1.verifyOnboardingOfficerOtpFailure)(response.status));
|
|
66
80
|
break;
|
|
81
|
+
case 'MyProfile':
|
|
82
|
+
updateActions.push((0, settingsViewReducer_1.verifyOtpMyProfileFailure)(response.status));
|
|
83
|
+
break;
|
|
84
|
+
case 'CardUserOnboarding':
|
|
85
|
+
updateActions.push((0, cardUserOnboardingReducer_1.verifyOtpCardUserOnboardingFailure)(response.status));
|
|
86
|
+
break;
|
|
67
87
|
}
|
|
68
88
|
return (0, rxjs_1.from)(updateActions);
|
|
69
89
|
}
|
|
@@ -82,6 +102,12 @@ const verifyOtpEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
82
102
|
case 'CustomerOnboarding':
|
|
83
103
|
updateActions.push((0, onboardingCustomerViewReducer_1.verifyOnboardingOfficerOtpFailure)(zeniAPIStatus));
|
|
84
104
|
break;
|
|
105
|
+
case 'MyProfile':
|
|
106
|
+
updateActions.push((0, settingsViewReducer_1.verifyOtpMyProfileFailure)(zeniAPIStatus));
|
|
107
|
+
break;
|
|
108
|
+
case 'CardUserOnboarding':
|
|
109
|
+
updateActions.push((0, cardUserOnboardingReducer_1.verifyOtpCardUserOnboardingFailure)(zeniAPIStatus));
|
|
110
|
+
break;
|
|
85
111
|
}
|
|
86
112
|
return (0, rxjs_1.from)(updateActions);
|
|
87
113
|
}));
|
|
@@ -8,7 +8,7 @@ const userRoleReducer_1 = require("../../entity/userRole/userRoleReducer");
|
|
|
8
8
|
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
9
9
|
const userListViewReducer_1 = require("./userListViewReducer");
|
|
10
10
|
const responsePayload_1 = require("../../responsePayload");
|
|
11
|
-
const fetchUserListByTypeEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(userListViewReducer_1.fetchUserListByType.match), (0, operators_1.
|
|
11
|
+
const fetchUserListByTypeEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(userListViewReducer_1.fetchUserListByType.match), (0, operators_1.mergeMap)((action) => {
|
|
12
12
|
const { userType, cacheOverride } = action.payload;
|
|
13
13
|
const state = state$.value;
|
|
14
14
|
const userListState = state.userListViewState.userListByType[userType];
|
|
@@ -49,6 +49,8 @@ const getQueryParam = (userType, isZeniTenant) => {
|
|
|
49
49
|
return { is_card_holder_candidate: true };
|
|
50
50
|
case 'taskManagerCandidate':
|
|
51
51
|
return { is_task_manager_candidate: true };
|
|
52
|
+
case 'cardAdmin':
|
|
53
|
+
return { is_card_admin_candidate: true };
|
|
52
54
|
default:
|
|
53
55
|
return { is_zeni: isZeniTenant };
|
|
54
56
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FetchedState, ID } from '../../commonStateTypes/common';
|
|
2
2
|
/***
|
|
3
3
|
manager: list of mangers shown in people tab invite flow
|
|
4
|
+
admin: list of admins shown in card user pormo screen
|
|
4
5
|
cardHolderCandidate: list of users whome chrge card can be issued
|
|
5
6
|
taskManagerCandidate: list of users who can have involvement in task management
|
|
6
7
|
***/
|
|
7
|
-
export declare type UserListType = 'manager' | 'cardHolderCandidate' | 'taskManagerCandidate';
|
|
8
|
+
export declare type UserListType = 'manager' | 'cardAdmin' | 'cardHolderCandidate' | 'taskManagerCandidate';
|
|
8
9
|
export interface UserIdsByType extends FetchedState {
|
|
9
10
|
ids: ID[];
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.56",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|