@zeniai/client-epic-state 4.16.1 → 4.16.2
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/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -1
- package/lib/entity/chargeCard/chargeCard.d.ts +26 -8
- package/lib/entity/chargeCard/chargeCard.js +25 -6
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +41 -5
- package/lib/entity/chargeCard/chargeCardPayload.js +20 -8
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.js +5 -1
- package/lib/entity/company/companyPayload.d.ts +12 -1
- package/lib/entity/company/companyPayload.js +14 -0
- package/lib/entity/company/companyStateTypes.d.ts +11 -0
- package/lib/entity/connectedAccount/connectedAccount.d.ts +19 -0
- package/lib/entity/connectedAccount/connectedAccount.js +10 -0
- package/lib/entity/connectedAccount/connectedAccountPayload.d.ts +11 -0
- package/lib/entity/connectedAccount/connectedAccountPayload.js +15 -0
- package/lib/entity/connectedAccount/connectedAccountReducer.d.ts +6 -0
- package/lib/entity/connectedAccount/connectedAccountReducer.js +27 -0
- package/lib/entity/connectedAccount/connectedAccountSelector.d.ts +4 -0
- package/lib/entity/connectedAccount/connectedAccountSelector.js +17 -0
- package/lib/entity/depositAccount/depositAccount.d.ts +20 -2
- package/lib/entity/depositAccount/depositAccountPayload.d.ts +22 -1
- package/lib/entity/depositAccount/depositAccountPayload.js +39 -1
- package/lib/entity/depositAccount/depositAccountReducer.d.ts +2 -2
- package/lib/entity/depositAccount/depositAccountReducer.js +8 -2
- package/lib/entity/depositAccount/depositAccountSelector.d.ts +3 -1
- package/lib/entity/depositAccount/depositAccountSelector.js +10 -0
- 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/tenant/tenantSelector.d.ts +6 -2
- package/lib/entity/tenant/tenantSelector.js +10 -2
- package/lib/epic.d.ts +5 -1
- package/lib/epic.js +5 -1
- package/lib/index.d.ts +18 -18
- package/lib/index.js +26 -17
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +8 -0
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +16 -0
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/dashboard/dashboardSelector.js +7 -6
- package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +5 -4
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +1 -2
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +18 -6
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +1 -4
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +7 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscatgorizedEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscatgorizedEpic.js +3 -3
- package/lib/view/expenseAutomationView/helpers/helpers.js +4 -4
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +27 -24
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +22 -9
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +2 -2
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +13 -5
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +245 -115
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +4 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -19
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +29 -9
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +108 -40
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +9 -1
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +40 -15
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +1 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -0
- package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +4 -4
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.d.ts +2 -1
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +2 -2
- package/lib/view/settingsView/settingsViewHelpers.d.ts +4 -4
- package/lib/view/settingsView/settingsViewHelpers.js +9 -8
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +6 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +20 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +5 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +9 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +1 -0
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +4 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigPayload.d.ts +5 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigPayload.js +4 -2
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +8 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigState.d.ts +4 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +12 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +26 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +2 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +43 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +104 -9
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +70 -16
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +12 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionListEpic.js +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.js +41 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardLimitEpic.js +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateDebitCardPinAttemptEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateDebitCardPinAttemptEpic.js +42 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +11 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +20 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +16 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +6 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +30 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +5 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +26 -14
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +20 -5
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchDebitCardSummaryEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchDebitCardSummaryEpic.js +23 -0
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.js +4 -2
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.js +2 -0
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/acceptChargeCardTermsEpic.js +19 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/depositAccountWithLimitPayload.d.ts +6 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/depositAccountWithLimitPayload.js +2 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchDepositAccountListForCardsEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchDepositAccountListForCardsEpic.js +31 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +15 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +65 -25
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +11 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +45 -11
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +6 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +33 -18
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +41 -8
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +0 -21
- package/lib/view/spendManagement/commonSetup/epic/setup/enableSetupEpic.js +9 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +8 -3
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +4 -4
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +3 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.js +13 -1
- package/lib/view/spendManagement/helpers.d.ts +3 -0
- package/lib/view/spendManagement/helpers.js +13 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/getPaymentAccountsEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountLoginStatusEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountStatusEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.d.ts +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +6 -1
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +10 -10
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +1 -0
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
- package/lib/view/spendManagement/zeniAccounts/checkDeposit/checkDepositSelector.js +1 -1
- package/lib/view/spendManagement/zeniAccounts/depositAccountList/depositAccountListSelector.d.ts +1 -1
- package/lib/view/spendManagement/zeniAccounts/depositAccountList/depositAccountListSelector.js +3 -3
- package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.js +1 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +1 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +1 -1
- package/lib/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.d.ts +4 -3
- package/lib/view/transactionDetail/epics/markTransactionAsNotMiscategorizedEpic.js +25 -1
- package/lib/view/transactionDetail/epics/saveTransactionDetailEpic.js +1 -1
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +4 -2
- package/lib/view/transactionDetail/transactionDetailReducer.js +4 -2
- package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +3 -2
- package/lib/view/twoFactorAuthentication/resendOtpEpic.js +44 -19
- package/lib/view/twoFactorAuthentication/sendOtpEpic.d.ts +2 -1
- package/lib/view/twoFactorAuthentication/sendOtpEpic.js +45 -18
- package/lib/view/twoFactorAuthentication/twoFactorAuthentication.d.ts +17 -5
- package/lib/view/twoFactorAuthentication/twoFactorAuthentication.js +33 -0
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationPayload.d.ts +7 -7
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationPayload.js +6 -6
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationReducer.d.ts +22 -6
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationReducer.js +176 -60
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationSelector.d.ts +5 -3
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationSelector.js +13 -2
- package/lib/view/twoFactorAuthentication/verifyOtpEpic.d.ts +5 -2
- package/lib/view/twoFactorAuthentication/verifyOtpEpic.js +46 -5
- package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +2 -2
- package/lib/view/userListView/fetchUserListByTypeEpic.js +4 -3
- package/lib/view/userListView/userListViewPayload.d.ts +11 -0
- package/package.json +5 -4
|
@@ -8,6 +8,7 @@ import { AccountBase, RecommendedAccountBase } from '../../../../entity/account/
|
|
|
8
8
|
import { BillPayInfo, BillPaymentMethod, BillStageCodeType, BillTransaction, InternationalTransferFeeBearerPaymentMethod } from '../../../../entity/billPay/billTransaction/billTransactionState';
|
|
9
9
|
import { RecurringBillState } from '../../../../entity/billPay/recurringBills/recurringBillsState';
|
|
10
10
|
import { ClassBase, RecommendedClassBase } from '../../../../entity/class/classState';
|
|
11
|
+
import { PaymentAccount } from '../../../../entity/paymentAccount/paymentAccountState';
|
|
11
12
|
import { PiLabel } from '../../../../entity/paymentInstrument/paymentInstrument';
|
|
12
13
|
import { LoggedInUser } from '../../../../entity/tenant/tenantState';
|
|
13
14
|
import { Attachment } from '../../../../entity/transaction/stateTypes/attachment';
|
|
@@ -22,6 +23,7 @@ import { ClassListSelectorView } from '../../../classList/classListSelector';
|
|
|
22
23
|
import { VendorDetailLocalData } from '../../../commonVendorView/vendorView/vendorViewState';
|
|
23
24
|
import { ActivityHistorySelectorView } from '../../commonHistoryView/commonHistorySelector';
|
|
24
25
|
import { FundingAccount } from '../../commonSetup/setupViewSelector';
|
|
26
|
+
import { PlaidConnectionDetails } from '../../plaidAccount/plaidAccountViewState';
|
|
25
27
|
import { BillActivity } from '../billDetailView/billDetailViewSelector';
|
|
26
28
|
import { AccountTypeSubConfigCodeKeyType, BillPayConfig, BillPayConfigState } from '../billPayConfig/billPayConfigState';
|
|
27
29
|
import { DuplicateBillsSelectorView } from '../billPayReview/billPayReviewSelector';
|
|
@@ -112,6 +114,9 @@ export interface EditBillDetailSelectorView extends SelectorView {
|
|
|
112
114
|
isBillMarkedForRetry?: boolean;
|
|
113
115
|
internationalWireOnboardingStatus?: AllowedValueWithCode;
|
|
114
116
|
isEligibleForRetryOBP?: boolean;
|
|
117
|
+
plaidConnectionDetails: PlaidConnectionDetails;
|
|
118
|
+
paymentAccount?: PaymentAccount;
|
|
119
|
+
newAddedBillPaymentAccountId?: ID;
|
|
115
120
|
}
|
|
116
121
|
export interface EditBillInitialDetails {
|
|
117
122
|
vendor?: Vendor;
|
|
@@ -25,6 +25,7 @@ const getCompanyView_1 = require("../../../companyView/selectorHelpers/getCompan
|
|
|
25
25
|
const commonHistorySelector_1 = require("../../commonHistoryView/commonHistorySelector");
|
|
26
26
|
const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
|
|
27
27
|
const helpers_1 = require("../../helpers");
|
|
28
|
+
const plaidAccountViewSelector_1 = require("../../plaidAccount/plaidAccountViewSelector");
|
|
28
29
|
const depositAccountListSelector_1 = require("../../zeniAccounts/depositAccountList/depositAccountListSelector");
|
|
29
30
|
const billDetailViewSelector_1 = require("../billDetailView/billDetailViewSelector");
|
|
30
31
|
const billDetailViewState_1 = require("../billDetailView/billDetailViewState");
|
|
@@ -36,7 +37,7 @@ const billPaySetupApproverViewSelector_1 = require("../billPaySetupApproverView/
|
|
|
36
37
|
const previousBillsSelector_1 = require("../previousBills/previousBillsSelector");
|
|
37
38
|
const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAccountsEnabled, billId) => {
|
|
38
39
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
39
|
-
const { accountListState, accountState, bankAccountState, billDetailViewState, paymentAccountListState, billTransactionState, billPayConfigState, classListState, classState, editBillDetailViewState, paymentAccountState, vendorState, tenantState, companyState, userState, commonHistoryState, contactState, paymentInstrumentState, recurringBillState, depositAccountListState, depositAccountState, billPaySetupApproverViewState, } = state;
|
|
40
|
+
const { accountListState, accountState, bankAccountState, billDetailViewState, paymentAccountListState, billTransactionState, billPayConfigState, classListState, classState, editBillDetailViewState, paymentAccountState, vendorState, tenantState, companyState, userState, commonHistoryState, contactState, paymentInstrumentState, recurringBillState, depositAccountListState, depositAccountState, billPaySetupApproverViewState, plaidAccountViewState, } = state;
|
|
40
41
|
const transaction = (0, get_1.default)(billTransactionState.transactionById, billId !== null && billId !== void 0 ? billId : '', undefined);
|
|
41
42
|
let recommendations = {};
|
|
42
43
|
if (billId != null) {
|
|
@@ -85,7 +86,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
85
86
|
: undefined;
|
|
86
87
|
const isCompanyZeniAccountsSetUpDone = (_g = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.company.companyZeniAccountInfo.isZeniAccountEnabled) !== null && _g !== void 0 ? _g : false;
|
|
87
88
|
const allDepositAccounts = isZeniAccountsEnabled && isCompanyZeniAccountsSetUpDone
|
|
88
|
-
? (0, depositAccountListSelector_1.
|
|
89
|
+
? (0, depositAccountListSelector_1.getAllDepositAccounts)(depositAccountState, depositAccountListState)
|
|
89
90
|
.depositAccounts
|
|
90
91
|
: [];
|
|
91
92
|
if (allDepositAccounts.length === 0 && fromDepositAccount != null) {
|
|
@@ -324,6 +325,9 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
324
325
|
const internationalWireOnboardingStatus = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyBillPayInfo.internationalWireOnboardingStatus;
|
|
325
326
|
const billTransactionDetails = (0, get_1.default)(billDetailViewState.billDetailById, key, undefined);
|
|
326
327
|
const isEligibleForRetryOBP = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.zeniAssist.isEligibleForRetryOBP;
|
|
328
|
+
const { plaidConnectionDetails } = (0, plaidAccountViewSelector_1.getPlaidAccountDetails)(plaidAccountViewState, 'bill_pay_detail');
|
|
329
|
+
const { paymentAccount } = (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId !== null && companyId !== void 0 ? companyId : '', 'bill_pay', 'bill_pay_detail');
|
|
330
|
+
const newAddedBillPaymentAccountId = editBillDetailViewState.newAddedBillPaymentAccountId;
|
|
327
331
|
return {
|
|
328
332
|
showVendorGptRecommendationText,
|
|
329
333
|
recommendedVendor,
|
|
@@ -375,6 +379,9 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
375
379
|
isBillMarkedForRetry,
|
|
376
380
|
internationalWireOnboardingStatus,
|
|
377
381
|
isEligibleForRetryOBP,
|
|
382
|
+
plaidConnectionDetails,
|
|
383
|
+
paymentAccount,
|
|
384
|
+
newAddedBillPaymentAccountId,
|
|
378
385
|
};
|
|
379
386
|
};
|
|
380
387
|
exports.getEditBillDetail = getEditBillDetail;
|
|
@@ -31,6 +31,7 @@ export interface EditBillDetailViewState {
|
|
|
31
31
|
newBillState: EditBillDetail;
|
|
32
32
|
editBillStateById: Record<BillTransactionDetailKey, EditBillDetail>;
|
|
33
33
|
updateVendorContactState: FetchStateAndError;
|
|
34
|
+
newAddedBillPaymentAccountId?: ID;
|
|
34
35
|
}
|
|
35
36
|
export interface RecurringBillInstance {
|
|
36
37
|
instance: number;
|
package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js
CHANGED
|
@@ -4,16 +4,17 @@ exports.getCardUserOnboardingView = void 0;
|
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
5
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
6
6
|
const userSelector_1 = require("../../../../entity/user/userSelector");
|
|
7
|
+
const twoFactorAuthentication_1 = require("../../../twoFactorAuthentication/twoFactorAuthentication");
|
|
7
8
|
const twoFactorAuthenticationSelector_1 = require("../../../twoFactorAuthentication/twoFactorAuthenticationSelector");
|
|
8
9
|
exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => state, (state) => state.cardUserOnboardingState, (state) => state.settingsViewState, (state) => state.tenantState, (state) => state.userState, (state, cardUserOnboardingState, settingsViewState, tenantState, userState) => {
|
|
9
|
-
var _a;
|
|
10
|
-
const twoFAView = (0, twoFactorAuthenticationSelector_1.
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const twoFAView = (_a = (0, twoFactorAuthenticationSelector_1.getTwoFactorAuthenticationViewForCardUserOnboarding)(state)) !== null && _a !== void 0 ? _a : twoFactorAuthentication_1.initialTwoFactorAuthenticationWithoutToken;
|
|
11
12
|
const updateStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
12
13
|
settingsViewState.profile.updateStatus,
|
|
13
14
|
cardUserOnboardingState.sendOtpStatus,
|
|
14
15
|
cardUserOnboardingState.cardUserOnboardingActivationWaitStatus,
|
|
15
16
|
]);
|
|
16
|
-
const userId = (
|
|
17
|
+
const userId = (_b = tenantState.loggedInUser) === null || _b === void 0 ? void 0 : _b.userId;
|
|
17
18
|
if (userId == null) {
|
|
18
19
|
throw new Error(`User not logged in`);
|
|
19
20
|
}
|
|
@@ -4,7 +4,7 @@ import { CreditTerm, RePaymentInfo } from './chargeCardConfigState';
|
|
|
4
4
|
export interface ChargeCardConfigPayload {
|
|
5
5
|
allowed_credit_limit_span_options: AllowedValueWithCode[];
|
|
6
6
|
credit_terms: CreditTermsPayload;
|
|
7
|
-
repayment_info: RePaymentInfoPayload;
|
|
7
|
+
repayment_info: RePaymentInfoPayload | null;
|
|
8
8
|
receipt_required_above_amount: {
|
|
9
9
|
amount: number;
|
|
10
10
|
currency_code: string;
|
|
@@ -16,8 +16,10 @@ export interface ChargeCardConfigPayload {
|
|
|
16
16
|
interface CreditTermsPayload {
|
|
17
17
|
credit_terms_id: string;
|
|
18
18
|
credit_terms_name: string;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
max_number_of_physical_charge_cards_per_user: number;
|
|
20
|
+
max_number_of_physical_debit_cards_per_user: number;
|
|
21
|
+
max_number_of_virtual_charge_cards_per_user: number;
|
|
22
|
+
max_number_of_virtual_debit_cards_per_user: number;
|
|
21
23
|
}
|
|
22
24
|
interface RePaymentInfoPayload {
|
|
23
25
|
current_statement_period_end_date: string;
|
|
@@ -5,8 +5,10 @@ const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
|
5
5
|
const toCreditTerm = (payload) => ({
|
|
6
6
|
termId: payload.credit_terms_id,
|
|
7
7
|
name: payload.credit_terms_name,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
maxVirtualChargeCardPerUser: payload.max_number_of_virtual_charge_cards_per_user,
|
|
9
|
+
maxVirtualDebitCardPerUser: payload.max_number_of_virtual_debit_cards_per_user,
|
|
10
|
+
maxPhysicalChargeCardPerUser: payload.max_number_of_physical_charge_cards_per_user,
|
|
11
|
+
maxPhysicalDebitCardPerUser: payload.max_number_of_physical_debit_cards_per_user,
|
|
10
12
|
});
|
|
11
13
|
exports.toCreditTerm = toCreditTerm;
|
|
12
14
|
const toRePaymentInfo = (payload) => ({
|
|
@@ -11,8 +11,10 @@ exports.initialState = {
|
|
|
11
11
|
creditTerm: {
|
|
12
12
|
termId: '',
|
|
13
13
|
name: '',
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
maxVirtualChargeCardPerUser: 0,
|
|
15
|
+
maxVirtualDebitCardPerUser: 0,
|
|
16
|
+
maxPhysicalChargeCardPerUser: 0,
|
|
17
|
+
maxPhysicalDebitCardPerUser: 0,
|
|
16
18
|
},
|
|
17
19
|
receiptRequiredAboveAmount: {
|
|
18
20
|
amount: 0,
|
|
@@ -44,7 +46,10 @@ const chargeCardConfig = (0, toolkit_1.createSlice)({
|
|
|
44
46
|
name: fequency.name,
|
|
45
47
|
}));
|
|
46
48
|
draft.creditTerm = (0, chargeCardConfigPayload_1.toCreditTerm)(payload.credit_terms);
|
|
47
|
-
draft.rePaymentInfo =
|
|
49
|
+
draft.rePaymentInfo =
|
|
50
|
+
payload.repayment_info != null
|
|
51
|
+
? (0, chargeCardConfigPayload_1.toRePaymentInfo)(payload.repayment_info)
|
|
52
|
+
: undefined;
|
|
48
53
|
draft.receiptRequiredAboveAmount = (0, amount_1.toAmount)(payload.receipt_required_above_amount.amount, payload.receipt_required_above_amount.currency_code, payload.receipt_required_above_amount.currency_symbol);
|
|
49
54
|
draft.receiptBotEmail = payload.receipt_bot_email;
|
|
50
55
|
draft.isAiCategorizationEnabledForCardsTransactions =
|
|
@@ -14,8 +14,10 @@ export interface ChargeCardConfigState extends FetchedState {
|
|
|
14
14
|
export interface CreditTerm {
|
|
15
15
|
termId: ID;
|
|
16
16
|
name: string;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
maxVirtualChargeCardPerUser: number;
|
|
18
|
+
maxVirtualDebitCardPerUser: number;
|
|
19
|
+
maxPhysicalChargeCardPerUser: number;
|
|
20
|
+
maxPhysicalDebitCardPerUser: number;
|
|
19
21
|
}
|
|
20
22
|
export interface RePaymentInfo {
|
|
21
23
|
statementPeriod: TimeframeTick;
|
|
@@ -8,10 +8,22 @@ export interface ChargeCardDetailState {
|
|
|
8
8
|
interface ChargeCardDetail extends FetchedState {
|
|
9
9
|
id: ID;
|
|
10
10
|
cvvActivationWaitStatus: FetchStateAndError;
|
|
11
|
+
debitCardSetPinWaitStatus: FetchStateAndError;
|
|
11
12
|
transactionList: ChargeCardDetailTransactionList;
|
|
12
13
|
updateStatus: FetchStateAndError;
|
|
14
|
+
isRefreshingViewInBackground: boolean;
|
|
13
15
|
updatePhysicalChargeCardAttemptFetchState: FetchStateAndError;
|
|
16
|
+
updateDebitCardPinAttemptFetchState: FetchStateAndError;
|
|
14
17
|
updateChargeCardLimitFetchState: FetchStateAndError;
|
|
18
|
+
depositAccountLimitFetchState: FetchStateAndError;
|
|
19
|
+
twoFAState: TwoFAState;
|
|
20
|
+
}
|
|
21
|
+
interface TwoFAState {
|
|
22
|
+
sendOtpStatus: FetchStateAndError;
|
|
23
|
+
verifyOtpStatus: FetchStateAndError;
|
|
24
|
+
isPhoneVerified: boolean;
|
|
25
|
+
phone?: string;
|
|
26
|
+
otpChallenge?: string;
|
|
15
27
|
}
|
|
16
28
|
export declare const toChargeCardTransactionSortKeyType: (v: string) => "amount" | "type" | "merchant" | "paymentDate" | "receipts";
|
|
17
29
|
export declare type ChargeCardTransactionSortKey = ReturnType<typeof toChargeCardTransactionSortKeyType>;
|
|
@@ -17,12 +17,34 @@ exports.initialTransactionAttachments = {
|
|
|
17
17
|
error: undefined,
|
|
18
18
|
};
|
|
19
19
|
exports.emptyChargeCardDetail = {
|
|
20
|
+
twoFAState: {
|
|
21
|
+
sendOtpStatus: {
|
|
22
|
+
fetchState: 'Not-Started',
|
|
23
|
+
error: undefined,
|
|
24
|
+
},
|
|
25
|
+
isPhoneVerified: false,
|
|
26
|
+
verifyOtpStatus: {
|
|
27
|
+
fetchState: 'Not-Started',
|
|
28
|
+
error: undefined,
|
|
29
|
+
},
|
|
30
|
+
phone: undefined,
|
|
31
|
+
otpChallenge: undefined,
|
|
32
|
+
},
|
|
33
|
+
isRefreshingViewInBackground: false,
|
|
34
|
+
depositAccountLimitFetchState: {
|
|
35
|
+
fetchState: 'Not-Started',
|
|
36
|
+
error: undefined,
|
|
37
|
+
},
|
|
20
38
|
id: '',
|
|
21
39
|
fetchState: 'Not-Started',
|
|
22
40
|
cvvActivationWaitStatus: {
|
|
23
41
|
fetchState: 'Not-Started',
|
|
24
42
|
error: undefined,
|
|
25
43
|
},
|
|
44
|
+
debitCardSetPinWaitStatus: {
|
|
45
|
+
fetchState: 'Not-Started',
|
|
46
|
+
error: undefined,
|
|
47
|
+
},
|
|
26
48
|
transactionList: {
|
|
27
49
|
isViewReceiptClickedImmediatelyAfterUploadTransactionId: {},
|
|
28
50
|
transactionAttachmentsByTransactionId: {},
|
|
@@ -52,6 +74,10 @@ exports.emptyChargeCardDetail = {
|
|
|
52
74
|
fetchState: 'Not-Started',
|
|
53
75
|
error: undefined,
|
|
54
76
|
},
|
|
77
|
+
updateDebitCardPinAttemptFetchState: {
|
|
78
|
+
fetchState: 'Not-Started',
|
|
79
|
+
error: undefined,
|
|
80
|
+
},
|
|
55
81
|
updateChargeCardLimitFetchState: {
|
|
56
82
|
fetchState: 'Completed',
|
|
57
83
|
error: undefined,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddressPayload } from '../../../../entity/address/addressPayload';
|
|
2
2
|
import { ChargeCardPayload } from '../../../../entity/chargeCard/chargeCardPayload';
|
|
3
3
|
import { ChargeCardTransactionPayload } from '../../../../entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
4
|
+
import { ConnectedAccountPayload } from '../../../../entity/connectedAccount/connectedAccountPayload';
|
|
4
5
|
import { AttachmentPayload } from '../../../../entity/transaction/payloadTypes/attachmentPayload';
|
|
5
6
|
import { UserPayload } from '../../../../entity/user/userPayload';
|
|
6
7
|
import { UserRolePayload } from '../../../../entity/userRole/userRolePayload';
|
|
@@ -14,6 +15,7 @@ interface ChargeCardDetailPayload {
|
|
|
14
15
|
users: UserPayload[];
|
|
15
16
|
user_roles: UserRolePayload[];
|
|
16
17
|
addresses: AddressPayload[];
|
|
18
|
+
connected_account: ConnectedAccountPayload;
|
|
17
19
|
}
|
|
18
20
|
export type FetchChargeCardDetailResponse = ZeniAPIResponse<ChargeCardDetailPayload>;
|
|
19
21
|
export type UpdateChargeCardLimitResponse = ZeniAPIResponse<ChargeCardPayload>;
|
|
@@ -15,18 +15,21 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
15
15
|
cacheOverride: any;
|
|
16
16
|
}, "chargeCardDetail/fetchChargeCardDetail", never, never>, updateChargeCardDetailFetchState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
17
|
chargeCardId: ID;
|
|
18
|
+
isRefreshingViewInBackground: boolean;
|
|
18
19
|
fetchState: FetchState;
|
|
19
20
|
error?: ZeniAPIStatus;
|
|
20
|
-
}, "chargeCardDetail/updateChargeCardDetailFetchState">, fetchChargeCardTransactionList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, pageToken: PageToken, pageTokenType: PageToken], {
|
|
21
|
+
}, "chargeCardDetail/updateChargeCardDetailFetchState">, fetchChargeCardTransactionList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, pageToken: PageToken, pageTokenType: PageToken, cacheOverride?: any], {
|
|
21
22
|
chargeCardId: string;
|
|
22
23
|
pageToken: PageToken;
|
|
23
24
|
pageTokenType: PageToken;
|
|
25
|
+
cacheOverride: any;
|
|
24
26
|
}, "chargeCardDetail/fetchChargeCardTransactionList", never, never>, updateChargeCardDetailUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
25
27
|
chargeCardId: ID;
|
|
26
28
|
uiState: Partial<ChargeCardDetailUiState>;
|
|
27
29
|
}, "chargeCardDetail/updateChargeCardDetailUIState">, updateChargeCardTransactionList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
28
30
|
chargeCardId: ID;
|
|
29
31
|
data: ChargeCardTransactionListPayload;
|
|
32
|
+
cacheOverride: boolean;
|
|
30
33
|
}, "chargeCardDetail/updateChargeCardTransactionList">, updateChargeCardTransactionUploadReceiptsFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
31
34
|
transactionId: ID;
|
|
32
35
|
chargeCardId: ID;
|
|
@@ -51,7 +54,14 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
51
54
|
}, "chargeCardDetail/updatePhysicalChargeCardAttemptSuccessOrFailure">, updatePhysicalChargeCardAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
|
|
52
55
|
chargeCardId: string;
|
|
53
56
|
statusCode: "failed" | "success";
|
|
54
|
-
}, "chargeCardDetail/updatePhysicalChargeCardAttempt", never, never>,
|
|
57
|
+
}, "chargeCardDetail/updatePhysicalChargeCardAttempt", never, never>, updateDebitCardPinAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
|
|
58
|
+
chargeCardId: string;
|
|
59
|
+
statusCode: "failed" | "success";
|
|
60
|
+
}, "chargeCardDetail/updateDebitCardPinAttempt", never, never>, updateDebitCardPinAttemptSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
61
|
+
chargeCardId: ID;
|
|
62
|
+
fetchState: FetchState;
|
|
63
|
+
error?: ZeniAPIStatus;
|
|
64
|
+
}, "chargeCardDetail/updateDebitCardPinAttemptSuccessOrFailure">, updateChargeCardTransactionReceiptsShowTickFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
55
65
|
transactionId: ID;
|
|
56
66
|
chargeCardId: ID;
|
|
57
67
|
shouldShowTick: boolean;
|
|
@@ -69,7 +79,11 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
69
79
|
chargeCardId: ID;
|
|
70
80
|
}, "chargeCardDetail/startCVVActivationWait">, completeCVVActivationWait: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
71
81
|
chargeCardId: ID;
|
|
72
|
-
}, "chargeCardDetail/completeCVVActivationWait">,
|
|
82
|
+
}, "chargeCardDetail/completeCVVActivationWait">, startDebitCardSetPinWait: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
83
|
+
chargeCardId: ID;
|
|
84
|
+
}, "chargeCardDetail/startDebitCardSetPinWait">, completeDebitCardSetPinWait: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
85
|
+
chargeCardId: ID;
|
|
86
|
+
}, "chargeCardDetail/completeDebitCardSetPinWait">, updateChargeCardDetailUpdateStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
73
87
|
chargeCardId: ID;
|
|
74
88
|
fetchState: FetchState;
|
|
75
89
|
error?: ZeniAPIStatus;
|
|
@@ -82,6 +96,31 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
82
96
|
chargeCardId: ID;
|
|
83
97
|
fetchState: FetchState;
|
|
84
98
|
error?: ZeniAPIStatus;
|
|
85
|
-
}, "chargeCardDetail/updateChargeCardSpendLimitSuccessOrFailure">,
|
|
99
|
+
}, "chargeCardDetail/updateChargeCardSpendLimitSuccessOrFailure">, fetchDepositAccountLimit: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
100
|
+
depositAccountId: ID;
|
|
101
|
+
chargeCardId: ID;
|
|
102
|
+
}, "chargeCardDetail/fetchDepositAccountLimit">, updateDepositAccountLimitFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
103
|
+
chargeCardId: ID;
|
|
104
|
+
fetchState: FetchState;
|
|
105
|
+
error?: ZeniAPIStatus;
|
|
106
|
+
}, "chargeCardDetail/updateDepositAccountLimitFetchStatus">, sendOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
107
|
+
chargeCardId: ID;
|
|
108
|
+
phone: string;
|
|
109
|
+
}, "chargeCardDetail/sendOtpCardHolder">, resendOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
110
|
+
chargeCardId: ID;
|
|
111
|
+
}, "chargeCardDetail/resendOtpCardHolder">, sendOtpCardHolderSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
112
|
+
otpChallenge: string;
|
|
113
|
+
chargeCardId: ID;
|
|
114
|
+
}, "chargeCardDetail/sendOtpCardHolderSuccess">, sendOtpCardHolderFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
115
|
+
error: ZeniAPIStatus;
|
|
116
|
+
chargeCardId: ID;
|
|
117
|
+
}, "chargeCardDetail/sendOtpCardHolderFailure">, verifyOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
118
|
+
chargeCardId: ID;
|
|
119
|
+
}, "chargeCardDetail/verifyOtpCardHolder">, verifyOtpCardHolderSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
120
|
+
chargeCardId: ID;
|
|
121
|
+
}, "chargeCardDetail/verifyOtpCardHolderSuccess">, verifyOtpCardHolderFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
122
|
+
error: ZeniAPIStatus;
|
|
123
|
+
chargeCardId: ID;
|
|
124
|
+
}, "chargeCardDetail/verifyOtpCardHolderFailure">, clearChargeCardDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardDetail/clearChargeCardDetail">;
|
|
86
125
|
declare const _default: import("redux").Reducer<ChargeCardDetailState>;
|
|
87
126
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearChargeCardDetail = exports.updateChargeCardSpendLimitSuccessOrFailure = exports.updateChargeCardSpendLimit = exports.updateChargeCardDetailUpdateStatus = exports.completeCVVActivationWait = exports.startCVVActivationWait = exports.updateChargeCardDetail = exports.updateChargeCardTransactionListFailure = exports.updateChargeCardTransactionAttachmentsInCardDetail = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updatePhysicalChargeCardAttempt = exports.updatePhysicalChargeCardAttemptSuccessOrFailure = exports.updateChargeCardTransactionAttachmentsFailure = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.updateChargeCardTransactionList = exports.updateChargeCardDetailUIState = exports.fetchChargeCardTransactionList = exports.updateChargeCardDetailFetchState = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.initialState = void 0;
|
|
4
|
+
exports.clearChargeCardDetail = exports.verifyOtpCardHolderFailure = exports.verifyOtpCardHolderSuccess = exports.verifyOtpCardHolder = exports.sendOtpCardHolderFailure = exports.sendOtpCardHolderSuccess = exports.resendOtpCardHolder = exports.sendOtpCardHolder = exports.updateDepositAccountLimitFetchStatus = exports.fetchDepositAccountLimit = exports.updateChargeCardSpendLimitSuccessOrFailure = exports.updateChargeCardSpendLimit = exports.updateChargeCardDetailUpdateStatus = exports.completeDebitCardSetPinWait = exports.startDebitCardSetPinWait = exports.completeCVVActivationWait = exports.startCVVActivationWait = exports.updateChargeCardDetail = exports.updateChargeCardTransactionListFailure = exports.updateChargeCardTransactionAttachmentsInCardDetail = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateDebitCardPinAttemptSuccessOrFailure = exports.updateDebitCardPinAttempt = exports.updatePhysicalChargeCardAttempt = exports.updatePhysicalChargeCardAttemptSuccessOrFailure = exports.updateChargeCardTransactionAttachmentsFailure = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.updateChargeCardTransactionList = exports.updateChargeCardDetailUIState = exports.fetchChargeCardTransactionList = exports.updateChargeCardDetailFetchState = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const sortOrderPayload_1 = require("../../../../commonPayloadTypes/sortOrderPayload");
|
|
7
7
|
const attachmentPayload_1 = require("../../../../entity/transaction/payloadTypes/attachmentPayload");
|
|
@@ -30,7 +30,7 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
30
30
|
if (action.payload.cacheOverride === true ||
|
|
31
31
|
detail == null ||
|
|
32
32
|
detail.fetchState !== 'In-Progress') {
|
|
33
|
-
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, chargeCardDetail_1.emptyChargeCardDetail), { id: chargeCardId });
|
|
33
|
+
draft.detailById[chargeCardId] = Object.assign(Object.assign(Object.assign({}, chargeCardDetail_1.emptyChargeCardDetail), draft.detailById[chargeCardId]), { id: chargeCardId, isRefreshingViewInBackground: action.payload.cacheOverride });
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
prepare(chargeCardId, cacheOverride = false) {
|
|
@@ -40,10 +40,11 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
updateChargeCardDetailFetchState(draft, action) {
|
|
43
|
-
const { chargeCardId, fetchState, error } = action.payload;
|
|
43
|
+
const { chargeCardId, fetchState, error, isRefreshingViewInBackground } = action.payload;
|
|
44
44
|
const existingCardDetail = draft.detailById[chargeCardId];
|
|
45
45
|
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { fetchState,
|
|
46
|
-
error
|
|
46
|
+
error,
|
|
47
|
+
isRefreshingViewInBackground });
|
|
47
48
|
},
|
|
48
49
|
fetchChargeCardTransactionList: {
|
|
49
50
|
reducer(draft, action) {
|
|
@@ -53,19 +54,21 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
53
54
|
? 0
|
|
54
55
|
: existingCardDetail.transactionList.uiState.scrollYOffset, pageToken: pageToken, pageTokenType: pageTokenType }) }) });
|
|
55
56
|
},
|
|
56
|
-
prepare(chargeCardId, pageToken, pageTokenType) {
|
|
57
|
+
prepare(chargeCardId, pageToken, pageTokenType, cacheOverride = false) {
|
|
57
58
|
return {
|
|
58
|
-
payload: { chargeCardId, pageToken, pageTokenType },
|
|
59
|
+
payload: { chargeCardId, pageToken, pageTokenType, cacheOverride },
|
|
59
60
|
};
|
|
60
61
|
},
|
|
61
62
|
},
|
|
62
63
|
updateChargeCardTransactionList(draft, action) {
|
|
63
|
-
const { chargeCardId, data } = action.payload;
|
|
64
|
+
const { chargeCardId, data, cacheOverride } = action.payload;
|
|
64
65
|
const existingCardDetail = draft.detailById[chargeCardId];
|
|
65
66
|
const newTransactionIds = data.transactions.map((tran) => tran.transaction_id);
|
|
66
67
|
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { transactionList: Object.assign(Object.assign({}, existingCardDetail.transactionList), { transactionIds: [
|
|
67
68
|
...new Set([
|
|
68
|
-
...
|
|
69
|
+
...(cacheOverride
|
|
70
|
+
? []
|
|
71
|
+
: existingCardDetail.transactionList.transactionIds),
|
|
69
72
|
...newTransactionIds,
|
|
70
73
|
]),
|
|
71
74
|
], fetchState: 'Completed', error: undefined, uiState: Object.assign(Object.assign({}, existingCardDetail.transactionList.uiState), { sortOrder: (0, sortOrderPayload_1.mapSortOrderPayloadToSortOrder)(data.query.sort_order), sortKey: data.query.sort_by === 'transaction_date'
|
|
@@ -117,6 +120,29 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
117
120
|
error,
|
|
118
121
|
} });
|
|
119
122
|
},
|
|
123
|
+
updateDebitCardPinAttempt: {
|
|
124
|
+
reducer(draft, action) {
|
|
125
|
+
const { chargeCardId } = action.payload;
|
|
126
|
+
const existingCardDetail = draft.detailById[chargeCardId];
|
|
127
|
+
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { updateDebitCardPinAttemptFetchState: {
|
|
128
|
+
fetchState: 'In-Progress',
|
|
129
|
+
error: undefined,
|
|
130
|
+
} });
|
|
131
|
+
},
|
|
132
|
+
prepare(chargeCardId, statusCode) {
|
|
133
|
+
return {
|
|
134
|
+
payload: { chargeCardId, statusCode },
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
updateDebitCardPinAttemptSuccessOrFailure(draft, action) {
|
|
139
|
+
const { chargeCardId, fetchState, error } = action.payload;
|
|
140
|
+
const existingCardDetail = draft.detailById[chargeCardId];
|
|
141
|
+
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { updateDebitCardPinAttemptFetchState: {
|
|
142
|
+
fetchState,
|
|
143
|
+
error,
|
|
144
|
+
} });
|
|
145
|
+
},
|
|
120
146
|
updateChargeCardDetail: {
|
|
121
147
|
reducer(draft, action) {
|
|
122
148
|
const { chargeCardId } = action.payload;
|
|
@@ -189,6 +215,12 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
189
215
|
},
|
|
190
216
|
} }) });
|
|
191
217
|
},
|
|
218
|
+
startDebitCardSetPinWait(draft, action) {
|
|
219
|
+
draft.detailById[action.payload.chargeCardId].debitCardSetPinWaitStatus.fetchState = 'In-Progress';
|
|
220
|
+
},
|
|
221
|
+
completeDebitCardSetPinWait(draft, action) {
|
|
222
|
+
draft.detailById[action.payload.chargeCardId].debitCardSetPinWaitStatus.fetchState = 'Completed';
|
|
223
|
+
},
|
|
192
224
|
startCVVActivationWait(draft, action) {
|
|
193
225
|
draft.detailById[action.payload.chargeCardId].cvvActivationWaitStatus.fetchState = 'In-Progress';
|
|
194
226
|
},
|
|
@@ -233,10 +265,73 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
233
265
|
error,
|
|
234
266
|
} });
|
|
235
267
|
},
|
|
268
|
+
fetchDepositAccountLimit(draft, action) {
|
|
269
|
+
const { chargeCardId } = action.payload;
|
|
270
|
+
draft.detailById[chargeCardId].depositAccountLimitFetchState.fetchState =
|
|
271
|
+
'In-Progress';
|
|
272
|
+
},
|
|
273
|
+
updateDepositAccountLimitFetchStatus(draft, action) {
|
|
274
|
+
const { chargeCardId, fetchState, error } = action.payload;
|
|
275
|
+
draft.detailById[chargeCardId].depositAccountLimitFetchState.fetchState =
|
|
276
|
+
fetchState;
|
|
277
|
+
draft.detailById[chargeCardId].depositAccountLimitFetchState.error =
|
|
278
|
+
error;
|
|
279
|
+
},
|
|
280
|
+
sendOtpCardHolder(draft, action) {
|
|
281
|
+
const { chargeCardId, phone } = action.payload;
|
|
282
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.fetchState =
|
|
283
|
+
'In-Progress';
|
|
284
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.error = undefined;
|
|
285
|
+
draft.detailById[chargeCardId].twoFAState.phone = phone;
|
|
286
|
+
},
|
|
287
|
+
resendOtpCardHolder(draft, action) {
|
|
288
|
+
const { chargeCardId } = action.payload;
|
|
289
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.fetchState =
|
|
290
|
+
'In-Progress';
|
|
291
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.error = undefined;
|
|
292
|
+
},
|
|
293
|
+
sendOtpCardHolderSuccess(draft, action) {
|
|
294
|
+
const { chargeCardId, otpChallenge } = action.payload;
|
|
295
|
+
if (draft.detailById[chargeCardId].twoFAState.phone != null) {
|
|
296
|
+
draft.detailById[chargeCardId].twoFAState.otpChallenge = otpChallenge;
|
|
297
|
+
}
|
|
298
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.fetchState =
|
|
299
|
+
'Completed';
|
|
300
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.error = undefined;
|
|
301
|
+
},
|
|
302
|
+
sendOtpCardHolderFailure(draft, action) {
|
|
303
|
+
const { chargeCardId, error } = action.payload;
|
|
304
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.fetchState =
|
|
305
|
+
'Error';
|
|
306
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.error = error;
|
|
307
|
+
},
|
|
308
|
+
verifyOtpCardHolder(draft, action) {
|
|
309
|
+
const { chargeCardId } = action.payload;
|
|
310
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.fetchState =
|
|
311
|
+
'In-Progress';
|
|
312
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.error =
|
|
313
|
+
undefined;
|
|
314
|
+
},
|
|
315
|
+
verifyOtpCardHolderSuccess(draft, action) {
|
|
316
|
+
const { chargeCardId } = action.payload;
|
|
317
|
+
if (draft.detailById[chargeCardId].twoFAState.phone != null) {
|
|
318
|
+
draft.detailById[chargeCardId].twoFAState.isPhoneVerified = true;
|
|
319
|
+
}
|
|
320
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.fetchState =
|
|
321
|
+
'Completed';
|
|
322
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.error =
|
|
323
|
+
undefined;
|
|
324
|
+
},
|
|
325
|
+
verifyOtpCardHolderFailure(draft, action) {
|
|
326
|
+
const { chargeCardId, error } = action.payload;
|
|
327
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.fetchState =
|
|
328
|
+
'Error';
|
|
329
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.error = error;
|
|
330
|
+
},
|
|
236
331
|
clearChargeCardDetail(draft) {
|
|
237
332
|
Object.assign(draft, exports.initialState);
|
|
238
333
|
},
|
|
239
334
|
},
|
|
240
335
|
});
|
|
241
|
-
_a = chargeCardDetail.actions, exports.fetchChargeCardDetailPage = _a.fetchChargeCardDetailPage, exports.fetchChargeCardDetail = _a.fetchChargeCardDetail, exports.updateChargeCardDetailFetchState = _a.updateChargeCardDetailFetchState, exports.fetchChargeCardTransactionList = _a.fetchChargeCardTransactionList, exports.updateChargeCardDetailUIState = _a.updateChargeCardDetailUIState, exports.updateChargeCardTransactionList = _a.updateChargeCardTransactionList, exports.updateChargeCardTransactionUploadReceiptsFetchStatus = _a.updateChargeCardTransactionUploadReceiptsFetchStatus, exports.fetchChargeCardTransactionAttachments = _a.fetchChargeCardTransactionAttachments, exports.updateChargeCardTransactionIsViewReceiptClicked = _a.updateChargeCardTransactionIsViewReceiptClicked, exports.updateChargeCardTransactionAttachmentsFailure = _a.updateChargeCardTransactionAttachmentsFailure, exports.updatePhysicalChargeCardAttemptSuccessOrFailure = _a.updatePhysicalChargeCardAttemptSuccessOrFailure, exports.updatePhysicalChargeCardAttempt = _a.updatePhysicalChargeCardAttempt, exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = _a.updateChargeCardTransactionReceiptsShowTickFetchStatus, exports.updateChargeCardTransactionAttachmentsInCardDetail = _a.updateChargeCardTransactionAttachmentsInCardDetail, exports.updateChargeCardTransactionListFailure = _a.updateChargeCardTransactionListFailure, exports.updateChargeCardDetail = _a.updateChargeCardDetail, exports.startCVVActivationWait = _a.startCVVActivationWait, exports.completeCVVActivationWait = _a.completeCVVActivationWait, exports.updateChargeCardDetailUpdateStatus = _a.updateChargeCardDetailUpdateStatus, exports.updateChargeCardSpendLimit = _a.updateChargeCardSpendLimit, exports.updateChargeCardSpendLimitSuccessOrFailure = _a.updateChargeCardSpendLimitSuccessOrFailure, exports.clearChargeCardDetail = _a.clearChargeCardDetail;
|
|
336
|
+
_a = chargeCardDetail.actions, exports.fetchChargeCardDetailPage = _a.fetchChargeCardDetailPage, exports.fetchChargeCardDetail = _a.fetchChargeCardDetail, exports.updateChargeCardDetailFetchState = _a.updateChargeCardDetailFetchState, exports.fetchChargeCardTransactionList = _a.fetchChargeCardTransactionList, exports.updateChargeCardDetailUIState = _a.updateChargeCardDetailUIState, exports.updateChargeCardTransactionList = _a.updateChargeCardTransactionList, exports.updateChargeCardTransactionUploadReceiptsFetchStatus = _a.updateChargeCardTransactionUploadReceiptsFetchStatus, exports.fetchChargeCardTransactionAttachments = _a.fetchChargeCardTransactionAttachments, exports.updateChargeCardTransactionIsViewReceiptClicked = _a.updateChargeCardTransactionIsViewReceiptClicked, exports.updateChargeCardTransactionAttachmentsFailure = _a.updateChargeCardTransactionAttachmentsFailure, exports.updatePhysicalChargeCardAttemptSuccessOrFailure = _a.updatePhysicalChargeCardAttemptSuccessOrFailure, exports.updatePhysicalChargeCardAttempt = _a.updatePhysicalChargeCardAttempt, exports.updateDebitCardPinAttempt = _a.updateDebitCardPinAttempt, exports.updateDebitCardPinAttemptSuccessOrFailure = _a.updateDebitCardPinAttemptSuccessOrFailure, exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = _a.updateChargeCardTransactionReceiptsShowTickFetchStatus, exports.updateChargeCardTransactionAttachmentsInCardDetail = _a.updateChargeCardTransactionAttachmentsInCardDetail, exports.updateChargeCardTransactionListFailure = _a.updateChargeCardTransactionListFailure, exports.updateChargeCardDetail = _a.updateChargeCardDetail, exports.startCVVActivationWait = _a.startCVVActivationWait, exports.completeCVVActivationWait = _a.completeCVVActivationWait, exports.startDebitCardSetPinWait = _a.startDebitCardSetPinWait, exports.completeDebitCardSetPinWait = _a.completeDebitCardSetPinWait, exports.updateChargeCardDetailUpdateStatus = _a.updateChargeCardDetailUpdateStatus, exports.updateChargeCardSpendLimit = _a.updateChargeCardSpendLimit, exports.updateChargeCardSpendLimitSuccessOrFailure = _a.updateChargeCardSpendLimitSuccessOrFailure, exports.fetchDepositAccountLimit = _a.fetchDepositAccountLimit, exports.updateDepositAccountLimitFetchStatus = _a.updateDepositAccountLimitFetchStatus, exports.sendOtpCardHolder = _a.sendOtpCardHolder, exports.resendOtpCardHolder = _a.resendOtpCardHolder, exports.sendOtpCardHolderSuccess = _a.sendOtpCardHolderSuccess, exports.sendOtpCardHolderFailure = _a.sendOtpCardHolderFailure, exports.verifyOtpCardHolder = _a.verifyOtpCardHolder, exports.verifyOtpCardHolderSuccess = _a.verifyOtpCardHolderSuccess, exports.verifyOtpCardHolderFailure = _a.verifyOtpCardHolderFailure, exports.clearChargeCardDetail = _a.clearChargeCardDetail;
|
|
242
337
|
exports.default = chargeCardDetail.reducer;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { ChargeCard } from '../../../../entity/chargeCard/chargeCard';
|
|
3
4
|
import { ChargeCardTransaction } from '../../../../entity/chargeCardTransaction/chargeCardTransaction';
|
|
5
|
+
import { ConnectedAccount } from '../../../../entity/connectedAccount/connectedAccount';
|
|
6
|
+
import { DepositAccountWithLimit } from '../../../../entity/depositAccount/depositAccount';
|
|
4
7
|
import { Attachment } from '../../../../entity/transaction/stateTypes/attachment';
|
|
5
8
|
import { RootState } from '../../../../reducer';
|
|
6
9
|
import { TwoFactorAuthenticationView } from '../../../twoFactorAuthentication/twoFactorAuthenticationSelector';
|
|
@@ -10,6 +13,7 @@ import { ChargeCardWithUser } from '../chargeCardList/chargeCardListSelector';
|
|
|
10
13
|
import { ChargeCardDetailUiState } from './chargeCardDetail';
|
|
11
14
|
export interface ChargeCardDetailSelectorView extends SelectorView {
|
|
12
15
|
chargeCardConfig: ChargeCardConfigState;
|
|
16
|
+
isRefreshingViewInBackground: boolean;
|
|
13
17
|
transactions: ChargeCardTransaction[];
|
|
14
18
|
uploadReceiptsFetchStateByTransactionId: Record<ID, FetchStateAndError>;
|
|
15
19
|
uploadReceiptsShowTickByTransactionId: Record<ID, boolean>;
|
|
@@ -21,12 +25,23 @@ export interface ChargeCardDetailSelectorView extends SelectorView {
|
|
|
21
25
|
updateFetchState: FetchStateAndError;
|
|
22
26
|
updatePhysicalChargeCardAttemptFetchState: FetchStateAndError;
|
|
23
27
|
creditAccount: CreditAccount;
|
|
28
|
+
depositAccountLimitFetchState: FetchStateAndError;
|
|
24
29
|
updateChargeCardLimitFetchState: FetchStateAndError;
|
|
30
|
+
depositAccountLimit?: DepositAccountWithLimit;
|
|
25
31
|
chargeCard?: ChargeCardWithUser;
|
|
32
|
+
connectedAccount?: ConnectedAccount;
|
|
26
33
|
}
|
|
27
34
|
export declare const getChargeCardDetailView: (state: RootState, chargeCardId: ID, includeCreditAccountInfo: boolean) => ChargeCardDetailSelectorView;
|
|
35
|
+
export interface DebitCardPinSetSelectorView extends SelectorView {
|
|
36
|
+
updateDebitCardPinAttemptFetchState: FetchStateAndError;
|
|
37
|
+
updateStatus: FetchStateAndError;
|
|
38
|
+
isRefreshingViewInBackground: boolean;
|
|
39
|
+
chargeCard?: ChargeCard;
|
|
40
|
+
}
|
|
41
|
+
export declare const getDebitCardSetPinView: (state: RootState, chargeCardId: ID) => DebitCardPinSetSelectorView;
|
|
28
42
|
export interface ChargeCardCVVActivateSelectorView extends SelectorView {
|
|
29
43
|
updatePhysicalChargeCardAttemptFetchState: FetchStateAndError;
|
|
44
|
+
isRefreshingViewInBackground: boolean;
|
|
30
45
|
updateStatus: FetchStateAndError;
|
|
31
46
|
chargeCard?: ChargeCardWithUser;
|
|
32
47
|
}
|