@zeniai/client-epic-state 5.0.93-betaAK1 → 5.0.93

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 (244) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
  2. package/lib/commonStateTypes/amount.d.ts +0 -1
  3. package/lib/commonStateTypes/amount.js +1 -3
  4. package/lib/commonStateTypes/workingDayHelper.d.ts +0 -9
  5. package/lib/commonStateTypes/workingDayHelper.js +1 -28
  6. package/lib/entity/aiCfo/aiCfoPayload.d.ts +63 -5
  7. package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
  8. package/lib/entity/aiCfo/aiCfoReducer.js +249 -9
  9. package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
  10. package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
  11. package/lib/entity/aiCfo/aiCfoState.d.ts +97 -4
  12. package/lib/entity/aiCfo/aiCfoState.js +18 -1
  13. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +277 -0
  14. package/lib/entity/cardPolicy/cardPolicyPayload.js +143 -0
  15. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +19 -0
  16. package/lib/entity/cardPolicy/cardPolicyReducer.js +175 -0
  17. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +32 -0
  18. package/lib/entity/cardPolicy/cardPolicySelector.js +99 -0
  19. package/lib/entity/cardPolicy/cardPolicyState.d.ts +205 -0
  20. package/lib/entity/cardPolicy/cardPolicyState.js +14 -0
  21. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +18 -0
  22. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +68 -0
  23. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +26 -0
  24. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +47 -0
  25. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +25 -0
  26. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +39 -0
  27. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +24 -0
  28. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +105 -0
  29. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  30. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  31. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  32. package/lib/entity/snackbar/snackbarTypes.js +3 -0
  33. package/lib/entity/tenant/clearAllEpic.d.ts +6 -4
  34. package/lib/entity/tenant/clearAllEpic.js +8 -4
  35. package/lib/epic.d.ts +14 -7
  36. package/lib/epic.js +14 -7
  37. package/lib/esm/commonStateTypes/amount.js +0 -1
  38. package/lib/esm/commonStateTypes/workingDayHelper.js +0 -26
  39. package/lib/esm/entity/aiCfo/aiCfoReducer.js +249 -9
  40. package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
  41. package/lib/esm/entity/aiCfo/aiCfoState.js +15 -0
  42. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +130 -0
  43. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +171 -0
  44. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +75 -0
  45. package/lib/esm/entity/cardPolicy/cardPolicyState.js +9 -0
  46. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +64 -0
  47. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +43 -0
  48. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +35 -0
  49. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +101 -0
  50. package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
  51. package/lib/esm/entity/tenant/clearAllEpic.js +8 -4
  52. package/lib/esm/epic.js +14 -7
  53. package/lib/esm/index.js +39 -14
  54. package/lib/esm/reducer.js +12 -6
  55. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +6 -3
  56. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  57. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +2 -1
  58. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  59. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +2 -22
  60. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +52 -0
  61. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +22 -0
  62. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +1 -0
  63. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +36 -0
  64. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +39 -0
  65. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +34 -0
  66. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +58 -0
  67. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +21 -0
  68. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +1 -0
  69. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +38 -0
  70. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +289 -0
  71. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +109 -0
  72. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +44 -0
  73. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +111 -0
  74. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +25 -0
  75. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +363 -0
  76. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +36 -0
  77. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +19 -0
  78. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +6 -0
  79. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +119 -0
  80. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +154 -0
  81. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +22 -0
  82. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +1 -0
  83. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +39 -0
  84. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +140 -0
  85. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +20 -0
  86. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +100 -0
  87. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +96 -0
  88. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +59 -0
  89. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +24 -0
  90. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +25 -0
  91. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +1 -0
  92. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +34 -0
  93. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +57 -0
  94. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +35 -0
  95. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
  96. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +42 -4
  97. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +35 -0
  98. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +62 -0
  99. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +44 -0
  100. package/lib/index.d.ts +44 -19
  101. package/lib/index.js +183 -34
  102. package/lib/reducer.d.ts +12 -6
  103. package/lib/reducer.js +12 -6
  104. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +11 -2
  105. package/lib/view/aiCfoView/aiCfoViewReducer.js +6 -3
  106. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  107. package/lib/view/aiCfoView/epics/createSessionEpic.js +2 -1
  108. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -1
  109. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  110. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  111. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  112. package/lib/view/people/peopleTypes.d.ts +1 -1
  113. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  114. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +1 -8
  115. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +1 -21
  116. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +0 -22
  117. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +14 -0
  118. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +56 -0
  119. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +15 -0
  120. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +28 -0
  121. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +8 -0
  122. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +2 -0
  123. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +8 -0
  124. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +40 -0
  125. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +8 -0
  126. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +43 -0
  127. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +8 -0
  128. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +38 -0
  129. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +15 -0
  130. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +62 -0
  131. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +15 -0
  132. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +27 -0
  133. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +7 -0
  134. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +2 -0
  135. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +8 -0
  136. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +42 -0
  137. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +8 -0
  138. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +294 -0
  139. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +8 -0
  140. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +113 -0
  141. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +9 -0
  142. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +48 -0
  143. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +8 -0
  144. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +115 -0
  145. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +13 -0
  146. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +29 -0
  147. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +14 -0
  148. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +369 -0
  149. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +6 -0
  150. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +40 -0
  151. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +7 -0
  152. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +26 -0
  153. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +116 -0
  154. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +10 -0
  155. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +33 -0
  156. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +126 -0
  157. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +52 -0
  158. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +158 -0
  159. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +11 -0
  160. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +31 -0
  161. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +12 -0
  162. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +2 -0
  163. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +8 -0
  164. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +43 -0
  165. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +10 -0
  166. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +144 -0
  167. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +7 -0
  168. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +24 -0
  169. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +11 -0
  170. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +104 -0
  171. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +22 -0
  172. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +100 -0
  173. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +8 -0
  174. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +63 -0
  175. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +3 -0
  176. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +28 -0
  177. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  178. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +14 -0
  179. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +27 -1
  180. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +34 -0
  181. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +2 -0
  182. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +7 -0
  183. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +38 -0
  184. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +12 -0
  185. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +61 -0
  186. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +9 -0
  187. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +39 -0
  188. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  189. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
  190. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +12 -2
  191. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +43 -5
  192. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +7 -0
  193. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +42 -1
  194. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +5 -0
  195. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +11 -0
  196. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +66 -0
  197. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +3 -0
  198. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +48 -0
  199. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  200. package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
  201. package/lib/zeniAPI.d.ts +0 -1
  202. package/package.json +1 -1
  203. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +0 -31
  204. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +0 -69
  205. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +0 -29
  206. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +0 -47
  207. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +0 -34
  208. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +0 -32
  209. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +0 -54
  210. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +0 -92
  211. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +0 -225
  212. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +0 -10
  213. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +0 -39
  214. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +0 -36
  215. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +0 -27
  216. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +0 -28
  217. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +0 -48
  218. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +0 -36
  219. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +0 -21
  220. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +0 -73
  221. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +0 -40
  222. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +0 -33
  223. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +0 -37
  224. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +0 -53
  225. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +0 -14
  226. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +0 -38
  227. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +0 -7
  228. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +0 -36
  229. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +0 -56
  230. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +0 -60
  231. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +0 -22
  232. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +0 -96
  233. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +0 -59
  234. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +0 -230
  235. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +0 -122
  236. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +0 -13
  237. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +0 -23
  238. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +0 -43
  239. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +0 -9
  240. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +0 -40
  241. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.d.ts +0 -7
  242. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +0 -31
  243. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.d.ts +0 -15
  244. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +0 -32
package/lib/esm/index.js CHANGED
@@ -23,7 +23,7 @@ import { SCHEDULE_DAYS_OF_MONTH, convertToPeriod, toAbsoluteDay, toMonth, toMont
23
23
  import { mapTimePeriodtoTimeframeTick, toTimePeriod, toTimeframeTick, } from './commonStateTypes/timeframeTick';
24
24
  import { isAgingReport, isCashFlowOrBalanceSheetReport, isDashboardClassesViewReport, isDashboardReport, isFluxAnalysisOpExReport, isOpExByVendorReport, isPAndLClassesViewReport, isPAndLProjectViewReport, isPAndLReport, } from './commonStateTypes/viewAndReport/reportIDHelper';
25
25
  import { toReportFormatStrict, toReportID, } from './commonStateTypes/viewAndReport/viewAndReport';
26
- import { PAYMENT_BUSINESS_DAYS, filterDays, getNextNthWorkingDay, getNextTransferDate, getPreviousNthWorkingDay, getYearsList, holidaysFormatted, isHoliday, isHolidayToday, } from './commonStateTypes/workingDayHelper';
26
+ import { PAYMENT_BUSINESS_DAYS, filterDays, getNextNthWorkingDay, getPreviousNthWorkingDay, getYearsList, holidaysFormatted, isHoliday, isHolidayToday, } from './commonStateTypes/workingDayHelper';
27
27
  import { getAllAccounts, getTransactionFilterAccountOptions, } from './entity/account/accountSelector';
28
28
  import { toAccountType, toReconciliationAccountSource, } from './entity/account/accountState';
29
29
  import { getAccountGroupKey, toAccountGroupType, } from './entity/accountGroup/accountGroupState';
@@ -303,7 +303,7 @@ import { closeChargeCard, completeCVVActivationWait, completeDebitCardSetPinWait
303
303
  import { getChargeCardCVVActivateView, getChargeCardControlDetailView, getChargeCardDetailView, getChargeCardRecurringExpensesView, getChargeCardTransactionAttachmentView, getDebitCardSetPinView, getDepositAccountLimitFetchStateByDepositAccountId, } from './view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector';
304
304
  import { toChargeCardSortKeyType, } from './view/spendManagement/chargeCards/chargeCardList/chargeCardList';
305
305
  import { closeChargeCards, fetchChargeCardList, fetchChargeCardListPage, fetchCreditAccount, fetchCreditAccountRepayment, fetchDebitCardSummary, lockChargeCards, resendCardInvite, revokeCardInvite, revokeChargeCardsInvite, unlockChargeCards, updateBulkActionCardIds, updateSearchText as updateChargeCardListSearchText, updateChargeCardListUIState, updateChargeCardsSpendLimit, updateCreditAccountBalanceFromPusher, updateRowActionCardId, } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer';
306
- import { anyCardOnHold, getChargeCardBulkActionView, getChargeCardListView, getChargeCardRecurringExpensesByCardIds, getChargeCardRowActionView, getCreditAccountDetails, getDebitCardList, getDebitCardSummary, getDepositAccountListWithDebitCardIssued, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector';
306
+ import { anyCardOnHold, getAllChargeCardsWithUser, getChargeCardBulkActionView, getChargeCardListView, getChargeCardRecurringExpensesByCardIds, getChargeCardRowActionView, getCreditAccountDetails, getDebitCardList, getDebitCardSummary, getDepositAccountListWithDebitCardIssued, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector';
307
307
  import { PAYMENT_HISTORY_FILTER_CATEGORIES, } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory';
308
308
  import { getChargeCardPaymentHistoryDownloadReport, } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector';
309
309
  import { getPaymentHistorySourceAccountName, getPaymentStatusDisplayText, } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryHelpers';
@@ -315,8 +315,12 @@ import { acceptChargeCardTerms, enableChargeCardAutoPay, expressInterestInCharge
315
315
  import { getChargeCardBusinessVerificationDetails, getChargeCardSetupViewDetails, } from './view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector';
316
316
  import { fetchChargeCardStatementList } from './view/spendManagement/chargeCards/chargeCardStatementList/chargeCardStatementListReducer';
317
317
  import { getChargeCardStatements, } from './view/spendManagement/chargeCards/chargeCardStatementList/chargeCardStatementListSelector';
318
- import { fetchDepositAccountListForCards, fetchIssueCardPage, issueChargeCards, resetIssueChargeCardForm, updateChargeCardsLocalStore, updateCustomAddressId, } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer';
319
- import { getIssueChargeCardView, } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector';
318
+ import { applyAiCardCreationFormDraftUpdate, } from './view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate';
319
+ import { buildAiCardCreationFormDraftSeed, } from './view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed';
320
+ import { deriveAiCardRowsFromTeams, } from './view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams';
321
+ import { clearAiCardCreationFormDraft, fetchDepositAccountListForCards, fetchIssueCardPage, issueChargeCards, resetIssueChargeCardForm, seedAiCardCreationFormDraft, updateAiCardCreationFormDraft, updateChargeCardsLocalStore, updateCustomAddressId, updateLastIssuedCardIds, } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer';
322
+ import { getAiCardCreationFormDraft, getInFlightIssueChargeCardsCount, getIssueChargeCardView, getIssueChargeCardsSaveStatus, getLastIssueChargeCardsSourceChatSessionId, getLastIssuedChargeCardIds, selectIssueChargeCardLocalDataFromDraft, } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector';
323
+ import { toIssueChargeCardLocalDataFromDraft } from './view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft';
320
324
  import { clearSetupViewDataInLocalStore, enableSetup, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveIndustryAndIncDateInLocalStore, saveSetupViewDataInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, updateBusinessVerificationDetails, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, } from './view/spendManagement/commonSetup/setupViewReducer';
321
325
  import { getBusinessVerificationDetails, getCommonSetupViewDetails, } from './view/spendManagement/commonSetup/setupViewSelector';
322
326
  import { COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES, COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY, COMPANY_PURPOSE_OF_ACCOUNT_CODES, COMPANY_SOURCE_OF_FUNDS_CODES, COMPANY_TRANSACTION_VOLUME_CODES, COMPANY_US_NEXUS_TYPE_CODES, getCompanyOnboardingSubIndustryCodesForIndustry, } from './view/spendManagement/commonSetup/types/businessVerification';
@@ -580,7 +584,7 @@ export { deleteRemi, fetchRemiDetail, cancelAndDeleteRemi, approveOrRejectRemi,
580
584
  export { getEditRemiDetail, };
581
585
  export { fetchEditRemiDetailPage, fetchRecommendationsAndUpdateMerchantRecommendations, fetchRemiAndInitializeLocalStore, initializeRemiToLocalStore, saveRemiUpdatesToLocalStore, fetchCurrencyConversionValue, discardRemiUpdatesInLocalStore, removeFileFromRemiUpdatesInLocalStore, saveRemiDetail, saveRemiSuccessOrFailure, parseReceiptsToRemi, clearEditRemiViewDetail, updateAddRemiAutoFields, updateUploadFetchState, updateTentativeMerchantNames, clearTentativeMerchantName, updateReimbursementType, updateHomeCurrencyConversion, clearAddRemiAutoFields, };
582
586
  export { reduceFetchState, reduceFetchStateParallelTimeframes, reduceAnyFetchState, reduceAllFetchState, reduceAnyCompletedFetchState, isAnyFetchInProgress, isAllFetchCompleted, ALL_FILE_TYPES, toFileTypeStrict, };
583
- export { getNextNthWorkingDay, getNextTransferDate, getPreviousNthWorkingDay, isHolidayToday, filterDays, getYearsList, isHoliday, holidaysFormatted, PAYMENT_BUSINESS_DAYS, };
587
+ export { getNextNthWorkingDay, getPreviousNthWorkingDay, isHolidayToday, filterDays, getYearsList, isHoliday, holidaysFormatted, PAYMENT_BUSINESS_DAYS, };
584
588
  export { fetchCompanyOnboardingView, fetchQBOConnectionPool, updateQBOConnectionPoolExternalConnection, fetchOnboardingCompletedCompanies, saveOnboardingCustomerCompletedStatus, toProductType, toProductTypeStrict, getOnboardingCockpitView, getNewOnboardingCustomerView, getOnboardingEmailGroup, initializeOnboardingCustomerViewUpdateData, clearOnboardingCustomerViewUpdateData, saveOnboardingCustomerViewUpdateData, updateOnboardingCustomerListUIState, updateCustomerCreationStatus, updateStatusAfterOnboardingCompleted, saveOnboardingCustomerViewUpdates, saveOnboardingCustomerNotes, saveOnboardingCustomerDataInLocalStore, updateOnboardingCustomerDataInLocalStore, resetNewOnboardedCustomerId, sendOnboardingCustomerViewInvite, retryBankAccountConnectionForOnboarding, };
585
589
  export { getTransactionsListByCategoryType, getTransactionListUIStateByCategoryType, };
586
590
  export { getChangedLineItemCountFromLocalData, isAccountUncategorized };
@@ -609,7 +613,7 @@ export { fetchUserRoleConfig, getUserRoleConfig };
609
613
  export { getCompanyHealthMetricConfig, fetchCompanyHealthMetricConfig, };
610
614
  export { updateCompaniesHealth, updateCompanyHealth, };
611
615
  export { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, };
612
- export { updateChargeCardTransactionAttachments, updateChargeCardStatusFromPusher, updateChargeCardSpendingFromPusher, updateChargeCardTransactionStatusFromPusher, updateChargeCardTransactionFromPusher, updateChargeCardTransactionReceiptFromPusher, updateCreditAccountBalanceFromPusher, addChargeCardTransactionFromPusher, addDeclinedChargeCardTransactionFromPusher, attachmentFilePathToAttachment, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, getChargeCardBusinessVerificationDetails, fetchDebitCardSummary, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, fetchCreditAccountRepayment, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore, getChargeCardRepaymentDetail, fetchChargeCardPaymentPage, fetchChargeCardPaymentHistory, updatePaymentHistoryDownloadUIState, updatePaymentHistoryFilters, updatePaymentHistorySearchText, updatePaymentHistoryUIState, getChargeCardPaymentHistoryDownloadReport, getChargeCardPaymentHistoryView, getPaymentHistorySourceAccountName, getPaymentStatusDisplayText, PAYMENT_HISTORY_FILTER_CATEGORIES, getCreditAccountDetails, fetchChargeCardDetailPage, fetchChargeCardDetail, fetchChargeCardTransactionStatistics, fetchDepositAccountLimit, getChargeCardDetailView, getChargeCardControlDetailView, getDepositAccountLimitFetchStateByDepositAccountId, getChargeCardTransactionAttachmentView, getDebitCardSetPinView, getChargeCardRecurringExpensesByCardIds, getChargeCardRecurringExpensesView, getChargeCardRowActionView, getChargeCardBulkActionView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, toChargeCardSortKeyType, getCashbackDetail, getZeniDateFromPeriod, toCreditLimitFrequencyCodeType, getDepositAccountListWithDebitCardIssued, getIssueChargeCardView, getChargeCardSetupViewDetails, fetchChargeCardStatementList, getChargeCardStatements, fetchChargeCardSetupView, enableChargeCardAutoPay, acceptChargeCardTerms, expressInterestInChargeCard, getDepositAccountLimitForChargeCardByDepositAccountId, toCardAddressType, toShippingAddressType, toCardType, issueChargeCards, fetchIssueCardPage, fetchDepositAccountListForCards, getDebitCardList, getDebitCardSummary, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateBulkActionCardIds, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, lockChargeCard, unlockChargeCard, closeChargeCard, updateChargeCardName, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, completeDebitCardSetPinWait, startDebitCardSetPinWait, updateDebitCardPinAttempt, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, updateRowActionCardId, revokeChargeCardsInvite, lockChargeCards, unlockChargeCards, closeChargeCards, updateChargeCardsSpendLimit, fetchChargeCardsRecurringExpenses, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, getChargeCardById, anyCardOnHold, };
616
+ export { updateChargeCardTransactionAttachments, updateChargeCardStatusFromPusher, updateChargeCardSpendingFromPusher, updateChargeCardTransactionStatusFromPusher, updateChargeCardTransactionFromPusher, updateChargeCardTransactionReceiptFromPusher, updateCreditAccountBalanceFromPusher, addChargeCardTransactionFromPusher, addDeclinedChargeCardTransactionFromPusher, attachmentFilePathToAttachment, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, getChargeCardBusinessVerificationDetails, fetchDebitCardSummary, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, fetchCreditAccountRepayment, getAllChargeCardsWithUser, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore, getChargeCardRepaymentDetail, fetchChargeCardPaymentPage, fetchChargeCardPaymentHistory, updatePaymentHistoryDownloadUIState, updatePaymentHistoryFilters, updatePaymentHistorySearchText, updatePaymentHistoryUIState, getChargeCardPaymentHistoryDownloadReport, getChargeCardPaymentHistoryView, getPaymentHistorySourceAccountName, getPaymentStatusDisplayText, PAYMENT_HISTORY_FILTER_CATEGORIES, getCreditAccountDetails, fetchChargeCardDetailPage, fetchChargeCardDetail, fetchChargeCardTransactionStatistics, fetchDepositAccountLimit, getChargeCardDetailView, getChargeCardControlDetailView, getDepositAccountLimitFetchStateByDepositAccountId, getChargeCardTransactionAttachmentView, getDebitCardSetPinView, getChargeCardRecurringExpensesByCardIds, getChargeCardRecurringExpensesView, getChargeCardRowActionView, getChargeCardBulkActionView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, toChargeCardSortKeyType, getCashbackDetail, getZeniDateFromPeriod, toCreditLimitFrequencyCodeType, getDepositAccountListWithDebitCardIssued, getInFlightIssueChargeCardsCount, getIssueChargeCardView, getIssueChargeCardsSaveStatus, getLastIssueChargeCardsSourceChatSessionId, getLastIssuedChargeCardIds, clearAiCardCreationFormDraft, seedAiCardCreationFormDraft, updateAiCardCreationFormDraft, getAiCardCreationFormDraft, selectIssueChargeCardLocalDataFromDraft, toIssueChargeCardLocalDataFromDraft, buildAiCardCreationFormDraftSeed, deriveAiCardRowsFromTeams, applyAiCardCreationFormDraftUpdate, getChargeCardSetupViewDetails, fetchChargeCardStatementList, getChargeCardStatements, fetchChargeCardSetupView, enableChargeCardAutoPay, acceptChargeCardTerms, expressInterestInChargeCard, getDepositAccountLimitForChargeCardByDepositAccountId, toCardAddressType, toShippingAddressType, toCardType, issueChargeCards, fetchIssueCardPage, fetchDepositAccountListForCards, getDebitCardList, getDebitCardSummary, updateCustomAddressId, updateChargeCardsLocalStore, updateLastIssuedCardIds, resetIssueChargeCardForm, updateBulkActionCardIds, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, lockChargeCard, unlockChargeCard, closeChargeCard, updateChargeCardName, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, completeDebitCardSetPinWait, startDebitCardSetPinWait, updateDebitCardPinAttempt, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, updateRowActionCardId, revokeChargeCardsInvite, lockChargeCards, unlockChargeCards, closeChargeCards, updateChargeCardsSpendLimit, fetchChargeCardsRecurringExpenses, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, getChargeCardById, anyCardOnHold, };
613
617
  export { TIME_SERIES_DURATIONS, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, fetchAggregatedReport, aggregatedReportView, };
614
618
  export { fetchApAging, getApAgingReport, updateApAgingUIState, };
615
619
  export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
@@ -647,9 +651,35 @@ export { cancelAiAccountantOnboarding, clearAiAccountantView, fetchAiAccountantC
647
651
  export { getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
648
652
  export { fetchChatSessionsForUser, createSession, submitQuestion, updateAiCfoViewScrollPosition, updateCurrentInput, updateCotCollapsedState, clearInput, setSession, clearAiCfoView, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, createSessionAndSubmit, stopSubmit, stopSubmitQuestion, fetchChatHistory, acceptMasterTOS, deleteChatSession, updateResponseState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } from './view/aiCfoView/aiCfoViewReducer';
649
653
  export { getAiCfoView, getSuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewSelector';
650
- export { setNewSession, setSessions, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, clearAiCfo, toAiCfoVisualization, } from './entity/aiCfo/aiCfoReducer';
651
- export { getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, } from './entity/aiCfo/aiCfoSelector';
652
- export { ALL_AI_CFO_CHARTS_TYPES, ALL_AI_CFO_VISUALIZATION_TYPES, ALL_AI_CFO_ANSWER_STATE_TYPES, ALL_AI_CFO_ANSWER_RESPONSE_TYPES, toAiCfoVisualizationType, toAiCfoVisualizationTypeStrict, toAiCfoChartType, toAiCfoChartTypeStrict, toAiCfoAnswerStateType, toAiCfoAnswerStateTypeStrict, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toMessageSender, toMessageType, } from './entity/aiCfo/aiCfoState';
654
+ export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, clearAiCfo, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, clearSyntheticAiCfoAnswers, } from './entity/aiCfo/aiCfoReducer';
655
+ export { getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, } from './entity/aiCfo/aiCfoSelector';
656
+ export { ALL_AI_CFO_CHARTS_TYPES, ALL_AI_CFO_VISUALIZATION_TYPES, ALL_AI_CFO_ANSWER_STATE_TYPES, ALL_AI_CFO_ANSWER_RESPONSE_TYPES, ALL_INTERACTIVE_FORM_TYPES, toAiCfoVisualizationType, toAiCfoVisualizationTypeStrict, toAiCfoChartType, toAiCfoChartTypeStrict, toAiCfoAnswerStateType, toAiCfoAnswerStateTypeStrict, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toInteractiveFormType, toInteractiveFormTypeStrict, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, } from './entity/aiCfo/aiCfoState';
657
+ // ── Card Policy (shared between manual + AI-driven flows) ────────────
658
+ export { clearPolicyDocumentExtraction, extractPolicyDocument, fetchCardPolicyMccCategories, fetchCardPolicyRecommendationFromUpload, fetchCardPolicyVendorOptions, removeCardPolicyTemplate, updateCardPolicyMccCategories, updateCardPolicyMccCategoriesFailure, updateCardPolicyStats, updateCardPolicyTemplates, updateCardPolicyVendorOptions, updateCardPolicyVendorOptionsFailure, updateCreatedCardPolicyTemplate, updatePolicyDocumentExtractionFailure, updatePolicyDocumentExtractionSuccess, updatePolicyRecommendationFromUploadFailure, updatePolicyRecommendationFromUploadSuccess, clearCardPolicy, } from './entity/cardPolicy/cardPolicyReducer';
659
+ export { getAllCardPolicyTemplates, getCardPolicyMccCategories, getCardPolicyMccCategoriesError, getCardPolicyMccCategoriesFetchState, getCardPolicyStats, getCardPolicySuggestedAllowCategories, getCardPolicySuggestedAllowMerchants, getCardPolicySuggestedBlockCategories, getCardPolicySuggestedBlockMerchants, getCardPolicyTemplateById, getCardPolicyTemplatesByIds, getCardPolicyVendorSearchFetchState, getCardPolicyVendorSearchOptions, getCardPolicyVendorSearchString, getExtractedCardPolicyRules, getPolicyDocumentExtractionError, getPolicyDocumentExtractionFetchState, getPolicyRecommendationFromUploadAnswerId, getPolicyRecommendationFromUploadChatSessionId, getPolicyRecommendationFromUploadError, getPolicyRecommendationFromUploadFetchState, getUploadedPolicyDocumentFileName, } from './entity/cardPolicy/cardPolicySelector';
660
+ export { ALL_CARD_POLICY_TEMPLATE_MODES, ALL_CARD_POLICY_TEMPLATE_STATUSES, toCardPolicyTemplateMode, toCardPolicyTemplateStatus, } from './entity/cardPolicy/cardPolicyState';
661
+ export { toBulkCreateCardPolicyTemplateError, toCardPolicyEditFormDraft, toCardPolicyStats, toCardPolicyTemplate, toCardPolicyTemplateList, toCardPolicyVendorSearchOption, toCreateCardPolicyTemplateRequestBody, toCreateCardPolicyTemplatesRequestBody, toExtractedCardPolicyRules, toUpdateCardPolicyTemplateRequestBody, } from './entity/cardPolicy/cardPolicyPayload';
662
+ // Create flow (bulk POST /policy-templates — single-policy callers wrap
663
+ // their one request in a length-1 `templates` array).
664
+ export { applyExtractedPolicyToAiCardPolicyDraft, applyExtractedPolicyToManualCardPolicyDraft, clearAiCardPolicyFormDraft, clearCreateCardPolicy, clearManualCardPolicyFormDraft, createCardPolicyTemplates, seedAiCardPolicyFormDraft, seedManualCardPolicyFormDraft, updateAiCardPolicyFormDraft, updateAiCardPolicyFormDraftFromUploadPlan, updateCreateCardPolicyTemplateRequestState, updateManualCardPolicyFormDraft, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
665
+ export { getAiCardPolicyFormDraft, getCreateCardPolicyTemplateRequestState, getLastCreateCardPolicySourceChatSessionId, getLastCreateCardPolicyTemplateErrors, getLastCreatedCardPolicyTemplateId, getLastCreatedCardPolicyTemplateIds, getManualCardPolicyFormDraft, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector';
666
+ // Card policy form draft types + helpers (consumed by the AI CFO
667
+ // `CardPolicyInteractiveForm` and the manual `CardPolicyCreatePage`).
668
+ export { CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT, CARD_POLICY_LIMIT_ROW_ID_TRANSACTION, toMccCategoryLike, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes';
669
+ export { MCC_CHIP_ID_PREFIX, VENDOR_CHIP_ID_PREFIX, buildMccCategoryChipId, buildVendorChipId, toMccCategoryChipFieldValue, toVendorChipFieldValue, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds';
670
+ export { buildAiCardPolicyFormDraftSeed, buildEmptyLimitRows, buildUploadReviewRows, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed';
671
+ export { buildManualCardPolicyFormDraftSeed } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed';
672
+ export { deriveAiPolicyReviewRowsFromInputs } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs';
673
+ export { applyAiCardPolicyFormDraftUpdate } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate';
674
+ export { toCardPolicyTemplateRequestFromDraft } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft';
675
+ export { toBulkCardPolicyTemplateRequestsFromDraft } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft';
676
+ export { toManualCardPolicyTemplateRequestFromDraft } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft';
677
+ // List
678
+ export { archiveCardPolicy, clearCardPolicyList, fetchCardPolicyList, updateArchiveCardPolicyFetchStatus, updateCardPolicyListFetchStatus, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer';
679
+ export { getArchiveCardPolicyFetchState, getCardPolicyListFetchState, getCardPolicyListView, getCardPolicyTemplateIds, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector';
680
+ // Detail (edit-only)
681
+ export { clearCardPolicyDetail, fetchCardPolicyDetail, updateCardPolicy, updateCardPolicyDetailFetchStatus, updateCardPolicyFetchStatus, updateCardPolicyFormDraft, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer';
682
+ export { getCardPolicyDetailFetchState, getCardPolicyDetailView, getCardPolicyFormDraft, getUpdateCardPolicyFetchState, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector';
653
683
  export { fetchTreasuryOverviewDetail, fetchTreasuryTransactionList, updateTreasuryTransactionListUIState, } from './view/spendManagement/treasury/treasuryList/treasuryDetailReducer';
654
684
  export { getTreasuryDetail, } from './view/spendManagement/treasury/treasuryList/treasuryDetailSelector';
655
685
  export { executeTreasuryTransferMoney, updateTreasuryTransferMoneyLocalData, clearTreasuryTransferMoney, } from './view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyReducer';
@@ -666,8 +696,3 @@ export { getTransactionActivityLogView, } from './view/transactionActivityLogVie
666
696
  // ── Session Management ──────────────────────────────────────────────
667
697
  export { SessionManager } from './entity/tenant/SessionManager';
668
698
  export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
669
- export { fetchCashManagementBanner, fetchCashManagementOverviewPage, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
670
- export { clearAutoSweepFlow, saveAutoSweepSettings, updateAutoSweepDraft, updateAutoSweepSettingsFetchStatus, updateCashManagementSettings, updateCashManagementSettingsFetchStatus, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
671
- export { getAutoSweepFlow } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector';
672
- export { RISK_BUFFER_AMOUNT, bufferAmountToRisk, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState';
673
- export { getCashManagementOverview, getCashManagementOverviewBanner, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector';
@@ -11,6 +11,7 @@ import billTransaction, { initialState as initialBillTransactionState, } from '.
11
11
  import contact, { initialState as initialContactState, } from './entity/billPay/contact/contactReducer';
12
12
  import recurringBill, { initialState as initialRecurringBillState, } from './entity/billPay/recurringBills/recurringBillsReducer';
13
13
  import cardPayment, { initialState as initialCardPaymentState, } from './entity/cardPayment/cardPaymentReducer';
14
+ import cardPolicy, { initialState as initialCardPolicyState, } from './entity/cardPolicy/cardPolicyReducer';
14
15
  import chargeCard, { initialState as initialChargeCardState, } from './entity/chargeCard/chargeCardReducer';
15
16
  import chargeCardRepayment, { initialState as initialChargeCardRepaymentState, } from './entity/chargeCardRepayment/chargeCardRepaymentReducer';
16
17
  import chargeCardTransaction, { initialState as initialChargeCardTransactionState, } from './entity/chargeCardTransaction/chargeCardTransactionReducer';
@@ -84,6 +85,9 @@ import bankAccountView, { initialState as initialBankAccountView, } from './view
84
85
  import billPayCard, { initialState as initialBillPayCardState, } from './view/billPayCard/billPayCardReducer';
85
86
  import cardBalance, { initialState as initialCardBalanceState, } from './view/cardBalance/cardBalanceReducer';
86
87
  import cardPaymentView, { initialState as initialCardPaymentViewState, } from './view/cardPayment/cardPaymentViewReducer';
88
+ import cardPolicyDetail, { initialState as initialCardPolicyDetailState, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer';
89
+ import cardPolicyList, { initialState as initialCardPolicyListState, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer';
90
+ import createCardPolicy, { initialState as initialCreateCardPolicyState, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
87
91
  import cashBalance, { initialState as initialCashBalanceState, } from './view/cashBalance/cashBalanceReducer';
88
92
  import cashFlow, { initialState as initialCashFlowState, } from './view/cashFlow/cashFlowReducer';
89
93
  import cashInCashOut, { initialState as initialCashInCashOutState, } from './view/cashInCashOut/cashInCashOutReducer';
@@ -158,8 +162,6 @@ import internationalWireVerification, { initialState as initialInternationalWire
158
162
  import magicLinkView, { initialState as initialMagicLinkViewState, } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
159
163
  import previousBills, { initialState as initialPreviousBillsState, } from './view/spendManagement/billPay/previousBills/previousBillsReducer';
160
164
  import wiseRedirect, { initialState as initialWiseRedirectState, } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer';
161
- import autoSweepFlow, { initialState as initialAutoSweepFlowState, } from './view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
162
- import cashManagementOverview, { initialState as initialCashManagementOverviewState, } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
163
165
  import cardUserOnboarding, { initialState as initialCardUserOnboardingState, } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
164
166
  import cashbackDetail, { initialState as initialCashbackDetailState, } from './view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer';
165
167
  import chargeCardConfig, { initialState as initialChargeCardConfigState, } from './view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer';
@@ -240,6 +242,7 @@ const initialEntitiesState = {
240
242
  bankAccountState: initialBankAccountState,
241
243
  billTransactionState: initialBillTransactionState,
242
244
  cardPaymentState: initialCardPaymentState,
245
+ cardPolicyState: initialCardPolicyState,
243
246
  chargeCardState: initialChargeCardState,
244
247
  chargeCardRepaymentState: initialChargeCardRepaymentState,
245
248
  chargeCardTransactionState: initialChargeCardTransactionState,
@@ -311,7 +314,6 @@ const initialViewsState = {
311
314
  arAgingState: initialArAgingState,
312
315
  auditReportViewState: initialAuditReportViewState,
313
316
  authenticationViewState: initialAuthenticationViewState,
314
- autoSweepFlowState: initialAutoSweepFlowState,
315
317
  autotransferRulesState: initialAutotransferRulesState,
316
318
  balanceSheetState: initialBalanceSheetState,
317
319
  bankAccountViewState: initialBankAccountView,
@@ -325,12 +327,13 @@ const initialViewsState = {
325
327
  billsBulkActionViewState: initialBillsBulkActionViewState,
326
328
  cardBalanceState: initialCardBalanceState,
327
329
  cardPaymentViewState: initialCardPaymentViewState,
330
+ cardPolicyDetailState: initialCardPolicyDetailState,
331
+ cardPolicyListState: initialCardPolicyListState,
328
332
  cardUserOnboardingState: initialCardUserOnboardingState,
329
333
  cashbackDetailState: initialCashbackDetailState,
330
334
  cashBalanceState: initialCashBalanceState,
331
335
  cashFlowState: initialCashFlowState,
332
336
  cashInCashOutState: initialCashInCashOutState,
333
- cashManagementOverviewState: initialCashManagementOverviewState,
334
337
  cashPositionState: initialCashPositionState,
335
338
  chargeCardConfigState: initialChargeCardConfigState,
336
339
  chargeCardDetailState: initialChargeCardDetailState,
@@ -349,6 +352,7 @@ const initialViewsState = {
349
352
  companyTaskManagerViewState: initialCompanyTaskManagerViewState,
350
353
  companyViewState: initialCompanyViewState,
351
354
  countryListState: initialCountryListState,
355
+ createCardPolicyState: initialCreateCardPolicyState,
352
356
  creditAgentEntityState: initialCreditAgentEntityState,
353
357
  creditAgentViewState: initialCreditAgentViewState,
354
358
  dashboardLayoutState: initialDashboardLayoutState,
@@ -479,6 +483,7 @@ const entityReducers = {
479
483
  billPayConfigState: billPayConfig,
480
484
  billTransactionState: billTransaction,
481
485
  cardPaymentState: cardPayment,
486
+ cardPolicyState: cardPolicy,
482
487
  chargeCardState: chargeCard,
483
488
  chargeCardRepaymentState: chargeCardRepayment,
484
489
  chargeCardTransactionState: chargeCardTransaction,
@@ -550,7 +555,6 @@ const viewReducers = {
550
555
  arAgingState: arAging,
551
556
  auditReportViewState: auditReportView,
552
557
  authenticationViewState: authentication,
553
- autoSweepFlowState: autoSweepFlow,
554
558
  autotransferRulesState: autotransferRules,
555
559
  balanceSheetState: balanceSheet,
556
560
  bankAccountViewState: bankAccountView,
@@ -563,12 +567,13 @@ const viewReducers = {
563
567
  billsBulkActionViewState: billsBulkActionView,
564
568
  cardBalanceState: cardBalance,
565
569
  cardPaymentViewState: cardPaymentView,
570
+ cardPolicyDetailState: cardPolicyDetail,
571
+ cardPolicyListState: cardPolicyList,
566
572
  cardUserOnboardingState: cardUserOnboarding,
567
573
  cashbackDetailState: cashbackDetail,
568
574
  cashBalanceState: cashBalance,
569
575
  cashFlowState: cashFlow,
570
576
  cashInCashOutState: cashInCashOut,
571
- cashManagementOverviewState: cashManagementOverview,
572
577
  cashPositionState: cashPosition,
573
578
  chargeCardConfigState: chargeCardConfig,
574
579
  chargeCardDetailState: chargeCardDetail,
@@ -587,6 +592,7 @@ const viewReducers = {
587
592
  companyTaskManagerViewState: companyTaskManagerView,
588
593
  companyViewState: companyView,
589
594
  countryListState: countryList,
595
+ createCardPolicyState: createCardPolicy,
590
596
  creditAgentEntityState: creditAgentEntity,
591
597
  creditAgentViewState: creditAgentView,
592
598
  dashboardState: dashboard,
@@ -188,8 +188,10 @@ const aiCfoView = createSlice({
188
188
  draft.createSessionState.fetchState = 'In-Progress';
189
189
  draft.createSessionState.error = undefined;
190
190
  },
191
- prepare(agentId, userId, contextRefId, contextType) {
192
- return { payload: { agentId, contextRefId, contextType, userId } };
191
+ prepare(agentId, userId, contextRefId, contextType, pageContext) {
192
+ return {
193
+ payload: { agentId, contextRefId, contextType, pageContext, userId },
194
+ };
193
195
  },
194
196
  },
195
197
  createSessionSuccess(draft, action) {
@@ -220,7 +222,7 @@ const aiCfoView = createSlice({
220
222
  draft.createSessionAndSubmitState.fetchState = 'In-Progress';
221
223
  draft.createSessionAndSubmitState.error = undefined;
222
224
  },
223
- prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files) {
225
+ prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext) {
224
226
  return {
225
227
  payload: {
226
228
  agentId,
@@ -230,6 +232,7 @@ const aiCfoView = createSlice({
230
232
  createdAt,
231
233
  question,
232
234
  files,
235
+ pageContext,
233
236
  },
234
237
  };
235
238
  },
@@ -66,8 +66,11 @@ function waitForChannelSubscription(pusherInstance, channelName, timeoutMs = 500
66
66
  }));
67
67
  }
68
68
  export const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(createSessionAndSubmit.match), switchMap((action) => {
69
- const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, } = action.payload;
70
- const payload = { agent_id: agentId };
69
+ const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, } = action.payload;
70
+ const payload = {
71
+ agent_id: agentId,
72
+ ...(pageContext != null && { page_context: pageContext }),
73
+ };
71
74
  return zeniAPI
72
75
  .postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
73
76
  .pipe(mergeMap((response) => {
@@ -5,11 +5,12 @@ import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload
5
5
  import { date as zeniDate } from '../../../zeniDayJS';
6
6
  import { createSession, createSessionFailure, createSessionSuccess, } from '../aiCfoViewReducer';
7
7
  export const createSessionEpic = (actions$, _, zeniAPI) => actions$.pipe(filter(createSession.match), switchMap((action) => {
8
- const { agentId, contextRefId, contextType, userId } = action.payload;
8
+ const { agentId, contextRefId, contextType, pageContext, userId } = action.payload;
9
9
  const payload = {
10
10
  agent_id: agentId,
11
11
  ...(contextRefId != null && { context_ref_id: contextRefId }),
12
12
  ...(contextType != null && { context_type: contextType }),
13
+ ...(pageContext != null && { page_context: pageContext }),
13
14
  };
14
15
  return zeniAPI
15
16
  .postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
@@ -2,13 +2,23 @@ import { of } from 'rxjs';
2
2
  import { catchError, filter, mergeMap } from 'rxjs/operators';
3
3
  import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
4
4
  import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, } from '../aiCfoViewReducer';
5
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
5
+ /**
6
+ * GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
7
+ *
8
+ * Appends `&no_card_created=true` when the action payload sets
9
+ * `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
10
+ * has not yet created any card). Any other value omits the flag entirely so
11
+ * the existing call sites continue to issue the unchanged request.
12
+ */
6
13
  export const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchSuggestedQuestions.match),
7
14
  // mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
8
15
  // would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
9
16
  mergeMap((action) => {
10
- const { pageContext } = action.payload;
17
+ const { pageContext, noCardCreated } = action.payload;
11
18
  const query = new URLSearchParams({ page_context: pageContext });
19
+ if (noCardCreated === true) {
20
+ query.set('no_card_created', 'true');
21
+ }
12
22
  const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
13
23
  return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
14
24
  if (isSuccessResponse(response) && response.data != null) {
@@ -1,29 +1,10 @@
1
1
  import recordGet from 'lodash/get';
2
2
  import { reduceAllFetchState } from '../../../commonStateTypes/reduceFetchState';
3
- import { getDepositAccountByDepositAccountId } from '../../../entity/depositAccount/depositAccountSelector';
4
- import { getAllFundingAccounts, mapDepositAccToFundingAccount, } from '../commonSetup/setupViewSelector';
3
+ import { getAllFundingAccounts, } from '../commonSetup/setupViewSelector';
5
4
  import { getAllDepositAccounts } from '../zeniAccounts/depositAccountList/depositAccountListSelector';
6
5
  import { getAllPaymentAccounts } from '../zeniAccounts/paymentAccountList/paymentAccountListSelector';
7
- const buildCashManagementRule = (autoSweepFlowState, depositAccountState, treasuryDetailState) => {
8
- const { settingsId, bufferAmount, frequency, memo, primaryFundingAccountId, nextTransferDate } = autoSweepFlowState;
9
- if (settingsId == null || primaryFundingAccountId == null) {
10
- return undefined;
11
- }
12
- const depositAccount = getDepositAccountByDepositAccountId(depositAccountState, primaryFundingAccountId);
13
- return {
14
- bufferAmount,
15
- frequency,
16
- memo,
17
- settingsId,
18
- primaryFundingAccount: depositAccount != null
19
- ? mapDepositAccToFundingAccount(depositAccount)
20
- : undefined,
21
- treasurySummary: treasuryDetailState.accountSummary,
22
- nextTransferDate,
23
- };
24
- };
25
6
  export const getAutoTransferRules = (state) => {
26
- const { autotransferRulesState, autoSweepFlowState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
7
+ const { autotransferRulesState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
27
8
  const { rules, error, historyByRuleId, ruleUpdateLocalData, ruleUpdateStatusById, ruleDeleteStatusById, createRuleFetchState, autoTransferReviewDetail, } = autotransferRulesState;
28
9
  const depositAccountsView = getAllDepositAccounts(depositAccountState, depositAccountListState);
29
10
  const paymentAccountsView = getAllPaymentAccounts(paymentAccountState, paymentAccountListState);
@@ -58,7 +39,6 @@ export const getAutoTransferRules = (state) => {
58
39
  transferMoneyParties,
59
40
  transferMoneyPartiesFetchState,
60
41
  createRuleFetchState,
61
- cashManagementRule: buildCashManagementRule(autoSweepFlowState, depositAccountState, treasuryDetailState),
62
42
  fetchState,
63
43
  error,
64
44
  version: 0,
@@ -0,0 +1,52 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ export const initialState = {
3
+ detailTemplateId: undefined,
4
+ detailFetchState: { fetchState: 'Not-Started', error: undefined },
5
+ updateFetchState: { fetchState: 'Not-Started', error: undefined },
6
+ formDraft: undefined,
7
+ };
8
+ const cardPolicyDetail = createSlice({
9
+ name: 'cardPolicyDetail',
10
+ initialState,
11
+ reducers: {
12
+ fetchCardPolicyDetail: {
13
+ reducer(draft, action) {
14
+ draft.detailTemplateId = action.payload;
15
+ draft.detailFetchState.fetchState = 'In-Progress';
16
+ draft.detailFetchState.error = undefined;
17
+ // Prevent a stale draft from a previous template leaking into the new edit session.
18
+ draft.formDraft = undefined;
19
+ },
20
+ prepare(templateId) {
21
+ return { payload: templateId };
22
+ },
23
+ },
24
+ updateCardPolicyDetailFetchStatus(draft, action) {
25
+ draft.detailFetchState.fetchState = action.payload.fetchState;
26
+ draft.detailFetchState.error = action.payload.error;
27
+ },
28
+ updateCardPolicyFormDraft(draft, action) {
29
+ draft.formDraft = action.payload;
30
+ },
31
+ updateCardPolicy: {
32
+ reducer(draft,
33
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
34
+ _action) {
35
+ draft.updateFetchState.fetchState = 'In-Progress';
36
+ draft.updateFetchState.error = undefined;
37
+ },
38
+ prepare(templateId) {
39
+ return { payload: templateId };
40
+ },
41
+ },
42
+ updateCardPolicyFetchStatus(draft, action) {
43
+ draft.updateFetchState.fetchState = action.payload.fetchState;
44
+ draft.updateFetchState.error = action.payload.error;
45
+ },
46
+ clearCardPolicyDetail(draft) {
47
+ Object.assign(draft, initialState);
48
+ },
49
+ },
50
+ });
51
+ export const { fetchCardPolicyDetail, updateCardPolicyDetailFetchStatus, updateCardPolicyFormDraft, updateCardPolicy, updateCardPolicyFetchStatus, clearCardPolicyDetail, } = cardPolicyDetail.actions;
52
+ export default cardPolicyDetail.reducer;
@@ -0,0 +1,22 @@
1
+ import { getCardPolicyTemplateById } from '../../../../../entity/cardPolicy/cardPolicySelector';
2
+ export function getCardPolicyDetailView(state) {
3
+ const { cardPolicyDetailState, cardPolicyState } = state;
4
+ return {
5
+ templateId: cardPolicyDetailState.detailTemplateId,
6
+ template: cardPolicyDetailState.detailTemplateId != null
7
+ ? getCardPolicyTemplateById(cardPolicyState, cardPolicyDetailState.detailTemplateId)
8
+ : undefined,
9
+ formDraft: cardPolicyDetailState.formDraft,
10
+ detailFetchState: cardPolicyDetailState.detailFetchState,
11
+ updateFetchState: cardPolicyDetailState.updateFetchState,
12
+ };
13
+ }
14
+ export function getCardPolicyFormDraft(state) {
15
+ return state.cardPolicyDetailState.formDraft;
16
+ }
17
+ export function getCardPolicyDetailFetchState(state) {
18
+ return state.cardPolicyDetailState.detailFetchState;
19
+ }
20
+ export function getUpdateCardPolicyFetchState(state) {
21
+ return state.cardPolicyDetailState.updateFetchState;
22
+ }
@@ -0,0 +1,36 @@
1
+ import { from, of } from 'rxjs';
2
+ import { catchError, exhaustMap, filter, mergeMap } from 'rxjs/operators';
3
+ import { toCardPolicyEditFormDraft, toCardPolicyTemplate, } from '../../../../../entity/cardPolicy/cardPolicyPayload';
4
+ import { updateCreatedCardPolicyTemplate } from '../../../../../entity/cardPolicy/cardPolicyReducer';
5
+ import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
6
+ import { fetchCardPolicyDetail, updateCardPolicyDetailFetchStatus, updateCardPolicyFormDraft, } from './cardPolicyDetailReducer';
7
+ export const fetchCardPolicyDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCardPolicyDetail.match),
8
+ // `exhaustMap` drops React 18 StrictMode's duplicate mount dispatch instead of
9
+ // emitting a second `/policy-templates/{id}` call.
10
+ exhaustMap((action) => {
11
+ const templateId = action.payload;
12
+ return zeniAPI
13
+ .getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates/${templateId}`)
14
+ .pipe(mergeMap((response) => {
15
+ if (isSuccessStatus(response) && response.data != null) {
16
+ const { template } = response.data;
17
+ const formDraft = toCardPolicyEditFormDraft(toCardPolicyTemplate(template));
18
+ const actions = [
19
+ updateCreatedCardPolicyTemplate(template),
20
+ updateCardPolicyFormDraft(formDraft),
21
+ updateCardPolicyDetailFetchStatus({ fetchState: 'Completed' }),
22
+ ];
23
+ return from(actions);
24
+ }
25
+ else {
26
+ return of(updateCardPolicyDetailFetchStatus({
27
+ fetchState: 'Error',
28
+ error: response.status,
29
+ }));
30
+ }
31
+ }), catchError((error) => of(updateCardPolicyDetailFetchStatus({
32
+ fetchState: 'Error',
33
+ error: createZeniAPIStatus('Unexpected Error', 'Fetch card-policy detail REST API call errored out' +
34
+ JSON.stringify(error)),
35
+ }))));
36
+ }));
@@ -0,0 +1,39 @@
1
+ import { from, of } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { toUpdateCardPolicyTemplateRequestBody, } from '../../../../../entity/cardPolicy/cardPolicyPayload';
4
+ import { updateCreatedCardPolicyTemplate } from '../../../../../entity/cardPolicy/cardPolicyReducer';
5
+ import { createZeniAPIStatus, isSuccessStatus } from '../../../../../responsePayload';
6
+ import { updateCardPolicy, updateCardPolicyFetchStatus, } from './cardPolicyDetailReducer';
7
+ export const updateCardPolicyEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(updateCardPolicy.match), mergeMap((action) => {
8
+ const templateId = action.payload;
9
+ const formDraft = state$.value.cardPolicyDetailState.formDraft;
10
+ if (formDraft == null) {
11
+ return of(updateCardPolicyFetchStatus({
12
+ fetchState: 'Error',
13
+ error: createZeniAPIStatus('Missing form draft', `Cannot update card-policy ${templateId} — no formDraft is loaded.`),
14
+ }));
15
+ }
16
+ const body = toUpdateCardPolicyTemplateRequestBody(formDraft);
17
+ return zeniAPI
18
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates/${templateId}`, body)
19
+ .pipe(mergeMap((response) => {
20
+ if (isSuccessStatus(response) && response.data != null) {
21
+ const { template } = response.data;
22
+ const actions = [
23
+ updateCreatedCardPolicyTemplate(template),
24
+ updateCardPolicyFetchStatus({ fetchState: 'Completed' }),
25
+ ];
26
+ return from(actions);
27
+ }
28
+ else {
29
+ return of(updateCardPolicyFetchStatus({
30
+ fetchState: 'Error',
31
+ error: response.status,
32
+ }));
33
+ }
34
+ }), catchError((error) => of(updateCardPolicyFetchStatus({
35
+ fetchState: 'Error',
36
+ error: createZeniAPIStatus('Unexpected Error', 'Update card-policy REST API call errored out' +
37
+ JSON.stringify(error)),
38
+ }))));
39
+ }));
@@ -0,0 +1,34 @@
1
+ import { from, of } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { removeCardPolicyTemplate } from '../../../../../entity/cardPolicy/cardPolicyReducer';
4
+ import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
5
+ import { archiveCardPolicy, updateArchiveCardPolicyFetchStatus, } from './cardPolicyListReducer';
6
+ export const archiveCardPolicyEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(archiveCardPolicy.match), mergeMap((action) => {
7
+ const templateId = action.payload;
8
+ return zeniAPI
9
+ .deleteAndGetJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates/${templateId}`)
10
+ .pipe(mergeMap((response) => {
11
+ if (isSuccessStatus(response)) {
12
+ const actions = [
13
+ removeCardPolicyTemplate(templateId),
14
+ updateArchiveCardPolicyFetchStatus({
15
+ fetchState: 'Completed',
16
+ templateId,
17
+ }),
18
+ ];
19
+ return from(actions);
20
+ }
21
+ else {
22
+ return of(updateArchiveCardPolicyFetchStatus({
23
+ fetchState: 'Error',
24
+ error: response.status,
25
+ templateId,
26
+ }));
27
+ }
28
+ }), catchError((error) => of(updateArchiveCardPolicyFetchStatus({
29
+ fetchState: 'Error',
30
+ error: createZeniAPIStatus('Unexpected Error', 'Archive card-policy REST API call errored out' +
31
+ JSON.stringify(error)),
32
+ templateId,
33
+ }))));
34
+ }));
@@ -0,0 +1,58 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ export const initialState = {
3
+ templateIds: [],
4
+ fetchState: {
5
+ fetchState: 'Not-Started',
6
+ error: undefined,
7
+ },
8
+ archiveFetchState: {
9
+ fetchState: 'Not-Started',
10
+ error: undefined,
11
+ },
12
+ archiveTargetTemplateId: undefined,
13
+ };
14
+ const cardPolicyList = createSlice({
15
+ name: 'cardPolicyList',
16
+ initialState,
17
+ reducers: {
18
+ fetchCardPolicyList(draft) {
19
+ draft.fetchState.fetchState = 'In-Progress';
20
+ draft.fetchState.error = undefined;
21
+ },
22
+ updateCardPolicyListFetchStatus(draft, action) {
23
+ draft.fetchState.fetchState = action.payload.fetchState;
24
+ draft.fetchState.error = action.payload.error;
25
+ if (action.payload.templateIds != null) {
26
+ draft.templateIds = action.payload.templateIds;
27
+ }
28
+ },
29
+ archiveCardPolicy: {
30
+ reducer(draft, action) {
31
+ draft.archiveFetchState.fetchState = 'In-Progress';
32
+ draft.archiveFetchState.error = undefined;
33
+ draft.archiveTargetTemplateId = action.payload;
34
+ },
35
+ prepare(templateId) {
36
+ return { payload: templateId };
37
+ },
38
+ },
39
+ updateArchiveCardPolicyFetchStatus(draft, action) {
40
+ draft.archiveFetchState.fetchState = action.payload.fetchState;
41
+ draft.archiveFetchState.error = action.payload.error;
42
+ if (action.payload.fetchState === 'Completed') {
43
+ if (action.payload.templateId != null) {
44
+ draft.templateIds = draft.templateIds.filter((id) => id !== action.payload.templateId);
45
+ }
46
+ draft.archiveTargetTemplateId = undefined;
47
+ }
48
+ else if (action.payload.fetchState === 'Error') {
49
+ draft.archiveTargetTemplateId = undefined;
50
+ }
51
+ },
52
+ clearCardPolicyList(draft) {
53
+ Object.assign(draft, initialState);
54
+ },
55
+ },
56
+ });
57
+ export const { fetchCardPolicyList, updateCardPolicyListFetchStatus, archiveCardPolicy, updateArchiveCardPolicyFetchStatus, clearCardPolicyList, } = cardPolicyList.actions;
58
+ export default cardPolicyList.reducer;