@zeniai/client-epic-state 4.20.10 → 5.0.0-beta0ND

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
  2. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
  3. package/lib/commonStateTypes/animations.d.ts +1 -1
  4. package/lib/commonStateTypes/animations.js +3 -0
  5. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  6. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  7. package/lib/coreEpics.js +2 -1
  8. package/lib/entity/account/accountPayload.d.ts +2 -0
  9. package/lib/entity/account/accountReducer.d.ts +5 -2
  10. package/lib/entity/account/accountReducer.js +7 -2
  11. package/lib/entity/account/accountState.d.ts +1 -1
  12. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  13. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
  14. package/lib/entity/accountRecon/accountReconPayload.js +4 -2
  15. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  16. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  17. package/lib/entity/class/classReducer.d.ts +4 -4
  18. package/lib/entity/class/classState.d.ts +1 -1
  19. package/lib/entity/forecast/forecastState.d.ts +1 -1
  20. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
  21. package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  22. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
  23. package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  24. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
  25. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  26. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  27. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  28. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  29. package/lib/entity/snackbar/snackbarTypes.js +7 -0
  30. package/lib/entity/tenant/SessionManager.d.ts +38 -0
  31. package/lib/entity/tenant/SessionManager.js +171 -0
  32. package/lib/entity/tenant/epic/sessionHeartbeatEpic.d.ts +16 -0
  33. package/lib/entity/tenant/epic/sessionHeartbeatEpic.js +16 -0
  34. package/lib/entity/tenant/sessionTypes.d.ts +26 -0
  35. package/lib/entity/tenant/sessionTypes.js +12 -0
  36. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  37. package/lib/entity/tenant/tenantReducer.d.ts +10 -3
  38. package/lib/entity/tenant/tenantReducer.js +30 -2
  39. package/lib/entity/tenant/tenantSelector.d.ts +1 -0
  40. package/lib/entity/tenant/tenantSelector.js +9 -1
  41. package/lib/entity/tenant/tenantState.d.ts +2 -0
  42. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
  43. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  44. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +9 -0
  45. package/lib/entity/transaction/payloadTypes/transactionPayload.js +79 -1
  46. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
  47. package/lib/entity/transaction/stateTypes/transaction.d.ts +11 -0
  48. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  49. package/lib/epic.d.ts +15 -1
  50. package/lib/epic.js +15 -1
  51. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
  52. package/lib/esm/commonStateTypes/animations.js +3 -0
  53. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  54. package/lib/esm/coreEpics.js +2 -1
  55. package/lib/esm/entity/account/accountReducer.js +6 -1
  56. package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
  57. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  58. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  59. package/lib/esm/entity/snackbar/snackbarTypes.js +7 -0
  60. package/lib/esm/entity/tenant/SessionManager.js +167 -0
  61. package/lib/esm/entity/tenant/epic/sessionHeartbeatEpic.js +12 -0
  62. package/lib/esm/entity/tenant/sessionTypes.js +9 -0
  63. package/lib/esm/entity/tenant/tenantReducer.js +28 -1
  64. package/lib/esm/entity/tenant/tenantSelector.js +7 -0
  65. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  66. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +79 -1
  67. package/lib/esm/epic.js +15 -1
  68. package/lib/esm/index.js +22 -16
  69. package/lib/esm/reducer.js +3 -0
  70. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  71. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  72. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  73. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  74. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  75. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  76. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +19 -1
  77. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  78. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +17 -0
  79. package/lib/esm/view/companyView/companyViewReducer.js +26 -1
  80. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
  81. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  82. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +44 -0
  83. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  84. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +44 -0
  85. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  86. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +33 -0
  87. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -3
  88. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +6 -4
  89. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +12 -0
  90. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +98 -0
  91. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  92. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +13 -5
  93. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  94. package/lib/esm/view/expenseAutomationView/{bulkUploadTiming.js → helpers/bulkUploadTiming.js} +6 -0
  95. package/lib/esm/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +13 -0
  96. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  97. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  98. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
  99. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -1
  100. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +26 -3
  101. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
  102. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
  103. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  104. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  105. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  106. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  107. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -5
  108. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +24 -1
  109. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  110. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
  111. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
  112. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
  113. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
  114. package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +100 -0
  115. package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
  116. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
  117. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
  118. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
  119. package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
  120. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  121. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  122. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  123. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  124. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  125. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  126. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  127. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  128. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  129. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  130. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  131. package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  132. package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  133. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  134. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  135. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  136. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
  137. package/lib/index.d.ts +32 -22
  138. package/lib/index.js +72 -33
  139. package/lib/reducer.d.ts +3 -0
  140. package/lib/reducer.js +3 -0
  141. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  142. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  143. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  144. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  145. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  146. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  147. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
  148. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  149. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  150. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  151. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  152. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  153. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  154. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  155. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  156. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  157. package/lib/view/classList/fetchClassListEpic.js +8 -1
  158. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  159. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  160. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  161. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  162. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  163. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +20 -2
  164. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +4 -1
  165. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  166. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +9 -1
  167. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +7 -0
  168. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +21 -0
  169. package/lib/view/companyView/companyViewReducer.d.ts +6 -1
  170. package/lib/view/companyView/companyViewReducer.js +28 -2
  171. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
  172. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
  173. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  174. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  175. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  176. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +8 -0
  177. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +48 -0
  178. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  179. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +9 -0
  180. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +48 -0
  181. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  182. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts +13 -0
  183. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +37 -0
  184. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  185. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +5 -3
  186. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +10 -0
  187. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +16 -0
  188. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.d.ts +18 -0
  189. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +102 -0
  190. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  191. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
  192. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +12 -4
  193. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  194. package/lib/view/expenseAutomationView/{bulkUploadTiming.d.ts → helpers/bulkUploadTiming.d.ts} +6 -0
  195. package/lib/view/expenseAutomationView/{bulkUploadTiming.js → helpers/bulkUploadTiming.js} +7 -1
  196. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.d.ts +7 -0
  197. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +16 -0
  198. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  199. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  200. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  201. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  202. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
  203. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
  204. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
  205. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  206. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +22 -2
  207. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +12 -2
  208. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +27 -4
  209. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
  210. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
  211. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  212. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -0
  213. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
  214. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  215. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  216. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  217. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  218. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  219. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -3
  220. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -0
  221. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +27 -0
  222. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +4 -0
  223. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
  224. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  225. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  226. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  227. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  228. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  229. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  230. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  231. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
  232. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
  233. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
  234. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
  235. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
  236. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
  237. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
  238. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
  239. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
  240. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +106 -0
  241. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
  242. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
  243. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
  244. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
  245. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
  246. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
  247. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
  248. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
  249. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
  250. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
  251. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  252. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  253. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  254. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  255. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  256. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  257. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  258. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  259. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  260. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  261. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  262. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  263. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  264. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  265. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  266. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  267. package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  268. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
  269. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  270. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  271. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  272. package/lib/view/topEx/topExSelector.d.ts +1 -1
  273. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  274. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  275. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
  276. package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
  277. package/package.json +1 -1
@@ -8,6 +8,8 @@ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
8
8
  const responsePayload_1 = require("../../../../responsePayload");
9
9
  const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
10
10
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
11
+ const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
12
+ const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
11
13
  const fetchBulkUploadBatchesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatches.match), (0, operators_1.switchMap)((action) => {
12
14
  const { cacheOverride } = action.payload;
13
15
  const state = state$.value;
@@ -22,10 +24,10 @@ const fetchBulkUploadBatchesEpic = (actions$, state$, zeniAPI) => actions$.pipe(
22
24
  selectedPeriod,
23
25
  }));
24
26
  }
25
- const period = (0, timePeriod_1.convertToPeriod)(selectedPeriod);
27
+ const { end, start } = (0, rollingCalendarDateRangeInclusive_1.rollingCalendarDateRangeInclusive)(bulkUploadTiming_1.BULK_UPLOAD_BATCH_LIST_DATE_RANGE_DAYS);
26
28
  const queryParam = {
27
- start_date: period.start,
28
- end_date: period.end,
29
+ start_date: start,
30
+ end_date: end,
29
31
  sort_order: 'desc',
30
32
  };
31
33
  return zeniAPI
@@ -0,0 +1,10 @@
1
+ import { ActionsObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { fetchCompletedTransactions, setBulkUploadCompletedSubTab, setBulkUploadSortConfig } from '../../reducers/missingReceiptsViewReducer';
4
+ export type ActionType = ReturnType<typeof setBulkUploadSortConfig> | ReturnType<typeof setBulkUploadCompletedSubTab> | ReturnType<typeof fetchCompletedTransactions>;
5
+ /**
6
+ * Completed transactions are cached per sort key/order/sub-tab. After a sort or sub-tab
7
+ * change, the fetch epic would otherwise skip the network when that cache entry already
8
+ * exists — dispatch a cache-bypassing initial fetch whenever either changes from the UI.
9
+ */
10
+ export declare const refetchCompletedTransactionsOnBulkUploadSortEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.refetchCompletedTransactionsOnBulkUploadSortEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
7
+ /**
8
+ * Completed transactions are cached per sort key/order/sub-tab. After a sort or sub-tab
9
+ * change, the fetch epic would otherwise skip the network when that cache entry already
10
+ * exists — dispatch a cache-bypassing initial fetch whenever either changes from the UI.
11
+ */
12
+ const refetchCompletedTransactionsOnBulkUploadSortEpic = (actions$) => {
13
+ return actions$.pipe((0, operators_1.filter)((action) => missingReceiptsViewReducer_1.setBulkUploadSortConfig.match(action) ||
14
+ missingReceiptsViewReducer_1.setBulkUploadCompletedSubTab.match(action)), (0, operators_1.mergeMap)(() => (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.fetchCompletedTransactions)(undefined, true))));
15
+ };
16
+ exports.refetchCompletedTransactionsOnBulkUploadSortEpic = refetchCompletedTransactionsOnBulkUploadSortEpic;
@@ -0,0 +1,18 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../../reducer';
4
+ import { ZeniAPI } from '../../../../zeniAPI';
5
+ import { fetchBulkUploadBatchesSuccess, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState } from '../../reducers/missingReceiptsViewReducer';
6
+ export type ActionType = ReturnType<typeof restoreBulkUploadAutomatchingOnMount> | ReturnType<typeof fetchBulkUploadBatchesSuccess> | ReturnType<typeof restoreBulkUploadMatchingState>;
7
+ /**
8
+ * On missing-receipts entry / period switch, hydrate the automatching banner for the logged-in
9
+ * user without relying on UI-driven list fetches (the Missing tab does not fetch the batch list
10
+ * while `phase === 'idle'`). Flow:
11
+ * 1. Call `GET /1.0/batches` (rolling 30-day window).
12
+ * 2. Emit `fetchBulkUploadBatchesSuccess` so `batchListByPeriod` is populated for the selected
13
+ * period (prevents a duplicate list fetch when the user switches to the Unmatched tab).
14
+ * 3. For each `processing|pending` row, call `GET /1.0/batches/:id` in order; for the first row
15
+ * whose details `user_id` matches the logged-in user and whose status is still
16
+ * pending/processing, dispatch `restoreBulkUploadMatchingState` and stop.
17
+ */
18
+ export declare const restoreBulkUploadAutomatchingOnMountEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.restoreBulkUploadAutomatchingOnMountEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../../responsePayload");
7
+ const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
8
+ const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
9
+ const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
10
+ const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
11
+ const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
12
+ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
13
+ /**
14
+ * On missing-receipts entry / period switch, hydrate the automatching banner for the logged-in
15
+ * user without relying on UI-driven list fetches (the Missing tab does not fetch the batch list
16
+ * while `phase === 'idle'`). Flow:
17
+ * 1. Call `GET /1.0/batches` (rolling 30-day window).
18
+ * 2. Emit `fetchBulkUploadBatchesSuccess` so `batchListByPeriod` is populated for the selected
19
+ * period (prevents a duplicate list fetch when the user switches to the Unmatched tab).
20
+ * 3. For each `processing|pending` row, call `GET /1.0/batches/:id` in order; for the first row
21
+ * whose details `user_id` matches the logged-in user and whose status is still
22
+ * pending/processing, dispatch `restoreBulkUploadMatchingState` and stop.
23
+ */
24
+ const restoreBulkUploadAutomatchingOnMountEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.restoreBulkUploadAutomatchingOnMount.match), (0, operators_1.mergeMap)(() => {
25
+ const state = state$.value;
26
+ const { expenseAutomationMissingReceiptsViewState: { bulkUpload }, expenseAutomationViewState: { selectedPeriodByTenantId }, } = state;
27
+ if (bulkUpload.phase !== 'idle') {
28
+ return rxjs_1.EMPTY;
29
+ }
30
+ if (bulkUpload.batchListFetchState.fetchState === 'In-Progress') {
31
+ return rxjs_1.EMPTY;
32
+ }
33
+ const loggedInUserId = state.tenantState.loggedInUser?.userId;
34
+ if (loggedInUserId == null) {
35
+ return rxjs_1.EMPTY;
36
+ }
37
+ const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
38
+ const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
39
+ if (selectedPeriod == null) {
40
+ return rxjs_1.EMPTY;
41
+ }
42
+ const { end, start } = (0, rollingCalendarDateRangeInclusive_1.rollingCalendarDateRangeInclusive)(bulkUploadTiming_1.BULK_UPLOAD_BATCH_LIST_DATE_RANGE_DAYS);
43
+ const queryParam = {
44
+ start_date: start,
45
+ end_date: end,
46
+ sort_order: 'desc',
47
+ };
48
+ const listUrl = `${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches?query=${encodeURIComponent(JSON.stringify(queryParam))}`;
49
+ const detailsBaseUrl = `${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches/`;
50
+ const periodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
51
+ const alreadyCached = (bulkUpload.batchListByPeriod[periodId] ?? []).length > 0 &&
52
+ bulkUpload.batchListFetchState.fetchState === 'Completed';
53
+ const listSource = alreadyCached
54
+ ? (0, rxjs_1.of)(null)
55
+ : zeniAPI.getJSON(listUrl).pipe((0, operators_1.catchError)(() => (0, rxjs_1.of)(null)));
56
+ return listSource.pipe((0, operators_1.mergeMap)((listResponse) => {
57
+ const batchList = alreadyCached
58
+ ? bulkUpload.batchListByPeriod[periodId] ?? []
59
+ : listResponse != null &&
60
+ (0, responsePayload_1.isSuccessResponse)(listResponse) &&
61
+ listResponse.data != null
62
+ ? listResponse.data.batches.map(missingReceiptsPayload_1.toBatchListItem)
63
+ : null;
64
+ if (batchList == null) {
65
+ return rxjs_1.EMPTY;
66
+ }
67
+ const successAction = alreadyCached
68
+ ? null
69
+ : (0, missingReceiptsViewReducer_1.fetchBulkUploadBatchesSuccess)({
70
+ batchList,
71
+ selectedPeriod,
72
+ });
73
+ const processingBatches = batchList.filter((b) => {
74
+ const status = b.status.toLowerCase();
75
+ return status === 'processing' || status === 'pending';
76
+ });
77
+ const restoreStream = (0, rxjs_1.from)(processingBatches).pipe((0, operators_1.concatMap)((batch) => zeniAPI
78
+ .getJSON(`${detailsBaseUrl}${batch.batchId}`)
79
+ .pipe((0, operators_1.mergeMap)((response) => {
80
+ if (!(0, responsePayload_1.isSuccessResponse)(response) || response.data == null) {
81
+ return rxjs_1.EMPTY;
82
+ }
83
+ const data = response.data;
84
+ const detailsUserId = data.user_id;
85
+ if (detailsUserId == null ||
86
+ detailsUserId !== loggedInUserId) {
87
+ return rxjs_1.EMPTY;
88
+ }
89
+ if (!(0, missingReceiptsPayload_1.isBatchDetailsStatusPendingOrProcessing)(data.status)) {
90
+ return rxjs_1.EMPTY;
91
+ }
92
+ return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.restoreBulkUploadMatchingState)({
93
+ batchId: batch.batchId,
94
+ totalFiles: batch.totalFiles,
95
+ }));
96
+ }), (0, operators_1.catchError)(() => rxjs_1.EMPTY))), (0, operators_1.take)(1));
97
+ return successAction != null
98
+ ? (0, rxjs_1.concat)((0, rxjs_1.of)(successAction), restoreStream)
99
+ : restoreStream;
100
+ }));
101
+ }));
102
+ exports.restoreBulkUploadAutomatchingOnMountEpic = restoreBulkUploadAutomatchingOnMountEpic;
@@ -3,19 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.searchTransactionsForManualMatchEpic = exports.MANUAL_TRANSACTION_SEARCH_AUTO_CATEGORIZED = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
- const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
7
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
8
6
  const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
9
7
  const responsePayload_1 = require("../../../../responsePayload");
10
8
  const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
11
9
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
12
10
  const transactionsViewState_1 = require("../../types/transactionsViewState");
11
+ const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
13
12
  /**
14
13
  * `auto_categorized` for manual transaction search (Unmatched).
15
14
  * Backend contract TBD — align with `fetchTransactionCategorizationEpic` (`selectedTab === 'autoCategorized'`)
16
15
  * when the expense-automation API documents the intended filter for this flow.
17
16
  */
18
17
  exports.MANUAL_TRANSACTION_SEARCH_AUTO_CATEGORIZED = false;
18
+ /** Inclusive rolling window for manual match search (ignores accounting period picker). */
19
+ const MANUAL_SEARCH_TRANSACTION_DATE_RANGE_DAYS = 90;
19
20
  const searchTransactionsForManualMatchEpic = (actions$, state$, zeniAPI) => {
20
21
  const searchActions$ = actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.searchTransactionsForManualMatch.match));
21
22
  const pagination$ = searchActions$.pipe((0, operators_1.filter)((action) => action.payload.pageToken != null));
@@ -32,18 +33,11 @@ const searchTransactionsForManualMatchEpic = (actions$, state$, zeniAPI) => {
32
33
  return rxjs_1.EMPTY;
33
34
  }
34
35
  const state = state$.value;
35
- const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload: { manualSearch, sortKey, sortOrder }, }, } = state;
36
- const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
37
- const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
38
- if (selectedPeriod == null) {
39
- return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.searchTransactionsForManualMatchFailure)({
40
- error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Manual search requires a selected accounting period.'),
41
- }));
42
- }
43
- const period = (0, timePeriod_1.convertToPeriod)(selectedPeriod);
36
+ const { expenseAutomationMissingReceiptsViewState: { bulkUpload: { manualSearch, sortKey, sortOrder }, }, } = state;
37
+ const { end, start } = (0, rollingCalendarDateRangeInclusive_1.rollingCalendarDateRangeInclusive)(MANUAL_SEARCH_TRANSACTION_DATE_RANGE_DAYS);
44
38
  const queryParam = {
45
- start_date: period.start,
46
- end_date: period.end,
39
+ start_date: start,
40
+ end_date: end,
47
41
  auto_categorized: exports.MANUAL_TRANSACTION_SEARCH_AUTO_CATEGORIZED,
48
42
  sort_by: (0, transactionsViewState_1.toTransactionsSortKey)(sortKey),
49
43
  sort_order: sortOrder === 'ascending' ? 'asc' : 'desc',
@@ -4,8 +4,8 @@ import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
4
4
  import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
5
5
  import { RootState } from '../../../../reducer';
6
6
  import { ZeniAPI } from '../../../../zeniAPI';
7
- import { bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, clearBulkUpload, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation } from '../../reducers/missingReceiptsViewReducer';
8
- export type ActionType = ReturnType<typeof bulkUploadReceiptsSuccess> | ReturnType<typeof pusherBatchStatusUpdate> | ReturnType<typeof fetchBulkUploadBatchDetailsSuccess> | ReturnType<typeof fetchBulkUploadBatches> | ReturnType<typeof requestMissingReceiptsTabNavigation> | ReturnType<typeof updateTransactions> | ReturnType<typeof clearBulkUpload> | ReturnType<typeof openSnackbar> | ReturnType<typeof bulkUploadAutomatchingTimedOut>;
7
+ import { bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, clearBulkUpload, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, restoreBulkUploadMatchingState } from '../../reducers/missingReceiptsViewReducer';
8
+ export type ActionType = ReturnType<typeof bulkUploadReceiptsSuccess> | ReturnType<typeof restoreBulkUploadMatchingState> | ReturnType<typeof pusherBatchStatusUpdate> | ReturnType<typeof fetchBulkUploadBatchDetailsSuccess> | ReturnType<typeof fetchBulkUploadBatches> | ReturnType<typeof requestMissingReceiptsTabNavigation> | ReturnType<typeof updateTransactions> | ReturnType<typeof clearBulkUpload> | ReturnType<typeof openSnackbar> | ReturnType<typeof bulkUploadAutomatchingTimedOut>;
9
9
  /**
10
10
  * On Pusher batch completion: refresh batch list (then fetchMultipleBatchDetailsEpic runs),
11
11
  * and request switching to the Unmatched tab. Debounced to reduce duplicate refreshes.
@@ -6,11 +6,13 @@ const operators_1 = require("rxjs/operators");
6
6
  const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
7
7
  const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
8
8
  const responsePayload_1 = require("../../../../responsePayload");
9
- const bulkUploadTiming_1 = require("../../bulkUploadTiming");
9
+ const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
10
10
  const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
11
11
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
12
12
  /** First poll after upload; then interval while batch not resolved via Pusher or API. */
13
13
  const FALLBACK_FIRST_DELAY_MS = 30000;
14
+ /** Shorter first poll for restored sessions — batch may already be near completion. */
15
+ const RESTORE_FIRST_DELAY_MS = 5000;
14
16
  const FALLBACK_POLL_INTERVAL_MS = 10000;
15
17
  /**
16
18
  * On Pusher batch completion: refresh batch list (then fetchMultipleBatchDetailsEpic runs),
@@ -29,7 +31,8 @@ exports.pusherBatchStatusCompletionEpic = pusherBatchStatusCompletionEpic;
29
31
  * force `phase` to `completed` (dismiss automatching banner) and refresh the batch list.
30
32
  * Cancels when the batch completes normally, bulk state is cleared, or another upload supersedes.
31
33
  */
32
- const bulkUploadAutomatchingTimeoutEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match), (0, operators_1.mergeMap)((action) => {
34
+ const bulkUploadAutomatchingTimeoutEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)((action) => missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match(action) ||
35
+ missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)), (0, operators_1.mergeMap)((action) => {
33
36
  const { batchId } = action.payload;
34
37
  return (0, rxjs_1.timer)(bulkUploadTiming_1.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS).pipe((0, operators_1.mergeMap)(() => {
35
38
  const bulk = state$.value.expenseAutomationMissingReceiptsViewState.bulkUpload;
@@ -49,10 +52,15 @@ exports.bulkUploadAutomatchingTimeoutEpic = bulkUploadAutomatchingTimeoutEpic;
49
52
  * error snackbar per upload session (first failure only) so the user is not spammed every
50
53
  * interval; Pusher or a later successful poll still completes the flow.
51
54
  */
52
- const pollBulkUploadBatchStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match), (0, operators_1.mergeMap)((action) => {
55
+ const pollBulkUploadBatchStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)((action) => missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match(action) ||
56
+ missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)), (0, operators_1.mergeMap)((action) => {
53
57
  const { batchId } = action.payload;
54
58
  let pollErrorNotified = false;
55
- return (0, rxjs_1.timer)(FALLBACK_FIRST_DELAY_MS, FALLBACK_POLL_INTERVAL_MS).pipe((0, operators_1.takeUntil)((0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.clearBulkUpload.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.pusherBatchStatusUpdate.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatchDetailsSuccess.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadAutomatchingTimedOut.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)))), (0, operators_1.switchMap)(() => zeniAPI
59
+ const firstDelay = missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)
60
+ ? RESTORE_FIRST_DELAY_MS
61
+ : FALLBACK_FIRST_DELAY_MS;
62
+ return (0, rxjs_1.timer)(firstDelay, FALLBACK_POLL_INTERVAL_MS).pipe((0, operators_1.takeUntil)((0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.clearBulkUpload.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.pusherBatchStatusUpdate.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId &&
63
+ action.payload.status === 'completed')), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatchDetailsSuccess.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadAutomatchingTimedOut.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)))), (0, operators_1.switchMap)(() => zeniAPI
56
64
  .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches/${batchId}`)
57
65
  .pipe((0, operators_1.mergeMap)((response) => {
58
66
  /** Same batch-details URL; polls until `status` is completed (Pusher may win first). */
@@ -94,7 +94,6 @@ function getExpenseAutomationView(state) {
94
94
  const fetchStateVariables = [
95
95
  expenseAutomationMissingReceiptsViewState,
96
96
  expenseAutomationJESchedulesViewState,
97
- monthEndCloseChecksView,
98
97
  expenseAutomationTransactionsView,
99
98
  expenseAutomationReconciliationViewState,
100
99
  ];
@@ -8,3 +8,9 @@ export declare const BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = 400;
8
8
  * fallback polling, clear the automatching banner (`phase` → completed), and refresh batch list.
9
9
  */
10
10
  export declare const BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = 300000;
11
+ /**
12
+ * Rolling window (in days) for the bulk-upload batch list API. Period-agnostic — the batch list
13
+ * ignores the accounting month picker. Shared between the regular batch-list fetch and the
14
+ * restore-on-mount hydration so both flows always query the same window.
15
+ */
16
+ export declare const BULK_UPLOAD_BATCH_LIST_DATE_RANGE_DAYS = 30;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = void 0;
3
+ exports.BULK_UPLOAD_BATCH_LIST_DATE_RANGE_DAYS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = void 0;
4
4
  /**
5
5
  * After upload API success, hold the bar at 100% this long before transitioning to matching,
6
6
  * so the fill animation can complete without an abrupt swap to the auto-matching banner.
@@ -11,3 +11,9 @@ exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = 400;
11
11
  * fallback polling, clear the automatching banner (`phase` → completed), and refresh batch list.
12
12
  */
13
13
  exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = 300000;
14
+ /**
15
+ * Rolling window (in days) for the bulk-upload batch list API. Period-agnostic — the batch list
16
+ * ignores the accounting month picker. Shared between the regular batch-list fetch and the
17
+ * restore-on-mount hydration so both flows always query the same window.
18
+ */
19
+ exports.BULK_UPLOAD_BATCH_LIST_DATE_RANGE_DAYS = 30;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Local calendar dates from (end − (days − 1)) through end, inclusive.
3
+ */
4
+ export declare function rollingCalendarDateRangeInclusive(days: number): {
5
+ end: string;
6
+ start: string;
7
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rollingCalendarDateRangeInclusive = rollingCalendarDateRangeInclusive;
4
+ const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
5
+ const zeniDayJS_1 = require("../../../zeniDayJS");
6
+ /**
7
+ * Local calendar dates from (end − (days − 1)) through end, inclusive.
8
+ */
9
+ function rollingCalendarDateRangeInclusive(days) {
10
+ const end = (0, zeniDayJS_1.dateNow)().startOf('day');
11
+ const start = end.subtract(days - 1, 'day');
12
+ return {
13
+ end: end.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT),
14
+ start: start.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT),
15
+ };
16
+ }
@@ -67,8 +67,8 @@ const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionC
67
67
  lineItem.account?.qboId !== accountLine.account.qboId &&
68
68
  Boolean(lineItem.account?.qboId);
69
69
  hasClassChanged =
70
- Boolean(lineItem.class?.qboId) &&
71
- lineItem.class?.qboId !== accountLine.class.qboId;
70
+ (lineItem.class?.qboId != null || accountLine.class?.qboId != null) &&
71
+ lineItem.class?.qboId !== accountLine.class?.qboId;
72
72
  const recommendedAccountBase = (0, saveTransactionHelper_1.toRecommendedAccountBase)(lineItem.amount.amount, lineItem.account);
73
73
  const recommendedClassBase = (0, saveTransactionHelper_1.toRecommendedClassBase)(lineItem.amount.amount, lineItem.class);
74
74
  if (entityDetails != null &&
@@ -37,7 +37,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
37
37
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
38
38
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
39
39
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
40
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed";
40
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update";
41
41
  messageText: "notification" | "success" | "failed";
42
42
  type: "error" | "success" | "info";
43
43
  variables: {
@@ -241,7 +241,7 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
241
241
  isPreFilled: true,
242
242
  };
243
243
  }
244
- if (accountLine.class.classId === '' &&
244
+ if (Boolean(accountLine.class?.classId) === false &&
245
245
  higherPreferenceRecommendation?.class != null) {
246
246
  record.class = {
247
247
  ...higherPreferenceRecommendation.class,
@@ -472,7 +472,7 @@ const setEntityRecommendationForLineIdInLocalData = (draft, transaction, transac
472
472
  }
473
473
  : accountLine.account;
474
474
  record.class =
475
- accountLine.class.classId !== ''
475
+ Boolean(accountLine.class?.classId) !== false
476
476
  ? accountLine.class
477
477
  : recommendations?.[0]?.class
478
478
  ? {
@@ -10,11 +10,11 @@ export interface ExpenseAutomationJESchedulesQueryPayload {
10
10
  start_date: string;
11
11
  }
12
12
  interface ExpenseAutomationJESchedulesPayload {
13
- draft_je_schedules: JEScheduledTransactionPayload[];
14
13
  failed_je_postings: {
15
14
  je_schedules: JEScheduledTransactionPayload[];
16
15
  scheduled_journal_entries: ScheduledJournalEntryPayload[];
17
16
  };
17
+ je_schedules: JEScheduledTransactionPayload[];
18
18
  }
19
19
  export type ExpenseAutomationJESchedulesResponse = ZeniAPIResponse<ExpenseAutomationJESchedulesPayload>;
20
20
  export interface IgnoreDraftJESchedulePayload {
@@ -40,6 +40,7 @@ export interface BatchListItemPayload {
40
40
  possible_matches_count: number;
41
41
  status: string;
42
42
  total_files: number;
43
+ user_id: string;
43
44
  }
44
45
  export type BatchListResponse = ZeniAPIResponse<BatchListResponsePayload>;
45
46
  export interface MatchedTransactionPayload {
@@ -81,6 +82,8 @@ export interface BatchDetailsResponsePayload {
81
82
  possible_matches: number;
82
83
  total: number;
83
84
  };
85
+ /** Uploader — used to scope automatching UI to the user who submitted the batch. */
86
+ user_id?: string;
84
87
  }
85
88
  export type BatchDetailsResponse = ZeniAPIResponse<BatchDetailsResponsePayload>;
86
89
  /**
@@ -93,6 +96,8 @@ export declare function toBatchFile(payload: BatchFilePayload, filesEndPoint?: s
93
96
  export declare function extractTransactionPayloadsFromBatchFiles(files: BatchFilePayload[]): SupportedTransactionPayload[];
94
97
  export declare function toBatchSummary(payload: BatchDetailsResponsePayload['summary']): BatchSummary;
95
98
  export declare function toBatchDetails(payload: BatchDetailsResponsePayload, filesEndPoint?: string): BatchDetails;
99
+ /** Batch is still in-flight for automatching (GET /batches/:id while not completed). */
100
+ export declare function isBatchDetailsStatusPendingOrProcessing(status: string): boolean;
96
101
  /** Batch list `status` is a string from the API — compare case-insensitively. */
97
102
  export declare function isBatchListStatusCompleted(status: string): boolean;
98
103
  /**
@@ -5,6 +5,7 @@ exports.toBatchFile = toBatchFile;
5
5
  exports.extractTransactionPayloadsFromBatchFiles = extractTransactionPayloadsFromBatchFiles;
6
6
  exports.toBatchSummary = toBatchSummary;
7
7
  exports.toBatchDetails = toBatchDetails;
8
+ exports.isBatchDetailsStatusPendingOrProcessing = isBatchDetailsStatusPendingOrProcessing;
8
9
  exports.isBatchListStatusCompleted = isBatchListStatusCompleted;
9
10
  exports.filterBatchListItemsForBatchDetailsFetch = filterBatchListItemsForBatchDetailsFetch;
10
11
  exports.isBatchDetailsApiStatusCompleted = isBatchDetailsApiStatusCompleted;
@@ -113,8 +114,16 @@ function toBatchDetails(payload, filesEndPoint) {
113
114
  files: payload.files.map((file) => toBatchFile(file, filesEndPoint)),
114
115
  status: (0, missingReceiptsViewState_1.toBatchStatusValue)(payload.status),
115
116
  summary: toBatchSummary(payload.summary),
117
+ ...(payload.user_id != null && payload.user_id !== ''
118
+ ? { userId: payload.user_id }
119
+ : {}),
116
120
  };
117
121
  }
122
+ /** Batch is still in-flight for automatching (GET /batches/:id while not completed). */
123
+ function isBatchDetailsStatusPendingOrProcessing(status) {
124
+ const s = status.toLowerCase();
125
+ return s === 'processing' || s === 'pending';
126
+ }
118
127
  /** Batch list `status` is a string from the API — compare case-insensitively. */
119
128
  function isBatchListStatusCompleted(status) {
120
129
  return status.toLowerCase() === 'completed';
@@ -172,6 +181,7 @@ function toBatchListItem(payload) {
172
181
  possibleMatchesCount: payload.possible_matches_count,
173
182
  status: payload.status,
174
183
  totalFiles: payload.total_files,
184
+ userId: payload.user_id,
175
185
  };
176
186
  }
177
187
  /**
@@ -1,4 +1,5 @@
1
1
  import { StatusCodeWithLabelPayload } from '../../../commonPayloadTypes/statusPayload';
2
+ import { ID } from '../../../commonStateTypes/common';
2
3
  import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
3
4
  import { AccountPayload } from '../../../entity/account/accountPayload';
4
5
  import { ReconciliationDataPayload, StatementMetaDataPayload, TransactionsToReviewPayload } from '../../../entity/accountRecon/accountReconPayload';
@@ -9,14 +10,35 @@ import { UserPayload } from '../../../entity/user/userPayload';
9
10
  import { RootState } from '../../../reducer';
10
11
  import { ZeniAPIResponse } from '../../../responsePayload';
11
12
  import { BalancesLocalData, SaveReconcileDetailActionPayload } from '../types/reconciliationViewState';
13
+ export interface DetectionInfoPayload {
14
+ account_id: string;
15
+ bank_balance: number | null;
16
+ cleared_balance: number | null;
17
+ variance: number | null;
18
+ currency_code?: string;
19
+ currency_symbol?: string;
20
+ }
12
21
  export interface AccountAndPaymentAccountPayload extends AccountPayload {
13
22
  payment_account_id: string | null;
23
+ detection_info?: DetectionInfoPayload;
24
+ detection_reason?: string;
25
+ }
26
+ interface ExclusionInfoPayload {
27
+ bank_balance: number | null;
28
+ cleared_balance: number | null;
29
+ variance: number | null;
30
+ }
31
+ export interface ExcludedAccountPayload extends AccountAndPaymentAccountPayload {
32
+ exclusion_info: ExclusionInfoPayload;
14
33
  }
15
34
  export interface ReconciliationPayload {
16
35
  accounts: AccountAndPaymentAccountPayload[];
17
36
  files: FilePayload[];
18
37
  reconciliation: ReconciliationDataPayload[];
19
38
  users: UserPayload[];
39
+ detection_info?: DetectionInfoPayload;
40
+ detection_reason?: string;
41
+ excluded_accounts?: ExcludedAccountPayload[];
20
42
  }
21
43
  export type ReconciliationResponse = ZeniAPIResponse<ReconciliationPayload>;
22
44
  export interface SaveReconciliationReviewPayload {
@@ -29,6 +51,28 @@ export declare function createSaveReconciliationPayloadBasedOnActionAndMethod(st
29
51
  review: TransactionsToReviewPayload[];
30
52
  };
31
53
  };
54
+ export interface ExcludeAccountFromReconciliationRequestPayload {
55
+ account_id: ID;
56
+ bank_balance: number;
57
+ cleared_balance: number;
58
+ variance: number;
59
+ }
60
+ export interface ExcludedAccountFromReconciliationPayload {
61
+ account_id: ID;
62
+ bank_balance: number | null;
63
+ cleared_balance: number | null;
64
+ variance: number | null;
65
+ currency_code?: string;
66
+ currency_symbol?: string;
67
+ }
68
+ export interface ExcludeAccountFromReconciliationResponsePayload {
69
+ excluded_account: ExcludedAccountFromReconciliationPayload;
70
+ }
71
+ export type ExcludeAccountFromReconciliationResponse = ZeniAPIResponse<ExcludeAccountFromReconciliationResponsePayload>;
72
+ export interface IncludeAccountInReconciliationResponsePayload {
73
+ reconciliation: ReconciliationDataPayload;
74
+ }
75
+ export type IncludeAccountInReconciliationResponse = ZeniAPIResponse<IncludeAccountInReconciliationResponsePayload>;
32
76
  export interface DeleteStatementResponsePayload {
33
77
  statement_upload: {
34
78
  statement_data_status: StatusCodeWithLabelPayload;
@@ -54,3 +98,4 @@ export interface UploadStatementResponsePayload {
54
98
  };
55
99
  }
56
100
  export type UploadStatementResponse = ZeniAPIResponse<UploadStatementResponsePayload>;
101
+ export {};
@@ -5,7 +5,7 @@ import { JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSch
5
5
  import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
6
6
  import { ZeniAPIStatus } from '../../../responsePayload';
7
7
  import { AccountTypeRecommendationPayload } from '../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload';
8
- import { AccountSettingsLocalData, AccountSettingsState, JEScheduleLocalData, JESchedulesViewState } from '../types/jeSchedulesViewState';
8
+ import { AccountSettingsLocalData, AccountSettingsState, JEScheduleLocalData, JESchedulesViewState, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
9
9
  export declare const accountSettingsInitialState: AccountSettingsState;
10
10
  export declare const initialState: JESchedulesViewState;
11
11
  export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearExpenseAutomationJESchedulesView">, clearJeAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeAccountSettingsLocalData">, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeScheduleLocalData">, fetchAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchAccountSettingsListForAccountTypes">, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
@@ -56,7 +56,7 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
56
56
  accountPayload: AccountMetadataPayload[];
57
57
  }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypes">, updateAccountSettingsListForAccountTypesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
58
58
  status: ZeniAPIStatus;
59
- }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
59
+ }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJESchedulesUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<JESchedulesViewUIState>, "expenseAutomationJESchedulesView/updateJESchedulesUIState">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
60
60
  localData: Partial<JEScheduleLocalData>;
61
61
  scheduledJournalEntryID: ID;
62
62
  }, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[], selectedPeriod: MonthYearPeriod], {