@zeniai/client-epic-state 5.0.81 → 5.0.82-betaAK1
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/amount.d.ts +2 -1
- package/lib/commonStateTypes/amount.js +5 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/commonStateTypes/workingDayHelper.d.ts +11 -0
- package/lib/commonStateTypes/workingDayHelper.js +31 -1
- package/lib/entity/account/accountSelector.d.ts +9 -0
- package/lib/entity/account/accountSelector.js +14 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- 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/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/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +4 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +18 -10
- package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
- package/lib/epic.d.ts +7 -1
- package/lib/epic.js +7 -1
- package/lib/esm/commonStateTypes/amount.js +3 -1
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/esm/commonStateTypes/workingDayHelper.js +29 -0
- package/lib/esm/entity/account/accountSelector.js +11 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +18 -10
- package/lib/esm/epic.js +7 -1
- package/lib/esm/index.js +12 -6
- package/lib/esm/reducer.js +9 -0
- package/lib/esm/view/createTransferEntry/createTransferEntryReducer.js +82 -0
- package/lib/esm/view/createTransferEntry/createTransferEntrySelector.js +64 -0
- package/lib/esm/view/createTransferEntry/createTransferEntryState.js +17 -0
- package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +130 -0
- package/lib/esm/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +36 -0
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +13 -1
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +9 -1
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +24 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +55 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +15 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +45 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +28 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +27 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +37 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +49 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +179 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +5 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +28 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +39 -0
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +6 -1
- package/lib/index.d.ts +15 -6
- package/lib/index.js +62 -33
- package/lib/reducer.d.ts +9 -0
- package/lib/reducer.js +9 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- 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/createTransferEntry/createTransferEntryReducer.d.ts +32 -0
- package/lib/view/createTransferEntry/createTransferEntryReducer.js +86 -0
- package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +39 -0
- package/lib/view/createTransferEntry/createTransferEntrySelector.js +69 -0
- package/lib/view/createTransferEntry/createTransferEntryState.d.ts +30 -0
- package/lib/view/createTransferEntry/createTransferEntryState.js +20 -0
- package/lib/view/createTransferEntry/epics/createTransferEntryEpic.d.ts +11 -0
- package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +134 -0
- package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.d.ts +14 -0
- package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +40 -0
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +14 -2
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +4 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +11 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +52 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +29 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +21 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +59 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +16 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +19 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +44 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +51 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +16 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +32 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +14 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +31 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +32 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +42 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +15 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +53 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +41 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +184 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +71 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +8 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +16 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +32 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +10 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +43 -0
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +6 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +6 -1
- package/package.json +34 -62
package/lib/reducer.js
CHANGED
|
@@ -137,6 +137,7 @@ const companyHealthMetricViewReducer_1 = __importStar(require("./view/companyHea
|
|
|
137
137
|
const companyMonthEndReportViewReducer_1 = __importStar(require("./view/companyMonthEndReportView/companyMonthEndReportViewReducer"));
|
|
138
138
|
const companyTaskManagerViewReducer_1 = __importStar(require("./view/companyTaskManagerView/companyTaskManagerViewReducer"));
|
|
139
139
|
const companyViewReducer_1 = __importStar(require("./view/companyView/companyViewReducer"));
|
|
140
|
+
const createTransferEntryReducer_1 = __importStar(require("./view/createTransferEntry/createTransferEntryReducer"));
|
|
140
141
|
const creditAgentViewReducer_1 = __importStar(require("./view/creditAgentView/creditAgentViewReducer"));
|
|
141
142
|
const dashboardReducer_1 = __importStar(require("./view/dashboard/dashboardReducer"));
|
|
142
143
|
const dashboardLayoutReducer_1 = __importStar(require("./view/dashboardLayout/dashboardLayoutReducer"));
|
|
@@ -196,6 +197,8 @@ const internationalWireVerificationReducer_1 = __importStar(require("./view/spen
|
|
|
196
197
|
const magicLinkViewReducer_1 = __importStar(require("./view/spendManagement/billPay/magicLinkView/magicLinkViewReducer"));
|
|
197
198
|
const previousBillsReducer_1 = __importStar(require("./view/spendManagement/billPay/previousBills/previousBillsReducer"));
|
|
198
199
|
const wiseRedirectReducer_1 = __importStar(require("./view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer"));
|
|
200
|
+
const autoSweepFlowReducer_1 = __importStar(require("./view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer"));
|
|
201
|
+
const cashManagementOverviewReducer_1 = __importStar(require("./view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer"));
|
|
199
202
|
const cardUserOnboardingReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer"));
|
|
200
203
|
const cashbackDetailReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer"));
|
|
201
204
|
const chargeCardConfigReducer_1 = __importStar(require("./view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer"));
|
|
@@ -347,6 +350,7 @@ const initialViewsState = {
|
|
|
347
350
|
arAgingState: arAgingReducer_1.initialState,
|
|
348
351
|
auditReportViewState: auditReportViewReducer_1.initialState,
|
|
349
352
|
authenticationViewState: authenticationViewReducer_1.initialState,
|
|
353
|
+
autoSweepFlowState: autoSweepFlowReducer_1.initialState,
|
|
350
354
|
autotransferRulesState: autoTransferRulesReducer_1.initialState,
|
|
351
355
|
balanceSheetState: balanceSheetReducer_1.initialState,
|
|
352
356
|
bankAccountViewState: bankAccountViewReducer_1.initialState,
|
|
@@ -365,6 +369,7 @@ const initialViewsState = {
|
|
|
365
369
|
cashBalanceState: cashBalanceReducer_1.initialState,
|
|
366
370
|
cashFlowState: cashFlowReducer_1.initialState,
|
|
367
371
|
cashInCashOutState: cashInCashOutReducer_1.initialState,
|
|
372
|
+
cashManagementOverviewState: cashManagementOverviewReducer_1.initialState,
|
|
368
373
|
cashPositionState: cashPositionReducer_1.initialState,
|
|
369
374
|
chargeCardConfigState: chargeCardConfigReducer_1.initialState,
|
|
370
375
|
chargeCardDetailState: chargeCardDetailReducer_1.initialState,
|
|
@@ -399,6 +404,7 @@ const initialViewsState = {
|
|
|
399
404
|
expenseAutomationReconciliationViewState: reconciliationViewReducer_1.initialState,
|
|
400
405
|
expenseAutomationTransactionsViewState: transactionsViewReducer_1.initialState,
|
|
401
406
|
expenseAutomationViewState: expenseAutomationViewReducer_1.initialState,
|
|
407
|
+
createTransferEntryState: createTransferEntryReducer_1.initialState,
|
|
402
408
|
expressPayState: expressPayReducer_1.initialState,
|
|
403
409
|
featureNotificationViewState: featureNotificationViewReducer_1.initialState,
|
|
404
410
|
fileViewState: fileViewState_1.initialFileViewState,
|
|
@@ -583,6 +589,7 @@ const viewReducers = {
|
|
|
583
589
|
arAgingState: arAgingReducer_1.default,
|
|
584
590
|
auditReportViewState: auditReportViewReducer_1.default,
|
|
585
591
|
authenticationViewState: authenticationViewReducer_1.default,
|
|
592
|
+
autoSweepFlowState: autoSweepFlowReducer_1.default,
|
|
586
593
|
autotransferRulesState: autoTransferRulesReducer_1.default,
|
|
587
594
|
balanceSheetState: balanceSheetReducer_1.default,
|
|
588
595
|
bankAccountViewState: bankAccountViewReducer_1.default,
|
|
@@ -600,6 +607,7 @@ const viewReducers = {
|
|
|
600
607
|
cashBalanceState: cashBalanceReducer_1.default,
|
|
601
608
|
cashFlowState: cashFlowReducer_1.default,
|
|
602
609
|
cashInCashOutState: cashInCashOutReducer_1.default,
|
|
610
|
+
cashManagementOverviewState: cashManagementOverviewReducer_1.default,
|
|
603
611
|
cashPositionState: cashPositionReducer_1.default,
|
|
604
612
|
chargeCardConfigState: chargeCardConfigReducer_1.default,
|
|
605
613
|
chargeCardDetailState: chargeCardDetailReducer_1.default,
|
|
@@ -634,6 +642,7 @@ const viewReducers = {
|
|
|
634
642
|
expenseAutomationReconciliationViewState: reconciliationViewReducer_1.default,
|
|
635
643
|
expenseAutomationTransactionsViewState: transactionsViewReducer_1.default,
|
|
636
644
|
expenseAutomationViewState: expenseAutomationViewReducer_1.default,
|
|
645
|
+
createTransferEntryState: createTransferEntryReducer_1.default,
|
|
637
646
|
expressPayState: expressPayReducer_1.default,
|
|
638
647
|
featureNotificationViewState: featureNotificationViewReducer_1.default,
|
|
639
648
|
fileViewState: fileViewReducer_1.default,
|
|
@@ -5,7 +5,7 @@ import { ZeniDate } from '../../zeniDayJS';
|
|
|
5
5
|
import { AuditSummary } from '../reviewCompanyView/reviewCompanyViewState';
|
|
6
6
|
export declare const toAuditRuleEntityType: (v: string) => "dashboard" | "transactions" | "reports";
|
|
7
7
|
export type AuditRuleEntityType = ReturnType<typeof toAuditRuleEntityType>;
|
|
8
|
-
declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "uncategorized-expense" | "uncategorized-income";
|
|
8
|
+
declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts" | "uncategorized-expense" | "uncategorized-income";
|
|
9
9
|
export type AuditRuleEntityIdType = ReturnType<typeof toAuditRuleEntityIdType>;
|
|
10
10
|
export declare const toAuditRuleTypeIdType: (v: string) => "accounting" | "business";
|
|
11
11
|
type AuditRuleTypeIdType = ReturnType<typeof toAuditRuleTypeIdType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getBillPayCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getCardBalance: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getCashBalance: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -15,7 +15,7 @@ export declare const getCashInCashOut: (accountState: AccountState, accountGroup
|
|
|
15
15
|
firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
16
16
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
17
17
|
availableNumberOfPeriods: number | undefined;
|
|
18
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
18
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
|
|
19
19
|
reportTitle: string;
|
|
20
20
|
version: string | number | undefined;
|
|
21
21
|
status: import("../..").Status | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const getCashPosition: (accountState: AccountState, cashPositionS
|
|
|
12
12
|
firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
13
13
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
14
14
|
availableNumberOfPeriods: number | undefined;
|
|
15
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
|
|
15
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
|
|
16
16
|
reportTitle: string;
|
|
17
17
|
version: string | number | undefined;
|
|
18
18
|
status: import("../..").Status | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
|
|
3
|
+
import { TransactionType } from '../../entity/transaction/stateTypes/transactionType';
|
|
4
|
+
import { CreateTransferEntryState, TransferAccountsFetchType } from './createTransferEntryState';
|
|
5
|
+
export declare const initialState: CreateTransferEntryState;
|
|
6
|
+
export declare const fetchAccountsForTransferFlow: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
7
|
+
kind: TransferAccountsFetchType;
|
|
8
|
+
}, "createTransferEntry/fetchAccountsForTransferFlow">, updateAccountsForTransferFlow: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
9
|
+
accountIds: ID[];
|
|
10
|
+
kind: TransferAccountsFetchType;
|
|
11
|
+
}, "createTransferEntry/updateAccountsForTransferFlow">, updateAccountsForTransferFlowFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
12
|
+
kind: TransferAccountsFetchType;
|
|
13
|
+
}, "createTransferEntry/updateAccountsForTransferFlowFailure">, createTransferEntry: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
14
|
+
creditAccountIntegrationId: string;
|
|
15
|
+
debitAccountIntegrationId: string;
|
|
16
|
+
memo: string;
|
|
17
|
+
sourceTransactionType: TransactionType;
|
|
18
|
+
transactionId: ID;
|
|
19
|
+
transactionType: TransactionType;
|
|
20
|
+
}], {
|
|
21
|
+
creditAccountIntegrationId: string;
|
|
22
|
+
debitAccountIntegrationId: string;
|
|
23
|
+
memo: string;
|
|
24
|
+
sourceTransactionType: TransactionType;
|
|
25
|
+
transactionId: ID;
|
|
26
|
+
transactionType: TransactionType;
|
|
27
|
+
}, "createTransferEntry/createTransferEntry", never, never>, createTransferEntrySuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/createTransferEntrySuccess">, createTransferEntryFailure: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/createTransferEntryFailure">, resetCreateTransferEntryStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/resetCreateTransferEntryStatus">, createTransferEntryReplacedTransaction: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[previousTransactionId: TransactionID, newTransactionId: TransactionID], {
|
|
28
|
+
newTransactionId: TransactionID;
|
|
29
|
+
previousTransactionId: TransactionID;
|
|
30
|
+
}, "createTransferEntry/createTransferEntryReplacedTransaction", never, never>, clearTransferEntryRouteReplacement: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/clearTransferEntryRouteReplacement">, clearCreateTransferEntry: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"createTransferEntry/clearCreateTransferEntry">;
|
|
31
|
+
declare const _default: import("redux").Reducer<CreateTransferEntryState>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearCreateTransferEntry = exports.clearTransferEntryRouteReplacement = exports.createTransferEntryReplacedTransaction = exports.resetCreateTransferEntryStatus = exports.createTransferEntryFailure = exports.createTransferEntrySuccess = exports.createTransferEntry = exports.updateAccountsForTransferFlowFailure = exports.updateAccountsForTransferFlow = exports.fetchAccountsForTransferFlow = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const createTransferEntryState_1 = require("./createTransferEntryState");
|
|
7
|
+
exports.initialState = createTransferEntryState_1.initialCreateTransferEntryState;
|
|
8
|
+
const createTransferEntrySlice = (0, toolkit_1.createSlice)({
|
|
9
|
+
name: 'createTransferEntry',
|
|
10
|
+
initialState: exports.initialState,
|
|
11
|
+
reducers: {
|
|
12
|
+
fetchAccountsForTransferFlow(draft, action) {
|
|
13
|
+
const slice = draft.transferAccountsByType[action.payload.kind];
|
|
14
|
+
// Idempotent: a duplicate dispatch must not briefly downgrade
|
|
15
|
+
// 'Completed' back to 'In-Progress' (would clear loaded data from a
|
|
16
|
+
// consumer's perspective) nor restart the in-flight epic stream.
|
|
17
|
+
// The hook (`useFetchTransferAccountsForFlow`) is the sole caller and
|
|
18
|
+
// already dedupes via `store.getState()`; this guard is defense in
|
|
19
|
+
// depth for any future caller.
|
|
20
|
+
if (slice.fetchState === 'In-Progress' ||
|
|
21
|
+
slice.fetchState === 'Completed') {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
slice.fetchState = 'In-Progress';
|
|
25
|
+
},
|
|
26
|
+
updateAccountsForTransferFlow(draft, action) {
|
|
27
|
+
const slice = draft.transferAccountsByType[action.payload.kind];
|
|
28
|
+
slice.fetchState = 'Completed';
|
|
29
|
+
slice.accountIds = action.payload.accountIds;
|
|
30
|
+
},
|
|
31
|
+
updateAccountsForTransferFlowFailure(draft, action) {
|
|
32
|
+
draft.transferAccountsByType[action.payload.kind].fetchState = 'Error';
|
|
33
|
+
},
|
|
34
|
+
createTransferEntry: {
|
|
35
|
+
prepare(payload) {
|
|
36
|
+
return { payload };
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Defense-in-depth: clear any stale `lastTransferEntryReplacement` on a
|
|
40
|
+
* fresh dispatch so a second `createTransferEntry` never inherits the
|
|
41
|
+
* previous run's replacement signal (e.g. if the prior `timer(0)` cleanup
|
|
42
|
+
* never fired). Mirrors the host hook's `consumedReplacementRef` guard
|
|
43
|
+
* (see `useTransferEntryRouteReplacement` in zeni-web-app-ui).
|
|
44
|
+
*/
|
|
45
|
+
reducer(draft) {
|
|
46
|
+
draft.createTransferEntryStatus = 'In-Progress';
|
|
47
|
+
draft.lastTransferEntryReplacement = undefined;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
createTransferEntrySuccess(draft) {
|
|
51
|
+
draft.createTransferEntryStatus = 'Completed';
|
|
52
|
+
},
|
|
53
|
+
createTransferEntryFailure(draft) {
|
|
54
|
+
draft.createTransferEntryStatus = 'Error';
|
|
55
|
+
},
|
|
56
|
+
resetCreateTransferEntryStatus(draft) {
|
|
57
|
+
draft.createTransferEntryStatus = 'Not-Started';
|
|
58
|
+
},
|
|
59
|
+
createTransferEntryReplacedTransaction: {
|
|
60
|
+
prepare(previousTransactionId, newTransactionId) {
|
|
61
|
+
return { payload: { newTransactionId, previousTransactionId } };
|
|
62
|
+
},
|
|
63
|
+
reducer(draft, action) {
|
|
64
|
+
draft.lastTransferEntryReplacement = action.payload;
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* One-shot acknowledgement: the host has consumed the route-replacement
|
|
69
|
+
* signal and navigated to the new transaction url, so we can drop the
|
|
70
|
+
* record. Re-dispatching is idempotent.
|
|
71
|
+
*/
|
|
72
|
+
clearTransferEntryRouteReplacement(draft) {
|
|
73
|
+
draft.lastTransferEntryReplacement = undefined;
|
|
74
|
+
},
|
|
75
|
+
/**
|
|
76
|
+
* Full slice reset. Dispatched from `clearAllEpic` on tenant switch so
|
|
77
|
+
* stale per-tenant state (account-id pools, status, replacement signal)
|
|
78
|
+
* doesn't bleed across tenants.
|
|
79
|
+
*/
|
|
80
|
+
clearCreateTransferEntry(draft) {
|
|
81
|
+
Object.assign(draft, exports.initialState);
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
_a = createTransferEntrySlice.actions, exports.fetchAccountsForTransferFlow = _a.fetchAccountsForTransferFlow, exports.updateAccountsForTransferFlow = _a.updateAccountsForTransferFlow, exports.updateAccountsForTransferFlowFailure = _a.updateAccountsForTransferFlowFailure, exports.createTransferEntry = _a.createTransferEntry, exports.createTransferEntrySuccess = _a.createTransferEntrySuccess, exports.createTransferEntryFailure = _a.createTransferEntryFailure, exports.resetCreateTransferEntryStatus = _a.resetCreateTransferEntryStatus, exports.createTransferEntryReplacedTransaction = _a.createTransferEntryReplacedTransaction, exports.clearTransferEntryRouteReplacement = _a.clearTransferEntryRouteReplacement, exports.clearCreateTransferEntry = _a.clearCreateTransferEntry;
|
|
86
|
+
exports.default = createTransferEntrySlice.reducer;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AccountBase } from '../../entity/account/accountState';
|
|
2
|
+
import { RootState } from '../../reducer';
|
|
3
|
+
import { TransferEntryRouteReplacement } from './createTransferEntryState';
|
|
4
|
+
export declare function getCreateTransferEntryStatus(state: RootState): import("../..").FetchState;
|
|
5
|
+
export declare function getLastTransferEntryReplacement(state: RootState): TransferEntryRouteReplacement | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Shared resolver for the credit/debit dropdowns in the transfer drawer.
|
|
8
|
+
*
|
|
9
|
+
* Resolution policy (intentional):
|
|
10
|
+
* 1. Prefer the dedicated API fetch results (`transferEntryEligible` for the
|
|
11
|
+
* debit pool, `creditCardOnlyEligible` for the credit-card-payment credit
|
|
12
|
+
* pool).
|
|
13
|
+
* 2. If the dedicated fetch returns an empty list while the COA is loaded,
|
|
14
|
+
* fall back to the COA: the full account list for `transferEntryEligible`,
|
|
15
|
+
* and COA accounts filtered to `credit_card` for `creditCardOnlyEligible`.
|
|
16
|
+
* This keeps the dropdown populated for older tenants where the dedicated
|
|
17
|
+
* endpoints haven't been backfilled yet.
|
|
18
|
+
*
|
|
19
|
+
* Intent — what this selector deliberately does NOT do:
|
|
20
|
+
* - Does NOT distinguish "fetch in-flight" / "fetch errored" / "fetch returned
|
|
21
|
+
* empty" — all three collapse to the COA fallback. The product preference
|
|
22
|
+
* is "always show something selectable" over "show a spinner that may never
|
|
23
|
+
* resolve". Loading/error UI belongs in the view layer; if you need a
|
|
24
|
+
* spinner, observe the `fetchState` on `transferAccountsByType[kind]`
|
|
25
|
+
* separately rather than changing the resolution policy here.
|
|
26
|
+
* - Does NOT enforce "API result is authoritative even if empty" — a tenant
|
|
27
|
+
* whose dedicated endpoint is correctly returning `[]` (e.g. no eligible
|
|
28
|
+
* transfer destinations) will still see the COA. That trade-off is
|
|
29
|
+
* accepted because the alternative blocks the user from picking anything;
|
|
30
|
+
* the backend distinguishes "no result" from "endpoint not implemented" by
|
|
31
|
+
* surfacing an error response, which the view layer handles separately.
|
|
32
|
+
*
|
|
33
|
+
* Memoized with reselect so consuming view-models don't recompute on every
|
|
34
|
+
* unrelated state change.
|
|
35
|
+
*/
|
|
36
|
+
export declare const getResolvedTransferAccounts: (state: RootState) => {
|
|
37
|
+
creditCardTransferAccountsList: AccountBase[];
|
|
38
|
+
transferAccountsList: AccountBase[];
|
|
39
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getResolvedTransferAccounts = void 0;
|
|
4
|
+
exports.getCreateTransferEntryStatus = getCreateTransferEntryStatus;
|
|
5
|
+
exports.getLastTransferEntryReplacement = getLastTransferEntryReplacement;
|
|
6
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
+
const accountSelector_1 = require("../../entity/account/accountSelector");
|
|
8
|
+
const accountListSelector_1 = require("../accountList/accountListSelector");
|
|
9
|
+
function getCreateTransferEntryStatus(state) {
|
|
10
|
+
return state.createTransferEntryState.createTransferEntryStatus;
|
|
11
|
+
}
|
|
12
|
+
function getLastTransferEntryReplacement(state) {
|
|
13
|
+
return state.createTransferEntryState.lastTransferEntryReplacement;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Shared resolver for the credit/debit dropdowns in the transfer drawer.
|
|
17
|
+
*
|
|
18
|
+
* Resolution policy (intentional):
|
|
19
|
+
* 1. Prefer the dedicated API fetch results (`transferEntryEligible` for the
|
|
20
|
+
* debit pool, `creditCardOnlyEligible` for the credit-card-payment credit
|
|
21
|
+
* pool).
|
|
22
|
+
* 2. If the dedicated fetch returns an empty list while the COA is loaded,
|
|
23
|
+
* fall back to the COA: the full account list for `transferEntryEligible`,
|
|
24
|
+
* and COA accounts filtered to `credit_card` for `creditCardOnlyEligible`.
|
|
25
|
+
* This keeps the dropdown populated for older tenants where the dedicated
|
|
26
|
+
* endpoints haven't been backfilled yet.
|
|
27
|
+
*
|
|
28
|
+
* Intent — what this selector deliberately does NOT do:
|
|
29
|
+
* - Does NOT distinguish "fetch in-flight" / "fetch errored" / "fetch returned
|
|
30
|
+
* empty" — all three collapse to the COA fallback. The product preference
|
|
31
|
+
* is "always show something selectable" over "show a spinner that may never
|
|
32
|
+
* resolve". Loading/error UI belongs in the view layer; if you need a
|
|
33
|
+
* spinner, observe the `fetchState` on `transferAccountsByType[kind]`
|
|
34
|
+
* separately rather than changing the resolution policy here.
|
|
35
|
+
* - Does NOT enforce "API result is authoritative even if empty" — a tenant
|
|
36
|
+
* whose dedicated endpoint is correctly returning `[]` (e.g. no eligible
|
|
37
|
+
* transfer destinations) will still see the COA. That trade-off is
|
|
38
|
+
* accepted because the alternative blocks the user from picking anything;
|
|
39
|
+
* the backend distinguishes "no result" from "endpoint not implemented" by
|
|
40
|
+
* surfacing an error response, which the view layer handles separately.
|
|
41
|
+
*
|
|
42
|
+
* Memoized with reselect so consuming view-models don't recompute on every
|
|
43
|
+
* unrelated state change.
|
|
44
|
+
*/
|
|
45
|
+
exports.getResolvedTransferAccounts = (0, toolkit_1.createSelector)([
|
|
46
|
+
(state) => state.accountState,
|
|
47
|
+
(state) => state.accountListState,
|
|
48
|
+
(state) => state.createTransferEntryState.transferAccountsByType
|
|
49
|
+
.transferEntryEligible.accountIds,
|
|
50
|
+
(state) => state.createTransferEntryState.transferAccountsByType
|
|
51
|
+
.creditCardOnlyEligible.accountIds,
|
|
52
|
+
], (accountState, accountListState, transferEligibleIds, creditCardOnlyIds) => {
|
|
53
|
+
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
|
|
54
|
+
const transferEligibleFromApi = transferEligibleIds
|
|
55
|
+
.map((id) => (0, accountSelector_1.getAccountBaseForTransferAccounts)(accountState, id))
|
|
56
|
+
.filter((account) => account != null);
|
|
57
|
+
const coaFallbackAllAccounts = accountList.accounts
|
|
58
|
+
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
59
|
+
.filter((account) => account != null);
|
|
60
|
+
const transferAccountsList = transferEligibleFromApi.length > 0
|
|
61
|
+
? transferEligibleFromApi
|
|
62
|
+
: coaFallbackAllAccounts;
|
|
63
|
+
const creditCardFromApi = creditCardOnlyIds
|
|
64
|
+
.map((id) => (0, accountSelector_1.getAccountBaseForCreditCardTransferAccounts)(accountState, id))
|
|
65
|
+
.filter((account) => account != null);
|
|
66
|
+
const coaFallbackCreditCards = coaFallbackAllAccounts.filter((a) => a.accountType === 'credit_card');
|
|
67
|
+
const creditCardTransferAccountsList = creditCardFromApi.length > 0 ? creditCardFromApi : coaFallbackCreditCards;
|
|
68
|
+
return { creditCardTransferAccountsList, transferAccountsList };
|
|
69
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FetchState, ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
|
|
3
|
+
/** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
|
|
4
|
+
export declare const TRANSFER_ACCOUNTS_FETCH_TYPE: readonly ["transferEntryEligible", "creditCardOnlyEligible"];
|
|
5
|
+
export type TransferAccountsFetchType = (typeof TRANSFER_ACCOUNTS_FETCH_TYPE)[number];
|
|
6
|
+
export interface TransferAccountsState {
|
|
7
|
+
accountIds: ID[];
|
|
8
|
+
fetchState: FetchState;
|
|
9
|
+
}
|
|
10
|
+
export type TransferEntryRouteReplacement = {
|
|
11
|
+
newTransactionId: TransactionID;
|
|
12
|
+
previousTransactionId: TransactionID;
|
|
13
|
+
};
|
|
14
|
+
export interface CreateTransferEntryState {
|
|
15
|
+
createTransferEntryStatus: FetchState;
|
|
16
|
+
/**
|
|
17
|
+
* Set when create-transfer returns a new transaction id (the source expense
|
|
18
|
+
* has been replaced by a new transfer/credit-card-payment row). The host
|
|
19
|
+
* navigates to the new url and then dispatches
|
|
20
|
+
* `clearTransferEntryRouteReplacement` to clear this one-shot signal.
|
|
21
|
+
*/
|
|
22
|
+
lastTransferEntryReplacement: TransferEntryRouteReplacement | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Per-type fetch state + account-id list for the dropdowns shown in the
|
|
25
|
+
* transfer drawer (eligible accounts for `transfer`, credit-card-only
|
|
26
|
+
* accounts for `credit_card_payment`).
|
|
27
|
+
*/
|
|
28
|
+
transferAccountsByType: Record<TransferAccountsFetchType, TransferAccountsState>;
|
|
29
|
+
}
|
|
30
|
+
export declare const initialCreateTransferEntryState: CreateTransferEntryState;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initialCreateTransferEntryState = exports.TRANSFER_ACCOUNTS_FETCH_TYPE = void 0;
|
|
4
|
+
/** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
|
|
5
|
+
exports.TRANSFER_ACCOUNTS_FETCH_TYPE = [
|
|
6
|
+
'transferEntryEligible',
|
|
7
|
+
'creditCardOnlyEligible',
|
|
8
|
+
];
|
|
9
|
+
const initialTransferAccountsState = {
|
|
10
|
+
accountIds: [],
|
|
11
|
+
fetchState: 'Not-Started',
|
|
12
|
+
};
|
|
13
|
+
exports.initialCreateTransferEntryState = {
|
|
14
|
+
createTransferEntryStatus: 'Not-Started',
|
|
15
|
+
lastTransferEntryReplacement: undefined,
|
|
16
|
+
transferAccountsByType: {
|
|
17
|
+
transferEntryEligible: initialTransferAccountsState,
|
|
18
|
+
creditCardOnlyEligible: initialTransferAccountsState,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
4
|
+
import { removeTransaction, updateTransaction } from '../../../entity/transaction/transactionReducer';
|
|
5
|
+
import { RootState } from '../../../reducer';
|
|
6
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
7
|
+
import { removeTransactionFromAllTabs } from '../../expenseAutomationView/reducers/transactionsViewReducer';
|
|
8
|
+
import { initializeTransactionDetailLocalData, removeTransactionDetail } from '../../transactionDetail/transactionDetailReducer';
|
|
9
|
+
import { clearTransferEntryRouteReplacement, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, resetCreateTransferEntryStatus } from '../createTransferEntryReducer';
|
|
10
|
+
export type ActionType = ReturnType<typeof openSnackbar> | ReturnType<typeof createTransferEntry> | ReturnType<typeof createTransferEntrySuccess> | ReturnType<typeof createTransferEntryFailure> | ReturnType<typeof removeTransactionFromAllTabs> | ReturnType<typeof resetCreateTransferEntryStatus> | ReturnType<typeof createTransferEntryReplacedTransaction> | ReturnType<typeof clearTransferEntryRouteReplacement> | ReturnType<typeof updateTransaction> | ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof removeTransaction> | ReturnType<typeof removeTransactionDetail>;
|
|
11
|
+
export declare const createTransferEntryEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTransferEntryEpic = 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 transactionIDPayload_1 = require("../../../entity/transaction/payloadTypes/transactionIDPayload");
|
|
8
|
+
const transactionReducer_1 = require("../../../entity/transaction/transactionReducer");
|
|
9
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
10
|
+
const transactionsViewReducer_1 = require("../../expenseAutomationView/reducers/transactionsViewReducer");
|
|
11
|
+
const transactionDetailReducer_1 = require("../../transactionDetail/transactionDetailReducer");
|
|
12
|
+
const transactionDetailState_1 = require("../../transactionDetail/transactionDetailState");
|
|
13
|
+
const createTransferEntryReducer_1 = require("../createTransferEntryReducer");
|
|
14
|
+
// ─── Pure helpers ────────────────────────────────────────────────────────────
|
|
15
|
+
function transactionIdsAreEqual(a, b) {
|
|
16
|
+
return a.id === b.id && a.type === b.type;
|
|
17
|
+
}
|
|
18
|
+
const successSnackbar = () => (0, snackbarReducer_1.openSnackbar)({
|
|
19
|
+
messageSection: 'create_transfer_entry',
|
|
20
|
+
messageText: 'success',
|
|
21
|
+
type: 'success',
|
|
22
|
+
});
|
|
23
|
+
const failureSnackbar = () => (0, snackbarReducer_1.openSnackbar)({
|
|
24
|
+
messageSection: 'create_transfer_entry',
|
|
25
|
+
messageText: 'failed',
|
|
26
|
+
type: 'error',
|
|
27
|
+
});
|
|
28
|
+
function buildFailureActions() {
|
|
29
|
+
return [(0, createTransferEntryReducer_1.createTransferEntryFailure)(), failureSnackbar()];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Defensive guard: a BE response that returns 200 with `transaction != null`
|
|
33
|
+
* but where the body lacks a usable id/type is unsafe to seed into the store —
|
|
34
|
+
* downstream code would store under a garbage key and the host hook would try
|
|
35
|
+
* to navigate to a broken url. Treat that case as failure so the source row
|
|
36
|
+
* stays visible and the user can retry.
|
|
37
|
+
*/
|
|
38
|
+
function isWellFormedTransactionPayload(t) {
|
|
39
|
+
return (t != null &&
|
|
40
|
+
typeof t.transaction_id === 'string' &&
|
|
41
|
+
t.transaction_id !== '' &&
|
|
42
|
+
typeof t.transaction_type === 'string' &&
|
|
43
|
+
t.transaction_type !== '');
|
|
44
|
+
}
|
|
45
|
+
function buildSuccessSideEffects(sourceTransactionId) {
|
|
46
|
+
return [
|
|
47
|
+
(0, createTransferEntryReducer_1.createTransferEntrySuccess)(),
|
|
48
|
+
(0, transactionsViewReducer_1.removeTransactionFromAllTabs)(sourceTransactionId),
|
|
49
|
+
successSnackbar(),
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
function buildPreviousTransactionCleanupActions(previousTransactionId) {
|
|
53
|
+
return [
|
|
54
|
+
(0, transactionReducer_1.removeTransaction)((0, transactionDetailState_1.getTransactionDetailKey)(previousTransactionId)),
|
|
55
|
+
(0, transactionDetailReducer_1.removeTransactionDetail)(previousTransactionId),
|
|
56
|
+
(0, createTransferEntryReducer_1.clearTransferEntryRouteReplacement)(),
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Emits `resetCreateTransferEntryStatus()` (and, on the replacement path, the
|
|
61
|
+
* follow-up cleanup actions) one scheduler tick after the success actions.
|
|
62
|
+
*
|
|
63
|
+
* Why the `timer(0)` (and not synchronous emission):
|
|
64
|
+
* On the replacement path the host (web-app-ui) watches
|
|
65
|
+
* `lastTransferEntryReplacement`, navigates to the new transaction url, and
|
|
66
|
+
* then sees `clearTransferEntryRouteReplacement` clear the signal. If we
|
|
67
|
+
* dispatched the cleanup actions in the same tick as
|
|
68
|
+
* `createTransferEntryReplacedTransaction`, redux subscribers would observe
|
|
69
|
+
* `lastTransferEntryReplacement` flicker on then off in a single render, and
|
|
70
|
+
* the old transaction's state (which the still-mounted detail view may be
|
|
71
|
+
* reading) would be torn down before the host has had a chance to start
|
|
72
|
+
* navigating. Deferring by one microtask gives the host exactly one render
|
|
73
|
+
* pass to react before we tear down the previous transaction.
|
|
74
|
+
*/
|
|
75
|
+
function delayedResetAndPreviousCleanup(previousTransactionId) {
|
|
76
|
+
return (0, rxjs_1.timer)(0).pipe((0, operators_1.mergeMap)(() => {
|
|
77
|
+
const actions = [(0, createTransferEntryReducer_1.resetCreateTransferEntryStatus)()];
|
|
78
|
+
if (previousTransactionId != null) {
|
|
79
|
+
actions.push(...buildPreviousTransactionCleanupActions(previousTransactionId));
|
|
80
|
+
}
|
|
81
|
+
return (0, rxjs_1.from)(actions);
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
// ─── Success-path branches ───────────────────────────────────────────────────
|
|
85
|
+
function handleSuccessWithoutTransactionBody(transactionId) {
|
|
86
|
+
return (0, rxjs_1.concat)((0, rxjs_1.from)(buildSuccessSideEffects(transactionId)), delayedResetAndPreviousCleanup(undefined));
|
|
87
|
+
}
|
|
88
|
+
function handleSuccessWithTransactionBody(transactionPayload, vendorPayload, previousTransactionId, sourceTransactionId) {
|
|
89
|
+
const newTransactionId = (0, transactionIDPayload_1.toTransactionID)(transactionPayload);
|
|
90
|
+
const replaced = !transactionIdsAreEqual(previousTransactionId, newTransactionId);
|
|
91
|
+
const immediate = [
|
|
92
|
+
(0, transactionReducer_1.updateTransaction)((0, transactionDetailState_1.getTransactionDetailKey)(newTransactionId), transactionPayload),
|
|
93
|
+
(0, transactionDetailReducer_1.initializeTransactionDetailLocalData)({
|
|
94
|
+
transactionId: newTransactionId,
|
|
95
|
+
vendorId: vendorPayload?.[0]?.vendor_id,
|
|
96
|
+
}),
|
|
97
|
+
...buildSuccessSideEffects(sourceTransactionId),
|
|
98
|
+
];
|
|
99
|
+
if (replaced) {
|
|
100
|
+
immediate.push((0, createTransferEntryReducer_1.createTransferEntryReplacedTransaction)(previousTransactionId, newTransactionId));
|
|
101
|
+
}
|
|
102
|
+
return (0, rxjs_1.concat)((0, rxjs_1.from)(immediate), delayedResetAndPreviousCleanup(replaced ? previousTransactionId : undefined));
|
|
103
|
+
}
|
|
104
|
+
// ─── Top-level epic ──────────────────────────────────────────────────────────
|
|
105
|
+
const createTransferEntryEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(createTransferEntryReducer_1.createTransferEntry.match), (0, operators_1.mergeMap)((action) => {
|
|
106
|
+
const { transactionId, creditAccountIntegrationId, debitAccountIntegrationId, memo, transactionType, sourceTransactionType, } = action.payload;
|
|
107
|
+
const previousTransactionId = {
|
|
108
|
+
id: transactionId,
|
|
109
|
+
type: sourceTransactionType,
|
|
110
|
+
};
|
|
111
|
+
const payload = {
|
|
112
|
+
transaction_type: transactionType,
|
|
113
|
+
transaction_id: transactionId,
|
|
114
|
+
to_account_integration_id: creditAccountIntegrationId,
|
|
115
|
+
from_account_integration_id: debitAccountIntegrationId,
|
|
116
|
+
memo: memo ?? '',
|
|
117
|
+
};
|
|
118
|
+
return zeniAPI
|
|
119
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/transactions/transaction-type-update`, payload)
|
|
120
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
121
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
122
|
+
const transaction = response.data?.transaction;
|
|
123
|
+
if (transaction != null) {
|
|
124
|
+
if (!isWellFormedTransactionPayload(transaction)) {
|
|
125
|
+
return (0, rxjs_1.from)(buildFailureActions());
|
|
126
|
+
}
|
|
127
|
+
return handleSuccessWithTransactionBody(transaction, response.data?.vendors, previousTransactionId, transactionId);
|
|
128
|
+
}
|
|
129
|
+
return handleSuccessWithoutTransactionBody(transactionId);
|
|
130
|
+
}
|
|
131
|
+
return (0, rxjs_1.from)(buildFailureActions());
|
|
132
|
+
}), (0, operators_1.catchError)(() => (0, rxjs_1.from)(buildFailureActions())));
|
|
133
|
+
}));
|
|
134
|
+
exports.createTransferEntryEpic = createTransferEntryEpic;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateAccounts } from '../../../entity/account/accountReducer';
|
|
4
|
+
import { RootState } from '../../../reducer';
|
|
5
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
|
+
import { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure } from '../createTransferEntryReducer';
|
|
7
|
+
export type ActionType = ReturnType<typeof fetchAccountsForTransferFlow> | ReturnType<typeof updateAccountsForTransferFlow> | ReturnType<typeof updateAccountsForTransferFlowFailure> | ReturnType<typeof updateAccounts>;
|
|
8
|
+
/**
|
|
9
|
+
* Pools fetched concurrently: `groupBy(kind)` keeps `transferEntryEligible`
|
|
10
|
+
* and `creditCardOnlyEligible` in their own streams so a back-to-back dispatch
|
|
11
|
+
* of both does not cancel the first. Within a single type, a fresh dispatch
|
|
12
|
+
* supersedes any in-flight request (per-group `switchMap`).
|
|
13
|
+
*/
|
|
14
|
+
export declare const fetchTransferAccountsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|