@zeniai/client-epic-state 4.20.3-betaSS12 → 4.20.3-betaSS13

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 (411) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
  2. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
  3. package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
  4. package/lib/commonStateTypes/animations.d.ts +1 -1
  5. package/lib/commonStateTypes/animations.js +4 -0
  6. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
  7. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
  8. package/lib/commonStateTypes/common.d.ts +1 -1
  9. package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
  10. package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
  11. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  12. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  13. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  14. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  15. package/lib/entity/account/accountPayload.d.ts +2 -0
  16. package/lib/entity/account/accountReducer.d.ts +5 -2
  17. package/lib/entity/account/accountReducer.js +13 -5
  18. package/lib/entity/account/accountSelector.d.ts +7 -0
  19. package/lib/entity/account/accountSelector.js +4 -2
  20. package/lib/entity/account/accountState.d.ts +3 -1
  21. package/lib/entity/account/accountState.js +4 -1
  22. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
  23. package/lib/entity/account/subAccountSelector.d.ts +2 -0
  24. package/lib/entity/account/subAccountSelector.js +2 -0
  25. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
  26. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  27. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
  28. package/lib/entity/accountRecon/accountReconPayload.js +4 -2
  29. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +52 -0
  30. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +70 -0
  31. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
  32. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
  33. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
  34. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
  35. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
  36. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
  37. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  38. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
  39. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  40. package/lib/entity/class/classReducer.d.ts +4 -4
  41. package/lib/entity/class/classState.d.ts +1 -1
  42. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  43. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  44. package/lib/entity/forecast/forecastState.d.ts +1 -1
  45. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
  46. package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  47. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
  48. package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  49. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
  50. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  51. package/lib/entity/project/projectPayload.d.ts +13 -0
  52. package/lib/entity/project/projectPayload.js +30 -0
  53. package/lib/entity/project/projectReducer.d.ts +10 -0
  54. package/lib/entity/project/projectReducer.js +31 -0
  55. package/lib/entity/project/projectSelector.d.ts +5 -0
  56. package/lib/entity/project/projectSelector.js +12 -0
  57. package/lib/entity/project/projectState.d.ts +13 -0
  58. package/lib/entity/project/projectState.js +2 -0
  59. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  60. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  61. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  62. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +13 -0
  63. package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
  64. package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
  65. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
  66. package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +11 -0
  67. package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +15 -0
  68. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
  69. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +64 -0
  70. package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
  71. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +57 -0
  72. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
  73. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
  74. package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
  75. package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
  76. package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
  77. package/lib/entity/snackbar/snackbarTypes.js +10 -0
  78. package/lib/entity/tenant/clearAllEpic.d.ts +7 -2
  79. package/lib/entity/tenant/clearAllEpic.js +10 -0
  80. package/lib/entity/tenant/tenantPayload.d.ts +2 -0
  81. package/lib/entity/tenant/tenantReducer.d.ts +5 -2
  82. package/lib/entity/tenant/tenantReducer.js +10 -2
  83. package/lib/entity/tenant/tenantSelector.d.ts +2 -0
  84. package/lib/entity/tenant/tenantSelector.js +17 -1
  85. package/lib/entity/tenant/tenantState.d.ts +2 -0
  86. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
  87. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  88. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +11 -0
  89. package/lib/entity/transaction/payloadTypes/transactionPayload.js +114 -1
  90. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
  91. package/lib/entity/transaction/stateTypes/transaction.d.ts +11 -0
  92. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  93. package/lib/entity/userRole/userRoleType.d.ts +2 -2
  94. package/lib/epic.d.ts +22 -2
  95. package/lib/epic.js +22 -2
  96. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
  97. package/lib/esm/commonStateTypes/animations.js +4 -0
  98. package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
  99. package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
  100. package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
  101. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  102. package/lib/esm/entity/account/accountReducer.js +12 -4
  103. package/lib/esm/entity/account/accountSelector.js +4 -2
  104. package/lib/esm/entity/account/accountState.js +4 -1
  105. package/lib/esm/entity/account/subAccountSelector.js +2 -0
  106. package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
  107. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +64 -0
  108. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
  109. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
  110. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
  111. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  112. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  113. package/lib/esm/entity/project/projectPayload.js +26 -0
  114. package/lib/esm/entity/project/projectReducer.js +27 -0
  115. package/lib/esm/entity/project/projectSelector.js +8 -0
  116. package/lib/esm/entity/project/projectState.js +1 -0
  117. package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
  118. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
  119. package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +11 -0
  120. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +60 -0
  121. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +50 -0
  122. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
  123. package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
  124. package/lib/esm/entity/snackbar/snackbarTypes.js +10 -0
  125. package/lib/esm/entity/tenant/clearAllEpic.js +10 -0
  126. package/lib/esm/entity/tenant/tenantReducer.js +9 -1
  127. package/lib/esm/entity/tenant/tenantSelector.js +14 -0
  128. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  129. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +114 -1
  130. package/lib/esm/epic.js +22 -2
  131. package/lib/esm/index.js +32 -19
  132. package/lib/esm/reducer.js +20 -2
  133. package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
  134. package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +152 -0
  135. package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +77 -0
  136. package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
  137. package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
  138. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
  139. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
  140. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +76 -0
  141. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  142. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  143. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  144. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  145. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  146. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  147. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +19 -1
  148. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  149. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +17 -0
  150. package/lib/esm/view/companyView/companyViewReducer.js +26 -1
  151. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
  152. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  153. package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +1 -39
  154. package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -1
  155. package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -6
  156. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +63 -0
  157. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  158. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +65 -0
  159. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  160. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +33 -0
  161. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -3
  162. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +6 -4
  163. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
  164. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +12 -0
  165. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +98 -0
  166. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  167. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +21 -5
  168. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  169. package/lib/esm/view/expenseAutomationView/helpers/bulkUploadTiming.js +16 -0
  170. package/lib/esm/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +13 -0
  171. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  172. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  173. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
  174. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -1
  175. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +29 -6
  176. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
  177. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
  178. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  179. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  180. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  181. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  182. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -5
  183. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +24 -1
  184. package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
  185. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  186. package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
  187. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
  188. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
  189. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
  190. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +65 -0
  191. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
  192. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
  193. package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  194. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
  195. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
  196. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
  197. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
  198. package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +100 -0
  199. package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
  200. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
  201. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
  202. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
  203. package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
  204. package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
  205. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  206. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  207. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  208. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  209. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  210. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  211. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  212. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  213. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  214. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  215. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  216. package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  217. package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  218. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  219. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  220. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  221. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
  222. package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
  223. package/lib/index.d.ts +49 -26
  224. package/lib/index.js +107 -39
  225. package/lib/reducer.d.ts +20 -2
  226. package/lib/reducer.js +20 -2
  227. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +33 -0
  228. package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
  229. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
  230. package/lib/view/aiAccountantView/aiAccountantViewReducer.js +156 -0
  231. package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +16 -0
  232. package/lib/view/aiAccountantView/aiAccountantViewSelector.js +83 -0
  233. package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
  234. package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
  235. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
  236. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
  237. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
  238. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
  239. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
  240. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
  241. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
  242. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +80 -0
  243. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  244. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  245. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  246. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  247. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  248. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
  249. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  250. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  251. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  252. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  253. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
  254. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
  255. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  256. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  257. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  258. package/lib/view/classList/fetchClassListEpic.js +8 -1
  259. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  260. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  261. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  262. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  263. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  264. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +20 -2
  265. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +4 -1
  266. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  267. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +9 -1
  268. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +7 -0
  269. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +21 -0
  270. package/lib/view/companyView/companyViewReducer.d.ts +6 -1
  271. package/lib/view/companyView/companyViewReducer.js +28 -2
  272. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
  273. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
  274. package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
  275. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  276. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  277. package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -36
  278. package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +2 -2
  279. package/lib/view/creditAgentView/creditAgentViewReducer.js +2 -40
  280. package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -1
  281. package/lib/view/creditAgentView/creditAgentViewSelector.js +1 -2
  282. package/lib/view/creditAgentView/creditAgentViewState.d.ts +0 -31
  283. package/lib/view/creditAgentView/creditAgentViewState.js +0 -6
  284. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  285. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +9 -0
  286. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +67 -0
  287. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  288. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +10 -0
  289. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +69 -0
  290. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  291. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts +13 -0
  292. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +37 -0
  293. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  294. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +5 -3
  295. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
  296. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +10 -0
  297. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +16 -0
  298. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.d.ts +18 -0
  299. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +102 -0
  300. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  301. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
  302. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +20 -4
  303. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  304. package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.d.ts +16 -0
  305. package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.js +19 -0
  306. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.d.ts +7 -0
  307. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +16 -0
  308. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  309. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -2
  310. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  311. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  312. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
  313. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
  314. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
  315. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  316. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +22 -2
  317. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +18 -2
  318. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +30 -7
  319. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
  320. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
  321. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  322. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -0
  323. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
  324. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  325. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  326. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  327. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  328. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  329. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -3
  330. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -0
  331. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +27 -0
  332. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +5 -1
  333. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
  334. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  335. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  336. package/lib/view/financeStatement/financeStatementSelector.js +12 -1
  337. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  338. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  339. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
  340. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
  341. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
  342. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
  343. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
  344. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
  345. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
  346. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
  347. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
  348. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +69 -0
  349. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
  350. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
  351. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
  352. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
  353. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  354. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
  355. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  356. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  357. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  358. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  359. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
  360. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
  361. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
  362. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
  363. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
  364. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
  365. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
  366. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
  367. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
  368. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +106 -0
  369. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
  370. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
  371. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
  372. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
  373. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
  374. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
  375. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
  376. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
  377. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
  378. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
  379. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
  380. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  381. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  382. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
  383. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  384. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  385. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  386. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  387. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  388. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
  389. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  390. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  391. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  392. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  393. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  394. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  395. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  396. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
  397. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  398. package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  399. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
  400. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  401. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  402. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  403. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  404. package/lib/view/topEx/topExSelector.d.ts +1 -1
  405. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  406. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  407. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
  408. package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
  409. package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
  410. package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
  411. package/package.json +1 -1
@@ -0,0 +1,33 @@
1
+ import { AccountCOABalanceGroupedPayloadByAccountId } from '../../commonPayloadTypes/subAccountView/reportBySubAccountPayload';
2
+ import { COABalanceGroupedPayloadV2 } from '../../commonPayloadTypes/v2/coaBalancePayload';
3
+ import { ReportPayloadV2 } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
4
+ import { AccountMetadataPayload } from '../../entity/account/accountPayload';
5
+ import { ProjectMetadataPayload } from '../../entity/project/projectPayload';
6
+ import { ZeniReportResponse } from '../../responsePayload';
7
+ export interface ReportByProjectMetadataPayloadV2 extends ReportPayloadV2 {
8
+ accounts: AccountMetadataPayload[];
9
+ projects: ProjectMetadataPayload[];
10
+ }
11
+ export interface ProjectCOABalanceGroupedPayloadV2 extends COABalanceGroupedPayloadV2 {
12
+ accounts: AccountCOABalanceGroupedPayloadByAccountId;
13
+ }
14
+ interface ProjectCOABalanceGroupedPayloadByProjectIdV2 {
15
+ [project_Id: string]: ProjectCOABalanceGroupedPayloadV2;
16
+ }
17
+ export interface SectionByProjectCOABalanceGroupedPayloadV2 extends COABalanceGroupedPayloadV2 {
18
+ projects: ProjectCOABalanceGroupedPayloadByProjectIdV2;
19
+ }
20
+ export interface ProfitAndLossProjectViewPayload extends ReportByProjectMetadataPayloadV2 {
21
+ cogs: SectionByProjectCOABalanceGroupedPayloadV2;
22
+ earnings_before_interest_and_tax: COABalanceGroupedPayloadV2;
23
+ expenses: SectionByProjectCOABalanceGroupedPayloadV2;
24
+ gross_profit: COABalanceGroupedPayloadV2;
25
+ income: SectionByProjectCOABalanceGroupedPayloadV2;
26
+ net_income: COABalanceGroupedPayloadV2;
27
+ net_operating_income: COABalanceGroupedPayloadV2;
28
+ net_other_income: COABalanceGroupedPayloadV2;
29
+ other_expenses: SectionByProjectCOABalanceGroupedPayloadV2;
30
+ other_income: SectionByProjectCOABalanceGroupedPayloadV2;
31
+ }
32
+ export type ProfitAndLossReportProjectViewResponse = ZeniReportResponse<ProfitAndLossProjectViewPayload>;
33
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,33 @@
1
+ import { AccountViewMode, ID } from '../../commonStateTypes/common';
2
+ import { ZeniAPIStatus, ZeniReportData } from '../../responsePayload';
3
+ import { ProfitAndLossProjectViewPayload } from './profitAndLossProjectViewPayload';
4
+ import { ProfitAndLossProjectViewState } from './profitAndLossProjectViewState';
5
+ export declare const initialState: ProfitAndLossProjectViewState;
6
+ export declare const fetchProfitAndLossProjectView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: boolean | undefined], {
7
+ cacheOverride: boolean;
8
+ }, "profitAndLossProjectView/fetchProfitAndLossProjectView", never, never>, fetchProfitAndLossForTimeframeProjectView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", fetchFullReport?: boolean | undefined, cacheOverride?: boolean | undefined], {
9
+ timeframe: "month" | "year" | "quarter";
10
+ fetchFullReport: boolean;
11
+ cacheOverride: boolean;
12
+ }, "profitAndLossProjectView/fetchProfitAndLossForTimeframeProjectView", never, never>, updateProfitAndLossForTimeframeProjectView: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
13
+ report: ZeniReportData<ProfitAndLossProjectViewPayload>;
14
+ timeframe: "month" | "quarter" | "year";
15
+ }, "profitAndLossProjectView/updateProfitAndLossForTimeframeProjectView">, updateProfitAndLossForTimeframeProjectViewFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, timeframe: "month" | "year" | "quarter"], {
16
+ error: ZeniAPIStatus<Record<string, unknown>>;
17
+ timeframe: "month" | "year" | "quarter";
18
+ }, "profitAndLossProjectView/updateProfitAndLossForTimeframeProjectViewFailure", never, never>, updateProjectsToFilterOut: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
19
+ projectsToFilterOut: ID[];
20
+ }, "profitAndLossProjectView/updateProjectsToFilterOut">, updateProfitAndLossProjectViewUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
21
+ nodeCollapseState?: {
22
+ isCollapsed: boolean;
23
+ nodeId: ID;
24
+ };
25
+ scrollPosition?: {
26
+ scrollTop: number;
27
+ scrollLeft?: number;
28
+ };
29
+ }, "profitAndLossProjectView/updateProfitAndLossProjectViewUIState">, updateProjectViewAccountViewMode: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
30
+ viewMode: AccountViewMode;
31
+ }, "profitAndLossProjectView/updateProjectViewAccountViewMode">, resetProfitAndLossProjectNodeCollapseState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossProjectView/resetProfitAndLossProjectNodeCollapseState">, clearProfitAndLossProjectView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossProjectView/clearProfitAndLossProjectView">;
32
+ declare const _default: import("redux").Reducer<ProfitAndLossProjectViewState>;
33
+ export default _default;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.clearProfitAndLossProjectView = exports.resetProfitAndLossProjectNodeCollapseState = exports.updateProjectViewAccountViewMode = exports.updateProfitAndLossProjectViewUIState = exports.updateProjectsToFilterOut = exports.updateProfitAndLossForTimeframeProjectViewFailure = exports.updateProfitAndLossForTimeframeProjectView = exports.fetchProfitAndLossForTimeframeProjectView = exports.fetchProfitAndLossProjectView = exports.initialState = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const viewAndReportPayloadv2_1 = require("../../commonPayloadTypes/v2/viewAndReportPayloadv2");
7
+ exports.initialState = {
8
+ bookCloseDate: undefined,
9
+ fetchState: {
10
+ month: {
11
+ fetchState: 'Not-Started',
12
+ error: undefined,
13
+ },
14
+ quarter: {
15
+ fetchState: 'Not-Started',
16
+ error: undefined,
17
+ },
18
+ year: {
19
+ fetchState: 'Not-Started',
20
+ error: undefined,
21
+ },
22
+ },
23
+ firstMonthOfFY: 1,
24
+ projectIds: [],
25
+ reportId: 'profit_and_loss_by_projects',
26
+ reportTitle: 'profit_and_loss_by_projects',
27
+ uiState: {
28
+ accountViewMode: 'project',
29
+ nodeCollapseState: {},
30
+ projectsToFilterOut: [],
31
+ scrollPosition: undefined,
32
+ },
33
+ };
34
+ const profitAndLossProjectView = (0, toolkit_1.createSlice)({
35
+ name: 'profitAndLossProjectView',
36
+ initialState: exports.initialState,
37
+ reducers: {
38
+ fetchProfitAndLossProjectView: {
39
+ prepare(cacheOverride = false) {
40
+ return { payload: { cacheOverride } };
41
+ },
42
+ reducer(
43
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
44
+ _draft,
45
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
46
+ _action) {
47
+ // nothing to do here
48
+ },
49
+ },
50
+ fetchProfitAndLossForTimeframeProjectView: {
51
+ prepare(timeframe, fetchFullReport = true, cacheOverride = false) {
52
+ return { payload: { timeframe, fetchFullReport, cacheOverride } };
53
+ },
54
+ reducer(draft, action) {
55
+ const timeframe = action.payload.timeframe;
56
+ draft.fetchState[timeframe].fetchState = 'In-Progress';
57
+ draft.fetchState[timeframe].error = undefined;
58
+ },
59
+ },
60
+ updateProfitAndLossForTimeframeProjectView(draft, action) {
61
+ doUpdateProfitAndLossProjectView(draft, action.payload.timeframe, action.payload.report);
62
+ },
63
+ updateProfitAndLossForTimeframeProjectViewFailure: {
64
+ prepare(error, timeframe) {
65
+ return {
66
+ payload: {
67
+ error,
68
+ timeframe,
69
+ },
70
+ };
71
+ },
72
+ reducer(draft, action) {
73
+ draft.fetchState[action.payload.timeframe] = {
74
+ fetchState: 'Error',
75
+ error: action.payload.error,
76
+ };
77
+ },
78
+ },
79
+ updateProjectsToFilterOut(draft, action) {
80
+ draft.uiState.projectsToFilterOut = action.payload.projectsToFilterOut;
81
+ },
82
+ updateProfitAndLossProjectViewUIState(draft, action) {
83
+ const { nodeCollapseState, scrollPosition } = action.payload;
84
+ if (nodeCollapseState != null) {
85
+ draft.uiState.nodeCollapseState = Object.assign({}, draft.uiState.nodeCollapseState, {
86
+ [nodeCollapseState.nodeId]: nodeCollapseState.isCollapsed,
87
+ });
88
+ }
89
+ if (scrollPosition != null) {
90
+ draft.uiState.scrollPosition = scrollPosition;
91
+ }
92
+ },
93
+ updateProjectViewAccountViewMode(draft, action) {
94
+ draft.uiState.accountViewMode = action.payload.viewMode;
95
+ },
96
+ resetProfitAndLossProjectNodeCollapseState(draft) {
97
+ draft.uiState.nodeCollapseState = {};
98
+ },
99
+ clearProfitAndLossProjectView(draft) {
100
+ Object.assign(draft, exports.initialState);
101
+ },
102
+ },
103
+ });
104
+ _a = profitAndLossProjectView.actions, exports.fetchProfitAndLossProjectView = _a.fetchProfitAndLossProjectView, exports.fetchProfitAndLossForTimeframeProjectView = _a.fetchProfitAndLossForTimeframeProjectView, exports.updateProfitAndLossForTimeframeProjectView = _a.updateProfitAndLossForTimeframeProjectView, exports.updateProfitAndLossForTimeframeProjectViewFailure = _a.updateProfitAndLossForTimeframeProjectViewFailure, exports.updateProjectsToFilterOut = _a.updateProjectsToFilterOut, exports.updateProfitAndLossProjectViewUIState = _a.updateProfitAndLossProjectViewUIState, exports.updateProjectViewAccountViewMode = _a.updateProjectViewAccountViewMode, exports.resetProfitAndLossProjectNodeCollapseState = _a.resetProfitAndLossProjectNodeCollapseState, exports.clearProfitAndLossProjectView = _a.clearProfitAndLossProjectView;
105
+ exports.default = profitAndLossProjectView.reducer;
106
+ const doUpdateProfitAndLossProjectView = (draft, timeframe, pandLReport) => {
107
+ const report = (0, viewAndReportPayloadv2_1.mapReportPayloadV2ToReportV2)(pandLReport.report);
108
+ draft.currency = report.currency;
109
+ draft.dataAvailable = report.dataAvailable;
110
+ draft.firstMonthOfFY = report.firstMonthOfFY;
111
+ draft.bookCloseDate = report.bookCloseDate;
112
+ draft.status = report.status;
113
+ draft.fetchState[timeframe].fetchState = 'Completed';
114
+ if (draft.projectIds.length <= 0) {
115
+ draft.projectIds = pandLReport.report.projects.map((project) => project.zeni_project_id);
116
+ }
117
+ };
@@ -0,0 +1,9 @@
1
+ import { COABalancesFilterProjectView } from '../../commonStateTypes/coaBalance/coaBalancesFilterProjectView';
2
+ import { AccountState } from '../../entity/account/accountState';
3
+ import { ProjectState } from '../../entity/project/projectReducer';
4
+ import { SectionProjectViewState } from '../../entity/sectionProjectView/sectionProjectViewState';
5
+ import { PandLReportViewCalculatedSectionID, PandLReportViewSectionID } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
6
+ import { ProfitAndLossProjectViewReport } from './profitAndLossProjectViewSelectorTypes';
7
+ import { ProfitAndLossProjectViewState } from './profitAndLossProjectViewState';
8
+ export declare const profitAndLossProjectIdsInOrder: (PandLReportViewSectionID | PandLReportViewCalculatedSectionID)[];
9
+ export declare const getProfitAndLossProjectView: (filter: COABalancesFilterProjectView, accountState: AccountState, projectState: ProjectState, sectionsState: SectionProjectViewState, profitAndLossProjectViewState: ProfitAndLossProjectViewState) => ProfitAndLossProjectViewReport;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProfitAndLossProjectView = exports.profitAndLossProjectIdsInOrder = void 0;
4
+ const getDifferenceOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getDifferenceOfBalancesGroupedByPeriod");
5
+ const getSumOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod");
6
+ const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
7
+ const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
8
+ const projectSelector_1 = require("../../entity/project/projectSelector");
9
+ const sectionProjectViewSelector_1 = require("../../entity/sectionProjectView/sectionProjectViewSelector");
10
+ const profitAndLossClassesViewSelectorTypes_1 = require("../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes");
11
+ exports.profitAndLossProjectIdsInOrder = [
12
+ 'income',
13
+ 'cogs',
14
+ 'grossProfit',
15
+ 'expenses',
16
+ 'earningsBeforeInterestAndTax',
17
+ 'otherIncome',
18
+ 'otherExpenses',
19
+ 'netOtherIncome',
20
+ 'netIncome',
21
+ ];
22
+ const getProfitAndLossProjectView = (filter, accountState, projectState, sectionsState, profitAndLossProjectViewState) => {
23
+ const fetchState = (0, reduceFetchState_1.reduceFetchStateParallelTimeframes)([
24
+ profitAndLossProjectViewState.fetchState.month,
25
+ profitAndLossProjectViewState.fetchState.quarter,
26
+ profitAndLossProjectViewState.fetchState.year,
27
+ ]);
28
+ const reportId = 'profit_and_loss_by_projects';
29
+ const sections = {};
30
+ const calculatedSections = {};
31
+ if (fetchState.fetchState === 'Completed') {
32
+ profitAndLossClassesViewSelectorTypes_1.ALL_PANDL_REPORT_VIEW_SECTION_IDS.forEach((sectionId) => {
33
+ sections[`${sectionId}`] = (0, sectionProjectViewSelector_1.getSectionProjectViewReport)(accountState, projectState, sectionsState, profitAndLossProjectViewState.projectIds, {
34
+ reportId,
35
+ sectionId,
36
+ }, filter);
37
+ });
38
+ const grossProfitBalancesByPeriod = (0, getDifferenceOfBalancesGroupedByPeriod_1.getDifferenceOfBalancesGroupedByPeriod)(sections['income'].sectionBalancesTotalByPeriod, sections['cogs'].sectionBalancesTotalByPeriod);
39
+ calculatedSections['grossProfit'] = (0, coaBalance_1.getCOABalances)(grossProfitBalancesByPeriod, filter);
40
+ const ebitBalancesByPeriod = (0, getDifferenceOfBalancesGroupedByPeriod_1.getDifferenceOfBalancesGroupedByPeriod)(grossProfitBalancesByPeriod, sections['expenses'].sectionBalancesTotalByPeriod);
41
+ calculatedSections['earningsBeforeInterestAndTax'] = (0, coaBalance_1.getCOABalances)(ebitBalancesByPeriod, filter);
42
+ const netOtherIncomeBalances = (0, getDifferenceOfBalancesGroupedByPeriod_1.getDifferenceOfBalancesGroupedByPeriod)(sections['otherIncome'].sectionBalancesTotalByPeriod, sections['otherExpenses'].sectionBalancesTotalByPeriod);
43
+ calculatedSections['netOtherIncome'] = (0, coaBalance_1.getCOABalances)(netOtherIncomeBalances, filter);
44
+ const netIncomeBalances = (0, getSumOfBalancesGroupedByPeriod_1.getSumOfBalancesByGroupedByPeriod)([
45
+ ebitBalancesByPeriod,
46
+ netOtherIncomeBalances,
47
+ ]);
48
+ calculatedSections['netIncome'] = (0, coaBalance_1.getCOABalances)(netIncomeBalances, filter);
49
+ }
50
+ return {
51
+ sections,
52
+ calculatedSections,
53
+ reportId: profitAndLossProjectViewState.reportId,
54
+ reportTitle: profitAndLossProjectViewState.reportTitle,
55
+ firstMonthOfFY: profitAndLossProjectViewState.firstMonthOfFY,
56
+ dataAvailable: profitAndLossProjectViewState.dataAvailable,
57
+ bookCloseDate: profitAndLossProjectViewState.bookCloseDate,
58
+ version: profitAndLossProjectViewState.version,
59
+ status: profitAndLossProjectViewState.status,
60
+ fetchState: fetchState.fetchState,
61
+ error: fetchState.error,
62
+ filter,
63
+ uiState: profitAndLossProjectViewState.uiState,
64
+ projects: (0, projectSelector_1.getProjectsByIds)(projectState, profitAndLossProjectViewState.projectIds),
65
+ projectsToFilterOut: profitAndLossProjectViewState.uiState.projectsToFilterOut,
66
+ idsInOrder: exports.profitAndLossProjectIdsInOrder,
67
+ };
68
+ };
69
+ exports.getProfitAndLossProjectView = getProfitAndLossProjectView;
@@ -0,0 +1,19 @@
1
+ import { SectionProjectViewReport } from '../../entity/sectionProjectView/sectionProjectViewSelectorTypes';
2
+ import { COABalancesFilterProjectView } from '../../commonStateTypes/coaBalance/coaBalancesFilterProjectView';
3
+ import { ID } from '../../commonStateTypes/common';
4
+ import { DataAvailable } from '../../commonStateTypes/dataAvailable';
5
+ import { CalculatedSection } from '../../commonStateTypes/selectorTypes/selectorTypes';
6
+ import { SelectorReport } from '../../commonStateTypes/viewAndReport/viewAndReport';
7
+ import { Project } from '../../entity/project/projectState';
8
+ import { PandLReportViewCalculatedSectionID, PandLReportViewSectionID } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
9
+ import { ProfitAndLossProjectViewUIState } from './profitAndLossProjectViewState';
10
+ export interface ProfitAndLossProjectViewReport extends SelectorReport {
11
+ calculatedSections: Record<PandLReportViewCalculatedSectionID, CalculatedSection>;
12
+ filter: COABalancesFilterProjectView;
13
+ idsInOrder: (PandLReportViewSectionID | PandLReportViewCalculatedSectionID)[];
14
+ projects: Project[];
15
+ projectsToFilterOut: ID[];
16
+ sections: Record<PandLReportViewSectionID, SectionProjectViewReport>;
17
+ uiState: ProfitAndLossProjectViewUIState;
18
+ dataAvailable?: DataAvailable;
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ import { Currency } from '../../commonStateTypes/amount';
2
+ import { AccountViewMode, FetchStateAndError, ID } from '../../commonStateTypes/common';
3
+ import { Report } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
+ export interface ProfitAndLossProjectViewUIState {
5
+ accountViewMode: AccountViewMode;
6
+ nodeCollapseState: Record<ID, boolean>;
7
+ projectsToFilterOut: ID[];
8
+ scrollPosition: {
9
+ scrollTop: number;
10
+ scrollLeft?: number;
11
+ } | undefined;
12
+ }
13
+ export interface ProfitAndLossProjectViewState extends Report {
14
+ fetchState: {
15
+ month: FetchStateAndError;
16
+ quarter: FetchStateAndError;
17
+ year: FetchStateAndError;
18
+ };
19
+ projectIds: ID[];
20
+ uiState: ProfitAndLossProjectViewUIState;
21
+ currency?: Currency;
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getReimbursementCardReport: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
3
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  fetchState: import("../..").FetchState;
@@ -4,7 +4,8 @@ import { RootState } from '../../reducer';
4
4
  import { fetchNetBurnOrIncomeClassesView } from '../netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer';
5
5
  import { fetchOpExClassesView } from '../opExClassesView/opExClassesViewReducer';
6
6
  import { fetchProfitAndLossClassesView } from '../profitAndLossClassesView/profitAndLossClassesViewReducer';
7
+ import { fetchProfitAndLossProjectView } from '../profitAndLossProjectView/profitAndLossProjectViewReducer';
7
8
  import { fetchRevenueClassesView } from '../revenueClassesView/revenueClassesViewReducer';
8
9
  import { initiateReportsClassViewRefetching } from './reportsResyncReducer';
9
- export type ActionType = ReturnType<typeof initiateReportsClassViewRefetching> | ReturnType<typeof fetchProfitAndLossClassesView> | ReturnType<typeof fetchOpExClassesView> | ReturnType<typeof fetchRevenueClassesView> | ReturnType<typeof fetchNetBurnOrIncomeClassesView>;
10
+ export type ActionType = ReturnType<typeof initiateReportsClassViewRefetching> | ReturnType<typeof fetchProfitAndLossClassesView> | ReturnType<typeof fetchOpExClassesView> | ReturnType<typeof fetchRevenueClassesView> | ReturnType<typeof fetchNetBurnOrIncomeClassesView> | ReturnType<typeof fetchProfitAndLossProjectView>;
10
11
  export declare const initiateReportsClassViewRefetchingEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>) => Observable<ActionType>;
@@ -6,6 +6,7 @@ const operators_1 = require("rxjs/operators");
6
6
  const netBurnOrIncomeClassesViewReducer_1 = require("../netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer");
7
7
  const opExClassesViewReducer_1 = require("../opExClassesView/opExClassesViewReducer");
8
8
  const profitAndLossClassesViewReducer_1 = require("../profitAndLossClassesView/profitAndLossClassesViewReducer");
9
+ const profitAndLossProjectViewReducer_1 = require("../profitAndLossProjectView/profitAndLossProjectViewReducer");
9
10
  const revenueClassesViewReducer_1 = require("../revenueClassesView/revenueClassesViewReducer");
10
11
  const reportsResyncReducer_1 = require("./reportsResyncReducer");
11
12
  const initiateReportsClassViewRefetchingEpic = (actions$,
@@ -26,6 +27,9 @@ _) => actions$.pipe((0, operators_1.filter)(reportsResyncReducer_1.initiateRepor
26
27
  case 'net_burn_or_income_by_classes':
27
28
  actions.push((0, netBurnOrIncomeClassesViewReducer_1.fetchNetBurnOrIncomeClassesView)(true));
28
29
  break;
30
+ case 'profit_and_loss_by_projects':
31
+ actions.push((0, profitAndLossProjectViewReducer_1.fetchProfitAndLossProjectView)(true));
32
+ break;
29
33
  default:
30
34
  break;
31
35
  }
@@ -2,8 +2,8 @@ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
2
2
  import { ZeniAPIStatus } from '../../responsePayload';
3
3
  import { ReportsResyncState } from './reportsResyncState';
4
4
  export declare const initialReportsResyncState: ReportsResyncState;
5
- export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"], {
6
- reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
5
+ export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation"], {
6
+ reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
7
7
  }, "initiateReportsResync/initiateReportsResync", never, never>, initiateReportsClassViewRefetching: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
8
8
  reportIdToResync: ReportID;
9
9
  }, "initiateReportsResync/initiateReportsClassViewRefetching">, reportsResyncSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -3,7 +3,7 @@ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
3
3
  import { OnboardingInfo } from '../../entity/company/companyStateTypes';
4
4
  import { ZeniDate } from '../../zeniDayJS';
5
5
  import { AuditSummaryPayload, ReviewCompanyPayload } from './reviewCompanyPayload';
6
- export declare const toReviewColumnKeyType: (v: string) => "uncategorized" | "companyName" | "auditScore" | "miscategorized" | "notes" | "warnings" | "vendorReview" | "reviewVendor";
6
+ export declare const toReviewColumnKeyType: (v: string) => "companyName" | "notes" | "uncategorized" | "auditScore" | "miscategorized" | "warnings" | "vendorReview" | "reviewVendor";
7
7
  export type ReviewCompanyColumnKey = ReturnType<typeof toReviewColumnKeyType>;
8
8
  export type ReviewTransactionsType = 'income' | 'expense';
9
9
  export interface AuditSummary {
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
7
7
  export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
8
8
  export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
9
9
  export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
10
- declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
10
+ declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "scheduleCategory" | "startMonth" | "accruedExpenseCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "endMonth";
11
11
  export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
12
12
  export interface DownloadJEScheduleTabOptions {
13
13
  categoryId: ID;
@@ -0,0 +1,75 @@
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 {};
@@ -0,0 +1,30 @@
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;
@@ -0,0 +1,50 @@
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;