@zeniai/client-epic-state 5.0.92 → 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 (260) 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 +63 -5
  5. package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
  6. package/lib/entity/aiCfo/aiCfoReducer.js +249 -9
  7. package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
  8. package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
  9. package/lib/entity/aiCfo/aiCfoState.d.ts +97 -4
  10. package/lib/entity/aiCfo/aiCfoState.js +18 -1
  11. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +277 -0
  12. package/lib/entity/cardPolicy/cardPolicyPayload.js +143 -0
  13. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +19 -0
  14. package/lib/entity/cardPolicy/cardPolicyReducer.js +175 -0
  15. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +32 -0
  16. package/lib/entity/cardPolicy/cardPolicySelector.js +99 -0
  17. package/lib/entity/cardPolicy/cardPolicyState.d.ts +205 -0
  18. package/lib/entity/cardPolicy/cardPolicyState.js +14 -0
  19. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +18 -0
  20. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +68 -0
  21. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +26 -0
  22. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +47 -0
  23. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +25 -0
  24. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +39 -0
  25. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +24 -0
  26. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +105 -0
  27. package/lib/entity/company/companyPayload.d.ts +4 -0
  28. package/lib/entity/company/companyPayload.js +4 -0
  29. package/lib/entity/company/companyStateTypes.d.ts +4 -0
  30. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  31. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  32. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  33. package/lib/entity/paymentAccount/paymentAccountSelector.js +4 -0
  34. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  35. package/lib/entity/snackbar/snackbarTypes.js +3 -0
  36. package/lib/entity/tenant/clearAllEpic.d.ts +6 -2
  37. package/lib/entity/tenant/clearAllEpic.js +8 -0
  38. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  39. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
  40. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
  41. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  42. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  43. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  44. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  45. package/lib/entity/tenant/tenantReducer.d.ts +38 -25
  46. package/lib/entity/tenant/tenantReducer.js +65 -5
  47. package/lib/entity/tenant/tenantState.d.ts +1 -0
  48. package/lib/epic.d.ts +19 -1
  49. package/lib/epic.js +20 -1
  50. package/lib/esm/commonStateTypes/animations.js +1 -0
  51. package/lib/esm/entity/aiCfo/aiCfoReducer.js +249 -9
  52. package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
  53. package/lib/esm/entity/aiCfo/aiCfoState.js +15 -0
  54. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +130 -0
  55. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +171 -0
  56. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +75 -0
  57. package/lib/esm/entity/cardPolicy/cardPolicyState.js +9 -0
  58. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +64 -0
  59. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +43 -0
  60. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +35 -0
  61. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +101 -0
  62. package/lib/esm/entity/company/companyPayload.js +4 -0
  63. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
  64. package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
  65. package/lib/esm/entity/tenant/clearAllEpic.js +8 -0
  66. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
  67. package/lib/esm/entity/tenant/tenantReducer.js +63 -3
  68. package/lib/esm/epic.js +20 -1
  69. package/lib/esm/index.js +46 -13
  70. package/lib/esm/reducer.js +12 -0
  71. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +6 -3
  72. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  73. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +2 -1
  74. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  75. package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
  76. package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
  77. package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
  78. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +42 -0
  79. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
  80. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
  81. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +217 -50
  82. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +7 -1
  83. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +12 -0
  84. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +52 -0
  85. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +22 -0
  86. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +1 -0
  87. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +36 -0
  88. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +39 -0
  89. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +34 -0
  90. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +58 -0
  91. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +21 -0
  92. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +1 -0
  93. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +38 -0
  94. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +289 -0
  95. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +109 -0
  96. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +44 -0
  97. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +111 -0
  98. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +25 -0
  99. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +363 -0
  100. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +36 -0
  101. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +19 -0
  102. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +6 -0
  103. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +119 -0
  104. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +154 -0
  105. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +22 -0
  106. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +1 -0
  107. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +39 -0
  108. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +140 -0
  109. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +20 -0
  110. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +100 -0
  111. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +96 -0
  112. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +59 -0
  113. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +24 -0
  114. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +25 -0
  115. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +1 -0
  116. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +34 -0
  117. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +57 -0
  118. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +35 -0
  119. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
  120. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +42 -4
  121. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +35 -0
  122. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +62 -0
  123. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +44 -0
  124. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
  125. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +67 -0
  126. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
  127. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
  128. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +105 -52
  129. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  130. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
  131. package/lib/index.d.ts +52 -14
  132. package/lib/index.js +219 -31
  133. package/lib/reducer.d.ts +12 -0
  134. package/lib/reducer.js +12 -0
  135. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +11 -2
  136. package/lib/view/aiCfoView/aiCfoViewReducer.js +6 -3
  137. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  138. package/lib/view/aiCfoView/epics/createSessionEpic.js +2 -1
  139. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -1
  140. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  141. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  142. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  143. package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
  144. package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
  145. package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
  146. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
  147. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +46 -0
  148. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
  149. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -0
  150. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
  151. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
  152. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
  153. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
  154. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +219 -51
  155. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +5 -1
  156. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +11 -2
  157. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +40 -0
  158. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -1
  159. package/lib/view/people/peopleTypes.d.ts +1 -1
  160. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  161. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +14 -0
  162. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +56 -0
  163. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +15 -0
  164. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +28 -0
  165. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +8 -0
  166. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +2 -0
  167. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +8 -0
  168. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +40 -0
  169. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +8 -0
  170. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +43 -0
  171. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +8 -0
  172. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +38 -0
  173. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +15 -0
  174. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +62 -0
  175. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +15 -0
  176. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +27 -0
  177. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +7 -0
  178. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +2 -0
  179. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +8 -0
  180. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +42 -0
  181. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +8 -0
  182. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +294 -0
  183. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +8 -0
  184. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +113 -0
  185. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +9 -0
  186. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +48 -0
  187. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +8 -0
  188. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +115 -0
  189. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +13 -0
  190. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +29 -0
  191. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +14 -0
  192. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +369 -0
  193. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +6 -0
  194. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +40 -0
  195. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +7 -0
  196. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +26 -0
  197. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +116 -0
  198. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +10 -0
  199. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +33 -0
  200. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +126 -0
  201. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +52 -0
  202. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +158 -0
  203. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +11 -0
  204. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +31 -0
  205. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +12 -0
  206. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +2 -0
  207. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +8 -0
  208. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +43 -0
  209. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +10 -0
  210. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +144 -0
  211. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +7 -0
  212. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +24 -0
  213. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +11 -0
  214. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +104 -0
  215. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +22 -0
  216. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +100 -0
  217. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +8 -0
  218. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +63 -0
  219. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +3 -0
  220. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +28 -0
  221. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  222. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +14 -0
  223. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +27 -1
  224. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +34 -0
  225. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +2 -0
  226. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +7 -0
  227. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +38 -0
  228. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +12 -0
  229. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +61 -0
  230. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +9 -0
  231. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +39 -0
  232. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  233. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
  234. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +12 -2
  235. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +43 -5
  236. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +7 -0
  237. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +42 -1
  238. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +5 -0
  239. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +11 -0
  240. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +66 -0
  241. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +3 -0
  242. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +48 -0
  243. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
  244. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +62 -0
  245. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +30 -0
  246. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +71 -0
  247. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +33 -0
  248. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
  249. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
  250. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
  251. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
  252. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +106 -53
  253. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
  254. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  255. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
  256. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +142 -0
  257. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
  258. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  259. package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
  260. package/package.json +1 -1
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.policyRecommendationFromUploadEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../responsePayload");
7
+ const createCardPolicyReducer_1 = require("../../view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer");
8
+ const aiCfoReducer_1 = require("../aiCfo/aiCfoReducer");
9
+ const cardPolicyReducer_1 = require("./cardPolicyReducer");
10
+ /**
11
+ * Listens for `fetchCardPolicyRecommendationFromUpload` and POSTs the
12
+ * just-extracted policy rules to the AI-CFO recommendation endpoint.
13
+ *
14
+ * On success — dispatches BOTH:
15
+ * - `updatePolicyRecommendationFromUploadSuccess` (flips the
16
+ * cardPolicy slice's recommendation lifecycle to `Completed`), and
17
+ * - `updateAiCfoAnswerCardPolicyWizardPlan` (patches the in-flight AI
18
+ * CFO answer's `CardPolicyInitialData` so the wizard can advance from
19
+ * Step 1 → Step 2 in the upload variant).
20
+ *
21
+ * The reducer payload originally captured at kickoff (`answerId` +
22
+ * `chatSessionId`) re-enters via the action so the patch can find the
23
+ * right answer to merge into.
24
+ */
25
+ const policyRecommendationFromUploadEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(cardPolicyReducer_1.fetchCardPolicyRecommendationFromUpload.match),
26
+ // `switchMap` (vs `mergeMap`) cancels any in-flight recommendation
27
+ // whenever a new upload kicks off another one. Without this an older,
28
+ // slower recommendation response could still resolve after a fresh
29
+ // extract has started — that late response would dispatch
30
+ // `updateAiCfoAnswerCardPolicyWizardPlan` against the *current*
31
+ // `answerId`/`chatSessionId` (the ones captured at its kickoff) and
32
+ // overwrite the wizard plan with stale draft policies from the prior
33
+ // document. Pairs with the matching `switchMap` in
34
+ // `extractPolicyDocumentEpic`.
35
+ (0, operators_1.switchMap)((action) => {
36
+ const { answerId, chatSessionId, extractedRules } = action.payload;
37
+ const body = {
38
+ extracted_rules: {
39
+ allowed_entity: {
40
+ category_codes: extractedRules.allowedEntity.categoryCodes,
41
+ merchant_names: extractedRules.allowedEntity.merchantNames,
42
+ },
43
+ blocked_entity: {
44
+ category_codes: extractedRules.blockedEntity.categoryCodes,
45
+ merchant_names: extractedRules.blockedEntity.merchantNames,
46
+ },
47
+ confidence_score: extractedRules.confidenceScore,
48
+ policy_name: extractedRules.policyName,
49
+ required_receipt_threshold: extractedRules.requiredReceiptThreshold,
50
+ transaction_limit: extractedRules.transactionLimit,
51
+ },
52
+ };
53
+ return zeniAPI
54
+ .postAndGetJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/ai-cfo/policy-recommendation-from-upload`, body)
55
+ .pipe((0, operators_1.mergeMap)((response) => {
56
+ if (!(0, responsePayload_1.isSuccessStatus)(response) ||
57
+ response.data?.wizard_plan?.step_5_review == null) {
58
+ return (0, rxjs_1.of)((0, cardPolicyReducer_1.updatePolicyRecommendationFromUploadFailure)(response.status));
59
+ }
60
+ const data = response.data;
61
+ const review = data.wizard_plan.step_5_review;
62
+ const wizardPlan = {
63
+ step5Review: {
64
+ draftPolicies: (review.draft_policies ?? []).map((draft, index) => ({
65
+ id: `draft-${index}`,
66
+ name: draft.name,
67
+ description: draft.description ?? '',
68
+ mode: draft.mode,
69
+ allowedEntity: {
70
+ categoryCodes: draft.allowed_entity?.category_codes ?? [],
71
+ merchantNames: draft.allowed_entity?.merchant_names ?? [],
72
+ },
73
+ blockedEntity: {
74
+ categoryCodes: draft.blocked_entity?.category_codes ?? [],
75
+ merchantNames: draft.blocked_entity?.merchant_names ?? [],
76
+ },
77
+ applyToCards: draft.apply_to_cards ?? [],
78
+ requiredReceiptThreshold: draft.required_receipt_threshold ?? 0,
79
+ spendLimits: {
80
+ transaction: draft.spend_limits?.transaction ?? 0,
81
+ },
82
+ })),
83
+ groupingSource: review.grouping_source ?? 'none',
84
+ prompt: review.prompt ?? '',
85
+ },
86
+ };
87
+ const source = data.source != null
88
+ ? {
89
+ confidenceScore: data.source.confidence_score,
90
+ fileName: data.source.file_name,
91
+ lowConfidenceFields: data.source.low_confidence_fields ?? [],
92
+ }
93
+ : undefined;
94
+ return (0, rxjs_1.of)((0, cardPolicyReducer_1.updatePolicyRecommendationFromUploadSuccess)(), (0, aiCfoReducer_1.updateAiCfoAnswerCardPolicyWizardPlan)({
95
+ answerId,
96
+ chatSessionId,
97
+ wizardPlan,
98
+ source,
99
+ }), (0, createCardPolicyReducer_1.updateAiCardPolicyFormDraftFromUploadPlan)(wizardPlan, source));
100
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, cardPolicyReducer_1.updatePolicyRecommendationFromUploadFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Policy recommendation from upload REST API call errored out' +
101
+ JSON.stringify(error))))),
102
+ // Guards the user-dismissed case that switchMap doesn't cover: a late response would patch a wizard plan the user already cleared.
103
+ (0, operators_1.takeUntil)(actions$.pipe((0, operators_1.filter)(cardPolicyReducer_1.clearPolicyDocumentExtraction.match))));
104
+ }));
105
+ exports.policyRecommendationFromUploadEpic = policyRecommendationFromUploadEpic;
@@ -320,6 +320,10 @@ interface CompanyOnboardingInfoPayload {
320
320
  is_subsidiary: boolean;
321
321
  onboarding_user_ids: ID[];
322
322
  parent_company_id: ID | null;
323
+ is_onboarding_ai_activation_viewed?: boolean;
324
+ is_onboarding_ai_finance_team_acknowledged?: boolean;
325
+ onboarding_ai_activation_viewed_by?: ID[];
326
+ onboarding_ai_finance_team_acknowledged_by?: ID[];
323
327
  onboarding_info?: OnboardingInfoPayload;
324
328
  subscription_billing_address_id?: ID;
325
329
  }
@@ -333,7 +333,11 @@ 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,
337
+ isOnboardingAiActivationViewed: payload.is_onboarding_ai_activation_viewed ?? false,
336
338
  isOnboardingCompanyDetailsCompleted: payload.is_onboarding_company_details_step_completed,
339
+ onboardingAiFinanceTeamAcknowledgedBy: payload.onboarding_ai_finance_team_acknowledged_by ?? [],
340
+ onboardingAiActivationViewedBy: payload.onboarding_ai_activation_viewed_by ?? [],
337
341
  onboardingInfo: (0, exports.toOnboardingInfo)(payload.onboarding_info),
338
342
  isOnboardingCompleted: payload.is_onboarding_completed,
339
343
  subscriptionBillingAddressId: payload.subscription_billing_address_id,
@@ -323,9 +323,13 @@ export interface OnboardingInfo extends OnboardingStepsInfo {
323
323
  onboardingToQuoteSignMinutes?: number;
324
324
  }
325
325
  export interface CompanyOnboardingInfo {
326
+ isOnboardingAiActivationViewed: boolean;
327
+ isOnboardingAiFinanceTeamAcknowledged: boolean;
326
328
  isOnboardingCompanyDetailsCompleted: boolean;
327
329
  isOnboardingCompleted: boolean;
328
330
  isSubsidiary: boolean;
331
+ onboardingAiActivationViewedBy: ID[];
332
+ onboardingAiFinanceTeamAcknowledgedBy: ID[];
329
333
  onboardingUserIds: ID[];
330
334
  onboardingInfo?: OnboardingInfo;
331
335
  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" | "posted" | "unknown" | "canceled" | "recorded";
13
+ export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "unknown" | "posted" | "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) => "Weekly" | "Monthly";
6
+ export declare const toMonthEndCloseCheckFrequency: (v?: string) => "Monthly" | "Weekly";
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" | "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";
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" | "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,6 +98,9 @@ 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',
101
104
  'charge_card_update_limit',
102
105
  'charge_cards_update_limit',
103
106
  'close_charge_card',
@@ -96,6 +96,9 @@ 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';
99
102
  import { clearCardUserOnboarding } from '../../view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
100
103
  import { clearCashbackDetail } from '../../view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer';
101
104
  import { clearChargeCardConfig } from '../../view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer';
@@ -167,6 +170,7 @@ import { clearAllBillTransactions } from '../billPay/billTransaction/billTransac
167
170
  import { clearContacts } from '../billPay/contact/contactReducer';
168
171
  import { clearAllRecurringBills } from '../billPay/recurringBills/recurringBillsReducer';
169
172
  import { clearAllCardPayments } from '../cardPayment/cardPaymentReducer';
173
+ import { clearCardPolicy } from '../cardPolicy/cardPolicyReducer';
170
174
  import { clearAllChargeCards } from '../chargeCard/chargeCardReducer';
171
175
  import { clearAllChargeCardRepayments } from '../chargeCardRepayment/chargeCardRepaymentReducer';
172
176
  import { clearAllChargeCardTransactions } from '../chargeCardTransaction/chargeCardTransactionReducer';
@@ -210,8 +214,8 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
210
214
  import { clearAllVendors } from '../vendor/vendorReducer';
211
215
  import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
212
216
  import { clearAll } from './tenantReducer';
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>;
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>;
215
219
  export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
216
220
  export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
217
221
  export {};
@@ -100,6 +100,9 @@ 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");
103
106
  const cardUserOnboardingReducer_1 = require("../../view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer");
104
107
  const cashbackDetailReducer_1 = require("../../view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer");
105
108
  const chargeCardConfigReducer_1 = require("../../view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer");
@@ -171,6 +174,7 @@ const billTransactionReducer_1 = require("../billPay/billTransaction/billTransac
171
174
  const contactReducer_1 = require("../billPay/contact/contactReducer");
172
175
  const recurringBillsReducer_1 = require("../billPay/recurringBills/recurringBillsReducer");
173
176
  const cardPaymentReducer_1 = require("../cardPayment/cardPaymentReducer");
177
+ const cardPolicyReducer_1 = require("../cardPolicy/cardPolicyReducer");
174
178
  const chargeCardReducer_1 = require("../chargeCard/chargeCardReducer");
175
179
  const chargeCardRepaymentReducer_1 = require("../chargeCardRepayment/chargeCardRepaymentReducer");
176
180
  const chargeCardTransactionReducer_1 = require("../chargeCardTransaction/chargeCardTransactionReducer");
@@ -247,6 +251,8 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
247
251
  (0, billPaySetupViewReducer_1.clearBillPaySetupView)(),
248
252
  (0, cardBalanceReducer_1.clearCardBalance)(),
249
253
  (0, cardPaymentViewReducer_1.clearCardPaymentView)(),
254
+ (0, cardPolicyDetailReducer_1.clearCardPolicyDetail)(),
255
+ (0, cardPolicyListReducer_1.clearCardPolicyList)(),
250
256
  (0, cardUserOnboardingReducer_1.clearCardUserOnboarding)(),
251
257
  (0, cashbackDetailReducer_1.clearCashbackDetail)(),
252
258
  (0, cashBalanceReducer_1.clearCashBalance)(),
@@ -266,6 +272,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
266
272
  (0, companyMonthEndReportViewReducer_1.clearCompanyMonthEndReportView)(),
267
273
  (0, companyTaskManagerViewReducer_1.clearCompanyTaskManagerView)(),
268
274
  (0, companyViewReducer_1.clearCompanyView)(),
275
+ (0, createCardPolicyReducer_1.clearCreateCardPolicy)(),
269
276
  (0, createTransferEntryReducer_1.clearCreateTransferEntry)(),
270
277
  (0, creditAgentReducer_1.clearAllCreditAgent)(),
271
278
  (0, creditAgentViewReducer_1.clearCreditAgentView)(),
@@ -427,6 +434,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
427
434
  (0, vendorExpenseReducer_1.clearAllVendorExpenseTrends)(),
428
435
  (0, vendorReducer_1.clearAllVendors)(),
429
436
  (0, cannedResponsesReducer_1.clearCannedResponses)(),
437
+ (0, cardPolicyReducer_1.clearCardPolicy)(),
430
438
  (0, classListReducer_1.clearClassList)(),
431
439
  (0, contactReducer_1.clearContacts)(),
432
440
  (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;
@@ -6,7 +6,7 @@ export type ActionType = ReturnType<typeof saveAPIKeyConnection> | ReturnType<ty
6
6
  export declare const saveAPIKeyConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
7
  payload: {
8
8
  tenantId: string;
9
- connectionType: "revenue" | "payments";
9
+ connectionType: "revenue" | "email" | "payments";
10
10
  connectionPayload: import("../tenantPayload").ConnectionDataPayload;
11
11
  };
12
12
  type: "tenant/saveAPIKeyConnectionSuccess";
@@ -6,15 +6,15 @@ export type ActionType = ReturnType<typeof saveConnectorCredentials> | ReturnTyp
6
6
  export declare const saveConnectorCredentialsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
7
  payload: {
8
8
  tenantId: string;
9
- connectionType: "revenue" | "payments";
10
- connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
9
+ connectionType: "revenue" | "email" | "payments";
10
+ connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
11
11
  connectionPayload: import("../tenantPayload").ConnectionDataPayload;
12
12
  };
13
13
  type: "tenant/saveConnectorCredentialsSuccess";
14
14
  } | {
15
15
  payload: {
16
16
  tenantId: string;
17
- connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
17
+ connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
18
18
  status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
19
19
  };
20
20
  type: "tenant/saveConnectorCredentialsFailure";
@@ -6,7 +6,7 @@ export type ActionType = ReturnType<typeof saveOAuthConnection> | ReturnType<typ
6
6
  export declare const saveOAuthConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
7
  payload: {
8
8
  tenantId: string;
9
- connectionType: "revenue" | "payments";
9
+ connectionType: "revenue" | "email" | "payments";
10
10
  connectionPayload: import("../tenantPayload").ConnectionDataPayload;
11
11
  };
12
12
  type: "tenant/saveOAuthConnectionSuccess";
@@ -161,6 +161,7 @@ interface ConnectionsPayload {
161
161
  connections: {
162
162
  accounting: ConnectionDataPayload[];
163
163
  payments: ConnectionDataPayload[];
164
+ email?: ConnectionDataPayload[];
164
165
  revenue?: ConnectionDataPayload[];
165
166
  };
166
167
  }