@zeniai/client-epic-state 4.20.9-betaRR12 → 4.20.9

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/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/animations.js +0 -3
  3. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  4. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
  5. package/lib/entity/account/accountPayload.d.ts +0 -2
  6. package/lib/entity/account/accountReducer.d.ts +2 -5
  7. package/lib/entity/account/accountReducer.js +2 -7
  8. package/lib/entity/account/accountState.d.ts +1 -1
  9. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  10. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
  11. package/lib/entity/accountRecon/accountReconPayload.js +2 -4
  12. package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
  13. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  14. package/lib/entity/class/classReducer.d.ts +4 -4
  15. package/lib/entity/class/classState.d.ts +1 -1
  16. package/lib/entity/forecast/forecastState.d.ts +1 -1
  17. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
  18. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  19. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
  20. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  21. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
  22. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  23. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  24. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  25. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  26. package/lib/entity/snackbar/snackbarTypes.js +0 -6
  27. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  28. package/lib/entity/tenant/tenantReducer.d.ts +2 -5
  29. package/lib/entity/tenant/tenantReducer.js +2 -9
  30. package/lib/entity/tenant/tenantSelector.d.ts +0 -1
  31. package/lib/entity/tenant/tenantSelector.js +1 -9
  32. package/lib/entity/tenant/tenantState.d.ts +0 -1
  33. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
  34. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  35. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -9
  36. package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -79
  37. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
  38. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -11
  39. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  40. package/lib/epic.d.ts +1 -12
  41. package/lib/epic.js +1 -12
  42. package/lib/esm/commonStateTypes/animations.js +0 -3
  43. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
  44. package/lib/esm/entity/account/accountReducer.js +1 -6
  45. package/lib/esm/entity/accountRecon/accountReconPayload.js +2 -4
  46. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
  47. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
  48. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -6
  49. package/lib/esm/entity/tenant/tenantReducer.js +1 -8
  50. package/lib/esm/entity/tenant/tenantSelector.js +0 -7
  51. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
  52. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -79
  53. package/lib/esm/epic.js +1 -12
  54. package/lib/esm/index.js +13 -16
  55. package/lib/esm/reducer.js +0 -3
  56. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
  57. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
  58. package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
  59. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  60. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  61. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +1 -19
  62. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -3
  63. package/lib/esm/view/companyView/companyViewReducer.js +1 -26
  64. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
  65. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
  66. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  67. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  68. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +1 -2
  69. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  70. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  71. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  72. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -21
  73. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +3 -167
  74. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -1
  75. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  76. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  77. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
  78. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -136
  79. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -15
  80. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -24
  81. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
  82. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  83. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  84. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  85. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  86. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  87. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  88. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  89. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  90. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
  91. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  92. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  93. package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  94. package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +1 -2
  95. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  96. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  97. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  98. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -9
  99. package/lib/index.d.ts +19 -26
  100. package/lib/index.js +32 -62
  101. package/lib/reducer.d.ts +0 -3
  102. package/lib/reducer.js +0 -3
  103. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  104. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
  105. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
  106. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
  107. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
  108. package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
  109. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -15
  110. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  111. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  112. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  113. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  114. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  115. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  116. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  117. package/lib/view/classList/fetchClassListEpic.js +1 -8
  118. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
  119. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
  120. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
  121. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
  122. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  123. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +2 -20
  124. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -4
  125. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -3
  126. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +1 -9
  127. package/lib/view/companyView/companyViewReducer.d.ts +1 -6
  128. package/lib/view/companyView/companyViewReducer.js +2 -28
  129. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +0 -1
  130. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
  131. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  132. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
  133. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  134. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
  135. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +1 -2
  136. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
  137. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  138. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  139. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  140. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  141. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -45
  142. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  143. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -22
  144. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +4 -18
  145. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -168
  146. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  147. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +2 -7
  148. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  149. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
  150. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
  151. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
  152. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -136
  153. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +3 -13
  154. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -8
  155. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -27
  156. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -14
  157. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  158. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  159. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  160. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
  161. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  162. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  163. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  164. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  165. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  166. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  167. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
  168. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  169. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
  170. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
  171. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  172. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  173. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  174. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  175. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
  176. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  177. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  178. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  179. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  180. package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  181. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +1 -2
  182. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +1 -2
  183. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  184. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  185. package/lib/view/topEx/topExSelector.d.ts +1 -1
  186. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  187. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
  188. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -1
  189. package/lib/view/transactionDetail/transactionDetailSelector.js +2 -9
  190. package/package.json +1 -1
  191. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +0 -19
  192. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -2
  193. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -1
  194. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
  195. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +0 -17
  196. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -61
  197. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
  198. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
  199. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +0 -26
  200. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +0 -199
  201. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +0 -52
  202. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +0 -1
  203. package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +0 -100
  204. package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +0 -48
  205. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +0 -36
  206. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +0 -45
  207. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +0 -50
  208. package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +0 -69
  209. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
  210. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
  211. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +0 -7
  212. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +0 -21
  213. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +0 -10
  214. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -65
  215. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +0 -8
  216. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -48
  217. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +0 -9
  218. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -48
  219. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +0 -75
  220. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +0 -30
  221. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +0 -50
  222. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +0 -206
  223. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +0 -24
  224. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +0 -61
  225. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +0 -38
  226. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +0 -2
  227. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +0 -12
  228. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +0 -106
  229. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +0 -8
  230. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +0 -52
  231. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +0 -7
  232. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +0 -40
  233. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +0 -7
  234. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +0 -52
  235. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +0 -10
  236. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +0 -54
  237. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +0 -8
  238. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +0 -73
@@ -1,69 +0,0 @@
1
- import { from, of } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
- import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
4
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
- import { mapPayloadToAutoTransferRule, } from '../autoTransferRulesPayload';
6
- import { updateAutoTransferRule, updateAutoTransferRuleFailure, updateAutoTransferRuleSuccess, } from '../autoTransferRulesReducer';
7
- import { mapAutoTransferRuleLocalDataToPayload } from './createAutoTransferRuleEpic';
8
- export const updateAutoTransferRuleEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(updateAutoTransferRule.match), switchMap((action) => {
9
- const { ruleId, pauseRule, resumeRule } = action.payload;
10
- const requestBody = mapAutoTransferRuleLocalDataToPayload(state$.value.autotransferRulesState.ruleUpdateLocalData, pauseRule, resumeRule);
11
- return zeniAPI
12
- .putAndGetJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/rules/transfer/auto/${ruleId}`, requestBody)
13
- .pipe(mergeMap((response) => {
14
- if (isSuccessResponse(response) && response.data != null) {
15
- const rule = mapPayloadToAutoTransferRule(response.data.auto_transfer_rule);
16
- const isPauseOrResumeOnly = Object.keys(requestBody).length === 1 &&
17
- 'is_active' in requestBody;
18
- const messageSection = isPauseOrResumeOnly
19
- ? requestBody.is_active === false
20
- ? 'auto_transfer_rule_pause'
21
- : 'auto_transfer_rule_resume'
22
- : 'auto_transfer_rule_update';
23
- const actions = [
24
- updateAutoTransferRuleSuccess({ rule }),
25
- openSnackbar({
26
- messageSection,
27
- messageText: 'success',
28
- type: 'success',
29
- variables: [
30
- {
31
- variableName: '__ruleName__',
32
- variableValue: rule.ruleType === 'minimum_balance'
33
- ? 'Maintain a Minimum Balance'
34
- : rule.ruleType === 'recurring'
35
- ? 'Make a Recurring Transfer'
36
- : 'Distribute Balance by Percentage',
37
- },
38
- ],
39
- }),
40
- ];
41
- return from(actions);
42
- }
43
- else {
44
- return from([
45
- updateAutoTransferRuleFailure({
46
- ruleId,
47
- fetchState: 'Error',
48
- error: response.status,
49
- }),
50
- openSnackbar({
51
- messageSection: 'auto_transfer_rule_update',
52
- messageText: 'failed',
53
- type: 'error',
54
- variables: [
55
- {
56
- variableName: '_api-error_',
57
- variableValue: response.status.message,
58
- },
59
- ],
60
- }),
61
- ]);
62
- }
63
- }), catchError((error) => of(updateAutoTransferRuleFailure({
64
- ruleId,
65
- fetchState: 'Error',
66
- error: createZeniAPIStatus('Unexpected Error', 'Update auto transfer rule REST API call errored out ' +
67
- JSON.stringify(error)),
68
- }))));
69
- }));
@@ -1,8 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../reducer';
4
- import { ZeniAPI } from '../../../zeniAPI';
5
- import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess } from '../aiCfoViewReducer';
6
- export type ActionType = ReturnType<typeof fetchSuggestedQuestions> | ReturnType<typeof fetchSuggestedQuestionsSuccess> | ReturnType<typeof fetchSuggestedQuestionsFailure>;
7
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
8
- export declare const fetchSuggestedQuestionsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchSuggestedQuestionsEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../responsePayload");
7
- const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
8
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
9
- const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.fetchSuggestedQuestions.match),
10
- // mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
11
- // would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
12
- (0, operators_1.mergeMap)((action) => {
13
- const { pageContext } = action.payload;
14
- const query = new URLSearchParams({ page_context: pageContext });
15
- const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
16
- return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
17
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
18
- return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSuggestedQuestionsSuccess)({
19
- pageContext: response.data.page_context,
20
- generatedAt: response.data.generated_at,
21
- suggestedQuestions: response.data.suggested_questions,
22
- }));
23
- }
24
- return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSuggestedQuestionsFailure)({
25
- pageContext,
26
- error: response.status,
27
- }));
28
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSuggestedQuestionsFailure)({
29
- pageContext,
30
- error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch suggested questions REST API call failed', error instanceof Error ? { message: error.message } : undefined),
31
- }))));
32
- }));
33
- exports.fetchSuggestedQuestionsEpic = fetchSuggestedQuestionsEpic;
@@ -1,7 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../reducer';
4
- import { ZeniAPI } from '../../../zeniAPI';
5
- import { fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure } from '../companyTaskManagerViewReducer';
6
- export type ActionType = ReturnType<typeof fetchTaskManagerMetrics> | ReturnType<typeof updateTaskManagerMetrics> | ReturnType<typeof updateTaskManagerMetricsOnFailure>;
7
- export declare const fetchTaskManagerMetricsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchTaskManagerMetricsEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../responsePayload");
7
- const companyTaskManagerViewReducer_1 = require("../companyTaskManagerViewReducer");
8
- const fetchTaskManagerMetricsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyTaskManagerViewReducer_1.fetchTaskManagerMetrics.match), (0, operators_1.switchMap)(() => {
9
- const query = JSON.stringify({ is_filter_by_logged_in_user: true });
10
- return zeniAPI
11
- .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks-es-metrics?query=${encodeURIComponent(query)}`)
12
- .pipe((0, operators_1.mergeMap)((response) => {
13
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
14
- return (0, rxjs_1.of)((0, companyTaskManagerViewReducer_1.updateTaskManagerMetrics)(response.data.summary));
15
- }
16
- else {
17
- return (0, rxjs_1.of)((0, companyTaskManagerViewReducer_1.updateTaskManagerMetricsOnFailure)());
18
- }
19
- }), (0, operators_1.catchError)(() => (0, rxjs_1.of)((0, companyTaskManagerViewReducer_1.updateTaskManagerMetricsOnFailure)())));
20
- }));
21
- exports.fetchTaskManagerMetricsEpic = fetchTaskManagerMetricsEpic;
@@ -1,10 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { updateCompanies } from '../../../../entity/company/companyReducer';
4
- import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
5
- import { updateTenantAccountingClassesEnabled } from '../../../../entity/tenant/tenantReducer';
6
- import { RootState } from '../../../../reducer';
7
- import { ZeniAPI } from '../../../../zeniAPI';
8
- import { updateAccountingClassesEnabled, updateAccountingClassesEnabledFailure, updateAccountingClassesEnabledSuccess } from '../../companyViewReducer';
9
- export type ActionType = ReturnType<typeof updateCompanies> | ReturnType<typeof updateTenantAccountingClassesEnabled> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateAccountingClassesEnabled> | ReturnType<typeof updateAccountingClassesEnabledSuccess> | ReturnType<typeof updateAccountingClassesEnabledFailure>;
10
- export declare const updateAccountingClassesEnabledEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateAccountingClassesEnabledEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const companyReducer_1 = require("../../../../entity/company/companyReducer");
7
- const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
8
- const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
9
- const responsePayload_1 = require("../../../../responsePayload");
10
- const companyViewReducer_1 = require("../../companyViewReducer");
11
- const updateAccountingClassesEnabledEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.updateAccountingClassesEnabled.match), (0, operators_1.switchMap)((action) => {
12
- const { companyId, enabled } = action.payload;
13
- const tenantId = Object.values(state$.value.tenantState.tenantsById).find((t) => t.companyId === companyId)?.tenantId;
14
- return zeniAPI
15
- .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, { is_accounting_classes_enabled: enabled })
16
- .pipe((0, operators_1.mergeMap)((response) => {
17
- const companies = response.data?.companies ?? [];
18
- if ((0, responsePayload_1.isSuccessResponse)(response) && companies.length > 0) {
19
- const actions = [
20
- (0, companyReducer_1.updateCompanies)({
21
- payload: companies,
22
- schema: {},
23
- }),
24
- ];
25
- if (tenantId != null) {
26
- actions.push((0, tenantReducer_1.updateTenantAccountingClassesEnabled)({
27
- enabled,
28
- tenantId,
29
- }));
30
- }
31
- actions.push((0, companyViewReducer_1.updateAccountingClassesEnabledSuccess)());
32
- actions.push((0, snackbarReducer_1.openSnackbar)({
33
- messageSection: 'accounting_classes_enabled_update',
34
- messageText: 'success',
35
- type: 'success',
36
- }));
37
- return (0, rxjs_1.from)(actions);
38
- }
39
- else {
40
- return (0, rxjs_1.from)([
41
- (0, companyViewReducer_1.updateAccountingClassesEnabledFailure)({
42
- status: response.status,
43
- }),
44
- (0, snackbarReducer_1.openSnackbar)({
45
- messageSection: 'accounting_classes_enabled_update',
46
- messageText: 'failed',
47
- type: 'error',
48
- }),
49
- ]);
50
- }
51
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
52
- (0, companyViewReducer_1.updateAccountingClassesEnabledFailure)({
53
- status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update Accounting Classes Enabled errored out' +
54
- (error instanceof Error
55
- ? error.message
56
- : JSON.stringify(error))),
57
- }),
58
- (0, snackbarReducer_1.openSnackbar)({
59
- messageSection: 'accounting_classes_enabled_update',
60
- messageText: 'failed',
61
- type: 'error',
62
- }),
63
- ])));
64
- }));
65
- exports.updateAccountingClassesEnabledEpic = updateAccountingClassesEnabledEpic;
@@ -1,8 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { changeAccountKey } from '../../../../entity/account/accountReducer';
4
- import { RootState } from '../../../../reducer';
5
- import { ZeniAPI } from '../../../../zeniAPI';
6
- import { excludeAccountFromReconciliation, excludeAccountFromReconciliationFailure, excludeAccountFromReconciliationSuccess } from '../../reducers/reconciliationViewReducer';
7
- export type ActionType = ReturnType<typeof excludeAccountFromReconciliation> | ReturnType<typeof changeAccountKey> | ReturnType<typeof excludeAccountFromReconciliationSuccess> | ReturnType<typeof excludeAccountFromReconciliationFailure>;
8
- export declare const excludeAccountFromReconciliationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.excludeAccountFromReconciliationEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const accountReducer_1 = require("../../../../entity/account/accountReducer");
7
- const accountState_1 = require("../../../../entity/account/accountState");
8
- const accountReconSelector_1 = require("../../../../entity/accountRecon/accountReconSelector");
9
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
10
- const responsePayload_1 = require("../../../../responsePayload");
11
- const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
12
- const excludeAccountFromReconciliationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.excludeAccountFromReconciliation.match), (0, operators_1.mergeMap)((action) => {
13
- const { accountId } = action.payload;
14
- const state = state$.value;
15
- const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
16
- const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
17
- const reconciliationData = (0, accountReconSelector_1.getAccountReconByAccountIdAndSelectedPeriod)(state, accountId, selectedPeriod);
18
- const payload = {
19
- account_id: accountId,
20
- bank_balance: reconciliationData?.balance?.amount ?? null,
21
- cleared_balance: reconciliationData?.clearedBalance?.amount ?? null,
22
- variance: reconciliationData?.variance?.amount ?? null,
23
- };
24
- const apiUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts`;
25
- return zeniAPI
26
- .postAndGetJSON(apiUrl, payload)
27
- .pipe((0, operators_1.mergeMap)((response) => {
28
- if ((0, responsePayload_1.isSuccessResponse)(response)) {
29
- const newAccountKey = (0, accountState_1.getAccountKey)('excluded_account_reconciliation', accountId);
30
- const oldAccountKey = (0, accountState_1.getAccountKey)('account_reconciliation', accountId);
31
- return (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationSuccess)({
32
- account: response.data?.excluded_account ?? undefined,
33
- selectedPeriod,
34
- }), (0, accountReducer_1.changeAccountKey)({
35
- oldKey: oldAccountKey,
36
- newKey: newAccountKey,
37
- }));
38
- }
39
- else {
40
- return (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationFailure)({
41
- error: response.status,
42
- }));
43
- }
44
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.excludeAccountFromReconciliationFailure)({
45
- error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Exclude account from reconciliation REST API call errored out ${JSON.stringify(error)}`),
46
- }))));
47
- }));
48
- exports.excludeAccountFromReconciliationEpic = excludeAccountFromReconciliationEpic;
@@ -1,9 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { changeAccountKey } from '../../../../entity/account/accountReducer';
4
- import { updateAccountRecon } from '../../../../entity/accountRecon/accountReconReducer';
5
- import { RootState } from '../../../../reducer';
6
- import { ZeniAPI } from '../../../../zeniAPI';
7
- import { includeAccountInReconciliation, includeAccountInReconciliationFailure, includeAccountInReconciliationSuccess } from '../../reducers/reconciliationViewReducer';
8
- export type ActionType = ReturnType<typeof includeAccountInReconciliation> | ReturnType<typeof includeAccountInReconciliationSuccess> | ReturnType<typeof includeAccountInReconciliationFailure> | ReturnType<typeof changeAccountKey> | ReturnType<typeof updateAccountRecon>;
9
- export declare const includeAccountInReconciliationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.includeAccountInReconciliationEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
7
- const accountReducer_1 = require("../../../../entity/account/accountReducer");
8
- const accountState_1 = require("../../../../entity/account/accountState");
9
- const accountReconReducer_1 = require("../../../../entity/accountRecon/accountReconReducer");
10
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
11
- const responsePayload_1 = require("../../../../responsePayload");
12
- const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
13
- const includeAccountInReconciliationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.includeAccountInReconciliation.match), (0, operators_1.mergeMap)((action) => {
14
- const { accountId } = action.payload;
15
- const state = state$.value;
16
- const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
17
- const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
18
- const period = (0, timePeriod_1.convertToPeriod)(selectedPeriod, true);
19
- const query = JSON.stringify({
20
- start_date: period.start,
21
- end_date: period.end,
22
- });
23
- const apiUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts/${accountId}?query=${encodeURIComponent(query)}`;
24
- return zeniAPI
25
- .deleteAndGetJSON(apiUrl)
26
- .pipe((0, operators_1.mergeMap)((response) => {
27
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
28
- const reconciliation = response.data.reconciliation;
29
- const oldAccountKey = (0, accountState_1.getAccountKey)('excluded_account_reconciliation', reconciliation.account_id);
30
- const newAccountKey = (0, accountState_1.getAccountKey)('account_reconciliation', reconciliation.account_id);
31
- return (0, rxjs_1.of)((0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, [reconciliation]), (0, reconciliationViewReducer_1.includeAccountInReconciliationSuccess)({
32
- reconciliation,
33
- selectedPeriod,
34
- }), (0, accountReducer_1.changeAccountKey)({
35
- oldKey: oldAccountKey,
36
- newKey: newAccountKey,
37
- }));
38
- }
39
- else {
40
- return (0, rxjs_1.of)((0, reconciliationViewReducer_1.includeAccountInReconciliationFailure)({
41
- error: response.status,
42
- }));
43
- }
44
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.includeAccountInReconciliationFailure)({
45
- error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Include account in reconciliation REST API call errored out ${JSON.stringify(error)}`),
46
- }))));
47
- }));
48
- exports.includeAccountInReconciliationEpic = includeAccountInReconciliationEpic;
@@ -1,75 +0,0 @@
1
- import { Amount } from '../../../commonStateTypes/amount';
2
- import { ZeniAPIResponse } from '../../../responsePayload';
3
- import { ZeniDate } from '../../../zeniDayJS';
4
- import { FundingAccount } from '../commonSetup/setupViewSelector';
5
- import { TreasuryAccount } from '../treasury/treasuryTransferMoney/treasuryTransferMoneyState';
6
- import { AutoTransferRule } from './autoTransferRulesState';
7
- export type AutoTransferRuleType = 'minimum_balance' | 'recurring' | 'percentage_of_balance';
8
- export type AutoTransferRuleFrequency = 'daily' | 'weekly' | 'monthly';
9
- export interface DestinationBankAccountMetadataPayload {
10
- account_id: string;
11
- account_type: string;
12
- percentage: number;
13
- }
14
- export interface AutoTransferRulePayload {
15
- amount: number;
16
- auto_transfer_rule_id: string;
17
- create_time: string;
18
- created_by_user_id: string;
19
- currency_code: string;
20
- currency_symbol: string;
21
- destination_bank_account_id: string | null;
22
- destination_bank_account_metadata: DestinationBankAccountMetadataPayload[] | null;
23
- destination_bank_account_type: string;
24
- frequency: AutoTransferRuleFrequency;
25
- is_active: boolean;
26
- is_deleted: boolean;
27
- last_run_time: string | null;
28
- last_run_transaction_metadata: unknown | null;
29
- next_transfer_date: string;
30
- rule_type: AutoTransferRuleType;
31
- source_bank_account_id: string;
32
- source_bank_account_type: string;
33
- update_time: string;
34
- }
35
- interface AutoTransferRulesPayload {
36
- auto_transfer_rules: AutoTransferRulePayload[];
37
- }
38
- export type FetchAutoTransferRulesResponse = ZeniAPIResponse<AutoTransferRulesPayload>;
39
- export interface AutoTransferRuleRequestBody {
40
- amount?: number;
41
- currency_code?: string;
42
- currency_symbol?: string;
43
- destination_bank_account_id?: string;
44
- destination_bank_account_metadata?: DestinationBankAccountMetadataPayload[];
45
- destination_bank_account_type?: string;
46
- first_transfer_date?: string;
47
- frequency?: AutoTransferRuleFrequency;
48
- is_active?: boolean;
49
- next_transfer_date?: string;
50
- rule_type?: AutoTransferRuleType;
51
- source_bank_account_id?: string;
52
- source_bank_account_type?: string;
53
- }
54
- export interface AutoTransferRuleLocalData {
55
- amount?: Amount;
56
- destinationAccount?: FundingAccount | TreasuryAccount;
57
- destinationAccountWithPercentAllocation?: {
58
- account: FundingAccount | TreasuryAccount;
59
- percentage: number;
60
- }[];
61
- firstTransferDate?: ZeniDate;
62
- frequency?: AutoTransferRuleFrequency;
63
- ruleType?: AutoTransferRuleType;
64
- sourceAccount?: FundingAccount | TreasuryAccount;
65
- }
66
- interface CreateAutoTransferRulesPayload {
67
- auto_transfer_rule: AutoTransferRulePayload;
68
- }
69
- export type CreateAutoTransferRulesResponse = ZeniAPIResponse<CreateAutoTransferRulesPayload>;
70
- interface DeleteAutoTransferRulePayload {
71
- message: string;
72
- }
73
- export type DeleteAutoTransferRuleResponse = ZeniAPIResponse<DeleteAutoTransferRulePayload>;
74
- export declare const mapPayloadToAutoTransferRule: (payload: AutoTransferRulePayload) => AutoTransferRule;
75
- export {};
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mapPayloadToAutoTransferRule = void 0;
4
- const zeniDayJS_1 = require("../../../zeniDayJS");
5
- const mapPayloadToAutoTransferRule = (payload) => ({
6
- amount: payload.amount,
7
- autoTransferRuleId: payload.auto_transfer_rule_id,
8
- createTime: payload.create_time != null ? (0, zeniDayJS_1.date)(payload.create_time) : undefined,
9
- currencyCode: payload.currency_code,
10
- currencySymbol: payload.currency_symbol ?? '$',
11
- destinationBankAccountId: payload.destination_bank_account_id,
12
- destinationBankAccountMetadata: payload.destination_bank_account_metadata?.map((m) => ({
13
- accountId: m.account_id,
14
- accountType: m.account_type,
15
- percentage: m.percentage,
16
- })) ?? undefined,
17
- destinationBankAccountType: payload.destination_bank_account_type ?? undefined,
18
- frequency: payload.frequency,
19
- isActive: payload.is_active,
20
- isDeleted: payload.is_deleted,
21
- lastRunTime: payload.last_run_time,
22
- nextTransferDate: payload.next_transfer_date != null
23
- ? (0, zeniDayJS_1.date)(payload.next_transfer_date)
24
- : undefined,
25
- ruleType: payload.rule_type,
26
- sourceBankAccountId: payload.source_bank_account_id,
27
- sourceBankAccountType: payload.source_bank_account_type,
28
- updateTime: payload.update_time != null ? (0, zeniDayJS_1.date)(payload.update_time) : undefined,
29
- });
30
- exports.mapPayloadToAutoTransferRule = mapPayloadToAutoTransferRule;
@@ -1,50 +0,0 @@
1
- import { FetchState, ID } from '../../../commonStateTypes/common';
2
- import { ZeniAPIStatus } from '../../../responsePayload';
3
- import { HistoricEventPayload } from '../commonHistoryView/commonHistoryPayload';
4
- import { ReviewTransferMoneyPayload } from '../zeniAccounts/transferDetail/transferDetailPayload';
5
- import { AutoTransferRuleLocalData } from './autoTransferRulesPayload';
6
- import { AutoTransferRule, AutoTransferRulesState } from './autoTransferRulesState';
7
- export declare const initialState: AutoTransferRulesState;
8
- export declare const fetchAutoTransferRules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: any], {
9
- cacheOverride: any;
10
- }, "autotransferRules/fetchAutoTransferRules", never, never>, updateAutoTransferRules: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
11
- rules: AutoTransferRule[];
12
- }, "autotransferRules/updateAutoTransferRules">, updateAutoTransferRulesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
13
- fetchState: FetchState;
14
- error?: ZeniAPIStatus;
15
- }, "autotransferRules/updateAutoTransferRulesFailure">, fetchAutoTransferReviewDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"autotransferRules/fetchAutoTransferReviewDetail">, updateAutoTransferReviewDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<ReviewTransferMoneyPayload, "autotransferRules/updateAutoTransferReviewDetail">, updateAutoTransferReviewDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "autotransferRules/updateAutoTransferReviewDetailFailure">, clearAutoTransferReviewDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"autotransferRules/clearAutoTransferReviewDetail">, createAutoTransferRule: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"autotransferRules/createAutoTransferRule">, createAutoTransferRuleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
16
- rule: AutoTransferRule;
17
- }, "autotransferRules/createAutoTransferRuleSuccess">, createAutoTransferRuleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
18
- fetchState: FetchState;
19
- error?: ZeniAPIStatus;
20
- }, "autotransferRules/createAutoTransferRuleFailure">, updateAutoTransferRule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[ruleId: string, pauseRule?: boolean | undefined, resumeRule?: boolean | undefined], {
21
- ruleId: string;
22
- pauseRule: boolean | undefined;
23
- resumeRule: boolean | undefined;
24
- }, "autotransferRules/updateAutoTransferRule", never, never>, updateAutoTransferRuleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
25
- rule: AutoTransferRule;
26
- }, "autotransferRules/updateAutoTransferRuleSuccess">, updateAutoTransferRuleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
27
- fetchState: FetchState;
28
- ruleId: ID;
29
- error?: ZeniAPIStatus;
30
- }, "autotransferRules/updateAutoTransferRuleFailure">, deleteAutoTransferRule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[ruleId: string], {
31
- ruleId: string;
32
- }, "autotransferRules/deleteAutoTransferRule", never, never>, deleteAutoTransferRuleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
33
- ruleId: ID;
34
- }, "autotransferRules/deleteAutoTransferRuleSuccess">, deleteAutoTransferRuleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
35
- fetchState: FetchState;
36
- ruleId: ID;
37
- error?: ZeniAPIStatus;
38
- }, "autotransferRules/deleteAutoTransferRuleFailure">, fetchAutoTransferRuleHistory: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[ruleId: string, cacheOverride?: any], {
39
- ruleId: string;
40
- cacheOverride: any;
41
- }, "autotransferRules/fetchAutoTransferRuleHistory", never, never>, updateAutoTransferRuleHistory: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
42
- historicEventsPayload: HistoricEventPayload[];
43
- ruleId: ID;
44
- }, "autotransferRules/updateAutoTransferRuleHistory">, updateAutoTransferRuleHistoryFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
45
- fetchState: FetchState;
46
- ruleId: ID;
47
- error?: ZeniAPIStatus;
48
- }, "autotransferRules/updateAutoTransferRuleHistoryFetchStatus">, updateRuleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<AutoTransferRuleLocalData, "autotransferRules/updateRuleLocalData">, clearRuleUpdateLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"autotransferRules/clearRuleUpdateLocalData">, clearAutoTransferRules: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"autotransferRules/clearAutoTransferRules">;
49
- declare const _default: import("redux").Reducer<AutoTransferRulesState>;
50
- export default _default;