@zeniai/client-epic-state 5.0.92-betaNB2 → 5.0.93-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 (289) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
  2. package/lib/commonStateTypes/animations.d.ts +1 -1
  3. package/lib/commonStateTypes/animations.js +1 -0
  4. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
  5. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -20
  6. package/lib/entity/accountRecon/accountReconPayload.js +1 -23
  7. package/lib/entity/accountRecon/accountReconSelector.d.ts +1 -6
  8. package/lib/entity/accountRecon/accountReconSelector.js +0 -5
  9. package/lib/entity/accountRecon/accountReconState.d.ts +0 -19
  10. package/lib/entity/aiCfo/aiCfoPayload.d.ts +63 -5
  11. package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
  12. package/lib/entity/aiCfo/aiCfoReducer.js +249 -9
  13. package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
  14. package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
  15. package/lib/entity/aiCfo/aiCfoState.d.ts +97 -4
  16. package/lib/entity/aiCfo/aiCfoState.js +18 -1
  17. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +277 -0
  18. package/lib/entity/cardPolicy/cardPolicyPayload.js +143 -0
  19. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +19 -0
  20. package/lib/entity/cardPolicy/cardPolicyReducer.js +175 -0
  21. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +32 -0
  22. package/lib/entity/cardPolicy/cardPolicySelector.js +99 -0
  23. package/lib/entity/cardPolicy/cardPolicyState.d.ts +205 -0
  24. package/lib/entity/cardPolicy/cardPolicyState.js +14 -0
  25. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +18 -0
  26. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +68 -0
  27. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +26 -0
  28. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +47 -0
  29. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +25 -0
  30. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +39 -0
  31. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +24 -0
  32. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +105 -0
  33. package/lib/entity/company/companyPayload.d.ts +4 -0
  34. package/lib/entity/company/companyPayload.js +4 -0
  35. package/lib/entity/company/companyStateTypes.d.ts +4 -0
  36. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  37. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +0 -7
  38. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -9
  39. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -8
  40. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  41. package/lib/entity/paymentAccount/paymentAccountSelector.js +4 -0
  42. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  43. package/lib/entity/snackbar/snackbarTypes.js +3 -0
  44. package/lib/entity/tenant/clearAllEpic.d.ts +6 -2
  45. package/lib/entity/tenant/clearAllEpic.js +8 -0
  46. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  47. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
  48. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
  49. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  50. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  51. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  52. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  53. package/lib/entity/tenant/tenantReducer.d.ts +38 -25
  54. package/lib/entity/tenant/tenantReducer.js +65 -5
  55. package/lib/entity/tenant/tenantState.d.ts +1 -0
  56. package/lib/epic.d.ts +19 -3
  57. package/lib/epic.js +20 -3
  58. package/lib/esm/commonStateTypes/animations.js +1 -0
  59. package/lib/esm/entity/accountRecon/accountReconPayload.js +1 -23
  60. package/lib/esm/entity/accountRecon/accountReconSelector.js +0 -5
  61. package/lib/esm/entity/aiCfo/aiCfoReducer.js +249 -9
  62. package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
  63. package/lib/esm/entity/aiCfo/aiCfoState.js +15 -0
  64. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +130 -0
  65. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +171 -0
  66. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +75 -0
  67. package/lib/esm/entity/cardPolicy/cardPolicyState.js +9 -0
  68. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +64 -0
  69. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +43 -0
  70. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +35 -0
  71. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +101 -0
  72. package/lib/esm/entity/company/companyPayload.js +4 -0
  73. package/lib/esm/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -9
  74. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
  75. package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
  76. package/lib/esm/entity/tenant/clearAllEpic.js +8 -0
  77. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
  78. package/lib/esm/entity/tenant/tenantReducer.js +63 -3
  79. package/lib/esm/epic.js +20 -3
  80. package/lib/esm/index.js +48 -15
  81. package/lib/esm/reducer.js +12 -0
  82. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +6 -3
  83. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  84. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +2 -1
  85. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  86. package/lib/esm/view/expenseAutomationView/payload/reconciliationPayload.js +0 -73
  87. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -98
  88. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -20
  89. package/lib/esm/view/expenseAutomationView/types/reconciliationViewState.js +0 -20
  90. package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
  91. package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
  92. package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
  93. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +42 -0
  94. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
  95. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
  96. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +217 -50
  97. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +7 -1
  98. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +12 -0
  99. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +52 -0
  100. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +22 -0
  101. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +1 -0
  102. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +36 -0
  103. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +39 -0
  104. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +34 -0
  105. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +58 -0
  106. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +21 -0
  107. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +1 -0
  108. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +38 -0
  109. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +289 -0
  110. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +109 -0
  111. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +44 -0
  112. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +111 -0
  113. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +25 -0
  114. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +363 -0
  115. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +36 -0
  116. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +19 -0
  117. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +6 -0
  118. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +119 -0
  119. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +154 -0
  120. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +22 -0
  121. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +1 -0
  122. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +39 -0
  123. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +140 -0
  124. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +20 -0
  125. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +100 -0
  126. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +96 -0
  127. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +59 -0
  128. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +24 -0
  129. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +25 -0
  130. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +1 -0
  131. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +34 -0
  132. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +57 -0
  133. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +35 -0
  134. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
  135. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +42 -4
  136. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +35 -0
  137. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +62 -0
  138. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +44 -0
  139. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
  140. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +67 -0
  141. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
  142. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
  143. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +105 -52
  144. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  145. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
  146. package/lib/index.d.ts +57 -19
  147. package/lib/index.js +217 -37
  148. package/lib/reducer.d.ts +12 -0
  149. package/lib/reducer.js +12 -0
  150. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +11 -2
  151. package/lib/view/aiCfoView/aiCfoViewReducer.js +6 -3
  152. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  153. package/lib/view/aiCfoView/epics/createSessionEpic.js +2 -1
  154. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -1
  155. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  156. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  157. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +1 -83
  158. package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +0 -75
  159. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +3 -35
  160. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +5 -99
  161. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +1 -5
  162. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -20
  163. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -129
  164. package/lib/view/expenseAutomationView/types/reconciliationViewState.js +0 -21
  165. package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
  166. package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
  167. package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
  168. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
  169. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +46 -0
  170. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
  171. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -0
  172. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
  173. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
  174. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
  175. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
  176. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +219 -51
  177. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +5 -1
  178. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +11 -2
  179. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +40 -0
  180. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -1
  181. package/lib/view/people/peopleTypes.d.ts +1 -1
  182. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  183. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +14 -0
  184. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +56 -0
  185. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +15 -0
  186. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +28 -0
  187. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +8 -0
  188. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +2 -0
  189. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +8 -0
  190. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +40 -0
  191. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +8 -0
  192. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +43 -0
  193. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +8 -0
  194. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +38 -0
  195. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +15 -0
  196. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +62 -0
  197. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +15 -0
  198. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +27 -0
  199. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +7 -0
  200. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +2 -0
  201. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +8 -0
  202. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +42 -0
  203. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +8 -0
  204. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +294 -0
  205. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +8 -0
  206. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +113 -0
  207. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +9 -0
  208. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +48 -0
  209. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +8 -0
  210. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +115 -0
  211. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +13 -0
  212. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +29 -0
  213. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +14 -0
  214. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +369 -0
  215. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +6 -0
  216. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +40 -0
  217. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +7 -0
  218. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +26 -0
  219. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +116 -0
  220. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +10 -0
  221. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +33 -0
  222. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +126 -0
  223. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +52 -0
  224. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +158 -0
  225. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +11 -0
  226. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +31 -0
  227. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +12 -0
  228. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +2 -0
  229. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +8 -0
  230. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +43 -0
  231. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +10 -0
  232. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +144 -0
  233. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +7 -0
  234. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +24 -0
  235. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +11 -0
  236. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +104 -0
  237. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +22 -0
  238. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +100 -0
  239. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +8 -0
  240. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +63 -0
  241. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +3 -0
  242. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +28 -0
  243. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  244. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +14 -0
  245. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +27 -1
  246. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +34 -0
  247. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +2 -0
  248. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +7 -0
  249. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +38 -0
  250. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +12 -0
  251. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +61 -0
  252. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +9 -0
  253. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +39 -0
  254. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  255. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
  256. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +12 -2
  257. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +43 -5
  258. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +7 -0
  259. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +42 -1
  260. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +5 -0
  261. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +11 -0
  262. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +66 -0
  263. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +3 -0
  264. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +48 -0
  265. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
  266. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +62 -0
  267. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +30 -0
  268. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +71 -0
  269. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +33 -0
  270. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
  271. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
  272. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
  273. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
  274. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +106 -53
  275. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
  276. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  277. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
  278. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +142 -0
  279. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
  280. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  281. package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
  282. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
  283. package/package.json +1 -1
  284. package/lib/esm/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +0 -34
  285. package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +0 -42
  286. package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.d.ts +0 -6
  287. package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +0 -38
  288. package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.d.ts +0 -19
  289. package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +0 -46
@@ -2,7 +2,6 @@ import { createSlice } from '@reduxjs/toolkit';
2
2
  import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
3
3
  import { toReconciliationAccountSource } from '../../../entity/account/accountState';
4
4
  import { toBankStatusCodeType } from '../../../entity/accountRecon/accountReconState';
5
- import { toReconciliationViewSummary, } from '../types/reconciliationViewState';
6
5
  // Initial state
7
6
  export const initialReconciliationTabsState = {
8
7
  balances: {
@@ -68,7 +67,6 @@ export const initialState = {
68
67
  refreshStatus: { fetchState: 'Not-Started', error: undefined },
69
68
  actionFetchState: initialActionFetchState,
70
69
  selectedAccountId: undefined,
71
- statementProcessingFailed: false,
72
70
  statementUploadChosen: false,
73
71
  reconListUIState: {
74
72
  nodeCollapseState: {},
@@ -77,7 +75,6 @@ export const initialState = {
77
75
  },
78
76
  },
79
77
  excludedAccountIDs: [],
80
- summary: undefined,
81
78
  };
82
79
  // Create slice with reducers
83
80
  const expenseAutomationReconciliationView = createSlice({
@@ -146,7 +143,7 @@ const expenseAutomationReconciliationView = createSlice({
146
143
  fetchReconciliationSuccess: {
147
144
  reducer(draft, action) {
148
145
  if (action.payload.accountId == null) {
149
- updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground, action.payload.reconciliation.excluded_accounts ?? [], action.payload.reconciliation.summary);
146
+ updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground, action.payload.reconciliation.excluded_accounts ?? []);
150
147
  }
151
148
  else if (action.payload.reconciliation.reconciliation.length > 0 &&
152
149
  action.payload.reconciliation.accounts.length > 0) {
@@ -290,10 +287,6 @@ const expenseAutomationReconciliationView = createSlice({
290
287
  updateSelectedDrawerAccountId: (draft, action) => {
291
288
  draft.selectedDrawerAccountId = action.payload.selectedDrawerAccountId;
292
289
  },
293
- updateStatementProcessingFailed: (draft, action) => {
294
- draft.statementProcessingFailed =
295
- action.payload.statementProcessingFailed;
296
- },
297
290
  initialiseLocalDataForSelectedAccountId: () => { },
298
291
  updateSelectedTab: (draft, action) => {
299
292
  const { selectedTab } = action.payload;
@@ -385,16 +378,10 @@ const expenseAutomationReconciliationView = createSlice({
385
378
  },
386
379
  uploadAccountStatement: (draft, action) => {
387
380
  const { accountId, selectedPeriod } = action.payload;
388
- const accountRecon = draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId];
389
- accountRecon.statementUploadStatus = {
381
+ draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId].statementUploadStatus = {
390
382
  fetchState: 'In-Progress',
391
383
  error: undefined,
392
384
  };
393
- accountRecon.parsedStatementData = undefined;
394
- accountRecon.statementParseStatus = {
395
- fetchState: 'Not-Started',
396
- error: undefined,
397
- };
398
385
  },
399
386
  uploadAccountStatementSuccess: (draft, action) => {
400
387
  const { accountId, selectedPeriod } = action.payload;
@@ -432,78 +419,6 @@ const expenseAutomationReconciliationView = createSlice({
432
419
  error: action.payload.error,
433
420
  };
434
421
  },
435
- parseStatement: (draft, action) => {
436
- const { accountId, selectedPeriod } = action.payload;
437
- const accountRecon = draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId];
438
- accountRecon.parsedStatementData = undefined;
439
- accountRecon.statementParseStatus = {
440
- fetchState: 'In-Progress',
441
- error: undefined,
442
- };
443
- },
444
- parseStatementSuccess: (draft, action) => {
445
- const { accountId, selectedPeriod } = action.payload;
446
- draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId].statementParseStatus = {
447
- fetchState: 'Completed',
448
- error: undefined,
449
- };
450
- draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId].statementParseInProgress = false;
451
- },
452
- parseStatementFailure: (draft, action) => {
453
- const { accountId, selectedPeriod } = action.payload;
454
- draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId].statementParseStatus = {
455
- fetchState: 'Error',
456
- error: action.payload.error,
457
- };
458
- draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId].statementParseInProgress = false;
459
- },
460
- updateParsedStatementData: (draft, action) => {
461
- const { accountId, selectedPeriod, parsedStatementData } = action.payload;
462
- draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId].parsedStatementData =
463
- parsedStatementData;
464
- },
465
- updateStatementUpdateLocalData: (draft, action) => {
466
- const { accountId, selectedPeriod, statementUpdateLocalData } = action.payload;
467
- const accountRecon = draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId];
468
- if (accountRecon.localData == null) {
469
- accountRecon.localData = {
470
- statementUpdateLocalData,
471
- };
472
- }
473
- else {
474
- accountRecon.localData.statementUpdateLocalData =
475
- statementUpdateLocalData;
476
- }
477
- },
478
- submitStatementUpdate: (draft, action) => {
479
- const { accountId, selectedPeriod } = action.payload;
480
- draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId].statementUpdateStatus = {
481
- fetchState: 'In-Progress',
482
- error: undefined,
483
- };
484
- },
485
- submitStatementUpdateSuccess: (draft, action) => {
486
- const { accountId, selectedPeriod } = action.payload;
487
- const accountRecon = draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId];
488
- accountRecon.statementUpdateStatus = {
489
- fetchState: 'Completed',
490
- error: undefined,
491
- };
492
- if (accountRecon.localData != null) {
493
- accountRecon.localData.statementUpdateLocalData = undefined;
494
- }
495
- },
496
- submitStatementUpdateFailure: (draft, action) => {
497
- const { accountId, selectedPeriod } = action.payload;
498
- const accountRecon = draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId];
499
- accountRecon.statementUpdateStatus = {
500
- fetchState: 'Error',
501
- error: action.payload.error,
502
- };
503
- if (accountRecon.localData != null) {
504
- accountRecon.localData.statementUpdateLocalData = undefined;
505
- }
506
- },
507
422
  updateAccountReconciliationLocalData: (draft, action) => {
508
423
  const { accountId, selectedPeriod, localData } = action.payload;
509
424
  const oldLocalData = draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId].localData;
@@ -609,10 +524,10 @@ const expenseAutomationReconciliationView = createSlice({
609
524
  },
610
525
  });
611
526
  // Export actions
612
- export const { fetchReconciliation, fetchReconciliationFailure, fetchReconciliationSuccess, saveReconciliationDetail, saveReconciliationDetailFailure, updateSelectedAccountId, setConnectionInProgressForAccount, setStatementParseInProgress, updateReconcileTabLocalData, updateReconcileTabListSortState, updateReconcileTabListScrollState, saveReconciliationDetailSuccess, updateSelectedTab, updateBalancesLocalData, initialiseLocalDataForSelectedAccountId, clearExpenseAutomationReconciliationView, updateSelectedDrawerAccountId, updateStatementProcessingFailed, updateReviewTabSortState, initializeReconciliationReviewTabLocalData, updateReviewTabLocalData, saveReconciliationReview, updateSaveReconciliationReviewFetchStatus, updateReconListScrollPosition, updateAccountReconciliationLocalData, deleteAccountStatement, deleteAccountStatementSuccess, deleteAccountStatementFailure, excludeAccountFromReconciliation, excludeAccountFromReconciliationSuccess, excludeAccountFromReconciliationFailure, includeAccountInReconciliation, includeAccountInReconciliationSuccess, includeAccountInReconciliationFailure, uploadAccountStatement, uploadAccountStatementSuccess, uploadAccountStatementFailure, parseStatement, parseStatementSuccess, parseStatementFailure, updateParsedStatementData, updateStatementUpdateLocalData, submitStatementUpdate, submitStatementUpdateSuccess, submitStatementUpdateFailure, updateStatementUploadChosen, updateNodeCollapseState, } = expenseAutomationReconciliationView.actions;
527
+ export const { fetchReconciliation, fetchReconciliationFailure, fetchReconciliationSuccess, saveReconciliationDetail, saveReconciliationDetailFailure, updateSelectedAccountId, setConnectionInProgressForAccount, setStatementParseInProgress, updateReconcileTabLocalData, updateReconcileTabListSortState, updateReconcileTabListScrollState, saveReconciliationDetailSuccess, updateSelectedTab, updateBalancesLocalData, initialiseLocalDataForSelectedAccountId, clearExpenseAutomationReconciliationView, updateSelectedDrawerAccountId, updateReviewTabSortState, initializeReconciliationReviewTabLocalData, updateReviewTabLocalData, saveReconciliationReview, updateSaveReconciliationReviewFetchStatus, updateReconListScrollPosition, updateAccountReconciliationLocalData, deleteAccountStatement, deleteAccountStatementSuccess, deleteAccountStatementFailure, excludeAccountFromReconciliation, excludeAccountFromReconciliationSuccess, excludeAccountFromReconciliationFailure, includeAccountInReconciliation, includeAccountInReconciliationSuccess, includeAccountInReconciliationFailure, uploadAccountStatement, uploadAccountStatementSuccess, uploadAccountStatementFailure, updateStatementUploadChosen, updateNodeCollapseState, } = expenseAutomationReconciliationView.actions;
613
528
  // Export reducer
614
529
  export default expenseAutomationReconciliationView.reducer;
615
- function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground, excludedAccounts, summary) {
530
+ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground, excludedAccounts) {
616
531
  draft.excludedAccountIDs = excludedAccounts.map((ea) => ea.account_id);
617
532
  draft.excludedAccountExclusionInfo = {};
618
533
  excludedAccounts.forEach((ea) => {
@@ -641,7 +556,6 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
641
556
  : undefined,
642
557
  };
643
558
  });
644
- const oldReconciliationByAccountID = draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)]?.reconciliationByAccountID ?? {};
645
559
  draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)] = {
646
560
  accountIDs: [],
647
561
  reconciliationByAccountID: {},
@@ -665,7 +579,6 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
665
579
  paymentAccountId: account?.payment_account_id ?? undefined,
666
580
  };
667
581
  }
668
- const oldRecord = oldReconciliationByAccountID[reconciliation.account_id];
669
582
  accountReconciliationRecords.reconciliationByAccountID[reconciliation.account_id] = {
670
583
  accountId: reconciliation.account_id,
671
584
  reconciliationId: reconciliation.reconciliation_id ?? undefined,
@@ -675,17 +588,14 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
675
588
  statementUploadStatus: { fetchState: 'Not-Started', error: undefined },
676
589
  statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
677
590
  statementParseInProgress: reconciliation.bank_status.code === 'parsing',
678
- statementParseStatus: { fetchState: 'Not-Started', error: undefined },
679
591
  localData: {
680
592
  accountSource: account?.reconciliation_source != null
681
593
  ? toReconciliationAccountSource(account.reconciliation_source)
682
594
  : undefined,
683
- ...oldRecord?.localData,
684
595
  },
685
596
  accountDetectionReason: account?.detection_info != null && account.detection_reason != null
686
597
  ? account.detection_reason
687
598
  : undefined,
688
- parsedStatementData: oldRecord?.parsedStatementData,
689
599
  };
690
600
  accountReconciliationRecords.accountIDs.push(reconciliation.account_id);
691
601
  });
@@ -699,9 +609,6 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
699
609
  draft.fetchState = 'Completed';
700
610
  draft.error = undefined;
701
611
  }
702
- if (summary !== undefined) {
703
- draft.summary = toReconciliationViewSummary(summary);
704
- }
705
612
  }
706
613
  function updateReconciliationByAccountID(draft, accounts, selectedPeriod, accountId, reconciliationData, refreshViewInBackground) {
707
614
  const oldRecord = draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)].reconciliationByAccountID[accountId];
@@ -769,7 +676,6 @@ const updateReconciliationByAccountIDOnIncludeAccount = (draft, accountId, recon
769
676
  statementUploadStatus: { fetchState: 'Not-Started', error: undefined },
770
677
  statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
771
678
  statementParseInProgress: reconciliation.bank_status.code === 'parsing',
772
- statementParseStatus: { fetchState: 'Not-Started', error: undefined },
773
679
  localData: {},
774
680
  accountDetectionReason: undefined,
775
681
  };
@@ -43,17 +43,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
43
43
  error: undefined,
44
44
  })
45
45
  : { fetchState: 'Not-Started', error: undefined };
46
- const monthEndChecksForPeriod = selectedPeriod != null
47
- ? monthEndCloseChecksState.monthEndCloseChecksByTenantId[currentTenant.tenantId]?.[toMonthYearPeriodId(selectedPeriod)]
48
- : undefined;
49
- const reconCheckTimeSaved = monthEndChecksForPeriod?.monthEndCloseCheckList.find((check) => check.title === 'Reconciliation')?.progressJson?.timeSavedPercentage;
50
- const summaryWithTimeSaved = reconciliationViewState.summary != null
51
- ? {
52
- ...reconciliationViewState.summary,
53
- timeSavedPercentage: reconCheckTimeSaved ??
54
- reconciliationViewState.summary.timeSavedPercentage,
55
- }
56
- : undefined;
57
46
  if (accountReconForMonthYearPeriod == null) {
58
47
  return {
59
48
  bankAccounts: [],
@@ -77,7 +66,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
77
66
  selectedTab: reconciliationViewState.selectedTab,
78
67
  monthYearPeriod: selectedPeriod,
79
68
  selectedAccountId: reconciliationViewState.selectedAccountId,
80
- statementProcessingFailed: reconciliationViewState.statementProcessingFailed,
81
69
  statementUploadChosen: reconciliationViewState.statementUploadChosen,
82
70
  accountReconciliationsByAccountID: {},
83
71
  reconciliationTabsState: initialReconciliationTabsState,
@@ -127,7 +115,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
127
115
  excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
128
116
  includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
129
117
  excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
130
- summary: summaryWithTimeSaved,
131
118
  };
132
119
  }
133
120
  const allAccountIDs = accountReconForMonthYearPeriod.accountIDs;
@@ -252,8 +239,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
252
239
  .refreshStatus,
253
240
  statementDeleteStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
254
241
  .statementDeleteStatus,
255
- statementParseStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
256
- .statementParseStatus,
257
242
  statementUpdateStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
258
243
  .statementUpdateStatus,
259
244
  statementUploadStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
@@ -262,8 +247,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
262
247
  .localData,
263
248
  statementParseInProgress: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
264
249
  .statementParseInProgress,
265
- parsedStatementData: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
266
- .parsedStatementData,
267
250
  transactionFetchState: reduceAnyFetchState([
268
251
  accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
269
252
  .transactionFetchState,
@@ -332,7 +315,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
332
315
  statementUpdateStatus: { fetchState: 'Not-Started' },
333
316
  statementUploadStatus: { fetchState: 'Not-Started' },
334
317
  statementDeleteStatus: { fetchState: 'Not-Started' },
335
- statementParseStatus: { fetchState: 'Not-Started' },
336
318
  localData: {},
337
319
  connectionInProgress: false,
338
320
  statementParseInProgress: false,
@@ -421,7 +403,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
421
403
  refreshStatus: reconciliationViewState.refreshStatus,
422
404
  selectedTab: reconciliationViewState.selectedTab,
423
405
  selectedDrawerAccountId: reconciliationViewState.selectedDrawerAccountId,
424
- statementProcessingFailed: reconciliationViewState.statementProcessingFailed,
425
406
  statementUploadChosen: reconciliationViewState.statementUploadChosen,
426
407
  monthYearPeriod: selectedPeriod,
427
408
  accountReconciliationBySectionID,
@@ -442,7 +423,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
442
423
  excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
443
424
  includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
444
425
  excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
445
- summary: summaryWithTimeSaved,
446
426
  };
447
427
  });
448
428
  export const isAccountReconReport = (reportId) => {
@@ -1,24 +1,4 @@
1
1
  import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
2
- export function toReconciliationViewSummary(payload) {
3
- return {
4
- accounts: {
5
- done: payload.accounts.done,
6
- failed: payload.accounts.failed,
7
- inProgress: payload.accounts.in_progress,
8
- total: payload.accounts.total,
9
- },
10
- accountsToConnectCount: payload.accounts_to_connect_count,
11
- autoMatched: {
12
- matchedTxns: payload.auto_matched.matched_txns,
13
- totalTxns: payload.auto_matched.total_txns,
14
- },
15
- needsReview: {
16
- accountCount: payload.needs_review.account_count,
17
- txnCount: payload.needs_review.txn_count,
18
- },
19
- timeSavedPercentage: payload.time_saved_percentage,
20
- };
21
- }
22
2
  export const RECONCILE_ACTIONS = [
23
3
  'reconcile',
24
4
  'save_reconcile_for_later',
@@ -1,9 +1,9 @@
1
1
  import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
3
  import { removeFiles } from '../../../entity/file/fileReducer';
4
4
  import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
5
5
  import { deleteFile, deleteFileFailure, deleteFileSuccess, } from '../fileViewReducer';
6
- export const deleteFileEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(deleteFile.match), switchMap((action) => {
6
+ export const deleteFileEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(deleteFile.match), mergeMap((action) => {
7
7
  /**
8
8
  * tenantId is required for deleting onboarding files.
9
9
  */
@@ -1,9 +1,9 @@
1
1
  import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
3
  import { removeFiles } from '../../../entity/file/fileReducer';
4
4
  import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
5
5
  import { deleteFileList, deleteFileListFailure, deleteFileListSuccess, } from '../fileViewReducer';
6
- export const deleteFileListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(deleteFileList.match), switchMap((action) => {
6
+ export const deleteFileListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(deleteFileList.match), mergeMap((action) => {
7
7
  const { fileIds } = action.payload;
8
8
  return zeniAPI
9
9
  .deleteAndGetJSON(`${zeniAPI.apiEndPoints.fileMicroServiceBaseUrl}/1.0/files?query=${encodeURIComponent(JSON.stringify({ file_ids: fileIds }))}`)
@@ -1,9 +1,9 @@
1
1
  import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
3
  import { updateFiles } from '../../../entity/file/fileReducer';
4
4
  import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
5
5
  import { updateFileName, updateFileNameFailure, updateFileNameSuccess, } from '../fileViewReducer';
6
- export const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(updateFileName.match), switchMap((action) => {
6
+ export const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(updateFileName.match), mergeMap((action) => {
7
7
  /**
8
8
  * tenantId is required for updating onboarding file names.
9
9
  */
@@ -0,0 +1,42 @@
1
+ import { of } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
4
+ import { fetchAiAgentsActivationStatus, fetchAiAgentsActivationStatusFailure, fetchAiAgentsActivationStatusSuccess, } from '../../onboardingCustomerViewReducer';
5
+ const toPhaseStatus = (raw) => {
6
+ if (raw === 'idle' ||
7
+ raw === 'starting' ||
8
+ raw === 'building' ||
9
+ raw === 'ready') {
10
+ return raw;
11
+ }
12
+ return 'idle';
13
+ };
14
+ const toPhase = (row) => ({
15
+ key: row.key,
16
+ status: toPhaseStatus(row.status),
17
+ startedAt: row.started_at,
18
+ completedAt: row.completed_at,
19
+ });
20
+ const toCounts = (payload) => ({
21
+ customerCount: payload?.customer_count ?? 0,
22
+ glAccountCount: payload?.gl_account_count ?? 0,
23
+ targetTransactionCount: payload?.target_transaction_count ?? 0,
24
+ transactionCount: payload?.transaction_count ?? 0,
25
+ vendorCount: payload?.vendor_count ?? 0,
26
+ });
27
+ export const fetchAiAgentsActivationStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchAiAgentsActivationStatus.match), mergeMap(() => {
28
+ const url = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/ai-agents-activation/status`;
29
+ return zeniAPI
30
+ .getJSON(url)
31
+ .pipe(mergeMap((response) => {
32
+ if (isSuccessResponse(response) && response.data != null) {
33
+ const phases = (response.data.phases ?? []).map(toPhase);
34
+ return of(fetchAiAgentsActivationStatusSuccess({
35
+ phases,
36
+ counts: toCounts(response.data.counts),
37
+ }));
38
+ }
39
+ return of(fetchAiAgentsActivationStatusFailure(response.status));
40
+ }), catchError((error) => of(fetchAiAgentsActivationStatusFailure(createZeniAPIStatus('Unexpected Error', 'fetchAiAgentsActivationStatus errored out ' +
41
+ JSON.stringify(error))))));
42
+ }));
@@ -0,0 +1,29 @@
1
+ import { from, of } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { updateCompanies } from '../../../../../entity/company/companyReducer';
4
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
5
+ import { acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiActivationViewedFailure, acknowledgeOnboardingAiActivationViewedSuccess, } from '../../onboardingCustomerViewReducer';
6
+ export const acknowledgeOnboardingAiActivationViewedEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(acknowledgeOnboardingAiActivationViewed.match), mergeMap((action) => {
7
+ const { companyId } = action.payload;
8
+ const payload = {
9
+ is_onboarding_ai_activation_viewed: true,
10
+ };
11
+ return zeniAPI
12
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
13
+ .pipe(mergeMap((response) => {
14
+ if (isSuccessResponse(response) && response.data != null) {
15
+ const actions = [
16
+ updateCompanies({
17
+ payload: response.data.companies,
18
+ schema: {},
19
+ }),
20
+ acknowledgeOnboardingAiActivationViewedSuccess(),
21
+ ];
22
+ return from(actions);
23
+ }
24
+ return of(acknowledgeOnboardingAiActivationViewedFailure(response.status));
25
+ }),
26
+ // Best-effort — failure is silent; cascade just runs again next visit.
27
+ catchError((error) => of(acknowledgeOnboardingAiActivationViewedFailure(createZeniAPIStatus('Unexpected Error', 'Acknowledge - Onboarding AI Activation Viewed errored out' +
28
+ JSON.stringify(error))))));
29
+ }));
@@ -0,0 +1,40 @@
1
+ import { from, of } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { updateCompanies } from '../../../../../entity/company/companyReducer';
4
+ import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
5
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
6
+ import { acknowledgeOnboardingAiFinanceTeam, acknowledgeOnboardingAiFinanceTeamFailure, acknowledgeOnboardingAiFinanceTeamSuccess, } from '../../onboardingCustomerViewReducer';
7
+ export const acknowledgeOnboardingAiFinanceTeamEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(acknowledgeOnboardingAiFinanceTeam.match), mergeMap((action) => {
8
+ const { companyId } = action.payload;
9
+ const payload = {
10
+ is_onboarding_ai_finance_team_acknowledged: true,
11
+ };
12
+ return zeniAPI
13
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
14
+ .pipe(mergeMap((response) => {
15
+ if (isSuccessResponse(response) && response.data != null) {
16
+ const actions = [
17
+ updateCompanies({
18
+ payload: response.data.companies,
19
+ schema: {},
20
+ }),
21
+ acknowledgeOnboardingAiFinanceTeamSuccess(),
22
+ ];
23
+ return from(actions);
24
+ }
25
+ else {
26
+ return of(openSnackbar({
27
+ messageSection: 'onboarding_customer_view_complete',
28
+ messageText: 'failed',
29
+ type: 'error',
30
+ variables: [
31
+ {
32
+ variableName: '_api-error_',
33
+ variableValue: response.status.message,
34
+ },
35
+ ],
36
+ }), acknowledgeOnboardingAiFinanceTeamFailure(response.status));
37
+ }
38
+ }), catchError((error) => of(acknowledgeOnboardingAiFinanceTeamFailure(createZeniAPIStatus('Unexpected Error', 'Acknowledge - Onboarding AI Finance Team errored out' +
39
+ JSON.stringify(error))))));
40
+ }));