@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/reducer.js CHANGED
@@ -50,6 +50,7 @@ const billTransactionReducer_1 = __importStar(require("./entity/billPay/billTran
50
50
  const contactReducer_1 = __importStar(require("./entity/billPay/contact/contactReducer"));
51
51
  const recurringBillsReducer_1 = __importStar(require("./entity/billPay/recurringBills/recurringBillsReducer"));
52
52
  const cardPaymentReducer_1 = __importStar(require("./entity/cardPayment/cardPaymentReducer"));
53
+ const cardPolicyReducer_1 = __importStar(require("./entity/cardPolicy/cardPolicyReducer"));
53
54
  const chargeCardReducer_1 = __importStar(require("./entity/chargeCard/chargeCardReducer"));
54
55
  const chargeCardRepaymentReducer_1 = __importStar(require("./entity/chargeCardRepayment/chargeCardRepaymentReducer"));
55
56
  const chargeCardTransactionReducer_1 = __importStar(require("./entity/chargeCardTransaction/chargeCardTransactionReducer"));
@@ -123,6 +124,9 @@ const bankAccountViewReducer_1 = __importStar(require("./view/bankAccountView/ba
123
124
  const billPayCardReducer_1 = __importStar(require("./view/billPayCard/billPayCardReducer"));
124
125
  const cardBalanceReducer_1 = __importStar(require("./view/cardBalance/cardBalanceReducer"));
125
126
  const cardPaymentViewReducer_1 = __importStar(require("./view/cardPayment/cardPaymentViewReducer"));
127
+ const cardPolicyDetailReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer"));
128
+ const cardPolicyListReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer"));
129
+ const createCardPolicyReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer"));
126
130
  const cashBalanceReducer_1 = __importStar(require("./view/cashBalance/cashBalanceReducer"));
127
131
  const cashFlowReducer_1 = __importStar(require("./view/cashFlow/cashFlowReducer"));
128
132
  const cashInCashOutReducer_1 = __importStar(require("./view/cashInCashOut/cashInCashOutReducer"));
@@ -197,8 +201,6 @@ const internationalWireVerificationReducer_1 = __importStar(require("./view/spen
197
201
  const magicLinkViewReducer_1 = __importStar(require("./view/spendManagement/billPay/magicLinkView/magicLinkViewReducer"));
198
202
  const previousBillsReducer_1 = __importStar(require("./view/spendManagement/billPay/previousBills/previousBillsReducer"));
199
203
  const wiseRedirectReducer_1 = __importStar(require("./view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer"));
200
- const autoSweepFlowReducer_1 = __importStar(require("./view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer"));
201
- const cashManagementOverviewReducer_1 = __importStar(require("./view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer"));
202
204
  const cardUserOnboardingReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer"));
203
205
  const cashbackDetailReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer"));
204
206
  const chargeCardConfigReducer_1 = __importStar(require("./view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer"));
@@ -279,6 +281,7 @@ const initialEntitiesState = {
279
281
  bankAccountState: bankAccountReducer_1.initialState,
280
282
  billTransactionState: billTransactionReducer_1.initialState,
281
283
  cardPaymentState: cardPaymentReducer_1.initialState,
284
+ cardPolicyState: cardPolicyReducer_1.initialState,
282
285
  chargeCardState: chargeCardReducer_1.initialState,
283
286
  chargeCardRepaymentState: chargeCardRepaymentReducer_1.initialState,
284
287
  chargeCardTransactionState: chargeCardTransactionReducer_1.initialState,
@@ -350,7 +353,6 @@ const initialViewsState = {
350
353
  arAgingState: arAgingReducer_1.initialState,
351
354
  auditReportViewState: auditReportViewReducer_1.initialState,
352
355
  authenticationViewState: authenticationViewReducer_1.initialState,
353
- autoSweepFlowState: autoSweepFlowReducer_1.initialState,
354
356
  autotransferRulesState: autoTransferRulesReducer_1.initialState,
355
357
  balanceSheetState: balanceSheetReducer_1.initialState,
356
358
  bankAccountViewState: bankAccountViewReducer_1.initialState,
@@ -364,12 +366,13 @@ const initialViewsState = {
364
366
  billsBulkActionViewState: billsBulkActionViewReducer_1.initialState,
365
367
  cardBalanceState: cardBalanceReducer_1.initialState,
366
368
  cardPaymentViewState: cardPaymentViewReducer_1.initialState,
369
+ cardPolicyDetailState: cardPolicyDetailReducer_1.initialState,
370
+ cardPolicyListState: cardPolicyListReducer_1.initialState,
367
371
  cardUserOnboardingState: cardUserOnboardingReducer_1.initialState,
368
372
  cashbackDetailState: cashbackDetailReducer_1.initialState,
369
373
  cashBalanceState: cashBalanceReducer_1.initialState,
370
374
  cashFlowState: cashFlowReducer_1.initialState,
371
375
  cashInCashOutState: cashInCashOutReducer_1.initialState,
372
- cashManagementOverviewState: cashManagementOverviewReducer_1.initialState,
373
376
  cashPositionState: cashPositionReducer_1.initialState,
374
377
  chargeCardConfigState: chargeCardConfigReducer_1.initialState,
375
378
  chargeCardDetailState: chargeCardDetailReducer_1.initialState,
@@ -388,6 +391,7 @@ const initialViewsState = {
388
391
  companyTaskManagerViewState: companyTaskManagerViewReducer_1.initialState,
389
392
  companyViewState: companyViewReducer_1.initialState,
390
393
  countryListState: countryListReducer_1.initialState,
394
+ createCardPolicyState: createCardPolicyReducer_1.initialState,
391
395
  creditAgentEntityState: creditAgentReducer_1.initialCreditAgentEntityState,
392
396
  creditAgentViewState: creditAgentViewReducer_1.initialState,
393
397
  dashboardLayoutState: dashboardLayoutReducer_1.initialState,
@@ -518,6 +522,7 @@ const entityReducers = {
518
522
  billPayConfigState: billPayConfigReducer_1.default,
519
523
  billTransactionState: billTransactionReducer_1.default,
520
524
  cardPaymentState: cardPaymentReducer_1.default,
525
+ cardPolicyState: cardPolicyReducer_1.default,
521
526
  chargeCardState: chargeCardReducer_1.default,
522
527
  chargeCardRepaymentState: chargeCardRepaymentReducer_1.default,
523
528
  chargeCardTransactionState: chargeCardTransactionReducer_1.default,
@@ -589,7 +594,6 @@ const viewReducers = {
589
594
  arAgingState: arAgingReducer_1.default,
590
595
  auditReportViewState: auditReportViewReducer_1.default,
591
596
  authenticationViewState: authenticationViewReducer_1.default,
592
- autoSweepFlowState: autoSweepFlowReducer_1.default,
593
597
  autotransferRulesState: autoTransferRulesReducer_1.default,
594
598
  balanceSheetState: balanceSheetReducer_1.default,
595
599
  bankAccountViewState: bankAccountViewReducer_1.default,
@@ -602,12 +606,13 @@ const viewReducers = {
602
606
  billsBulkActionViewState: billsBulkActionViewReducer_1.default,
603
607
  cardBalanceState: cardBalanceReducer_1.default,
604
608
  cardPaymentViewState: cardPaymentViewReducer_1.default,
609
+ cardPolicyDetailState: cardPolicyDetailReducer_1.default,
610
+ cardPolicyListState: cardPolicyListReducer_1.default,
605
611
  cardUserOnboardingState: cardUserOnboardingReducer_1.default,
606
612
  cashbackDetailState: cashbackDetailReducer_1.default,
607
613
  cashBalanceState: cashBalanceReducer_1.default,
608
614
  cashFlowState: cashFlowReducer_1.default,
609
615
  cashInCashOutState: cashInCashOutReducer_1.default,
610
- cashManagementOverviewState: cashManagementOverviewReducer_1.default,
611
616
  cashPositionState: cashPositionReducer_1.default,
612
617
  chargeCardConfigState: chargeCardConfigReducer_1.default,
613
618
  chargeCardDetailState: chargeCardDetailReducer_1.default,
@@ -626,6 +631,7 @@ const viewReducers = {
626
631
  companyTaskManagerViewState: companyTaskManagerViewReducer_1.default,
627
632
  companyViewState: companyViewReducer_1.default,
628
633
  countryListState: countryListReducer_1.default,
634
+ createCardPolicyState: createCardPolicyReducer_1.default,
629
635
  creditAgentEntityState: creditAgentReducer_1.default,
630
636
  creditAgentViewState: creditAgentViewReducer_1.default,
631
637
  dashboardState: dashboardReducer_1.default,
@@ -25,17 +25,18 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
25
25
  }, "aiCfoView/updateResponseState">, updateAiCfoViewScrollPosition: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "aiCfoView/updateAiCfoViewScrollPosition">, updateCurrentInput: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "aiCfoView/updateCurrentInput">, clearInput: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfoView/clearInput">, setSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
26
26
  agentId: string;
27
27
  sessionId: string;
28
- }, "aiCfoView/setSession">, createSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, contextRefId?: string | undefined, contextType?: string | undefined], {
28
+ }, "aiCfoView/setSession">, createSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, contextRefId?: string | undefined, contextType?: string | undefined, pageContext?: string | undefined], {
29
29
  agentId: string;
30
30
  contextRefId: string | undefined;
31
31
  contextType: string | undefined;
32
+ pageContext: string | undefined;
32
33
  userId: string;
33
34
  }, "aiCfoView/createSession", never, never>, createSessionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
34
35
  agentId: string;
35
36
  sessionId: ID;
36
37
  contextMessage?: string;
37
38
  contextStatus?: ContextStatus;
38
- }, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined], {
39
+ }, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined, pageContext?: string | undefined], {
39
40
  agentId: string;
40
41
  userId: string;
41
42
  questionAnswerId: string;
@@ -43,6 +44,7 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
43
44
  createdAt: import("dayjs").Dayjs;
44
45
  question: string;
45
46
  files: File[] | undefined;
47
+ pageContext: string | undefined;
46
48
  }, "aiCfoView/createSessionAndSubmit", never, never>, initializeNewSessionState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
47
49
  agentId: string;
48
50
  sessionId: ID;
@@ -92,6 +94,13 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
92
94
  questionAnswerId: ID;
93
95
  }, "aiCfoView/updateCotCollapsedState">, fetchSuggestedQuestions: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
94
96
  pageContext: AiCfoSuggestedQuestionsPageContext;
97
+ /**
98
+ * AI Card Creation flow: when true, the epic appends `&no_card_created=true`
99
+ * so the backend tailors prompts for a tenant that has not yet created a
100
+ * card. The bucket key is unchanged (`pageContext`); see
101
+ * `useFetchSuggestedQuestionsWhenReady` for the refetch-on-flag-flip rule.
102
+ */
103
+ noCardCreated?: boolean;
95
104
  }, "aiCfoView/fetchSuggestedQuestions">, fetchSuggestedQuestionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
96
105
  generatedAt: string;
97
106
  pageContext: AiCfoSuggestedQuestionsPageContext;
@@ -192,8 +192,10 @@ const aiCfoView = (0, toolkit_1.createSlice)({
192
192
  draft.createSessionState.fetchState = 'In-Progress';
193
193
  draft.createSessionState.error = undefined;
194
194
  },
195
- prepare(agentId, userId, contextRefId, contextType) {
196
- return { payload: { agentId, contextRefId, contextType, userId } };
195
+ prepare(agentId, userId, contextRefId, contextType, pageContext) {
196
+ return {
197
+ payload: { agentId, contextRefId, contextType, pageContext, userId },
198
+ };
197
199
  },
198
200
  },
199
201
  createSessionSuccess(draft, action) {
@@ -224,7 +226,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
224
226
  draft.createSessionAndSubmitState.fetchState = 'In-Progress';
225
227
  draft.createSessionAndSubmitState.error = undefined;
226
228
  },
227
- prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files) {
229
+ prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext) {
228
230
  return {
229
231
  payload: {
230
232
  agentId,
@@ -234,6 +236,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
234
236
  createdAt,
235
237
  question,
236
238
  files,
239
+ pageContext,
237
240
  },
238
241
  };
239
242
  },
@@ -69,8 +69,11 @@ function waitForChannelSubscription(pusherInstance, channelName, timeoutMs = 500
69
69
  }));
70
70
  }
71
71
  const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSessionAndSubmit.match), (0, operators_1.switchMap)((action) => {
72
- const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, } = action.payload;
73
- const payload = { agent_id: agentId };
72
+ const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, } = action.payload;
73
+ const payload = {
74
+ agent_id: agentId,
75
+ ...(pageContext != null && { page_context: pageContext }),
76
+ };
74
77
  return zeniAPI
75
78
  .postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
76
79
  .pipe((0, operators_1.mergeMap)((response) => {
@@ -8,11 +8,12 @@ const responsePayload_1 = require("../../../responsePayload");
8
8
  const zeniDayJS_1 = require("../../../zeniDayJS");
9
9
  const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
10
10
  const createSessionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSession.match), (0, operators_1.switchMap)((action) => {
11
- const { agentId, contextRefId, contextType, userId } = action.payload;
11
+ const { agentId, contextRefId, contextType, pageContext, userId } = action.payload;
12
12
  const payload = {
13
13
  agent_id: agentId,
14
14
  ...(contextRefId != null && { context_ref_id: contextRefId }),
15
15
  ...(contextType != null && { context_type: contextType }),
16
+ ...(pageContext != null && { page_context: pageContext }),
16
17
  };
17
18
  return zeniAPI
18
19
  .postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
@@ -4,5 +4,12 @@ import { RootState } from '../../../reducer';
4
4
  import { ZeniAPI } from '../../../zeniAPI';
5
5
  import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess } from '../aiCfoViewReducer';
6
6
  export type ActionType = ReturnType<typeof fetchSuggestedQuestions> | ReturnType<typeof fetchSuggestedQuestionsSuccess> | ReturnType<typeof fetchSuggestedQuestionsFailure>;
7
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
7
+ /**
8
+ * GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
9
+ *
10
+ * Appends `&no_card_created=true` when the action payload sets
11
+ * `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
12
+ * has not yet created any card). Any other value omits the flag entirely so
13
+ * the existing call sites continue to issue the unchanged request.
14
+ */
8
15
  export declare const fetchSuggestedQuestionsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -5,13 +5,23 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const responsePayload_1 = require("../../../responsePayload");
7
7
  const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
8
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
8
+ /**
9
+ * GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
10
+ *
11
+ * Appends `&no_card_created=true` when the action payload sets
12
+ * `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
13
+ * has not yet created any card). Any other value omits the flag entirely so
14
+ * the existing call sites continue to issue the unchanged request.
15
+ */
9
16
  const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.fetchSuggestedQuestions.match),
10
17
  // mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
11
18
  // would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
12
19
  (0, operators_1.mergeMap)((action) => {
13
- const { pageContext } = action.payload;
20
+ const { pageContext, noCardCreated } = action.payload;
14
21
  const query = new URLSearchParams({ page_context: pageContext });
22
+ if (noCardCreated === true) {
23
+ query.set('no_card_created', 'true');
24
+ }
15
25
  const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
16
26
  return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
17
27
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
@@ -39,7 +39,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
39
39
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
40
40
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
41
41
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
42
- messageSection: "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";
42
+ messageSection: "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";
43
43
  messageText: "notification" | "failed" | "success";
44
44
  type: "error" | "success" | "info";
45
45
  variables: {
@@ -20,7 +20,7 @@ export interface SaveReconciliationDetailFailurePayload {
20
20
  error: ZeniAPIStatus;
21
21
  fetchStateByAction: SaveReconcileDetailActionPayload;
22
22
  }
23
- export declare const toReconciliationTabsType: (v: string) => "reconcile" | "review";
23
+ export declare const toReconciliationTabsType: (v: string) => "review" | "reconcile";
24
24
  export declare type ReconciliationViewTabType = ReturnType<typeof toReconciliationTabsType>;
25
25
  declare const toReconReconcileSortKeysType: (v: string) => "date" | "amount" | "type" | "account" | "memo" | "clearedDate" | "payee" | "transactionDirection" | "recommended";
26
26
  export declare type ReconReconcileSortKey = ReturnType<typeof toReconReconcileSortKeysType>;
@@ -1,3 +1,3 @@
1
- declare const toPeopleSortKeyType: (v: string) => "role" | "manager" | "name" | "department" | "lastSeen";
1
+ declare const toPeopleSortKeyType: (v: string) => "department" | "name" | "role" | "manager" | "lastSeen";
2
2
  export type PeopleViewSortKey = ReturnType<typeof toPeopleSortKeyType>;
3
3
  export {};
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
7
7
  export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
8
8
  export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
9
9
  export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
10
- declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "scheduleCategory" | "startMonth" | "accruedExpenseCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "endMonth";
10
+ declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "class" | "user" | "createTime" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "scheduleCategory" | "startMonth" | "accruedExpenseCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "endMonth";
11
11
  export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
12
12
  export interface DownloadJEScheduleTabOptions {
13
13
  categoryId: ID;
@@ -6,7 +6,7 @@ import { FundingAccount } from '../commonSetup/setupViewSelector';
6
6
  import { TreasuryAccount } from '../treasury/treasuryTransferMoney/treasuryTransferMoneyState';
7
7
  import { ReviewTransferDetail } from '../zeniAccounts/transferDetail/transferDetailState';
8
8
  import { AutoTransferRuleLocalData } from './autoTransferRulesPayload';
9
- import { AutoTransferRule, CashManagementRule } from './autoTransferRulesState';
9
+ import { AutoTransferRule } from './autoTransferRulesState';
10
10
  export interface AutoTransferRulesSelectorView extends SelectorView {
11
11
  autoTransferReviewDetail: ReviewTransferDetail;
12
12
  createRuleFetchState: FetchStateAndError;
@@ -17,13 +17,6 @@ export interface AutoTransferRulesSelectorView extends SelectorView {
17
17
  transferMoneyParties: FundingAccount[];
18
18
  transferMoneyPartiesFetchState: FetchState;
19
19
  treasuryAccount: TreasuryAccount;
20
- /**
21
- * The user's saved auto-sweep cash-management config, surfaced here so the
22
- * rules list page can render it alongside the auto-transfer rules.
23
- * `undefined` when the user hasn't saved auto-sweep settings yet
24
- * (i.e. `autoSweepFlowState.settingsId == null`).
25
- */
26
- cashManagementRule?: CashManagementRule;
27
20
  ruleHistory?: Record<string, CommonHistoryView>;
28
21
  }
29
22
  export declare const getAutoTransferRules: (state: RootState) => AutoTransferRulesSelectorView;
@@ -6,30 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = void 0;
7
7
  const get_1 = __importDefault(require("lodash/get"));
8
8
  const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
9
- const depositAccountSelector_1 = require("../../../entity/depositAccount/depositAccountSelector");
10
9
  const setupViewSelector_1 = require("../commonSetup/setupViewSelector");
11
10
  const depositAccountListSelector_1 = require("../zeniAccounts/depositAccountList/depositAccountListSelector");
12
11
  const paymentAccountListSelector_1 = require("../zeniAccounts/paymentAccountList/paymentAccountListSelector");
13
- const buildCashManagementRule = (autoSweepFlowState, depositAccountState, treasuryDetailState) => {
14
- const { settingsId, bufferAmount, frequency, memo, primaryFundingAccountId, nextTransferDate } = autoSweepFlowState;
15
- if (settingsId == null || primaryFundingAccountId == null) {
16
- return undefined;
17
- }
18
- const depositAccount = (0, depositAccountSelector_1.getDepositAccountByDepositAccountId)(depositAccountState, primaryFundingAccountId);
19
- return {
20
- bufferAmount,
21
- frequency,
22
- memo,
23
- settingsId,
24
- primaryFundingAccount: depositAccount != null
25
- ? (0, setupViewSelector_1.mapDepositAccToFundingAccount)(depositAccount)
26
- : undefined,
27
- treasurySummary: treasuryDetailState.accountSummary,
28
- nextTransferDate,
29
- };
30
- };
31
12
  const getAutoTransferRules = (state) => {
32
- const { autotransferRulesState, autoSweepFlowState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
13
+ const { autotransferRulesState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, treasuryDetailState, } = state;
33
14
  const { rules, error, historyByRuleId, ruleUpdateLocalData, ruleUpdateStatusById, ruleDeleteStatusById, createRuleFetchState, autoTransferReviewDetail, } = autotransferRulesState;
34
15
  const depositAccountsView = (0, depositAccountListSelector_1.getAllDepositAccounts)(depositAccountState, depositAccountListState);
35
16
  const paymentAccountsView = (0, paymentAccountListSelector_1.getAllPaymentAccounts)(paymentAccountState, paymentAccountListState);
@@ -64,7 +45,6 @@ const getAutoTransferRules = (state) => {
64
45
  transferMoneyParties,
65
46
  transferMoneyPartiesFetchState,
66
47
  createRuleFetchState,
67
- cashManagementRule: buildCashManagementRule(autoSweepFlowState, depositAccountState, treasuryDetailState),
68
48
  fetchState,
69
49
  error,
70
50
  version: 0,
@@ -1,10 +1,6 @@
1
- import { Amount } from '../../../commonStateTypes/amount';
2
1
  import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
3
2
  import { ZeniDate } from '../../../zeniDayJS';
4
- import { AutoSweepFrequency } from '../cashManagement/autoSweepFlow/autoSweepFlowState';
5
- import { FundingAccount } from '../commonSetup/setupViewSelector';
6
3
  import { CommonHistoryView } from '../commonHistoryView/commonHistory';
7
- import { TreasurySummaryWithBalance } from '../treasury/treasuryList/treasuryDetailState';
8
4
  import { ReviewTransferDetail } from '../zeniAccounts/transferDetail/transferDetailState';
9
5
  import { AutoTransferRuleFrequency, AutoTransferRuleLocalData, AutoTransferRuleType } from './autoTransferRulesPayload';
10
6
  export interface AutoTransferRule {
@@ -31,24 +27,6 @@ export interface DestinationBankAccountMetadata {
31
27
  accountType: string;
32
28
  percentage: number;
33
29
  }
34
- /**
35
- * Render-ready view of the user's auto-sweep cash-management config,
36
- * surfaced alongside `AutoTransferRule[]` in `AutoTransferRulesSelectorView`.
37
- * Kept as a distinct shape (not folded into `AutoTransferRule`) so the rules
38
- * list can special-case its rendering without polluting the rule type union.
39
- *
40
- * Present only when `autoSweepFlowState.settingsId` is set — i.e. the user
41
- * has saved their auto-sweep settings at least once.
42
- */
43
- export interface CashManagementRule {
44
- bufferAmount: Amount;
45
- frequency: AutoSweepFrequency;
46
- memo: string;
47
- settingsId: ID;
48
- nextTransferDate?: ZeniDate;
49
- primaryFundingAccount?: FundingAccount;
50
- treasurySummary?: TreasurySummaryWithBalance;
51
- }
52
30
  export interface AutoTransferRulesState extends FetchedState {
53
31
  autoTransferReviewDetail: ReviewTransferDetail;
54
32
  createRuleFetchState: FetchStateAndError;
@@ -0,0 +1,14 @@
1
+ import { FetchState } from '../../../../../commonStateTypes/common';
2
+ import { CreateCardPolicyTemplateRequest } from '../../../../../entity/cardPolicy/cardPolicyPayload';
3
+ import { ZeniAPIStatus } from '../../../../../responsePayload';
4
+ import { CardPolicyDetailState } from './cardPolicyDetailState';
5
+ export declare const initialState: CardPolicyDetailState;
6
+ export declare const fetchCardPolicyDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[templateId: string], string, "cardPolicyDetail/fetchCardPolicyDetail", never, never>, updateCardPolicyDetailFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
7
+ fetchState: FetchState;
8
+ error?: ZeniAPIStatus;
9
+ }, "cardPolicyDetail/updateCardPolicyDetailFetchStatus">, updateCardPolicyFormDraft: import("@reduxjs/toolkit").ActionCreatorWithPayload<CreateCardPolicyTemplateRequest, "cardPolicyDetail/updateCardPolicyFormDraft">, updateCardPolicy: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[templateId: string], string, "cardPolicyDetail/updateCardPolicy", never, never>, updateCardPolicyFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
+ fetchState: FetchState;
11
+ error?: ZeniAPIStatus;
12
+ }, "cardPolicyDetail/updateCardPolicyFetchStatus">, clearCardPolicyDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"cardPolicyDetail/clearCardPolicyDetail">;
13
+ declare const _default: import("redux").Reducer<CardPolicyDetailState>;
14
+ export default _default;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.clearCardPolicyDetail = exports.updateCardPolicyFetchStatus = exports.updateCardPolicy = exports.updateCardPolicyFormDraft = exports.updateCardPolicyDetailFetchStatus = exports.fetchCardPolicyDetail = exports.initialState = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ exports.initialState = {
7
+ detailTemplateId: undefined,
8
+ detailFetchState: { fetchState: 'Not-Started', error: undefined },
9
+ updateFetchState: { fetchState: 'Not-Started', error: undefined },
10
+ formDraft: undefined,
11
+ };
12
+ const cardPolicyDetail = (0, toolkit_1.createSlice)({
13
+ name: 'cardPolicyDetail',
14
+ initialState: exports.initialState,
15
+ reducers: {
16
+ fetchCardPolicyDetail: {
17
+ reducer(draft, action) {
18
+ draft.detailTemplateId = action.payload;
19
+ draft.detailFetchState.fetchState = 'In-Progress';
20
+ draft.detailFetchState.error = undefined;
21
+ // Prevent a stale draft from a previous template leaking into the new edit session.
22
+ draft.formDraft = undefined;
23
+ },
24
+ prepare(templateId) {
25
+ return { payload: templateId };
26
+ },
27
+ },
28
+ updateCardPolicyDetailFetchStatus(draft, action) {
29
+ draft.detailFetchState.fetchState = action.payload.fetchState;
30
+ draft.detailFetchState.error = action.payload.error;
31
+ },
32
+ updateCardPolicyFormDraft(draft, action) {
33
+ draft.formDraft = action.payload;
34
+ },
35
+ updateCardPolicy: {
36
+ reducer(draft,
37
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
38
+ _action) {
39
+ draft.updateFetchState.fetchState = 'In-Progress';
40
+ draft.updateFetchState.error = undefined;
41
+ },
42
+ prepare(templateId) {
43
+ return { payload: templateId };
44
+ },
45
+ },
46
+ updateCardPolicyFetchStatus(draft, action) {
47
+ draft.updateFetchState.fetchState = action.payload.fetchState;
48
+ draft.updateFetchState.error = action.payload.error;
49
+ },
50
+ clearCardPolicyDetail(draft) {
51
+ Object.assign(draft, exports.initialState);
52
+ },
53
+ },
54
+ });
55
+ _a = cardPolicyDetail.actions, exports.fetchCardPolicyDetail = _a.fetchCardPolicyDetail, exports.updateCardPolicyDetailFetchStatus = _a.updateCardPolicyDetailFetchStatus, exports.updateCardPolicyFormDraft = _a.updateCardPolicyFormDraft, exports.updateCardPolicy = _a.updateCardPolicy, exports.updateCardPolicyFetchStatus = _a.updateCardPolicyFetchStatus, exports.clearCardPolicyDetail = _a.clearCardPolicyDetail;
56
+ exports.default = cardPolicyDetail.reducer;
@@ -0,0 +1,15 @@
1
+ import { FetchStateAndError, ID } from '../../../../../commonStateTypes/common';
2
+ import { CreateCardPolicyTemplateRequest } from '../../../../../entity/cardPolicy/cardPolicyPayload';
3
+ import { CardPolicyTemplate } from '../../../../../entity/cardPolicy/cardPolicyState';
4
+ import { RootState } from '../../../../../reducer';
5
+ export interface CardPolicyDetailSelectorView {
6
+ detailFetchState: FetchStateAndError;
7
+ updateFetchState: FetchStateAndError;
8
+ formDraft?: CreateCardPolicyTemplateRequest;
9
+ template?: CardPolicyTemplate;
10
+ templateId?: ID;
11
+ }
12
+ export declare function getCardPolicyDetailView(state: RootState): CardPolicyDetailSelectorView;
13
+ export declare function getCardPolicyFormDraft(state: RootState): CreateCardPolicyTemplateRequest | undefined;
14
+ export declare function getCardPolicyDetailFetchState(state: RootState): FetchStateAndError;
15
+ export declare function getUpdateCardPolicyFetchState(state: RootState): FetchStateAndError;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCardPolicyDetailView = getCardPolicyDetailView;
4
+ exports.getCardPolicyFormDraft = getCardPolicyFormDraft;
5
+ exports.getCardPolicyDetailFetchState = getCardPolicyDetailFetchState;
6
+ exports.getUpdateCardPolicyFetchState = getUpdateCardPolicyFetchState;
7
+ const cardPolicySelector_1 = require("../../../../../entity/cardPolicy/cardPolicySelector");
8
+ function getCardPolicyDetailView(state) {
9
+ const { cardPolicyDetailState, cardPolicyState } = state;
10
+ return {
11
+ templateId: cardPolicyDetailState.detailTemplateId,
12
+ template: cardPolicyDetailState.detailTemplateId != null
13
+ ? (0, cardPolicySelector_1.getCardPolicyTemplateById)(cardPolicyState, cardPolicyDetailState.detailTemplateId)
14
+ : undefined,
15
+ formDraft: cardPolicyDetailState.formDraft,
16
+ detailFetchState: cardPolicyDetailState.detailFetchState,
17
+ updateFetchState: cardPolicyDetailState.updateFetchState,
18
+ };
19
+ }
20
+ function getCardPolicyFormDraft(state) {
21
+ return state.cardPolicyDetailState.formDraft;
22
+ }
23
+ function getCardPolicyDetailFetchState(state) {
24
+ return state.cardPolicyDetailState.detailFetchState;
25
+ }
26
+ function getUpdateCardPolicyFetchState(state) {
27
+ return state.cardPolicyDetailState.updateFetchState;
28
+ }
@@ -0,0 +1,8 @@
1
+ import { FetchStateAndError, ID } from '../../../../../commonStateTypes/common';
2
+ import { CreateCardPolicyTemplateRequest } from '../../../../../entity/cardPolicy/cardPolicyPayload';
3
+ export interface CardPolicyDetailState {
4
+ detailFetchState: FetchStateAndError;
5
+ updateFetchState: FetchStateAndError;
6
+ detailTemplateId?: ID;
7
+ formDraft?: CreateCardPolicyTemplateRequest;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateCreatedCardPolicyTemplate } from '../../../../../entity/cardPolicy/cardPolicyReducer';
4
+ import { RootState } from '../../../../../reducer';
5
+ import { ZeniAPI } from '../../../../../zeniAPI';
6
+ import { fetchCardPolicyDetail, updateCardPolicyDetailFetchStatus, updateCardPolicyFormDraft } from './cardPolicyDetailReducer';
7
+ export type ActionType = ReturnType<typeof fetchCardPolicyDetail> | ReturnType<typeof updateCreatedCardPolicyTemplate> | ReturnType<typeof updateCardPolicyFormDraft> | ReturnType<typeof updateCardPolicyDetailFetchStatus>;
8
+ export declare const fetchCardPolicyDetailEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchCardPolicyDetailEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const cardPolicyPayload_1 = require("../../../../../entity/cardPolicy/cardPolicyPayload");
7
+ const cardPolicyReducer_1 = require("../../../../../entity/cardPolicy/cardPolicyReducer");
8
+ const responsePayload_1 = require("../../../../../responsePayload");
9
+ const cardPolicyDetailReducer_1 = require("./cardPolicyDetailReducer");
10
+ const fetchCardPolicyDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(cardPolicyDetailReducer_1.fetchCardPolicyDetail.match),
11
+ // `exhaustMap` drops React 18 StrictMode's duplicate mount dispatch instead of
12
+ // emitting a second `/policy-templates/{id}` call.
13
+ (0, operators_1.exhaustMap)((action) => {
14
+ const templateId = action.payload;
15
+ return zeniAPI
16
+ .getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates/${templateId}`)
17
+ .pipe((0, operators_1.mergeMap)((response) => {
18
+ if ((0, responsePayload_1.isSuccessStatus)(response) && response.data != null) {
19
+ const { template } = response.data;
20
+ const formDraft = (0, cardPolicyPayload_1.toCardPolicyEditFormDraft)((0, cardPolicyPayload_1.toCardPolicyTemplate)(template));
21
+ const actions = [
22
+ (0, cardPolicyReducer_1.updateCreatedCardPolicyTemplate)(template),
23
+ (0, cardPolicyDetailReducer_1.updateCardPolicyFormDraft)(formDraft),
24
+ (0, cardPolicyDetailReducer_1.updateCardPolicyDetailFetchStatus)({ fetchState: 'Completed' }),
25
+ ];
26
+ return (0, rxjs_1.from)(actions);
27
+ }
28
+ else {
29
+ return (0, rxjs_1.of)((0, cardPolicyDetailReducer_1.updateCardPolicyDetailFetchStatus)({
30
+ fetchState: 'Error',
31
+ error: response.status,
32
+ }));
33
+ }
34
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, cardPolicyDetailReducer_1.updateCardPolicyDetailFetchStatus)({
35
+ fetchState: 'Error',
36
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch card-policy detail REST API call errored out' +
37
+ JSON.stringify(error)),
38
+ }))));
39
+ }));
40
+ exports.fetchCardPolicyDetailEpic = fetchCardPolicyDetailEpic;