@zeniai/client-epic-state 5.0.92 → 5.0.93-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.
Files changed (66) hide show
  1. package/lib/commonStateTypes/amount.d.ts +1 -0
  2. package/lib/commonStateTypes/amount.js +3 -1
  3. package/lib/commonStateTypes/workingDayHelper.d.ts +9 -0
  4. package/lib/commonStateTypes/workingDayHelper.js +28 -1
  5. package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
  6. package/lib/entity/tenant/clearAllEpic.js +4 -0
  7. package/lib/epic.d.ts +7 -1
  8. package/lib/epic.js +7 -1
  9. package/lib/esm/commonStateTypes/amount.js +1 -0
  10. package/lib/esm/commonStateTypes/workingDayHelper.js +26 -0
  11. package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
  12. package/lib/esm/epic.js +7 -1
  13. package/lib/esm/index.js +7 -2
  14. package/lib/esm/reducer.js +6 -0
  15. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +22 -2
  16. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +31 -0
  17. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +69 -0
  18. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +29 -0
  19. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +47 -0
  20. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +34 -0
  21. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +32 -0
  22. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +54 -0
  23. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +92 -0
  24. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +225 -0
  25. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +10 -0
  26. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +39 -0
  27. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +36 -0
  28. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +27 -0
  29. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +28 -0
  30. package/lib/index.d.ts +12 -3
  31. package/lib/index.js +34 -14
  32. package/lib/reducer.d.ts +6 -0
  33. package/lib/reducer.js +6 -0
  34. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +8 -1
  35. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +21 -1
  36. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +22 -0
  37. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +48 -0
  38. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +36 -0
  39. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +21 -0
  40. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +73 -0
  41. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +40 -0
  42. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +33 -0
  43. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +37 -0
  44. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +53 -0
  45. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +14 -0
  46. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +38 -0
  47. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +7 -0
  48. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +36 -0
  49. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +56 -0
  50. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +60 -0
  51. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +22 -0
  52. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +96 -0
  53. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +59 -0
  54. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +230 -0
  55. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +122 -0
  56. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +13 -0
  57. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +23 -0
  58. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +43 -0
  59. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +9 -0
  60. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +40 -0
  61. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.d.ts +7 -0
  62. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +31 -0
  63. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.d.ts +15 -0
  64. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +32 -0
  65. package/lib/zeniAPI.d.ts +1 -0
  66. package/package.json +1 -1
package/lib/esm/epic.js CHANGED
@@ -381,6 +381,12 @@ import { fetchMagicLinkTenantEpic, } from './view/spendManagement/billPay/magicL
381
381
  import { saveMagicLinkBankAccountEpic, } from './view/spendManagement/billPay/magicLinkView/epics/saveMagicLinkBankAccountEpic';
382
382
  import { fetchPreviousBillsEpic, } from './view/spendManagement/billPay/previousBills/fetchPreviousBillsEpic';
383
383
  import { wiseRedirectEpic, } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectEpic';
384
+ import { fetchCashManagementSettingsEpic, } from './view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic';
385
+ import { saveAutoSweepSettingsEpic, } from './view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic';
386
+ import { fetchCashManagementBannerEpic, } from './view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic';
387
+ import { fetchCashManagementOverviewPageEpic, } from './view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic';
388
+ import { fetchCashManagementRecommendationEpic, } from './view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic';
389
+ import { fetchRecentTransferEpic, } from './view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic';
384
390
  import { initializeCardUserOnboardingLocalDataEpic, } from './view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic';
385
391
  import { saveCardOnboardingUserDetailsEpic, } from './view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic';
386
392
  import { fetchCashbackDetailEpic, } from './view/spendManagement/chargeCards/cashbackDetail/fetchCashbackDetailEpic';
@@ -588,7 +594,7 @@ import { fetchZeniAccStatementPageEpic, } from './view/zeniAccStatementList/fetc
588
594
  import { fetchZeniAccountsPromoCardEpic, } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic';
589
595
  import { approveOAuthConsentEpic, } from './view/zeniOAuthView/epics/approveOAuthConsentEpic';
590
596
  // Note: Please maintain strict alphabetical order
591
- const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, addCardPaymentSourceEpic, approveOAuthConsentEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, cancelAiAccountantOnboardingEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createAutoTransferRuleEpic, createBankAccountEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createTransferEntryEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, excludeAccountFromReconciliationEpic, includeAccountInReconciliationEpic, deleteBankAccountEpic, deleteBillEpic, deleteChatSessionEpic, deleteConnectionEpic, deleteBillPayApprovalRuleEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, snoozeTaskEpic, unsnoozeTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, sendEmailMagicLinkToUserEpic, sessionHeartbeatEpic, verifyDeviceWithTwoFAEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, expressInterestChargeCardEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAiAccountantCustomersEpic, fetchAiAccountantJobsEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, fetchAggregatedReportEpic, fetchApAgingDetailEpic, fetchApAgingEpic, fetchArAgingDetailEpic, fetchArAgingEpic, fetchAuditReportGroupViewEpic, fetchAuditRuleGroupViewEpic, fetchAutoTransferReviewDetailEpic, fetchAutoTransferRuleHistoryEpic, fetchAutoTransferRulesEpic, fetchBalanceSheetEpic, fetchBalanceSheetForTimeframeEpic, fetchBankAccountsListEpic, fetchBankConnectionsViewEpic, fetchBankCountryNameByIbanEpic, fetchBankNameByRoutingEpic, fetchBankNameBySwiftEpic, fetchBillAndInitializeLocalStoreEpic, fetchBillDetailEpic, fetchBillingAccountsListEpic, fetchBillListEpic, fetchBillListPerTabEpic, fetchBillPayApproversDetailsEpic, fetchBillPayApproversListEpic, fetchBillPayCardEpic, fetchBillPayConfigEpic, fetchBillPaySetupApproverViewEpic, fetchBillPaySetupViewEpic, fetchCardBalanceEpic, fetchCardProfilesEpic, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardSetupViewEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChargeCardsRecurringExpensesEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCollaborationAuthTokenEpic, fetchCockpitContextEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchTaskManagerMetricsEpic, updateCompanyTaskManagerViewFiltersEpic, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCreditAgentMacroEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchEntityRecommendationsForLineUpdateEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, bulkUploadReceiptsEpic, confirmBulkUploadMatchEpic, fetchBulkUploadBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMoreBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCompletedTransactionsEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, refreshBatchDetailsForBatchIdEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, syncTabsAfterAutomatchEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, restoreBulkUploadAutomatchingOnMountEpic, searchTransactionsForManualMatchEpic, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, initiateReportsClassViewRefetchingEpic, reportsResyncEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMyProfileEpic, fetchMyProfileViewEpic, fetchNetBurnOrIncomeClassesViewEpic, fetchNetBurnOrIncomeEpic, fetchNetBurnOrIncomeForTimeframeClassesViewEpic, fetchNetBurnOrIncomeForTimeframeEpic, fetchNetBurnOrIncomeStoryCardEpic, fetchNetBurnOrIncomeWithForecastEpic, fetchNotificationSettingsEpic, fetchNotificationSettingsViewEpic, fetchNotificationUnreadCountEpic, fetchNotificationViewEpic, fetchRegisteredInterestsEpic, fetchOnboardingCompletedCompaniesEpic, fetchOnboardingCustomerSetupViewEpic, fetchOnboardingCustomerViewEpic, fetchOnboardingViewEpic, fetchOpExByVendorEpic, fetchOpExByVendorReportForTimeframeEpic, fetchOpExByVendorReportSummaryEpic, fetchOpExClassesViewEpic, fetchOpExEpic, fetchOpExForTimeframeClassesViewEpic, fetchOpExReportForTimeframeEpic, fetchOpExWithForecastEpic, fetchOwnerListEpic, fetchParentSubsidiaryManagementViewEpic, fetchPaymentAccountBalanceEpic, fetchPaymentAccountListEpic, fetchPaymentSourcesEpic, fetchPeopleEpic, fetchPeoplePageEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeProjectViewEpic, fetchProfitAndLossForTimeframeEpic, fetchProfitAndLossProjectViewEpic, fetchProjectListEpic, fetchQBOConnectionPoolEpic, fetchRecommendationByEntityIdEpic, fetchRecommendationByEntityNameEpic, fetchRecommendationForAccountSettingsEpic, fetchRecommendationForAccountTypeEpic, fetchRecommendationsAndUpdateMerchantRecommendationsEpic, fetchRecommendedTransactionRowIndexEpic, fetchReferralsEpic, fetchReimbursementCardEpic, fetchReimbursementConfigEpic, fetchRemiAndInitializeLocalStoreEpic, fetchRemiApproversDetailsEpic, fetchRemiApproversListEpic, fetchRemiDetailEpic, fetchRemiListEpic, fetchRemiListPerTabEpic, fetchRemiSetupApproverViewEpic, fetchRemiSetupViewEpic, fetchRevenueClassesViewEpic, fetchRevenueEpic, fetchRevenueForTimeframeClassesViewEpic, fetchRevenueForTimeframeEpic, fetchRevenueWithForecastEpic, fetchReviewCompanyViewEpic, fetchReviewTransferDetailEpic, fetchRewardsPlanEpic, fetchScheduleAccruedDetailsEpic, fetchScheduleAccruedDetailsPageEpic, fetchScheduleDetailsEpic, fetchScheduleDetailsPageEpic, fetchScheduleListEpic, fetchSchedulesAccountEpic, fetchSubscriptionAddOnsEpic, fetchSubscriptionCouponsEpic, fetchSubscriptionCreateEstimateEpic, fetchSubscriptionDetailsEpic, fetchSubscriptionListEpic, fetchSubscriptionPlansEpic, fetchSubscriptionSummaryForTenantEpic, fetchSubscriptionUpdateEstimateEpic, fetchSubscriptionViewEpic, fetchSuggestedQuestionsEpic, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByProjectEpic, fetchTransactionListByEntityEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, fetchTransferAccountsEpic, fetchTreasuryDetailEpic, fetchTreasuryFundsEpic, fetchTreasuryHistoryEpic, fetchTreasurySetupViewEpic, fetchTreasuryStatementListEpic, fetchTreasuryTaxLetterListEpic, fetchTreasuryTransactionListEpic, updatePortfolioAllocationEpic, fetchPortfolioAllocationEpic, fetchTrendForEntityEpic, fetchUserDetailEpic, fetchUserFinancialAccountEpic, fetchUserListByTypeEpic, fetchUserRoleConfigEpic, fetchVendor1099TypeListEpic, fetchVendorAndUpdateBillLocalDataEpic, fetchVendorByNameAndParseInvoiceEpic, fetchVendorDetailsEpic, fetchVendorEpic, fetchVendorFirstReviewAttachmentsEpic, fetchVendorFirstReviewViewEpic, fetchVendorGlobalReviewViewEpic, fetchVendorsFiling1099AllEpic, fetchVendorsFiling1099DownloadEpic, fetchVendorsFiling1099ListEpic, fetchVendorsListEpic, fetchVendorsTabVendorDetailPageViewEpic, fetchVendorsTabVendorDetailsEpic, fetchVendorsTabVendorEpic, fetchVendorTabViewEpic, fetchVendorTypeListEpic, fetchZeniAccountListEpic, fetchZeniAccountsConfigEpic, fetchZeniAccountSetupViewEpic, fetchZeniAccountsPromoCardEpic, fetchZeniAccStatementListEpic, fetchZeniAccStatementPageEpic, fetchZeniUsersEpic, getOnboardingEmailGroupEpic, getOnboardingPlaidLinkTokenEpic, getPaymentAccountsEpic, getPlaidLinkTokenEpic, ignoreExpenseAutomationJEScheduleEpic, improveUsingZeniGPTEpic, initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, initializeAccountMappingViewEpic, initializeAccountSettingsViewEpic, initializeBillPaySetupApproverViewUpdateDataEpic, initializeBillToLocalStoreEpic, initializeCardUserOnboardingLocalDataEpic, initializeCompanyHealthMetricViewLocalDataEpic, initializeDynamicFormEpic, initializeEditPersonEpic, initializeExpenseAutomationJeScheduleLocalDataEpic, initializeInternationalWireLocalDataEpic, initializeIntlVerificationFormEpic, initializeMyProfileLocalDataEpic, initializeOnboardingCustomerViewUpdateDataEpic, initializeRemiSetupApproverViewUpdateDataEpic, initializeRemiToLocalStoreEpic, initializeScheduleAccruedDetailLocalDataEpic, initializeScheduleDetailLocalDataEpic, initializeSubscriptionLocalDataEpic, initializeTaskToLocalStoreEpic, initializeTransactionDetailLocalDataEpic, initializeVendorAddressEpic, initiateChargeCardRepaymentEpic, invitePeopleEpic, inviteZeniPeopleEpic, issueChargeCardEpic, lockChargeCardEpic, lockChargeCardsEpic, markAsCompleteScheduleDetailEpic, markTransactionAsNotMiscategorizedEpic, notifyMeForFeatureEpic, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, parallelFetchProjectTransactionListEpic, parallelFetchEntityTransactionListEpic, parallelFetchTransactionListByCategoryTypeEpic, parseInvoiceToBillEpic, parseReceiptsToRemiEpic, peopleSaveUpdatesEpic, pushToastNotificationEpic, refreshExpenseAutomationCurrentTabEpic, refreshIntegrationsDataEpic, rejectVendorGlobalReviewEpic, resendCardInviteEpic, resendInviteEpic, resendOtpEpic, resendVerifyDeviceOTPEpic, resendReferralInviteEpic, resetTransactionVendorLocalDataEpic, resetVendorDetailLocalDataEpic, resetVendorsTabVendorDetailLocalDataEpic, retryBankAccountConnectionEpic, retryBankAccountConnectionForOnboardingEpic, retryExpenseAutomationJEScheduleEpic, retryOrRefundBillEpic, validateBillsBulkActionEpic, reviewDraftRemisBulkActionEpic, reviewExpenseAutomationFluxAnalysisViewEpic, revokeCardInviteEpic, revokeChargeCardsInviteEpic, saveAccountMappingViewEpic, saveAccountSettingsViewEpic, saveAPIKeyConnectionEpic, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveConnectorCredentialsEpic, saveCreditAgentMacroEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOAuthConnectionEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, scheduleTenantCreditScoreCronEpic, sendCompanyMonthEndReportEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitIntlVerificationEpic, submitQuestionEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateAutoTransferRuleEpic, updateBusinessVerificationDetailsEpic, updateCardProfileEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateAccountingClassesEnabledEpic, dismissCapitalizationOnboardingEpic, updateCapitalizationThresholdEpic, updateCompanyDetailsEpic, updateCompanyOfficerEpic, updateCompanyPassportLocalStoreDataEpic, updateDashboardLayoutEpic, updateDebitCardPinAttemptEpic, updateDepositAccountEpic, updateExpenseAutomationReconciliationBalanceLocalDataEpic, updateFileNameEpic, updateFilesMetadataEpic, updateJESchedulesEpic, updateMappedCashAccountEpic, updateMileageDetailsEpic, updateMyProfileEpic, updateNetBurnOrIncomeStoryCardSettingsEpic, updateNotificationViewAllNotificationsStatusEpic, updateNotificationViewNotificationStatusEpic, updateOnboardingCustomerViewCompleteStatusEpic, updateOnboardingCustomerViewDashboardLoadedEpic, updateOnboardingCustomerViewEpic, updateOnboardingCustomerViewLocalStoreDataEpic, updateOnboardingPaymentAccountLoginStatusEpic, updateOnboardingPaymentAccountStatusEpic, updatePaymentAccountEpic, updatePaymentAccountLoginStatusEpic, updatePaymentAccountStatusEpic, updatePhysicalChargeCardAttemptEpic, updatePrimaryContactEpic, updatePrimaryFundingAccountEpic, updateQBOConnectionPoolExternalConnectionEpic, updateReferViewedEpic, updateRemiSetupViewLocalStoreDataEpic, updateReportUIOptionCOABalancesRangeEpic, updateReportUIOptionIsCompareModeEpic, updateReportUIOptionIsCompareModeOnEpic, updateReportUIOptionThisPeriodEpic, updateReportUIOptionTimeFrameEpic, updateSectionAccountsViewEpic, updateSectionClassesViewEpicV2, updateSectionProjectViewEpic, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, fetchCannedResponsesEpic, saveCannedResponseEpic, deleteCannedResponseEpic, updateTransactionDetailEpic, updateTreasuryPromoIntroClosedByOutsideClickEpic, updateTreasuryPromoRemindMeLaterClickedEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
597
+ const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, addCardPaymentSourceEpic, approveOAuthConsentEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, cancelAiAccountantOnboardingEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createAutoTransferRuleEpic, createBankAccountEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createTransferEntryEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, excludeAccountFromReconciliationEpic, includeAccountInReconciliationEpic, deleteBankAccountEpic, deleteBillEpic, deleteChatSessionEpic, deleteConnectionEpic, deleteBillPayApprovalRuleEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, snoozeTaskEpic, unsnoozeTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, sendEmailMagicLinkToUserEpic, sessionHeartbeatEpic, verifyDeviceWithTwoFAEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, expressInterestChargeCardEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAiAccountantCustomersEpic, fetchAiAccountantJobsEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, fetchAggregatedReportEpic, fetchApAgingDetailEpic, fetchApAgingEpic, fetchArAgingDetailEpic, fetchArAgingEpic, fetchAuditReportGroupViewEpic, fetchAuditRuleGroupViewEpic, fetchAutoTransferReviewDetailEpic, fetchAutoTransferRuleHistoryEpic, fetchAutoTransferRulesEpic, fetchBalanceSheetEpic, fetchBalanceSheetForTimeframeEpic, fetchBankAccountsListEpic, fetchBankConnectionsViewEpic, fetchBankCountryNameByIbanEpic, fetchBankNameByRoutingEpic, fetchBankNameBySwiftEpic, fetchBillAndInitializeLocalStoreEpic, fetchBillDetailEpic, fetchBillingAccountsListEpic, fetchBillListEpic, fetchBillListPerTabEpic, fetchBillPayApproversDetailsEpic, fetchBillPayApproversListEpic, fetchBillPayCardEpic, fetchBillPayConfigEpic, fetchBillPaySetupApproverViewEpic, fetchBillPaySetupViewEpic, fetchCardBalanceEpic, fetchCardProfilesEpic, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashManagementSettingsEpic, saveAutoSweepSettingsEpic, fetchCashManagementBannerEpic, fetchCashManagementOverviewPageEpic, fetchCashManagementRecommendationEpic, fetchRecentTransferEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardSetupViewEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChargeCardsRecurringExpensesEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCollaborationAuthTokenEpic, fetchCockpitContextEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchTaskManagerMetricsEpic, updateCompanyTaskManagerViewFiltersEpic, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCreditAgentMacroEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchEntityRecommendationsForLineUpdateEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, bulkUploadReceiptsEpic, confirmBulkUploadMatchEpic, fetchBulkUploadBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMoreBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCompletedTransactionsEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, refreshBatchDetailsForBatchIdEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, syncTabsAfterAutomatchEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, restoreBulkUploadAutomatchingOnMountEpic, searchTransactionsForManualMatchEpic, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, initiateReportsClassViewRefetchingEpic, reportsResyncEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMyProfileEpic, fetchMyProfileViewEpic, fetchNetBurnOrIncomeClassesViewEpic, fetchNetBurnOrIncomeEpic, fetchNetBurnOrIncomeForTimeframeClassesViewEpic, fetchNetBurnOrIncomeForTimeframeEpic, fetchNetBurnOrIncomeStoryCardEpic, fetchNetBurnOrIncomeWithForecastEpic, fetchNotificationSettingsEpic, fetchNotificationSettingsViewEpic, fetchNotificationUnreadCountEpic, fetchNotificationViewEpic, fetchRegisteredInterestsEpic, fetchOnboardingCompletedCompaniesEpic, fetchOnboardingCustomerSetupViewEpic, fetchOnboardingCustomerViewEpic, fetchOnboardingViewEpic, fetchOpExByVendorEpic, fetchOpExByVendorReportForTimeframeEpic, fetchOpExByVendorReportSummaryEpic, fetchOpExClassesViewEpic, fetchOpExEpic, fetchOpExForTimeframeClassesViewEpic, fetchOpExReportForTimeframeEpic, fetchOpExWithForecastEpic, fetchOwnerListEpic, fetchParentSubsidiaryManagementViewEpic, fetchPaymentAccountBalanceEpic, fetchPaymentAccountListEpic, fetchPaymentSourcesEpic, fetchPeopleEpic, fetchPeoplePageEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeProjectViewEpic, fetchProfitAndLossForTimeframeEpic, fetchProfitAndLossProjectViewEpic, fetchProjectListEpic, fetchQBOConnectionPoolEpic, fetchRecommendationByEntityIdEpic, fetchRecommendationByEntityNameEpic, fetchRecommendationForAccountSettingsEpic, fetchRecommendationForAccountTypeEpic, fetchRecommendationsAndUpdateMerchantRecommendationsEpic, fetchRecommendedTransactionRowIndexEpic, fetchReferralsEpic, fetchReimbursementCardEpic, fetchReimbursementConfigEpic, fetchRemiAndInitializeLocalStoreEpic, fetchRemiApproversDetailsEpic, fetchRemiApproversListEpic, fetchRemiDetailEpic, fetchRemiListEpic, fetchRemiListPerTabEpic, fetchRemiSetupApproverViewEpic, fetchRemiSetupViewEpic, fetchRevenueClassesViewEpic, fetchRevenueEpic, fetchRevenueForTimeframeClassesViewEpic, fetchRevenueForTimeframeEpic, fetchRevenueWithForecastEpic, fetchReviewCompanyViewEpic, fetchReviewTransferDetailEpic, fetchRewardsPlanEpic, fetchScheduleAccruedDetailsEpic, fetchScheduleAccruedDetailsPageEpic, fetchScheduleDetailsEpic, fetchScheduleDetailsPageEpic, fetchScheduleListEpic, fetchSchedulesAccountEpic, fetchSubscriptionAddOnsEpic, fetchSubscriptionCouponsEpic, fetchSubscriptionCreateEstimateEpic, fetchSubscriptionDetailsEpic, fetchSubscriptionListEpic, fetchSubscriptionPlansEpic, fetchSubscriptionSummaryForTenantEpic, fetchSubscriptionUpdateEstimateEpic, fetchSubscriptionViewEpic, fetchSuggestedQuestionsEpic, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByProjectEpic, fetchTransactionListByEntityEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, fetchTransferAccountsEpic, fetchTreasuryDetailEpic, fetchTreasuryFundsEpic, fetchTreasuryHistoryEpic, fetchTreasurySetupViewEpic, fetchTreasuryStatementListEpic, fetchTreasuryTaxLetterListEpic, fetchTreasuryTransactionListEpic, updatePortfolioAllocationEpic, fetchPortfolioAllocationEpic, fetchTrendForEntityEpic, fetchUserDetailEpic, fetchUserFinancialAccountEpic, fetchUserListByTypeEpic, fetchUserRoleConfigEpic, fetchVendor1099TypeListEpic, fetchVendorAndUpdateBillLocalDataEpic, fetchVendorByNameAndParseInvoiceEpic, fetchVendorDetailsEpic, fetchVendorEpic, fetchVendorFirstReviewAttachmentsEpic, fetchVendorFirstReviewViewEpic, fetchVendorGlobalReviewViewEpic, fetchVendorsFiling1099AllEpic, fetchVendorsFiling1099DownloadEpic, fetchVendorsFiling1099ListEpic, fetchVendorsListEpic, fetchVendorsTabVendorDetailPageViewEpic, fetchVendorsTabVendorDetailsEpic, fetchVendorsTabVendorEpic, fetchVendorTabViewEpic, fetchVendorTypeListEpic, fetchZeniAccountListEpic, fetchZeniAccountsConfigEpic, fetchZeniAccountSetupViewEpic, fetchZeniAccountsPromoCardEpic, fetchZeniAccStatementListEpic, fetchZeniAccStatementPageEpic, fetchZeniUsersEpic, getOnboardingEmailGroupEpic, getOnboardingPlaidLinkTokenEpic, getPaymentAccountsEpic, getPlaidLinkTokenEpic, ignoreExpenseAutomationJEScheduleEpic, improveUsingZeniGPTEpic, initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, initializeAccountMappingViewEpic, initializeAccountSettingsViewEpic, initializeBillPaySetupApproverViewUpdateDataEpic, initializeBillToLocalStoreEpic, initializeCardUserOnboardingLocalDataEpic, initializeCompanyHealthMetricViewLocalDataEpic, initializeDynamicFormEpic, initializeEditPersonEpic, initializeExpenseAutomationJeScheduleLocalDataEpic, initializeInternationalWireLocalDataEpic, initializeIntlVerificationFormEpic, initializeMyProfileLocalDataEpic, initializeOnboardingCustomerViewUpdateDataEpic, initializeRemiSetupApproverViewUpdateDataEpic, initializeRemiToLocalStoreEpic, initializeScheduleAccruedDetailLocalDataEpic, initializeScheduleDetailLocalDataEpic, initializeSubscriptionLocalDataEpic, initializeTaskToLocalStoreEpic, initializeTransactionDetailLocalDataEpic, initializeVendorAddressEpic, initiateChargeCardRepaymentEpic, invitePeopleEpic, inviteZeniPeopleEpic, issueChargeCardEpic, lockChargeCardEpic, lockChargeCardsEpic, markAsCompleteScheduleDetailEpic, markTransactionAsNotMiscategorizedEpic, notifyMeForFeatureEpic, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, parallelFetchProjectTransactionListEpic, parallelFetchEntityTransactionListEpic, parallelFetchTransactionListByCategoryTypeEpic, parseInvoiceToBillEpic, parseReceiptsToRemiEpic, peopleSaveUpdatesEpic, pushToastNotificationEpic, refreshExpenseAutomationCurrentTabEpic, refreshIntegrationsDataEpic, rejectVendorGlobalReviewEpic, resendCardInviteEpic, resendInviteEpic, resendOtpEpic, resendVerifyDeviceOTPEpic, resendReferralInviteEpic, resetTransactionVendorLocalDataEpic, resetVendorDetailLocalDataEpic, resetVendorsTabVendorDetailLocalDataEpic, retryBankAccountConnectionEpic, retryBankAccountConnectionForOnboardingEpic, retryExpenseAutomationJEScheduleEpic, retryOrRefundBillEpic, validateBillsBulkActionEpic, reviewDraftRemisBulkActionEpic, reviewExpenseAutomationFluxAnalysisViewEpic, revokeCardInviteEpic, revokeChargeCardsInviteEpic, saveAccountMappingViewEpic, saveAccountSettingsViewEpic, saveAPIKeyConnectionEpic, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveConnectorCredentialsEpic, saveCreditAgentMacroEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOAuthConnectionEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, scheduleTenantCreditScoreCronEpic, sendCompanyMonthEndReportEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitIntlVerificationEpic, submitQuestionEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateAutoTransferRuleEpic, updateBusinessVerificationDetailsEpic, updateCardProfileEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateAccountingClassesEnabledEpic, dismissCapitalizationOnboardingEpic, updateCapitalizationThresholdEpic, updateCompanyDetailsEpic, updateCompanyOfficerEpic, updateCompanyPassportLocalStoreDataEpic, updateDashboardLayoutEpic, updateDebitCardPinAttemptEpic, updateDepositAccountEpic, updateExpenseAutomationReconciliationBalanceLocalDataEpic, updateFileNameEpic, updateFilesMetadataEpic, updateJESchedulesEpic, updateMappedCashAccountEpic, updateMileageDetailsEpic, updateMyProfileEpic, updateNetBurnOrIncomeStoryCardSettingsEpic, updateNotificationViewAllNotificationsStatusEpic, updateNotificationViewNotificationStatusEpic, updateOnboardingCustomerViewCompleteStatusEpic, updateOnboardingCustomerViewDashboardLoadedEpic, updateOnboardingCustomerViewEpic, updateOnboardingCustomerViewLocalStoreDataEpic, updateOnboardingPaymentAccountLoginStatusEpic, updateOnboardingPaymentAccountStatusEpic, updatePaymentAccountEpic, updatePaymentAccountLoginStatusEpic, updatePaymentAccountStatusEpic, updatePhysicalChargeCardAttemptEpic, updatePrimaryContactEpic, updatePrimaryFundingAccountEpic, updateQBOConnectionPoolExternalConnectionEpic, updateReferViewedEpic, updateRemiSetupViewLocalStoreDataEpic, updateReportUIOptionCOABalancesRangeEpic, updateReportUIOptionIsCompareModeEpic, updateReportUIOptionIsCompareModeOnEpic, updateReportUIOptionThisPeriodEpic, updateReportUIOptionTimeFrameEpic, updateSectionAccountsViewEpic, updateSectionClassesViewEpicV2, updateSectionProjectViewEpic, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, fetchCannedResponsesEpic, saveCannedResponseEpic, deleteCannedResponseEpic, updateTransactionDetailEpic, updateTreasuryPromoIntroClosedByOutsideClickEpic, updateTreasuryPromoRemindMeLaterClickedEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
592
598
  const rootEpic = (action$, store$, dependencies) => combinedEpics(action$, store$, dependencies).pipe(map(identity), catchError((error, source) => {
593
599
  console.error(error);
594
600
  return source;
package/lib/esm/index.js CHANGED
@@ -23,7 +23,7 @@ import { SCHEDULE_DAYS_OF_MONTH, convertToPeriod, toAbsoluteDay, toMonth, toMont
23
23
  import { mapTimePeriodtoTimeframeTick, toTimePeriod, toTimeframeTick, } from './commonStateTypes/timeframeTick';
24
24
  import { isAgingReport, isCashFlowOrBalanceSheetReport, isDashboardClassesViewReport, isDashboardReport, isFluxAnalysisOpExReport, isOpExByVendorReport, isPAndLClassesViewReport, isPAndLProjectViewReport, isPAndLReport, } from './commonStateTypes/viewAndReport/reportIDHelper';
25
25
  import { toReportFormatStrict, toReportID, } from './commonStateTypes/viewAndReport/viewAndReport';
26
- import { PAYMENT_BUSINESS_DAYS, filterDays, getNextNthWorkingDay, getPreviousNthWorkingDay, getYearsList, holidaysFormatted, isHoliday, isHolidayToday, } from './commonStateTypes/workingDayHelper';
26
+ import { PAYMENT_BUSINESS_DAYS, filterDays, getNextNthWorkingDay, getNextTransferDate, getPreviousNthWorkingDay, getYearsList, holidaysFormatted, isHoliday, isHolidayToday, } from './commonStateTypes/workingDayHelper';
27
27
  import { getAllAccounts, getTransactionFilterAccountOptions, } from './entity/account/accountSelector';
28
28
  import { toAccountType, toReconciliationAccountSource, } from './entity/account/accountState';
29
29
  import { getAccountGroupKey, toAccountGroupType, } from './entity/accountGroup/accountGroupState';
@@ -580,7 +580,7 @@ export { deleteRemi, fetchRemiDetail, cancelAndDeleteRemi, approveOrRejectRemi,
580
580
  export { getEditRemiDetail, };
581
581
  export { fetchEditRemiDetailPage, fetchRecommendationsAndUpdateMerchantRecommendations, fetchRemiAndInitializeLocalStore, initializeRemiToLocalStore, saveRemiUpdatesToLocalStore, fetchCurrencyConversionValue, discardRemiUpdatesInLocalStore, removeFileFromRemiUpdatesInLocalStore, saveRemiDetail, saveRemiSuccessOrFailure, parseReceiptsToRemi, clearEditRemiViewDetail, updateAddRemiAutoFields, updateUploadFetchState, updateTentativeMerchantNames, clearTentativeMerchantName, updateReimbursementType, updateHomeCurrencyConversion, clearAddRemiAutoFields, };
582
582
  export { reduceFetchState, reduceFetchStateParallelTimeframes, reduceAnyFetchState, reduceAllFetchState, reduceAnyCompletedFetchState, isAnyFetchInProgress, isAllFetchCompleted, ALL_FILE_TYPES, toFileTypeStrict, };
583
- export { getNextNthWorkingDay, getPreviousNthWorkingDay, isHolidayToday, filterDays, getYearsList, isHoliday, holidaysFormatted, PAYMENT_BUSINESS_DAYS, };
583
+ export { getNextNthWorkingDay, getNextTransferDate, getPreviousNthWorkingDay, isHolidayToday, filterDays, getYearsList, isHoliday, holidaysFormatted, PAYMENT_BUSINESS_DAYS, };
584
584
  export { fetchCompanyOnboardingView, fetchQBOConnectionPool, updateQBOConnectionPoolExternalConnection, fetchOnboardingCompletedCompanies, saveOnboardingCustomerCompletedStatus, toProductType, toProductTypeStrict, getOnboardingCockpitView, getNewOnboardingCustomerView, getOnboardingEmailGroup, initializeOnboardingCustomerViewUpdateData, clearOnboardingCustomerViewUpdateData, saveOnboardingCustomerViewUpdateData, updateOnboardingCustomerListUIState, updateCustomerCreationStatus, updateStatusAfterOnboardingCompleted, saveOnboardingCustomerViewUpdates, saveOnboardingCustomerNotes, saveOnboardingCustomerDataInLocalStore, updateOnboardingCustomerDataInLocalStore, resetNewOnboardedCustomerId, sendOnboardingCustomerViewInvite, retryBankAccountConnectionForOnboarding, };
585
585
  export { getTransactionsListByCategoryType, getTransactionListUIStateByCategoryType, };
586
586
  export { getChangedLineItemCountFromLocalData, isAccountUncategorized };
@@ -666,3 +666,8 @@ export { getTransactionActivityLogView, } from './view/transactionActivityLogVie
666
666
  // ── Session Management ──────────────────────────────────────────────
667
667
  export { SessionManager } from './entity/tenant/SessionManager';
668
668
  export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
669
+ export { fetchCashManagementBanner, fetchCashManagementOverviewPage, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
670
+ export { clearAutoSweepFlow, saveAutoSweepSettings, updateAutoSweepDraft, updateAutoSweepSettingsFetchStatus, updateCashManagementSettings, updateCashManagementSettingsFetchStatus, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
671
+ export { getAutoSweepFlow } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector';
672
+ export { RISK_BUFFER_AMOUNT, bufferAmountToRisk, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState';
673
+ export { getCashManagementOverview, getCashManagementOverviewBanner, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector';
@@ -158,6 +158,8 @@ import internationalWireVerification, { initialState as initialInternationalWire
158
158
  import magicLinkView, { initialState as initialMagicLinkViewState, } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
159
159
  import previousBills, { initialState as initialPreviousBillsState, } from './view/spendManagement/billPay/previousBills/previousBillsReducer';
160
160
  import wiseRedirect, { initialState as initialWiseRedirectState, } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer';
161
+ import autoSweepFlow, { initialState as initialAutoSweepFlowState, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
162
+ import cashManagementOverview, { initialState as initialCashManagementOverviewState, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
161
163
  import cardUserOnboarding, { initialState as initialCardUserOnboardingState, } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
162
164
  import cashbackDetail, { initialState as initialCashbackDetailState, } from './view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer';
163
165
  import chargeCardConfig, { initialState as initialChargeCardConfigState, } from './view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer';
@@ -309,6 +311,7 @@ const initialViewsState = {
309
311
  arAgingState: initialArAgingState,
310
312
  auditReportViewState: initialAuditReportViewState,
311
313
  authenticationViewState: initialAuthenticationViewState,
314
+ autoSweepFlowState: initialAutoSweepFlowState,
312
315
  autotransferRulesState: initialAutotransferRulesState,
313
316
  balanceSheetState: initialBalanceSheetState,
314
317
  bankAccountViewState: initialBankAccountView,
@@ -327,6 +330,7 @@ const initialViewsState = {
327
330
  cashBalanceState: initialCashBalanceState,
328
331
  cashFlowState: initialCashFlowState,
329
332
  cashInCashOutState: initialCashInCashOutState,
333
+ cashManagementOverviewState: initialCashManagementOverviewState,
330
334
  cashPositionState: initialCashPositionState,
331
335
  chargeCardConfigState: initialChargeCardConfigState,
332
336
  chargeCardDetailState: initialChargeCardDetailState,
@@ -546,6 +550,7 @@ const viewReducers = {
546
550
  arAgingState: arAging,
547
551
  auditReportViewState: auditReportView,
548
552
  authenticationViewState: authentication,
553
+ autoSweepFlowState: autoSweepFlow,
549
554
  autotransferRulesState: autotransferRules,
550
555
  balanceSheetState: balanceSheet,
551
556
  bankAccountViewState: bankAccountView,
@@ -563,6 +568,7 @@ const viewReducers = {
563
568
  cashBalanceState: cashBalance,
564
569
  cashFlowState: cashFlow,
565
570
  cashInCashOutState: cashInCashOut,
571
+ cashManagementOverviewState: cashManagementOverview,
566
572
  cashPositionState: cashPosition,
567
573
  chargeCardConfigState: chargeCardConfig,
568
574
  chargeCardDetailState: chargeCardDetail,
@@ -1,10 +1,29 @@
1
1
  import recordGet from 'lodash/get';
2
2
  import { reduceAllFetchState } from '../../../commonStateTypes/reduceFetchState';
3
- import { getAllFundingAccounts, } from '../commonSetup/setupViewSelector';
3
+ import { getDepositAccountByDepositAccountId } from '../../../entity/depositAccount/depositAccountSelector';
4
+ import { getAllFundingAccounts, mapDepositAccToFundingAccount, } from '../commonSetup/setupViewSelector';
4
5
  import { getAllDepositAccounts } from '../zeniAccounts/depositAccountList/depositAccountListSelector';
5
6
  import { getAllPaymentAccounts } from '../zeniAccounts/paymentAccountList/paymentAccountListSelector';
7
+ const buildCashManagementRule = (autoSweepFlowState, depositAccountState, treasuryDetailState) => {
8
+ const { settingsId, bufferAmount, frequency, memo, primaryFundingAccountId, nextTransferDate } = autoSweepFlowState;
9
+ if (settingsId == null || primaryFundingAccountId == null) {
10
+ return undefined;
11
+ }
12
+ const depositAccount = getDepositAccountByDepositAccountId(depositAccountState, primaryFundingAccountId);
13
+ return {
14
+ bufferAmount,
15
+ frequency,
16
+ memo,
17
+ settingsId,
18
+ primaryFundingAccount: depositAccount != null
19
+ ? mapDepositAccToFundingAccount(depositAccount)
20
+ : undefined,
21
+ treasurySummary: treasuryDetailState.accountSummary,
22
+ nextTransferDate,
23
+ };
24
+ };
6
25
  export const getAutoTransferRules = (state) => {
7
- const { autotransferRulesState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
26
+ const { autotransferRulesState, autoSweepFlowState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
8
27
  const { rules, error, historyByRuleId, ruleUpdateLocalData, ruleUpdateStatusById, ruleDeleteStatusById, createRuleFetchState, autoTransferReviewDetail, } = autotransferRulesState;
9
28
  const depositAccountsView = getAllDepositAccounts(depositAccountState, depositAccountListState);
10
29
  const paymentAccountsView = getAllPaymentAccounts(paymentAccountState, paymentAccountListState);
@@ -39,6 +58,7 @@ export const getAutoTransferRules = (state) => {
39
58
  transferMoneyParties,
40
59
  transferMoneyPartiesFetchState,
41
60
  createRuleFetchState,
61
+ cashManagementRule: buildCashManagementRule(autoSweepFlowState, depositAccountState, treasuryDetailState),
42
62
  fetchState,
43
63
  error,
44
64
  version: 0,
@@ -0,0 +1,31 @@
1
+ import { toAmount } from '../../../../commonStateTypes/amount';
2
+ import { getNextTransferDate } from '../../../../commonStateTypes/workingDayHelper';
3
+ import { date } from '../../../../zeniDayJS';
4
+ import { toAutoSweepFrequency, } from './autoSweepFlowState';
5
+ export const toSaveAutoSweepSettingsBody = (state) => ({
6
+ first_run_date: getNextTransferDate(state.frequency).format('YYYY-MM-DD'),
7
+ frequency: state.frequency,
8
+ memo: state.memo,
9
+ minimum_buffer_usd: state.bufferAmount.amount,
10
+ });
11
+ /**
12
+ * Map a `GET /cash-management/settings` payload into the slice's writable
13
+ * fields. Defensive on the frequency (string-from-the-wire → union via
14
+ * `toAutoSweepFrequency`, falling back to `'weekly'` if the server returns
15
+ * something we don't model yet). Only the source account *id* is stored
16
+ * here — the full deposit-account payload is published to the entity bucket
17
+ * by the fetch epic.
18
+ */
19
+ export const toAutoSweepFlowStatePatch = (payload) => {
20
+ const currencyCode = payload.source_bank_account.balances?.currency_code;
21
+ const currencySymbol = payload.source_bank_account.balances?.currency_symbol;
22
+ return {
23
+ bufferAmount: toAmount(payload.minimum_buffer_usd, currencyCode ?? 'USD', currencySymbol ?? '$'),
24
+ frequency: toAutoSweepFrequency(payload.frequency) ?? 'weekly',
25
+ nextTransferDate: payload.next_transfer_date != null && payload.next_transfer_date !== ''
26
+ ? date(payload.next_transfer_date)
27
+ : undefined,
28
+ primaryFundingAccountId: payload.source_bank_account.deposit_account_id ?? undefined,
29
+ settingsId: payload.cash_management_settings_id ?? undefined,
30
+ };
31
+ };
@@ -0,0 +1,69 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import { toAutoSweepFlowStatePatch, } from './autoSweepFlowPayload';
3
+ import { initialAutoSweepFlowState, } from './autoSweepFlowState';
4
+ export const initialState = initialAutoSweepFlowState;
5
+ const autoSweepFlow = createSlice({
6
+ name: 'autoSweepFlow',
7
+ initialState,
8
+ reducers: {
9
+ /**
10
+ * Kicks off `GET /cash-management/settings`. Flips the top-level
11
+ * fetchState to `In-Progress`; the fetch epic picks this up.
12
+ */
13
+ fetchCashManagementSettings(draft) {
14
+ draft.fetchState = 'In-Progress';
15
+ draft.error = undefined;
16
+ },
17
+ /**
18
+ * Hydrates the form fields with the server-side settings (and stashes
19
+ * the settings id for subsequent saves). Marks the GET as `Completed`.
20
+ */
21
+ updateCashManagementSettings(draft, action) {
22
+ const patch = toAutoSweepFlowStatePatch(action.payload.data);
23
+ draft.bufferAmount = patch.bufferAmount;
24
+ draft.frequency = patch.frequency;
25
+ draft.nextTransferDate = patch.nextTransferDate;
26
+ draft.primaryFundingAccountId = patch.primaryFundingAccountId;
27
+ draft.settingsId = patch.settingsId;
28
+ draft.fetchState = 'Completed';
29
+ draft.error = undefined;
30
+ },
31
+ updateCashManagementSettingsFetchStatus(draft, action) {
32
+ draft.fetchState = action.payload.fetchState;
33
+ draft.error = action.payload.error;
34
+ },
35
+ /**
36
+ * Stage the in-flight form values without submitting them — fired from
37
+ * the setup→review transition so other selectors (and devtools) can see
38
+ * what the user is about to confirm. Leaves `saveStatus` untouched; the
39
+ * actual PUT only kicks off when the user clicks "Confirm Sweep" via
40
+ * `saveAutoSweepSettings`.
41
+ */
42
+ updateAutoSweepDraft(draft, action) {
43
+ draft.bufferAmount = action.payload.bufferAmount;
44
+ draft.frequency = action.payload.frequency;
45
+ draft.memo = action.payload.memo;
46
+ },
47
+ /**
48
+ * Trigger the PUT for the auto-sweep settings already staged via
49
+ * `updateAutoSweepDraft`. Carries no payload — flips `saveStatus` to
50
+ * `In-Progress` and the save epic reads `bufferAmount` / `frequency` /
51
+ * `memo` straight from the slice. Callers must ensure those fields
52
+ * reflect the user's latest input before dispatching.
53
+ */
54
+ saveAutoSweepSettings(draft) {
55
+ draft.saveStatus = { fetchState: 'In-Progress', error: undefined };
56
+ },
57
+ updateAutoSweepSettingsFetchStatus(draft, action) {
58
+ draft.saveStatus = {
59
+ fetchState: action.payload.fetchState,
60
+ error: action.payload.error,
61
+ };
62
+ },
63
+ clearAutoSweepFlow() {
64
+ return initialAutoSweepFlowState;
65
+ },
66
+ },
67
+ });
68
+ export const { fetchCashManagementSettings, updateCashManagementSettings, updateCashManagementSettingsFetchStatus, updateAutoSweepDraft, saveAutoSweepSettings, updateAutoSweepSettingsFetchStatus, clearAutoSweepFlow, } = autoSweepFlow.actions;
69
+ export default autoSweepFlow.reducer;
@@ -0,0 +1,29 @@
1
+ import { getDepositAccountByDepositAccountId } from '../../../../entity/depositAccount/depositAccountSelector';
2
+ import { mapDepositAccToFundingAccount, } from '../../commonSetup/setupViewSelector';
3
+ import { getTreasuryDetail } from '../../treasury/treasuryList/treasuryDetailSelector';
4
+ import { getCashManagementOverviewBanner } from '../cashManagementOverview/cashManagementOverviewSelector';
5
+ import { bufferAmountToRisk, } from './autoSweepFlowState';
6
+ export const getAutoSweepFlow = (state) => {
7
+ const { bufferAmount, frequency, memo, saveStatus, settingsId, primaryFundingAccountId, fetchState, error, } = state.autoSweepFlowState;
8
+ const depositAccount = primaryFundingAccountId != null
9
+ ? getDepositAccountByDepositAccountId(state.depositAccountState, primaryFundingAccountId)
10
+ : undefined;
11
+ return {
12
+ fetchState,
13
+ error,
14
+ formData: {
15
+ bufferAmount,
16
+ frequency,
17
+ memo,
18
+ risk: bufferAmountToRisk(bufferAmount.amount),
19
+ },
20
+ primaryFundingAccount: depositAccount != null
21
+ ? mapDepositAccToFundingAccount(depositAccount)
22
+ : undefined,
23
+ saveStatus,
24
+ settingsId,
25
+ sweepAmount: getCashManagementOverviewBanner(state).amount,
26
+ treasurySummary: getTreasuryDetail(state).accountSummary,
27
+ version: 0,
28
+ };
29
+ };
@@ -0,0 +1,47 @@
1
+ import { toAmount } from '../../../../commonStateTypes/amount';
2
+ import { stringToUnion } from '../../../../commonStateTypes/stringToUnion';
3
+ /**
4
+ * Cadence at which the auto-sweep transfer fires. Lowercase to match the
5
+ * cash-management settings API contract (and the `SweepFrequency` literal
6
+ * already used by `<AutoSweepSetupPage>` in web-components).
7
+ */
8
+ export const ALL_AUTO_SWEEP_FREQUENCIES = [
9
+ 'daily',
10
+ 'weekly',
11
+ 'biweekly',
12
+ 'monthly',
13
+ ];
14
+ export const toAutoSweepFrequency = (v) => stringToUnion(v ?? '', ALL_AUTO_SWEEP_FREQUENCIES);
15
+ /**
16
+ * Risk presets the auto-sweep setup form exposes. Each level maps to a
17
+ * canonical minimum-buffer amount (USD). Selecting a level in the UI is
18
+ * shorthand for choosing that buffer.
19
+ */
20
+ export const ALL_AUTO_SWEEP_RISK_LEVELS = ['low', 'moderate', 'high'];
21
+ export const toAutoSweepRiskLevel = (v) => stringToUnion(v ?? '', ALL_AUTO_SWEEP_RISK_LEVELS);
22
+ export const RISK_BUFFER_AMOUNT = {
23
+ low: 15000,
24
+ moderate: 10000,
25
+ high: 5000,
26
+ };
27
+ /**
28
+ * Maps a buffer amount back onto the closest preset risk level. Falls back
29
+ * to `'moderate'` when the amount doesn't match a known preset (e.g. the
30
+ * server returned a custom value). The dropdown in `<AutoSweepSetupPage>`
31
+ * uses this so it can pre-select the user's existing band on edit.
32
+ */
33
+ export const bufferAmountToRisk = (amount) => {
34
+ const match = Object.entries(RISK_BUFFER_AMOUNT).find(([, presetAmount]) => presetAmount === amount);
35
+ return match != null ? match[0] : 'moderate';
36
+ };
37
+ export const initialAutoSweepFlowState = {
38
+ bufferAmount: toAmount(10000, 'USD', '$'),
39
+ frequency: 'weekly',
40
+ memo: '',
41
+ saveStatus: { fetchState: 'Not-Started', error: undefined },
42
+ nextTransferDate: undefined,
43
+ primaryFundingAccountId: undefined,
44
+ settingsId: undefined,
45
+ fetchState: 'Not-Started',
46
+ error: undefined,
47
+ };
@@ -0,0 +1,34 @@
1
+ import { of } from 'rxjs';
2
+ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
+ import { updateDepositAccounts } from '../../../../../entity/depositAccount/depositAccountReducer';
4
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
5
+ import { fetchCashManagementSettings, updateCashManagementSettings, updateCashManagementSettingsFetchStatus, } from '../autoSweepFlowReducer';
6
+ /**
7
+ * Hits `GET /cash-management/settings` and hydrates the auto-sweep slice
8
+ * with the server's existing settings (frequency, minimum buffer, settings
9
+ * id). Called from the cash management overview page-fetch epic alongside
10
+ * the other top-level fetches.
11
+ */
12
+ export const fetchCashManagementSettingsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCashManagementSettings.match), switchMap(() => {
13
+ const endpoint = `${zeniAPI.apiEndPoints.cashManagementAgentBaseUrl}/1.0/cash-management/settings`;
14
+ return zeniAPI
15
+ .getJSON(endpoint)
16
+ .pipe(mergeMap((response) => {
17
+ if (isSuccessResponse(response) && response.data != null) {
18
+ return of(
19
+ // Publish the source deposit account into the shared entity
20
+ // bucket so the selector can hydrate the full `FundingAccount`
21
+ // from `getDepositAccountByDepositAccountId` rather than the
22
+ // auto-sweep slice holding a duplicate copy.
23
+ updateDepositAccounts([response.data.source_bank_account]), updateCashManagementSettings({ data: response.data }));
24
+ }
25
+ return of(updateCashManagementSettingsFetchStatus({
26
+ fetchState: 'Error',
27
+ error: response.status,
28
+ }));
29
+ }), catchError((error) => of(updateCashManagementSettingsFetchStatus({
30
+ fetchState: 'Error',
31
+ error: createZeniAPIStatus('Unexpected Error', 'Fetch cash management settings REST API call errored out: ' +
32
+ (error?.message ?? String(error))),
33
+ }))));
34
+ }));
@@ -0,0 +1,32 @@
1
+ import { of } from 'rxjs';
2
+ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
4
+ import { toSaveAutoSweepSettingsBody, } from '../autoSweepFlowPayload';
5
+ import { saveAutoSweepSettings, updateAutoSweepSettingsFetchStatus, } from '../autoSweepFlowReducer';
6
+ export const saveAutoSweepSettingsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(saveAutoSweepSettings.match), switchMap(() => {
7
+ const endpoint = `${zeniAPI.apiEndPoints.cashManagementAgentBaseUrl}/1.0/cash-management/settings`;
8
+ const { bufferAmount, frequency, memo, settingsId } = state$.value.autoSweepFlowState;
9
+ const payload = toSaveAutoSweepSettingsBody({
10
+ bufferAmount,
11
+ frequency,
12
+ memo,
13
+ });
14
+ // First-time setup (no settings id from the GET yet) → POST a new
15
+ // record. Subsequent edits update the existing one via PUT.
16
+ const request$ = settingsId == null
17
+ ? zeniAPI.postAndGetJSON(endpoint, payload)
18
+ : zeniAPI.putAndGetJSON(endpoint, payload);
19
+ return request$.pipe(mergeMap((response) => {
20
+ if (isSuccessResponse(response) && response.data != null) {
21
+ return of(updateAutoSweepSettingsFetchStatus({ fetchState: 'Completed' }));
22
+ }
23
+ return of(updateAutoSweepSettingsFetchStatus({
24
+ fetchState: 'Error',
25
+ error: response?.status,
26
+ }));
27
+ }), catchError((error) => of(updateAutoSweepSettingsFetchStatus({
28
+ fetchState: 'Error',
29
+ error: createZeniAPIStatus('Unexpected Error', 'Save auto-sweep settings REST API call errored out: ' +
30
+ (error?.message ?? String(error))),
31
+ }))));
32
+ }));
@@ -0,0 +1,54 @@
1
+ import { toAmount } from '../../../../commonStateTypes/amount';
2
+ import { date as zeniDate } from '../../../../zeniDayJS';
3
+ // ---------------------------------------------------------------------------
4
+ // Converters
5
+ // ---------------------------------------------------------------------------
6
+ // The cash agent payload reports `currency_code` only; the v1 surface is
7
+ // USD-only, so we pair it with the canonical `$` symbol here. If the agent
8
+ // grows multi-currency support, this is the single place to widen.
9
+ const CASH_AGENT_CURRENCY_SYMBOL = '$';
10
+ export const toUpcomingPaymentEvent = (event) => ({
11
+ accountId: event.account_id,
12
+ accountType: event.account_type,
13
+ amount: toAmount(event.amount_usd, event.currency_code, CASH_AGENT_CURRENCY_SYMBOL),
14
+ label: event.label,
15
+ paymentDate: zeniDate(event.payment_date),
16
+ });
17
+ /**
18
+ * The agent reports a `null` account id whenever the "account" in question is
19
+ * a singleton inferred from the account type (today: the treasury account —
20
+ * there's only one per company, so the type alone identifies it). Callers
21
+ * already branch on `*BankAccountType`, so collapsing the id to `""` keeps the
22
+ * state type a plain `ID` (string) without losing information.
23
+ */
24
+ const toCashManagementMovement = (payload) => ({
25
+ amount: toAmount(payload.amount, payload.currency_code, CASH_AGENT_CURRENCY_SYMBOL),
26
+ destinationBankAccountId: payload.destination_bank_account_id ?? '',
27
+ destinationBankAccountType: payload.destination_bank_account_type,
28
+ reasoning: payload.reasoning,
29
+ sourceBankAccountId: payload.source_bank_account_id ?? '',
30
+ sourceBankAccountType: payload.source_bank_account_type,
31
+ subMovementType: payload.sub_movement_type,
32
+ });
33
+ const toCashManagementMoneyMovementGroup = (payload) => ({
34
+ movements: payload.movements.map(toCashManagementMovement),
35
+ movementType: payload.movement_type,
36
+ });
37
+ export const toCashManagementBannerData = (payload) => ({
38
+ inflows: payload.inflows.map(toUpcomingPaymentEvent),
39
+ moneyMovements: payload.money_movements.map(toCashManagementMoneyMovementGroup),
40
+ outflows: payload.outflows.map(toUpcomingPaymentEvent),
41
+ });
42
+ export const toCashManagementTransfer = (payload) => ({
43
+ amount: toAmount(payload.amount, payload.currency_code, CASH_AGENT_CURRENCY_SYMBOL),
44
+ atomicTransactionId: payload.atomic_transaction_id,
45
+ cashManagementTransferId: payload.cash_management_transfer_id,
46
+ createTime: zeniDate(payload.create_time),
47
+ date: zeniDate(payload.date),
48
+ depositAccountId: payload.deposit_account_id,
49
+ reasoning: payload.reasoning,
50
+ scenario: payload.scenario,
51
+ status: payload.status,
52
+ transactionType: payload.transaction_type,
53
+ updateTime: zeniDate(payload.update_time),
54
+ });
@@ -0,0 +1,92 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import { toCashManagementBannerData, toCashManagementTransfer, } from './cashManagementOverviewPayload';
3
+ import { initialCashManagementBannerState, initialCashManagementRecentTransferState, } from './cashManagementOverviewState';
4
+ export const initialState = {
5
+ banner: initialCashManagementBannerState,
6
+ recentTransfer: initialCashManagementRecentTransferState,
7
+ };
8
+ const cashManagementOverview = createSlice({
9
+ name: 'cashManagementOverview',
10
+ initialState,
11
+ reducers: {
12
+ fetchCashManagementOverviewPage: {
13
+ reducer() { },
14
+ prepare(cacheOverride) {
15
+ return { payload: { cacheOverride } };
16
+ },
17
+ },
18
+ /**
19
+ * Public banner-fetch entry point. Triggers an orchestrator epic that
20
+ * fans out to the recommend, settings, and recent-transfer API calls
21
+ * in parallel. No reducer-side state change — each inner action drives
22
+ * its own sub-state.
23
+ *
24
+ * `cacheOverride === true` forces all three inner fetches regardless
25
+ * of current slice state; `false` keeps the per-slice dedup so repeat
26
+ * dispatches are no-ops once a slice is loaded or in-flight.
27
+ */
28
+ fetchCashManagementBanner: {
29
+ reducer() { },
30
+ prepare(cacheOverride) {
31
+ return { payload: { cacheOverride } };
32
+ },
33
+ },
34
+ /**
35
+ * Internal trigger for the recommend API (`/cash-agent/recommend`).
36
+ * Dispatched by the orchestrator; not exported.
37
+ */
38
+ fetchCashManagementRecommendation(draft) {
39
+ // Keep `draft.banner.data` so the projection chart renders the last
40
+ // good payload while the refetch is in flight, instead of flickering
41
+ // to the empty/skeleton state on every page revisit.
42
+ draft.banner.fetchState = 'In-Progress';
43
+ draft.banner.error = undefined;
44
+ },
45
+ updateCashManagementRecommendation(draft, action) {
46
+ draft.banner = {
47
+ fetchState: 'Completed',
48
+ error: undefined,
49
+ data: toCashManagementBannerData(action.payload.data),
50
+ };
51
+ },
52
+ updateCashManagementRecommendationFetchStatus(draft, action) {
53
+ draft.banner = {
54
+ ...draft.banner,
55
+ fetchState: action.payload.fetchState,
56
+ error: action.payload.error,
57
+ };
58
+ },
59
+ /**
60
+ * Internal trigger for the recent-transfer API
61
+ * (`/cash-management/transfers`). Dispatched by the orchestrator; not
62
+ * exported.
63
+ */
64
+ fetchRecentTransfer(draft) {
65
+ // Same anti-flicker pattern as the recommend fetch: keep prior data
66
+ // while the refetch is in flight.
67
+ draft.recentTransfer.fetchState = 'In-Progress';
68
+ draft.recentTransfer.error = undefined;
69
+ },
70
+ updateRecentTransfer(draft, action) {
71
+ draft.recentTransfer = {
72
+ fetchState: 'Completed',
73
+ error: undefined,
74
+ data: action.payload.data != null
75
+ ? toCashManagementTransfer(action.payload.data)
76
+ : undefined,
77
+ };
78
+ },
79
+ updateRecentTransferFetchStatus(draft, action) {
80
+ draft.recentTransfer = {
81
+ ...draft.recentTransfer,
82
+ fetchState: action.payload.fetchState,
83
+ error: action.payload.error,
84
+ };
85
+ },
86
+ clearCashManagementOverview(draft) {
87
+ Object.assign(draft, initialState);
88
+ },
89
+ },
90
+ });
91
+ export const { fetchCashManagementOverviewPage, fetchCashManagementBanner, fetchCashManagementRecommendation, updateCashManagementRecommendation, updateCashManagementRecommendationFetchStatus, fetchRecentTransfer, updateRecentTransfer, updateRecentTransferFetchStatus, clearCashManagementOverview, } = cashManagementOverview.actions;
92
+ export default cashManagementOverview.reducer;