@zeniai/client-epic-state 5.0.83-betaRR5 → 5.0.84-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 (262) 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/entity/aiCfo/aiCfoPayload.d.ts +1 -137
  5. package/lib/entity/aiCfo/aiCfoReducer.d.ts +2 -23
  6. package/lib/entity/aiCfo/aiCfoReducer.js +5 -320
  7. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -13
  8. package/lib/entity/aiCfo/aiCfoSelector.js +1 -28
  9. package/lib/entity/aiCfo/aiCfoState.d.ts +4 -206
  10. package/lib/entity/aiCfo/aiCfoState.js +1 -23
  11. package/lib/entity/company/companyPayload.d.ts +2 -0
  12. package/lib/entity/company/companyPayload.js +2 -0
  13. package/lib/entity/company/companyStateTypes.d.ts +2 -0
  14. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  15. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  16. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  17. package/lib/entity/paymentAccount/paymentAccountSelector.js +4 -0
  18. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  19. package/lib/entity/snackbar/snackbarTypes.js +1 -3
  20. package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
  21. package/lib/entity/tenant/clearAllEpic.js +0 -8
  22. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  23. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
  24. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
  25. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  26. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  27. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  28. package/lib/entity/tenant/tenantPayload.d.ts +19 -0
  29. package/lib/entity/tenant/tenantReducer.d.ts +49 -28
  30. package/lib/entity/tenant/tenantReducer.js +111 -5
  31. package/lib/entity/tenant/tenantState.d.ts +21 -0
  32. package/lib/epic.d.ts +7 -15
  33. package/lib/epic.js +8 -15
  34. package/lib/esm/commonStateTypes/animations.js +1 -0
  35. package/lib/esm/entity/aiCfo/aiCfoReducer.js +5 -320
  36. package/lib/esm/entity/aiCfo/aiCfoSelector.js +1 -26
  37. package/lib/esm/entity/aiCfo/aiCfoState.js +0 -20
  38. package/lib/esm/entity/company/companyPayload.js +2 -0
  39. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
  40. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -3
  41. package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
  42. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
  43. package/lib/esm/entity/tenant/tenantReducer.js +108 -3
  44. package/lib/esm/epic.js +8 -15
  45. package/lib/esm/index.js +17 -44
  46. package/lib/esm/reducer.js +0 -12
  47. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -6
  48. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
  49. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +1 -2
  50. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  51. package/lib/esm/view/companyView/companyViewReducer.js +45 -1
  52. package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +25 -0
  53. package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +79 -0
  54. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  55. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +45 -0
  56. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
  57. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +168 -50
  58. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +14 -0
  59. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -0
  60. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
  61. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
  62. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +4 -49
  63. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -61
  64. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +49 -0
  65. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +58 -0
  66. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +12 -0
  67. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
  68. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +71 -52
  69. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +2 -0
  70. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
  71. package/lib/index.d.ts +20 -50
  72. package/lib/index.js +39 -193
  73. package/lib/reducer.d.ts +0 -12
  74. package/lib/reducer.js +0 -12
  75. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -11
  76. package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -6
  77. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
  78. package/lib/view/aiCfoView/epics/createSessionEpic.js +1 -2
  79. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
  80. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  81. package/lib/view/companyView/companyViewReducer.d.ts +11 -1
  82. package/lib/view/companyView/companyViewReducer.js +47 -3
  83. package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.d.ts +9 -0
  84. package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +29 -0
  85. package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +10 -0
  86. package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +83 -0
  87. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  88. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  89. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  90. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  91. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
  92. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +49 -0
  93. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
  94. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
  95. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
  96. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
  97. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +170 -51
  98. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +7 -1
  99. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +21 -1
  100. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +37 -0
  101. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +14 -1
  102. package/lib/view/people/peopleTypes.d.ts +1 -1
  103. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  104. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  105. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
  106. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
  107. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  108. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
  109. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +2 -12
  110. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +5 -50
  111. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -42
  112. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +1 -68
  113. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -18
  114. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +8 -0
  115. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +53 -0
  116. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +8 -0
  117. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +62 -0
  118. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +27 -0
  119. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +15 -0
  120. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
  121. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
  122. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +24 -2
  123. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +72 -53
  124. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -0
  125. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -0
  126. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +12 -0
  127. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +125 -0
  128. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
  129. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  130. package/package.json +1 -1
  131. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -277
  132. package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -143
  133. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -19
  134. package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -175
  135. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -32
  136. package/lib/entity/cardPolicy/cardPolicySelector.js +0 -99
  137. package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -205
  138. package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
  139. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
  140. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -68
  141. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
  142. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
  143. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +0 -25
  144. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -39
  145. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +0 -24
  146. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -105
  147. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -130
  148. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -171
  149. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -75
  150. package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
  151. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -64
  152. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
  153. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -35
  154. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -101
  155. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -70
  156. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
  157. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
  158. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -56
  159. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -49
  160. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -42
  161. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -72
  162. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
  163. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
  164. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -56
  165. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -328
  166. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -120
  167. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -60
  168. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -118
  169. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -33
  170. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -385
  171. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -34
  172. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -33
  173. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -17
  174. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -144
  175. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -181
  176. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -57
  177. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
  178. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -53
  179. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -148
  180. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -25
  181. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -112
  182. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -101
  183. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -71
  184. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -34
  185. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -1
  186. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -42
  187. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -69
  188. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -45
  189. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -65
  190. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -64
  191. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
  192. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -74
  193. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -21
  194. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
  195. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -25
  196. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
  197. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -19
  198. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -60
  199. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -18
  200. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -53
  201. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -16
  202. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -46
  203. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
  204. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -76
  205. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -21
  206. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
  207. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -19
  208. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
  209. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -19
  210. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -60
  211. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +0 -38
  212. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -333
  213. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +0 -25
  214. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -124
  215. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +0 -28
  216. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -64
  217. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +0 -17
  218. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -122
  219. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +0 -23
  220. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -37
  221. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +0 -38
  222. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -391
  223. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +0 -11
  224. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -38
  225. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +0 -24
  226. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -40
  227. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +0 -253
  228. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -21
  229. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +0 -66
  230. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -151
  231. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -52
  232. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -185
  233. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -47
  234. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -66
  235. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -73
  236. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
  237. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -25
  238. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -57
  239. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +0 -30
  240. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -152
  241. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -15
  242. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -29
  243. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +0 -26
  244. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -116
  245. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +0 -35
  246. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -105
  247. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +0 -23
  248. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -75
  249. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +0 -15
  250. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -38
  251. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +0 -76
  252. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -2
  253. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +0 -7
  254. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -46
  255. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +0 -28
  256. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -73
  257. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +0 -23
  258. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -49
  259. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +0 -11
  260. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -69
  261. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +0 -11
  262. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -68
@@ -9,13 +9,9 @@ export interface AiCfoAnswerParagraph {
9
9
  }>;
10
10
  }
11
11
  export declare const ALL_AI_CFO_CHARTS_TYPES: readonly ["bar_chart", "pie_chart", "line_chart"];
12
- export declare const ALL_AI_CFO_VISUALIZATION_TYPES: readonly ["bar_chart", "pie_chart", "line_chart", "table", "interactive_form"];
13
- export declare const ALL_INTERACTIVE_FORM_TYPES: readonly ["cards_creation", "card_policy"];
14
- export declare const toInteractiveFormType: (v: string) => "cards_creation" | "card_policy";
15
- export declare const toInteractiveFormTypeStrict: (v: string) => "cards_creation" | "card_policy" | undefined;
16
- export type InteractiveFormType = ReturnType<typeof toInteractiveFormType>;
17
- export declare const toAiCfoVisualizationType: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table" | "interactive_form";
18
- export declare const toAiCfoVisualizationTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table" | "interactive_form" | undefined;
12
+ export declare const ALL_AI_CFO_VISUALIZATION_TYPES: readonly ["bar_chart", "pie_chart", "line_chart", "table"];
13
+ export declare const toAiCfoVisualizationType: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table";
14
+ export declare const toAiCfoVisualizationTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table" | undefined;
19
15
  export type AiCfoVisualizationType = ReturnType<typeof toAiCfoVisualizationType>;
20
16
  export declare const toAiCfoChartType: (v: string) => "bar_chart" | "pie_chart" | "line_chart";
21
17
  export declare const toAiCfoChartTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | undefined;
@@ -57,177 +53,8 @@ export interface ChartVisualization {
57
53
  lines?: string[];
58
54
  yFormat?: YFormat;
59
55
  }
60
- /**
61
- * Card kind for AI Card Creation rows.
62
- * - `vendor` = vendor-bound card.
63
- * - `class` = department-scoped card. The wire format ships `department`;
64
- * the reducer maps it to `class` (the FE-side term for accounting class /
65
- * department) so it lines up with the rest of the codebase.
66
- * - `category` = MCC category-scoped card. The wire format ships `category`
67
- * verbatim; there is no FE-side alias, so we keep the wire term.
68
- *
69
- * The Step 2 Card-cell dropdown filters by this kind so a row of one kind
70
- * only sees swap targets of the same kind.
71
- */
72
- export type CardsCardKind = 'vendor' | 'class' | 'category';
73
- /**
74
- * Single entry in the unified vendor + department dropdown universe shipped
75
- * by the AI controller for the `review` flow. Powers both the
76
- * step-2 Card cell dropdown (filtered to entries with matching `kind`) and
77
- * the step-1 "Add something else" search (no kind filter — user can add
78
- * either).
79
- */
80
- export interface CardNameOption {
81
- id: string;
82
- kind: CardsCardKind;
83
- label: string;
84
- }
85
- /**
86
- * Shared base shape across both `review` and `create` AI Card Creation
87
- * states. Holds the data derived from the controller's `suggested_cards[]`
88
- * that's identical regardless of which step UX the user sees.
89
- */
90
- export interface CardsCreationCommonData {
91
- /**
92
- * Full vendor + department + category universe (suggested +
93
- * not-suggested), used to power the step-2 Card-cell dropdown (filtered
94
- * by row kind) and, in `review` mode, the step-1 "Add something else"
95
- * search.
96
- */
97
- cardNameOptions: CardNameOption[];
98
- /**
99
- * Map of `teamRow.id` / `cardRow.id` -> suggested owner `userId`.
100
- * Resolved against `allUsers` (sourced from the tenant) at render time.
101
- */
102
- suggestedOwnerUserIdByTeamId: Record<string, ID | undefined>;
103
- }
104
- /**
105
- * Initial data for the AI Card Creation interactive form. Discriminated on
106
- * `mode`:
107
- *
108
- * - `review` (default, 2-step): AI suggests rows (mix of vendors +
109
- * departments + categories); user reviews them in step 1, then configures
110
- * one card per surviving row in step 2.
111
- * - `create` (1-step): the FE seeds the step-2 editable table directly
112
- * from the `is_suggested: true` rows; step 1 is skipped.
113
- *
114
- * Both modes carry the same `cardNameOptions` universe so the step-2 Card
115
- * dropdown behaves identically across modes.
116
- */
117
- export type CardsCreationInitialData = (CardsCreationCommonData & {
118
- mode: 'review';
119
- teamRows: Array<{
120
- avgMonthlySpend: string;
121
- cardKind: CardsCardKind;
122
- id: string;
123
- label: string;
124
- recommendedLimit: string;
125
- recommendedLimitCadence?: string;
126
- }>;
127
- }) | (CardsCreationCommonData & {
128
- cardRows: Array<{
129
- cardKind: CardsCardKind;
130
- id: string;
131
- /**
132
- * Team-derived display label rendered in the card cell trigger
133
- * (e.g. "Engineering"). Drives the row's first-letter avatar in
134
- * step 2. Always populated for AI-seeded rows.
135
- */
136
- label: string;
137
- recommendedLimit?: number;
138
- suggestedOwnerUserId?: ID;
139
- }>;
140
- mode: 'create';
141
- });
142
- /**
143
- * Per-policy allow / block bucket. CamelCase mirror of
144
- * `DraftPolicyEntityPayload`.
145
- */
146
- export interface CardPolicyDraftPolicyEntity {
147
- categoryCodes: string[];
148
- merchantNames: string[];
149
- }
150
- /**
151
- * Spend-limit bucket per policy. `transaction` is the only cadence the
152
- * BE ships today.
153
- */
154
- export interface CardPolicySpendLimits {
155
- transaction: number;
156
- }
157
- /**
158
- * Single draft policy in FE state. Identity is positional — the reducer
159
- * synthesizes a stable `id` (`draft-0`, `draft-1`, ...) at decode time
160
- * since the BE doesn't ship one today.
161
- */
162
- export interface CardPolicyDraftPolicy {
163
- allowedEntity: CardPolicyDraftPolicyEntity;
164
- applyToCards: string[];
165
- blockedEntity: CardPolicyDraftPolicyEntity;
166
- description: string;
167
- id: string;
168
- /** Enforcement mode (e.g. `"strict"`). Carried for guided submit;
169
- * ignored by auto / upload submit. */
170
- mode: string;
171
- name: string;
172
- requiredReceiptThreshold: number;
173
- spendLimits: CardPolicySpendLimits;
174
- }
175
- export interface CardPolicyStep5Review {
176
- draftPolicies: CardPolicyDraftPolicy[];
177
- groupingSource: string;
178
- prompt: string;
179
- }
180
- export interface CardPolicyWizardPlan {
181
- step5Review: CardPolicyStep5Review;
182
- }
183
- /**
184
- * Upload-mode metadata returned by the
185
- * `policy-recommendation-from-upload` API alongside the wizard plan.
186
- */
187
- export interface CardPolicyUploadSource {
188
- confidenceScore: number;
189
- fileName: string;
190
- lowConfidenceFields: string[];
191
- }
192
- /**
193
- * Initial data for the AI Card Policy interactive form. Discriminated on
194
- * `policyKind`. All three modes consume the same `wizardPlan.step5Review`
195
- * envelope; the wizard renders different surfaces per mode.
196
- *
197
- * - `auto` (1-step review): chip groups built directly from each draft
198
- * policy. Submit omits `mode` + `spend_limits` + `required_receipt_threshold`.
199
- * - `guided` (5-step wizard): Steps 1–4 seeded from `draftPolicies[0]`,
200
- * Step 5 lists every draft. Submit includes all keys.
201
- * - `upload` (3-step): upload → cards → review. `wizardPlan` is
202
- * `undefined` until the upload-recommendation API succeeds, then
203
- * populated alongside `source` metadata. Submit includes
204
- * `spend_limits` + `required_receipt_threshold`; omits `mode`.
205
- */
206
- export type CardPolicyInitialData = {
207
- policyKind: 'auto';
208
- wizardPlan: CardPolicyWizardPlan;
209
- } | {
210
- policyKind: 'guided';
211
- wizardPlan: CardPolicyWizardPlan;
212
- } | {
213
- policyKind: 'upload';
214
- source?: CardPolicyUploadSource;
215
- wizardPlan?: CardPolicyWizardPlan;
216
- };
217
- /**
218
- * Visualization variant rendered as an interactive RHF form (in lieu of a
219
- * chart or table). Discriminated on `formType`; each branch carries its own
220
- * payload shape.
221
- */
222
- export type InteractiveFormVisualization = {
223
- formType: 'cards_creation';
224
- payload: CardsCreationInitialData;
225
- } | {
226
- formType: 'card_policy';
227
- payload: CardPolicyInitialData;
228
- };
229
56
  export interface AiCfoVisualization {
230
- data: TableVisualization | ChartVisualization | InteractiveFormVisualization;
57
+ data: TableVisualization | ChartVisualization;
231
58
  type: AiCfoVisualizationType;
232
59
  }
233
60
  export declare const toMessageSender: (v: string) => "user" | "agent";
@@ -285,36 +112,7 @@ export interface ChatSessionWithMessages {
285
112
  chatSession: ChatSession;
286
113
  questionAnswers: AiCfoQuestionWithAnswer[];
287
114
  }
288
- /**
289
- * Discriminator for client-synthesized AI CFO answer bubbles. These are not
290
- * Q/A pairs streamed from the backend — they are pushed locally by the AI
291
- * CFO flow when it kicks off a cards or policy create from an interactive
292
- * form, so the drawer can render a "Creating…" placeholder and later a
293
- * "Created" success bubble while the corresponding mutation epic runs.
294
- */
295
- export declare const ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS: readonly ["creating_cards", "creating_policy", "created_cards", "created_policy"];
296
- export type SyntheticAiCfoAnswerKind = (typeof ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS)[number];
297
- /**
298
- * A locally-synthesized answer bubble (e.g. "Creating cards…", or "2 policies
299
- * are created and saved" with preview tiles). Lives parallel to the streamed
300
- * `questionAnswers` so the AI CFO renderer can swap the source answer's
301
- * interactive form in-place with the bubble (and then with the success tile
302
- * once the mutation completes).
303
- *
304
- * `sourceQuestionAnswerId` is the `questionAnswerId` of the streamed Q/A
305
- * whose answer hosted the interactive form the user just submitted. Every
306
- * synthetic is dispatched from a form-submit handler and every form lives
307
- * inside an AI CFO answer, so this id is always known at dispatch time.
308
- */
309
- export interface SyntheticAiCfoAnswer {
310
- createdAt: ZeniDate;
311
- entityIds: ID[];
312
- id: ID;
313
- kind: SyntheticAiCfoAnswerKind;
314
- sourceQuestionAnswerId: ID;
315
- }
316
115
  export interface AiCfoState {
317
116
  aiCfoByChatSessionId: Record<ID, ChatSessionWithMessages>;
318
117
  partialQuestionAnswers: Record<ID, AiCfoQuestionWithAnswer | undefined>;
319
- syntheticAnswersByChatSessionId: Record<ID, SyntheticAiCfoAnswer[]>;
320
118
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS = exports.toMessageTypeStrict = exports.toMessageSenderStrict = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateType = exports.toYFormatScaleStrict = exports.toYFormatUnitStrict = exports.toYFormatTypeStrict = exports.toYFormatScale = exports.toYFormatUnit = exports.toYFormatType = exports.ALL_Y_FORMAT_SCALES = exports.ALL_Y_FORMAT_NON_CURRENCY_UNITS = exports.ALL_Y_FORMAT_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.toInteractiveFormTypeStrict = exports.toInteractiveFormType = exports.ALL_INTERACTIVE_FORM_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = void 0;
3
+ exports.toMessageTypeStrict = exports.toMessageSenderStrict = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateType = exports.toYFormatScaleStrict = exports.toYFormatUnitStrict = exports.toYFormatTypeStrict = exports.toYFormatScale = exports.toYFormatUnit = exports.toYFormatType = exports.ALL_Y_FORMAT_SCALES = exports.ALL_Y_FORMAT_NON_CURRENCY_UNITS = exports.ALL_Y_FORMAT_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = void 0;
4
4
  const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_AI_CFO_CHARTS_TYPES = [
6
6
  'bar_chart',
@@ -10,16 +10,7 @@ exports.ALL_AI_CFO_CHARTS_TYPES = [
10
10
  exports.ALL_AI_CFO_VISUALIZATION_TYPES = [
11
11
  ...exports.ALL_AI_CFO_CHARTS_TYPES,
12
12
  'table',
13
- 'interactive_form',
14
13
  ];
15
- exports.ALL_INTERACTIVE_FORM_TYPES = [
16
- 'cards_creation',
17
- 'card_policy',
18
- ];
19
- const toInteractiveFormType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INTERACTIVE_FORM_TYPES);
20
- exports.toInteractiveFormType = toInteractiveFormType;
21
- const toInteractiveFormTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_INTERACTIVE_FORM_TYPES);
22
- exports.toInteractiveFormTypeStrict = toInteractiveFormTypeStrict;
23
14
  const toAiCfoVisualizationType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CFO_VISUALIZATION_TYPES);
24
15
  exports.toAiCfoVisualizationType = toAiCfoVisualizationType;
25
16
  const toAiCfoVisualizationTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CFO_VISUALIZATION_TYPES);
@@ -88,16 +79,3 @@ const toMessageSenderStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v,
88
79
  exports.toMessageSenderStrict = toMessageSenderStrict;
89
80
  const toMessageTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, ALL_MESSAGE_TYPES);
90
81
  exports.toMessageTypeStrict = toMessageTypeStrict;
91
- /**
92
- * Discriminator for client-synthesized AI CFO answer bubbles. These are not
93
- * Q/A pairs streamed from the backend — they are pushed locally by the AI
94
- * CFO flow when it kicks off a cards or policy create from an interactive
95
- * form, so the drawer can render a "Creating…" placeholder and later a
96
- * "Created" success bubble while the corresponding mutation epic runs.
97
- */
98
- exports.ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS = [
99
- 'creating_cards',
100
- 'creating_policy',
101
- 'created_cards',
102
- 'created_policy',
103
- ];
@@ -320,6 +320,8 @@ interface CompanyOnboardingInfoPayload {
320
320
  is_subsidiary: boolean;
321
321
  onboarding_user_ids: ID[];
322
322
  parent_company_id: ID | null;
323
+ is_onboarding_ai_finance_team_acknowledged?: boolean;
324
+ onboarding_ai_finance_team_acknowledged_by?: ID[];
323
325
  onboarding_info?: OnboardingInfoPayload;
324
326
  subscription_billing_address_id?: ID;
325
327
  }
@@ -333,7 +333,9 @@ const toCompanyOnboardingInfo = (payload) => ({
333
333
  onboardingUserIds: payload.onboarding_user_ids,
334
334
  isSubsidiary: payload.is_subsidiary,
335
335
  parentCompanyId: payload.parent_company_id != null ? payload.parent_company_id : undefined,
336
+ isOnboardingAiFinanceTeamAcknowledged: payload.is_onboarding_ai_finance_team_acknowledged ?? false,
336
337
  isOnboardingCompanyDetailsCompleted: payload.is_onboarding_company_details_step_completed,
338
+ onboardingAiFinanceTeamAcknowledgedBy: payload.onboarding_ai_finance_team_acknowledged_by ?? [],
337
339
  onboardingInfo: (0, exports.toOnboardingInfo)(payload.onboarding_info),
338
340
  isOnboardingCompleted: payload.is_onboarding_completed,
339
341
  subscriptionBillingAddressId: payload.subscription_billing_address_id,
@@ -323,9 +323,11 @@ export interface OnboardingInfo extends OnboardingStepsInfo {
323
323
  onboardingToQuoteSignMinutes?: number;
324
324
  }
325
325
  export interface CompanyOnboardingInfo {
326
+ isOnboardingAiFinanceTeamAcknowledged: boolean;
326
327
  isOnboardingCompanyDetailsCompleted: boolean;
327
328
  isOnboardingCompleted: boolean;
328
329
  isSubsidiary: boolean;
330
+ onboardingAiFinanceTeamAcknowledgedBy: ID[];
329
331
  onboardingUserIds: ID[];
330
332
  onboardingInfo?: OnboardingInfo;
331
333
  parentCompanyId?: ID;
@@ -10,7 +10,7 @@ export declare const ALL_SCHEDULES_TYPES: readonly ["prepaid_expenses", "fixed_a
10
10
  export declare const toScheduleTypesType: (v: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
11
11
  export type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
12
12
  export declare const toScheduleTypesTypeStrict: (v?: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | undefined;
13
- export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "unknown" | "posted" | "canceled" | "recorded";
13
+ export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "unknown" | "canceled" | "recorded";
14
14
  export type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
15
15
  export declare const toScheduleStatusCodeType: (v: string) => "completed" | "draft" | "new" | "ongoing" | "marked_as_completed";
16
16
  export type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
@@ -3,7 +3,7 @@ import { MonthYearPeriod, MonthYearPeriodId } from '../../commonStateTypes/timeP
3
3
  import { ExpenseAutomationViewType } from '../../view/expenseAutomationView/expenseAutomationViewState';
4
4
  import { ZeniDate } from '../../zeniDayJS';
5
5
  export declare const ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY: readonly ["Weekly", "Monthly"];
6
- export declare const toMonthEndCloseCheckFrequency: (v?: string) => "Monthly" | "Weekly";
6
+ export declare const toMonthEndCloseCheckFrequency: (v?: string) => "Weekly" | "Monthly";
7
7
  export type MonthEndCloseCheckFrequency = NonNullable<ReturnType<typeof toMonthEndCloseCheckFrequency>>;
8
8
  export interface MonthCloseCheckMetrics {
9
9
  columnIndex: number;
@@ -4,3 +4,4 @@ export declare function getPaymentAccountsByPaymentAccountIds(paymentAccountStat
4
4
  export declare function getPaymentAccountByPaymentAccountId(paymentAccountState: PaymentAccountState, PaymentAccountId: ID): PaymentAccount | undefined;
5
5
  export declare function getPaymentAccountByBankAccountId(paymentAccountState: PaymentAccountState, bankAccountId: ID): PaymentAccount | undefined;
6
6
  export declare function getPaymentAccountsByBankAccountIds(paymentAccountState: PaymentAccountState, bankAccountIds: ID[]): PaymentAccount[];
7
+ export declare function getPlaidPaymentAccounts(paymentAccountState: PaymentAccountState): PaymentAccount[];
@@ -7,6 +7,7 @@ exports.getPaymentAccountsByPaymentAccountIds = getPaymentAccountsByPaymentAccou
7
7
  exports.getPaymentAccountByPaymentAccountId = getPaymentAccountByPaymentAccountId;
8
8
  exports.getPaymentAccountByBankAccountId = getPaymentAccountByBankAccountId;
9
9
  exports.getPaymentAccountsByBankAccountIds = getPaymentAccountsByBankAccountIds;
10
+ exports.getPlaidPaymentAccounts = getPlaidPaymentAccounts;
10
11
  const get_1 = __importDefault(require("lodash/get"));
11
12
  const values_1 = __importDefault(require("lodash/values"));
12
13
  function getPaymentAccountsByPaymentAccountIds(paymentAccountState, paymentAccountIds) {
@@ -28,3 +29,6 @@ function getPaymentAccountsByBankAccountIds(paymentAccountState, bankAccountIds)
28
29
  .filter((value) => value != null);
29
30
  return paymentAccounts;
30
31
  }
32
+ function getPlaidPaymentAccounts(paymentAccountState) {
33
+ return (0, values_1.default)(paymentAccountState.paymentAccountByID).filter((account) => account.provider === 'plaid');
34
+ }
@@ -1,4 +1,4 @@
1
- export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
1
+ export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
2
2
  export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
3
3
  export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "failed" | "success";
4
4
  export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
@@ -98,9 +98,6 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
98
98
  'charge_card_receipt_upload',
99
99
  'charge_card_resend_invite',
100
100
  'charge_card_revoke_invite',
101
- 'card_policy_created',
102
- 'card_policy_updated',
103
- 'card_policy_deleted',
104
101
  'charge_card_update_limit',
105
102
  'charge_cards_update_limit',
106
103
  'close_charge_card',
@@ -211,6 +208,7 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
211
208
  'transactionCategorized_transactionUpdated_transactionsFailed',
212
209
  'transactionCategorized_transactionUpdated_transactionFailed',
213
210
  'accounting_classes_enabled_update',
211
+ 'capitalization_threshold_update',
214
212
  'account_excluded_from_reconciliation',
215
213
  'account_included_in_reconciliation',
216
214
  'ai_accountant_trigger_job',
@@ -96,9 +96,6 @@ import { clearInternationalWire } from '../../view/spendManagement/billPay/inter
96
96
  import { clearInternationalVerificationView } from '../../view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
97
97
  import { clearPreviousBills } from '../../view/spendManagement/billPay/previousBills/previousBillsReducer';
98
98
  import { clearWiseRedirectStatus } from '../../view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer';
99
- import { clearCardPolicyDetail } from '../../view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer';
100
- import { clearCardPolicyList } from '../../view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer';
101
- import { clearCreateCardPolicy } from '../../view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
102
99
  import { clearCardUserOnboarding } from '../../view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
103
100
  import { clearCashbackDetail } from '../../view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer';
104
101
  import { clearChargeCardConfig } from '../../view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer';
@@ -170,7 +167,6 @@ import { clearAllBillTransactions } from '../billPay/billTransaction/billTransac
170
167
  import { clearContacts } from '../billPay/contact/contactReducer';
171
168
  import { clearAllRecurringBills } from '../billPay/recurringBills/recurringBillsReducer';
172
169
  import { clearAllCardPayments } from '../cardPayment/cardPaymentReducer';
173
- import { clearCardPolicy } from '../cardPolicy/cardPolicyReducer';
174
170
  import { clearAllChargeCards } from '../chargeCard/chargeCardReducer';
175
171
  import { clearAllChargeCardRepayments } from '../chargeCardRepayment/chargeCardRepaymentReducer';
176
172
  import { clearAllChargeCardTransactions } from '../chargeCardTransaction/chargeCardTransactionReducer';
@@ -214,8 +210,8 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
214
210
  import { clearAllVendors } from '../vendor/vendorReducer';
215
211
  import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
216
212
  import { clearAll } from './tenantReducer';
217
- type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardPolicyDetail> | ReturnType<typeof clearCardPolicyList> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearCreateCardPolicy> | ReturnType<typeof clearCreateTransferEntry> | ReturnType<typeof clearAllCreditAgent> | ReturnType<typeof clearCreditAgentView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearProjectList> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniOAuthView>;
218
- type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearCannedResponses> | ReturnType<typeof clearCardPolicy> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
213
+ type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearCreateTransferEntry> | ReturnType<typeof clearAllCreditAgent> | ReturnType<typeof clearCreditAgentView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearProjectList> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniOAuthView>;
214
+ type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearCannedResponses> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
219
215
  export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
220
216
  export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
221
217
  export {};
@@ -100,9 +100,6 @@ const internationalWireReducer_1 = require("../../view/spendManagement/billPay/i
100
100
  const internationalWireVerificationReducer_1 = require("../../view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer");
101
101
  const previousBillsReducer_1 = require("../../view/spendManagement/billPay/previousBills/previousBillsReducer");
102
102
  const wiseRedirectReducer_1 = require("../../view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer");
103
- const cardPolicyDetailReducer_1 = require("../../view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer");
104
- const cardPolicyListReducer_1 = require("../../view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer");
105
- const createCardPolicyReducer_1 = require("../../view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer");
106
103
  const cardUserOnboardingReducer_1 = require("../../view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer");
107
104
  const cashbackDetailReducer_1 = require("../../view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer");
108
105
  const chargeCardConfigReducer_1 = require("../../view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer");
@@ -174,7 +171,6 @@ const billTransactionReducer_1 = require("../billPay/billTransaction/billTransac
174
171
  const contactReducer_1 = require("../billPay/contact/contactReducer");
175
172
  const recurringBillsReducer_1 = require("../billPay/recurringBills/recurringBillsReducer");
176
173
  const cardPaymentReducer_1 = require("../cardPayment/cardPaymentReducer");
177
- const cardPolicyReducer_1 = require("../cardPolicy/cardPolicyReducer");
178
174
  const chargeCardReducer_1 = require("../chargeCard/chargeCardReducer");
179
175
  const chargeCardRepaymentReducer_1 = require("../chargeCardRepayment/chargeCardRepaymentReducer");
180
176
  const chargeCardTransactionReducer_1 = require("../chargeCardTransaction/chargeCardTransactionReducer");
@@ -251,8 +247,6 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
251
247
  (0, billPaySetupViewReducer_1.clearBillPaySetupView)(),
252
248
  (0, cardBalanceReducer_1.clearCardBalance)(),
253
249
  (0, cardPaymentViewReducer_1.clearCardPaymentView)(),
254
- (0, cardPolicyDetailReducer_1.clearCardPolicyDetail)(),
255
- (0, cardPolicyListReducer_1.clearCardPolicyList)(),
256
250
  (0, cardUserOnboardingReducer_1.clearCardUserOnboarding)(),
257
251
  (0, cashbackDetailReducer_1.clearCashbackDetail)(),
258
252
  (0, cashBalanceReducer_1.clearCashBalance)(),
@@ -272,7 +266,6 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
272
266
  (0, companyMonthEndReportViewReducer_1.clearCompanyMonthEndReportView)(),
273
267
  (0, companyTaskManagerViewReducer_1.clearCompanyTaskManagerView)(),
274
268
  (0, companyViewReducer_1.clearCompanyView)(),
275
- (0, createCardPolicyReducer_1.clearCreateCardPolicy)(),
276
269
  (0, createTransferEntryReducer_1.clearCreateTransferEntry)(),
277
270
  (0, creditAgentReducer_1.clearAllCreditAgent)(),
278
271
  (0, creditAgentViewReducer_1.clearCreditAgentView)(),
@@ -434,7 +427,6 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
434
427
  (0, vendorExpenseReducer_1.clearAllVendorExpenseTrends)(),
435
428
  (0, vendorReducer_1.clearAllVendors)(),
436
429
  (0, cannedResponsesReducer_1.clearCannedResponses)(),
437
- (0, cardPolicyReducer_1.clearCardPolicy)(),
438
430
  (0, classListReducer_1.clearClassList)(),
439
431
  (0, contactReducer_1.clearContacts)(),
440
432
  (0, countryListReducer_1.clearCountryList)(),
@@ -7,7 +7,7 @@ export declare const deleteConnectionEpic: (actions$: ActionsObservable<ActionTy
7
7
  payload: {
8
8
  tenantId: string;
9
9
  connectionId: string;
10
- connectionType: "revenue" | "payments";
10
+ connectionType: "revenue" | "email" | "payments";
11
11
  };
12
12
  type: "tenant/deleteConnectionSuccess";
13
13
  } | {
@@ -0,0 +1,21 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { RootState } from '../../../reducer';
3
+ import { ZeniAPI } from '../../../zeniAPI';
4
+ import { initEmailConnectOAuth, initEmailConnectOAuthFailure, initEmailConnectOAuthSuccess } from '../tenantReducer';
5
+ export type ActionType = ReturnType<typeof initEmailConnectOAuth> | ReturnType<typeof initEmailConnectOAuthSuccess> | ReturnType<typeof initEmailConnectOAuthFailure>;
6
+ export type NavigateFn = (url: string) => void;
7
+ export declare const initEmailConnectOAuthEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI, navigate?: NavigateFn) => import("rxjs").Observable<{
8
+ payload: {
9
+ tenantId: string;
10
+ provider: "gmail" | "outlook";
11
+ authorizationUrl: string;
12
+ };
13
+ type: "tenant/initEmailConnectOAuthSuccess";
14
+ } | {
15
+ payload: {
16
+ tenantId: string;
17
+ provider: "gmail" | "outlook";
18
+ status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
19
+ };
20
+ type: "tenant/initEmailConnectOAuthFailure";
21
+ }>;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initEmailConnectOAuthEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const tenantReducer_1 = require("../tenantReducer");
8
+ const defaultNavigate = (url) => {
9
+ // Production path: full-page redirect. The user's session continues on the
10
+ // provider's consent screen and lands back on this app via auth's HTML
11
+ // callback page (which itself redirects to redirect_after_url with the
12
+ // result encoded as a query param).
13
+ if (typeof window !== 'undefined') {
14
+ window.location.href = url;
15
+ }
16
+ };
17
+ // Backs the new POST /1.0/connectors/email/<provider>/init endpoint on the
18
+ // auth service. The endpoint creates a CSRF state token in the auth NDB
19
+ // store and returns the provider's authorization_url; this epic then drives
20
+ // a full-page redirect so the user lands on Google's / Microsoft's consent
21
+ // screen. After consent the user lands on auth's callback, which writes the
22
+ // resulting tokens through to tenant and redirects the browser back to
23
+ // ``redirectAfterUrl`` with ``?email_connect_result=<json>`` for the
24
+ // integrations page to consume on mount.
25
+ const initEmailConnectOAuthEpic = (actions$, _state$, zeniAPI,
26
+ // Test seam: callers can override to assert intended URL without actually
27
+ // navigating. Default is full-page redirect via window.location.
28
+ navigate = defaultNavigate) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.initEmailConnectOAuth.match), (0, operators_1.switchMap)((action) => zeniAPI
29
+ .postAndGetJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/connectors/email/${action.payload.provider}/init`, { redirect_after_url: action.payload.redirectAfterUrl }, { 'zeni-tenant-id': action.payload.tenantId })
30
+ .pipe((0, operators_1.mergeMap)((response) => {
31
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
32
+ // Fire-and-forget side effect — once the browser navigates,
33
+ // any further state we'd dispatch here is irrelevant. We still
34
+ // emit the success action so subscribers (tests, analytics)
35
+ // can observe the URL the epic decided to navigate to.
36
+ navigate(response.data.authorization_url);
37
+ return (0, rxjs_1.from)([
38
+ (0, tenantReducer_1.initEmailConnectOAuthSuccess)(action.payload.tenantId, action.payload.provider, response.data.authorization_url),
39
+ ]);
40
+ }
41
+ const status = response.status ??
42
+ (0, responsePayload_1.createZeniAPIStatus)(`Failed to start ${action.payload.provider} connection. Please try again.`);
43
+ return (0, rxjs_1.from)([
44
+ (0, tenantReducer_1.initEmailConnectOAuthFailure)(action.payload.tenantId, action.payload.provider, status),
45
+ ]);
46
+ }), (0, operators_1.catchError)((error) => {
47
+ const message = error instanceof Error
48
+ ? error.message
49
+ : `Unexpected error starting ${action.payload.provider} connection.`;
50
+ return (0, rxjs_1.from)([
51
+ (0, tenantReducer_1.initEmailConnectOAuthFailure)(action.payload.tenantId, action.payload.provider, (0, responsePayload_1.createZeniAPIStatus)(message)),
52
+ ]);
53
+ }))));
54
+ exports.initEmailConnectOAuthEpic = initEmailConnectOAuthEpic;