@zeniai/client-epic-state 4.20.9-betaRR12 → 4.20.9
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 +0 -3
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountPayload.d.ts +0 -2
- package/lib/entity/account/accountReducer.d.ts +2 -5
- package/lib/entity/account/accountReducer.js +2 -7
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.js +2 -4
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -6
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.d.ts +2 -5
- package/lib/entity/tenant/tenantReducer.js +2 -9
- package/lib/entity/tenant/tenantSelector.d.ts +0 -1
- package/lib/entity/tenant/tenantSelector.js +1 -9
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -9
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -79
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -11
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +1 -12
- package/lib/epic.js +1 -12
- package/lib/esm/commonStateTypes/animations.js +0 -3
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/esm/entity/account/accountReducer.js +1 -6
- package/lib/esm/entity/accountRecon/accountReconPayload.js +2 -4
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -6
- package/lib/esm/entity/tenant/tenantReducer.js +1 -8
- package/lib/esm/entity/tenant/tenantSelector.js +0 -7
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -79
- package/lib/esm/epic.js +1 -12
- package/lib/esm/index.js +13 -16
- package/lib/esm/reducer.js +0 -3
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
- package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +1 -19
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -3
- package/lib/esm/view/companyView/companyViewReducer.js +1 -26
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +1 -2
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -21
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +3 -167
- package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -1
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -136
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -15
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -24
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +1 -2
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -9
- package/lib/index.d.ts +19 -26
- package/lib/index.js +32 -62
- package/lib/reducer.d.ts +0 -3
- package/lib/reducer.js +0 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
- package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -15
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +1 -8
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +2 -20
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -4
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -3
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +1 -9
- package/lib/view/companyView/companyViewReducer.d.ts +1 -6
- package/lib/view/companyView/companyViewReducer.js +2 -28
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +0 -1
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +1 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -45
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -22
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +4 -18
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -168
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +2 -7
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -136
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +3 -13
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -8
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -27
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -14
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +1 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +1 -2
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +2 -9
- package/package.json +1 -1
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +0 -19
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -2
- package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +0 -17
- package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -61
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +0 -26
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +0 -199
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +0 -52
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +0 -1
- package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +0 -100
- package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +0 -48
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +0 -36
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +0 -45
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +0 -50
- package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +0 -69
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +0 -7
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +0 -21
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +0 -10
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -65
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -48
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -48
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +0 -75
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +0 -30
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +0 -50
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +0 -206
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +0 -24
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +0 -61
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +0 -38
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +0 -2
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +0 -12
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +0 -106
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +0 -8
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +0 -52
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +0 -7
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +0 -40
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +0 -7
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +0 -52
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +0 -10
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +0 -54
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +0 -8
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +0 -73
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
var _a;
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.clearAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.updateAutoTransferRuleHistoryFetchStatus = exports.updateAutoTransferRuleHistory = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRuleFailure = exports.deleteAutoTransferRuleSuccess = exports.deleteAutoTransferRule = exports.updateAutoTransferRuleFailure = exports.updateAutoTransferRuleSuccess = exports.updateAutoTransferRule = exports.createAutoTransferRuleFailure = exports.createAutoTransferRuleSuccess = exports.createAutoTransferRule = exports.clearAutoTransferReviewDetail = exports.updateAutoTransferReviewDetailFailure = exports.updateAutoTransferReviewDetail = exports.fetchAutoTransferReviewDetail = exports.updateAutoTransferRulesFailure = exports.updateAutoTransferRules = exports.fetchAutoTransferRules = exports.initialState = void 0;
|
|
8
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
|
-
const get_1 = __importDefault(require("lodash/get"));
|
|
10
|
-
const commonHistory_1 = require("../commonHistoryView/commonHistory");
|
|
11
|
-
const commonHistoryPayload_1 = require("../commonHistoryView/commonHistoryPayload");
|
|
12
|
-
const transferDetailPayload_1 = require("../zeniAccounts/transferDetail/transferDetailPayload");
|
|
13
|
-
exports.initialState = {
|
|
14
|
-
autoTransferReviewDetail: {
|
|
15
|
-
reviewTransferMoney: {
|
|
16
|
-
isShowDailyAchLimitWarning: false,
|
|
17
|
-
dailyAchDebitLimit: {
|
|
18
|
-
amount: 0,
|
|
19
|
-
currencyCode: 'USD',
|
|
20
|
-
currencySymbol: '$',
|
|
21
|
-
},
|
|
22
|
-
transferSchedules: [],
|
|
23
|
-
},
|
|
24
|
-
fetchState: 'Not-Started',
|
|
25
|
-
error: undefined,
|
|
26
|
-
},
|
|
27
|
-
historyByRuleId: {},
|
|
28
|
-
ruleDeleteStatusById: {},
|
|
29
|
-
ruleUpdateLocalData: {},
|
|
30
|
-
ruleUpdateStatusById: {},
|
|
31
|
-
rules: [],
|
|
32
|
-
fetchState: 'Not-Started',
|
|
33
|
-
error: undefined,
|
|
34
|
-
createRuleFetchState: {
|
|
35
|
-
fetchState: 'Not-Started',
|
|
36
|
-
error: undefined,
|
|
37
|
-
},
|
|
38
|
-
hasValidState() {
|
|
39
|
-
return this.fetchState === 'Completed';
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
const autotransferRules = (0, toolkit_1.createSlice)({
|
|
43
|
-
name: 'autotransferRules',
|
|
44
|
-
initialState: exports.initialState,
|
|
45
|
-
reducers: {
|
|
46
|
-
fetchAutoTransferRules: {
|
|
47
|
-
reducer(draft) {
|
|
48
|
-
draft.fetchState = 'In-Progress';
|
|
49
|
-
},
|
|
50
|
-
prepare(cacheOverride = false) {
|
|
51
|
-
return {
|
|
52
|
-
payload: {
|
|
53
|
-
cacheOverride,
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
updateAutoTransferRules(draft, action) {
|
|
59
|
-
draft.rules = action.payload.rules;
|
|
60
|
-
draft.fetchState = 'Completed';
|
|
61
|
-
draft.error = undefined;
|
|
62
|
-
},
|
|
63
|
-
updateAutoTransferRulesFailure(draft, action) {
|
|
64
|
-
draft.fetchState = action.payload.fetchState;
|
|
65
|
-
draft.error = action.payload.error;
|
|
66
|
-
},
|
|
67
|
-
updateRuleLocalData(draft, action) {
|
|
68
|
-
draft.ruleUpdateLocalData = {
|
|
69
|
-
...draft.ruleUpdateLocalData,
|
|
70
|
-
...action.payload,
|
|
71
|
-
};
|
|
72
|
-
},
|
|
73
|
-
clearRuleUpdateLocalData(draft) {
|
|
74
|
-
draft.ruleUpdateLocalData = {};
|
|
75
|
-
},
|
|
76
|
-
fetchAutoTransferReviewDetail(draft) {
|
|
77
|
-
draft.autoTransferReviewDetail.fetchState = 'In-Progress';
|
|
78
|
-
draft.autoTransferReviewDetail.error = undefined;
|
|
79
|
-
},
|
|
80
|
-
updateAutoTransferReviewDetail(draft, action) {
|
|
81
|
-
draft.autoTransferReviewDetail.fetchState = 'Completed';
|
|
82
|
-
draft.autoTransferReviewDetail.error = undefined;
|
|
83
|
-
draft.autoTransferReviewDetail.reviewTransferMoney =
|
|
84
|
-
(0, transferDetailPayload_1.mapReviewTransferMoneyPayloadToReviewTransferMoney)(action.payload);
|
|
85
|
-
},
|
|
86
|
-
updateAutoTransferReviewDetailFailure(draft, action) {
|
|
87
|
-
draft.autoTransferReviewDetail.fetchState = 'Error';
|
|
88
|
-
draft.autoTransferReviewDetail.error = action.payload;
|
|
89
|
-
},
|
|
90
|
-
clearAutoTransferReviewDetail(draft) {
|
|
91
|
-
draft.autoTransferReviewDetail = exports.initialState.autoTransferReviewDetail;
|
|
92
|
-
},
|
|
93
|
-
createAutoTransferRule(draft) {
|
|
94
|
-
draft.createRuleFetchState = {
|
|
95
|
-
fetchState: 'In-Progress',
|
|
96
|
-
error: undefined,
|
|
97
|
-
};
|
|
98
|
-
},
|
|
99
|
-
createAutoTransferRuleSuccess(draft, action) {
|
|
100
|
-
draft.rules = [...draft.rules, action.payload.rule];
|
|
101
|
-
draft.createRuleFetchState = {
|
|
102
|
-
fetchState: 'Completed',
|
|
103
|
-
error: undefined,
|
|
104
|
-
};
|
|
105
|
-
},
|
|
106
|
-
createAutoTransferRuleFailure(draft, action) {
|
|
107
|
-
draft.createRuleFetchState = {
|
|
108
|
-
fetchState: action.payload.fetchState,
|
|
109
|
-
error: action.payload.error,
|
|
110
|
-
};
|
|
111
|
-
},
|
|
112
|
-
updateAutoTransferRule: {
|
|
113
|
-
reducer(draft, action) {
|
|
114
|
-
draft.ruleUpdateStatusById[action.payload.ruleId] = {
|
|
115
|
-
fetchState: 'In-Progress',
|
|
116
|
-
error: undefined,
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
prepare(ruleId, pauseRule, resumeRule) {
|
|
120
|
-
return { payload: { ruleId, pauseRule, resumeRule } };
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
updateAutoTransferRuleSuccess(draft, action) {
|
|
124
|
-
const updatedRule = action.payload.rule;
|
|
125
|
-
draft.rules = draft.rules.map((rule) => rule.autoTransferRuleId === updatedRule.autoTransferRuleId
|
|
126
|
-
? updatedRule
|
|
127
|
-
: rule);
|
|
128
|
-
draft.ruleUpdateStatusById[updatedRule.autoTransferRuleId] = {
|
|
129
|
-
fetchState: 'Completed',
|
|
130
|
-
error: undefined,
|
|
131
|
-
};
|
|
132
|
-
},
|
|
133
|
-
updateAutoTransferRuleFailure(draft, action) {
|
|
134
|
-
draft.ruleUpdateStatusById[action.payload.ruleId] = {
|
|
135
|
-
fetchState: action.payload.fetchState,
|
|
136
|
-
error: action.payload.error,
|
|
137
|
-
};
|
|
138
|
-
},
|
|
139
|
-
deleteAutoTransferRule: {
|
|
140
|
-
reducer(draft, action) {
|
|
141
|
-
draft.ruleDeleteStatusById[action.payload.ruleId] = {
|
|
142
|
-
fetchState: 'In-Progress',
|
|
143
|
-
error: undefined,
|
|
144
|
-
};
|
|
145
|
-
},
|
|
146
|
-
prepare(ruleId) {
|
|
147
|
-
return { payload: { ruleId } };
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
deleteAutoTransferRuleSuccess(draft, action) {
|
|
151
|
-
const { ruleId } = action.payload;
|
|
152
|
-
draft.rules = draft.rules.filter((rule) => rule.autoTransferRuleId !== ruleId);
|
|
153
|
-
draft.ruleDeleteStatusById[ruleId] = {
|
|
154
|
-
fetchState: 'Completed',
|
|
155
|
-
error: undefined,
|
|
156
|
-
};
|
|
157
|
-
},
|
|
158
|
-
deleteAutoTransferRuleFailure(draft, action) {
|
|
159
|
-
draft.ruleDeleteStatusById[action.payload.ruleId] = {
|
|
160
|
-
fetchState: action.payload.fetchState,
|
|
161
|
-
error: action.payload.error,
|
|
162
|
-
};
|
|
163
|
-
},
|
|
164
|
-
fetchAutoTransferRuleHistory: {
|
|
165
|
-
reducer(draft, action) {
|
|
166
|
-
const { ruleId, cacheOverride } = action.payload;
|
|
167
|
-
const detail = (0, get_1.default)(draft.historyByRuleId, ruleId, undefined);
|
|
168
|
-
if (cacheOverride === true ||
|
|
169
|
-
detail == null ||
|
|
170
|
-
detail.fetchState !== 'In-Progress') {
|
|
171
|
-
draft.historyByRuleId[ruleId] = {
|
|
172
|
-
...commonHistory_1.initialCommonHistory,
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
prepare(ruleId, cacheOverride = true) {
|
|
177
|
-
return {
|
|
178
|
-
payload: { ruleId, cacheOverride },
|
|
179
|
-
};
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
updateAutoTransferRuleHistory(draft, action) {
|
|
183
|
-
const { ruleId, historicEventsPayload } = action.payload;
|
|
184
|
-
const historicEvents = historicEventsPayload.map((historicEventPayload) => (0, commonHistoryPayload_1.toHistoricEvent)(historicEventPayload));
|
|
185
|
-
draft.historyByRuleId[ruleId] = {
|
|
186
|
-
...commonHistory_1.initialCommonHistory,
|
|
187
|
-
fetchState: 'Completed',
|
|
188
|
-
error: undefined,
|
|
189
|
-
historicEvents,
|
|
190
|
-
};
|
|
191
|
-
},
|
|
192
|
-
updateAutoTransferRuleHistoryFetchStatus(draft, action) {
|
|
193
|
-
const { ruleId, fetchState, error } = action.payload;
|
|
194
|
-
const detail = (0, get_1.default)(draft.historyByRuleId, ruleId, undefined);
|
|
195
|
-
if (detail != null) {
|
|
196
|
-
detail.fetchState = fetchState;
|
|
197
|
-
detail.error = error;
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
clearAutoTransferRules(draft) {
|
|
201
|
-
Object.assign(draft, exports.initialState);
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
});
|
|
205
|
-
_a = autotransferRules.actions, exports.fetchAutoTransferRules = _a.fetchAutoTransferRules, exports.updateAutoTransferRules = _a.updateAutoTransferRules, exports.updateAutoTransferRulesFailure = _a.updateAutoTransferRulesFailure, exports.fetchAutoTransferReviewDetail = _a.fetchAutoTransferReviewDetail, exports.updateAutoTransferReviewDetail = _a.updateAutoTransferReviewDetail, exports.updateAutoTransferReviewDetailFailure = _a.updateAutoTransferReviewDetailFailure, exports.clearAutoTransferReviewDetail = _a.clearAutoTransferReviewDetail, exports.createAutoTransferRule = _a.createAutoTransferRule, exports.createAutoTransferRuleSuccess = _a.createAutoTransferRuleSuccess, exports.createAutoTransferRuleFailure = _a.createAutoTransferRuleFailure, exports.updateAutoTransferRule = _a.updateAutoTransferRule, exports.updateAutoTransferRuleSuccess = _a.updateAutoTransferRuleSuccess, exports.updateAutoTransferRuleFailure = _a.updateAutoTransferRuleFailure, exports.deleteAutoTransferRule = _a.deleteAutoTransferRule, exports.deleteAutoTransferRuleSuccess = _a.deleteAutoTransferRuleSuccess, exports.deleteAutoTransferRuleFailure = _a.deleteAutoTransferRuleFailure, exports.fetchAutoTransferRuleHistory = _a.fetchAutoTransferRuleHistory, exports.updateAutoTransferRuleHistory = _a.updateAutoTransferRuleHistory, exports.updateAutoTransferRuleHistoryFetchStatus = _a.updateAutoTransferRuleHistoryFetchStatus, exports.updateRuleLocalData = _a.updateRuleLocalData, exports.clearRuleUpdateLocalData = _a.clearRuleUpdateLocalData, exports.clearAutoTransferRules = _a.clearAutoTransferRules;
|
|
206
|
-
exports.default = autotransferRules.reducer;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { FetchState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { CommonHistoryView } from '../commonHistoryView/commonHistory';
|
|
5
|
-
import { FundingAccount } from '../commonSetup/setupViewSelector';
|
|
6
|
-
import { TreasuryAccount } from '../treasury/treasuryTransferMoney/treasuryTransferMoneyState';
|
|
7
|
-
import { ReviewTransferDetail } from '../zeniAccounts/transferDetail/transferDetailState';
|
|
8
|
-
import { AutoTransferRuleLocalData } from './autoTransferRulesPayload';
|
|
9
|
-
import { AutoTransferRule } from './autoTransferRulesState';
|
|
10
|
-
export interface AutoTransferRulesSelectorView extends SelectorView {
|
|
11
|
-
autoTransferReviewDetail: ReviewTransferDetail;
|
|
12
|
-
createRuleFetchState: FetchStateAndError;
|
|
13
|
-
ruleDeleteStatusById: Record<ID, FetchStateAndError>;
|
|
14
|
-
rules: AutoTransferRule[];
|
|
15
|
-
ruleUpdateLocalData: AutoTransferRuleLocalData;
|
|
16
|
-
ruleUpdateStatusById: Record<ID, FetchStateAndError>;
|
|
17
|
-
transferMoneyParties: FundingAccount[];
|
|
18
|
-
transferMoneyPartiesFetchState: FetchState;
|
|
19
|
-
treasuryAccount: TreasuryAccount;
|
|
20
|
-
ruleHistory?: Record<string, CommonHistoryView>;
|
|
21
|
-
}
|
|
22
|
-
export declare const getAutoTransferRules: (state: RootState) => AutoTransferRulesSelectorView;
|
|
23
|
-
export declare const getAutoTransferRuleById: (state: RootState, ruleId: ID) => AutoTransferRule | undefined;
|
|
24
|
-
export declare const getAutoTransferRuleHistory: (state: RootState, ruleId: ID) => CommonHistoryView | undefined;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = void 0;
|
|
7
|
-
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
9
|
-
const setupViewSelector_1 = require("../commonSetup/setupViewSelector");
|
|
10
|
-
const depositAccountListSelector_1 = require("../zeniAccounts/depositAccountList/depositAccountListSelector");
|
|
11
|
-
const paymentAccountListSelector_1 = require("../zeniAccounts/paymentAccountList/paymentAccountListSelector");
|
|
12
|
-
const getAutoTransferRules = (state) => {
|
|
13
|
-
const { autotransferRulesState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
|
|
14
|
-
const { rules, error, historyByRuleId, ruleUpdateLocalData, ruleUpdateStatusById, ruleDeleteStatusById, createRuleFetchState, autoTransferReviewDetail, } = autotransferRulesState;
|
|
15
|
-
const depositAccountsView = (0, depositAccountListSelector_1.getAllDepositAccounts)(depositAccountState, depositAccountListState);
|
|
16
|
-
const paymentAccountsView = (0, paymentAccountListSelector_1.getAllPaymentAccounts)(paymentAccountState, paymentAccountListState);
|
|
17
|
-
let transferMoneyParties = [];
|
|
18
|
-
const transferMoneyPartiesFetchState = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
19
|
-
depositAccountsView,
|
|
20
|
-
paymentAccountsView,
|
|
21
|
-
]).fetchState;
|
|
22
|
-
const fetchState = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
23
|
-
autotransferRulesState,
|
|
24
|
-
depositAccountsView,
|
|
25
|
-
paymentAccountsView,
|
|
26
|
-
]).fetchState;
|
|
27
|
-
if (depositAccountsView.fetchState === 'Completed' &&
|
|
28
|
-
paymentAccountsView.fetchState === 'Completed') {
|
|
29
|
-
transferMoneyParties = (0, setupViewSelector_1.getAllFundingAccounts)(depositAccountsView.depositAccounts, paymentAccountsView.paymentAccounts, paymentAccountListState.paymentAccountBalanceFetchStatus);
|
|
30
|
-
}
|
|
31
|
-
const treasuryAccount = {
|
|
32
|
-
accType: 'treasuryAccount',
|
|
33
|
-
label: 'Treasury',
|
|
34
|
-
id: 'treasury',
|
|
35
|
-
balance: treasuryDetailState.accountSummary?.availableBalance,
|
|
36
|
-
};
|
|
37
|
-
return {
|
|
38
|
-
autoTransferReviewDetail,
|
|
39
|
-
rules,
|
|
40
|
-
ruleUpdateLocalData,
|
|
41
|
-
ruleUpdateStatusById,
|
|
42
|
-
ruleDeleteStatusById,
|
|
43
|
-
ruleHistory: historyByRuleId,
|
|
44
|
-
treasuryAccount,
|
|
45
|
-
transferMoneyParties,
|
|
46
|
-
transferMoneyPartiesFetchState,
|
|
47
|
-
createRuleFetchState,
|
|
48
|
-
fetchState,
|
|
49
|
-
error,
|
|
50
|
-
version: 0,
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
exports.getAutoTransferRules = getAutoTransferRules;
|
|
54
|
-
const getAutoTransferRuleById = (state, ruleId) => {
|
|
55
|
-
return state.autotransferRulesState.rules.find((rule) => rule.autoTransferRuleId === ruleId);
|
|
56
|
-
};
|
|
57
|
-
exports.getAutoTransferRuleById = getAutoTransferRuleById;
|
|
58
|
-
const getAutoTransferRuleHistory = (state, ruleId) => {
|
|
59
|
-
return (0, get_1.default)(state.autotransferRulesState.historyByRuleId, ruleId, undefined);
|
|
60
|
-
};
|
|
61
|
-
exports.getAutoTransferRuleHistory = getAutoTransferRuleHistory;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { ZeniDate } from '../../../zeniDayJS';
|
|
3
|
-
import { CommonHistoryView } from '../commonHistoryView/commonHistory';
|
|
4
|
-
import { ReviewTransferDetail } from '../zeniAccounts/transferDetail/transferDetailState';
|
|
5
|
-
import { AutoTransferRuleFrequency, AutoTransferRuleLocalData, AutoTransferRuleType } from './autoTransferRulesPayload';
|
|
6
|
-
export interface AutoTransferRule {
|
|
7
|
-
amount: number;
|
|
8
|
-
autoTransferRuleId: ID;
|
|
9
|
-
currencyCode: string;
|
|
10
|
-
currencySymbol: string;
|
|
11
|
-
destinationBankAccountId: string | null;
|
|
12
|
-
frequency: AutoTransferRuleFrequency;
|
|
13
|
-
isActive: boolean;
|
|
14
|
-
isDeleted: boolean;
|
|
15
|
-
lastRunTime: string | null;
|
|
16
|
-
ruleType: AutoTransferRuleType;
|
|
17
|
-
sourceBankAccountId: string;
|
|
18
|
-
sourceBankAccountType: string;
|
|
19
|
-
createTime?: ZeniDate;
|
|
20
|
-
destinationBankAccountMetadata?: DestinationBankAccountMetadata[];
|
|
21
|
-
destinationBankAccountType?: string;
|
|
22
|
-
nextTransferDate?: ZeniDate;
|
|
23
|
-
updateTime?: ZeniDate;
|
|
24
|
-
}
|
|
25
|
-
export interface DestinationBankAccountMetadata {
|
|
26
|
-
accountId: string;
|
|
27
|
-
accountType: string;
|
|
28
|
-
percentage: number;
|
|
29
|
-
}
|
|
30
|
-
export interface AutoTransferRulesState extends FetchedState {
|
|
31
|
-
autoTransferReviewDetail: ReviewTransferDetail;
|
|
32
|
-
createRuleFetchState: FetchStateAndError;
|
|
33
|
-
historyByRuleId: Record<ID, CommonHistoryView>;
|
|
34
|
-
ruleDeleteStatusById: Record<ID, FetchStateAndError>;
|
|
35
|
-
rules: AutoTransferRule[];
|
|
36
|
-
ruleUpdateLocalData: AutoTransferRuleLocalData;
|
|
37
|
-
ruleUpdateStatusById: Record<ID, FetchStateAndError>;
|
|
38
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
4
|
-
import { RootState } from '../../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
6
|
-
import { AccType, AccountTypeSubConfigCodeKeyType } from '../../billPay/billPayConfig/billPayConfigState';
|
|
7
|
-
import { AutoTransferRuleLocalData, AutoTransferRuleRequestBody } from '../autoTransferRulesPayload';
|
|
8
|
-
import { createAutoTransferRule, createAutoTransferRuleFailure, createAutoTransferRuleSuccess } from '../autoTransferRulesReducer';
|
|
9
|
-
export type ActionType = ReturnType<typeof createAutoTransferRule> | ReturnType<typeof createAutoTransferRuleSuccess> | ReturnType<typeof createAutoTransferRuleFailure> | ReturnType<typeof openSnackbar>;
|
|
10
|
-
export declare const createAutoTransferRuleEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
11
|
-
export declare function mapAutoTransferRuleLocalDataToPayload(localData: AutoTransferRuleLocalData, pauseRule?: boolean, resumeRule?: boolean): AutoTransferRuleRequestBody;
|
|
12
|
-
export declare const accountTypeSubConfigCodeToAccType: (code?: AccountTypeSubConfigCodeKeyType | "treasuryAccount") => AccType | "treasury_account" | undefined;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.accountTypeSubConfigCodeToAccType = exports.createAutoTransferRuleEpic = void 0;
|
|
4
|
-
exports.mapAutoTransferRuleLocalDataToPayload = mapAutoTransferRuleLocalDataToPayload;
|
|
5
|
-
const rxjs_1 = require("rxjs");
|
|
6
|
-
const operators_1 = require("rxjs/operators");
|
|
7
|
-
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
8
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
9
|
-
const autoTransferRulesPayload_1 = require("../autoTransferRulesPayload");
|
|
10
|
-
const autoTransferRulesReducer_1 = require("../autoTransferRulesReducer");
|
|
11
|
-
const createAutoTransferRuleEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(autoTransferRulesReducer_1.createAutoTransferRule.match), (0, operators_1.switchMap)(() => {
|
|
12
|
-
const requestBody = mapAutoTransferRuleLocalDataToPayload(state$.value.autotransferRulesState.ruleUpdateLocalData);
|
|
13
|
-
return zeniAPI
|
|
14
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/rules/transfer/auto`, requestBody)
|
|
15
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
17
|
-
const rule = (0, autoTransferRulesPayload_1.mapPayloadToAutoTransferRule)(response.data.auto_transfer_rule);
|
|
18
|
-
const actions = [
|
|
19
|
-
(0, autoTransferRulesReducer_1.createAutoTransferRuleSuccess)({ rule }),
|
|
20
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
21
|
-
messageSection: 'auto_transfer_rule_create',
|
|
22
|
-
messageText: 'success',
|
|
23
|
-
type: 'success',
|
|
24
|
-
}),
|
|
25
|
-
];
|
|
26
|
-
return (0, rxjs_1.from)(actions);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return (0, rxjs_1.from)([
|
|
30
|
-
(0, autoTransferRulesReducer_1.createAutoTransferRuleFailure)({
|
|
31
|
-
fetchState: 'Error',
|
|
32
|
-
error: response.status,
|
|
33
|
-
}),
|
|
34
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
35
|
-
messageSection: 'auto_transfer_rule_create',
|
|
36
|
-
messageText: 'failed',
|
|
37
|
-
type: 'error',
|
|
38
|
-
variables: [
|
|
39
|
-
{
|
|
40
|
-
variableName: '_api-error_',
|
|
41
|
-
variableValue: response.status.message,
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
}),
|
|
45
|
-
]);
|
|
46
|
-
}
|
|
47
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, autoTransferRulesReducer_1.createAutoTransferRuleFailure)({
|
|
48
|
-
fetchState: 'Error',
|
|
49
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Create auto transfer rule REST API call errored out ' +
|
|
50
|
-
JSON.stringify(error)),
|
|
51
|
-
}))));
|
|
52
|
-
}));
|
|
53
|
-
exports.createAutoTransferRuleEpic = createAutoTransferRuleEpic;
|
|
54
|
-
function mapAutoTransferRuleLocalDataToPayload(localData, pauseRule, resumeRule) {
|
|
55
|
-
if (pauseRule === true) {
|
|
56
|
-
return {
|
|
57
|
-
is_active: false,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
if (resumeRule === true) {
|
|
61
|
-
return {
|
|
62
|
-
is_active: true,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
const payload = {
|
|
66
|
-
...(localData.amount != null &&
|
|
67
|
-
localData.ruleType !== 'percentage_of_balance' && {
|
|
68
|
-
amount: localData.amount.amount,
|
|
69
|
-
currency_code: localData.amount.currencyCode,
|
|
70
|
-
}),
|
|
71
|
-
...(localData.destinationAccount != null && {
|
|
72
|
-
destination_bank_account_id: localData.destinationAccount.id,
|
|
73
|
-
destination_bank_account_type: (0, exports.accountTypeSubConfigCodeToAccType)(localData.destinationAccount.accType),
|
|
74
|
-
}),
|
|
75
|
-
...(localData.destinationAccountWithPercentAllocation != null && {
|
|
76
|
-
destination_bank_account_metadata: localData.destinationAccountWithPercentAllocation.map((allocation) => ({
|
|
77
|
-
account_id: allocation.account.id,
|
|
78
|
-
account_type: (0, exports.accountTypeSubConfigCodeToAccType)(allocation.account.accType),
|
|
79
|
-
percentage: allocation.percentage,
|
|
80
|
-
})),
|
|
81
|
-
}),
|
|
82
|
-
frequency: localData.frequency,
|
|
83
|
-
rule_type: localData.ruleType,
|
|
84
|
-
...(localData.sourceAccount != null && {
|
|
85
|
-
source_bank_account_id: localData.sourceAccount.id,
|
|
86
|
-
source_bank_account_type: (0, exports.accountTypeSubConfigCodeToAccType)(localData.sourceAccount.accType),
|
|
87
|
-
}),
|
|
88
|
-
...(localData.firstTransferDate != null && {
|
|
89
|
-
first_transfer_date: localData.firstTransferDate.format('YYYY-MM-DD'),
|
|
90
|
-
}),
|
|
91
|
-
};
|
|
92
|
-
return payload;
|
|
93
|
-
}
|
|
94
|
-
const accountTypeSubConfigCodeToAccType = (code) => {
|
|
95
|
-
switch (code) {
|
|
96
|
-
case 'depositAccount':
|
|
97
|
-
return 'deposit_account';
|
|
98
|
-
case 'paymentAccount':
|
|
99
|
-
return 'payment_account';
|
|
100
|
-
case 'treasuryAccount':
|
|
101
|
-
return 'treasury_account';
|
|
102
|
-
default:
|
|
103
|
-
return undefined;
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
exports.accountTypeSubConfigCodeToAccType = accountTypeSubConfigCodeToAccType;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
4
|
-
import { RootState } from '../../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
6
|
-
import { deleteAutoTransferRule, deleteAutoTransferRuleFailure, deleteAutoTransferRuleSuccess } from '../autoTransferRulesReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof deleteAutoTransferRule> | ReturnType<typeof deleteAutoTransferRuleSuccess> | ReturnType<typeof deleteAutoTransferRuleFailure> | ReturnType<typeof openSnackbar>;
|
|
8
|
-
export declare const deleteAutoTransferRuleEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteAutoTransferRuleEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
|
-
const autoTransferRulesReducer_1 = require("../autoTransferRulesReducer");
|
|
9
|
-
const deleteAutoTransferRuleEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(autoTransferRulesReducer_1.deleteAutoTransferRule.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
-
const { ruleId } = action.payload;
|
|
11
|
-
return zeniAPI
|
|
12
|
-
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/rules/transfer/auto/${ruleId}`)
|
|
13
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
14
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
15
|
-
const actions = [
|
|
16
|
-
(0, autoTransferRulesReducer_1.deleteAutoTransferRuleSuccess)({ ruleId }),
|
|
17
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
18
|
-
messageSection: 'auto_transfer_rule_delete',
|
|
19
|
-
messageText: 'success',
|
|
20
|
-
type: 'success',
|
|
21
|
-
}),
|
|
22
|
-
];
|
|
23
|
-
return (0, rxjs_1.from)(actions);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
return (0, rxjs_1.from)([
|
|
27
|
-
(0, autoTransferRulesReducer_1.deleteAutoTransferRuleFailure)({
|
|
28
|
-
ruleId,
|
|
29
|
-
fetchState: 'Error',
|
|
30
|
-
error: response.status,
|
|
31
|
-
}),
|
|
32
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
33
|
-
messageSection: 'auto_transfer_rule_delete',
|
|
34
|
-
messageText: 'failed',
|
|
35
|
-
type: 'error',
|
|
36
|
-
variables: [
|
|
37
|
-
{
|
|
38
|
-
variableName: '_api-error_',
|
|
39
|
-
variableValue: response.status.message,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
}),
|
|
43
|
-
]);
|
|
44
|
-
}
|
|
45
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, autoTransferRulesReducer_1.deleteAutoTransferRuleFailure)({
|
|
46
|
-
ruleId,
|
|
47
|
-
fetchState: 'Error',
|
|
48
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Delete auto transfer rule REST API call errored out ' +
|
|
49
|
-
JSON.stringify(error)),
|
|
50
|
-
}))));
|
|
51
|
-
}));
|
|
52
|
-
exports.deleteAutoTransferRuleEpic = deleteAutoTransferRuleEpic;
|
package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
-
import { fetchAutoTransferReviewDetail, updateAutoTransferReviewDetail, updateAutoTransferReviewDetailFailure } from '../autoTransferRulesReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchAutoTransferReviewDetail> | ReturnType<typeof updateAutoTransferReviewDetail> | ReturnType<typeof updateAutoTransferReviewDetailFailure>;
|
|
7
|
-
export declare const fetchAutoTransferReviewDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchAutoTransferReviewDetailEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
-
const autoTransferRulesReducer_1 = require("../autoTransferRulesReducer");
|
|
8
|
-
const createAutoTransferRuleEpic_1 = require("./createAutoTransferRuleEpic");
|
|
9
|
-
const fetchAutoTransferReviewDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(autoTransferRulesReducer_1.fetchAutoTransferReviewDetail.match), (0, operators_1.switchMap)(() => {
|
|
10
|
-
const localData = state$.value.autotransferRulesState.ruleUpdateLocalData;
|
|
11
|
-
const payload = {
|
|
12
|
-
...(localData.sourceAccount != null && {
|
|
13
|
-
from_account: {
|
|
14
|
-
account_id: localData.sourceAccount.id,
|
|
15
|
-
account_type: (0, createAutoTransferRuleEpic_1.accountTypeSubConfigCodeToAccType)(localData.sourceAccount.accType) ?? '',
|
|
16
|
-
},
|
|
17
|
-
}),
|
|
18
|
-
...(localData.destinationAccount != null && {
|
|
19
|
-
to_account: {
|
|
20
|
-
account_id: localData.destinationAccount.id,
|
|
21
|
-
account_type: (0, createAutoTransferRuleEpic_1.accountTypeSubConfigCodeToAccType)(localData.destinationAccount.accType) ?? '',
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
...(localData.amount != null && {
|
|
25
|
-
amount: localData.amount.amount,
|
|
26
|
-
currency_code: localData.amount.currencyCode,
|
|
27
|
-
currency_symbol: localData.amount.currencySymbol,
|
|
28
|
-
}),
|
|
29
|
-
};
|
|
30
|
-
return zeniAPI
|
|
31
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/transfers/review`, payload)
|
|
32
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
33
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
34
|
-
return (0, rxjs_1.of)((0, autoTransferRulesReducer_1.updateAutoTransferReviewDetail)(response.data));
|
|
35
|
-
}
|
|
36
|
-
return (0, rxjs_1.of)((0, autoTransferRulesReducer_1.updateAutoTransferReviewDetailFailure)(response.status));
|
|
37
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, autoTransferRulesReducer_1.updateAutoTransferReviewDetailFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch auto transfer review detail REST API call errored out ' +
|
|
38
|
-
JSON.stringify(error))))));
|
|
39
|
-
}));
|
|
40
|
-
exports.fetchAutoTransferReviewDetailEpic = fetchAutoTransferReviewDetailEpic;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
-
import { fetchAutoTransferRuleHistory, updateAutoTransferRuleHistory, updateAutoTransferRuleHistoryFetchStatus } from '../autoTransferRulesReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchAutoTransferRuleHistory> | ReturnType<typeof updateAutoTransferRuleHistory> | ReturnType<typeof updateAutoTransferRuleHistoryFetchStatus>;
|
|
7
|
-
export declare const fetchAutoTransferRuleHistoryEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.fetchAutoTransferRuleHistoryEpic = void 0;
|
|
7
|
-
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
-
const rxjs_1 = require("rxjs");
|
|
9
|
-
const operators_1 = require("rxjs/operators");
|
|
10
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
11
|
-
const autoTransferRulesReducer_1 = require("../autoTransferRulesReducer");
|
|
12
|
-
const fetchAutoTransferRuleHistoryEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(autoTransferRulesReducer_1.fetchAutoTransferRuleHistory.match), (0, operators_1.mergeMap)((action) => {
|
|
13
|
-
const { ruleId, cacheOverride } = action.payload;
|
|
14
|
-
const historyActions = [];
|
|
15
|
-
const state = state$.value;
|
|
16
|
-
const historyDetail = (0, get_1.default)(state.autotransferRulesState.historyByRuleId, ruleId, undefined);
|
|
17
|
-
if (cacheOverride === true ||
|
|
18
|
-
historyDetail == null ||
|
|
19
|
-
historyDetail.fetchState !== 'In-Progress') {
|
|
20
|
-
historyActions.push((0, autoTransferRulesReducer_1.updateAutoTransferRuleHistoryFetchStatus)({
|
|
21
|
-
ruleId,
|
|
22
|
-
fetchState: 'In-Progress',
|
|
23
|
-
}));
|
|
24
|
-
const getHistoryDetail$ = zeniAPI
|
|
25
|
-
.getJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/rules/transfer/auto/${ruleId}/history`)
|
|
26
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
27
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
28
|
-
return (0, rxjs_1.of)((0, autoTransferRulesReducer_1.updateAutoTransferRuleHistory)({
|
|
29
|
-
ruleId,
|
|
30
|
-
historicEventsPayload: response.data.activities,
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
return (0, rxjs_1.of)((0, autoTransferRulesReducer_1.updateAutoTransferRuleHistoryFetchStatus)({
|
|
35
|
-
ruleId,
|
|
36
|
-
fetchState: 'Error',
|
|
37
|
-
error: response.status,
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, autoTransferRulesReducer_1.updateAutoTransferRuleHistoryFetchStatus)({
|
|
41
|
-
ruleId,
|
|
42
|
-
fetchState: 'Error',
|
|
43
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch auto transfer rule history REST API call errored out ' +
|
|
44
|
-
JSON.stringify(error)),
|
|
45
|
-
}))));
|
|
46
|
-
return (0, rxjs_1.concat)((0, rxjs_1.from)(historyActions), getHistoryDetail$);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return (0, rxjs_1.from)(historyActions);
|
|
50
|
-
}
|
|
51
|
-
}));
|
|
52
|
-
exports.fetchAutoTransferRuleHistoryEpic = fetchAutoTransferRuleHistoryEpic;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
-
import { fetchTreasuryOverviewDetail } from '../../treasury/treasuryList/treasuryDetailReducer';
|
|
6
|
-
import { fetchDepositAccountList } from '../../zeniAccounts/depositAccountList/depositAccountListReducer';
|
|
7
|
-
import { fetchPaymentAccountList } from '../../zeniAccounts/paymentAccountList/paymentAccountListReducer';
|
|
8
|
-
import { fetchAutoTransferRules, updateAutoTransferRules, updateAutoTransferRulesFailure } from '../autoTransferRulesReducer';
|
|
9
|
-
export type ActionType = ReturnType<typeof fetchAutoTransferRules> | ReturnType<typeof updateAutoTransferRules> | ReturnType<typeof updateAutoTransferRulesFailure> | ReturnType<typeof fetchDepositAccountList> | ReturnType<typeof fetchPaymentAccountList> | ReturnType<typeof fetchTreasuryOverviewDetail>;
|
|
10
|
-
export declare const fetchAutoTransferRulesEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|