@zeniai/client-epic-state 5.0.95-betaML1 → 5.0.96

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 (238) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
  2. package/lib/entity/aiCfo/aiCfoPayload.d.ts +5 -63
  3. package/lib/entity/aiCfo/aiCfoReducer.d.ts +2 -23
  4. package/lib/entity/aiCfo/aiCfoReducer.js +9 -249
  5. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -4
  6. package/lib/entity/aiCfo/aiCfoSelector.js +1 -19
  7. package/lib/entity/aiCfo/aiCfoState.d.ts +4 -97
  8. package/lib/entity/aiCfo/aiCfoState.js +1 -18
  9. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
  10. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -7
  11. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -2
  12. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  13. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  14. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  15. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  16. package/lib/entity/task/taskPayload.d.ts +1 -3
  17. package/lib/entity/task/taskPayload.js +0 -2
  18. package/lib/entity/task/taskState.d.ts +0 -2
  19. package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
  20. package/lib/entity/tenant/clearAllEpic.js +0 -8
  21. package/lib/epic.d.ts +3 -18
  22. package/lib/epic.js +3 -18
  23. package/lib/esm/entity/aiCfo/aiCfoReducer.js +9 -249
  24. package/lib/esm/entity/aiCfo/aiCfoSelector.js +1 -17
  25. package/lib/esm/entity/aiCfo/aiCfoState.js +0 -15
  26. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -7
  27. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
  28. package/lib/esm/entity/task/taskPayload.js +0 -2
  29. package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
  30. package/lib/esm/epic.js +3 -18
  31. package/lib/esm/index.js +12 -42
  32. package/lib/esm/reducer.js +0 -12
  33. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -6
  34. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
  35. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +1 -2
  36. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  37. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +11 -39
  38. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +4 -14
  39. package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +28 -37
  40. package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
  41. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +0 -15
  42. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -63
  43. package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +3 -12
  44. package/lib/esm/view/recommendation/recommendationReducer.js +1 -18
  45. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
  46. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
  47. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +4 -42
  48. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -35
  49. package/lib/esm/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +0 -7
  50. package/lib/esm/view/transactionDetail/transactionDetailReducer.js +3 -44
  51. package/lib/index.d.ts +14 -49
  52. package/lib/index.js +22 -194
  53. package/lib/reducer.d.ts +0 -12
  54. package/lib/reducer.js +0 -12
  55. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -11
  56. package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -6
  57. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
  58. package/lib/view/aiCfoView/epics/createSessionEpic.js +1 -2
  59. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
  60. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  61. package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +11 -19
  62. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +4 -10
  63. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +12 -40
  64. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +0 -2
  65. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -13
  66. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +3 -11
  67. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +3 -1
  68. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +28 -37
  69. package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
  70. package/lib/view/companyView/types/cockpitTypes.d.ts +1 -2
  71. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.d.ts +1 -2
  72. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +0 -15
  73. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  74. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -63
  75. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  76. package/lib/view/people/peopleTypes.d.ts +1 -1
  77. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +2 -2
  78. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +1 -10
  79. package/lib/view/recommendation/recommendationReducer.d.ts +1 -3
  80. package/lib/view/recommendation/recommendationReducer.js +2 -19
  81. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  82. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  83. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
  84. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
  85. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  86. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
  87. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +2 -12
  88. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +5 -43
  89. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -7
  90. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +1 -42
  91. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -5
  92. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  93. package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.d.ts +1 -2
  94. package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +0 -7
  95. package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
  96. package/lib/view/transactionDetail/transactionDetailReducer.js +3 -44
  97. package/package.json +1 -1
  98. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -277
  99. package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -143
  100. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -19
  101. package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -175
  102. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -32
  103. package/lib/entity/cardPolicy/cardPolicySelector.js +0 -99
  104. package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -205
  105. package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
  106. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
  107. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -68
  108. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
  109. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
  110. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +0 -25
  111. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -39
  112. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +0 -24
  113. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -105
  114. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -130
  115. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -171
  116. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -75
  117. package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
  118. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -64
  119. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
  120. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -35
  121. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -101
  122. package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +0 -38
  123. package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +0 -16
  124. package/lib/esm/view/recommendation/recommendationStaleResponseHelper.js +0 -26
  125. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -52
  126. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
  127. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
  128. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -36
  129. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -39
  130. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -34
  131. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -58
  132. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
  133. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
  134. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -38
  135. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -289
  136. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -109
  137. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -44
  138. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -111
  139. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -25
  140. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -363
  141. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -36
  142. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -19
  143. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -6
  144. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -119
  145. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -154
  146. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -22
  147. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
  148. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -39
  149. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -140
  150. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -20
  151. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -100
  152. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -96
  153. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -59
  154. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -24
  155. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -1
  156. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -34
  157. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -57
  158. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -35
  159. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -62
  160. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -44
  161. package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +0 -10
  162. package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +0 -42
  163. package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +0 -6
  164. package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +0 -20
  165. package/lib/view/recommendation/recommendationStaleResponseHelper.d.ts +0 -7
  166. package/lib/view/recommendation/recommendationStaleResponseHelper.js +0 -30
  167. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
  168. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -56
  169. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -15
  170. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
  171. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -8
  172. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
  173. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -8
  174. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -40
  175. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -8
  176. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -43
  177. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -8
  178. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -38
  179. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
  180. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -62
  181. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -15
  182. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
  183. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -7
  184. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
  185. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -8
  186. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -42
  187. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +0 -8
  188. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -294
  189. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +0 -8
  190. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -113
  191. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +0 -9
  192. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -48
  193. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +0 -8
  194. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -115
  195. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +0 -13
  196. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -29
  197. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +0 -14
  198. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -369
  199. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +0 -6
  200. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -40
  201. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +0 -7
  202. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -26
  203. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +0 -116
  204. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -10
  205. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +0 -33
  206. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -126
  207. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -52
  208. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -158
  209. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -11
  210. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -31
  211. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -12
  212. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
  213. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -8
  214. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -43
  215. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +0 -10
  216. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -144
  217. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -7
  218. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -24
  219. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +0 -11
  220. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -104
  221. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +0 -22
  222. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -100
  223. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +0 -8
  224. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -63
  225. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +0 -3
  226. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -28
  227. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +0 -34
  228. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -2
  229. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +0 -7
  230. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -38
  231. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +0 -12
  232. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -61
  233. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +0 -9
  234. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -39
  235. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +0 -11
  236. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -66
  237. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +0 -3
  238. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -48
@@ -1,38 +0,0 @@
1
- import { from, of } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
- import { updateCompanies } from '../../../entity/company/companyReducer';
4
- import { updateAllUsers } from '../../../entity/user/userReducer';
5
- import { updateAllUserGroups } from '../../../entity/userGroups/userGroupsReducer';
6
- import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
7
- import { fetchCockpitContext, updateCockpitContextOnFailure, updateCockpitContextOnSuccess, } from '../companyTaskManagerViewReducer';
8
- export const fetchCockpitContextEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCockpitContext.match), switchMap(() => zeniAPI
9
- .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/cockpit-context`)
10
- .pipe(mergeMap((response) => {
11
- if (isSuccessResponse(response) && response.data != null) {
12
- const companies = response.data?.companies ?? [];
13
- const users = response.data?.users ?? [];
14
- const userGroups = response.data?.user_groups ?? [];
15
- const companyIds = companies.map((company) => company.company_id);
16
- const userIds = users.map((user) => user.user_id);
17
- const userGroupIds = userGroups.map((userGroup) => userGroup.id);
18
- const actions = [
19
- updateCompanies({
20
- payload: response.data.companies,
21
- schema: {},
22
- }),
23
- updateAllUsers({ users: response.data.users }),
24
- updateAllUserGroups({
25
- userGroups: response.data.user_groups,
26
- }),
27
- updateCockpitContextOnSuccess({
28
- companyIds,
29
- userIds,
30
- userGroupIds,
31
- }),
32
- ];
33
- return from(actions);
34
- }
35
- else {
36
- return of(updateCockpitContextOnFailure(response.status));
37
- }
38
- }), catchError((error) => of(updateCockpitContextOnFailure(createZeniAPIStatus('Unexpected error', 'Cockpit context fetch errored out' + JSON.stringify(error))))))));
@@ -1,16 +0,0 @@
1
- import { EMPTY, of } from 'rxjs';
2
- import { filter, switchMap } from 'rxjs/operators';
3
- import { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewFilters, } from '../companyTaskManagerViewReducer';
4
- export const updateCompanyTaskManagerViewFiltersEpic = (actions$, state$) => actions$.pipe(filter(updateCompanyTaskManagerViewFilters.match), switchMap((action) => {
5
- const filters = action.payload.filters;
6
- const allCategoriesValid = filters?.categories == null
7
- ? true
8
- : filters?.categories?.every((category) => category.field != null &&
9
- category.values != null &&
10
- category.values.length > 0);
11
- if (!allCategoriesValid) {
12
- return EMPTY;
13
- }
14
- const { uiState } = state$.value.companyTaskManagerViewState;
15
- return of(fetchCompanyTaskManagerView(0, uiState.sortKey, uiState.sortOrder, false, uiState.filterText, filters));
16
- }));
@@ -1,26 +0,0 @@
1
- // Two entities refer to the same real-world thing iff they share both
2
- // type and id. We deliberately compare on these fields only — qboId /
3
- // zeniId can lag during entity-create flows where the persisted id
4
- // hasn't been roundtripped yet, while `id` is the local-source-of-truth
5
- // the line carries.
6
- const entitiesMatch = (a, b) => a != null && b != null && a.type === b.type && a.id === b.id;
7
- // Filters `lineIds` down to those whose currently selected entity (as
8
- // reported by the caller) still matches the payload entity at the
9
- // moment the success reducer fires. Used by the two
10
- // `setEntityRecommendationForLineIds…` reducers as a defensive guard
11
- // against stale responses landing after the user (or a background
12
- // refresh) has changed or wiped their selection.
13
- //
14
- // Each flow decides separately where the "current entity" lives,
15
- // because the rules diverge:
16
- // - Detail flow: vendor + customer transactions read from page-level
17
- // `selectedEntity`; JE / deposit reads per-line `lineEntity`.
18
- // - List flow: ONLY vendor reads from page-level `selectedEntity`;
19
- // customer, JE, deposit all read per-line `selectedEntityLine`.
20
- // Pushing the lookup into the caller keeps this helper a pure
21
- // comparator and avoids the helper having to know which flow / page-
22
- // level rule applies.
23
- export const getLineIdsWhereEntityStillMatches = (args) => {
24
- const { lineIds, payloadEntity, getCurrentEntityForLine } = args;
25
- return lineIds.filter((lineId) => entitiesMatch(payloadEntity, getCurrentEntityForLine(lineId)));
26
- };
@@ -1,52 +0,0 @@
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;
@@ -1,22 +0,0 @@
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
- }
@@ -1,36 +0,0 @@
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
- }));
@@ -1,39 +0,0 @@
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
- }));
@@ -1,34 +0,0 @@
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
- }));
@@ -1,58 +0,0 @@
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;
@@ -1,21 +0,0 @@
1
- import { getCardPolicyStats, getCardPolicyTemplatesByIds, } from '../../../../../entity/cardPolicy/cardPolicySelector';
2
- export function getCardPolicyListView(state) {
3
- const { cardPolicyListState, cardPolicyState } = state;
4
- return {
5
- templates: getCardPolicyTemplatesByIds(cardPolicyState, cardPolicyListState.templateIds),
6
- templateIds: cardPolicyListState.templateIds,
7
- fetchState: cardPolicyListState.fetchState,
8
- archiveFetchState: cardPolicyListState.archiveFetchState,
9
- archiveTargetTemplateId: cardPolicyListState.archiveTargetTemplateId,
10
- stats: getCardPolicyStats(cardPolicyState),
11
- };
12
- }
13
- export function getCardPolicyListFetchState(state) {
14
- return state.cardPolicyListState.fetchState;
15
- }
16
- export function getArchiveCardPolicyFetchState(state) {
17
- return state.cardPolicyListState.archiveFetchState;
18
- }
19
- export function getCardPolicyTemplateIds(state) {
20
- return state.cardPolicyListState.templateIds;
21
- }
@@ -1,38 +0,0 @@
1
- import { from, of } from 'rxjs';
2
- import { catchError, exhaustMap, filter, mergeMap } from 'rxjs/operators';
3
- import { toCardPolicyStats, toCardPolicyTemplateList, } from '../../../../../entity/cardPolicy/cardPolicyPayload';
4
- import { updateCardPolicyStats, updateCardPolicyTemplates, } from '../../../../../entity/cardPolicy/cardPolicyReducer';
5
- import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
6
- import { fetchCardPolicyList, updateCardPolicyListFetchStatus, } from './cardPolicyListReducer';
7
- export const fetchCardPolicyListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCardPolicyList.match),
8
- // `exhaustMap` drops React 18 StrictMode's duplicate mount dispatch instead of
9
- // emitting a second `/policy-templates` call.
10
- exhaustMap(() => {
11
- return zeniAPI
12
- .getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/policy-templates`)
13
- .pipe(mergeMap((response) => {
14
- if (isSuccessStatus(response) && response.data != null) {
15
- const templates = toCardPolicyTemplateList(response.data);
16
- const stats = toCardPolicyStats(response.data.stats);
17
- const actions = [
18
- updateCardPolicyTemplates(templates),
19
- updateCardPolicyStats(stats),
20
- updateCardPolicyListFetchStatus({
21
- fetchState: 'Completed',
22
- templateIds: templates.map((t) => t.templateId),
23
- }),
24
- ];
25
- return from(actions);
26
- }
27
- else {
28
- return of(updateCardPolicyListFetchStatus({
29
- fetchState: 'Error',
30
- error: response.status,
31
- }));
32
- }
33
- }), catchError((error) => of(updateCardPolicyListFetchStatus({
34
- fetchState: 'Error',
35
- error: createZeniAPIStatus('Unexpected Error', 'Fetch card-policy list REST API call errored out' +
36
- JSON.stringify(error)),
37
- }))));
38
- }));