@zeniai/client-epic-state 4.20.3-betaRD11 → 4.20.3-betaRD21

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 (124) hide show
  1. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  2. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  3. package/lib/entity/account/accountPayload.d.ts +2 -0
  4. package/lib/entity/account/accountReducer.d.ts +5 -2
  5. package/lib/entity/account/accountReducer.js +7 -2
  6. package/lib/entity/account/accountState.d.ts +1 -1
  7. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  8. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +44 -0
  9. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +55 -0
  10. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
  11. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
  12. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
  13. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
  14. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
  15. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
  16. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  17. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  18. package/lib/entity/class/classReducer.d.ts +4 -4
  19. package/lib/entity/class/classState.d.ts +1 -1
  20. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  21. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  22. package/lib/entity/forecast/forecastState.d.ts +1 -1
  23. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  24. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  25. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  26. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  27. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  28. package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
  29. package/lib/entity/tenant/clearAllEpic.js +4 -0
  30. package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -0
  31. package/lib/entity/userRole/userRoleType.d.ts +2 -2
  32. package/lib/epic.d.ts +9 -7
  33. package/lib/epic.js +9 -7
  34. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  35. package/lib/esm/entity/account/accountReducer.js +6 -1
  36. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +49 -0
  37. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
  38. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
  39. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
  40. package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
  41. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -0
  42. package/lib/esm/epic.js +9 -7
  43. package/lib/esm/index.js +11 -4
  44. package/lib/esm/reducer.js +6 -0
  45. package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
  46. package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +149 -0
  47. package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +72 -0
  48. package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
  49. package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
  50. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
  51. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
  52. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +52 -0
  53. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +44 -0
  54. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  55. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +44 -0
  56. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +5 -1
  57. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +163 -3
  58. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
  59. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +112 -0
  60. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -2
  61. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -0
  62. package/lib/index.d.ts +12 -4
  63. package/lib/index.js +64 -32
  64. package/lib/reducer.d.ts +6 -0
  65. package/lib/reducer.js +6 -0
  66. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  67. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +31 -0
  68. package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
  69. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
  70. package/lib/view/aiAccountantView/aiAccountantViewReducer.js +153 -0
  71. package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +14 -0
  72. package/lib/view/aiAccountantView/aiAccountantViewSelector.js +78 -0
  73. package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +27 -0
  74. package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
  75. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
  76. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
  77. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
  78. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
  79. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
  80. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
  81. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
  82. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +56 -0
  83. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  84. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  85. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  86. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  87. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  88. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  89. package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
  90. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  91. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +8 -0
  92. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +48 -0
  93. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  94. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +9 -0
  95. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +48 -0
  96. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  97. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +33 -0
  98. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +5 -1
  99. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
  100. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +164 -4
  101. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +6 -2
  102. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  103. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +112 -0
  104. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -2
  105. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +3 -0
  106. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -1
  107. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
  108. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +13 -0
  109. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  110. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  111. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  112. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  113. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  114. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  115. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  116. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  117. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  118. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
  119. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  120. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
  121. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  122. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  123. package/lib/view/topEx/topExSelector.d.ts +1 -1
  124. package/package.json +1 -1
@@ -0,0 +1,62 @@
1
+ import { getUserByUserId } from '../user/userSelector';
2
+ // ── Selectors ──
3
+ export function getAiAccountantCustomers(customerState, userState) {
4
+ return Object.values(customerState.customerByTenantId).map((customer) => toCustomerView(customer, userState));
5
+ }
6
+ export function getAiAccountantJobsByTenantId(customerState, userState, tenantId) {
7
+ const jobs = customerState.jobsByTenantId[tenantId] ?? [];
8
+ return jobs.map((job) => toJobView(job, userState));
9
+ }
10
+ // ── Helpers ──
11
+ function toCustomerView(customer, userState) {
12
+ return {
13
+ averageAccuracy: calcAverageAccuracy(customer),
14
+ companyId: customer.companyId,
15
+ companyName: customer.companyName,
16
+ tenantId: customer.tenantId,
17
+ bookcloseDate: customer.bookcloseDate,
18
+ enrollment: customer.enrollment != null
19
+ ? {
20
+ ...customer.enrollment,
21
+ offboardedBy: customer.enrollment.offboardedBy != null
22
+ ? getUserByUserId(userState, customer.enrollment.offboardedBy)
23
+ : undefined,
24
+ onboardedBy: customer.enrollment.onboardedBy != null
25
+ ? getUserByUserId(userState, customer.enrollment.onboardedBy)
26
+ : undefined,
27
+ }
28
+ : undefined,
29
+ };
30
+ }
31
+ function toJobView(job, userState) {
32
+ return {
33
+ companyId: job.companyId,
34
+ createdAt: job.createdAt,
35
+ jobId: job.jobId,
36
+ operationType: job.operationType,
37
+ status: job.status,
38
+ tenantId: job.tenantId,
39
+ triggeredBy: job.triggeredBy != null
40
+ ? getUserByUserId(userState, job.triggeredBy)
41
+ : undefined,
42
+ companyNamespace: job.companyNamespace,
43
+ completedAt: job.completedAt,
44
+ errorMessage: job.errorMessage,
45
+ parameters: job.parameters,
46
+ retryCount: job.retryCount,
47
+ startedAt: job.startedAt,
48
+ steps: job.steps,
49
+ validationResults: job.validationResults,
50
+ };
51
+ }
52
+ function calcAverageAccuracy(customer) {
53
+ const accuracy = customer.enrollment?.accuracy;
54
+ if (accuracy == null) {
55
+ return 0;
56
+ }
57
+ const values = Object.values(accuracy);
58
+ if (values.length === 0) {
59
+ return 0;
60
+ }
61
+ return values.reduce((sum, value) => sum + value, 0) / values.length;
62
+ }
@@ -0,0 +1,31 @@
1
+ import { stringToUnion } from '../../commonStateTypes/stringToUnion';
2
+ // ── Operation Type ──
3
+ const ALL_OPERATION_TYPES = [
4
+ 'onboard',
5
+ 'offboard',
6
+ 'retrain',
7
+ 'full_pipeline',
8
+ 'cancel_onboarding',
9
+ ];
10
+ export const toAiAccountantOperationType = (v) => stringToUnion(v, ALL_OPERATION_TYPES);
11
+ // ── Enrollment Status ──
12
+ const ALL_ENROLLMENT_STATUSES = [
13
+ 'active',
14
+ 'pending',
15
+ 'onboarding',
16
+ 'offboarding',
17
+ 'offboarded',
18
+ 'failed',
19
+ 'error',
20
+ ];
21
+ export const toAiAccountantEnrollmentStatus = (v) => stringToUnion(v, ALL_ENROLLMENT_STATUSES);
22
+ // ── Job Status ──
23
+ const ALL_JOB_STATUSES = [
24
+ 'queued',
25
+ 'running',
26
+ 'completed',
27
+ 'failed',
28
+ 'cancelled',
29
+ 'retried',
30
+ ];
31
+ export const toAiAccountantJobStatus = (v) => stringToUnion(v, ALL_JOB_STATUSES);
@@ -1,5 +1,6 @@
1
1
  import { from } from 'rxjs';
2
2
  import { filter, mergeMap } from 'rxjs/operators';
3
+ import { clearAllAiAccountantCustomers } from '../../entity/aiAccountantCustomer/aiAccountantCustomerReducer';
3
4
  import { clearAiCfo } from '../../entity/aiCfo/aiCfoReducer';
4
5
  import { clearAllApprovalRules } from '../../entity/approvalRule/approvalRuleReducer';
5
6
  import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
@@ -12,6 +13,7 @@ import { clearAccountList } from '../../view/accountList/accountListReducer';
12
13
  import { clearAccountMappingView } from '../../view/accountMappingView/accountMappingReducer';
13
14
  import { clearAddressView } from '../../view/addressView/addressViewReducer';
14
15
  import { clearAggregatedReport } from '../../view/aiAgentPerformance/aggregatedReportViewReducer';
16
+ import { clearAiAccountantView } from '../../view/aiAccountantView/aiAccountantViewReducer';
15
17
  import { clearAiCfoView } from '../../view/aiCfoView/aiCfoViewReducer';
16
18
  import { clearApAgingDetail } from '../../view/apAgingView/apAgingDetail/apAgingDetailReducer';
17
19
  import { clearApAging } from '../../view/apAgingView/apAgingReport/apAgingReducer';
@@ -207,6 +209,8 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
207
209
  clearActivityHistory(),
208
210
  clearActivityRealTimeApproval(),
209
211
  clearAddressView(),
212
+ clearAiAccountantView(),
213
+ clearAllAiAccountantCustomers(),
210
214
  clearAiCfoView(),
211
215
  clearAllClasses(),
212
216
  clearAllMonthEndCloseChecksView(),
@@ -117,6 +117,7 @@ export const toTransactionPayload = (transaction) => {
117
117
  transactionPayload = {
118
118
  ...transactionPayload,
119
119
  ...toAccountPayload(transaction.account),
120
+ currency_code: transaction.amount.currencyCode,
120
121
  };
121
122
  }
122
123
  if (transaction.paymentType != null && transaction.type === 'bill_payment') {
package/lib/esm/epic.js CHANGED
@@ -126,6 +126,8 @@ import { fetchDashboardEpic, } from './view/dashboard/dashboardEpic';
126
126
  import { fetchDashboardLayoutEpic, } from './view/dashboardLayout/fetchDashboardLayoutEpic';
127
127
  import { updateDashboardLayoutEpic, } from './view/dashboardLayout/updateDashboardLayoutEpic';
128
128
  import { deleteAccountStatementEpic, } from './view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic';
129
+ import { excludeAccountFromReconciliationEpic, } from './view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic';
130
+ import { includeAccountInReconciliationEpic, } from './view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic';
129
131
  import { fetchReconciliationViewEpic as fetchExpenseAutomationReconciliationsViewEpic, } from './view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic';
130
132
  import { initialiseDataForSelectedAccountIdEpic as initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, } from './view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic';
131
133
  import { saveReconciliationDetailsEpic as saveExpenseAutomationReconciliationDetailsEpic, } from './view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic';
@@ -292,6 +294,12 @@ import { refreshIntegrationsDataEpic, } from './view/settingsView/epic/refreshIn
292
294
  import { saveCompanyBillingAddressEpic, } from './view/settingsView/epic/saveCompanyBillingAddressEpic';
293
295
  import { saveNotificationSettingsEpic, } from './view/settingsView/epic/saveNotificationSettingsEpic';
294
296
  import { updateMyProfileEpic, } from './view/settingsView/epic/updateMyProfileEpic';
297
+ import { createAutoTransferRuleEpic, } from './view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic';
298
+ import { deleteAutoTransferRuleEpic, } from './view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic';
299
+ import { fetchAutoTransferReviewDetailEpic, } from './view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic';
300
+ import { fetchAutoTransferRuleHistoryEpic, } from './view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory';
301
+ import { fetchAutoTransferRulesEpic, } from './view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic';
302
+ import { updateAutoTransferRuleEpic, } from './view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic';
295
303
  import { approveOrRejectBillEpic, } from './view/spendManagement/billPay/billDetailView/epics/approveOrRejectBillEpic';
296
304
  import { cancelAndDeleteBillEpic, } from './view/spendManagement/billPay/billDetailView/epics/cancelAndDeleteBillEpic';
297
305
  import { deleteBillEpic, } from './view/spendManagement/billPay/billDetailView/epics/deleteBillEpic';
@@ -438,12 +446,6 @@ import { updateTreasuryVideoViewedEpic, } from './view/spendManagement/treasury/
438
446
  import { fetchTreasuryStatementListEpic, } from './view/spendManagement/treasury/treasuryStatementList/fetchTreasuryStatementListEpic';
439
447
  import { fetchTreasuryTaxLetterListEpic, } from './view/spendManagement/treasury/treasuryTaxLetterList/fetchTreasuryTaxLetterListEpic';
440
448
  import { treasuryTransferMoneyEpic, } from './view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyEpic';
441
- import { createAutoTransferRuleEpic, } from './view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic';
442
- import { deleteAutoTransferRuleEpic, } from './view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic';
443
- import { fetchAutoTransferReviewDetailEpic, } from './view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic';
444
- import { fetchAutoTransferRuleHistoryEpic, } from './view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory';
445
- import { fetchAutoTransferRulesEpic, } from './view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic';
446
- import { updateAutoTransferRuleEpic, } from './view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic';
447
449
  import { checkDepositEpic, } from './view/spendManagement/zeniAccounts/checkDeposit/checkDepositEpic';
448
450
  import { fetchDepositAccountDetailEpic, } from './view/spendManagement/zeniAccounts/depositAccountDetail/fetchDepositAccountDetailEpic';
449
451
  import { fetchDepositAccountEpic, } from './view/spendManagement/zeniAccounts/depositAccountDetail/fetchDepositAccountEpic';
@@ -542,7 +544,7 @@ import { fetchZeniAccStatementListEpic, } from './view/zeniAccStatementList/fetc
542
544
  import { fetchZeniAccStatementPageEpic, } from './view/zeniAccStatementList/fetchZeniAccStatementPageEpic';
543
545
  import { fetchZeniAccountsPromoCardEpic, } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic';
544
546
  // Note: Please maintain strict alphabetical order
545
- 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, 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, 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, bulkUploadAutomatchingTimeoutEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, 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, fetchProfitAndLossForTimeframeEpic, 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, 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, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, updateTransactionDetailEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
547
+ 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, 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, bulkUploadAutomatchingTimeoutEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, 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, fetchProfitAndLossForTimeframeEpic, 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, 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, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, updateTransactionDetailEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
546
548
  const rootEpic = (action$, store$, dependencies) => combinedEpics(action$, store$, dependencies).pipe(map(identity), catchError((error, source) => {
547
549
  console.error(error);
548
550
  return source;
package/lib/esm/index.js CHANGED
@@ -164,12 +164,12 @@ import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLine
164
164
  import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFluxAnalysisView, updateFluxAnalysisViewPageMetaData, updateFluxAnalysisViewUIState, updateOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview, } from './view/expenseAutomationView/reducers/fluxAnalysisViewReducer';
165
165
  import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
166
166
  import { acknowledgeBulkUploadConfirmMatchComplete, bulkUploadAutomatchingTimedOut, bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, clearBulkUpload, clearManualSearchResults, clearMissingReceiptsTabNavigation, confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, searchTransactionsForManualMatch, searchTransactionsForManualMatchFailure, searchTransactionsForManualMatchSuccess, setBulkUploadCompletedSubTab, setBulkUploadResultsTab, setBulkUploadSortConfig, storeBatchDetails, updateBulkUploadProgress, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
167
- import { deleteAccountStatement, fetchReconciliation as fetchReconciliationView, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
167
+ import { deleteAccountStatement, excludeAccountFromReconciliation, fetchReconciliation as fetchReconciliationView, includeAccountInReconciliation, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateNodeCollapseState, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
168
168
  import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
169
169
  import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
170
170
  import { getExpenseAutomationReconciliationView, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
171
171
  import { getExpenseAutomationTransactionView } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
172
- import { toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, } from './view/expenseAutomationView/types/jeSchedulesViewState';
172
+ import { toJEScheduleMainTab as toExpenseAutomationJEScheduleMainTab, toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, } from './view/expenseAutomationView/types/jeSchedulesViewState';
173
173
  import { BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, } from './view/expenseAutomationView/types/missingReceiptsViewState';
174
174
  import { toMissingReceiptsSortKey as toExpenseAutomationMissingReceiptsSortKey, } from './view/expenseAutomationView/types/missingReceiptsViewState';
175
175
  import { toReconciliationTabsType, } from './view/expenseAutomationView/types/reconciliationViewState';
@@ -422,9 +422,9 @@ export { stringToUnion, stringToUnionStrict };
422
422
  export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
423
423
  export {
424
424
  // Bulk Upload Types
425
- BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, toExpenseAutomationJEScheduleSortKey, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts,
425
+ BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, toExpenseAutomationJEScheduleMainTab, toExpenseAutomationJEScheduleSortKey, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts,
426
426
  // Bulk Upload Actions
427
- bulkUploadReceipts, bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, bulkUploadReceiptsFailure, updateBulkUploadProgress, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, clearMissingReceiptsTabNavigation, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatchDetailsFailure, storeBatchDetails, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, fetchBulkUploadBatches, fetchBulkUploadBatchesSuccess, fetchBulkUploadBatchesFailure, confirmBulkUploadMatch, confirmBulkUploadMatchSuccess, confirmBulkUploadMatchFailure, setBulkUploadResultsTab, setBulkUploadCompletedSubTab, setBulkUploadSortConfig, clearBulkUpload, searchTransactionsForManualMatch, searchTransactionsForManualMatchSuccess, searchTransactionsForManualMatchFailure, clearManualSearchResults, acknowledgeBulkUploadConfirmMatchComplete, fetchCompletedTransactions, fetchCompletedTransactionsSuccess, fetchCompletedTransactionsFailure, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
427
+ bulkUploadReceipts, bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, bulkUploadReceiptsFailure, updateBulkUploadProgress, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, clearMissingReceiptsTabNavigation, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatchDetailsFailure, storeBatchDetails, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, fetchBulkUploadBatches, fetchBulkUploadBatchesSuccess, fetchBulkUploadBatchesFailure, confirmBulkUploadMatch, confirmBulkUploadMatchSuccess, confirmBulkUploadMatchFailure, setBulkUploadResultsTab, setBulkUploadCompletedSubTab, setBulkUploadSortConfig, clearBulkUpload, searchTransactionsForManualMatch, searchTransactionsForManualMatchSuccess, searchTransactionsForManualMatchFailure, clearManualSearchResults, acknowledgeBulkUploadConfirmMatchComplete, fetchCompletedTransactions, fetchCompletedTransactionsSuccess, fetchCompletedTransactionsFailure, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, excludeAccountFromReconciliation, includeAccountInReconciliation, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateNodeCollapseState, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
428
428
  export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, toTransactionsSortKey, };
429
429
  export { TOP_EX_TIME_PERIODS };
430
430
  export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, };
@@ -603,6 +603,13 @@ export { fetchCompanyTaskManagerView, getCompanyTaskManagerView, createTaskFromT
603
603
  export { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, };
604
604
  export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, getExpressPayView, };
605
605
  export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryVideoViewed, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
606
+ // ── AI Accountant Entity ──
607
+ export { toAiAccountantEnrollmentStatus, toAiAccountantJobStatus, toAiAccountantOperationType, } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
608
+ export { toAiAccountantCustomer, toAiAccountantEnrollment, toAiAccountantJob, } from './entity/aiAccountantCustomer/aiAccountantCustomerPayload';
609
+ export { clearAllAiAccountantCustomers, updateAiAccountantCustomers, updateAiAccountantCustomer, updateAiAccountantJobs, } from './entity/aiAccountantCustomer/aiAccountantCustomerReducer';
610
+ export { getAiAccountantCustomers, getAiAccountantJobsByTenantId, } from './entity/aiAccountantCustomer/aiAccountantCustomerSelector';
611
+ export { cancelAiAccountantOnboarding, clearAiAccountantView, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, updateAiAccountantUIState, } from './view/aiAccountantView/aiAccountantViewReducer';
612
+ export { getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
606
613
  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';
607
614
  export { getAiCfoView, getSuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewSelector';
608
615
  export { setNewSession, setSessions, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, clearAiCfo, toAiCfoVisualization, } from './entity/aiCfo/aiCfoReducer';
@@ -67,6 +67,8 @@ import accountMapping, { initialState as initialAccountMappingState, } from './v
67
67
  import addressView, { initialState as initialAddressViewState, } from './view/addressView/addressViewReducer';
68
68
  import aggregatedReport, { initialState as initialAggregatedReportViewState, } from './view/aiAgentPerformance/aggregatedReportViewReducer';
69
69
  import aiCfoView, { initialAiCfoViewState, } from './view/aiCfoView/aiCfoViewReducer';
70
+ import aiAccountantCustomer, { initialAiAccountantCustomerState, } from './entity/aiAccountantCustomer/aiAccountantCustomerReducer';
71
+ import aiAccountantView, { initialAiAccountantViewState, } from './view/aiAccountantView/aiAccountantViewReducer';
70
72
  import apAgingDetail, { initialState as initialApAgingDetailState, } from './view/apAgingView/apAgingDetail/apAgingDetailReducer';
71
73
  import apAging, { initialState as initialApAgingState, } from './view/apAgingView/apAgingReport/apAgingReducer';
72
74
  import arAgingDetail, { initialState as initialArAgingDetailState, } from './view/arAgingView/arAgingDetail/arAgingDetailReducer';
@@ -220,6 +222,7 @@ const initialEntitiesState = {
220
222
  accountReconState: initialAccountReconState,
221
223
  accountState: initialAccountState,
222
224
  addressState: initialAddressState,
225
+ aiAccountantCustomerState: initialAiAccountantCustomerState,
223
226
  aiCfoState: initialAiCfoState,
224
227
  approvalRuleState: initialApprovalRuleState,
225
228
  bankAccountState: initialBankAccountState,
@@ -286,6 +289,7 @@ const initialViewsState = {
286
289
  accountMappingState: initialAccountMappingState,
287
290
  addressViewState: initialAddressViewState,
288
291
  aggregatedReportViewState: initialAggregatedReportViewState,
292
+ aiAccountantViewState: initialAiAccountantViewState,
289
293
  aiCfoViewState: initialAiCfoViewState,
290
294
  apAgingDetailState: initialApAgingDetailState,
291
295
  apAgingState: initialApAgingState,
@@ -444,6 +448,7 @@ const entityReducers = {
444
448
  accountingSummaryState: accountingSummary,
445
449
  accountState: account,
446
450
  addressState: address,
451
+ aiAccountantCustomerState: aiAccountantCustomer,
447
452
  aiCfoState: aiCfo,
448
453
  approvalRuleState: approvalRule,
449
454
  bankAccountState: bankAccount,
@@ -511,6 +516,7 @@ const viewReducers = {
511
516
  accountMappingState: accountMapping,
512
517
  addressViewState: addressView,
513
518
  aggregatedReportViewState: aggregatedReport,
519
+ aiAccountantViewState: aiAccountantView,
514
520
  aiCfoViewState: aiCfoView,
515
521
  apAgingDetailState: apAgingDetail,
516
522
  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);