@zeniai/client-epic-state 4.20.3-betaRD21 → 4.20.3-betaRD3

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 (214) hide show
  1. package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
  2. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
  3. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
  4. package/lib/commonStateTypes/common.d.ts +1 -1
  5. package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
  6. package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
  7. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  8. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  9. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  10. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -1
  11. package/lib/entity/account/accountPayload.d.ts +0 -2
  12. package/lib/entity/account/accountReducer.d.ts +2 -5
  13. package/lib/entity/account/accountReducer.js +7 -10
  14. package/lib/entity/account/accountSelector.d.ts +7 -0
  15. package/lib/entity/account/accountSelector.js +4 -2
  16. package/lib/entity/account/accountState.d.ts +3 -1
  17. package/lib/entity/account/accountState.js +4 -1
  18. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
  19. package/lib/entity/account/subAccountSelector.d.ts +2 -0
  20. package/lib/entity/account/subAccountSelector.js +2 -0
  21. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
  22. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  23. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  24. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  25. package/lib/entity/class/classReducer.d.ts +4 -4
  26. package/lib/entity/class/classState.d.ts +1 -1
  27. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  28. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  29. package/lib/entity/forecast/forecastState.d.ts +1 -1
  30. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  31. package/lib/entity/project/projectPayload.d.ts +13 -0
  32. package/lib/entity/project/projectPayload.js +30 -0
  33. package/lib/entity/project/projectReducer.d.ts +10 -0
  34. package/lib/entity/project/projectReducer.js +31 -0
  35. package/lib/entity/project/projectSelector.d.ts +5 -0
  36. package/lib/entity/project/projectSelector.js +12 -0
  37. package/lib/entity/project/projectState.d.ts +13 -0
  38. package/lib/entity/project/projectState.js +2 -0
  39. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  40. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  41. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  42. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +10 -0
  43. package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
  44. package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
  45. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
  46. package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +9 -0
  47. package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +13 -0
  48. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
  49. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +50 -0
  50. package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
  51. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +103 -0
  52. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
  53. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
  54. package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
  55. package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
  56. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  57. package/lib/entity/tenant/clearAllEpic.d.ts +5 -4
  58. package/lib/entity/tenant/clearAllEpic.js +6 -4
  59. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  60. package/lib/entity/tenant/tenantReducer.js +1 -0
  61. package/lib/entity/tenant/tenantSelector.d.ts +1 -0
  62. package/lib/entity/tenant/tenantSelector.js +9 -1
  63. package/lib/entity/tenant/tenantState.d.ts +1 -0
  64. package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -1
  65. package/lib/entity/userRole/userRoleType.d.ts +2 -2
  66. package/lib/epic.d.ts +4 -3
  67. package/lib/epic.js +4 -3
  68. package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
  69. package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
  70. package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
  71. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -1
  72. package/lib/esm/entity/account/accountReducer.js +6 -9
  73. package/lib/esm/entity/account/accountSelector.js +4 -2
  74. package/lib/esm/entity/account/accountState.js +4 -1
  75. package/lib/esm/entity/account/subAccountSelector.js +2 -0
  76. package/lib/esm/entity/project/projectPayload.js +26 -0
  77. package/lib/esm/entity/project/projectReducer.js +27 -0
  78. package/lib/esm/entity/project/projectSelector.js +8 -0
  79. package/lib/esm/entity/project/projectState.js +1 -0
  80. package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
  81. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
  82. package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +9 -0
  83. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +46 -0
  84. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +96 -0
  85. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
  86. package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
  87. package/lib/esm/entity/tenant/clearAllEpic.js +6 -4
  88. package/lib/esm/entity/tenant/tenantReducer.js +1 -0
  89. package/lib/esm/entity/tenant/tenantSelector.js +7 -0
  90. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -1
  91. package/lib/esm/epic.js +4 -3
  92. package/lib/esm/index.js +11 -15
  93. package/lib/esm/reducer.js +9 -6
  94. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
  95. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -5
  96. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +3 -163
  97. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -1
  98. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -112
  99. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -10
  100. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -6
  101. package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
  102. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +2 -4
  103. package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +45 -0
  104. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
  105. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
  106. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
  107. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +66 -0
  108. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
  109. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
  110. package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  111. package/lib/index.d.ts +14 -16
  112. package/lib/index.js +45 -65
  113. package/lib/reducer.d.ts +9 -6
  114. package/lib/reducer.js +9 -6
  115. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  116. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  117. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  118. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
  119. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
  120. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  121. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  122. package/lib/view/companyView/types/cockpitTypes.d.ts +5 -6
  123. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  124. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
  125. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  126. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -33
  127. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -5
  128. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +4 -18
  129. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -164
  130. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +2 -6
  131. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  132. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -112
  133. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -9
  134. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -3
  135. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -8
  136. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
  137. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -13
  138. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  139. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  140. package/lib/view/financeStatement/financeStatementSelector.js +12 -1
  141. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  142. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  143. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +2 -4
  144. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +8 -0
  145. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +49 -0
  146. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
  147. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
  148. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
  149. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
  150. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
  151. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
  152. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
  153. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +70 -0
  154. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +18 -0
  155. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
  156. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
  157. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
  158. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  159. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
  160. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  161. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  162. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  163. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  164. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  165. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  166. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
  167. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  168. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
  169. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  170. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  171. package/lib/view/topEx/topExSelector.d.ts +1 -1
  172. package/package.json +1 -1
  173. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +0 -44
  174. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +0 -55
  175. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +0 -10
  176. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +0 -51
  177. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +0 -48
  178. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +0 -66
  179. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +0 -52
  180. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +0 -37
  181. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +0 -49
  182. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +0 -47
  183. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +0 -62
  184. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +0 -31
  185. package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +0 -2
  186. package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +0 -149
  187. package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +0 -72
  188. package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +0 -11
  189. package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +0 -46
  190. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +0 -27
  191. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +0 -47
  192. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +0 -52
  193. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
  194. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
  195. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +0 -31
  196. package/lib/view/aiAccountantView/aiAccountantViewPayload.js +0 -8
  197. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +0 -29
  198. package/lib/view/aiAccountantView/aiAccountantViewReducer.js +0 -153
  199. package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +0 -14
  200. package/lib/view/aiAccountantView/aiAccountantViewSelector.js +0 -78
  201. package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +0 -27
  202. package/lib/view/aiAccountantView/aiAccountantViewState.js +0 -13
  203. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +0 -33
  204. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +0 -50
  205. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +0 -23
  206. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +0 -31
  207. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +0 -33
  208. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +0 -51
  209. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +0 -28
  210. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +0 -56
  211. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +0 -8
  212. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -48
  213. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +0 -9
  214. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -48
@@ -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,70 @@
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 sectionProjectViewSelector_1 = require("../../entity/sectionProjectView/sectionProjectViewSelector");
9
+ const profitAndLossClassesViewSelectorTypes_1 = require("../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes");
10
+ exports.profitAndLossProjectIdsInOrder = [
11
+ 'income',
12
+ 'cogs',
13
+ 'grossProfit',
14
+ 'expenses',
15
+ 'earningsBeforeInterestAndTax',
16
+ 'otherIncome',
17
+ 'otherExpenses',
18
+ 'netOtherIncome',
19
+ 'netIncome',
20
+ ];
21
+ const getProfitAndLossProjectView = (filter, accountState, projectState, sectionsState, profitAndLossProjectViewState) => {
22
+ const fetchState = (0, reduceFetchState_1.reduceFetchStateParallelTimeframes)([
23
+ profitAndLossProjectViewState.fetchState.month,
24
+ profitAndLossProjectViewState.fetchState.quarter,
25
+ profitAndLossProjectViewState.fetchState.year,
26
+ ]);
27
+ const reportId = 'profit_and_loss_by_projects';
28
+ const sections = {};
29
+ const calculatedSections = {};
30
+ if (fetchState.fetchState === 'Completed') {
31
+ profitAndLossClassesViewSelectorTypes_1.ALL_PANDL_REPORT_VIEW_SECTION_IDS.forEach((sectionId) => {
32
+ sections[`${sectionId}`] = (0, sectionProjectViewSelector_1.getSectionProjectViewReport)(accountState, projectState, sectionsState, profitAndLossProjectViewState.projectIds, {
33
+ reportId,
34
+ sectionId,
35
+ }, filter);
36
+ });
37
+ const grossProfitBalancesByPeriod = (0, getDifferenceOfBalancesGroupedByPeriod_1.getDifferenceOfBalancesGroupedByPeriod)(sections['income'].sectionBalancesTotalByPeriod, sections['cogs'].sectionBalancesTotalByPeriod);
38
+ calculatedSections['grossProfit'] = (0, coaBalance_1.getCOABalances)(grossProfitBalancesByPeriod, filter);
39
+ const ebitBalancesByPeriod = (0, getDifferenceOfBalancesGroupedByPeriod_1.getDifferenceOfBalancesGroupedByPeriod)(grossProfitBalancesByPeriod, sections['expenses'].sectionBalancesTotalByPeriod);
40
+ calculatedSections['earningsBeforeInterestAndTax'] = (0, coaBalance_1.getCOABalances)(ebitBalancesByPeriod, filter);
41
+ const netOtherIncomeBalances = (0, getDifferenceOfBalancesGroupedByPeriod_1.getDifferenceOfBalancesGroupedByPeriod)(sections['otherIncome'].sectionBalancesTotalByPeriod, sections['otherExpenses'].sectionBalancesTotalByPeriod);
42
+ calculatedSections['netOtherIncome'] = (0, coaBalance_1.getCOABalances)(netOtherIncomeBalances, filter);
43
+ const netIncomeBalances = netOtherIncomeBalances != null
44
+ ? (0, getSumOfBalancesGroupedByPeriod_1.getSumOfBalancesByGroupedByPeriod)([
45
+ ebitBalancesByPeriod,
46
+ netOtherIncomeBalances,
47
+ ])
48
+ : ebitBalancesByPeriod;
49
+ calculatedSections['netIncome'] = (0, coaBalance_1.getCOABalances)(netIncomeBalances, filter);
50
+ }
51
+ return {
52
+ sections,
53
+ calculatedSections,
54
+ reportId: profitAndLossProjectViewState.reportId,
55
+ reportTitle: profitAndLossProjectViewState.reportTitle,
56
+ firstMonthOfFY: profitAndLossProjectViewState.firstMonthOfFY,
57
+ dataAvailable: profitAndLossProjectViewState.dataAvailable,
58
+ bookCloseDate: profitAndLossProjectViewState.bookCloseDate,
59
+ version: profitAndLossProjectViewState.version,
60
+ status: profitAndLossProjectViewState.status,
61
+ fetchState: fetchState.fetchState,
62
+ error: fetchState.error,
63
+ filter,
64
+ uiState: profitAndLossProjectViewState.uiState,
65
+ projectIds: profitAndLossProjectViewState.projectIds,
66
+ projectsToFilterOut: profitAndLossProjectViewState.uiState.projectsToFilterOut,
67
+ idsInOrder: exports.profitAndLossProjectIdsInOrder,
68
+ };
69
+ };
70
+ exports.getProfitAndLossProjectView = getProfitAndLossProjectView;
@@ -0,0 +1,18 @@
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 { PandLReportViewCalculatedSectionID, PandLReportViewSectionID } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
8
+ import { ProfitAndLossProjectViewUIState } from './profitAndLossProjectViewState';
9
+ export interface ProfitAndLossProjectViewReport extends SelectorReport {
10
+ calculatedSections: Record<PandLReportViewCalculatedSectionID, CalculatedSection>;
11
+ filter: COABalancesFilterProjectView;
12
+ idsInOrder: (PandLReportViewSectionID | PandLReportViewCalculatedSectionID)[];
13
+ projectIds: ID[];
14
+ projectsToFilterOut: ID[];
15
+ sections: Record<PandLReportViewSectionID, SectionProjectViewReport>;
16
+ uiState: ProfitAndLossProjectViewUIState;
17
+ dataAvailable?: DataAvailable;
18
+ }
@@ -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" | "excluded_account_reconciliation";
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";
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" | "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" | "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";
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"], {
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";
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) => "companyName" | "notes" | "uncategorized" | "auditScore" | "miscategorized" | "warnings" | "vendorReview" | "reviewVendor";
6
+ export declare const toReviewColumnKeyType: (v: string) => "uncategorized" | "companyName" | "auditScore" | "miscategorized" | "notes" | "warnings" | "vendorReview" | "reviewVendor";
7
7
  export type ReviewCompanyColumnKey = ReturnType<typeof toReviewColumnKeyType>;
8
8
  export type ReviewTransactionsType = 'income' | 'expense';
9
9
  export interface AuditSummary {
@@ -21,7 +21,7 @@ export declare const fetchBillList: import("@reduxjs/toolkit").ActionCreatorWith
21
21
  period: TimePeriod;
22
22
  tab: "paid" | "pending_approval" | "scheduled" | "draft";
23
23
  error: ZeniAPIStatus<Record<string, unknown>>;
24
- }, "billList/updateBillListFailure", never, never>, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", "billList/updateTab">, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline", "billList/updateSubTab">, updateSelectedBillId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "billList/updateSelectedBillId">, clearBillList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"billList/clearBillList">, updateBillDetailSaveBillCode: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SaveBillStageCode, "billList/updateBillDetailSaveBillCode">, updateBillListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
24
+ }, "billList/updateBillListFailure", never, never>, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", "billList/updateTab">, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline", "billList/updateSubTab">, updateSelectedBillId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "billList/updateSelectedBillId">, clearBillList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"billList/clearBillList">, updateBillDetailSaveBillCode: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SaveBillStageCode, "billList/updateBillDetailSaveBillCode">, updateBillListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
25
25
  period: TimePeriod;
26
26
  uiState: Partial<BillListUIState>;
27
27
  }, "billList/updateBillListUIState">, updateSearchResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "billList/updateSearchResult">, updateFilterResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -35,7 +35,7 @@ export type SaveBillStageCode = 'draft' | 'pending_approval' | undefined;
35
35
  export declare const ALL_BILL_TABS: readonly ["paid", "pending_approval", "scheduled", "draft"];
36
36
  declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft";
37
37
  export type BillTab = ReturnType<typeof toBillTabType>;
38
- declare const toBillsSubTabType: (v: string) => "failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
38
+ declare const toBillsSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
39
39
  export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
40
40
  declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceNumber" | "invoiceDate";
41
41
  export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
@@ -42,7 +42,7 @@ interface TwoFAState {
42
42
  otpChallenge?: string;
43
43
  phone?: string;
44
44
  }
45
- export declare const toChargeCardTransactionSortKeyType: (v: string) => "amount" | "type" | "merchant" | "paymentDate" | "receipts";
45
+ export declare const toChargeCardTransactionSortKeyType: (v: string) => "amount" | "type" | "receipts" | "merchant" | "paymentDate";
46
46
  export declare type ChargeCardTransactionSortKey = ReturnType<typeof toChargeCardTransactionSortKeyType>;
47
47
  export interface ChargeCardDetailTransactionList extends FetchStateAndError {
48
48
  isViewReceiptClickedImmediatelyAfterUploadTransactionId: Record<ID, boolean>;
@@ -52,12 +52,12 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
52
52
  chargeCardId: ID;
53
53
  fetchState: FetchState;
54
54
  error?: ZeniAPIStatus;
55
- }, "chargeCardDetail/updatePhysicalChargeCardAttemptSuccessOrFailure">, updatePhysicalChargeCardAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
55
+ }, "chargeCardDetail/updatePhysicalChargeCardAttemptSuccessOrFailure">, updatePhysicalChargeCardAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "success" | "failed"], {
56
56
  chargeCardId: string;
57
- statusCode: "failed" | "success";
58
- }, "chargeCardDetail/updatePhysicalChargeCardAttempt", never, never>, updateDebitCardPinAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
57
+ statusCode: "success" | "failed";
58
+ }, "chargeCardDetail/updatePhysicalChargeCardAttempt", never, never>, updateDebitCardPinAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "success" | "failed"], {
59
59
  chargeCardId: string;
60
- statusCode: "failed" | "success";
60
+ statusCode: "success" | "failed";
61
61
  }, "chargeCardDetail/updateDebitCardPinAttempt", never, never>, updateDebitCardPinAttemptSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
62
62
  chargeCardId: ID;
63
63
  fetchState: FetchState;
@@ -27,7 +27,7 @@ export declare const fetchRemiList: import("@reduxjs/toolkit").ActionCreatorWith
27
27
  }, "remiList/updateRemiListFailure", never, never>, updateRemiListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
28
28
  period: TimePeriod;
29
29
  uiState: Partial<RemiListUIState>;
30
- }, "remiList/updateRemiListUIState">, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", "remiList/updateTab">, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval", "remiList/updateSubTab">, updateSelectedRemiId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "remiList/updateSelectedRemiId">, clearRemiList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"remiList/clearRemiList">, updateRemiDetailSaveRemiCode: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SaveRemiStageCode, "remiList/updateRemiDetailSaveRemiCode">, updateSearchResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "remiList/updateSearchResult">, updateFilterResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
30
+ }, "remiList/updateRemiListUIState">, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", "remiList/updateTab">, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval", "remiList/updateSubTab">, updateSelectedRemiId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "remiList/updateSelectedRemiId">, clearRemiList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"remiList/clearRemiList">, updateRemiDetailSaveRemiCode: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SaveRemiStageCode, "remiList/updateRemiDetailSaveRemiCode">, updateSearchResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "remiList/updateSearchResult">, updateFilterResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
31
31
  filters: ReimbursementFilters;
32
32
  }, "remiList/updateFilterResult">, updateRemiListDownloadUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
33
33
  uiState: Partial<RemiListDownloadUIState>;
@@ -33,10 +33,10 @@ export declare const ALL_REMI_TABS: readonly ["paid", "pending_approval", "sched
33
33
  export declare const toRemiTabType: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft";
34
34
  export declare const toRemiTabTypeStrict: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft" | undefined;
35
35
  export type RemiTabType = ReturnType<typeof toRemiTabType>;
36
- export declare const toRemiSubTabType: (v: string) => "failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval";
37
- export declare const toRemiSubTabTypeStrict: (v: string) => "failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval" | undefined;
36
+ export declare const toRemiSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval";
37
+ export declare const toRemiSubTabTypeStrict: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval" | undefined;
38
38
  export type RemiSubTabType = ReturnType<typeof toRemiSubTabType>;
39
- export declare const toRemiSubTabUnderScoreType: (v: string) => "failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
39
+ export declare const toRemiSubTabUnderScoreType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
40
40
  export type RemiSubTabUnderScoreType = ReturnType<typeof toRemiSubTabUnderScoreType>;
41
41
  declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "createdBy" | "submittedOn" | "reportName";
42
42
  export type ReimbursementViewSortKey = ReturnType<typeof toReimbursementSortKeyType>;
@@ -1,4 +1,4 @@
1
- export declare const toSubscriptionSortKeyType: (v: string) => "status" | "companyName" | "controller" | "plans" | "planLowerLimit" | "planHigherLimit" | "avg2MonthExpenses" | "addons" | "upgradeStatus" | "monthlyRecurringRevenue" | "notes";
1
+ export declare const toSubscriptionSortKeyType: (v: string) => "status" | "controller" | "avg2MonthExpenses" | "companyName" | "monthlyRecurringRevenue" | "notes" | "plans" | "planLowerLimit" | "planHigherLimit" | "addons" | "upgradeStatus";
2
2
  export type SubscriptionViewSortKey = ReturnType<typeof toSubscriptionSortKeyType>;
3
3
  export declare const SUBSCRIPTION_STATUS_CODES: string[];
4
4
  declare const toSubscriptionStatusCodeType: (v: string) => string;
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getTasksCardReport: (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" | "excluded_account_reconciliation";
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";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
4
4
  import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
5
5
  import { TopExState } from './topExState';
6
6
  export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
7
- 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" | "excluded_account_reconciliation";
7
+ 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";
8
8
  reportTitle: string;
9
9
  version: string | number | undefined;
10
10
  status: import("../..").Status | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.20.3-betaRD21",
3
+ "version": "4.20.3-betaRD3",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -1,44 +0,0 @@
1
- import { AiAccountantCustomer, AiAccountantEnrollment, AiAccountantJob } from './aiAccountantCustomerState';
2
- export interface AiAccountantEnrollmentPayload {
3
- status: string;
4
- accuracy?: Record<string, number>;
5
- latest_training?: string;
6
- latest_transaction_sync?: string;
7
- offboarded_at?: string;
8
- offboarded_by?: string;
9
- onboarded_at?: string;
10
- onboarded_by?: string;
11
- validation_results?: Array<{
12
- accuracy: number;
13
- model_type: string;
14
- passed: boolean;
15
- threshold: number;
16
- }>;
17
- }
18
- export interface AiAccountantCustomerPayload {
19
- company_id: string;
20
- company_name: string;
21
- tenant_id: string;
22
- bookclose_date?: string;
23
- enrollment?: AiAccountantEnrollmentPayload | null;
24
- }
25
- export interface AiAccountantJobPayload {
26
- company_id: string;
27
- created_at: string;
28
- job_id: string;
29
- operation_type: string;
30
- status: string;
31
- tenant_id: string;
32
- triggered_by: string;
33
- company_namespace?: string;
34
- completed_at?: string;
35
- error_message?: string;
36
- parameters?: Record<string, unknown>;
37
- retry_count?: number;
38
- started_at?: string;
39
- steps?: Array<Record<string, unknown>>;
40
- validation_results?: Array<Record<string, unknown>>;
41
- }
42
- export declare const toAiAccountantEnrollment: (payload: AiAccountantEnrollmentPayload) => AiAccountantEnrollment;
43
- export declare const toAiAccountantCustomer: (payload: AiAccountantCustomerPayload) => AiAccountantCustomer;
44
- export declare const toAiAccountantJob: (payload: AiAccountantJobPayload) => AiAccountantJob;
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toAiAccountantJob = exports.toAiAccountantCustomer = exports.toAiAccountantEnrollment = void 0;
4
- const zeniDayJS_1 = require("../../zeniDayJS");
5
- const aiAccountantCustomerState_1 = require("./aiAccountantCustomerState");
6
- // ── Mapping functions (payload → state) ──
7
- const toAiAccountantEnrollment = (payload) => ({
8
- status: (0, aiAccountantCustomerState_1.toAiAccountantEnrollmentStatus)(payload.status),
9
- accuracy: payload.accuracy,
10
- latestTraining: payload.latest_training != null
11
- ? (0, zeniDayJS_1.date)(payload.latest_training)
12
- : undefined,
13
- latestTransactionSync: payload.latest_transaction_sync != null
14
- ? (0, zeniDayJS_1.date)(payload.latest_transaction_sync)
15
- : undefined,
16
- offboardedAt: payload.offboarded_at != null ? (0, zeniDayJS_1.date)(payload.offboarded_at) : undefined,
17
- offboardedBy: payload.offboarded_by,
18
- onboardedAt: payload.onboarded_at != null ? (0, zeniDayJS_1.date)(payload.onboarded_at) : undefined,
19
- onboardedBy: payload.onboarded_by,
20
- validationResults: payload.validation_results?.map((vr) => ({
21
- accuracy: vr.accuracy,
22
- modelType: vr.model_type,
23
- passed: vr.passed,
24
- threshold: vr.threshold,
25
- })),
26
- });
27
- exports.toAiAccountantEnrollment = toAiAccountantEnrollment;
28
- const toAiAccountantCustomer = (payload) => ({
29
- companyId: payload.company_id,
30
- companyName: payload.company_name,
31
- tenantId: payload.tenant_id,
32
- bookcloseDate: payload.bookclose_date != null ? (0, zeniDayJS_1.date)(payload.bookclose_date) : undefined,
33
- enrollment: payload.enrollment != null
34
- ? (0, exports.toAiAccountantEnrollment)(payload.enrollment)
35
- : undefined,
36
- });
37
- exports.toAiAccountantCustomer = toAiAccountantCustomer;
38
- const toAiAccountantJob = (payload) => ({
39
- companyId: payload.company_id,
40
- createdAt: (0, zeniDayJS_1.date)(payload.created_at),
41
- jobId: payload.job_id,
42
- operationType: (0, aiAccountantCustomerState_1.toAiAccountantOperationType)(payload.operation_type),
43
- status: (0, aiAccountantCustomerState_1.toAiAccountantJobStatus)(payload.status),
44
- tenantId: payload.tenant_id,
45
- triggeredBy: payload.triggered_by,
46
- companyNamespace: payload.company_namespace,
47
- completedAt: payload.completed_at != null ? (0, zeniDayJS_1.date)(payload.completed_at) : undefined,
48
- errorMessage: payload.error_message,
49
- parameters: payload.parameters,
50
- retryCount: payload.retry_count,
51
- startedAt: payload.started_at != null ? (0, zeniDayJS_1.date)(payload.started_at) : undefined,
52
- steps: payload.steps,
53
- validationResults: payload.validation_results,
54
- });
55
- exports.toAiAccountantJob = toAiAccountantJob;
@@ -1,10 +0,0 @@
1
- import { AiAccountantCustomerPayload, AiAccountantJobPayload } from './aiAccountantCustomerPayload';
2
- import { AiAccountantCustomerState } from './aiAccountantCustomerState';
3
- export declare const initialAiAccountantCustomerState: AiAccountantCustomerState;
4
- export declare const clearAllAiAccountantCustomers: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiAccountantCustomer/clearAllAiAccountantCustomers">, updateAiAccountantCustomers: import("@reduxjs/toolkit").ActionCreatorWithPayload<AiAccountantCustomerPayload[], "aiAccountantCustomer/updateAiAccountantCustomers">, updateAiAccountantCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<AiAccountantCustomerPayload, "aiAccountantCustomer/updateAiAccountantCustomer">, updateAiAccountantJobs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, jobs: AiAccountantJobPayload[], append?: boolean | undefined], {
5
- tenantId: string;
6
- jobs: AiAccountantJobPayload[];
7
- append: boolean;
8
- }, "aiAccountantCustomer/updateAiAccountantJobs", never, never>;
9
- declare const _default: import("redux").Reducer<AiAccountantCustomerState>;
10
- export default _default;