@zeniai/client-epic-state 5.1.0-betaSS3 → 5.1.0

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 (450) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
  2. package/lib/commonStateTypes/amount.d.ts +1 -0
  3. package/lib/commonStateTypes/amount.js +9 -1
  4. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  5. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  6. package/lib/commonStateTypes/workingDayHelper.d.ts +9 -0
  7. package/lib/commonStateTypes/workingDayHelper.js +28 -1
  8. package/lib/entity/account/accountSelector.d.ts +9 -0
  9. package/lib/entity/account/accountSelector.js +14 -1
  10. package/lib/entity/account/accountState.d.ts +1 -1
  11. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  12. package/lib/entity/aiCfo/aiCfoPayload.d.ts +64 -5
  13. package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
  14. package/lib/entity/aiCfo/aiCfoReducer.js +252 -10
  15. package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
  16. package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
  17. package/lib/entity/aiCfo/aiCfoState.d.ts +98 -4
  18. package/lib/entity/aiCfo/aiCfoState.js +20 -1
  19. package/lib/entity/approvalRule/approvalRuleConflict.d.ts +56 -0
  20. package/lib/entity/approvalRule/approvalRuleConflict.js +77 -0
  21. package/lib/entity/approvalRule/approvalRulePayload.d.ts +34 -5
  22. package/lib/entity/approvalRule/approvalRulePayload.js +145 -10
  23. package/lib/entity/approvalRule/approvalRuleSelector.d.ts +25 -1
  24. package/lib/entity/approvalRule/approvalRuleSelector.js +40 -0
  25. package/lib/entity/approvalRule/approvalRuleState.d.ts +59 -7
  26. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +277 -0
  27. package/lib/entity/cardPolicy/cardPolicyPayload.js +143 -0
  28. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +19 -0
  29. package/lib/entity/cardPolicy/cardPolicyReducer.js +175 -0
  30. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +32 -0
  31. package/lib/entity/cardPolicy/cardPolicySelector.js +99 -0
  32. package/lib/entity/cardPolicy/cardPolicyState.d.ts +205 -0
  33. package/lib/entity/cardPolicy/cardPolicyState.js +14 -0
  34. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +18 -0
  35. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +68 -0
  36. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +26 -0
  37. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +47 -0
  38. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +25 -0
  39. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +39 -0
  40. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +24 -0
  41. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +105 -0
  42. package/lib/entity/class/classReducer.d.ts +4 -4
  43. package/lib/entity/class/classState.d.ts +1 -1
  44. package/lib/entity/forecast/forecastState.d.ts +1 -1
  45. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
  46. package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -0
  47. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
  48. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  49. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  50. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  51. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  52. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  53. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
  54. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
  55. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  56. package/lib/entity/snackbar/snackbarTypes.js +7 -0
  57. package/lib/entity/task/taskPayload.d.ts +3 -1
  58. package/lib/entity/task/taskPayload.js +2 -0
  59. package/lib/entity/task/taskState.d.ts +2 -0
  60. package/lib/entity/tenant/clearAllEpic.d.ts +9 -2
  61. package/lib/entity/tenant/clearAllEpic.js +14 -0
  62. package/lib/entity/tenant/tenantPayload.d.ts +21 -0
  63. package/lib/entity/tenant/tenantReducer.d.ts +14 -5
  64. package/lib/entity/tenant/tenantReducer.js +132 -8
  65. package/lib/entity/tenant/tenantState.d.ts +24 -1
  66. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +4 -0
  67. package/lib/entity/transaction/payloadTypes/transactionPayload.js +18 -10
  68. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
  69. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +2 -1
  70. package/lib/entity/transaction/stateTypes/transactionLine.js +2 -1
  71. package/lib/epic.d.ts +31 -2
  72. package/lib/epic.js +31 -2
  73. package/lib/esm/commonStateTypes/amount.js +7 -0
  74. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  75. package/lib/esm/commonStateTypes/workingDayHelper.js +26 -0
  76. package/lib/esm/entity/account/accountSelector.js +11 -0
  77. package/lib/esm/entity/aiCfo/aiCfoReducer.js +252 -10
  78. package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
  79. package/lib/esm/entity/aiCfo/aiCfoState.js +17 -0
  80. package/lib/esm/entity/approvalRule/approvalRuleConflict.js +74 -0
  81. package/lib/esm/entity/approvalRule/approvalRulePayload.js +145 -10
  82. package/lib/esm/entity/approvalRule/approvalRuleSelector.js +35 -0
  83. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +130 -0
  84. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +171 -0
  85. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +75 -0
  86. package/lib/esm/entity/cardPolicy/cardPolicyState.js +9 -0
  87. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +64 -0
  88. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +43 -0
  89. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +35 -0
  90. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +101 -0
  91. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +7 -0
  92. package/lib/esm/entity/snackbar/snackbarTypes.js +7 -0
  93. package/lib/esm/entity/task/taskPayload.js +2 -0
  94. package/lib/esm/entity/tenant/clearAllEpic.js +14 -0
  95. package/lib/esm/entity/tenant/tenantReducer.js +130 -7
  96. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +18 -10
  97. package/lib/esm/entity/transaction/stateTypes/transactionLine.js +1 -0
  98. package/lib/esm/epic.js +31 -2
  99. package/lib/esm/index.js +68 -28
  100. package/lib/esm/reducer.js +21 -0
  101. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +6 -3
  102. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  103. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +2 -1
  104. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  105. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +39 -11
  106. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +14 -4
  107. package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +38 -0
  108. package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
  109. package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +16 -0
  110. package/lib/esm/view/companyView/companyViewReducer.js +46 -1
  111. package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +25 -0
  112. package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +98 -0
  113. package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
  114. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  115. package/lib/esm/view/createTransferEntry/createTransferEntryReducer.js +82 -0
  116. package/lib/esm/view/createTransferEntry/createTransferEntrySelector.js +64 -0
  117. package/lib/esm/view/createTransferEntry/createTransferEntryState.js +17 -0
  118. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +136 -0
  119. package/lib/esm/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +36 -0
  120. package/lib/esm/view/dashboard/dashboardReducer.js +11 -1
  121. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -3
  122. package/lib/esm/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +3 -4
  123. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +13 -9
  124. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +3 -16
  125. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +9 -16
  126. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +2 -2
  127. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +2 -13
  128. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -6
  129. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -2
  130. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -6
  131. package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +3 -20
  132. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +21 -49
  133. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -6
  134. package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
  135. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +22 -2
  136. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
  137. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +109 -12
  138. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
  139. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
  140. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +11 -7
  141. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +54 -0
  142. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +13 -4
  143. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +140 -16
  144. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
  145. package/lib/esm/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
  146. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +29 -0
  147. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +78 -0
  148. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +47 -0
  149. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +47 -0
  150. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +34 -0
  151. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +32 -0
  152. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +54 -0
  153. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +92 -0
  154. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +225 -0
  155. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +10 -0
  156. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +23 -0
  157. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +36 -0
  158. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +27 -0
  159. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +28 -0
  160. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +52 -0
  161. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +22 -0
  162. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +1 -0
  163. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +36 -0
  164. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +39 -0
  165. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +34 -0
  166. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +71 -0
  167. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +21 -0
  168. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +1 -0
  169. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +38 -0
  170. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +289 -0
  171. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +109 -0
  172. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +44 -0
  173. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +111 -0
  174. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +25 -0
  175. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +363 -0
  176. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +36 -0
  177. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +19 -0
  178. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +6 -0
  179. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +119 -0
  180. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +154 -0
  181. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +22 -0
  182. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +1 -0
  183. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +49 -0
  184. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +140 -0
  185. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +20 -0
  186. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +100 -0
  187. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +96 -0
  188. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +59 -0
  189. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +24 -0
  190. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +25 -0
  191. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +1 -0
  192. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +34 -0
  193. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +57 -0
  194. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +35 -0
  195. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
  196. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +42 -4
  197. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +35 -0
  198. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +62 -0
  199. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +44 -0
  200. package/lib/esm/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
  201. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
  202. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
  203. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +11 -7
  204. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +61 -0
  205. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +13 -4
  206. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +80 -11
  207. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +18 -0
  208. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +18 -0
  209. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +1 -1
  210. package/lib/esm/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +45 -1
  211. package/lib/esm/view/transactionDetail/journalEntryLinesViewModel.js +149 -0
  212. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +6 -1
  213. package/lib/index.d.ts +84 -34
  214. package/lib/index.js +261 -37
  215. package/lib/reducer.d.ts +21 -0
  216. package/lib/reducer.js +21 -0
  217. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +11 -2
  218. package/lib/view/aiCfoView/aiCfoViewReducer.js +6 -3
  219. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  220. package/lib/view/aiCfoView/epics/createSessionEpic.js +2 -1
  221. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -1
  222. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  223. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  224. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  225. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  226. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  227. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  228. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  229. package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +19 -11
  230. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +11 -5
  231. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +40 -12
  232. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +2 -0
  233. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +13 -3
  234. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +11 -3
  235. package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +10 -0
  236. package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +42 -0
  237. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +1 -3
  238. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
  239. package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +6 -0
  240. package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +20 -0
  241. package/lib/view/companyView/companyViewReducer.d.ts +12 -1
  242. package/lib/view/companyView/companyViewReducer.js +48 -3
  243. package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.d.ts +9 -0
  244. package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +29 -0
  245. package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.d.ts +10 -0
  246. package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +102 -0
  247. package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
  248. package/lib/view/companyView/types/cockpitTypes.d.ts +3 -2
  249. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  250. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  251. package/lib/view/createTransferEntry/createTransferEntryReducer.d.ts +32 -0
  252. package/lib/view/createTransferEntry/createTransferEntryReducer.js +86 -0
  253. package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +39 -0
  254. package/lib/view/createTransferEntry/createTransferEntrySelector.js +69 -0
  255. package/lib/view/createTransferEntry/createTransferEntryState.d.ts +30 -0
  256. package/lib/view/createTransferEntry/createTransferEntryState.js +20 -0
  257. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.d.ts +11 -0
  258. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +140 -0
  259. package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.d.ts +14 -0
  260. package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +40 -0
  261. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  262. package/lib/view/dashboard/dashboardReducer.js +11 -1
  263. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -3
  264. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +3 -4
  265. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +6 -0
  266. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +14 -10
  267. package/lib/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +3 -16
  268. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +9 -16
  269. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +2 -2
  270. package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +2 -13
  271. package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -6
  272. package/lib/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -2
  273. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -6
  274. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -6
  275. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +3 -20
  276. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  277. package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +20 -9
  278. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +12 -19
  279. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +22 -50
  280. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +8 -6
  281. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -0
  282. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -7
  283. package/lib/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
  284. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  285. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
  286. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  287. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  288. package/lib/view/people/peopleTypes.d.ts +1 -1
  289. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  290. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  291. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  292. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +8 -1
  293. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +21 -1
  294. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +22 -0
  295. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +7 -0
  296. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
  297. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +14 -3
  298. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +110 -13
  299. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +16 -0
  300. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
  301. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
  302. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +10 -6
  303. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.d.ts +23 -0
  304. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +58 -0
  305. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +12 -3
  306. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +59 -1
  307. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +142 -17
  308. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +31 -5
  309. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +8 -1
  310. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
  311. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
  312. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +47 -0
  313. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +34 -0
  314. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +23 -0
  315. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +82 -0
  316. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +40 -0
  317. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +51 -0
  318. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +37 -0
  319. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +53 -0
  320. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +14 -0
  321. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +38 -0
  322. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +7 -0
  323. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +36 -0
  324. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +56 -0
  325. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +60 -0
  326. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +22 -0
  327. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +96 -0
  328. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +59 -0
  329. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +230 -0
  330. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +122 -0
  331. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +13 -0
  332. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +7 -0
  333. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +27 -0
  334. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +9 -0
  335. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +40 -0
  336. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.d.ts +7 -0
  337. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +31 -0
  338. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.d.ts +15 -0
  339. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +32 -0
  340. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +14 -0
  341. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +56 -0
  342. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +15 -0
  343. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +28 -0
  344. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +8 -0
  345. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +2 -0
  346. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +8 -0
  347. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +40 -0
  348. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +8 -0
  349. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +43 -0
  350. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +8 -0
  351. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +38 -0
  352. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +15 -0
  353. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +75 -0
  354. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +15 -0
  355. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +27 -0
  356. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +7 -0
  357. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +2 -0
  358. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +8 -0
  359. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +42 -0
  360. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +8 -0
  361. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +294 -0
  362. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +8 -0
  363. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +113 -0
  364. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +9 -0
  365. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +48 -0
  366. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +8 -0
  367. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +115 -0
  368. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +13 -0
  369. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +29 -0
  370. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +14 -0
  371. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +369 -0
  372. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +6 -0
  373. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +40 -0
  374. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +7 -0
  375. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +26 -0
  376. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +116 -0
  377. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +10 -0
  378. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +33 -0
  379. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +126 -0
  380. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +52 -0
  381. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +158 -0
  382. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +11 -0
  383. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +31 -0
  384. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +12 -0
  385. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +2 -0
  386. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +9 -0
  387. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +53 -0
  388. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +10 -0
  389. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +144 -0
  390. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +7 -0
  391. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +24 -0
  392. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +11 -0
  393. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +104 -0
  394. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +22 -0
  395. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +100 -0
  396. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +8 -0
  397. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +63 -0
  398. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +3 -0
  399. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +28 -0
  400. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  401. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +14 -0
  402. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +27 -1
  403. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +34 -0
  404. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +2 -0
  405. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +7 -0
  406. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +38 -0
  407. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +12 -0
  408. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +61 -0
  409. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +9 -0
  410. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +39 -0
  411. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  412. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
  413. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +12 -2
  414. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +43 -5
  415. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +7 -0
  416. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +42 -1
  417. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +5 -0
  418. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +11 -0
  419. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +66 -0
  420. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +3 -0
  421. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +48 -0
  422. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
  423. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
  424. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
  425. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +10 -6
  426. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.d.ts +14 -0
  427. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +65 -0
  428. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +12 -3
  429. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.d.ts +14 -3
  430. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +81 -12
  431. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +12 -0
  432. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.d.ts +8 -0
  433. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +22 -0
  434. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.d.ts +8 -0
  435. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +22 -0
  436. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +1 -1
  437. package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.d.ts +1 -1
  438. package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +46 -2
  439. package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.d.ts +2 -0
  440. package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
  441. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  442. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  443. package/lib/view/topEx/topExSelector.d.ts +1 -1
  444. package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +102 -0
  445. package/lib/view/transactionDetail/journalEntryLinesViewModel.js +160 -0
  446. package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
  447. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +6 -1
  448. package/lib/view/transactionDetail/transactionDetailSelector.js +6 -1
  449. package/lib/zeniAPI.d.ts +1 -0
  450. package/package.json +1 -1
@@ -6,10 +6,11 @@ import { updateTransactions } from '../../../../entity/transaction/transactionRe
6
6
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
7
7
  import { getLineItemsByTransactionsIdsFromResponse } from '../../helpers/transactionCategorizationLocalDataHelper';
8
8
  import { fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationSuccess, initializeTransactionCategorizationViewLocalData, resetOtherTabsFetchState, updateParentTotalCountForTab, updateTotalCountForTransactionCategorization, updateTransactionCategorizationUIState, } from '../../reducers/transactionsViewReducer';
9
+ import { DEFAULT_COMPLETED_SUB_TAB } from '../../types/completedSubTab';
9
10
  import { TRANSACTIONS_TABS, toTransactionsSortKey, } from '../../types/transactionsViewState';
10
11
  export const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchTransactionCategorization.match), switchMap((action) => {
11
12
  const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationTransactionsViewState, } = state$.value;
12
- const { period, keepExistingListItems, selectedTab, refreshViewInBackground, statuses, countOnlyStatuses, } = action.payload;
13
+ const { period, keepExistingListItems, selectedTab, refreshViewInBackground, } = action.payload;
13
14
  const uiState = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTab].uiState;
14
15
  const { pageToken, sortOrder, sortKey } = uiState;
15
16
  const currentTenant = getCurrentTenant(state$.value);
@@ -17,23 +18,18 @@ export const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) =>
17
18
  const queryParam = {
18
19
  start_date: toString(period.start),
19
20
  end_date: toString(period.end),
21
+ auto_categorized: selectedTab === 'autoCategorized',
20
22
  sort_by: toTransactionsSortKey(sortKey),
21
23
  sort_order: sortOrder === 'ascending' ? 'asc' : 'desc',
22
24
  page_token: pageToken,
23
25
  page_size: 25,
24
26
  search_text: uiState.searchString,
25
- statuses,
26
- count_only_statuses: countOnlyStatuses,
27
+ sub_tab: selectedTab === 'autoCategorized'
28
+ ? expenseAutomationTransactionsViewState.selectedTransactionCategorizationCompletedSubTab
29
+ : DEFAULT_COMPLETED_SUB_TAB,
27
30
  };
28
- // BETA TEST — Shubham dev namespace for transaction-categorization
29
- // `statuses` / `count_only_statuses` rollout. Revert before merge by
30
- // restoring `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}` in
31
- // place of the hardcoded base. Mirrored in
32
- // `backgroundRefetchReviewTabEpic.ts` and
33
- // `searchTransactionsForManualMatchEpic.ts` — grep `BETA TEST` to
34
- // find every override site.
35
31
  return zeniAPI
36
- .getJSON(`https://dev.api.zeni.ai/version/accounting/shubham/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
32
+ .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
37
33
  .pipe(mergeMap((response) => {
38
34
  if (isSuccessResponse(response) && response.data != null) {
39
35
  const updateActions = [];
@@ -56,11 +52,8 @@ export const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) =>
56
52
  updateActions.push(updateParentTotalCountForTab({
57
53
  selectedPeriod,
58
54
  selectedTab,
59
- // Optional — present only when the request supplied
60
- // `count_only_statuses`. The reducer no-ops on undefined so
61
- // any cached parent badge stays intact across scoped
62
- // fetches (sort changes, pagination, etc.).
63
- parentTotalCount: response.data.count_only_total,
55
+ parentTotalCount: response.data.parent_tab_total_count ??
56
+ response.data.total_count,
64
57
  }));
65
58
  updateActions.push(resetOtherTabsFetchState({
66
59
  refreshViewInBackground,
@@ -8,7 +8,7 @@ import { fetchOwnerList } from '../../../ownerList/ownerListReducer';
8
8
  import { fetchProjectList } from '../../../projectList/projectListReducer';
9
9
  import { fetchTransactionCategorization, fetchTransactionCategorizationView, } from '../../reducers/transactionsViewReducer';
10
10
  export const fetchTransactionCategorizationViewEpic = (actions$, state$) => actions$.pipe(filter(fetchTransactionCategorizationView.match), mergeMap((action) => {
11
- const { selectedTab, cacheOverride, keepExistingListItems, pageToken, period, refreshViewInBackground, searchString, resetListItems, isUncategorizedExpenseCategoryEnabled, statuses, countOnlyStatuses, } = action.payload;
11
+ const { selectedTab, cacheOverride, keepExistingListItems, pageToken, period, refreshViewInBackground, searchString, resetListItems, isUncategorizedExpenseCategoryEnabled, } = action.payload;
12
12
  const updateActions = [];
13
13
  const { expenseAutomationTransactionsViewState } = state$.value;
14
14
  const { fetchState, transactionIdsBySelectedPeriod } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTab];
@@ -42,7 +42,7 @@ export const fetchTransactionCategorizationViewEpic = (actions$, state$) => acti
42
42
  if (cacheOverride === true ||
43
43
  fetchState === 'Not-Started' ||
44
44
  transactionIds.length === 0) {
45
- updateActions.push(fetchTransactionCategorization(selectedTab, period, cacheOverride, keepExistingListItems, searchString, pageToken, refreshViewInBackground, resetListItems, isUncategorizedExpenseCategoryEnabled, statuses, countOnlyStatuses));
45
+ updateActions.push(fetchTransactionCategorization(selectedTab, period, cacheOverride, keepExistingListItems, searchString, pageToken, refreshViewInBackground, resetListItems, isUncategorizedExpenseCategoryEnabled));
46
46
  }
47
47
  return from(updateActions);
48
48
  }));
@@ -10,7 +10,7 @@ import { getSnackbarMessageForTransactionReview } from '../../helpers/transactio
10
10
  import { fetchTransactionCategorizationView, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateTotalCountForTransactionCategorization, } from '../../reducers/transactionsViewReducer';
11
11
  export const markTransactionAsNotMiscategorizedEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(markTransactionAsNotMiscategorized.match), mergeMap((action) => {
12
12
  const { expenseAutomationViewState, expenseAutomationTransactionsViewState, } = state$.value;
13
- const { transactionsInReview, selectedTab, isUncategorizedExpenseCategoryEnabled, reviewStatuses: reviewStatusesFromAction, } = action.payload;
13
+ const { transactionsInReview, selectedTab, isUncategorizedExpenseCategoryEnabled, } = action.payload;
14
14
  const transactionsSuccess = transactionsInReview.transactions_update_success;
15
15
  const transactionsFailed = transactionsInReview.transactions_update_failed;
16
16
  const currentTenant = getCurrentTenant(state$.value);
@@ -105,20 +105,9 @@ export const markTransactionAsNotMiscategorizedEpic = (actions$, state$, zeniAPI
105
105
  const timePeriodStart = toAbsoluteDay(period.start);
106
106
  const timePeriodEnd = toAbsoluteDay(period.end);
107
107
  if (timePeriodStart != null && timePeriodEnd != null) {
108
- // Statsig-resolved Review-tab statuses are threaded
109
- // through the EA save chain by `ExpenseAutomationScreen`
110
- // (resolves via `useDynamicConfig` +
111
- // `resolveTransactionCategorizationStatuses`). The
112
- // hardcoded `['pending_review']` last-resort prevents
113
- // accidental "all statuses" widening if the chain ever
114
- // delivers `undefined` (defensive — every live caller
115
- // should be passing this through).
116
- const reviewStatuses = reviewStatusesFromAction ?? [
117
- 'pending_review',
118
- ];
119
108
  actions.push(fetchTransactionCategorizationView('review', { start: timePeriodStart, end: timePeriodEnd }, true, // cacheOverride = true to force refresh
120
109
  false, undefined, undefined, true, // refreshViewInBackground
121
- false, isUncategorizedExpenseCategoryEnabled, reviewStatuses));
110
+ false, isUncategorizedExpenseCategoryEnabled));
122
111
  }
123
112
  }
124
113
  actions.push(updateTotalCountForTransactionCategorization({
@@ -6,7 +6,7 @@ import { getUncategorizedAccounts } from '../../../accountList/accountListSelect
6
6
  import { toTransactionUpdatesFromTransactionCategorizationLocalData } from '../../helpers/saveTransactionHelper';
7
7
  import { saveTransactionCategorization, updateTransactionCategorization, } from '../../reducers/transactionsViewReducer';
8
8
  export const saveTransactionCategorizationEpic = (actions$, state$) => actions$.pipe(filter(saveTransactionCategorization.match), mergeMap((action) => {
9
- const { transactionIds, cotTrackingByTransactionId, selectedTab, isUncategorizedExpenseCategoryEnabled, reviewStatuses, } = action.payload;
9
+ const { transactionIds, cotTrackingByTransactionId, selectedTab, isUncategorizedExpenseCategoryEnabled, } = action.payload;
10
10
  const fetchActions = [];
11
11
  const { transactionState, expenseAutomationTransactionsViewState } = state$.value;
12
12
  const transactionSaveUpdates = [];
@@ -19,10 +19,6 @@ export const saveTransactionCategorizationEpic = (actions$, state$) => actions$.
19
19
  transactionSaveUpdates.push(toTransactionUpdatesFromTransactionCategorizationLocalData(localData, transaction, uncategorizedIncomeExpense));
20
20
  }
21
21
  });
22
- // Forward `reviewStatuses` so the downstream
23
- // `updateTransactionCategorizationEpic` -> `markTransactionAsNotMiscategorized`
24
- // chain receives the Statsig-resolved Review-tab statuses end-to-end
25
- // without reading Statsig from epic-land.
26
- fetchActions.push(updateTransactionCategorization(selectedTab, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled, reviewStatuses));
22
+ fetchActions.push(updateTransactionCategorization(selectedTab, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled));
27
23
  return from(fetchActions);
28
24
  }));
@@ -4,7 +4,7 @@ import { convertToPeriod, toAbsoluteDay, } from '../../../../commonStateTypes/ti
4
4
  import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
5
  import { backgroundRefetchReviewTab, syncTransactionCategorizationFromDetailSave, } from '../../reducers/transactionsViewReducer';
6
6
  export const triggerReviewTabRefetchEpic = (actions$, state$) => actions$.pipe(filter(syncTransactionCategorizationFromDetailSave.match), mergeMap((action) => {
7
- const { pendingReviewLineIds, transactionId, isUncategorizedExpenseCategoryEnabled, reviewStatuses, } = action.payload;
7
+ const { pendingReviewLineIds, transactionId, isUncategorizedExpenseCategoryEnabled, } = action.payload;
8
8
  if (pendingReviewLineIds.length === 0) {
9
9
  return EMPTY;
10
10
  }
@@ -23,5 +23,5 @@ export const triggerReviewTabRefetchEpic = (actions$, state$) => actions$.pipe(f
23
23
  if (timePeriodStart == null || timePeriodEnd == null) {
24
24
  return EMPTY;
25
25
  }
26
- return of(backgroundRefetchReviewTab({ start: timePeriodStart, end: timePeriodEnd }, isUncategorizedExpenseCategoryEnabled, reviewStatuses));
26
+ return of(backgroundRefetchReviewTab({ start: timePeriodStart, end: timePeriodEnd }, isUncategorizedExpenseCategoryEnabled));
27
27
  }));
@@ -15,7 +15,7 @@ import { getVendorByVendorId } from '../../../../entity/vendor/vendorSelector';
15
15
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
16
16
  import { markTransactionAsNotMiscategorized, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, } from '../../reducers/transactionsViewReducer';
17
17
  export const updateTransactionCategorizationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(updateTransactionCategorization.match), mergeMap((action) => {
18
- const { selectedTab, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled, reviewStatuses, } = action.payload;
18
+ const { selectedTab, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled, } = action.payload;
19
19
  const { transactionState, vendorState, expenseAutomationTransactionsViewState, } = state$.value;
20
20
  const payloadArray = preparePayload(selectedTab, transactionState, vendorState, expenseAutomationTransactionsViewState, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId).filter((payload) => payload != null);
21
21
  return zeniAPI
@@ -24,11 +24,7 @@ export const updateTransactionCategorizationEpic = (actions$, state$, zeniAPI) =
24
24
  if (isSuccessResponse(response) && response.data != null) {
25
25
  const transactionsInReview = response.data;
26
26
  const actions = [];
27
- // Forward `reviewStatuses` so the downstream
28
- // `markTransactionAsNotMiscategorizedEpic` can request the
29
- // Statsig-resolved Review-tab statuses for its conditional
30
- // background refetch via `fetchTransactionCategorizationView`.
31
- actions.push(markTransactionAsNotMiscategorized(selectedTab, transactionsInReview, isUncategorizedExpenseCategoryEnabled, reviewStatuses), updateTransactionCategorizationSaveStatus(selectedTab, 'Completed', createZeniAPIStatus('Completed', 'Transaction categorization updated successfully')));
27
+ actions.push(markTransactionAsNotMiscategorized(selectedTab, transactionsInReview, isUncategorizedExpenseCategoryEnabled), updateTransactionCategorizationSaveStatus(selectedTab, 'Completed', createZeniAPIStatus('Completed', 'Transaction categorization updated successfully')));
32
28
  return from(actions);
33
29
  }
34
30
  else {
@@ -18,37 +18,20 @@ const expenseAutomationView = createSlice({
18
18
  reducer() {
19
19
  //do nothing
20
20
  },
21
- /**
22
- * `statuses` / `countOnlyStatuses` carry the Statsig-resolved values
23
- * for the currently selected transaction-categorization tab. The
24
- * host (`ExpenseAutomationScreen`) resolves them via
25
- * `useDynamicConfig` + `resolveTransactionCategorizationStatuses`
26
- * and passes them in so the downstream bootstrap fetch hits the
27
- * listing API with the correct status filter. Optional only as a
28
- * defensive type concession for non-categorization callers (the
29
- * action is also used to bootstrap the missing-receipts / reconciliation
30
- * / month-end views, which don't consume these args).
31
- */
32
- prepare(cacheOverride = false, refreshViewInBackground = false, isUncategorizedExpenseCategoryEnabled = false, statuses, countOnlyStatuses) {
21
+ prepare(cacheOverride = false, refreshViewInBackground = false, isUncategorizedExpenseCategoryEnabled = false) {
33
22
  return {
34
23
  payload: {
35
24
  cacheOverride,
36
25
  refreshViewInBackground,
37
26
  isUncategorizedExpenseCategoryEnabled,
38
- statuses,
39
- countOnlyStatuses,
40
27
  },
41
28
  };
42
29
  },
43
30
  },
44
31
  refreshExpenseAutomationCurrentTab: {
45
- prepare(isUncategorizedExpenseCategoryEnabled, statuses, countOnlyStatuses) {
32
+ prepare(isUncategorizedExpenseCategoryEnabled) {
46
33
  return {
47
- payload: {
48
- isUncategorizedExpenseCategoryEnabled,
49
- statuses,
50
- countOnlyStatuses,
51
- },
34
+ payload: { isUncategorizedExpenseCategoryEnabled },
52
35
  };
53
36
  },
54
37
  reducer() {
@@ -5,6 +5,7 @@ import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
5
5
  import { isVendorTransaction } from '../../../entity/transaction/stateTypes/vendorTransaction';
6
6
  import { filterAutoTabLineItems, mergeTabSpecificLineItems, removeTransactionFromTabView, setEntityRecommendationForLineIdInLocalData, shouldAutoSelectAndAdd, toSetAllLineItemsToCategoryClass, toTransactionDetailLocalData, } from '../helpers/transactionCategorizationLocalDataHelper';
7
7
  import { DEFAULT_COMPLETED_SUB_TAB, } from '../types/completedSubTab';
8
+ import { TRANSACTIONS_TABS, } from '../types/transactionsViewState';
8
9
  export const initialTransactionTabViewState = {
9
10
  saveStatus: {
10
11
  fetchState: 'Not-Started',
@@ -120,7 +121,7 @@ const expenseAutomationTransactionsView = createSlice({
120
121
  reducers: {
121
122
  fetchTransactionCategorizationView: {
122
123
  prepare(selectedTab, period, cacheOverride = false, keepExistingListItems = false, searchString, // when this is defined the output should go to search result IDs
123
- pageToken, refreshViewInBackground = false, resetListItems = false, isUncategorizedExpenseCategoryEnabled, statuses, countOnlyStatuses) {
124
+ pageToken, refreshViewInBackground = false, resetListItems = false, isUncategorizedExpenseCategoryEnabled) {
124
125
  return {
125
126
  payload: {
126
127
  selectedTab,
@@ -132,8 +133,6 @@ const expenseAutomationTransactionsView = createSlice({
132
133
  refreshViewInBackground,
133
134
  resetListItems,
134
135
  isUncategorizedExpenseCategoryEnabled,
135
- statuses,
136
- countOnlyStatuses,
137
136
  },
138
137
  };
139
138
  },
@@ -182,7 +181,7 @@ const expenseAutomationTransactionsView = createSlice({
182
181
  }
183
182
  },
184
183
  prepare(selectedTab, period, cacheOverride = false, keepExistingListItems = false, searchString, // when this is defined the output should go to search result IDs
185
- pageToken, refreshViewInBackground = false, resetListItems, isUncategorizedExpenseCategoryEnabled, statuses, countOnlyStatuses) {
184
+ pageToken, refreshViewInBackground = false, resetListItems, isUncategorizedExpenseCategoryEnabled) {
186
185
  return {
187
186
  payload: {
188
187
  selectedTab,
@@ -194,8 +193,6 @@ const expenseAutomationTransactionsView = createSlice({
194
193
  refreshViewInBackground,
195
194
  resetListItems,
196
195
  isUncategorizedExpenseCategoryEnabled,
197
- statuses,
198
- countOnlyStatuses,
199
196
  },
200
197
  };
201
198
  },
@@ -314,25 +311,13 @@ const expenseAutomationTransactionsView = createSlice({
314
311
  draft.transactionCategorizationView[selectedTab].filters = filters;
315
312
  },
316
313
  saveTransactionCategorization: {
317
- /**
318
- * `reviewStatuses` carries the Statsig-resolved Review-tab statuses
319
- * forwarded by `ExpenseAutomationScreen`.
320
- * `saveTransactionCategorizationEpic` threads them downstream into
321
- * `updateTransactionCategorization` -> `markTransactionAsNotMiscategorized`
322
- * so the conditional background Review-tab refetch in
323
- * `markTransactionAsNotMiscategorizedEpic` can request the correct
324
- * status set without reading Statsig from epic-land. Optional during
325
- * the deprecation window so un-migrated callers continue to work via
326
- * slice fallback.
327
- */
328
- prepare(selectedTab, transactionIds, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled, reviewStatuses) {
314
+ prepare(selectedTab, transactionIds, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled) {
329
315
  return {
330
316
  payload: {
331
317
  selectedTab,
332
318
  transactionIds,
333
319
  cotTrackingByTransactionId,
334
320
  isUncategorizedExpenseCategoryEnabled,
335
- reviewStatuses,
336
321
  },
337
322
  };
338
323
  },
@@ -406,16 +391,9 @@ const expenseAutomationTransactionsView = createSlice({
406
391
  fetchState: 'In-Progress',
407
392
  };
408
393
  },
409
- /**
410
- * `reviewStatuses` carries the Statsig-resolved Review-tab statuses
411
- * forwarded from `saveTransactionCategorization`.
412
- * `updateTransactionCategorizationEpic` threads them downstream into
413
- * `markTransactionAsNotMiscategorized`.
414
- */
415
- prepare(selectedTab, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled, reviewStatuses) {
394
+ prepare(selectedTab, transactionIds, transactionSaveUpdates, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled) {
416
395
  return {
417
396
  payload: {
418
- reviewStatuses,
419
397
  selectedTab,
420
398
  transactionIds,
421
399
  transactionSaveUpdates,
@@ -880,20 +858,12 @@ const expenseAutomationTransactionsView = createSlice({
880
858
  error: undefined,
881
859
  };
882
860
  },
883
- /**
884
- * `reviewStatuses` carries the Statsig-resolved Review-tab statuses
885
- * forwarded from the EA-screen save chain.
886
- * `markTransactionAsNotMiscategorizedEpic` reads this payload value
887
- * when dispatching the conditional background Review-tab refetch via
888
- * `fetchTransactionCategorizationView`.
889
- */
890
- prepare(selectedTab, transactionsInReview, isUncategorizedExpenseCategoryEnabled, reviewStatuses) {
861
+ prepare(selectedTab, transactionsInReview, isUncategorizedExpenseCategoryEnabled) {
891
862
  return {
892
863
  payload: {
893
864
  selectedTab,
894
865
  transactionsInReview,
895
866
  isUncategorizedExpenseCategoryEnabled,
896
- reviewStatuses,
897
867
  },
898
868
  };
899
869
  },
@@ -951,17 +921,10 @@ const expenseAutomationTransactionsView = createSlice({
951
921
  },
952
922
  updateTotalCountForTransactionCategorization(draft, action) {
953
923
  const { selectedTab, selectedPeriod, totalCount } = action.payload;
954
- const periodId = toMonthYearPeriodId(selectedPeriod);
955
- draft.transactionCategorizationView[selectedTab].uiState.totalCount[periodId] = totalCount;
956
- if (selectedTab === 'review') {
957
- draft.parentTotalCountByTab.review[periodId] = totalCount;
958
- }
924
+ draft.transactionCategorizationView[selectedTab].uiState.totalCount[toMonthYearPeriodId(selectedPeriod)] = totalCount;
959
925
  },
960
926
  updateParentTotalCountForTab(draft, action) {
961
927
  const { selectedTab, selectedPeriod, parentTotalCount } = action.payload;
962
- if (parentTotalCount == null) {
963
- return;
964
- }
965
928
  draft.parentTotalCountByTab[selectedTab][toMonthYearPeriodId(selectedPeriod)] = parentTotalCount;
966
929
  },
967
930
  updateSelectedCheckboxTransactionIds(draft, action) {
@@ -1010,7 +973,7 @@ const expenseAutomationTransactionsView = createSlice({
1010
973
  },
1011
974
  },
1012
975
  syncTransactionCategorizationFromDetailSave: {
1013
- prepare(transactionId, updatedTransaction, pendingReviewLineIds, uncategorizedIncomeExpense, isUncategorizedExpenseCategoryEnabled, reviewStatuses) {
976
+ prepare(transactionId, updatedTransaction, pendingReviewLineIds, uncategorizedIncomeExpense, isUncategorizedExpenseCategoryEnabled) {
1014
977
  return {
1015
978
  payload: {
1016
979
  transactionId,
@@ -1018,7 +981,6 @@ const expenseAutomationTransactionsView = createSlice({
1018
981
  pendingReviewLineIds,
1019
982
  uncategorizedIncomeExpense,
1020
983
  isUncategorizedExpenseCategoryEnabled,
1021
- reviewStatuses,
1022
984
  },
1023
985
  };
1024
986
  },
@@ -1064,12 +1026,11 @@ const expenseAutomationTransactionsView = createSlice({
1064
1026
  },
1065
1027
  },
1066
1028
  backgroundRefetchReviewTab: {
1067
- prepare(period, isUncategorizedExpenseCategoryEnabled, reviewStatuses) {
1029
+ prepare(period, isUncategorizedExpenseCategoryEnabled) {
1068
1030
  return {
1069
1031
  payload: {
1070
1032
  period,
1071
1033
  isUncategorizedExpenseCategoryEnabled,
1072
- reviewStatuses,
1073
1034
  },
1074
1035
  };
1075
1036
  },
@@ -1080,7 +1041,18 @@ const expenseAutomationTransactionsView = createSlice({
1080
1041
  };
1081
1042
  },
1082
1043
  },
1044
+ removeTransactionFromAllTabs: {
1045
+ prepare(transactionId) {
1046
+ return { payload: { transactionId } };
1047
+ },
1048
+ reducer(draft, action) {
1049
+ const { transactionId } = action.payload;
1050
+ for (const tab of TRANSACTIONS_TABS) {
1051
+ removeTransactionFromTabView(draft.transactionCategorizationView[tab], transactionId);
1052
+ }
1053
+ },
1054
+ },
1083
1055
  },
1084
1056
  });
1085
- export const { fetchTransactionCategorization, updateTransactionCategorizationUIState, updateTransactionFilters, initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, setAllItemsToCategoryClassInLocalDataForCategorization, updateTotalCountForTransactionCategorization, updateParentTotalCountForTab, fetchTransactionCategorizationSuccess, resetOtherTabsFetchState, fetchTransactionCategorizationView, updateSelectedCheckboxTransactionIds, clearExpenseAutomationTransactionsViewPerTabView, clearExpenseAutomationTransactionsView, setEntityRecommendationForLineIdsForCategorization, markCategoryClassRecommendationsInProgressForCategorization, markCategoryClassRecommendationsCompletedForCategorization, markCategoryClassRecommendationsFailureForCategorization, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } = expenseAutomationTransactionsView.actions;
1057
+ export const { fetchTransactionCategorization, updateTransactionCategorizationUIState, updateTransactionFilters, initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, setAllItemsToCategoryClassInLocalDataForCategorization, updateTotalCountForTransactionCategorization, updateParentTotalCountForTab, fetchTransactionCategorizationSuccess, resetOtherTabsFetchState, fetchTransactionCategorizationView, updateSelectedCheckboxTransactionIds, clearExpenseAutomationTransactionsViewPerTabView, clearExpenseAutomationTransactionsView, setEntityRecommendationForLineIdsForCategorization, markCategoryClassRecommendationsInProgressForCategorization, markCategoryClassRecommendationsCompletedForCategorization, markCategoryClassRecommendationsFailureForCategorization, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, removeTransactionFromAllTabs, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } = expenseAutomationTransactionsView.actions;
1086
1058
  export default expenseAutomationTransactionsView.reducer;
@@ -8,6 +8,7 @@ import { getSupportedTransactionsByIds } from '../../../entity/transaction/trans
8
8
  import { applyTransactionFilters, } from '../transactionFilterHelpers';
9
9
  import { getAccountList, getNestedAccountListHierarchy, getUncategorizedAccounts, } from '../../accountList/accountListSelector';
10
10
  import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
11
+ import { getResolvedTransferAccounts } from '../../createTransferEntry/createTransferEntrySelector';
11
12
  import { getProjectList } from '../../projectList/projectListSelector';
12
13
  import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
13
14
  // Walks the tab's transactionReviewLocalDataById map and returns
@@ -81,8 +82,11 @@ export const toTransactionView = (transaction, transactionLocalData) => {
81
82
  transactionLocalData,
82
83
  };
83
84
  };
85
+ // Re-exported here for back-compat. New code should import from
86
+ // `view/createTransferEntry/createTransferEntrySelector`.
87
+ export { getLastTransferEntryReplacement } from '../../createTransferEntry/createTransferEntrySelector';
84
88
  export function getExpenseAutomationTransactionView(state) {
85
- const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, projectState, projectListState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
89
+ const { accountState, classState, classListState, accountListState, createTransferEntryState, expenseAutomationTransactionsViewState, expenseAutomationViewState, projectState, projectListState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
86
90
  const { selectedTransactionCategorizationCompletedSubTab, selectedTransactionCategorizationTab, } = expenseAutomationTransactionsViewState;
87
91
  const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, filters, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
88
92
  const uncategorizedIncomeExpense = getUncategorizedAccounts(accountState, accountListState, 'accountList');
@@ -182,11 +186,10 @@ export function getExpenseAutomationTransactionView(state) {
182
186
  review: monthYearPeriodId != null ? totalCountByReview[monthYearPeriodId] : 0,
183
187
  autoCategorized: monthYearPeriodId != null ? totalCountByAutoCat[monthYearPeriodId] : 0,
184
188
  };
185
- // Parent-tab badge counts. Sourced from the listing response's optional
186
- // `count_only_total` (only emitted when the request supplied
187
- // `count_only_statuses`) and used exclusively by the navbar / tab strip
188
- // badges. Independent of which Completed sub-tab is active so the badge
189
- // stays stable across sub-tab switches.
189
+ // Parent-tab badge counts. Sourced from `parent_tab_total_count` in the
190
+ // listing response and used exclusively by the navbar / tab strip badges.
191
+ // Independent of which Completed sub-tab is active so the badge stays
192
+ // stable across sub-tab switches.
190
193
  const parentTotalCountByTab = expenseAutomationTransactionsViewState.parentTotalCountByTab;
191
194
  const parentTabTotalCountByTab = {
192
195
  review: monthYearPeriodId != null
@@ -215,6 +218,7 @@ export function getExpenseAutomationTransactionView(state) {
215
218
  : [];
216
219
  const transactionCompletionStatus = allSteps.find((step) => step.step === 'transaction_categorization')?.completionStatus;
217
220
  const completionStatus = transactionCompletionStatus ?? 'incomplete';
221
+ const { transferAccountsList, creditCardTransferAccountsList } = getResolvedTransferAccounts(state);
218
222
  const inFlightCategoryClassRecommendationsByTransactionId = getCategorizationInFlightRecommendationsByTransactionId(state);
219
223
  const hasInFlightCategoryClassRecommendations = getCategorizationHasInFlightRecommendations(state);
220
224
  return {
@@ -239,6 +243,7 @@ export function getExpenseAutomationTransactionView(state) {
239
243
  refreshStatus,
240
244
  saveStatus,
241
245
  markAsNotMiscategorizedStatus,
246
+ createTransferEntryStatus: createTransferEntryState.createTransferEntryStatus,
242
247
  completionStatus,
243
248
  totalCountByTab,
244
249
  parentTabTotalCountByTab,
@@ -246,6 +251,8 @@ export function getExpenseAutomationTransactionView(state) {
246
251
  uploadReceiptStatusById,
247
252
  selectedTransactionId,
248
253
  selectedTransactionLineId,
254
+ creditCardTransferAccountsList,
255
+ transferAccounts: transferAccountsList,
249
256
  selectedTransactionCategorizationCompletedSubTab,
250
257
  };
251
258
  }
@@ -28,28 +28,87 @@ export const TRANSACTION_FILTER_CATEGORIES = [
28
28
  { value: 'class', type: 'dropdown' },
29
29
  { value: 'amount', type: 'numberRange' },
30
30
  ];
31
+ /**
32
+ * Per-line amounts for a transaction, preserving the canonical source
33
+ * precedence:
34
+ *
35
+ * 1. `transactionLocalData.transactionReviewLocalData.lineItemById` —
36
+ * the locally-edited line items the user sees in the grid. Reflects
37
+ * unsaved edits so the filter matches what the user actually has on
38
+ * screen, not the pre-edit server state.
39
+ * 2. `transaction.transaction.lines` — persisted lines from the
40
+ * transaction payload.
41
+ * 3. `[transaction.amount.amount]` — single-element fallback for
42
+ * transactions that don't have a `lines` array at all (treat the
43
+ * transaction-level amount as a one-line transaction).
44
+ *
45
+ * Returned as an array so the amount filter in `transactionMatchesCategory`
46
+ * can OR-combine per-line `matchAmount` results: a transaction is included
47
+ * if ANY of its lines satisfies the operator, and the full row (with all
48
+ * lines, matching or not) renders downstream. Before the per-line change
49
+ * this helper's predecessor in `getCategoryValueForTransaction` summed
50
+ * these values into a single aggregate and compared the sum.
51
+ *
52
+ * **Missing amounts.** Lines (or transactions) whose amount field is
53
+ * `null` / `undefined` / `NaN` are *dropped* from the returned array
54
+ * rather than coerced to `0`. Coercing to `0` would silently make a
55
+ * row with no amount data match operators like `less_than 100`, even
56
+ * though we genuinely don't know what the amount is — a semantic
57
+ * regression flagged in PR review. By filtering instead, the empty-array
58
+ * case bubbles up to `transactionMatchesCategory`, which falls back to
59
+ * the same "absent value: only `not_equal` matches" contract used by
60
+ * non-amount fields.
61
+ *
62
+ * The defensive `?.` chains stay in place so a partial payload (state
63
+ * init, Pusher mid-sync, partially-resolved server response) doesn't
64
+ * throw; the difference is `?? 0` → filter-out.
65
+ */
66
+ const getLineAmountsForTransaction = (transaction) => {
67
+ const localData = transaction?.transactionLocalData?.transactionReviewLocalData;
68
+ if (localData?.lineItemById != null) {
69
+ const lineItems = Object.values(localData.lineItemById);
70
+ if (lineItems.length > 0) {
71
+ return lineItems
72
+ .map((lineItem) => lineItem?.amount?.amount)
73
+ .filter(isFiniteNumber);
74
+ }
75
+ }
76
+ if (transaction?.transaction?.lines != null &&
77
+ transaction.transaction.lines.length > 0) {
78
+ return transaction.transaction.lines
79
+ .map((line) => line?.amount?.amount)
80
+ .filter(isFiniteNumber);
81
+ }
82
+ const txAmount = transaction?.amount?.amount;
83
+ return isFiniteNumber(txAmount) ? [txAmount] : [];
84
+ };
85
+ /**
86
+ * Type guard that survives an `Array<number | undefined>.filter(...)` and
87
+ * narrows the result to `number[]`. Also rejects `NaN` so downstream
88
+ * `matchAmount` never sees a value that fails every operator silently
89
+ * (because every comparison with `NaN` is false, `NaN < 100`, `NaN > 100`,
90
+ * `NaN === N` all yield `false` — the row would silently slip through
91
+ * `not_equal` but fail every other operator, which is exactly the
92
+ * absent-value contract we want to apply explicitly via an empty array
93
+ * instead).
94
+ */
95
+ const isFiniteNumber = (value) => typeof value === 'number' && Number.isFinite(value);
31
96
  /**
32
97
  * Resolve the comparable value for a transaction against a given filter field.
33
98
  * Returns undefined when the transaction doesn't carry the field — callers
34
99
  * decide whether absence counts as a match (for 'not_equal' it does).
100
+ *
101
+ * NOTE: the `'amount'` field is NOT handled here. Amount matching is
102
+ * per-line (see `getLineAmountsForTransaction` + the early-return in
103
+ * `transactionMatchesCategory`) and would otherwise need to return a
104
+ * non-scalar value that doesn't fit this helper's contract.
35
105
  */
36
106
  const getCategoryValueForTransaction = (key, transaction) => {
37
107
  switch (key) {
38
108
  case 'amount': {
39
- // Prefer transactionLocalData line items (sum). Fall back to lines on
40
- // the transaction itself. Final fallback: transaction-level amount.
41
- const localDataForAmount = transaction.transactionLocalData?.transactionReviewLocalData;
42
- if (localDataForAmount?.lineItemById) {
43
- const lineItems = Object.values(localDataForAmount.lineItemById);
44
- if (lineItems.length > 0) {
45
- return lineItems.reduce((sum, lineItem) => sum + (lineItem.amount?.amount ?? 0), 0);
46
- }
47
- }
48
- if (transaction.transaction.lines &&
49
- transaction.transaction.lines.length > 0) {
50
- return transaction.transaction.lines.reduce((sum, line) => sum + (line.amount?.amount ?? 0), 0);
51
- }
52
- return transaction.amount.amount;
109
+ // Handled per-line in `transactionMatchesCategory` see the note on
110
+ // this function's JSDoc and `getLineAmountsForTransaction` above.
111
+ return undefined;
53
112
  }
54
113
  case 'payee': {
55
114
  if (isNonEmptyString(transaction.vendorName)) {
@@ -187,6 +246,37 @@ const matchAmount = (amount, category) => {
187
246
  return op === 'not_equal' ? !matched : matched;
188
247
  };
189
248
  const transactionMatchesCategory = (transaction, category) => {
249
+ if (category.field === 'amount') {
250
+ // Per-line matching: the transaction is included if ANY of its lines
251
+ // satisfies the operator. This is what the user expects when a
252
+ // multi-line transaction contains lines at different amounts — they
253
+ // want the row to surface if even one line falls in the filter's
254
+ // range. The full row (with non-matching lines too) renders
255
+ // downstream; this matcher only decides row inclusion. Same
256
+ // operator + sign semantics as the aggregate version, just applied
257
+ // per line.
258
+ //
259
+ // `not_equal` deserves a sanity-check: `matchAmount` already inverts
260
+ // internally for that operator, so for a line whose amount is NOT
261
+ // in the filter's `values`, matchAmount returns true; for a line
262
+ // whose amount IS in the values, it returns false. `.some()` over
263
+ // lines therefore means "the transaction has at least one line that
264
+ // is not equal to any of the filter values" — which is the right
265
+ // match-any-line interpretation of `not_equal` (a transaction
266
+ // matches if it has a line that satisfies the negation).
267
+ const lineAmounts = getLineAmountsForTransaction(transaction);
268
+ if (lineAmounts.length === 0) {
269
+ // No valid (finite) amount data on the transaction or its lines —
270
+ // apply the same absent-value contract the generic branch below
271
+ // uses for non-amount fields: only `not_equal` matches a missing
272
+ // value, every other operator excludes it. Coercing missing
273
+ // amounts to `0` upstream (the previous behavior) would have made
274
+ // such rows silently match `less_than 100`, `in_between [0, 50]`,
275
+ // etc., which the PR review correctly flagged as a regression.
276
+ return category.matchingOperator === 'not_equal';
277
+ }
278
+ return lineAmounts.some((lineAmount) => matchAmount(lineAmount, category));
279
+ }
190
280
  const value = getCategoryValueForTransaction(category.field, transaction);
191
281
  if (value == null) {
192
282
  // Absent-value semantics — pinning these down explicitly so the
@@ -206,12 +296,10 @@ const transactionMatchesCategory = (transaction, category) => {
206
296
  // are filtered out.
207
297
  //
208
298
  // Only the `not_equal` branch returns `true` here; everything else
209
- // falls through to the `false` below.
299
+ // falls through to the `false` below. Note: 'amount' never lands here
300
+ // because it short-circuits to the per-line path above.
210
301
  return category.matchingOperator === 'not_equal';
211
302
  }
212
- if (category.field === 'amount') {
213
- return matchAmount(Number(value), category);
214
- }
215
303
  const valueStr = value.toString();
216
304
  const valueInList = category.values.some((v) => v.toString() === valueStr);
217
305
  return category.matchingOperator === 'not_equal' ? !valueInList : valueInList;