@zeniai/client-epic-state 5.1.52-beta0RD → 5.1.52

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 (74) hide show
  1. package/lib/commonStateTypes/amount.d.ts +1 -0
  2. package/lib/commonStateTypes/amount.js +9 -1
  3. package/lib/commonStateTypes/workingDayHelper.d.ts +4 -3
  4. package/lib/commonStateTypes/workingDayHelper.js +4 -3
  5. package/lib/entity/aiCfo/aiCfoPayload.d.ts +0 -1
  6. package/lib/entity/aiCfo/aiCfoReducer.js +1 -3
  7. package/lib/entity/aiCfo/aiCfoState.d.ts +0 -1
  8. package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
  9. package/lib/entity/tenant/clearAllEpic.js +4 -0
  10. package/lib/epic.d.ts +7 -1
  11. package/lib/epic.js +7 -1
  12. package/lib/esm/commonStateTypes/amount.js +7 -0
  13. package/lib/esm/commonStateTypes/workingDayHelper.js +4 -3
  14. package/lib/esm/entity/aiCfo/aiCfoReducer.js +1 -3
  15. package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
  16. package/lib/esm/epic.js +7 -1
  17. package/lib/esm/index.js +5 -0
  18. package/lib/esm/reducer.js +6 -0
  19. package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +8 -18
  20. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +22 -2
  21. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +29 -0
  22. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +78 -0
  23. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +49 -0
  24. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +47 -0
  25. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +32 -0
  26. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +32 -0
  27. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +54 -0
  28. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +92 -0
  29. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +212 -0
  30. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +10 -0
  31. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +23 -0
  32. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +36 -0
  33. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +27 -0
  34. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +28 -0
  35. package/lib/index.d.ts +10 -1
  36. package/lib/index.js +20 -1
  37. package/lib/reducer.d.ts +6 -0
  38. package/lib/reducer.js +6 -0
  39. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +2 -2
  40. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +7 -17
  41. package/lib/view/recommendation/recommendationReducer.d.ts +0 -1
  42. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +8 -1
  43. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +21 -1
  44. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +22 -0
  45. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +47 -0
  46. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +34 -0
  47. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +23 -0
  48. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +82 -0
  49. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +40 -0
  50. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +53 -0
  51. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +37 -0
  52. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +53 -0
  53. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +14 -0
  54. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +36 -0
  55. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +7 -0
  56. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +36 -0
  57. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +56 -0
  58. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +60 -0
  59. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +22 -0
  60. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +96 -0
  61. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +59 -0
  62. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +217 -0
  63. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +122 -0
  64. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +13 -0
  65. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +7 -0
  66. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +27 -0
  67. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +9 -0
  68. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +40 -0
  69. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.d.ts +7 -0
  70. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +31 -0
  71. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.d.ts +15 -0
  72. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +32 -0
  73. package/lib/zeniAPI.d.ts +1 -0
  74. package/package.json +1 -1
package/lib/esm/epic.js CHANGED
@@ -396,6 +396,12 @@ import { fetchMagicLinkTenantEpic, } from './view/spendManagement/billPay/magicL
396
396
  import { saveMagicLinkBankAccountEpic, } from './view/spendManagement/billPay/magicLinkView/epics/saveMagicLinkBankAccountEpic';
397
397
  import { fetchPreviousBillsEpic, } from './view/spendManagement/billPay/previousBills/fetchPreviousBillsEpic';
398
398
  import { wiseRedirectEpic, } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectEpic';
399
+ import { fetchCashManagementSettingsEpic, } from './view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic';
400
+ import { saveAutoSweepSettingsEpic, } from './view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic';
401
+ import { fetchCashManagementBannerEpic, } from './view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic';
402
+ import { fetchCashManagementOverviewPageEpic, } from './view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic';
403
+ import { fetchCashManagementRecommendationEpic, } from './view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic';
404
+ import { fetchRecentTransferEpic, } from './view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic';
399
405
  import { fetchCardPolicyDetailEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic';
400
406
  import { updateCardPolicyEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic';
401
407
  import { archiveCardPolicyEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic';
@@ -617,7 +623,7 @@ import { fetchZeniAccStatementPageEpic, } from './view/zeniAccStatementList/fetc
617
623
  import { fetchZeniAccountsPromoCardEpic, } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic';
618
624
  import { approveOAuthConsentEpic, } from './view/zeniOAuthView/epics/approveOAuthConsentEpic';
619
625
  // Note: Please maintain strict alphabetical order
620
- const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, acknowledgeOnboardingAiActivationViewedEpic, acknowledgeOnboardingAiFinanceTeamEpic, addCardPaymentSourceEpic, applyExtractedPolicyToDraftEpic, approveOAuthConsentEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveCardPolicyEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, bulkUploadReceiptsEpic, cancelAiAccountantOnboardingEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmBulkUploadMatchEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createAutoTransferRuleEpic, createBankAccountEpic, createCardPolicyTemplatesEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createSubTaskEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createTransferEntryEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, deleteBankAccountEpic, deleteBillEpic, deleteBillPayApprovalRuleEpic, deleteCannedResponseEpic, deleteChatSessionEpic, deleteConnectionEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, dismissCapitalizationOnboardingEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, excludeAccountFromReconciliationEpic, expressInterestChargeCardEpic, extractPolicyDocumentEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAggregatedReportEpic, fetchAiAccountantCustomersEpic, fetchAiAccountantJobsEpic, fetchAiAgentsActivationStatusEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, 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, fetchBulkUploadBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCannedResponsesEpic, fetchCardBalanceEpic, fetchCardPolicyDetailEpic, fetchCardPolicyListEpic, fetchCardPolicyMccCategoriesEpic, fetchCardPolicyVendorOptionsEpic, fetchCardProfilesEpic, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardSetupViewEpic, fetchChargeCardsRecurringExpensesEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCockpitContextEpic, fetchCollaborationAuthTokenEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchCompletedTransactionsEpic, 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, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMoreBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMyProfileEpic, fetchMyProfileViewEpic, fetchNetBurnOrIncomeClassesViewEpic, fetchNetBurnOrIncomeEpic, fetchNetBurnOrIncomeForTimeframeClassesViewEpic, fetchNetBurnOrIncomeForTimeframeEpic, fetchNetBurnOrIncomeStoryCardEpic, fetchNetBurnOrIncomeWithForecastEpic, fetchNotificationSettingsEpic, fetchNotificationSettingsViewEpic, fetchNotificationUnreadCountEpic, fetchNotificationViewEpic, fetchOnboardingCompletedCompaniesEpic, fetchOnboardingCustomerSetupViewEpic, fetchOnboardingCustomerViewEpic, fetchOnboardingViewEpic, fetchOpExByVendorEpic, fetchOpExByVendorReportForTimeframeEpic, fetchOpExByVendorReportSummaryEpic, fetchOpExClassesViewEpic, fetchOpExEpic, fetchOpExForTimeframeClassesViewEpic, fetchOpExReportForTimeframeEpic, fetchOpExWithForecastEpic, fetchOwnerListEpic, fetchParentSubsidiaryManagementViewEpic, fetchPaymentAccountBalanceEpic, fetchPaymentAccountListEpic, fetchPaymentSourcesEpic, fetchPeopleEpic, fetchPeoplePageEpic, fetchPortfolioAllocationEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeEpic, fetchProfitAndLossForTimeframeProjectViewEpic, fetchProfitAndLossProjectViewEpic, fetchProjectListEpic, fetchQBOConnectionPoolEpic, fetchRecommendationByEntityIdEpic, fetchRecommendationByEntityNameEpic, fetchRecommendationForAccountSettingsEpic, fetchRecommendationForAccountTypeEpic, fetchRecommendationsAndUpdateMerchantRecommendationsEpic, fetchRecommendedTransactionRowIndexEpic, fetchReferralsEpic, fetchRegisteredInterestsEpic, fetchReimbursementCardEpic, fetchReimbursementConfigEpic, fetchRemiAndInitializeLocalStoreEpic, fetchRemiApproversDetailsEpic, fetchRemiApproversListEpic, fetchRemiDetailEpic, fetchRemiListEpic, fetchRemiListPerTabEpic, fetchRemiSetupApproverViewEpic, fetchRemiSetupViewEpic, fetchRevenueClassesViewEpic, fetchRevenueEpic, fetchRevenueForTimeframeClassesViewEpic, fetchRevenueForTimeframeEpic, fetchRevenueWithForecastEpic, fetchReviewCompanyViewEpic, fetchReviewTransferDetailEpic, fetchRewardsPlanEpic, fetchScheduleAccruedDetailsEpic, fetchScheduleAccruedDetailsPageEpic, fetchScheduleDetailsEpic, fetchScheduleDetailsPageEpic, fetchScheduleListEpic, fetchSchedulesAccountEpic, fetchSkillsEpic, fetchSubscriptionAddOnsEpic, fetchSubscriptionCouponsEpic, fetchSubscriptionCreateEstimateEpic, fetchSubscriptionDetailsEpic, fetchSubscriptionListEpic, fetchSubscriptionPlansEpic, fetchSubscriptionSummaryForTenantEpic, fetchSubscriptionUpdateEstimateEpic, fetchSubscriptionViewEpic, fetchSubTasksEpic, fetchSuggestedQuestionsEpic, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTaskManagerMetricsEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByEntityEpic, fetchTransactionListByProjectEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, fetchTransferAccountsEpic, fetchTreasuryDetailEpic, fetchTreasuryFundsEpic, fetchTreasuryHistoryEpic, fetchTreasurySetupViewEpic, fetchTreasuryStatementListEpic, fetchTreasuryTaxLetterListEpic, fetchTreasuryTransactionListEpic, 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, includeAccountInReconciliationEpic, initEmailConnectOAuthEpic, initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, initializeAccountMappingViewEpic, initializeAccountSettingsViewEpic, initializeBillPaySetupApproverViewUpdateDataEpic, initializeBillToLocalStoreEpic, initializeCardUserOnboardingLocalDataEpic, initializeCompanyHealthMetricViewLocalDataEpic, initializeDynamicFormEpic, initializeEditPersonEpic, initializeExpenseAutomationJeScheduleLocalDataEpic, initializeInternationalWireLocalDataEpic, initializeIntlVerificationFormEpic, initializeMyProfileLocalDataEpic, initializeOnboardingCustomerViewUpdateDataEpic, initializeRemiSetupApproverViewUpdateDataEpic, initializeRemiToLocalStoreEpic, initializeScheduleAccruedDetailLocalDataEpic, initializeScheduleDetailLocalDataEpic, initializeSubscriptionLocalDataEpic, initializeTaskToLocalStoreEpic, initializeTransactionDetailLocalDataEpic, initializeVendorAddressEpic, initiateChargeCardRepaymentEpic, initiateReportsClassViewRefetchingEpic, invitePeopleEpic, inviteZeniPeopleEpic, issueChargeCardEpic, lockChargeCardEpic, lockChargeCardsEpic, markAsCompleteScheduleDetailEpic, markTransactionAsNotMiscategorizedEpic, notifyMeForFeatureEpic, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, parallelFetchEntityTransactionListEpic, parallelFetchProjectTransactionListEpic, parallelFetchTransactionListByCategoryTypeEpic, parseInvoiceToBillEpic, parseReceiptsToRemiEpic, parseStatementEpic, parseUploadedKybDocumentEpic, parseUploadedKycDocumentEpic, peopleSaveUpdatesEpic, policyDocumentExtractionToRecommendationBridgeEpic, policyRecommendationFromUploadEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, pushToastNotificationEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, refreshBatchDetailsForBatchIdEpic, refreshExpenseAutomationCurrentTabEpic, refreshIntegrationsDataEpic, refreshOpExByVendorReportEpic, rejectVendorGlobalReviewEpic, reorderBillPayApprovalRulesEpic, reorderRemiApprovalRulesEpic, reparseStatementEpic, reportsResyncEpic, resendCardInviteEpic, resendInviteEpic, resendOtpEpic, resendReferralInviteEpic, resendVerifyDeviceOTPEpic, resetTransactionVendorLocalDataEpic, resetVendorDetailLocalDataEpic, resetVendorsTabVendorDetailLocalDataEpic, restoreBulkUploadAutomatchingOnMountEpic, retryBankAccountConnectionEpic, retryBankAccountConnectionForOnboardingEpic, retryExpenseAutomationJEScheduleEpic, retryOrRefundBillEpic, reviewDraftRemisBulkActionEpic, reviewExpenseAutomationFluxAnalysisViewEpic, revokeCardInviteEpic, revokeChargeCardsInviteEpic, saveAccountMappingViewEpic, saveAccountSettingsViewEpic, saveAPIKeyConnectionEpic, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCannedResponseEpic, 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, searchTransactionsForManualMatchEpic, seedAiCardCreationFormDraftEpic, seedAiCardPolicyFormDraftEpic, sendCompanyMonthEndReportEpic, sendEmailMagicLinkToUserEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, sessionHeartbeatEpic, snoozeTaskEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitFeedbackEpic, submitIntlVerificationEpic, submitQuestionEpic, syncTabsAfterAutomatchEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, unsnoozeTaskEpic, updateAccountingClassesEnabledEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateAutoTransferRuleEpic, updateBusinessVerificationDetailsEpic, updateCapitalizationAccountThresholdEpic, updateCardPolicyEpic, updateCardProfileEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateCompanyDetailsEpic, updateCompanyOfficerEpic, updateCompanyPassportLocalStoreDataEpic, updateCompanyTaskManagerViewFiltersEpic, updateDashboardLayoutEpic, updateDebitCardPinAttemptEpic, updateDepositAccountEpic, updateExpenseAutomationReconciliationBalanceLocalDataEpic, updateFileNameEpic, updateFilesMetadataEpic, updateJESchedulesEpic, updateMappedCashAccountEpic, updateMileageDetailsEpic, updateMyProfileEpic, updateNetBurnOrIncomeStoryCardSettingsEpic, updateNotificationViewAllNotificationsStatusEpic, updateNotificationViewNotificationStatusEpic, updateOnboardingCustomerViewCompleteStatusEpic, updateOnboardingCustomerViewDashboardLoadedEpic, updateOnboardingCustomerViewEpic, updateOnboardingCustomerViewLocalStoreDataEpic, updateOnboardingPaymentAccountLoginStatusEpic, updateOnboardingPaymentAccountStatusEpic, updatePaymentAccountEpic, updatePaymentAccountLoginStatusEpic, updatePaymentAccountStatusEpic, updatePhysicalChargeCardAttemptEpic, updatePortfolioAllocationEpic, updatePrimaryContactEpic, updatePrimaryFundingAccountEpic, updateQBOConnectionPoolExternalConnectionEpic, updateReferViewedEpic, updateRemiSetupViewLocalStoreDataEpic, updateReportUIOptionCOABalancesRangeEpic, updateReportUIOptionIsCompareModeEpic, updateReportUIOptionIsCompareModeOnEpic, updateReportUIOptionThisPeriodEpic, updateReportUIOptionTimeFrameEpic, updateSectionAccountsViewEpic, updateSectionClassesViewEpicV2, updateSectionProjectViewEpic, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateStatementInfoEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, updateTransactionDetailEpic, updateTreasuryPromoIntroClosedByOutsideClickEpic, updateTreasuryPromoRemindMeLaterClickedEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, validateBillsBulkActionEpic, vendorFiling1099UploadDetailsSaveEpic, verifyDeviceWithTwoFAEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
626
+ const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, acknowledgeOnboardingAiActivationViewedEpic, acknowledgeOnboardingAiFinanceTeamEpic, addCardPaymentSourceEpic, applyExtractedPolicyToDraftEpic, approveOAuthConsentEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveCardPolicyEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, bulkUploadReceiptsEpic, cancelAiAccountantOnboardingEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmBulkUploadMatchEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createAutoTransferRuleEpic, createBankAccountEpic, createCardPolicyTemplatesEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createSubTaskEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createTransferEntryEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, deleteBankAccountEpic, deleteBillEpic, deleteBillPayApprovalRuleEpic, deleteCannedResponseEpic, deleteChatSessionEpic, deleteConnectionEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, dismissCapitalizationOnboardingEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, excludeAccountFromReconciliationEpic, expressInterestChargeCardEpic, extractPolicyDocumentEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAggregatedReportEpic, fetchAiAccountantCustomersEpic, fetchAiAccountantJobsEpic, fetchAiAgentsActivationStatusEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, 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, fetchBulkUploadBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCannedResponsesEpic, fetchCardBalanceEpic, fetchCardPolicyDetailEpic, fetchCardPolicyListEpic, fetchCardPolicyMccCategoriesEpic, fetchCardPolicyVendorOptionsEpic, fetchCardProfilesEpic, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashManagementBannerEpic, fetchCashManagementOverviewPageEpic, fetchCashManagementRecommendationEpic, fetchCashManagementSettingsEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardSetupViewEpic, fetchChargeCardsRecurringExpensesEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCockpitContextEpic, fetchCollaborationAuthTokenEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchCompletedTransactionsEpic, 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, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMoreBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMyProfileEpic, fetchMyProfileViewEpic, fetchNetBurnOrIncomeClassesViewEpic, fetchNetBurnOrIncomeEpic, fetchNetBurnOrIncomeForTimeframeClassesViewEpic, fetchNetBurnOrIncomeForTimeframeEpic, fetchNetBurnOrIncomeStoryCardEpic, fetchNetBurnOrIncomeWithForecastEpic, fetchNotificationSettingsEpic, fetchNotificationSettingsViewEpic, fetchNotificationUnreadCountEpic, fetchNotificationViewEpic, fetchOnboardingCompletedCompaniesEpic, fetchOnboardingCustomerSetupViewEpic, fetchOnboardingCustomerViewEpic, fetchOnboardingViewEpic, fetchOpExByVendorEpic, fetchOpExByVendorReportForTimeframeEpic, fetchOpExByVendorReportSummaryEpic, fetchOpExClassesViewEpic, fetchOpExEpic, fetchOpExForTimeframeClassesViewEpic, fetchOpExReportForTimeframeEpic, fetchOpExWithForecastEpic, fetchOwnerListEpic, fetchParentSubsidiaryManagementViewEpic, fetchPaymentAccountBalanceEpic, fetchPaymentAccountListEpic, fetchPaymentSourcesEpic, fetchPeopleEpic, fetchPeoplePageEpic, fetchPortfolioAllocationEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeEpic, fetchProfitAndLossForTimeframeProjectViewEpic, fetchProfitAndLossProjectViewEpic, fetchProjectListEpic, fetchQBOConnectionPoolEpic, fetchRecentTransferEpic, fetchRecommendationByEntityIdEpic, fetchRecommendationByEntityNameEpic, fetchRecommendationForAccountSettingsEpic, fetchRecommendationForAccountTypeEpic, fetchRecommendationsAndUpdateMerchantRecommendationsEpic, fetchRecommendedTransactionRowIndexEpic, fetchReferralsEpic, fetchRegisteredInterestsEpic, fetchReimbursementCardEpic, fetchReimbursementConfigEpic, fetchRemiAndInitializeLocalStoreEpic, fetchRemiApproversDetailsEpic, fetchRemiApproversListEpic, fetchRemiDetailEpic, fetchRemiListEpic, fetchRemiListPerTabEpic, fetchRemiSetupApproverViewEpic, fetchRemiSetupViewEpic, fetchRevenueClassesViewEpic, fetchRevenueEpic, fetchRevenueForTimeframeClassesViewEpic, fetchRevenueForTimeframeEpic, fetchRevenueWithForecastEpic, fetchReviewCompanyViewEpic, fetchReviewTransferDetailEpic, fetchRewardsPlanEpic, fetchScheduleAccruedDetailsEpic, fetchScheduleAccruedDetailsPageEpic, fetchScheduleDetailsEpic, fetchScheduleDetailsPageEpic, fetchScheduleListEpic, fetchSchedulesAccountEpic, fetchSkillsEpic, fetchSubscriptionAddOnsEpic, fetchSubscriptionCouponsEpic, fetchSubscriptionCreateEstimateEpic, fetchSubscriptionDetailsEpic, fetchSubscriptionListEpic, fetchSubscriptionPlansEpic, fetchSubscriptionSummaryForTenantEpic, fetchSubscriptionUpdateEstimateEpic, fetchSubscriptionViewEpic, fetchSubTasksEpic, fetchSuggestedQuestionsEpic, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTaskManagerMetricsEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByEntityEpic, fetchTransactionListByProjectEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, fetchTransferAccountsEpic, fetchTreasuryDetailEpic, fetchTreasuryFundsEpic, fetchTreasuryHistoryEpic, fetchTreasurySetupViewEpic, fetchTreasuryStatementListEpic, fetchTreasuryTaxLetterListEpic, fetchTreasuryTransactionListEpic, 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, includeAccountInReconciliationEpic, initEmailConnectOAuthEpic, initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, initializeAccountMappingViewEpic, initializeAccountSettingsViewEpic, initializeBillPaySetupApproverViewUpdateDataEpic, initializeBillToLocalStoreEpic, initializeCardUserOnboardingLocalDataEpic, initializeCompanyHealthMetricViewLocalDataEpic, initializeDynamicFormEpic, initializeEditPersonEpic, initializeExpenseAutomationJeScheduleLocalDataEpic, initializeInternationalWireLocalDataEpic, initializeIntlVerificationFormEpic, initializeMyProfileLocalDataEpic, initializeOnboardingCustomerViewUpdateDataEpic, initializeRemiSetupApproverViewUpdateDataEpic, initializeRemiToLocalStoreEpic, initializeScheduleAccruedDetailLocalDataEpic, initializeScheduleDetailLocalDataEpic, initializeSubscriptionLocalDataEpic, initializeTaskToLocalStoreEpic, initializeTransactionDetailLocalDataEpic, initializeVendorAddressEpic, initiateChargeCardRepaymentEpic, initiateReportsClassViewRefetchingEpic, invitePeopleEpic, inviteZeniPeopleEpic, issueChargeCardEpic, lockChargeCardEpic, lockChargeCardsEpic, markAsCompleteScheduleDetailEpic, markTransactionAsNotMiscategorizedEpic, notifyMeForFeatureEpic, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, parallelFetchEntityTransactionListEpic, parallelFetchProjectTransactionListEpic, parallelFetchTransactionListByCategoryTypeEpic, parseInvoiceToBillEpic, parseReceiptsToRemiEpic, parseStatementEpic, parseUploadedKybDocumentEpic, parseUploadedKycDocumentEpic, peopleSaveUpdatesEpic, policyDocumentExtractionToRecommendationBridgeEpic, policyRecommendationFromUploadEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, pushToastNotificationEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, refreshBatchDetailsForBatchIdEpic, refreshExpenseAutomationCurrentTabEpic, refreshIntegrationsDataEpic, refreshOpExByVendorReportEpic, rejectVendorGlobalReviewEpic, reorderBillPayApprovalRulesEpic, reorderRemiApprovalRulesEpic, reparseStatementEpic, reportsResyncEpic, resendCardInviteEpic, resendInviteEpic, resendOtpEpic, resendReferralInviteEpic, resendVerifyDeviceOTPEpic, resetTransactionVendorLocalDataEpic, resetVendorDetailLocalDataEpic, resetVendorsTabVendorDetailLocalDataEpic, restoreBulkUploadAutomatchingOnMountEpic, retryBankAccountConnectionEpic, retryBankAccountConnectionForOnboardingEpic, retryExpenseAutomationJEScheduleEpic, retryOrRefundBillEpic, reviewDraftRemisBulkActionEpic, reviewExpenseAutomationFluxAnalysisViewEpic, revokeCardInviteEpic, revokeChargeCardsInviteEpic, saveAccountMappingViewEpic, saveAccountSettingsViewEpic, saveAPIKeyConnectionEpic, saveAutoSweepSettingsEpic, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCannedResponseEpic, 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, searchTransactionsForManualMatchEpic, seedAiCardCreationFormDraftEpic, seedAiCardPolicyFormDraftEpic, sendCompanyMonthEndReportEpic, sendEmailMagicLinkToUserEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, sessionHeartbeatEpic, snoozeTaskEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitFeedbackEpic, submitIntlVerificationEpic, submitQuestionEpic, syncTabsAfterAutomatchEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, unsnoozeTaskEpic, updateAccountingClassesEnabledEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateAutoTransferRuleEpic, updateBusinessVerificationDetailsEpic, updateCapitalizationAccountThresholdEpic, updateCardPolicyEpic, updateCardProfileEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateCompanyDetailsEpic, updateCompanyOfficerEpic, updateCompanyPassportLocalStoreDataEpic, updateCompanyTaskManagerViewFiltersEpic, updateDashboardLayoutEpic, updateDebitCardPinAttemptEpic, updateDepositAccountEpic, updateExpenseAutomationReconciliationBalanceLocalDataEpic, updateFileNameEpic, updateFilesMetadataEpic, updateJESchedulesEpic, updateMappedCashAccountEpic, updateMileageDetailsEpic, updateMyProfileEpic, updateNetBurnOrIncomeStoryCardSettingsEpic, updateNotificationViewAllNotificationsStatusEpic, updateNotificationViewNotificationStatusEpic, updateOnboardingCustomerViewCompleteStatusEpic, updateOnboardingCustomerViewDashboardLoadedEpic, updateOnboardingCustomerViewEpic, updateOnboardingCustomerViewLocalStoreDataEpic, updateOnboardingPaymentAccountLoginStatusEpic, updateOnboardingPaymentAccountStatusEpic, updatePaymentAccountEpic, updatePaymentAccountLoginStatusEpic, updatePaymentAccountStatusEpic, updatePhysicalChargeCardAttemptEpic, updatePortfolioAllocationEpic, updatePrimaryContactEpic, updatePrimaryFundingAccountEpic, updateQBOConnectionPoolExternalConnectionEpic, updateReferViewedEpic, updateRemiSetupViewLocalStoreDataEpic, updateReportUIOptionCOABalancesRangeEpic, updateReportUIOptionIsCompareModeEpic, updateReportUIOptionIsCompareModeOnEpic, updateReportUIOptionThisPeriodEpic, updateReportUIOptionTimeFrameEpic, updateSectionAccountsViewEpic, updateSectionClassesViewEpicV2, updateSectionProjectViewEpic, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateStatementInfoEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, updateTransactionDetailEpic, updateTreasuryPromoIntroClosedByOutsideClickEpic, updateTreasuryPromoRemindMeLaterClickedEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, validateBillsBulkActionEpic, vendorFiling1099UploadDetailsSaveEpic, verifyDeviceWithTwoFAEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
621
627
  const rootEpic = (action$, store$, dependencies) => combinedEpics(action$, store$, dependencies).pipe(map(identity), catchError((error, source) => {
622
628
  console.error(error);
623
629
  return source;
package/lib/esm/index.js CHANGED
@@ -704,3 +704,8 @@ export { getTransactionActivityLogView, } from './view/transactionActivityLogVie
704
704
  export { SessionManager } from './entity/tenant/SessionManager';
705
705
  export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
706
706
  export { toKycProvidedDocumentType, toKycProvidedDocumentTypeFromAllowed, } from './view/spendManagement/commonSetup/types/kycKybAutofill';
707
+ export { fetchCashManagementBanner, fetchCashManagementOverviewPage, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
708
+ export { clearAutoSweepFlow, saveAutoSweepSettings, updateAutoSweepDraft, updateAutoSweepRisk, updateAutoSweepSettingsFetchStatus, updateCashManagementSettings, updateCashManagementSettingsFetchStatus, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
709
+ export { getAutoSweepFlow } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector';
710
+ export { RISK_BUFFER_AMOUNT, bufferAmountToRisk, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState';
711
+ export { getCashManagementOverview, getCashManagementOverviewBanner, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector';
@@ -159,6 +159,8 @@ import internationalWireVerification, { initialState as initialInternationalWire
159
159
  import magicLinkView, { initialState as initialMagicLinkViewState, } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
160
160
  import previousBills, { initialState as initialPreviousBillsState, } from './view/spendManagement/billPay/previousBills/previousBillsReducer';
161
161
  import wiseRedirect, { initialState as initialWiseRedirectState, } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer';
162
+ import autoSweepFlow, { initialState as initialAutoSweepFlowState, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
163
+ import cashManagementOverview, { initialState as initialCashManagementOverviewState, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
162
164
  import cardPolicyDetail, { initialState as initialCardPolicyDetailState, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer';
163
165
  import cardPolicyList, { initialState as initialCardPolicyListState, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer';
164
166
  import createCardPolicy, { initialState as initialCreateCardPolicyState, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
@@ -314,6 +316,7 @@ const initialViewsState = {
314
316
  arAgingState: initialArAgingState,
315
317
  auditReportViewState: initialAuditReportViewState,
316
318
  authenticationViewState: initialAuthenticationViewState,
319
+ autoSweepFlowState: initialAutoSweepFlowState,
317
320
  autotransferRulesState: initialAutotransferRulesState,
318
321
  balanceSheetState: initialBalanceSheetState,
319
322
  bankAccountViewState: initialBankAccountView,
@@ -334,6 +337,7 @@ const initialViewsState = {
334
337
  cashBalanceState: initialCashBalanceState,
335
338
  cashFlowState: initialCashFlowState,
336
339
  cashInCashOutState: initialCashInCashOutState,
340
+ cashManagementOverviewState: initialCashManagementOverviewState,
337
341
  cashPositionState: initialCashPositionState,
338
342
  chargeCardConfigState: initialChargeCardConfigState,
339
343
  chargeCardDetailState: initialChargeCardDetailState,
@@ -555,6 +559,7 @@ const viewReducers = {
555
559
  arAgingState: arAging,
556
560
  auditReportViewState: auditReportView,
557
561
  authenticationViewState: authentication,
562
+ autoSweepFlowState: autoSweepFlow,
558
563
  autotransferRulesState: autotransferRules,
559
564
  balanceSheetState: balanceSheet,
560
565
  bankAccountViewState: bankAccountView,
@@ -574,6 +579,7 @@ const viewReducers = {
574
579
  cashBalanceState: cashBalance,
575
580
  cashFlowState: cashFlow,
576
581
  cashInCashOutState: cashInCashOut,
582
+ cashManagementOverviewState: cashManagementOverview,
577
583
  cashPositionState: cashPosition,
578
584
  chargeCardConfigState: chargeCardConfig,
579
585
  chargeCardDetailState: chargeCardDetail,
@@ -5,7 +5,7 @@ import { getTransactionWithCOT, getTransactionWithCOTFromRecommendations, } from
5
5
  import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
6
6
  import { getUncategorizedAccounts } from '../accountList/accountListSelector';
7
7
  import { markCategoryClassRecommendationsCompletedForCategorization, markCategoryClassRecommendationsFailureForCategorization, markCategoryClassRecommendationsInProgressForCategorization, setEntityRecommendationForLineIdsForCategorization, } from '../expenseAutomationView/reducers/transactionsViewReducer';
8
- import { markCategoryClassRecommendationsCompletedForTransactionDetail, markCategoryClassRecommendationsFailureForTransactionDetail, markCategoryClassRecommendationsInProgressForTransactionDetail, setEntityRecommendationForLineIdsForTransactionDetail, updateVendorBulkRecommendationsFetchStatus, } from '../transactionDetail/transactionDetailReducer';
8
+ import { markCategoryClassRecommendationsCompletedForTransactionDetail, markCategoryClassRecommendationsFailureForTransactionDetail, markCategoryClassRecommendationsInProgressForTransactionDetail, setEntityRecommendationForLineIdsForTransactionDetail, } from '../transactionDetail/transactionDetailReducer';
9
9
  import { buildRecommendationUrl, getRecommendationByLineIdWithCOTFromRecommendationPayloadWithCOT, } from './recommendationHelper';
10
10
  import { fetchEntityRecommendationsForLineUpdate } from './recommendationReducer';
11
11
  // Close the per-target groupBy bucket after this much idle time so inactive
@@ -38,16 +38,6 @@ export const fetchEntityRecommendationsForLineUpdateEpic = (actions$, state$, ze
38
38
  const payload = action.payload;
39
39
  const { transactionId, transaction, lineIds } = payload.transactionDetails;
40
40
  const { entity, amount, isFetchCOT, isUncategorizedExpenseCategoryEnabled, } = payload;
41
- // The vendor "Update all lines" popup on the detail page watches
42
- // its own transaction-level fetch status, separate from the
43
- // per-line statuses below — surface completion/failure there too
44
- // when this fetch was triggered by that bulk action, or the popup
45
- // hangs until its own 60s timeout regardless of how this request
46
- // resolves.
47
- const isBulkDetailFetch = payload.flowType === 'detail' && payload.isBulkFetch === true;
48
- const emitWithBulkStatus = (primaryAction, bulkAction) => isBulkDetailFetch && bulkAction != null
49
- ? of(primaryAction, bulkAction)
50
- : of(primaryAction);
51
41
  // Synchronously emit the start arm so the per-line skeleton +
52
42
  // row uncheck happen before the HTTP request begins. The
53
43
  // discriminated-union payload narrows `payload.selectedTab` to
@@ -61,9 +51,9 @@ export const fetchEntityRecommendationsForLineUpdateEpic = (actions$, state$, ze
61
51
  .getJSON(url)
62
52
  .pipe(mergeMap((response) => {
63
53
  if (!isSuccessResponse(response) || response.data == null) {
64
- return emitWithBulkStatus(payload.flowType === 'categorization'
54
+ return of(payload.flowType === 'categorization'
65
55
  ? markCategoryClassRecommendationsFailureForCategorization(payload.selectedTab, transactionId, lineIds, response.status)
66
- : markCategoryClassRecommendationsFailureForTransactionDetail(transactionId, lineIds, response.status), updateVendorBulkRecommendationsFetchStatus(transactionId, 'Error', response.status));
56
+ : markCategoryClassRecommendationsFailureForTransactionDetail(transactionId, lineIds, response.status));
67
57
  }
68
58
  const recommendationWithCOTByLineId = getRecommendationByLineIdWithCOTFromRecommendationPayloadWithCOT(response.data.recommendations, lineIds);
69
59
  // HTTP 200 with no per-line recommendations: NOT an error.
@@ -71,9 +61,9 @@ export const fetchEntityRecommendationsForLineUpdateEpic = (actions$, state$, ze
71
61
  // downstream UI can treat this as "we tried, nothing to
72
62
  // apply".
73
63
  if (recommendationWithCOTByLineId == null) {
74
- return emitWithBulkStatus(payload.flowType === 'categorization'
64
+ return of(payload.flowType === 'categorization'
75
65
  ? markCategoryClassRecommendationsCompletedForCategorization(payload.selectedTab, transactionId, lineIds)
76
- : markCategoryClassRecommendationsCompletedForTransactionDetail(transactionId, lineIds), updateVendorBulkRecommendationsFetchStatus(transactionId, 'Completed'));
66
+ : markCategoryClassRecommendationsCompletedForTransactionDetail(transactionId, lineIds));
77
67
  }
78
68
  const transactionWithCOT = isFetchCOT === true
79
69
  ? getTransactionWithCOTFromRecommendations(transaction, recommendationWithCOTByLineId)
@@ -82,16 +72,16 @@ export const fetchEntityRecommendationsForLineUpdateEpic = (actions$, state$, ze
82
72
  if (payload.flowType === 'categorization') {
83
73
  return of(setEntityRecommendationForLineIdsForCategorization(payload.selectedTab, transactionId, transactionWithCOT, lineIds, entity, amount, recommendationWithCOTByLineId, uncategorizedIncomeExpense, isUncategorizedExpenseCategoryEnabled, getIsAccountingClassesEnabled(state$.value)));
84
74
  }
85
- return emitWithBulkStatus(setEntityRecommendationForLineIdsForTransactionDetail(transactionId, transactionWithCOT, lineIds, entity, amount, recommendationWithCOTByLineId, uncategorizedIncomeExpense), updateVendorBulkRecommendationsFetchStatus(transactionId, 'Completed'));
75
+ return of(setEntityRecommendationForLineIdsForTransactionDetail(transactionId, transactionWithCOT, lineIds, entity, amount, recommendationWithCOTByLineId, uncategorizedIncomeExpense));
86
76
  }), catchError((error) => {
87
77
  const errorMessage = 'fetchEntityRecommendationsForLineUpdate failed: ' +
88
78
  (error instanceof Error
89
79
  ? error.message
90
80
  : JSON.stringify(error));
91
81
  const status = createZeniAPIStatus('Unexpected Error', errorMessage);
92
- return emitWithBulkStatus(payload.flowType === 'categorization'
82
+ return of(payload.flowType === 'categorization'
93
83
  ? markCategoryClassRecommendationsFailureForCategorization(payload.selectedTab, transactionId, lineIds, status)
94
- : markCategoryClassRecommendationsFailureForTransactionDetail(transactionId, lineIds, status), updateVendorBulkRecommendationsFetchStatus(transactionId, 'Error', status));
84
+ : markCategoryClassRecommendationsFailureForTransactionDetail(transactionId, lineIds, status));
95
85
  }));
96
86
  return concat(of(startAction), httpStream$);
97
87
  }))));
@@ -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,29 @@
1
+ import { toAmount } from '../../../../commonStateTypes/amount';
2
+ import { date } from '../../../../zeniDayJS';
3
+ import { toAutoSweepFrequency, } from './autoSweepFlowState';
4
+ export const toSaveAutoSweepSettingsBody = (state) => ({
5
+ frequency: state.frequency,
6
+ memo: state.memo,
7
+ minimum_buffer_usd: state.bufferAmount.amount,
8
+ });
9
+ /**
10
+ * Map a `GET /cash-management/settings` payload into the slice's writable
11
+ * fields. Defensive on the frequency (string-from-the-wire → union via
12
+ * `toAutoSweepFrequency`, falling back to `'weekly'` if the server returns
13
+ * something we don't model yet). Only the source account *id* is stored
14
+ * here — the full deposit-account payload is published to the entity bucket
15
+ * by the fetch epic.
16
+ */
17
+ export const toAutoSweepFlowStatePatch = (payload) => {
18
+ const currencyCode = payload.source_bank_account.balances?.currency_code;
19
+ const currencySymbol = payload.source_bank_account.balances?.currency_symbol;
20
+ return {
21
+ bufferAmount: toAmount(payload.minimum_buffer_usd, currencyCode ?? 'USD', currencySymbol ?? '$'),
22
+ frequency: toAutoSweepFrequency(payload.frequency) ?? 'weekly',
23
+ nextTransferDate: payload.next_run_date != null && payload.next_run_date !== ''
24
+ ? date(payload.next_run_date)
25
+ : undefined,
26
+ primaryFundingAccountId: payload.source_bank_account.deposit_account_id ?? undefined,
27
+ settingsId: payload.cash_management_settings_id ?? undefined,
28
+ };
29
+ };
@@ -0,0 +1,78 @@
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
+ * Live-update the buffer (risk band) as the user toggles the risk picker
37
+ * on the setup page, without staging frequency/memo. The selector derives
38
+ * the risk-adjusted sweep amount off `bufferAmount`, so dispatching this on
39
+ * every risk change keeps the setup and review screens in sync.
40
+ */
41
+ updateAutoSweepRisk(draft, action) {
42
+ draft.bufferAmount = action.payload.bufferAmount;
43
+ },
44
+ /**
45
+ * Stage the in-flight form values without submitting them — fired from
46
+ * the setup→review transition so other selectors (and devtools) can see
47
+ * what the user is about to confirm. Leaves `saveStatus` untouched; the
48
+ * actual PUT only kicks off when the user clicks "Confirm Sweep" via
49
+ * `saveAutoSweepSettings`.
50
+ */
51
+ updateAutoSweepDraft(draft, action) {
52
+ draft.bufferAmount = action.payload.bufferAmount;
53
+ draft.frequency = action.payload.frequency;
54
+ draft.memo = action.payload.memo;
55
+ },
56
+ /**
57
+ * Trigger the PUT for the auto-sweep settings already staged via
58
+ * `updateAutoSweepDraft`. Carries no payload — flips `saveStatus` to
59
+ * `In-Progress` and the save epic reads `bufferAmount` / `frequency` /
60
+ * `memo` straight from the slice. Callers must ensure those fields
61
+ * reflect the user's latest input before dispatching.
62
+ */
63
+ saveAutoSweepSettings(draft) {
64
+ draft.saveStatus = { fetchState: 'In-Progress', error: undefined };
65
+ },
66
+ updateAutoSweepSettingsFetchStatus(draft, action) {
67
+ draft.saveStatus = {
68
+ fetchState: action.payload.fetchState,
69
+ error: action.payload.error,
70
+ };
71
+ },
72
+ clearAutoSweepFlow() {
73
+ return initialAutoSweepFlowState;
74
+ },
75
+ },
76
+ });
77
+ export const { fetchCashManagementSettings, updateCashManagementSettings, updateCashManagementSettingsFetchStatus, updateAutoSweepRisk, updateAutoSweepDraft, saveAutoSweepSettings, updateAutoSweepSettingsFetchStatus, clearAutoSweepFlow, } = autoSweepFlow.actions;
78
+ export default autoSweepFlow.reducer;
@@ -0,0 +1,49 @@
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 { RISK_BUFFER_AMOUNT, bufferAmountToRisk, } from './autoSweepFlowState';
6
+ /**
7
+ * Risk band the agent's recommended sweep amount is computed against. The
8
+ * `sweepAmount` returned by the banner assumes this buffer, so the selector
9
+ * adjusts the displayed sweep by the delta between the user's selected band
10
+ * and this default.
11
+ */
12
+ const DEFAULT_RISK_LEVEL = 'moderate';
13
+ export const getAutoSweepFlow = (state) => {
14
+ const { bufferAmount, frequency, memo, saveStatus, settingsId, primaryFundingAccountId, fetchState, error, } = state.autoSweepFlowState;
15
+ const depositAccount = primaryFundingAccountId != null
16
+ ? getDepositAccountByDepositAccountId(state.depositAccountState, primaryFundingAccountId)
17
+ : undefined;
18
+ const risk = bufferAmountToRisk(bufferAmount.amount);
19
+ // The banner's recommended sweep assumes the default buffer band; shift it
20
+ // by the delta between the default buffer and the user's selected band so a
21
+ // tighter buffer (higher risk → smaller buffer) sweeps more and a looser
22
+ // buffer (lower risk → larger buffer) sweeps less. Clamp at zero so a buffer
23
+ // larger than the available surplus never yields a negative sweep.
24
+ const baseSweepAmount = getCashManagementOverviewBanner(state).amount;
25
+ const sweepAmount = {
26
+ ...baseSweepAmount,
27
+ amount: Math.max(0, baseSweepAmount.amount +
28
+ RISK_BUFFER_AMOUNT[DEFAULT_RISK_LEVEL] -
29
+ RISK_BUFFER_AMOUNT[risk]),
30
+ };
31
+ return {
32
+ fetchState,
33
+ error,
34
+ formData: {
35
+ bufferAmount,
36
+ frequency,
37
+ memo,
38
+ risk,
39
+ },
40
+ primaryFundingAccount: depositAccount != null
41
+ ? mapDepositAccToFundingAccount(depositAccount)
42
+ : undefined,
43
+ saveStatus,
44
+ settingsId,
45
+ sweepAmount,
46
+ treasurySummary: getTreasuryDetail(state).accountSummary,
47
+ version: 0,
48
+ };
49
+ };
@@ -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,32 @@
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.getJSON(endpoint).pipe(mergeMap((response) => {
15
+ if (isSuccessResponse(response) && response.data != null) {
16
+ return of(
17
+ // Publish the source deposit account into the shared entity
18
+ // bucket so the selector can hydrate the full `FundingAccount`
19
+ // from `getDepositAccountByDepositAccountId` rather than the
20
+ // auto-sweep slice holding a duplicate copy.
21
+ updateDepositAccounts([response.data.source_bank_account]), updateCashManagementSettings({ data: response.data }));
22
+ }
23
+ return of(updateCashManagementSettingsFetchStatus({
24
+ fetchState: 'Error',
25
+ error: response.status,
26
+ }));
27
+ }), catchError((error) => of(updateCashManagementSettingsFetchStatus({
28
+ fetchState: 'Error',
29
+ error: createZeniAPIStatus('Unexpected Error', 'Fetch cash management settings REST API call errored out: ' +
30
+ (error?.message ?? String(error))),
31
+ }))));
32
+ }));
@@ -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
+ });