@zeniai/client-epic-state 4.13.11 → 4.13.13

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 (318) hide show
  1. package/lib/commonPayloadTypes/commonPayload.d.ts +0 -7
  2. package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
  3. package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +1 -0
  4. package/lib/commonStateTypes/common.d.ts +0 -2
  5. package/lib/commonStateTypes/common.js +1 -5
  6. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +0 -1
  7. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +1 -2
  8. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
  9. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +1 -0
  10. package/lib/commonStateTypes/timePeriod.d.ts +0 -16
  11. package/lib/commonStateTypes/timePeriod.js +1 -31
  12. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +0 -1
  13. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +1 -3
  14. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  15. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
  16. package/lib/entity/account/accountState.d.ts +1 -1
  17. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  18. package/lib/entity/chargeCard/chargeCard.d.ts +2 -16
  19. package/lib/entity/chargeCard/chargeCard.js +1 -18
  20. package/lib/entity/chargeCard/chargeCardPayload.d.ts +5 -14
  21. package/lib/entity/chargeCard/chargeCardPayload.js +7 -24
  22. package/lib/entity/class/classReducer.d.ts +4 -4
  23. package/lib/entity/class/classState.d.ts +1 -1
  24. package/lib/entity/company/companyPayload.d.ts +0 -4
  25. package/lib/entity/company/companyPayload.js +3 -6
  26. package/lib/entity/company/companyReducer.d.ts +1 -4
  27. package/lib/entity/company/companyReducer.js +2 -6
  28. package/lib/entity/company/companyStateTypes.d.ts +1 -5
  29. package/lib/entity/file/fileState.d.ts +3 -3
  30. package/lib/entity/file/fileState.js +0 -2
  31. package/lib/entity/forecast/forecastState.d.ts +1 -1
  32. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
  33. package/lib/entity/jeSchedules/jeSchedulesPayload.js +1 -7
  34. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  35. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -3
  36. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -2
  37. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -3
  38. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +0 -2
  39. package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -12
  40. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  41. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  42. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  43. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  44. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  45. package/lib/entity/tenant/clearAllEpic.d.ts +2 -12
  46. package/lib/entity/tenant/clearAllEpic.js +0 -20
  47. package/lib/entity/tenant/epic/fetchActiveTenantEpic.d.ts +1 -2
  48. package/lib/entity/tenant/epic/fetchActiveTenantEpic.js +1 -9
  49. package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +1 -7
  50. package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +2 -34
  51. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  52. package/lib/entity/tenant/tenantReducer.js +0 -3
  53. package/lib/entity/tenant/tenantState.d.ts +0 -1
  54. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  55. package/lib/entity/transaction/payloadTypes/attachmentPayload.d.ts +1 -1
  56. package/lib/entity/transaction/payloadTypes/attachmentPayload.js +3 -3
  57. package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
  58. package/lib/entity/transaction/transactionSelector.d.ts +0 -1
  59. package/lib/entity/transaction/transactionSelector.js +1 -7
  60. package/lib/entity/user/userPayload.d.ts +0 -1
  61. package/lib/entity/user/userReducer.js +8 -9
  62. package/lib/entity/user/userState.d.ts +0 -1
  63. package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +0 -1
  64. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +1 -35
  65. package/lib/entity/vendor/vendorPayload.js +2 -3
  66. package/lib/entity/vendor/vendorState.d.ts +3 -3
  67. package/lib/entity/vendor/vendorType.d.ts +2 -0
  68. package/lib/entity/vendor/vendorType.js +4 -1
  69. package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
  70. package/lib/entity/vendorExpense/vendorExpenseSelector.js +0 -1
  71. package/lib/epic.d.ts +2 -18
  72. package/lib/epic.js +2 -18
  73. package/lib/index.d.ts +21 -65
  74. package/lib/index.js +28 -102
  75. package/lib/reducer.d.ts +1 -31
  76. package/lib/reducer.js +1 -31
  77. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +1 -7
  78. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +1 -7
  79. package/lib/view/addressView/addressViewState.d.ts +1 -1
  80. package/lib/view/addressView/toAddressViewLocalData.d.ts +0 -2
  81. package/lib/view/addressView/toAddressViewLocalData.js +3 -9
  82. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  83. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  84. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  85. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  86. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  87. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  88. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  89. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  90. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  91. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  92. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
  93. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
  94. package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +5 -10
  95. package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +7 -10
  96. package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportTemplatesEpic.js +4 -4
  97. package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -4
  98. package/lib/view/companyMonthEndReportView/epics/improveUsingZeniGPTEpic.js +3 -5
  99. package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +3 -3
  100. package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +3 -3
  101. package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +6 -1
  102. package/lib/view/companyView/selectorHelpers/getCompanyView.js +0 -4
  103. package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
  104. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +0 -2
  105. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +1 -7
  106. package/lib/view/companyView/types/companyView.d.ts +0 -1
  107. package/lib/view/dashboard/dashboardEpic.d.ts +1 -2
  108. package/lib/view/dashboard/dashboardEpic.js +2 -22
  109. package/lib/view/dashboard/dashboardReducer.d.ts +2 -3
  110. package/lib/view/dashboard/dashboardReducer.js +1 -2
  111. package/lib/view/dashboard/dashboardSelector.d.ts +0 -2
  112. package/lib/view/dashboard/dashboardSelector.js +2 -10
  113. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  114. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  115. package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +1 -8
  116. package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +1 -3
  117. package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +4 -5
  118. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +0 -2
  119. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +3 -6
  120. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  121. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  122. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  123. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  124. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  125. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  126. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  127. package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
  128. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -3
  129. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +1 -1
  130. package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +2 -2
  131. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +5 -19
  132. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +3 -8
  133. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +57 -39
  134. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +8 -13
  135. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +12 -19
  136. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +0 -1
  137. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +3 -4
  138. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +0 -2
  139. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  140. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  141. package/lib/view/settingsView/epic/updateMyProfileEpic.js +4 -6
  142. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +4 -1
  143. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -2
  144. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +0 -3
  145. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
  146. package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +1 -2
  147. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +1 -3
  148. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +2 -6
  149. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +3 -2
  150. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
  151. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +3 -1
  152. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +2 -1
  153. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +21 -1
  154. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +3 -1
  155. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +0 -1
  156. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +0 -4
  157. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +1 -8
  158. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +2 -25
  159. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +0 -1
  160. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +4 -8
  161. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +1 -2
  162. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +14 -1
  163. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +13 -2
  164. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +6 -3
  165. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +17 -2
  166. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +2 -8
  167. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +15 -55
  168. package/lib/view/spendManagement/chargeCards/{issueChargeCard → chargeCardList}/issueChargeCardEpic.d.ts +2 -3
  169. package/lib/view/spendManagement/chargeCards/{issueChargeCard → chargeCardList}/issueChargeCardEpic.js +18 -35
  170. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
  171. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +6 -31
  172. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
  173. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -5
  174. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +1 -4
  175. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -6
  176. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -1
  177. package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +0 -4
  178. package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +2 -2
  179. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  180. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  181. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  182. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  183. package/lib/view/topEx/topExSelector.d.ts +1 -1
  184. package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.js +2 -2
  185. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
  186. package/lib/view/userListView/fetchUserListByTypeEpic.js +1 -4
  187. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +1 -1
  188. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +1 -1
  189. package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
  190. package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +3 -34
  191. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +1 -1
  192. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  193. package/lib/view/zeniAccStatementList/zeniAccStatementList.d.ts +5 -2
  194. package/package.json +1 -1
  195. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +0 -32
  196. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -60
  197. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +0 -12
  198. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +0 -25
  199. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +0 -7
  200. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +0 -36
  201. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +0 -38
  202. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +0 -10
  203. package/lib/view/countryList/countryListReducer.d.ts +0 -17
  204. package/lib/view/countryList/countryListReducer.js +0 -58
  205. package/lib/view/countryList/countryListSelector.d.ts +0 -7
  206. package/lib/view/countryList/countryListSelector.js +0 -13
  207. package/lib/view/countryList/countryListState.d.ts +0 -12
  208. package/lib/view/countryList/countryListState.js +0 -2
  209. package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +0 -6
  210. package/lib/view/countryList/epics/fetchCountryListEpic.js +0 -19
  211. package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +0 -7
  212. package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +0 -38
  213. package/lib/view/countryList/payloads/countryListPayload.d.ts +0 -6
  214. package/lib/view/countryList/payloads/countryListPayload.js +0 -10
  215. package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +0 -11
  216. package/lib/view/countryList/payloads/nationalityCountryListPayload.js +0 -2
  217. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +0 -10
  218. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +0 -72
  219. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +0 -11
  220. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +0 -53
  221. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +0 -11
  222. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +0 -66
  223. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +0 -7
  224. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +0 -39
  225. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +0 -7
  226. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +0 -22
  227. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +0 -8
  228. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +0 -59
  229. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +0 -8
  230. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +0 -78
  231. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +0 -6
  232. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +0 -28
  233. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +0 -9
  234. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +0 -78
  235. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +0 -8
  236. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +0 -58
  237. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +0 -10
  238. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +0 -12
  239. package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +0 -3
  240. package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +0 -2
  241. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +0 -17
  242. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +0 -66
  243. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +0 -3
  244. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -97
  245. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +0 -11
  246. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +0 -14
  247. package/lib/view/expenseAutomationView/helpers/helpers.d.ts +0 -7
  248. package/lib/view/expenseAutomationView/helpers/helpers.js +0 -67
  249. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +0 -76
  250. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +0 -9
  251. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +0 -36
  252. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -58
  253. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -16
  254. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -2
  255. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +0 -34
  256. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +0 -205
  257. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +0 -53
  258. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +0 -245
  259. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +0 -31
  260. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +0 -130
  261. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +0 -5
  262. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +0 -45
  263. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -34
  264. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +0 -44
  265. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +0 -32
  266. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +0 -2
  267. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -28
  268. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +0 -2
  269. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +0 -11
  270. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +0 -2
  271. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +0 -3
  272. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +0 -55
  273. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -7
  274. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +0 -95
  275. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +0 -3
  276. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +0 -61
  277. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +0 -53
  278. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +0 -5
  279. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -31
  280. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -2
  281. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -20
  282. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -13
  283. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +0 -28
  284. package/lib/view/expenseAutomationView/types/transactionsViewState.js +0 -15
  285. package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +0 -8
  286. package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +0 -58
  287. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +0 -3
  288. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +0 -2
  289. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +0 -16
  290. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +0 -36
  291. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +0 -10
  292. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +0 -27
  293. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +0 -5
  294. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +0 -2
  295. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +0 -7
  296. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +0 -36
  297. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +0 -6
  298. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +0 -42
  299. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +0 -9
  300. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +0 -67
  301. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +0 -26
  302. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +0 -22
  303. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +0 -22
  304. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +0 -89
  305. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +0 -15
  306. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +0 -30
  307. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +0 -20
  308. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +0 -2
  309. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +0 -11
  310. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +0 -42
  311. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +0 -9
  312. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +0 -44
  313. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +0 -15
  314. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +0 -65
  315. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -22
  316. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -76
  317. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -28
  318. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +0 -23
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearCountryList = exports.updateCountryListFailure = exports.updateCountryList = exports.fetchNationalityCountryList = exports.fetchCountryList = exports.initialState = exports.initialCountryList = void 0;
5
- const toolkit_1 = require("@reduxjs/toolkit");
6
- const countryListPayload_1 = require("./payloads/countryListPayload");
7
- exports.initialCountryList = {
8
- fetchState: 'Not-Started',
9
- error: undefined,
10
- countries: [],
11
- hasValidState() {
12
- return this.fetchState == 'Completed';
13
- },
14
- };
15
- exports.initialState = {
16
- byCountryListCode: {
17
- nationalityCountryList: exports.initialCountryList,
18
- },
19
- };
20
- const countryList = (0, toolkit_1.createSlice)({
21
- name: 'countryList',
22
- initialState: exports.initialState,
23
- reducers: {
24
- fetchCountryList: {
25
- reducer(draft, action) {
26
- if (action.payload.cacheOverride ||
27
- draft.byCountryListCode[action.payload.countryListKey].fetchState !==
28
- 'Completed') {
29
- draft.byCountryListCode[action.payload.countryListKey] = Object.assign(Object.assign({}, exports.initialCountryList), { fetchState: 'In-Progress', error: undefined });
30
- }
31
- },
32
- prepare(countryListKey, cacheOverride = false) {
33
- return {
34
- payload: {
35
- countryListKey,
36
- cacheOverride,
37
- },
38
- };
39
- },
40
- },
41
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
42
- fetchNationalityCountryList(_draft) {
43
- // do nothing
44
- },
45
- updateCountryList(draft, action) {
46
- const countryList = action.payload.countryListPayload.map((nCountry) => (0, countryListPayload_1.toCountry)(nCountry));
47
- draft.byCountryListCode[action.payload.countryListKey] = Object.assign(Object.assign({}, exports.initialCountryList), { fetchState: 'Completed', error: undefined, countries: countryList });
48
- },
49
- updateCountryListFailure(draft, action) {
50
- draft.byCountryListCode[action.payload.countryListKey] = Object.assign(Object.assign({}, exports.initialCountryList), { fetchState: 'Error', error: action.payload.status });
51
- },
52
- clearCountryList(draft) {
53
- Object.assign(draft, exports.initialState);
54
- },
55
- },
56
- });
57
- _a = countryList.actions, exports.fetchCountryList = _a.fetchCountryList, exports.fetchNationalityCountryList = _a.fetchNationalityCountryList, exports.updateCountryList = _a.updateCountryList, exports.updateCountryListFailure = _a.updateCountryListFailure, exports.clearCountryList = _a.clearCountryList;
58
- exports.default = countryList.reducer;
@@ -1,7 +0,0 @@
1
- import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
2
- import { CountryListKeyType, CountryListState, Country } from './countryListState';
3
- export interface CountryListSelectorView extends SelectorView {
4
- countries: Country[];
5
- countryListKey: CountryListKeyType;
6
- }
7
- export declare const getCountryList: (countryListState: CountryListState, countryListKey: CountryListKeyType) => CountryListSelectorView;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCountryList = void 0;
4
- const getCountryList = (countryListState, countryListKey) => {
5
- return {
6
- countries: countryListState.byCountryListCode[countryListKey].countries,
7
- fetchState: countryListState.byCountryListCode[countryListKey].fetchState,
8
- error: countryListState.byCountryListCode[countryListKey].error,
9
- countryListKey: countryListKey,
10
- version: 1,
11
- };
12
- };
13
- exports.getCountryList = getCountryList;
@@ -1,12 +0,0 @@
1
- import { FetchedState } from '../../commonStateTypes/common';
2
- export declare type CountryListKeyType = 'nationalityCountryList';
3
- export interface Country {
4
- countryCode: string;
5
- countryName: string;
6
- }
7
- export interface CountryList extends FetchedState {
8
- countries: Country[];
9
- }
10
- export interface CountryListState {
11
- byCountryListCode: Record<CountryListKeyType, CountryList>;
12
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../reducer';
4
- import { fetchCountryList, fetchNationalityCountryList } from '../countryListReducer';
5
- export declare type ActionType = ReturnType<typeof fetchCountryList> | ReturnType<typeof fetchNationalityCountryList>;
6
- export declare const fetchCountryListEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchCountryListEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const countryListReducer_1 = require("../countryListReducer");
7
- const fetchCountryListEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(countryListReducer_1.fetchCountryList.match), (0, operators_1.mergeMap)((action) => {
8
- const actions = [];
9
- const draft = state$.value.countryListState;
10
- if (action.payload.cacheOverride === true ||
11
- draft.byCountryListCode[action.payload.countryListKey].fetchState !==
12
- 'Completed') {
13
- if (action.payload.countryListKey === 'nationalityCountryList') {
14
- actions.push((0, countryListReducer_1.fetchNationalityCountryList)());
15
- }
16
- }
17
- return (0, rxjs_1.from)(actions);
18
- }));
19
- exports.fetchCountryListEpic = fetchCountryListEpic;
@@ -1,7 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { ZeniAPI } from '../../../zeniAPI';
4
- import { RootState } from '../../../reducer';
5
- import { fetchNationalityCountryList, updateCountryList, updateCountryListFailure } from '../countryListReducer';
6
- export declare type ActionType = ReturnType<typeof fetchNationalityCountryList> | ReturnType<typeof updateCountryList> | ReturnType<typeof updateCountryListFailure>;
7
- export declare const fetchNationalityCountryListEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchNationalityCountryListEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../responsePayload");
7
- const countryListReducer_1 = require("../countryListReducer");
8
- const fetchNationalityCountryListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(countryListReducer_1.fetchNationalityCountryList.match), (0, operators_1.switchMap)(() => {
9
- const queryValue = {
10
- region: 'US',
11
- legal_type: 'BUSINESS',
12
- onboarding_fields: ['nationality'],
13
- };
14
- return zeniAPI
15
- .getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
16
- .pipe((0, operators_1.mergeMap)((response) => {
17
- var _a, _b;
18
- if ((0, responsePayload_1.isSuccessResponse)(response)) {
19
- return (0, rxjs_1.of)((0, countryListReducer_1.updateCountryList)({
20
- countryListKey: 'nationalityCountryList',
21
- countryListPayload: (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.labels.nationality.field_values) !== null && _b !== void 0 ? _b : [],
22
- }));
23
- }
24
- else {
25
- return (0, rxjs_1.of)((0, countryListReducer_1.updateCountryListFailure)({
26
- countryListKey: 'nationalityCountryList',
27
- status: response.status,
28
- }));
29
- }
30
- }), (0, operators_1.catchError)((error) => {
31
- return (0, rxjs_1.of)((0, countryListReducer_1.updateCountryListFailure)({
32
- countryListKey: 'nationalityCountryList',
33
- status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Nationality Country List REST API call errored out' +
34
- JSON.stringify(error)),
35
- }));
36
- }));
37
- }));
38
- exports.fetchNationalityCountryListEpic = fetchNationalityCountryListEpic;
@@ -1,6 +0,0 @@
1
- import { Country } from '../countryListState';
2
- export interface CountryListPayload {
3
- code: string;
4
- description: string;
5
- }
6
- export declare function toCountry(payload: CountryListPayload): Country;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toCountry = void 0;
4
- function toCountry(payload) {
5
- return {
6
- countryCode: payload.code,
7
- countryName: payload.description,
8
- };
9
- }
10
- exports.toCountry = toCountry;
@@ -1,11 +0,0 @@
1
- import { ZeniAPIResponse } from '../../../responsePayload';
2
- import { CountryListPayload } from './countryListPayload';
3
- export interface NationalityCountryPayload {
4
- labels: {
5
- nationality: {
6
- field_hint_text: string;
7
- field_values: CountryListPayload[];
8
- };
9
- };
10
- }
11
- export declare type NationalityCountryPayloadResponse = ZeniAPIResponse<NationalityCountryPayload>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../../reducer';
4
- import { fetchAllExpenseAutomationTabs } from '../../expenseAutomationViewReducer';
5
- import { fetchMissingReceipts } from '../../reducers/missingReceiptsViewReducer';
6
- import { fetchFluxAnalysisView } from '../../reducers/fluxAnalysisViewReducer';
7
- import { fetchMonthEndCloseChecks } from '../../../monthEndCloseChecksView/monthEndCloseChecksViewReducer';
8
- import { fetchJeSchedulesPage } from '../../reducers/jeSchedulesViewReducer';
9
- export declare type ActionType = ReturnType<typeof fetchAllExpenseAutomationTabs> | ReturnType<typeof fetchMissingReceipts> | ReturnType<typeof fetchMonthEndCloseChecks> | ReturnType<typeof fetchFluxAnalysisView> | ReturnType<typeof fetchJeSchedulesPage>;
10
- export declare const fetchAllExpenseAutomationTabsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -1,72 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchAllExpenseAutomationTabsEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const expenseAutomationViewReducer_1 = require("../../expenseAutomationViewReducer");
7
- const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
8
- const fluxAnalysisViewReducer_1 = require("../../reducers/fluxAnalysisViewReducer");
9
- const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
10
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
11
- const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
12
- const fetchAllExpenseAutomationTabsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(expenseAutomationViewReducer_1.fetchAllExpenseAutomationTabs.match), (0, operators_1.switchMap)((action) => {
13
- const { cacheOverride, refreshViewInBackground } = action.payload;
14
- const state = state$.value;
15
- const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
16
- const companyId = currentTenant.companyId;
17
- const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
18
- const period = (0, timePeriod_1.convertToPeriod)(selectedPeriod);
19
- const timePeriodStart = (0, timePeriod_1.toAbsoluteDay)(period.start);
20
- const timePeriodEnd = (0, timePeriod_1.toAbsoluteDay)(period.end);
21
- const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
22
- if (timePeriodStart == null ||
23
- timePeriodEnd == null ||
24
- companyId == null) {
25
- throw Error(`Invalid start - ${timePeriodStart} and end - ${timePeriodEnd} period from given ${selectedPeriod}`);
26
- }
27
- if (cacheOverride === true) {
28
- return (0, rxjs_1.from)([
29
- (0, missingReceiptsViewReducer_1.fetchMissingReceipts)({ start: timePeriodStart, end: timePeriodEnd }, {
30
- amount: 75.0,
31
- currencyCode: 'USD',
32
- currencySymbol: '$',
33
- }, cacheOverride, refreshViewInBackground),
34
- // TOODO - Vivek - Add fetch state
35
- (0, fluxAnalysisViewReducer_1.fetchFluxAnalysisView)(selectedPeriod, refreshViewInBackground),
36
- (0, jeSchedulesViewReducer_1.fetchJeSchedulesPage)({ start: timePeriodStart, end: timePeriodEnd }, cacheOverride),
37
- ]);
38
- }
39
- else {
40
- const fetchActions = [];
41
- if (state.expenseAutomationMissingReceiptsViewState.fetchState !==
42
- 'In-Progress' &&
43
- (!state.expenseAutomationMissingReceiptsViewState.hasValidState() ||
44
- state.expenseAutomationMissingReceiptsViewState
45
- .transactionIdsBySelectedPeriod[monthYearPeriodId] == null)) {
46
- fetchActions.push((0, missingReceiptsViewReducer_1.fetchMissingReceipts)({ start: timePeriodStart, end: timePeriodEnd }, {
47
- amount: 75.0,
48
- currencyCode: '',
49
- currencySymbol: '',
50
- }, cacheOverride, refreshViewInBackground));
51
- }
52
- // TOODO - Vivek - Add fetch state
53
- if (state.expenseAutomationFluxAnalysisViewState.fetchState !==
54
- 'In-Progress' &&
55
- !state.expenseAutomationFluxAnalysisViewState.hasValidState() // TODO - Anjali - add condition for selected period
56
- ) {
57
- fetchActions.push((0, fluxAnalysisViewReducer_1.fetchFluxAnalysisView)(selectedPeriod, refreshViewInBackground));
58
- }
59
- if (state.expenseAutomationJESchedulesViewState.fetchState !==
60
- 'In-Progress' &&
61
- (!state.expenseAutomationJESchedulesViewState.hasValidState() ||
62
- state.expenseAutomationJESchedulesViewState
63
- .jeScheduleTransactionKeysByPeriod[monthYearPeriodId] == null ||
64
- state.expenseAutomationJESchedulesViewState
65
- .failedJeScheduleTransactionKeysByPeriod[monthYearPeriodId] ==
66
- null)) {
67
- fetchActions.push((0, jeSchedulesViewReducer_1.fetchJeSchedulesPage)({ start: timePeriodStart, end: timePeriodEnd }, cacheOverride));
68
- }
69
- return (0, rxjs_1.from)(fetchActions);
70
- }
71
- }));
72
- exports.fetchAllExpenseAutomationTabsEpic = fetchAllExpenseAutomationTabsEpic;
@@ -1,11 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../../reducer';
4
- import { refreshExpenseAutomationCurrentTab } from '../../expenseAutomationViewReducer';
5
- import { fetchMissingReceipts } from '../../reducers/missingReceiptsViewReducer';
6
- import { fetchFluxAnalysisView } from '../../reducers/fluxAnalysisViewReducer';
7
- import { fetchCompanyMonthEndReportView, fetchCompanyMonthEndReportTemplates } from '../../../companyMonthEndReportView/companyMonthEndReportViewReducer';
8
- import { fetchMonthEndCloseChecks } from '../../../monthEndCloseChecksView/monthEndCloseChecksViewReducer';
9
- import { fetchJeSchedulesPage } from '../../reducers/jeSchedulesViewReducer';
10
- export declare type ActionType = ReturnType<typeof refreshExpenseAutomationCurrentTab> | ReturnType<typeof fetchCompanyMonthEndReportView> | ReturnType<typeof fetchCompanyMonthEndReportTemplates> | ReturnType<typeof fetchMissingReceipts> | ReturnType<typeof fetchMonthEndCloseChecks> | ReturnType<typeof fetchFluxAnalysisView> | ReturnType<typeof fetchFluxAnalysisView> | ReturnType<typeof fetchJeSchedulesPage>;
11
- export declare const refreshExpenseAutomationCurrentTabEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.refreshExpenseAutomationCurrentTabEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const expenseAutomationViewReducer_1 = require("../../expenseAutomationViewReducer");
7
- const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
8
- const fluxAnalysisViewReducer_1 = require("../../reducers/fluxAnalysisViewReducer");
9
- const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
10
- const companyMonthEndReportViewReducer_1 = require("../../../companyMonthEndReportView/companyMonthEndReportViewReducer");
11
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
12
- const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
13
- const refreshExpenseAutomationCurrentTabEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(expenseAutomationViewReducer_1.refreshExpenseAutomationCurrentTab.match), (0, operators_1.switchMap)(() => {
14
- const state = state$.value;
15
- const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
16
- const companyId = currentTenant.companyId;
17
- const { selectedPeriodByTenantId, currentSelectedView } = state.expenseAutomationViewState;
18
- const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
19
- const period = (0, timePeriod_1.convertToPeriod)(selectedPeriod);
20
- const timePeriodStart = (0, timePeriod_1.toAbsoluteDay)(period.start);
21
- const timePeriodEnd = (0, timePeriod_1.toAbsoluteDay)(period.end);
22
- if (timePeriodStart == null ||
23
- timePeriodEnd == null ||
24
- companyId == null) {
25
- throw Error(`Invalid start - ${timePeriodStart} and end - ${timePeriodEnd} period from given ${selectedPeriod}`);
26
- }
27
- switch (currentSelectedView) {
28
- case 'missing_receipts':
29
- return (0, rxjs_1.from)([
30
- (0, missingReceiptsViewReducer_1.fetchMissingReceipts)({ start: timePeriodStart, end: timePeriodEnd }, {
31
- amount: 75.0,
32
- currencyCode: 'USD',
33
- currencySymbol: '$',
34
- }, true, true),
35
- ]);
36
- case 'flux_analysis':
37
- return (0, rxjs_1.from)([(0, fluxAnalysisViewReducer_1.fetchFluxAnalysisView)(selectedPeriod, true)]);
38
- case 'je_schedules':
39
- return (0, rxjs_1.from)([
40
- (0, jeSchedulesViewReducer_1.fetchJeSchedulesPage)({ start: timePeriodStart, end: timePeriodEnd }, true),
41
- ]);
42
- case 'month_end_insights':
43
- return (0, rxjs_1.from)([
44
- (0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportView)(true, companyId),
45
- (0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportTemplates)(companyId),
46
- ]);
47
- case 'transaction_categorization':
48
- default:
49
- // TODO - Vivek - Add fetch state
50
- return (0, rxjs_1.from)([]);
51
- }
52
- }));
53
- exports.refreshExpenseAutomationCurrentTabEpic = refreshExpenseAutomationCurrentTabEpic;
@@ -1,11 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { ZeniAPI } from '../../../../zeniAPI';
4
- import { RootState } from '../../../../reducer';
5
- import { fetchFluxAnalysisView, fetchFluxAnalysisViewSuccess, fetchFluxAnalysisViewFailure } from '../../reducers/fluxAnalysisViewReducer';
6
- import { updateAccounts } from '../../../../entity/account/accountReducer';
7
- import { updateClasses } from '../../../../entity/class/classReducer';
8
- import { updateVendors } from '../../../../entity/vendor/vendorReducer';
9
- import { updateAllUsers } from '../../../../entity/user/userReducer';
10
- export declare type ActionType = ReturnType<typeof fetchFluxAnalysisView> | ReturnType<typeof fetchFluxAnalysisViewSuccess> | ReturnType<typeof fetchFluxAnalysisViewFailure> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateClasses> | ReturnType<typeof updateVendors> | ReturnType<typeof updateAllUsers>;
11
- export declare const fetchFluxAnalysisViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchFluxAnalysisViewEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../../responsePayload");
7
- const fluxAnalysisViewReducer_1 = require("../../reducers/fluxAnalysisViewReducer");
8
- const helpers_1 = require("../../helpers/helpers");
9
- const accountReducer_1 = require("../../../../entity/account/accountReducer");
10
- const classReducer_1 = require("../../../../entity/class/classReducer");
11
- const vendorReducer_1 = require("../../../../entity/vendor/vendorReducer");
12
- const userReducer_1 = require("../../../../entity/user/userReducer");
13
- const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
14
- const fetchFluxAnalysisViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fluxAnalysisViewReducer_1.fetchFluxAnalysisView.match), (0, operators_1.switchMap)((action) => {
15
- const { expenseAutomationFluxAnalysisViewState: { fetchState, uiState }, } = state$.value;
16
- const { monthAndYear } = action.payload;
17
- if (fetchState === 'Not-Started') {
18
- const queryParam = {
19
- month_and_year: (0, timePeriod_1.toMonthYearPeriodQuery)(monthAndYear),
20
- sort_by: (0, helpers_1.toVendorFluxAnalysisSortKeyPayload)(uiState.sortKey),
21
- sort_order: uiState.sortOrder,
22
- };
23
- return zeniAPI
24
- .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/month-close-checks/flux_analysis?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
25
- .pipe((0, operators_1.mergeMap)((response) => {
26
- var _a, _b;
27
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
28
- const updateActions = [];
29
- if (response.data.report.accounts != null) {
30
- updateActions.push((0, accountReducer_1.updateAccounts)(response.data.report.accounts, 'account_list'));
31
- }
32
- if (response.data.report.accounting_class != null) {
33
- updateActions.push((0, classReducer_1.updateClasses)('class_list', response.data.report.accounting_class));
34
- }
35
- if (response.data.report.vendors != null) {
36
- updateActions.push((0, vendorReducer_1.updateVendors)(response.data.report.vendors, 'merge'));
37
- }
38
- if (response.data.report.users != null) {
39
- updateActions.push((0, userReducer_1.updateAllUsers)({
40
- users: response.data.report.users,
41
- updateType: 'merge',
42
- }));
43
- }
44
- if (((_a = response.data.report.flux_analysis_entities) === null || _a === void 0 ? void 0 : _a.operating_expenses) != null) {
45
- updateActions.push((0, fluxAnalysisViewReducer_1.fetchFluxAnalysisViewSuccess)({
46
- expensesPayload: (_b = response.data.report.flux_analysis_entities) === null || _b === void 0 ? void 0 : _b.operating_expenses,
47
- currency: response.data.report.currency,
48
- }));
49
- }
50
- return (0, rxjs_1.from)(updateActions);
51
- }
52
- else {
53
- return (0, rxjs_1.of)((0, fluxAnalysisViewReducer_1.fetchFluxAnalysisViewFailure)({
54
- status: response.status,
55
- }));
56
- }
57
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, fluxAnalysisViewReducer_1.fetchFluxAnalysisViewFailure)({
58
- status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'fetch flux analysis view REST API call errored out' +
59
- JSON.stringify(error)),
60
- }))));
61
- }
62
- else {
63
- return (0, rxjs_1.from)([]);
64
- }
65
- }));
66
- exports.fetchFluxAnalysisViewEpic = fetchFluxAnalysisViewEpic;
@@ -1,7 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { ZeniAPI } from '../../../../zeniAPI';
4
- import { RootState } from '../../../../reducer';
5
- import { reviewFluxAnalysisView, reviewFluxAnalysisViewFailure, reviewFluxAnalysisViewSuccess } from '../../reducers/fluxAnalysisViewReducer';
6
- export declare type ActionType = ReturnType<typeof reviewFluxAnalysisView> | ReturnType<typeof reviewFluxAnalysisViewSuccess> | ReturnType<typeof reviewFluxAnalysisViewFailure>;
7
- export declare const reviewFluxAnalysisViewEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reviewFluxAnalysisViewEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../../responsePayload");
7
- const fluxAnalysisViewReducer_1 = require("../../reducers/fluxAnalysisViewReducer");
8
- const helpers_1 = require("../../helpers/helpers");
9
- const reviewFluxAnalysisViewEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fluxAnalysisViewReducer_1.reviewFluxAnalysisView.match), (0, operators_1.switchMap)((action) => {
10
- const { actionType, operatingExpenseIds } = action.payload;
11
- const queryParam = {
12
- action: (0, helpers_1.toVendorFluxAnalysisReviewActionPayload)(actionType),
13
- flux_analysis_entity_ids: operatingExpenseIds,
14
- };
15
- return zeniAPI
16
- .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/month-close-checks/flux_analysis/review?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
17
- .pipe((0, operators_1.mergeMap)((response) => {
18
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
19
- const updateActions = [];
20
- if (response.data != null) {
21
- updateActions.push((0, fluxAnalysisViewReducer_1.reviewFluxAnalysisViewSuccess)({
22
- operatingExpenseIds: response.data.operating_expense_ids,
23
- }));
24
- }
25
- return (0, rxjs_1.from)(updateActions);
26
- }
27
- else {
28
- return (0, rxjs_1.of)((0, fluxAnalysisViewReducer_1.reviewFluxAnalysisViewFailure)({
29
- operatingExpenseIds: operatingExpenseIds,
30
- status: response.status,
31
- }));
32
- }
33
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, fluxAnalysisViewReducer_1.reviewFluxAnalysisViewFailure)({
34
- operatingExpenseIds: operatingExpenseIds,
35
- status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'review flux analysis view REST API call errored out' +
36
- JSON.stringify(error)),
37
- }))));
38
- }));
39
- exports.reviewFluxAnalysisViewEpic = reviewFluxAnalysisViewEpic;
@@ -1,7 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { fetchAccountList } from '../../../accountList/accountListReducer';
4
- import { fetchJeSchedulesPage, fetchJeSchedules } from '../../reducers/jeSchedulesViewReducer';
5
- import { RootState } from '../../../../reducer';
6
- export declare type ActionType = ReturnType<typeof fetchJeSchedulesPage> | ReturnType<typeof fetchJeSchedules> | ReturnType<typeof fetchAccountList>;
7
- export declare const fetchJeSchedulesPageEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchJeSchedulesPageEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const accountListReducer_1 = require("../../../accountList/accountListReducer");
7
- const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
8
- const scheduleListHelper_1 = require("../../../scheduleView/scheduleListView/scheduleListHelper");
9
- const fetchJeSchedulesPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(jeSchedulesViewReducer_1.fetchJeSchedulesPage.match), (0, operators_1.mergeMap)((action) => {
10
- const jeSchedulePageActions = [];
11
- const { period, refreshViewInBackground } = action.payload;
12
- const accountType = (0, scheduleListHelper_1.getAccountsTypesForScheduleEpics)();
13
- const accountListState = state$.value.accountListState;
14
- if (accountListState.byReportId[accountType.accountListKey].fetchState ===
15
- 'Not-Started') {
16
- // call this only if the account list for schedules is not fetched already
17
- jeSchedulePageActions.push((0, accountListReducer_1.fetchAccountList)(accountType.accountListKey, true, false, false, false, accountType.allowedAccountList));
18
- }
19
- jeSchedulePageActions.push((0, jeSchedulesViewReducer_1.fetchJeSchedules)(period, refreshViewInBackground));
20
- return (0, rxjs_1.concat)((0, rxjs_1.from)(jeSchedulePageActions));
21
- }));
22
- exports.fetchJeSchedulesPageEpic = fetchJeSchedulesPageEpic;
@@ -1,8 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { ZeniAPI } from '../../../../zeniAPI';
4
- import { RootState } from '../../../../reducer';
5
- import { fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesSuccess, initializeJeScheduleLocalData } from '../../reducers/jeSchedulesViewReducer';
6
- import { updateJESchedules, updateJESchedulesDetails } from '../../../../entity/jeSchedules/jeSchedulesReducer';
7
- export declare type ActionType = ReturnType<typeof fetchJeSchedules> | ReturnType<typeof fetchJeSchedulesFailure> | ReturnType<typeof fetchJeSchedulesSuccess> | ReturnType<typeof initializeJeScheduleLocalData> | ReturnType<typeof updateJESchedules> | ReturnType<typeof updateJESchedulesDetails>;
8
- export declare const fetchJeSchedulesEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchJeSchedulesEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../../responsePayload");
7
- const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
8
- const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
9
- const jeSchedulesReducer_1 = require("../../../../entity/jeSchedules/jeSchedulesReducer");
10
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
11
- const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(jeSchedulesViewReducer_1.fetchJeSchedules.match), (0, operators_1.switchMap)((action) => {
12
- const state = state$.value;
13
- const {
14
- // expenseAutomationJESchedulesViewState: {fetchState},
15
- expenseAutomationViewState: { selectedPeriodByTenantId }, } = state;
16
- const { period } = action.payload;
17
- const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
18
- const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
19
- // if (fetchState !== 'Not-Started') {
20
- const queryParam = {
21
- start_date: (0, timePeriod_1.toString)(period.start),
22
- end_date: (0, timePeriod_1.toString)(period.end),
23
- };
24
- return zeniAPI
25
- .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expenses_automation/je_schedules?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
26
- .pipe((0, operators_1.mergeMap)((response) => {
27
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
28
- const updateActions = [];
29
- updateActions.push((0, jeSchedulesReducer_1.updateJESchedules)([
30
- ...response.data.draft_je_schedules,
31
- ...response.data.failed_je_postings.je_schedules,
32
- ]), (0, jeSchedulesReducer_1.updateJESchedulesDetails)([...response.data.failed_je_postings.je_schedules], response.data.failed_je_postings.scheduled_journal_entries), (0, jeSchedulesViewReducer_1.initializeJeScheduleLocalData)([
33
- ...response.data.failed_je_postings.je_schedules,
34
- ]));
35
- updateActions.push((0, jeSchedulesViewReducer_1.fetchJeSchedulesSuccess)({
36
- jeSchedules: [...response.data.draft_je_schedules],
37
- failedJeSchedules: [
38
- ...response.data.failed_je_postings.je_schedules,
39
- ],
40
- selectedPeriod: selectedPeriod,
41
- }));
42
- return (0, rxjs_1.from)(updateActions);
43
- }
44
- else {
45
- return (0, rxjs_1.of)((0, jeSchedulesViewReducer_1.fetchJeSchedulesFailure)({
46
- status: response.status,
47
- selectedPeriod,
48
- }));
49
- }
50
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, jeSchedulesViewReducer_1.fetchJeSchedulesFailure)({
51
- status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'fetch JE schedules REST API call errored out' +
52
- JSON.stringify(error)),
53
- selectedPeriod,
54
- }))));
55
- // } else {
56
- // return from([] as ActionType[]);
57
- // }
58
- }));
59
- exports.fetchJeSchedulesEpic = fetchJeSchedulesEpic;
@@ -1,8 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { ZeniAPI } from '../../../../zeniAPI';
3
- import { RootState } from '../../../../reducer';
4
- import { updateJESchedulesDetails, updateJESchedules } from '../../../../entity/jeSchedules/jeSchedulesReducer';
5
- import { ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleSuccess, ignoreRecommendedJeScheduleFailure, removeJeScheduleTransactionKey } from '../../reducers/jeSchedulesViewReducer';
6
- import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
7
- export declare type ActionType = ReturnType<typeof ignoreRecommendedJeSchedule> | ReturnType<typeof ignoreRecommendedJeScheduleFailure> | ReturnType<typeof ignoreRecommendedJeScheduleSuccess> | ReturnType<typeof openSnackbar> | ReturnType<typeof removeJeScheduleTransactionKey> | ReturnType<typeof updateJESchedules> | ReturnType<typeof updateJESchedulesDetails>;
8
- export declare const ignoreRecommendedJeScheduleEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;