@zeniai/client-epic-state 5.0.2 → 5.0.3-beta0ND

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 (84) hide show
  1. package/lib/coreEpics.js +2 -1
  2. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +44 -0
  3. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +55 -0
  4. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
  5. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
  6. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
  7. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
  8. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
  9. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
  10. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  11. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  12. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  13. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  14. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  15. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  16. package/lib/entity/tenant/SessionManager.d.ts +38 -0
  17. package/lib/entity/tenant/SessionManager.js +171 -0
  18. package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
  19. package/lib/entity/tenant/clearAllEpic.js +4 -0
  20. package/lib/entity/tenant/epic/sessionHeartbeatEpic.d.ts +16 -0
  21. package/lib/entity/tenant/epic/sessionHeartbeatEpic.js +16 -0
  22. package/lib/entity/tenant/sessionTypes.d.ts +26 -0
  23. package/lib/entity/tenant/sessionTypes.js +12 -0
  24. package/lib/entity/tenant/tenantReducer.d.ts +5 -1
  25. package/lib/entity/tenant/tenantReducer.js +23 -2
  26. package/lib/entity/tenant/tenantState.d.ts +1 -0
  27. package/lib/entity/userRole/userRoleType.d.ts +2 -2
  28. package/lib/epic.d.ts +5 -1
  29. package/lib/epic.js +5 -1
  30. package/lib/esm/coreEpics.js +2 -1
  31. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +49 -0
  32. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
  33. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
  34. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
  35. package/lib/esm/entity/tenant/SessionManager.js +167 -0
  36. package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
  37. package/lib/esm/entity/tenant/epic/sessionHeartbeatEpic.js +12 -0
  38. package/lib/esm/entity/tenant/sessionTypes.js +9 -0
  39. package/lib/esm/entity/tenant/tenantReducer.js +21 -1
  40. package/lib/esm/epic.js +5 -1
  41. package/lib/esm/index.js +12 -2
  42. package/lib/esm/reducer.js +6 -0
  43. package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
  44. package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +149 -0
  45. package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +72 -0
  46. package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
  47. package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
  48. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
  49. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
  50. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +52 -0
  51. package/lib/index.d.ts +14 -2
  52. package/lib/index.js +63 -30
  53. package/lib/reducer.d.ts +6 -0
  54. package/lib/reducer.js +6 -0
  55. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  56. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +31 -0
  57. package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
  58. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
  59. package/lib/view/aiAccountantView/aiAccountantViewReducer.js +153 -0
  60. package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +14 -0
  61. package/lib/view/aiAccountantView/aiAccountantViewSelector.js +78 -0
  62. package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
  63. package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
  64. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
  65. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
  66. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
  67. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
  68. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
  69. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
  70. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
  71. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +56 -0
  72. package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
  73. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  74. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
  75. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  76. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  77. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  78. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  79. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  80. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
  81. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  82. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
  83. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  84. package/package.json +1 -1
package/lib/esm/epic.js CHANGED
@@ -31,6 +31,10 @@ import { createCompanyUserAddressEpic, } from './view/addressView/epic/createCom
31
31
  import { fetchAddressEpic, } from './view/addressView/epic/fetchAddressEpic';
32
32
  import { saveNewAddressEpic, } from './view/addressView/epic/saveNewAddressEpic';
33
33
  import { updateAddressEpic, } from './view/addressView/epic/updateAddressEpic';
34
+ import { cancelAiAccountantOnboardingEpic, } from './view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic';
35
+ import { fetchAiAccountantCustomersEpic, } from './view/aiAccountantView/epics/fetchAiAccountantCustomersEpic';
36
+ import { fetchAiAccountantJobsEpic, } from './view/aiAccountantView/epics/fetchAiAccountantJobsEpic';
37
+ import { triggerAiAccountantJobEpic, } from './view/aiAccountantView/epics/triggerAiAccountantJobEpic';
34
38
  import { fetchAggregatedReportEpic, } from './view/aiAgentPerformance/aggregatedReportEpic';
35
39
  import { acceptMasterTOSEpic, } from './view/aiCfoView/epics/acceptMasterTOSEpic';
36
40
  import { createSessionAndSubmitEpic, } from './view/aiCfoView/epics/createSessionAndSubmitEpic';
@@ -552,7 +556,7 @@ import { fetchZeniAccStatementListEpic, } from './view/zeniAccStatementList/fetc
552
556
  import { fetchZeniAccStatementPageEpic, } from './view/zeniAccStatementList/fetchZeniAccStatementPageEpic';
553
557
  import { fetchZeniAccountsPromoCardEpic, } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic';
554
558
  // Note: Please maintain strict alphabetical order
555
- const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, addCardPaymentSourceEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, 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, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, excludeAccountFromReconciliationEpic, includeAccountInReconciliationEpic, deleteBankAccountEpic, deleteBillEpic, deleteChatSessionEpic, deleteBillPayApprovalRuleEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, sendEmailMagicLinkToUserEpic, verifyDeviceWithTwoFAEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, expressInterestChargeCardEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, 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, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardSetupViewEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChargeCardsRecurringExpensesEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCollaborationAuthTokenEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchTaskManagerMetricsEpic, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, bulkUploadReceiptsEpic, confirmBulkUploadMatchEpic, fetchBulkUploadBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMoreBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCompletedTransactionsEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, 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, 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, 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, fetchTransactionListByEntityEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, 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, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, 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, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, sendCompanyMonthEndReportEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitIntlVerificationEpic, submitQuestionEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAutoTransferRuleEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateBusinessVerificationDetailsEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateAccountingClassesEnabledEpic, 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, updateTransactionDetailEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
559
+ const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, addCardPaymentSourceEpic, 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, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, excludeAccountFromReconciliationEpic, includeAccountInReconciliationEpic, deleteBankAccountEpic, deleteBillEpic, deleteChatSessionEpic, deleteBillPayApprovalRuleEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, sendEmailMagicLinkToUserEpic, 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, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardSetupViewEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChargeCardsRecurringExpensesEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCollaborationAuthTokenEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchTaskManagerMetricsEpic, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, bulkUploadReceiptsEpic, confirmBulkUploadMatchEpic, fetchBulkUploadBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMoreBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCompletedTransactionsEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, 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, 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, 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, fetchTransactionListByEntityEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, 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, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, 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, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, sendCompanyMonthEndReportEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitIntlVerificationEpic, submitQuestionEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAutoTransferRuleEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateBusinessVerificationDetailsEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateAccountingClassesEnabledEpic, 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, updateTransactionDetailEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
556
560
  const rootEpic = (action$, store$, dependencies) => combinedEpics(action$, store$, dependencies).pipe(map(identity), catchError((error, source) => {
557
561
  console.error(error);
558
562
  return source;
package/lib/esm/index.js CHANGED
@@ -59,7 +59,7 @@ import { closeSnackbar, openSnackbar } from './entity/snackbar/snackbarReducer';
59
59
  import { getSnackbar } from './entity/snackbar/snackbarSelector';
60
60
  import { toPriorityCodeType, toTaskStatusCodeType, } from './entity/task/taskState';
61
61
  import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
62
- import { clearAll, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, saveExternalConnection as saveExternalConnectionForTenant, sendEmailMagicLinkToUser, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA, } from './entity/tenant/tenantReducer';
62
+ import { clearAll, doMagicLinkSignIn, doSignIn, doSignOut, sendSessionHeartbeat, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, saveExternalConnection as saveExternalConnectionForTenant, sendEmailMagicLinkToUser, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA, } from './entity/tenant/tenantReducer';
63
63
  import { getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView, } from './entity/tenant/tenantSelector';
64
64
  import { pushToastNotification } from './entity/toastNotification/toastNotificationReducer';
65
65
  import { getLastNotificationTime, getNotifications, } from './entity/toastNotification/toastNotificationSelector';
@@ -433,7 +433,7 @@ export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsolute
433
433
  export { toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
434
434
  export { getNumberOfPeriods };
435
435
  export { SCHEDULE_DAYS_OF_MONTH, toScheduleDaysOfMonth, toMonth, toMonthStrict, toQuarter, toQuarterStrict, };
436
- export { getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, doSignOut, resetSignInState, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
436
+ export { getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, doSignOut, sendSessionHeartbeat, resetSignInState, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
437
437
  export { toAccountType, toAccountGroupType, getAccountGroupKey, };
438
438
  export { getClassById } from './entity/class/classSelector';
439
439
  export { getForecast };
@@ -606,6 +606,13 @@ export { fetchCompanyTaskManagerView, fetchTaskManagerMetrics, getCompanyTaskMan
606
606
  export { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, };
607
607
  export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, getExpressPayView, };
608
608
  export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryVideoViewed, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
609
+ // ── AI Accountant Entity ──
610
+ export { toAiAccountantEnrollmentStatus, toAiAccountantJobStatus, toAiAccountantOperationType, } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
611
+ export { toAiAccountantCustomer, toAiAccountantEnrollment, toAiAccountantJob, } from './entity/aiAccountantCustomer/aiAccountantCustomerPayload';
612
+ export { clearAllAiAccountantCustomers, updateAiAccountantCustomers, updateAiAccountantCustomer, updateAiAccountantJobs, } from './entity/aiAccountantCustomer/aiAccountantCustomerReducer';
613
+ export { getAiAccountantCustomers, getAiAccountantJobsByTenantId, } from './entity/aiAccountantCustomer/aiAccountantCustomerSelector';
614
+ export { cancelAiAccountantOnboarding, clearAiAccountantView, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, updateAiAccountantUIState, } from './view/aiAccountantView/aiAccountantViewReducer';
615
+ export { getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
609
616
  export { fetchChatSessionsForUser, createSession, submitQuestion, updateAiCfoViewScrollPosition, updateCurrentInput, updateCotCollapsedState, clearInput, setSession, clearAiCfoView, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, createSessionAndSubmit, stopSubmit, stopSubmitQuestion, fetchChatHistory, acceptMasterTOS, deleteChatSession, updateResponseState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } from './view/aiCfoView/aiCfoViewReducer';
610
617
  export { getAiCfoView, getSuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewSelector';
611
618
  export { setNewSession, setSessions, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, clearAiCfo, toAiCfoVisualization, } from './entity/aiCfo/aiCfoReducer';
@@ -624,3 +631,6 @@ export { getAutoTransferRules, getAutoTransferRuleById, getAutoTransferRuleHisto
624
631
  export { BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS, BULK_UPLOAD_BAR_COMPLETE_HOLD_MS, } from './view/expenseAutomationView/helpers/bulkUploadTiming';
625
632
  export { fetchTransactionActivityLog } from './view/transactionActivityLogView/transactionActivityLogViewReducer';
626
633
  export { getTransactionActivityLogView, } from './view/transactionActivityLogView/transactionActivityLogViewSelector';
634
+ // ── Session Management ──────────────────────────────────────────────
635
+ export { SessionManager } from './entity/tenant/SessionManager';
636
+ export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
@@ -69,6 +69,8 @@ import accountMapping, { initialState as initialAccountMappingState, } from './v
69
69
  import addressView, { initialState as initialAddressViewState, } from './view/addressView/addressViewReducer';
70
70
  import aggregatedReport, { initialState as initialAggregatedReportViewState, } from './view/aiAgentPerformance/aggregatedReportViewReducer';
71
71
  import aiCfoView, { initialAiCfoViewState, } from './view/aiCfoView/aiCfoViewReducer';
72
+ import aiAccountantCustomer, { initialAiAccountantCustomerState, } from './entity/aiAccountantCustomer/aiAccountantCustomerReducer';
73
+ import aiAccountantView, { initialAiAccountantViewState, } from './view/aiAccountantView/aiAccountantViewReducer';
72
74
  import apAgingDetail, { initialState as initialApAgingDetailState, } from './view/apAgingView/apAgingDetail/apAgingDetailReducer';
73
75
  import apAging, { initialState as initialApAgingState, } from './view/apAgingView/apAgingReport/apAgingReducer';
74
76
  import arAgingDetail, { initialState as initialArAgingDetailState, } from './view/arAgingView/arAgingDetail/arAgingDetailReducer';
@@ -223,6 +225,7 @@ const initialEntitiesState = {
223
225
  accountReconState: initialAccountReconState,
224
226
  accountState: initialAccountState,
225
227
  addressState: initialAddressState,
228
+ aiAccountantCustomerState: initialAiAccountantCustomerState,
226
229
  aiCfoState: initialAiCfoState,
227
230
  approvalRuleState: initialApprovalRuleState,
228
231
  bankAccountState: initialBankAccountState,
@@ -291,6 +294,7 @@ const initialViewsState = {
291
294
  accountMappingState: initialAccountMappingState,
292
295
  addressViewState: initialAddressViewState,
293
296
  aggregatedReportViewState: initialAggregatedReportViewState,
297
+ aiAccountantViewState: initialAiAccountantViewState,
294
298
  aiCfoViewState: initialAiCfoViewState,
295
299
  apAgingDetailState: initialApAgingDetailState,
296
300
  apAgingState: initialApAgingState,
@@ -450,6 +454,7 @@ const entityReducers = {
450
454
  accountingSummaryState: accountingSummary,
451
455
  accountState: account,
452
456
  addressState: address,
457
+ aiAccountantCustomerState: aiAccountantCustomer,
453
458
  aiCfoState: aiCfo,
454
459
  approvalRuleState: approvalRule,
455
460
  bankAccountState: bankAccount,
@@ -519,6 +524,7 @@ const viewReducers = {
519
524
  accountMappingState: accountMapping,
520
525
  addressViewState: addressView,
521
526
  aggregatedReportViewState: aggregatedReport,
527
+ aiAccountantViewState: aiAccountantView,
522
528
  aiCfoViewState: aiCfoView,
523
529
  apAgingDetailState: apAgingDetail,
524
530
  apAgingState: apAging,
@@ -0,0 +1,2 @@
1
+ // Re-export entity payload types and mapping functions.
2
+ export { toAiAccountantCustomer, toAiAccountantEnrollment, toAiAccountantJob, } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
@@ -0,0 +1,149 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ export const initialAiAccountantViewState = {
3
+ customersByTenantId: {},
4
+ customersFetchStatus: { fetchState: 'Not-Started' },
5
+ selectedTenantIdsForJobTrigger: [],
6
+ triggerJobStatus: { fetchState: 'Not-Started' },
7
+ uiState: {
8
+ filterText: '',
9
+ filters: {},
10
+ selectedCustomerTenantId: '',
11
+ sortKey: 'companyName',
12
+ sortOrder: 'ascending',
13
+ },
14
+ };
15
+ const aiAccountantView = createSlice({
16
+ name: 'aiAccountantView',
17
+ initialState: initialAiAccountantViewState,
18
+ reducers: {
19
+ // ── Customers ──
20
+ fetchAiAccountantCustomers(draft) {
21
+ draft.customersFetchStatus = { fetchState: 'In-Progress' };
22
+ },
23
+ updateAiAccountantCustomers(draft, action) {
24
+ draft.customersByTenantId = toCustomersByTenantId(action.payload, draft.customersByTenantId);
25
+ draft.customersFetchStatus = { fetchState: 'Completed' };
26
+ },
27
+ updateAiAccountantCustomersFailure(draft, action) {
28
+ draft.customersFetchStatus = {
29
+ fetchState: 'Error',
30
+ error: action.payload,
31
+ };
32
+ },
33
+ // ── Jobs ──
34
+ fetchAiAccountantJobs: {
35
+ reducer(draft, action) {
36
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
37
+ if (customerView != null) {
38
+ customerView.jobsFetchStatus = { fetchState: 'In-Progress' };
39
+ }
40
+ },
41
+ prepare(tenantId, fetchNextPage) {
42
+ return { payload: { tenantId, fetchNextPage: fetchNextPage ?? false } };
43
+ },
44
+ },
45
+ updateAiAccountantJobs: {
46
+ reducer(draft, action) {
47
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
48
+ if (customerView != null) {
49
+ customerView.jobsFetchStatus = { fetchState: 'Completed' };
50
+ customerView.jobsPageToken = action.payload.nextPageToken;
51
+ }
52
+ },
53
+ prepare(tenantId, nextPageToken) {
54
+ return { payload: { tenantId, nextPageToken: nextPageToken ?? null } };
55
+ },
56
+ },
57
+ updateAiAccountantJobsFailure(draft, action) {
58
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
59
+ if (customerView != null) {
60
+ customerView.jobsFetchStatus = {
61
+ fetchState: 'Error',
62
+ error: action.payload.error,
63
+ };
64
+ }
65
+ },
66
+ setSelectedTenantIdsForJobTrigger(draft, action) {
67
+ draft.selectedTenantIdsForJobTrigger = action.payload;
68
+ },
69
+ // ── Trigger Job ──
70
+ triggerAiAccountantJob: {
71
+ reducer(draft,
72
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
73
+ _action) {
74
+ draft.triggerJobStatus = { fetchState: 'In-Progress' };
75
+ },
76
+ prepare(operationType, startDate, endDate) {
77
+ return { payload: { operationType, startDate, endDate } };
78
+ },
79
+ },
80
+ triggerAiAccountantJobSuccess(draft) {
81
+ draft.triggerJobStatus = { fetchState: 'Completed' };
82
+ },
83
+ triggerAiAccountantJobFailure(draft, action) {
84
+ draft.triggerJobStatus = { fetchState: 'Error', error: action.payload };
85
+ },
86
+ // ── Cancel Onboarding ──
87
+ cancelAiAccountantOnboarding: {
88
+ reducer(draft, action) {
89
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
90
+ if (customerView != null) {
91
+ customerView.cancelOnboardingStatus = { fetchState: 'In-Progress' };
92
+ }
93
+ },
94
+ prepare(companyId, tenantId) {
95
+ return { payload: { companyId, tenantId } };
96
+ },
97
+ },
98
+ cancelAiAccountantOnboardingSuccess: {
99
+ reducer(draft, action) {
100
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
101
+ if (customerView != null) {
102
+ customerView.cancelOnboardingStatus = { fetchState: 'Completed' };
103
+ }
104
+ },
105
+ prepare(tenantId) {
106
+ return { payload: { tenantId } };
107
+ },
108
+ },
109
+ cancelAiAccountantOnboardingFailure: {
110
+ reducer(draft, action) {
111
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
112
+ if (customerView != null) {
113
+ customerView.cancelOnboardingStatus = {
114
+ fetchState: 'Error',
115
+ error: action.payload.error,
116
+ };
117
+ }
118
+ },
119
+ prepare(tenantId, error) {
120
+ return { payload: { tenantId, error } };
121
+ },
122
+ },
123
+ // ── UI State ──
124
+ updateAiAccountantUIState(draft, action) {
125
+ Object.assign(draft.uiState, action.payload);
126
+ },
127
+ // ── Clear ──
128
+ clearAiAccountantView() {
129
+ return initialAiAccountantViewState;
130
+ },
131
+ },
132
+ });
133
+ export const { cancelAiAccountantOnboarding, cancelAiAccountantOnboardingFailure, cancelAiAccountantOnboardingSuccess, clearAiAccountantView, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, triggerAiAccountantJobFailure, triggerAiAccountantJobSuccess, updateAiAccountantCustomers, updateAiAccountantCustomersFailure, updateAiAccountantJobs, updateAiAccountantJobsFailure, updateAiAccountantUIState, } = aiAccountantView.actions;
134
+ export default aiAccountantView.reducer;
135
+ // ── Helpers ──
136
+ const toCustomersByTenantId = (customers, existing) => {
137
+ const result = {};
138
+ for (const payload of customers) {
139
+ const tenantId = payload.tenant_id;
140
+ const existingState = existing[tenantId];
141
+ result[tenantId] = existingState ?? {
142
+ cancelOnboardingStatus: { fetchState: 'Not-Started' },
143
+ jobsFetchStatus: { fetchState: 'Not-Started' },
144
+ jobsPageToken: null,
145
+ tenantId,
146
+ };
147
+ }
148
+ return result;
149
+ };
@@ -0,0 +1,72 @@
1
+ import { createSelector } from '@reduxjs/toolkit';
2
+ import orderBy from 'lodash/orderBy';
3
+ import { getAiAccountantCustomers, } from '../../entity/aiAccountantCustomer/aiAccountantCustomerSelector';
4
+ export const getAiAccountantCockpitView = createSelector((state) => state.aiAccountantViewState, (state) => state.aiAccountantCustomerState, (state) => state.userState, (viewState, customerEntityState, userState) => {
5
+ const { customersByTenantId, customersFetchStatus, selectedTenantIdsForJobTrigger, triggerJobStatus, uiState, } = viewState;
6
+ const allCustomers = getAiAccountantCustomers(customerEntityState, userState);
7
+ let filteredCustomers = allCustomers;
8
+ // Text filter
9
+ const trimmedFilterText = uiState.filterText.trim();
10
+ if (trimmedFilterText.length > 0) {
11
+ const query = trimmedFilterText.toLowerCase();
12
+ filteredCustomers = filteredCustomers.filter((customer) => customer.companyName.toLowerCase().includes(query) ||
13
+ customer.tenantId.toLowerCase().includes(query));
14
+ }
15
+ // Cockpit filters (e.g. enrollmentStatus)
16
+ const enrollmentStatusFilter = uiState.filters.categories?.find((category) => category.field === 'enrollmentStatus');
17
+ if (enrollmentStatusFilter != null &&
18
+ enrollmentStatusFilter.values.length > 0) {
19
+ const selectedStatuses = enrollmentStatusFilter.values.map(String);
20
+ const isEqual = enrollmentStatusFilter.matchingOperator === 'equal';
21
+ filteredCustomers = filteredCustomers.filter((customer) => {
22
+ const status = customer.enrollment?.status ?? 'unknown';
23
+ const matches = selectedStatuses.includes(status);
24
+ return isEqual ? matches : !matches;
25
+ });
26
+ }
27
+ // Sorting
28
+ const sortedCustomers = getSortedCustomers(filteredCustomers, uiState.sortKey, uiState.sortOrder);
29
+ const selectedCustomersForJobTrigger = allCustomers.filter((customer) => selectedTenantIdsForJobTrigger.includes(customer.tenantId));
30
+ return {
31
+ averageAccuracy: calcOverallAverageAccuracy(allCustomers),
32
+ fetchState: customersFetchStatus.fetchState,
33
+ error: customersFetchStatus.error,
34
+ customers: sortedCustomers,
35
+ customerViewStateByTenantId: customersByTenantId,
36
+ selectedCustomersForJobTrigger,
37
+ triggerJobStatus,
38
+ uiState,
39
+ };
40
+ });
41
+ // ── Helpers ──
42
+ const getSortedCustomers = (customers, sortKey, sortOrder) => {
43
+ const direction = sortOrder === 'ascending' ? 'asc' : 'desc';
44
+ return orderBy(customers, (customer) => {
45
+ switch (sortKey) {
46
+ case 'companyName':
47
+ return customer.companyName.toLowerCase();
48
+ case 'status':
49
+ return (customer.enrollment?.status ?? 'unknown').toLowerCase();
50
+ case 'bookcloseDate':
51
+ return customer.bookcloseDate?.valueOf() ?? 0;
52
+ case 'latestTraining':
53
+ return customer.enrollment?.latestTraining?.valueOf() ?? 0;
54
+ case 'latestSync':
55
+ return customer.enrollment?.latestTransactionSync?.valueOf() ?? 0;
56
+ case 'accuracy':
57
+ return customer.averageAccuracy;
58
+ default:
59
+ return customer.companyName.toLowerCase();
60
+ }
61
+ }, direction);
62
+ };
63
+ const calcOverallAverageAccuracy = (customers) => {
64
+ const customerAccuracies = customers
65
+ .map((customer) => customer.averageAccuracy)
66
+ .filter((accuracy) => accuracy > 0);
67
+ if (customerAccuracies.length === 0) {
68
+ return 0;
69
+ }
70
+ return (customerAccuracies.reduce((sum, accuracy) => sum + accuracy, 0) /
71
+ customerAccuracies.length);
72
+ };
@@ -0,0 +1,11 @@
1
+ import { stringToUnion } from '../../commonStateTypes/stringToUnion';
2
+ const ALL_AI_ACCOUNTANT_SORT_KEYS = [
3
+ 'companyName',
4
+ 'status',
5
+ 'bookcloseDate',
6
+ 'latestTraining',
7
+ 'latestSync',
8
+ 'accuracy',
9
+ ];
10
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11
+ const toAiAccountantSortKeyType = (v) => stringToUnion(v, ALL_AI_ACCOUNTANT_SORT_KEYS);
@@ -0,0 +1,46 @@
1
+ import { from } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
4
+ import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
5
+ import { cancelAiAccountantOnboarding, cancelAiAccountantOnboardingFailure, cancelAiAccountantOnboardingSuccess, fetchAiAccountantCustomers, } from '../aiAccountantViewReducer';
6
+ export const cancelAiAccountantOnboardingEpic = (actions$, _, zeniAPI) => actions$.pipe(filter(cancelAiAccountantOnboarding.match), mergeMap((action) => {
7
+ const { tenantId, companyId } = action.payload;
8
+ const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
9
+ const url = `${base}/ai-accountant/cancel-onboarding`;
10
+ return zeniAPI
11
+ .postAndGetJSON(url, {
12
+ tenant_id: tenantId,
13
+ company_id: companyId,
14
+ })
15
+ .pipe(mergeMap((response) => {
16
+ if (isSuccessResponse(response)) {
17
+ return from([
18
+ cancelAiAccountantOnboardingSuccess(tenantId),
19
+ fetchAiAccountantCustomers(),
20
+ openSnackbar({
21
+ messageSection: 'common',
22
+ messageText: 'success',
23
+ type: 'success',
24
+ }),
25
+ ]);
26
+ }
27
+ else {
28
+ return from([
29
+ cancelAiAccountantOnboardingFailure(tenantId, response.status),
30
+ openSnackbar({
31
+ messageSection: 'common',
32
+ messageText: 'failed',
33
+ type: 'error',
34
+ }),
35
+ ]);
36
+ }
37
+ }), catchError((error) => from([
38
+ cancelAiAccountantOnboardingFailure(tenantId, createZeniAPIStatus('Unexpected error', 'AI Accountant cancel onboarding failed: ' +
39
+ JSON.stringify(error))),
40
+ openSnackbar({
41
+ messageSection: 'common',
42
+ messageText: 'failed',
43
+ type: 'error',
44
+ }),
45
+ ])));
46
+ }));
@@ -0,0 +1,27 @@
1
+ import { from, of } from 'rxjs';
2
+ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
+ import { updateAiAccountantCustomers as updateAiAccountantCustomerEntities } from '../../../entity/aiAccountantCustomer/aiAccountantCustomerReducer';
4
+ import { updateAllUsers } from '../../../entity/user/userReducer';
5
+ import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
6
+ import { fetchAiAccountantCustomers, updateAiAccountantCustomers, updateAiAccountantCustomersFailure, } from '../aiAccountantViewReducer';
7
+ export const fetchAiAccountantCustomersEpic = (actions$, _, zeniAPI) => actions$.pipe(filter(fetchAiAccountantCustomers.match), switchMap(() => {
8
+ const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
9
+ const url = `${base}/ai-accountant/customers`;
10
+ return zeniAPI
11
+ .getJSON(url)
12
+ .pipe(mergeMap((response) => {
13
+ if (isSuccessResponse(response)) {
14
+ const customers = response.data?.customers ?? [];
15
+ const users = response.data?.users ?? [];
16
+ return from([
17
+ updateAiAccountantCustomerEntities(customers),
18
+ updateAllUsers({ users }),
19
+ updateAiAccountantCustomers(customers),
20
+ ]);
21
+ }
22
+ else {
23
+ return of(updateAiAccountantCustomersFailure(response.status));
24
+ }
25
+ }), catchError((error) => of(updateAiAccountantCustomersFailure(createZeniAPIStatus('Unexpected error', 'AI Accountant customers fetch failed: ' +
26
+ JSON.stringify(error))))));
27
+ }));
@@ -0,0 +1,47 @@
1
+ import { from, of } from 'rxjs';
2
+ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
+ import { updateAiAccountantJobs as updateAiAccountantJobEntities } from '../../../entity/aiAccountantCustomer/aiAccountantCustomerReducer';
4
+ import { updateAllUsers } from '../../../entity/user/userReducer';
5
+ import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
6
+ import { fetchAiAccountantJobs, updateAiAccountantJobs, updateAiAccountantJobsFailure, } from '../aiAccountantViewReducer';
7
+ export const fetchAiAccountantJobsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchAiAccountantJobs.match), switchMap((action) => {
8
+ const { tenantId, fetchNextPage } = action.payload;
9
+ const rootState = state$.value;
10
+ const customerView = rootState.aiAccountantViewState.customersByTenantId[tenantId];
11
+ const pageToken = fetchNextPage && customerView?.jobsPageToken != null
12
+ ? customerView.jobsPageToken
13
+ : null;
14
+ const params = new URLSearchParams({
15
+ page_size: '50',
16
+ tenant_id: tenantId,
17
+ });
18
+ if (pageToken != null) {
19
+ params.set('page_token', pageToken);
20
+ }
21
+ const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
22
+ const url = `${base}/ai-accountant/jobs?${params.toString()}`;
23
+ return zeniAPI
24
+ .getJSON(url)
25
+ .pipe(mergeMap((response) => {
26
+ if (isSuccessResponse(response)) {
27
+ const jobs = response.data?.jobs ?? [];
28
+ const users = response.data?.users ?? [];
29
+ const nextPageToken = response.data?.next_page_token ?? null;
30
+ return from([
31
+ updateAllUsers({ users }),
32
+ updateAiAccountantJobEntities(tenantId, jobs, fetchNextPage),
33
+ updateAiAccountantJobs(tenantId, nextPageToken),
34
+ ]);
35
+ }
36
+ else {
37
+ return of(updateAiAccountantJobsFailure({
38
+ tenantId,
39
+ error: response.status,
40
+ }));
41
+ }
42
+ }), catchError((error) => of(updateAiAccountantJobsFailure({
43
+ tenantId,
44
+ error: createZeniAPIStatus('Unexpected error', 'AI Accountant jobs fetch failed: ' +
45
+ JSON.stringify(error)),
46
+ }))));
47
+ }));
@@ -0,0 +1,52 @@
1
+ import { from } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
4
+ import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
5
+ import { fetchAiAccountantCustomers, triggerAiAccountantJob, triggerAiAccountantJobFailure, triggerAiAccountantJobSuccess, } from '../aiAccountantViewReducer';
6
+ export const triggerAiAccountantJobEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(triggerAiAccountantJob.match), mergeMap((action) => {
7
+ const { operationType, startDate, endDate } = action.payload;
8
+ const rootState = state$.value;
9
+ const selectedTenantIds = rootState.aiAccountantViewState.selectedTenantIdsForJobTrigger;
10
+ const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
11
+ const url = `${base}/ai-accountant/jobs`;
12
+ const params = operationType === 'offboard'
13
+ ? {}
14
+ : { start_date: startDate, end_date: endDate };
15
+ return zeniAPI
16
+ .postAndGetJSON(url, {
17
+ tenant_ids: selectedTenantIds,
18
+ operation_type: operationType,
19
+ params,
20
+ })
21
+ .pipe(mergeMap((response) => {
22
+ if (isSuccessResponse(response)) {
23
+ return from([
24
+ triggerAiAccountantJobSuccess(),
25
+ fetchAiAccountantCustomers(),
26
+ openSnackbar({
27
+ messageSection: 'common',
28
+ messageText: 'success',
29
+ type: 'success',
30
+ }),
31
+ ]);
32
+ }
33
+ else {
34
+ return from([
35
+ triggerAiAccountantJobFailure(response.status),
36
+ openSnackbar({
37
+ messageSection: 'common',
38
+ messageText: 'failed',
39
+ type: 'error',
40
+ }),
41
+ ]);
42
+ }
43
+ }), catchError((error) => from([
44
+ triggerAiAccountantJobFailure(createZeniAPIStatus('Unexpected error', 'AI Accountant trigger job failed: ' +
45
+ JSON.stringify(error))),
46
+ openSnackbar({
47
+ messageSection: 'common',
48
+ messageText: 'failed',
49
+ type: 'error',
50
+ }),
51
+ ])));
52
+ }));