@zeniai/client-epic-state 4.20.3-betaSS12 → 4.20.3-betaSS13

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 (411) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
  2. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
  3. package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
  4. package/lib/commonStateTypes/animations.d.ts +1 -1
  5. package/lib/commonStateTypes/animations.js +4 -0
  6. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
  7. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
  8. package/lib/commonStateTypes/common.d.ts +1 -1
  9. package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
  10. package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
  11. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  12. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  13. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  14. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  15. package/lib/entity/account/accountPayload.d.ts +2 -0
  16. package/lib/entity/account/accountReducer.d.ts +5 -2
  17. package/lib/entity/account/accountReducer.js +13 -5
  18. package/lib/entity/account/accountSelector.d.ts +7 -0
  19. package/lib/entity/account/accountSelector.js +4 -2
  20. package/lib/entity/account/accountState.d.ts +3 -1
  21. package/lib/entity/account/accountState.js +4 -1
  22. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
  23. package/lib/entity/account/subAccountSelector.d.ts +2 -0
  24. package/lib/entity/account/subAccountSelector.js +2 -0
  25. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
  26. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  27. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
  28. package/lib/entity/accountRecon/accountReconPayload.js +4 -2
  29. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +52 -0
  30. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +70 -0
  31. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
  32. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
  33. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
  34. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
  35. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
  36. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
  37. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  38. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
  39. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  40. package/lib/entity/class/classReducer.d.ts +4 -4
  41. package/lib/entity/class/classState.d.ts +1 -1
  42. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  43. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  44. package/lib/entity/forecast/forecastState.d.ts +1 -1
  45. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
  46. package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  47. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
  48. package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  49. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
  50. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  51. package/lib/entity/project/projectPayload.d.ts +13 -0
  52. package/lib/entity/project/projectPayload.js +30 -0
  53. package/lib/entity/project/projectReducer.d.ts +10 -0
  54. package/lib/entity/project/projectReducer.js +31 -0
  55. package/lib/entity/project/projectSelector.d.ts +5 -0
  56. package/lib/entity/project/projectSelector.js +12 -0
  57. package/lib/entity/project/projectState.d.ts +13 -0
  58. package/lib/entity/project/projectState.js +2 -0
  59. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  60. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  61. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  62. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +13 -0
  63. package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
  64. package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
  65. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
  66. package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +11 -0
  67. package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +15 -0
  68. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
  69. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +64 -0
  70. package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
  71. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +57 -0
  72. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
  73. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
  74. package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
  75. package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
  76. package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
  77. package/lib/entity/snackbar/snackbarTypes.js +10 -0
  78. package/lib/entity/tenant/clearAllEpic.d.ts +7 -2
  79. package/lib/entity/tenant/clearAllEpic.js +10 -0
  80. package/lib/entity/tenant/tenantPayload.d.ts +2 -0
  81. package/lib/entity/tenant/tenantReducer.d.ts +5 -2
  82. package/lib/entity/tenant/tenantReducer.js +10 -2
  83. package/lib/entity/tenant/tenantSelector.d.ts +2 -0
  84. package/lib/entity/tenant/tenantSelector.js +17 -1
  85. package/lib/entity/tenant/tenantState.d.ts +2 -0
  86. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
  87. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  88. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +11 -0
  89. package/lib/entity/transaction/payloadTypes/transactionPayload.js +114 -1
  90. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
  91. package/lib/entity/transaction/stateTypes/transaction.d.ts +11 -0
  92. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  93. package/lib/entity/userRole/userRoleType.d.ts +2 -2
  94. package/lib/epic.d.ts +22 -2
  95. package/lib/epic.js +22 -2
  96. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
  97. package/lib/esm/commonStateTypes/animations.js +4 -0
  98. package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
  99. package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
  100. package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
  101. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  102. package/lib/esm/entity/account/accountReducer.js +12 -4
  103. package/lib/esm/entity/account/accountSelector.js +4 -2
  104. package/lib/esm/entity/account/accountState.js +4 -1
  105. package/lib/esm/entity/account/subAccountSelector.js +2 -0
  106. package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
  107. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +64 -0
  108. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
  109. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
  110. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
  111. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  112. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  113. package/lib/esm/entity/project/projectPayload.js +26 -0
  114. package/lib/esm/entity/project/projectReducer.js +27 -0
  115. package/lib/esm/entity/project/projectSelector.js +8 -0
  116. package/lib/esm/entity/project/projectState.js +1 -0
  117. package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
  118. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
  119. package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +11 -0
  120. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +60 -0
  121. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +50 -0
  122. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
  123. package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
  124. package/lib/esm/entity/snackbar/snackbarTypes.js +10 -0
  125. package/lib/esm/entity/tenant/clearAllEpic.js +10 -0
  126. package/lib/esm/entity/tenant/tenantReducer.js +9 -1
  127. package/lib/esm/entity/tenant/tenantSelector.js +14 -0
  128. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  129. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +114 -1
  130. package/lib/esm/epic.js +22 -2
  131. package/lib/esm/index.js +32 -19
  132. package/lib/esm/reducer.js +20 -2
  133. package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
  134. package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +152 -0
  135. package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +77 -0
  136. package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
  137. package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
  138. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
  139. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
  140. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +76 -0
  141. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  142. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  143. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  144. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  145. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  146. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  147. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +19 -1
  148. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  149. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +17 -0
  150. package/lib/esm/view/companyView/companyViewReducer.js +26 -1
  151. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
  152. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  153. package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +1 -39
  154. package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -1
  155. package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -6
  156. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +63 -0
  157. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  158. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +65 -0
  159. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  160. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +33 -0
  161. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -3
  162. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +6 -4
  163. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
  164. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +12 -0
  165. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +98 -0
  166. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  167. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +21 -5
  168. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  169. package/lib/esm/view/expenseAutomationView/helpers/bulkUploadTiming.js +16 -0
  170. package/lib/esm/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +13 -0
  171. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  172. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  173. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
  174. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -1
  175. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +29 -6
  176. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
  177. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
  178. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  179. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  180. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  181. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  182. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -5
  183. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +24 -1
  184. package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
  185. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  186. package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
  187. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
  188. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
  189. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
  190. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +65 -0
  191. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
  192. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
  193. package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  194. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
  195. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
  196. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
  197. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
  198. package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +100 -0
  199. package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
  200. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
  201. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
  202. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
  203. package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
  204. package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
  205. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  206. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  207. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  208. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  209. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  210. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  211. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  212. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  213. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  214. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  215. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  216. package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  217. package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  218. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  219. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  220. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  221. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
  222. package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
  223. package/lib/index.d.ts +49 -26
  224. package/lib/index.js +107 -39
  225. package/lib/reducer.d.ts +20 -2
  226. package/lib/reducer.js +20 -2
  227. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +33 -0
  228. package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
  229. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
  230. package/lib/view/aiAccountantView/aiAccountantViewReducer.js +156 -0
  231. package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +16 -0
  232. package/lib/view/aiAccountantView/aiAccountantViewSelector.js +83 -0
  233. package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
  234. package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
  235. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
  236. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
  237. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
  238. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
  239. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
  240. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
  241. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
  242. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +80 -0
  243. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  244. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  245. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  246. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  247. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  248. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
  249. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  250. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  251. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  252. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  253. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
  254. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
  255. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  256. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  257. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  258. package/lib/view/classList/fetchClassListEpic.js +8 -1
  259. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  260. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  261. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  262. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  263. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  264. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +20 -2
  265. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +4 -1
  266. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  267. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +9 -1
  268. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +7 -0
  269. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +21 -0
  270. package/lib/view/companyView/companyViewReducer.d.ts +6 -1
  271. package/lib/view/companyView/companyViewReducer.js +28 -2
  272. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
  273. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
  274. package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
  275. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  276. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  277. package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -36
  278. package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +2 -2
  279. package/lib/view/creditAgentView/creditAgentViewReducer.js +2 -40
  280. package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -1
  281. package/lib/view/creditAgentView/creditAgentViewSelector.js +1 -2
  282. package/lib/view/creditAgentView/creditAgentViewState.d.ts +0 -31
  283. package/lib/view/creditAgentView/creditAgentViewState.js +0 -6
  284. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  285. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +9 -0
  286. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +67 -0
  287. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  288. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +10 -0
  289. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +69 -0
  290. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  291. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts +13 -0
  292. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +37 -0
  293. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  294. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +5 -3
  295. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
  296. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +10 -0
  297. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +16 -0
  298. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.d.ts +18 -0
  299. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +102 -0
  300. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  301. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
  302. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +20 -4
  303. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  304. package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.d.ts +16 -0
  305. package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.js +19 -0
  306. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.d.ts +7 -0
  307. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +16 -0
  308. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  309. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -2
  310. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  311. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  312. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
  313. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
  314. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
  315. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  316. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +22 -2
  317. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +18 -2
  318. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +30 -7
  319. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
  320. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
  321. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  322. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -0
  323. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
  324. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  325. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  326. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  327. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  328. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  329. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -3
  330. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -0
  331. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +27 -0
  332. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +5 -1
  333. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
  334. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  335. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  336. package/lib/view/financeStatement/financeStatementSelector.js +12 -1
  337. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  338. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  339. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
  340. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
  341. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
  342. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
  343. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
  344. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
  345. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
  346. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
  347. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
  348. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +69 -0
  349. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
  350. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
  351. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
  352. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
  353. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  354. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
  355. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  356. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  357. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  358. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  359. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
  360. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
  361. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
  362. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
  363. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
  364. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
  365. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
  366. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
  367. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
  368. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +106 -0
  369. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
  370. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
  371. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
  372. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
  373. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
  374. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
  375. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
  376. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
  377. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
  378. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
  379. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
  380. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  381. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  382. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
  383. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  384. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  385. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  386. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  387. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  388. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
  389. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  390. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  391. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  392. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  393. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  394. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  395. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  396. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
  397. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  398. package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  399. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
  400. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  401. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  402. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  403. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  404. package/lib/view/topEx/topExSelector.d.ts +1 -1
  405. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  406. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  407. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
  408. package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
  409. package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
  410. package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
  411. package/package.json +1 -1
package/lib/reducer.d.ts CHANGED
@@ -13,6 +13,7 @@ import { ChargeCardState } from './entity/chargeCard/chargeCard';
13
13
  import { ChargeCardRepaymentState } from './entity/chargeCardRepayment/chargeCardRepayment';
14
14
  import { ChargeCardTransactionState } from './entity/chargeCardTransaction/chargeCardTransaction';
15
15
  import { ClassState } from './entity/class/classState';
16
+ import { ProjectState } from './entity/project/projectReducer';
16
17
  import { CompanyState } from './entity/company/companyState';
17
18
  import { CompanyHealthState } from './entity/companyHealthMetric/companyHealthMetricState';
18
19
  import { ConnectedAccountState } from './entity/connectedAccount/connectedAccount';
@@ -40,6 +41,7 @@ import { AccountingSummaryState } from './entity/portfolio/accountingSummary/acc
40
41
  import { ReimbursementState } from './entity/reimbursement/reimbursementState';
41
42
  import { SectionAccountsViewState } from './entity/sectionAccountsView/sectionAccountsViewState';
42
43
  import { SectionClassesViewStateV2 } from './entity/sectionClassesViewV2/sectionClassesViewState';
44
+ import { SectionProjectViewState } from './entity/sectionProjectView/sectionProjectViewState';
43
45
  import { SnackbarState } from './entity/snackbar/snackbarState';
44
46
  import { SubscriptionState } from './entity/subscription/subscription/subscriptionState';
45
47
  import { SubscriptionAddOnState } from './entity/subscription/subscriptionAddOn/subscriptionAddOnState';
@@ -67,6 +69,8 @@ import { AddressViewState } from './view/addressView/addressViewState';
67
69
  import { AggregatedReportViewState } from './view/aiAgentPerformance/aggregatedReportViewReducer';
68
70
  import { AiCfoViewState } from './view/aiCfoView/aiCfoViewState';
69
71
  import { CreditAgentViewState } from './view/creditAgentView/creditAgentViewState';
72
+ import { AiAccountantCustomerState } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
73
+ import { AiAccountantViewState } from './view/aiAccountantView/aiAccountantViewState';
70
74
  import { ApAgingDetailState } from './view/apAgingView/apAgingDetail/apAgingDetailState';
71
75
  import { ApAgingState } from './view/apAgingView/apAgingReport/apAgingState';
72
76
  import { ArAgingDetailState } from './view/arAgingView/arAgingDetail/arAgingDetailState';
@@ -121,6 +125,7 @@ import { OwnerListState } from './view/ownerList/ownerListState';
121
125
  import { PeopleState } from './view/people/peopleState';
122
126
  import { ProfitAndLossWithForecastState } from './view/profitAndLoss/profitAndLossState';
123
127
  import { ProfitAndLossClassesViewState } from './view/profitAndLossClassesView/profitAndLossClassesViewState';
128
+ import { ProfitAndLossProjectViewState } from './view/profitAndLossProjectView/profitAndLossProjectViewState';
124
129
  import { EntityRecommendationState } from './view/recommendation/recommendationState';
125
130
  import { ReferralViewState } from './view/referralView/referralState';
126
131
  import { ReimbursementCardState } from './view/reimbursementCard/reimbursementCardState';
@@ -133,6 +138,7 @@ import { ScheduleAccruedDetailViewState } from './view/scheduleView/scheduleAccr
133
138
  import { ScheduleDetailViewState } from './view/scheduleView/scheduleDetailView/scheduleDetailState';
134
139
  import { ScheduleListViewState } from './view/scheduleView/scheduleListView/scheduleListState';
135
140
  import { SettingsViewState } from './view/settingsView/settingsViewState';
141
+ import { AutoTransferRulesState } from './view/spendManagement/autotransferRules/autoTransferRulesState';
136
142
  import { BillDetailViewState } from './view/spendManagement/billPay/billDetailView/billDetailViewState';
137
143
  import { BillListState } from './view/spendManagement/billPay/billList/billListState';
138
144
  import { BillPayConfigState } from './view/spendManagement/billPay/billPayConfig/billPayConfigState';
@@ -217,6 +223,7 @@ type EntitiesState = {
217
223
  accountReconState: AccountReconState;
218
224
  accountState: AccountState;
219
225
  addressState: AddressState;
226
+ aiAccountantCustomerState: AiAccountantCustomerState;
220
227
  aiCfoState: AiCfoState;
221
228
  approvalRuleState: ApprovalRuleState;
222
229
  bankAccountState: BankAccountState;
@@ -249,11 +256,13 @@ type EntitiesState = {
249
256
  onboardingCustomerState: OnboardingCustomerState;
250
257
  paymentAccountState: PaymentAccountState;
251
258
  paymentInstrumentState: PaymentInstrumentState;
259
+ projectState: ProjectState;
252
260
  recurringBillState: RecurringBillState;
253
261
  reimbursementConfigState: ReimbursementConfigState;
254
262
  reimbursementState: ReimbursementState;
255
263
  sectionAccountsViewState: SectionAccountsViewState;
256
264
  sectionClassesViewStateV2: SectionClassesViewStateV2;
265
+ sectionProjectViewState: SectionProjectViewState;
257
266
  snackbarState: SnackbarState;
258
267
  subscriptionAddOnState: SubscriptionAddOnState;
259
268
  subscriptionCouponState: SubscriptionCouponState;
@@ -282,13 +291,16 @@ type ViewsState = {
282
291
  accountMappingState: AccountMappingState;
283
292
  addressViewState: AddressViewState;
284
293
  aggregatedReportViewState: AggregatedReportViewState;
294
+ aiAccountantViewState: AiAccountantViewState;
285
295
  aiCfoViewState: AiCfoViewState;
296
+ creditAgentViewState: CreditAgentViewState;
286
297
  apAgingDetailState: ApAgingDetailState;
287
298
  apAgingState: ApAgingState;
288
299
  arAgingDetailState: ArAgingDetailState;
289
300
  arAgingState: ArAgingState;
290
301
  auditReportViewState: AuditReportViewState;
291
302
  authenticationViewState: AuthenticationViewState;
303
+ autotransferRulesState: AutoTransferRulesState;
292
304
  balanceSheetState: BalanceSheetState;
293
305
  bankAccountViewState: BankAccountViewState;
294
306
  billDetailViewState: BillDetailViewState;
@@ -324,7 +336,6 @@ type ViewsState = {
324
336
  companyTaskManagerViewState: CompanyTaskManagerViewState;
325
337
  companyViewState: CompanyViewState;
326
338
  countryListState: CountryListState;
327
- creditAgentViewState: CreditAgentViewState;
328
339
  dashboardLayoutState: DashboardLayoutState;
329
340
  dashboardState: DashboardState;
330
341
  depositAccountListState: DepositAccountListState;
@@ -367,6 +378,7 @@ type ViewsState = {
367
378
  plaidAccountViewState: PlaidAccountViewState;
368
379
  previousBillsState: PreviousBillsState;
369
380
  profitAndLossClassesViewState: ProfitAndLossClassesViewState;
381
+ profitAndLossProjectViewState: ProfitAndLossProjectViewState;
370
382
  profitAndLossState: ProfitAndLossWithForecastState;
371
383
  realTimeApprovalState: RealTimeApprovalState;
372
384
  referralViewState: ReferralViewState;
@@ -436,13 +448,16 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
436
448
  accountMappingState: AccountMappingState;
437
449
  addressViewState: AddressViewState;
438
450
  aggregatedReportViewState: AggregatedReportViewState;
451
+ aiAccountantViewState: AiAccountantViewState;
439
452
  aiCfoViewState: AiCfoViewState;
453
+ creditAgentViewState: CreditAgentViewState;
440
454
  apAgingDetailState: ApAgingDetailState;
441
455
  apAgingState: ApAgingState;
442
456
  arAgingDetailState: ArAgingDetailState;
443
457
  arAgingState: ArAgingState;
444
458
  auditReportViewState: AuditReportViewState;
445
459
  authenticationViewState: AuthenticationViewState;
460
+ autotransferRulesState: AutoTransferRulesState;
446
461
  balanceSheetState: BalanceSheetState;
447
462
  bankAccountViewState: BankAccountViewState;
448
463
  billDetailViewState: BillDetailViewState;
@@ -476,7 +491,6 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
476
491
  companyMonthEndReportViewState: CompanyMonthEndReportViewState;
477
492
  companyTaskManagerViewState: CompanyTaskManagerViewState;
478
493
  companyViewState: CompanyViewState;
479
- creditAgentViewState: CreditAgentViewState;
480
494
  countryListState: CountryListState;
481
495
  dashboardState: DashboardState;
482
496
  dashboardLayoutState: DashboardLayoutState;
@@ -521,6 +535,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
521
535
  plaidAccountViewState: PlaidAccountViewState;
522
536
  previousBillsState: PreviousBillsState;
523
537
  profitAndLossClassesViewState: ProfitAndLossClassesViewState;
538
+ profitAndLossProjectViewState: ProfitAndLossProjectViewState;
524
539
  profitAndLossState: ProfitAndLossWithForecastState;
525
540
  realTimeApprovalState: RealTimeApprovalState;
526
541
  referralViewState: ReferralViewState;
@@ -587,6 +602,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
587
602
  accountingSummaryState: AccountingSummaryState;
588
603
  accountState: AccountState;
589
604
  addressState: AddressState;
605
+ aiAccountantCustomerState: AiAccountantCustomerState;
590
606
  aiCfoState: AiCfoState;
591
607
  approvalRuleState: ApprovalRuleState;
592
608
  bankAccountState: BankAccountState;
@@ -597,6 +613,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
597
613
  chargeCardRepaymentState: ChargeCardRepaymentState;
598
614
  chargeCardTransactionState: ChargeCardTransactionState;
599
615
  classState: ClassState;
616
+ projectState: ProjectState;
600
617
  companyHealthMetricState: CompanyHealthState;
601
618
  companyState: CompanyState;
602
619
  connectedAccountState: ConnectedAccountState;
@@ -623,6 +640,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
623
640
  reimbursementState: ReimbursementState;
624
641
  sectionAccountsViewState: SectionAccountsViewState;
625
642
  sectionClassesViewStateV2: SectionClassesViewStateV2;
643
+ sectionProjectViewState: SectionProjectViewState;
626
644
  snackbarState: SnackbarState;
627
645
  subscriptionAddOnState: SubscriptionAddOnState;
628
646
  subscriptionCouponState: SubscriptionCouponState;
package/lib/reducer.js CHANGED
@@ -53,6 +53,7 @@ const chargeCardReducer_1 = __importStar(require("./entity/chargeCard/chargeCard
53
53
  const chargeCardRepaymentReducer_1 = __importStar(require("./entity/chargeCardRepayment/chargeCardRepaymentReducer"));
54
54
  const chargeCardTransactionReducer_1 = __importStar(require("./entity/chargeCardTransaction/chargeCardTransactionReducer"));
55
55
  const classReducer_1 = __importStar(require("./entity/class/classReducer"));
56
+ const projectReducer_1 = __importStar(require("./entity/project/projectReducer"));
56
57
  const companyReducer_1 = __importStar(require("./entity/company/companyReducer"));
57
58
  const companyHealthMetricReducer_1 = __importStar(require("./entity/companyHealthMetric/companyHealthMetricReducer"));
58
59
  const connectedAccountReducer_1 = __importStar(require("./entity/connectedAccount/connectedAccountReducer"));
@@ -80,6 +81,7 @@ const accountingSummaryReducer_1 = __importStar(require("./entity/portfolio/acco
80
81
  const reimbursementReducer_1 = __importStar(require("./entity/reimbursement/reimbursementReducer"));
81
82
  const sectionAccountsViewReducer_1 = __importStar(require("./entity/sectionAccountsView/sectionAccountsViewReducer"));
82
83
  const sectionClassesViewReducer_1 = __importStar(require("./entity/sectionClassesViewV2/sectionClassesViewReducer"));
84
+ const sectionProjectViewReducer_1 = __importStar(require("./entity/sectionProjectView/sectionProjectViewReducer"));
83
85
  const snackbarReducer_1 = __importStar(require("./entity/snackbar/snackbarReducer"));
84
86
  const subscriptionReducer_1 = __importStar(require("./entity/subscription/subscription/subscriptionReducer"));
85
87
  const subscriptionAddOnReducer_1 = __importStar(require("./entity/subscription/subscriptionAddOn/subscriptionAddOnReducer"));
@@ -107,6 +109,8 @@ const addressViewReducer_1 = __importStar(require("./view/addressView/addressVie
107
109
  const aggregatedReportViewReducer_1 = __importStar(require("./view/aiAgentPerformance/aggregatedReportViewReducer"));
108
110
  const aiCfoViewReducer_1 = __importStar(require("./view/aiCfoView/aiCfoViewReducer"));
109
111
  const creditAgentViewReducer_1 = __importStar(require("./view/creditAgentView/creditAgentViewReducer"));
112
+ const aiAccountantCustomerReducer_1 = __importStar(require("./entity/aiAccountantCustomer/aiAccountantCustomerReducer"));
113
+ const aiAccountantViewReducer_1 = __importStar(require("./view/aiAccountantView/aiAccountantViewReducer"));
110
114
  const apAgingDetailReducer_1 = __importStar(require("./view/apAgingView/apAgingDetail/apAgingDetailReducer"));
111
115
  const apAgingReducer_1 = __importStar(require("./view/apAgingView/apAgingReport/apAgingReducer"));
112
116
  const arAgingDetailReducer_1 = __importStar(require("./view/arAgingView/arAgingDetail/arAgingDetailReducer"));
@@ -162,6 +166,7 @@ const ownerListReducer_1 = __importStar(require("./view/ownerList/ownerListReduc
162
166
  const peopleReducer_1 = __importStar(require("./view/people/peopleReducer"));
163
167
  const profitAndLossReducer_1 = __importStar(require("./view/profitAndLoss/profitAndLossReducer"));
164
168
  const profitAndLossClassesViewReducer_1 = __importStar(require("./view/profitAndLossClassesView/profitAndLossClassesViewReducer"));
169
+ const profitAndLossProjectViewReducer_1 = __importStar(require("./view/profitAndLossProjectView/profitAndLossProjectViewReducer"));
165
170
  const recommendationReducer_1 = __importStar(require("./view/recommendation/recommendationReducer"));
166
171
  const referralReducer_1 = __importStar(require("./view/referralView/referralReducer"));
167
172
  const reimbursementCardReducer_1 = __importStar(require("./view/reimbursementCard/reimbursementCardReducer"));
@@ -174,6 +179,7 @@ const scheduleAccruedDetailReducer_1 = __importStar(require("./view/scheduleView
174
179
  const scheduleDetailReducer_1 = __importStar(require("./view/scheduleView/scheduleDetailView/scheduleDetailReducer"));
175
180
  const scheduleListReducer_1 = __importStar(require("./view/scheduleView/scheduleListView/scheduleListReducer"));
176
181
  const settingsViewReducer_1 = __importStar(require("./view/settingsView/settingsViewReducer"));
182
+ const autoTransferRulesReducer_1 = __importStar(require("./view/spendManagement/autotransferRules/autoTransferRulesReducer"));
177
183
  const billDetailViewReducer_1 = __importStar(require("./view/spendManagement/billPay/billDetailView/billDetailViewReducer"));
178
184
  const billListReducer_1 = __importStar(require("./view/spendManagement/billPay/billList/billListReducer"));
179
185
  const billPayConfigReducer_1 = __importStar(require("./view/spendManagement/billPay/billPayConfig/billPayConfigReducer"));
@@ -259,6 +265,7 @@ const initialEntitiesState = {
259
265
  accountReconState: accountReconReducer_1.initialState,
260
266
  accountState: accountReducer_1.initialState,
261
267
  addressState: addressReducer_1.initialState,
268
+ aiAccountantCustomerState: aiAccountantCustomerReducer_1.initialAiAccountantCustomerState,
262
269
  aiCfoState: aiCfoReducer_1.initialAiCfoState,
263
270
  approvalRuleState: approvalRuleReducer_1.initialState,
264
271
  bankAccountState: bankAccountReducer_1.initialState,
@@ -268,6 +275,7 @@ const initialEntitiesState = {
268
275
  chargeCardRepaymentState: chargeCardRepaymentReducer_1.initialState,
269
276
  chargeCardTransactionState: chargeCardTransactionReducer_1.initialState,
270
277
  classState: classReducer_1.initialState,
278
+ projectState: projectReducer_1.initialState,
271
279
  companyHealthMetricState: companyHealthMetricReducer_1.initialState,
272
280
  companyState: companyReducer_1.initialState,
273
281
  connectedAccountState: connectedAccountReducer_1.initialState,
@@ -296,6 +304,7 @@ const initialEntitiesState = {
296
304
  reimbursementState: reimbursementReducer_1.initialState,
297
305
  sectionAccountsViewState: sectionAccountsViewReducer_1.initialState,
298
306
  sectionClassesViewStateV2: sectionClassesViewReducer_1.initialState,
307
+ sectionProjectViewState: sectionProjectViewReducer_1.initialState,
299
308
  snackbarState: snackbarReducer_1.initialSnackbarState,
300
309
  subscriptionAddOnState: subscriptionAddOnReducer_1.initialState,
301
310
  subscriptionCouponState: subscriptionCouponReducer_1.initialState,
@@ -325,13 +334,16 @@ const initialViewsState = {
325
334
  accountMappingState: accountMappingReducer_1.initialState,
326
335
  addressViewState: addressViewReducer_1.initialState,
327
336
  aggregatedReportViewState: aggregatedReportViewReducer_1.initialState,
337
+ aiAccountantViewState: aiAccountantViewReducer_1.initialAiAccountantViewState,
328
338
  aiCfoViewState: aiCfoViewReducer_1.initialAiCfoViewState,
339
+ creditAgentViewState: creditAgentViewReducer_1.initialState,
329
340
  apAgingDetailState: apAgingDetailReducer_1.initialState,
330
341
  apAgingState: apAgingReducer_1.initialState,
331
342
  arAgingDetailState: arAgingDetailReducer_1.initialState,
332
343
  arAgingState: arAgingReducer_1.initialState,
333
344
  auditReportViewState: auditReportViewReducer_1.initialState,
334
345
  authenticationViewState: authenticationViewReducer_1.initialState,
346
+ autotransferRulesState: autoTransferRulesReducer_1.initialState,
335
347
  balanceSheetState: balanceSheetReducer_1.initialState,
336
348
  bankAccountViewState: bankAccountViewReducer_1.initialState,
337
349
  billDetailViewState: billDetailViewReducer_1.initialState,
@@ -366,7 +378,6 @@ const initialViewsState = {
366
378
  companyMonthEndReportViewState: companyMonthEndReportViewReducer_1.initialState,
367
379
  companyTaskManagerViewState: companyTaskManagerViewReducer_1.initialState,
368
380
  companyViewState: companyViewReducer_1.initialState,
369
- creditAgentViewState: creditAgentViewReducer_1.initialState,
370
381
  countryListState: countryListReducer_1.initialState,
371
382
  dashboardLayoutState: dashboardLayoutReducer_1.initialState,
372
383
  dashboardState: dashboardReducer_1.initialState,
@@ -410,6 +421,7 @@ const initialViewsState = {
410
421
  plaidAccountViewState: plaidAccountViewReducer_1.initialState,
411
422
  previousBillsState: previousBillsReducer_1.initialState,
412
423
  profitAndLossClassesViewState: profitAndLossClassesViewReducer_1.initialState,
424
+ profitAndLossProjectViewState: profitAndLossProjectViewReducer_1.initialState,
413
425
  profitAndLossState: profitAndLossReducer_1.initialState,
414
426
  realTimeApprovalState: realTimeApprovalReducer_1.initialState,
415
427
  referralViewState: referralReducer_1.initialState,
@@ -483,6 +495,7 @@ const entityReducers = {
483
495
  accountingSummaryState: accountingSummaryReducer_1.default,
484
496
  accountState: accountReducer_1.default,
485
497
  addressState: addressReducer_1.default,
498
+ aiAccountantCustomerState: aiAccountantCustomerReducer_1.default,
486
499
  aiCfoState: aiCfoReducer_1.default,
487
500
  approvalRuleState: approvalRuleReducer_1.default,
488
501
  bankAccountState: bankAccountReducer_1.default,
@@ -493,6 +506,7 @@ const entityReducers = {
493
506
  chargeCardRepaymentState: chargeCardRepaymentReducer_1.default,
494
507
  chargeCardTransactionState: chargeCardTransactionReducer_1.default,
495
508
  classState: classReducer_1.default,
509
+ projectState: projectReducer_1.default,
496
510
  companyHealthMetricState: companyHealthMetricReducer_1.default,
497
511
  companyState: companyReducer_1.default,
498
512
  connectedAccountState: connectedAccountReducer_1.default,
@@ -521,6 +535,7 @@ const entityReducers = {
521
535
  reimbursementState: reimbursementReducer_1.default,
522
536
  sectionAccountsViewState: sectionAccountsViewReducer_1.default,
523
537
  sectionClassesViewStateV2: sectionClassesViewReducer_1.default,
538
+ sectionProjectViewState: sectionProjectViewReducer_1.default,
524
539
  snackbarState: snackbarReducer_1.default,
525
540
  subscriptionAddOnState: subscriptionAddOnReducer_1.default,
526
541
  subscriptionCouponState: subscriptionCouponReducer_1.default,
@@ -550,13 +565,16 @@ const viewReducers = {
550
565
  accountMappingState: accountMappingReducer_1.default,
551
566
  addressViewState: addressViewReducer_1.default,
552
567
  aggregatedReportViewState: aggregatedReportViewReducer_1.default,
568
+ aiAccountantViewState: aiAccountantViewReducer_1.default,
553
569
  aiCfoViewState: aiCfoViewReducer_1.default,
570
+ creditAgentViewState: creditAgentViewReducer_1.default,
554
571
  apAgingDetailState: apAgingDetailReducer_1.default,
555
572
  apAgingState: apAgingReducer_1.default,
556
573
  arAgingDetailState: arAgingDetailReducer_1.default,
557
574
  arAgingState: arAgingReducer_1.default,
558
575
  auditReportViewState: auditReportViewReducer_1.default,
559
576
  authenticationViewState: authenticationViewReducer_1.default,
577
+ autotransferRulesState: autoTransferRulesReducer_1.default,
560
578
  balanceSheetState: balanceSheetReducer_1.default,
561
579
  bankAccountViewState: bankAccountViewReducer_1.default,
562
580
  billDetailViewState: billDetailViewReducer_1.default,
@@ -590,7 +608,6 @@ const viewReducers = {
590
608
  companyMonthEndReportViewState: companyMonthEndReportViewReducer_1.default,
591
609
  companyTaskManagerViewState: companyTaskManagerViewReducer_1.default,
592
610
  companyViewState: companyViewReducer_1.default,
593
- creditAgentViewState: creditAgentViewReducer_1.default,
594
611
  countryListState: countryListReducer_1.default,
595
612
  dashboardState: dashboardReducer_1.default,
596
613
  dashboardLayoutState: dashboardLayoutReducer_1.default,
@@ -635,6 +652,7 @@ const viewReducers = {
635
652
  plaidAccountViewState: plaidAccountViewReducer_1.default,
636
653
  previousBillsState: previousBillsReducer_1.default,
637
654
  profitAndLossClassesViewState: profitAndLossClassesViewReducer_1.default,
655
+ profitAndLossProjectViewState: profitAndLossProjectViewReducer_1.default,
638
656
  profitAndLossState: profitAndLossReducer_1.default,
639
657
  realTimeApprovalState: realTimeApprovalReducer_1.default,
640
658
  referralViewState: referralReducer_1.default,
@@ -0,0 +1,33 @@
1
+ import { ZeniAPIResponse } from '../../responsePayload';
2
+ export { AiAccountantCustomerPayload, AiAccountantEnrollmentPayload, AiAccountantJobPayload, toAiAccountantCustomer, toAiAccountantEnrollment, toAiAccountantJob, } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
3
+ import type { AiAccountantCustomerPayload, AiAccountantJobPayload } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
4
+ import { UserPayload } from '../../entity/user/userPayload';
5
+ export interface AiAccountantCustomersResponseData {
6
+ customers: AiAccountantCustomerPayload[];
7
+ users: UserPayload[];
8
+ }
9
+ export interface AiAccountantJobsResponseData {
10
+ jobs: AiAccountantJobPayload[];
11
+ page_size: number;
12
+ users: UserPayload[];
13
+ next_page_token?: string | null;
14
+ }
15
+ export interface AiAccountantTriggerJobResponseData {
16
+ job_ids: string[];
17
+ queued_count: number;
18
+ /** Present on failures (e.g. "no valid customers for this operation"). */
19
+ error?: string;
20
+ skipped?: Array<{
21
+ reason: string;
22
+ tenant_id: string;
23
+ }>;
24
+ }
25
+ export interface AiAccountantCancelOnboardingResponseData {
26
+ cancelled_jobs: string[];
27
+ ok: boolean;
28
+ workflow_cancelled: boolean;
29
+ }
30
+ export type AiAccountantCustomersResponse = ZeniAPIResponse<AiAccountantCustomersResponseData>;
31
+ export type AiAccountantJobsResponse = ZeniAPIResponse<AiAccountantJobsResponseData>;
32
+ export type AiAccountantTriggerJobResponse = ZeniAPIResponse<AiAccountantTriggerJobResponseData>;
33
+ export type AiAccountantCancelOnboardingResponse = ZeniAPIResponse<AiAccountantCancelOnboardingResponseData>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = void 0;
4
+ // Re-export entity payload types and mapping functions.
5
+ var aiAccountantCustomerPayload_1 = require("../../entity/aiAccountantCustomer/aiAccountantCustomerPayload");
6
+ Object.defineProperty(exports, "toAiAccountantCustomer", { enumerable: true, get: function () { return aiAccountantCustomerPayload_1.toAiAccountantCustomer; } });
7
+ Object.defineProperty(exports, "toAiAccountantEnrollment", { enumerable: true, get: function () { return aiAccountantCustomerPayload_1.toAiAccountantEnrollment; } });
8
+ Object.defineProperty(exports, "toAiAccountantJob", { enumerable: true, get: function () { return aiAccountantCustomerPayload_1.toAiAccountantJob; } });
@@ -0,0 +1,29 @@
1
+ import { AiAccountantCustomerPayload } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
2
+ import { ID } from '../../commonStateTypes/common';
3
+ import { ZeniAPIStatus } from '../../responsePayload';
4
+ import { AiAccountantUIState, AiAccountantViewState } from './aiAccountantViewState';
5
+ export declare const initialAiAccountantViewState: AiAccountantViewState;
6
+ export declare const cancelAiAccountantOnboarding: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, tenantId: string], {
7
+ companyId: string;
8
+ tenantId: string;
9
+ }, "aiAccountantView/cancelAiAccountantOnboarding", never, never>, cancelAiAccountantOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, error: ZeniAPIStatus<Record<string, unknown>>], {
10
+ tenantId: string;
11
+ error: ZeniAPIStatus<Record<string, unknown>>;
12
+ }, "aiAccountantView/cancelAiAccountantOnboardingFailure", never, never>, cancelAiAccountantOnboardingSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string], {
13
+ tenantId: string;
14
+ }, "aiAccountantView/cancelAiAccountantOnboardingSuccess", never, never>, clearAiAccountantView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiAccountantView/clearAiAccountantView">, fetchAiAccountantCustomers: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiAccountantView/fetchAiAccountantCustomers">, fetchAiAccountantJobs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, fetchNextPage?: boolean | undefined], {
15
+ tenantId: string;
16
+ fetchNextPage: boolean;
17
+ }, "aiAccountantView/fetchAiAccountantJobs", never, never>, setSelectedTenantIdsForJobTrigger: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "aiAccountantView/setSelectedTenantIdsForJobTrigger">, triggerAiAccountantJob: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[operationType: "onboard" | "offboard" | "retrain" | "full_pipeline" | "cancel_onboarding", startDate: string, endDate: string], {
18
+ operationType: "onboard" | "offboard" | "retrain" | "full_pipeline" | "cancel_onboarding";
19
+ startDate: string;
20
+ endDate: string;
21
+ }, "aiAccountantView/triggerAiAccountantJob", never, never>, triggerAiAccountantJobFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiAccountantView/triggerAiAccountantJobFailure">, triggerAiAccountantJobSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiAccountantView/triggerAiAccountantJobSuccess">, updateAiAccountantCustomers: import("@reduxjs/toolkit").ActionCreatorWithPayload<AiAccountantCustomerPayload[], "aiAccountantView/updateAiAccountantCustomers">, updateAiAccountantCustomersFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiAccountantView/updateAiAccountantCustomersFailure">, updateAiAccountantJobs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, nextPageToken?: string | null | undefined], {
22
+ tenantId: string;
23
+ nextPageToken: string | null;
24
+ }, "aiAccountantView/updateAiAccountantJobs", never, never>, updateAiAccountantJobsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
25
+ error: ZeniAPIStatus;
26
+ tenantId: ID;
27
+ }, "aiAccountantView/updateAiAccountantJobsFailure">, updateAiAccountantUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<AiAccountantUIState>, "aiAccountantView/updateAiAccountantUIState">;
28
+ declare const _default: import("redux").Reducer<AiAccountantViewState>;
29
+ export default _default;
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.updateAiAccountantUIState = exports.updateAiAccountantJobsFailure = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomersFailure = exports.updateAiAccountantCustomers = exports.triggerAiAccountantJobSuccess = exports.triggerAiAccountantJobFailure = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView = exports.cancelAiAccountantOnboardingSuccess = exports.cancelAiAccountantOnboardingFailure = exports.cancelAiAccountantOnboarding = exports.initialAiAccountantViewState = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ exports.initialAiAccountantViewState = {
7
+ customersByTenantId: {},
8
+ customersFetchStatus: { fetchState: 'Not-Started' },
9
+ selectedTenantIdsForJobTrigger: [],
10
+ triggerJobStatus: { fetchState: 'Not-Started' },
11
+ uiState: {
12
+ filterText: '',
13
+ filters: {},
14
+ selectedCustomerTenantId: '',
15
+ sortKey: 'companyName',
16
+ sortOrder: 'ascending',
17
+ },
18
+ };
19
+ const aiAccountantView = (0, toolkit_1.createSlice)({
20
+ name: 'aiAccountantView',
21
+ initialState: exports.initialAiAccountantViewState,
22
+ reducers: {
23
+ // ── Customers ──
24
+ fetchAiAccountantCustomers(draft) {
25
+ draft.customersFetchStatus = { fetchState: 'In-Progress' };
26
+ },
27
+ updateAiAccountantCustomers(draft, action) {
28
+ draft.customersByTenantId = toCustomersByTenantId(action.payload, draft.customersByTenantId);
29
+ draft.customersFetchStatus = { fetchState: 'Completed' };
30
+ },
31
+ updateAiAccountantCustomersFailure(draft, action) {
32
+ draft.customersFetchStatus = {
33
+ fetchState: 'Error',
34
+ error: action.payload,
35
+ };
36
+ },
37
+ // ── Jobs ──
38
+ fetchAiAccountantJobs: {
39
+ reducer(draft, action) {
40
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
41
+ if (customerView != null) {
42
+ customerView.jobsFetchStatus = { fetchState: 'In-Progress' };
43
+ }
44
+ },
45
+ prepare(tenantId, fetchNextPage) {
46
+ return { payload: { tenantId, fetchNextPage: fetchNextPage ?? false } };
47
+ },
48
+ },
49
+ updateAiAccountantJobs: {
50
+ reducer(draft, action) {
51
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
52
+ if (customerView != null) {
53
+ customerView.jobsFetchStatus = { fetchState: 'Completed' };
54
+ customerView.jobsPageToken = action.payload.nextPageToken;
55
+ }
56
+ },
57
+ prepare(tenantId, nextPageToken) {
58
+ return { payload: { tenantId, nextPageToken: nextPageToken ?? null } };
59
+ },
60
+ },
61
+ updateAiAccountantJobsFailure(draft, action) {
62
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
63
+ if (customerView != null) {
64
+ customerView.jobsFetchStatus = {
65
+ fetchState: 'Error',
66
+ error: action.payload.error,
67
+ };
68
+ }
69
+ },
70
+ setSelectedTenantIdsForJobTrigger(draft, action) {
71
+ draft.selectedTenantIdsForJobTrigger = action.payload;
72
+ },
73
+ // ── Trigger Job ──
74
+ triggerAiAccountantJob: {
75
+ reducer(draft,
76
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
77
+ _action) {
78
+ draft.triggerJobStatus = { fetchState: 'In-Progress' };
79
+ },
80
+ prepare(operationType, startDate, endDate) {
81
+ return { payload: { operationType, startDate, endDate } };
82
+ },
83
+ },
84
+ triggerAiAccountantJobSuccess(draft) {
85
+ draft.triggerJobStatus = { fetchState: 'Completed' };
86
+ // Bulk selection resets after a successful fire so checkboxes
87
+ // return to an empty state along with the customer-list refresh.
88
+ draft.selectedTenantIdsForJobTrigger = [];
89
+ },
90
+ triggerAiAccountantJobFailure(draft, action) {
91
+ draft.triggerJobStatus = { fetchState: 'Error', error: action.payload };
92
+ },
93
+ // ── Cancel Onboarding ──
94
+ cancelAiAccountantOnboarding: {
95
+ reducer(draft, action) {
96
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
97
+ if (customerView != null) {
98
+ customerView.cancelOnboardingStatus = { fetchState: 'In-Progress' };
99
+ }
100
+ },
101
+ prepare(companyId, tenantId) {
102
+ return { payload: { companyId, tenantId } };
103
+ },
104
+ },
105
+ cancelAiAccountantOnboardingSuccess: {
106
+ reducer(draft, action) {
107
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
108
+ if (customerView != null) {
109
+ customerView.cancelOnboardingStatus = { fetchState: 'Completed' };
110
+ }
111
+ },
112
+ prepare(tenantId) {
113
+ return { payload: { tenantId } };
114
+ },
115
+ },
116
+ cancelAiAccountantOnboardingFailure: {
117
+ reducer(draft, action) {
118
+ const customerView = draft.customersByTenantId[action.payload.tenantId];
119
+ if (customerView != null) {
120
+ customerView.cancelOnboardingStatus = {
121
+ fetchState: 'Error',
122
+ error: action.payload.error,
123
+ };
124
+ }
125
+ },
126
+ prepare(tenantId, error) {
127
+ return { payload: { tenantId, error } };
128
+ },
129
+ },
130
+ // ── UI State ──
131
+ updateAiAccountantUIState(draft, action) {
132
+ Object.assign(draft.uiState, action.payload);
133
+ },
134
+ // ── Clear ──
135
+ clearAiAccountantView() {
136
+ return exports.initialAiAccountantViewState;
137
+ },
138
+ },
139
+ });
140
+ _a = aiAccountantView.actions, exports.cancelAiAccountantOnboarding = _a.cancelAiAccountantOnboarding, exports.cancelAiAccountantOnboardingFailure = _a.cancelAiAccountantOnboardingFailure, exports.cancelAiAccountantOnboardingSuccess = _a.cancelAiAccountantOnboardingSuccess, exports.clearAiAccountantView = _a.clearAiAccountantView, exports.fetchAiAccountantCustomers = _a.fetchAiAccountantCustomers, exports.fetchAiAccountantJobs = _a.fetchAiAccountantJobs, exports.setSelectedTenantIdsForJobTrigger = _a.setSelectedTenantIdsForJobTrigger, exports.triggerAiAccountantJob = _a.triggerAiAccountantJob, exports.triggerAiAccountantJobFailure = _a.triggerAiAccountantJobFailure, exports.triggerAiAccountantJobSuccess = _a.triggerAiAccountantJobSuccess, exports.updateAiAccountantCustomers = _a.updateAiAccountantCustomers, exports.updateAiAccountantCustomersFailure = _a.updateAiAccountantCustomersFailure, exports.updateAiAccountantJobs = _a.updateAiAccountantJobs, exports.updateAiAccountantJobsFailure = _a.updateAiAccountantJobsFailure, exports.updateAiAccountantUIState = _a.updateAiAccountantUIState;
141
+ exports.default = aiAccountantView.reducer;
142
+ // ── Helpers ──
143
+ const toCustomersByTenantId = (customers, existing) => {
144
+ const result = {};
145
+ for (const payload of customers) {
146
+ const tenantId = payload.tenant_id;
147
+ const existingState = existing[tenantId];
148
+ result[tenantId] = existingState ?? {
149
+ cancelOnboardingStatus: { fetchState: 'Not-Started' },
150
+ jobsFetchStatus: { fetchState: 'Not-Started' },
151
+ jobsPageToken: null,
152
+ tenantId,
153
+ };
154
+ }
155
+ return result;
156
+ };
@@ -0,0 +1,16 @@
1
+ import { FetchStateAndError, ID } from '../../commonStateTypes/common';
2
+ import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
3
+ import { AiAccountantCustomerView } from '../../entity/aiAccountantCustomer/aiAccountantCustomerSelector';
4
+ import { RootState } from '../../reducer';
5
+ import { AiAccountantCustomerViewState, AiAccountantUIState } from './aiAccountantViewState';
6
+ export interface AiAccountantCockpitView extends SelectorView {
7
+ averageAccuracy: number;
8
+ customers: AiAccountantCustomerView[];
9
+ customerViewStateByTenantId: Record<string, AiAccountantCustomerViewState>;
10
+ selectedCustomersForJobTrigger: AiAccountantCustomerView[];
11
+ selectedTenantIds: ID[];
12
+ triggerJobStatus: FetchStateAndError;
13
+ uiState: AiAccountantUIState;
14
+ unonboardedTenantIds: ID[];
15
+ }
16
+ export declare const getAiAccountantCockpitView: (state: RootState) => AiAccountantCockpitView;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getAiAccountantCockpitView = void 0;
7
+ const toolkit_1 = require("@reduxjs/toolkit");
8
+ const orderBy_1 = __importDefault(require("lodash/orderBy"));
9
+ const aiAccountantCustomerSelector_1 = require("../../entity/aiAccountantCustomer/aiAccountantCustomerSelector");
10
+ exports.getAiAccountantCockpitView = (0, toolkit_1.createSelector)((state) => state.aiAccountantViewState, (state) => state.aiAccountantCustomerState, (state) => state.userState, (viewState, customerEntityState, userState) => {
11
+ const { customersByTenantId, customersFetchStatus, selectedTenantIdsForJobTrigger, triggerJobStatus, uiState, } = viewState;
12
+ const allCustomers = (0, aiAccountantCustomerSelector_1.getAiAccountantCustomers)(customerEntityState, userState);
13
+ let filteredCustomers = allCustomers;
14
+ // Text filter
15
+ const trimmedFilterText = uiState.filterText.trim();
16
+ if (trimmedFilterText.length > 0) {
17
+ const query = trimmedFilterText.toLowerCase();
18
+ filteredCustomers = filteredCustomers.filter((customer) => customer.companyName.toLowerCase().includes(query) ||
19
+ customer.tenantId.toLowerCase().includes(query));
20
+ }
21
+ // Cockpit filters (e.g. enrollmentStatus)
22
+ const enrollmentStatusFilter = uiState.filters.categories?.find((category) => category.field === 'enrollmentStatus');
23
+ if (enrollmentStatusFilter != null &&
24
+ enrollmentStatusFilter.values.length > 0) {
25
+ const selectedStatuses = enrollmentStatusFilter.values.map(String);
26
+ const isEqual = enrollmentStatusFilter.matchingOperator === 'equal';
27
+ filteredCustomers = filteredCustomers.filter((customer) => {
28
+ const status = customer.enrollment?.status ?? 'unknown';
29
+ const matches = selectedStatuses.includes(status);
30
+ return isEqual ? matches : !matches;
31
+ });
32
+ }
33
+ // Sorting
34
+ const sortedCustomers = getSortedCustomers(filteredCustomers, uiState.sortKey, uiState.sortOrder);
35
+ const selectedCustomersForJobTrigger = allCustomers.filter((customer) => selectedTenantIdsForJobTrigger.includes(customer.tenantId));
36
+ const unonboardedTenantIds = allCustomers
37
+ .filter((customer) => customer.enrollment == null)
38
+ .map((customer) => customer.tenantId);
39
+ return {
40
+ averageAccuracy: calcOverallAverageAccuracy(allCustomers),
41
+ fetchState: customersFetchStatus.fetchState,
42
+ error: customersFetchStatus.error,
43
+ customers: sortedCustomers,
44
+ customerViewStateByTenantId: customersByTenantId,
45
+ selectedCustomersForJobTrigger,
46
+ selectedTenantIds: selectedTenantIdsForJobTrigger,
47
+ triggerJobStatus,
48
+ uiState,
49
+ unonboardedTenantIds,
50
+ };
51
+ });
52
+ // ── Helpers ──
53
+ const getSortedCustomers = (customers, sortKey, sortOrder) => {
54
+ const direction = sortOrder === 'ascending' ? 'asc' : 'desc';
55
+ return (0, orderBy_1.default)(customers, (customer) => {
56
+ switch (sortKey) {
57
+ case 'companyName':
58
+ return customer.companyName.toLowerCase();
59
+ case 'status':
60
+ return (customer.enrollment?.status ?? 'unknown').toLowerCase();
61
+ case 'bookcloseDate':
62
+ return customer.bookcloseDate?.valueOf() ?? 0;
63
+ case 'latestTraining':
64
+ return customer.enrollment?.latestTraining?.valueOf() ?? 0;
65
+ case 'latestSync':
66
+ return customer.enrollment?.latestTransactionSync?.valueOf() ?? 0;
67
+ case 'accuracy':
68
+ return customer.averageAccuracy;
69
+ default:
70
+ return customer.companyName.toLowerCase();
71
+ }
72
+ }, direction);
73
+ };
74
+ const calcOverallAverageAccuracy = (customers) => {
75
+ const customerAccuracies = customers
76
+ .map((customer) => customer.averageAccuracy)
77
+ .filter((accuracy) => accuracy > 0);
78
+ if (customerAccuracies.length === 0) {
79
+ return 0;
80
+ }
81
+ return (customerAccuracies.reduce((sum, accuracy) => sum + accuracy, 0) /
82
+ customerAccuracies.length);
83
+ };