@zeniai/client-epic-state 5.0.52 → 5.0.53-betaML3

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 (124) hide show
  1. package/lib/commonStateTypes/recommendationBase.d.ts +2 -1
  2. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  3. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  4. package/lib/entity/account/accountState.d.ts +1 -1
  5. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  6. package/lib/entity/class/classReducer.d.ts +4 -4
  7. package/lib/entity/class/classState.d.ts +1 -1
  8. package/lib/entity/forecast/forecastState.d.ts +1 -1
  9. package/lib/entity/project/projectPayload.d.ts +8 -1
  10. package/lib/entity/project/projectPayload.js +15 -1
  11. package/lib/entity/project/projectState.d.ts +4 -2
  12. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  13. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  14. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  15. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
  16. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
  17. package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
  18. package/lib/entity/tenant/clearAllEpic.js +2 -0
  19. package/lib/entity/transaction/payloadTypes/transactionLinePayload.d.ts +2 -0
  20. package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +9 -0
  21. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +2 -0
  22. package/lib/entity/transaction/payloadTypes/transactionPayload.js +6 -0
  23. package/lib/entity/transaction/stateTypes/transaction.d.ts +2 -0
  24. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +2 -0
  25. package/lib/epic.d.ts +4 -1
  26. package/lib/epic.js +5 -1
  27. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  28. package/lib/esm/entity/project/projectPayload.js +12 -0
  29. package/lib/esm/entity/tenant/clearAllEpic.js +2 -0
  30. package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +9 -0
  31. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +6 -0
  32. package/lib/esm/epic.js +5 -1
  33. package/lib/esm/index.js +11 -7
  34. package/lib/esm/reducer.js +3 -0
  35. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +8 -0
  36. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +3 -0
  37. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +1 -0
  38. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +11 -2
  39. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +100 -31
  40. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -2
  41. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +1 -0
  42. package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +44 -0
  43. package/lib/esm/view/projectList/fetchProjectListEpic.js +38 -0
  44. package/lib/esm/view/projectList/projectListPayload.js +1 -0
  45. package/lib/esm/view/projectList/projectListReducer.js +39 -0
  46. package/lib/esm/view/projectList/projectListSelector.js +9 -0
  47. package/lib/esm/view/projectList/projectListState.js +1 -0
  48. package/lib/esm/view/recommendation/fetchEntityRecommendationsForCategorizationEpic.js +83 -0
  49. package/lib/esm/view/recommendation/recommendationReducer.js +52 -1
  50. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +1 -0
  51. package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +6 -0
  52. package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +3 -0
  53. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +14 -2
  54. package/lib/esm/view/transactionList/fetchTransactionListByProjectEpic.js +45 -0
  55. package/lib/esm/view/transactionList/parallelFetchProjectTransactionListEpic.js +32 -0
  56. package/lib/esm/view/transactionList/transactionListByProjectSelector.js +58 -0
  57. package/lib/esm/view/transactionList/transactionListReducer.js +83 -2
  58. package/lib/esm/view/transactionList/transactionListState.js +10 -0
  59. package/lib/index.d.ts +13 -9
  60. package/lib/index.js +42 -27
  61. package/lib/reducer.d.ts +3 -0
  62. package/lib/reducer.js +3 -0
  63. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  64. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  65. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  66. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  67. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  68. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  69. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  70. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  71. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +2 -1
  72. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +8 -0
  73. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +3 -0
  74. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +1 -0
  75. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -1
  76. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +11 -2
  77. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -1
  78. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +100 -31
  79. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +4 -0
  80. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +12 -1
  81. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +5 -1
  82. package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -0
  83. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  84. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  85. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +15 -1
  86. package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +45 -0
  87. package/lib/view/projectList/fetchProjectListEpic.d.ts +8 -0
  88. package/lib/view/projectList/fetchProjectListEpic.js +42 -0
  89. package/lib/view/projectList/projectListPayload.d.ts +7 -0
  90. package/lib/view/projectList/projectListPayload.js +2 -0
  91. package/lib/view/projectList/projectListReducer.d.ts +9 -0
  92. package/lib/view/projectList/projectListReducer.js +43 -0
  93. package/lib/view/projectList/projectListSelector.d.ts +8 -0
  94. package/lib/view/projectList/projectListSelector.js +13 -0
  95. package/lib/view/projectList/projectListState.d.ts +4 -0
  96. package/lib/view/projectList/projectListState.js +2 -0
  97. package/lib/view/recommendation/fetchEntityRecommendationsForCategorizationEpic.d.ts +8 -0
  98. package/lib/view/recommendation/fetchEntityRecommendationsForCategorizationEpic.js +87 -0
  99. package/lib/view/recommendation/recommendationReducer.d.ts +21 -1
  100. package/lib/view/recommendation/recommendationReducer.js +53 -2
  101. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  102. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  103. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  104. package/lib/view/topEx/topExSelector.d.ts +1 -1
  105. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +1 -0
  106. package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +2 -1
  107. package/lib/view/transactionDetail/epics/transactionDetailEpic.js +6 -0
  108. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +3 -0
  109. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +3 -0
  110. package/lib/view/transactionDetail/transactionDetailSelector.js +13 -1
  111. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -0
  112. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +2 -0
  113. package/lib/view/transactionList/fetchTransactionListByProjectEpic.d.ts +8 -0
  114. package/lib/view/transactionList/fetchTransactionListByProjectEpic.js +52 -0
  115. package/lib/view/transactionList/parallelFetchProjectTransactionListEpic.d.ts +6 -0
  116. package/lib/view/transactionList/parallelFetchProjectTransactionListEpic.js +36 -0
  117. package/lib/view/transactionList/transactionListByProjectSelector.d.ts +22 -0
  118. package/lib/view/transactionList/transactionListByProjectSelector.js +66 -0
  119. package/lib/view/transactionList/transactionListPayload.d.ts +15 -0
  120. package/lib/view/transactionList/transactionListReducer.d.ts +25 -2
  121. package/lib/view/transactionList/transactionListReducer.js +83 -2
  122. package/lib/view/transactionList/transactionListState.d.ts +15 -0
  123. package/lib/view/transactionList/transactionListState.js +13 -1
  124. package/package.json +1 -1
@@ -51,6 +51,7 @@ export const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDe
51
51
  lineDescription: lineItem.lineDescription,
52
52
  class: lineItem.class,
53
53
  account: lineItem.account,
54
+ project: lineItem.project,
54
55
  recommendation: convertCOTRecommendationsToRegular(lineItem.recommendationsWithCOT),
55
56
  };
56
57
  if (line.type === 'journal_entry_transaction_line' ||
@@ -14,6 +14,7 @@ import { fetchClassList } from '../../classList/classListReducer';
14
14
  import { getInitializedTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorLocalDataHelper';
15
15
  import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
16
16
  import { fetchOwnerList } from '../../ownerList/ownerListReducer';
17
+ import { fetchProjectList } from '../../projectList/projectListReducer';
17
18
  import { fetchTransactionDetail, initializeTransactionDetailLocalData, removeTransactionDetail, updateTransactionDetailFetchState, } from '../transactionDetailReducer';
18
19
  import { getAllLinkedTransactions, getTransactionDetailKey, } from '../transactionDetailState';
19
20
  export const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchTransactionDetail.match), mergeMap((action) => {
@@ -39,6 +40,11 @@ export const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions
39
40
  classList.fetchState !== 'In-Progress') {
40
41
  transactionActions.push(fetchClassList());
41
42
  }
43
+ const projectList = state$.value.projectListState;
44
+ if (projectList.hasValidState() === false &&
45
+ projectList.fetchState !== 'In-Progress') {
46
+ transactionActions.push(fetchProjectList());
47
+ }
42
48
  transactionActions.push(updateTransactionDetailFetchState(transactionId, 'In-Progress'));
43
49
  const query = { transaction_type: transactionId.type };
44
50
  const getTransactionDetail$ = zeniAPI
@@ -181,6 +181,9 @@ const toTransactionUpdatePayload = (updates, detail, cotTransactionTracking, ven
181
181
  if (lineUpdates.account != null) {
182
182
  lineTobeUpdated.account = lineUpdates.account;
183
183
  }
184
+ if (lineUpdates.project != null) {
185
+ lineTobeUpdated.project = lineUpdates.project;
186
+ }
184
187
  if (lineUpdates.customer != null) {
185
188
  lineTobeUpdated.customer = lineUpdates.customer;
186
189
  }
@@ -1,6 +1,6 @@
1
1
  import recordGet from 'lodash/get';
2
2
  import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
3
- import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
3
+ import { getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, } from '../../entity/tenant/tenantSelector';
4
4
  import { toTransactionTypeStrict } from '../../entity/transaction/stateTypes/transactionType';
5
5
  import { getTransactionWithCOT } from '../../entity/transaction/transactionHelper';
6
6
  import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
@@ -8,9 +8,10 @@ import { getVendorsByVendorIds } from '../../entity/vendor/vendorSelector';
8
8
  import { dateNow } from '../../zeniDayJS';
9
9
  import { getAccountList, getNestedAccountListHierarchy, } from '../accountList/accountListSelector';
10
10
  import { getClassList, getNestedClassListHierarchy, } from '../classList/classListSelector';
11
+ import { getProjectList, } from '../projectList/projectListSelector';
11
12
  import { getAllLinkedTransactions, getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
12
13
  export const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
13
- const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, } = state;
14
+ const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, projectState, projectListState, } = state;
14
15
  const detailKey = getTransactionDetailKey(transactionId);
15
16
  const transactionDetail = recordGet(transactionDetailState.transactionDetailById, detailKey);
16
17
  let fetchState = {
@@ -56,6 +57,15 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
56
57
  const classList = isAccountingClassesEnabled
57
58
  ? getClassList(classState, classListState)
58
59
  : { classes: [], nestedClassHierarchy: [], fetchState: 'Completed', error: undefined, version: 0 };
60
+ const isAccountingProjectsEnabled = getIsAccountingProjectsEnabled(state);
61
+ const projectList = isAccountingProjectsEnabled
62
+ ? getProjectList(projectState, projectListState)
63
+ : {
64
+ projects: [],
65
+ fetchState: 'Completed',
66
+ error: undefined,
67
+ version: 0,
68
+ };
59
69
  const accountsHierarchyList = getNestedAccountListHierarchy(accountListState, 'accountList');
60
70
  const classHierarchyList = isAccountingClassesEnabled
61
71
  ? getNestedClassListHierarchy(classListState)
@@ -78,6 +88,8 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
78
88
  accountsHierarchyList,
79
89
  classList: classList,
80
90
  isAccountingClassesEnabled,
91
+ isAccountingProjectsEnabled,
92
+ projectList,
81
93
  isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
82
94
  transactionDetailLocalData: transactionDetail?.transactionDetailLocalData ??
83
95
  initialSupportedTransactionDetail.transactionDetailLocalData,
@@ -0,0 +1,45 @@
1
+ import { toBase64 } from 'js-base64';
2
+ import lodashGet from 'lodash/get';
3
+ import { from, of } from 'rxjs';
4
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
5
+ import { toString } from '../../commonStateTypes/timePeriod';
6
+ import { updateTransactions } from '../../entity/transaction/transactionReducer';
7
+ import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
8
+ import { fetchProjectTransactionList, updateTransactionListByProject, updateTransactionListByProjectFailure, } from './transactionListReducer';
9
+ import { getProjectAcTranKey } from './transactionListState';
10
+ export const fetchTransactionListByProjectEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchProjectTransactionList.match), mergeMap((action) => {
11
+ const state = state$.value;
12
+ const key = getProjectAcTranKey(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period);
13
+ const projectTransactions = lodashGet(state.transactionListState.byProject.transactionListByProjectKey, key, undefined);
14
+ if (action.payload.cacheOverride === true ||
15
+ projectTransactions == null ||
16
+ projectTransactions.hasValidState() === false) {
17
+ const queryParam = {
18
+ start_date: toString(action.payload.period.start),
19
+ end_date: toString(action.payload.period.end),
20
+ sort_by: 'create_time',
21
+ sort_order: 'desc',
22
+ account_id: action.payload.accountId,
23
+ account_type: action.payload.accountType,
24
+ zeni_project_id: action.payload.projectId,
25
+ };
26
+ const base64AccountId = toBase64(action.payload.accountId);
27
+ return zeniAPI
28
+ .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accounts/${base64AccountId}/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
29
+ .pipe(mergeMap((response) => {
30
+ if (isSuccessResponse(response) && response.data != null) {
31
+ const updateActions = [];
32
+ updateActions.push(updateTransactions(response.data.account.transactions, (value) => value.transaction_id));
33
+ updateActions.push(updateTransactionListByProject(response.data));
34
+ return from(updateActions);
35
+ }
36
+ else {
37
+ return of(updateTransactionListByProjectFailure(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period, response.status));
38
+ }
39
+ }), catchError((error) => of(updateTransactionListByProjectFailure(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period, createZeniAPIStatus('Unexpected Error', 'fetch transaction list REST API call errored out' +
40
+ JSON.stringify(error))))));
41
+ }
42
+ else {
43
+ return from([]);
44
+ }
45
+ }));
@@ -0,0 +1,32 @@
1
+ import { from } from 'rxjs';
2
+ import { filter, mergeMap } from 'rxjs/operators';
3
+ import { splitPeriod } from './parallelFetchClassTransactionListEpic';
4
+ import { fetchProjectTransactionList, parallelFetchProjectTransactionList, } from './transactionListReducer';
5
+ import { getProjectAcTranKey, } from './transactionListState';
6
+ export const parallelFetchProjectTransactionListEpic = (actions$, state$) => actions$.pipe(filter(parallelFetchProjectTransactionList.match), mergeMap((action) => {
7
+ const state = state$.value.transactionListState;
8
+ const timePeriods = splitPeriod(action.payload.period);
9
+ const filteredTimePeriods = timePeriods.filter((value) => {
10
+ if (action.payload.cacheOverride === false) {
11
+ return (isDataAvailableOrFetching(state.byProject, action.payload.accountId, action.payload.accountType, action.payload.projectId, value) === false);
12
+ }
13
+ else {
14
+ return true;
15
+ }
16
+ });
17
+ if (filteredTimePeriods.length > 12) {
18
+ console.error('Only maximum 12 parallel fetch are allowed!');
19
+ return from([]);
20
+ }
21
+ else {
22
+ const fetchActions = filteredTimePeriods.map((period) => fetchProjectTransactionList(action.payload.accountId, action.payload.accountType, action.payload.projectId, period, true));
23
+ return from(fetchActions);
24
+ }
25
+ }));
26
+ function isDataAvailableOrFetching(state, accountId, accountType, projectId, period) {
27
+ const key = getProjectAcTranKey(accountId, accountType, projectId, period);
28
+ const projectTransactions = state.transactionListByProjectKey[key];
29
+ return (projectTransactions != null &&
30
+ (projectTransactions.fetchState === 'In-Progress' ||
31
+ projectTransactions.hasValidState()));
32
+ }
@@ -0,0 +1,58 @@
1
+ import flatMap from 'lodash/flatMap';
2
+ import recordGet from 'lodash/get';
3
+ import orderBy from 'lodash/orderBy';
4
+ import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
5
+ import { splitPeriod } from './parallelFetchAccountTransactionListEpic';
6
+ import { isAnyFetchCompleted, reduceFetchState, } from './reduceTransactionListFetchState';
7
+ import { getProjectAcKey, getProjectAcTranKey, } from './transactionListState';
8
+ export const getTransactionListByProject = (transactionState, transactionListState, accountId, accountType, projectId, timeframe, filterByTimePeriod) => {
9
+ const timePeriods = splitPeriod(filterByTimePeriod); // Note: Split by months.
10
+ const accountTransactions = timePeriods
11
+ .map((thisTimePeriod) => {
12
+ const key = getProjectAcTranKey(accountId, accountType, projectId, thisTimePeriod);
13
+ return recordGet(transactionListState.byProject.transactionListByProjectKey, key, undefined);
14
+ })
15
+ .filter((acTransaction) => acTransaction != null);
16
+ let account = undefined;
17
+ if (accountTransactions.length > 0) {
18
+ account = accountTransactions[0].account;
19
+ }
20
+ const fetchState = reduceFetchState(accountTransactions);
21
+ let transactions = [];
22
+ if (isAnyFetchCompleted(accountTransactions)) {
23
+ const allTransactionIDs = flatMap(accountTransactions, (value) => value.transactionIDs);
24
+ const transactionsUnsorted = allTransactionIDs
25
+ .map((transactionId) => getSupportedTransactionById(transactionState, transactionId))
26
+ .filter((value) => {
27
+ if (value == null) {
28
+ console.error("Can't have null transaction at this stage!");
29
+ }
30
+ return value != null;
31
+ });
32
+ transactions = orderBy(transactionsUnsorted, (value) => value.date.valueOf(), 'desc');
33
+ }
34
+ const key = getProjectAcKey(accountId, accountType, projectId);
35
+ const uiState = recordGet(transactionListState.byProject.transactionListUIStateByProjectKey, key, {});
36
+ return {
37
+ reportId: 'transaction_list_of_account_by_project',
38
+ reportTitle: 'Transaction List of Account By Project',
39
+ version: 1,
40
+ status: undefined,
41
+ fetchState: fetchState.fetchState,
42
+ error: fetchState.error,
43
+ timeframe,
44
+ filterByTimePeriod,
45
+ accountId,
46
+ accountType,
47
+ projectId,
48
+ account,
49
+ transactionOrder: 'descending_transaction_date',
50
+ transactions,
51
+ uiState,
52
+ latestTransactionId: transactionListState.latestTransactionId,
53
+ };
54
+ };
55
+ export const getTransactionListUIStateByProjectKey = (transactionListState, accountId, accountType, projectId) => {
56
+ const key = getProjectAcKey(accountId, accountType, projectId);
57
+ return recordGet(transactionListState.byProject.transactionListUIStateByProjectKey, key, undefined);
58
+ };
@@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
2
2
  import { toAbsoluteDay } from '../../commonStateTypes/timePeriod';
3
3
  import { mapAccountBasePayloadToAccountBase } from '../../entity/account/accountPayload';
4
4
  import { toEntityType } from '../../entity/genericEntity/entity';
5
- import { accountTransactionsInitialState, getAcKey, getAcTranKey, getCategoryTypeTranKey, getClassAcKey, getClassAcTranKey, getEntityTranKey, initialClassTransactionState, initialEntityTransactionState, initialTransactionsStateByCategoryType, } from './transactionListState';
5
+ import { accountTransactionsInitialState, getAcKey, getAcTranKey, getCategoryTypeTranKey, getClassAcKey, getClassAcTranKey, getEntityTranKey, getProjectAcKey, getProjectAcTranKey, initialClassTransactionState, initialEntityTransactionState, initialProjectTransactionState, initialTransactionsStateByCategoryType, } from './transactionListState';
6
6
  export const initialState = {
7
7
  byAccount: {
8
8
  transactionListByAccountKey: {},
@@ -37,6 +37,10 @@ export const initialState = {
37
37
  transactionListByClassKey: {},
38
38
  transactionListUIStateByClassKey: {},
39
39
  },
40
+ byProject: {
41
+ transactionListByProjectKey: {},
42
+ transactionListUIStateByProjectKey: {},
43
+ },
40
44
  };
41
45
  const transactionList = createSlice({
42
46
  name: 'transactionList',
@@ -246,6 +250,64 @@ const transactionList = createSlice({
246
250
  return { payload: { accountId, accountType, classId, period, error } };
247
251
  },
248
252
  },
253
+ // Transaction list by project related reducers
254
+ //
255
+ // Mirrors the by-class set; the only behavioural difference is that the
256
+ // server query param is `zeni_project_id` (post-Ayon's accounting #3984
257
+ // rename) and there's no equivalent of `include_sub_class_transactions`
258
+ // — projects don't have a sub-project hierarchy in this layout yet.
259
+ parallelFetchProjectTransactionList: {
260
+ reducer() {
261
+ // Do nothing..
262
+ },
263
+ prepare(accountId, accountType, projectId, period, cacheOverride = false) {
264
+ return {
265
+ payload: { accountId, accountType, projectId, period, cacheOverride },
266
+ };
267
+ },
268
+ },
269
+ fetchProjectTransactionList: {
270
+ reducer(draft, action) {
271
+ const key = getProjectAcTranKey(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period);
272
+ if (action.payload.cacheOverride === true ||
273
+ draft.byProject.transactionListByProjectKey[key] == null ||
274
+ (draft.byProject.transactionListByProjectKey[key]?.hasValidState() ===
275
+ false &&
276
+ draft.byProject.transactionListByProjectKey[key]?.fetchState !=
277
+ 'In-Progress')) {
278
+ draft.byProject.transactionListByProjectKey[key] = {
279
+ ...initialProjectTransactionState,
280
+ fetchState: 'In-Progress',
281
+ error: undefined,
282
+ };
283
+ }
284
+ },
285
+ prepare(accountId, accountType, projectId, period, cacheOverride = false) {
286
+ return {
287
+ payload: { accountId, accountType, projectId, period, cacheOverride },
288
+ };
289
+ },
290
+ },
291
+ updateTransactionListByProject(draft, action) {
292
+ doUpdateTransactionListByProject(draft.byProject.transactionListByProjectKey, action.payload);
293
+ },
294
+ updateTransactionListByProjectUIState(draft, action) {
295
+ const key = getProjectAcKey(action.payload.accountId, action.payload.accountType, action.payload.projectId);
296
+ draft.byProject.transactionListUIStateByProjectKey[key] = Object.assign({}, draft.byProject.transactionListUIStateByProjectKey[key], action.payload.uiState);
297
+ },
298
+ updateTransactionListByProjectFailure: {
299
+ reducer(draft, action) {
300
+ const key = getProjectAcTranKey(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period);
301
+ draft.byProject.transactionListByProjectKey[key] = {
302
+ ...initialProjectTransactionState,
303
+ fetchState: 'Error',
304
+ error: action.payload.error,
305
+ };
306
+ },
307
+ prepare(accountId, accountType, projectId, period, error) {
308
+ return { payload: { accountId, accountType, projectId, period, error } };
309
+ },
310
+ },
249
311
  parallelFetchTransactionListByCategoryType: {
250
312
  reducer() {
251
313
  // Do nothing..
@@ -340,7 +402,7 @@ const transactionList = createSlice({
340
402
  },
341
403
  },
342
404
  });
343
- export const { parallelFetchAccountTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, parallelFetchEntityTransactionList, fetchEntityTransactionList, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, fetchClassTransactionList, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByClassFailure, parallelFetchTransactionListByCategoryType, fetchTransactionsListByCategoryType, updateTransactionListByCategoryType, updateTransactionsListByCategoryTypeFailure, updateTransactionListUIStateByCategoryType, clearTransactionList, updateLatestTransactionId, } = transactionList.actions;
405
+ export const { parallelFetchAccountTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, parallelFetchEntityTransactionList, fetchEntityTransactionList, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, fetchClassTransactionList, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByClassFailure, parallelFetchProjectTransactionList, fetchProjectTransactionList, updateTransactionListByProject, updateTransactionListByProjectUIState, updateTransactionListByProjectFailure, parallelFetchTransactionListByCategoryType, fetchTransactionsListByCategoryType, updateTransactionListByCategoryType, updateTransactionsListByCategoryTypeFailure, updateTransactionListUIStateByCategoryType, clearTransactionList, updateLatestTransactionId, } = transactionList.actions;
344
406
  export default transactionList.reducer;
345
407
  /**
346
408
  * Helper functions
@@ -390,3 +452,22 @@ function doUpdateTransactionListByClass(draft, payload) {
390
452
  transactionIDs,
391
453
  };
392
454
  }
455
+ function doUpdateTransactionListByProject(draft, payload) {
456
+ const transactionIDs = payload.account.transactions.map((transactionPaylod) => transactionPaylod.transaction_id);
457
+ const account = mapAccountBasePayloadToAccountBase(payload.account);
458
+ const projectId = payload.query.zeni_project_id;
459
+ const start = toAbsoluteDay(payload.query.start_date);
460
+ const end = toAbsoluteDay(payload.query.end_date);
461
+ const key = getProjectAcTranKey(account.accountId, account.accountType, projectId, {
462
+ start,
463
+ end,
464
+ });
465
+ draft[key] = {
466
+ ...initialProjectTransactionState,
467
+ fetchState: 'Completed',
468
+ error: undefined,
469
+ account: account,
470
+ projectId: projectId,
471
+ transactionIDs,
472
+ };
473
+ }
@@ -30,6 +30,16 @@ export const initialClassTransactionState = {
30
30
  return this.fetchState == 'Completed';
31
31
  },
32
32
  };
33
+ export const getProjectAcTranKey = (accountId, accountType, projectId, period) => `${accountId}-${accountType}-${projectId}-${period.start.day}_${period.start.month}_${period.start.year}_${period.end.day}_${period.end.month}_${period.end.year}`;
34
+ export const getProjectAcKey = (accountId, accountType, projectId) => `${accountId}-${accountType}-${projectId}`;
35
+ export const initialProjectTransactionState = {
36
+ transactionIDs: [],
37
+ fetchState: 'Not-Started',
38
+ error: undefined,
39
+ hasValidState() {
40
+ return this.fetchState == 'Completed';
41
+ },
42
+ };
33
43
  export const getCategoryTypeTranKey = (categoryType, period) => `${categoryType}_${period.start.day}_${period.start.month}_${period.start.year}_${period.end.day}_${period.end.month}_${period.end.year}`;
34
44
  export const initialTransactionsStateByCategoryType = {
35
45
  transactionIDs: [],
package/lib/index.d.ts CHANGED
@@ -103,7 +103,7 @@ import { ExternalNotificationData, NotificationActivityType, NotificationGroup,
103
103
  import { Logo, PaymentAccount, VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS } from './entity/paymentAccount/paymentAccountState';
104
104
  import { PaymentInstrument } from './entity/paymentInstrument/paymentInstrument';
105
105
  import { AccountingSummary, Runway } from './entity/portfolio/accountingSummary/accountingSummaryState';
106
- import { Project } from './entity/project/projectState';
106
+ import { Project, ProjectBase } from './entity/project/projectState';
107
107
  import { MilageReimbursementLine, OutofPocketReimbursementLine, Reimbursement, ReimbursementLine, ReimbursementTypeCode } from './entity/reimbursement/reimbursementState';
108
108
  import { SectionAccountsViewReport } from './entity/sectionAccountsView/sectionAccountsViewSelector';
109
109
  import { SectionClassesView as SectionClassesViewV2 } from './entity/sectionClassesViewV2/sectionClassesView';
@@ -215,6 +215,8 @@ import { getCashPosition, getCashPositionForHighlightedRange, getCashPositionFor
215
215
  import { CashPositionReport, CashPositionUIStateSelectorView } from './view/cashPosition/cashPositionSelectorTypes';
216
216
  import { fetchClassList } from './view/classList/classListReducer';
217
217
  import { ClassListSelectorView, getClassList } from './view/classList/classListSelector';
218
+ import { fetchProjectList } from './view/projectList/projectListReducer';
219
+ import { ProjectListSelectorView, getProjectList } from './view/projectList/projectListSelector';
218
220
  import { RecurringDatePickerOptions, RecurringFrequencyType, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toRecurringFrequency } from './view/common/recurringViewHelper';
219
221
  import { ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, isZeniClearingAccountReport } from './view/common/zeniClearingAccountHelper';
220
222
  import { clearTransactionVendorSaveStatus, resetTransactionVendorLocalData, saveTransactionVendor, saveTransactionVendorSuccessOrFailure, updateTransactionVendorLocalData } from './view/commonVendorView/transactionVendorView/transactionVendorViewReducer';
@@ -355,6 +357,7 @@ import { ProfitAndLossReport, getPandLReportFetchState, getProfitAndLossReport }
355
357
  import { ProfitAndLossState, ProfitAndLossUIState } from './view/profitAndLoss/profitAndLossState';
356
358
  import { getEmptyHorizontalSectionBalancesSlice } from './view/profitAndLossClassesView/horizontalSectionEmptyBalancesSlice';
357
359
  import { getProfitAndLossClassesHorizontalView } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
360
+ import { aggregateHorizontalDescendantBalances } from './view/profitAndLossClassesView/profitAndLossHorizontalEnrichment';
358
361
  import { ClassColumnDefinition, HORIZONTAL_CLASS_TOTAL_BALANCE_ID, HorizontalAccountReportData, HorizontalAccountRow, HorizontalCalculatedSection, HorizontalClassBalance, HorizontalSectionReport, HorizontalSectionTreeLayout, ProfitAndLossByClassHorizontalReport, isHorizontalAccountReportData } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
359
362
  import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateClassViewLayout, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
360
363
  import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
@@ -364,7 +367,7 @@ import { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectVie
364
367
  import { getProfitAndLossProjectView } from './view/profitAndLossProjectView/profitAndLossProjectViewSelector';
365
368
  import { ProfitAndLossProjectViewReport } from './view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes';
366
369
  import { ProfitAndLossProjectViewUIState } from './view/profitAndLossProjectView/profitAndLossProjectViewState';
367
- import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName } from './view/recommendation/recommendationReducer';
370
+ import { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForCategorization, fetchRecommendationByEntityId, fetchRecommendationByEntityName, setCategoryClassRecommendationsForCategorizationFailure } from './view/recommendation/recommendationReducer';
368
371
  import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState } from './view/referralView/referralReducer';
369
372
  import { ReferralListSelectorView, RewardsPlanCardReport, getInviteFormView, getReferralListView, getRewardsPlanCard } from './view/referralView/referralSelector';
370
373
  import { AmountStatusTypes, InviteCompanyLocalData, ReferralAmountStatus, ReferralInvitation, ReferralListViewSortKey, ReferralStatus, ReferralViewState, ReferralViewUIState, RewardsPlanData, StatusTypes, toReferralListViewSortKeyType } from './view/referralView/referralState';
@@ -569,8 +572,9 @@ import { TransactionDetailLineItemData, TransactionDetailLocalData, TransactionV
569
572
  import { TransactionListByAccountReport, getTransactionListByAccount, getTransactionListUIStateByAccountKey } from './view/transactionList/transactionListByAccountSelector';
570
573
  import { TransactionListByCategoryType, getTransactionListUIStateByCategoryType, getTransactionsListByCategoryType } from './view/transactionList/transactionListByCategoryTypeSelector';
571
574
  import { TransactionListByClassReport, getTransactionListByClass, getTransactionListUIStateByClassKey } from './view/transactionList/transactionListByClassSelector';
575
+ import { TransactionListByProjectReport, getTransactionListByProject, getTransactionListUIStateByProjectKey } from './view/transactionList/transactionListByProjectSelector';
572
576
  import { TransactionListByEntityView, getTransactionListByEntity, getTransactionListByEntityForSinglePeriod } from './view/transactionList/transactionListByEntitySelector';
573
- import { clearTransactionList, fetchAccountTransactionList, fetchEntityTransactionList, parallelFetchAccountTransactionList, parallelFetchClassTransactionList, parallelFetchEntityTransactionList, parallelFetchTransactionListByCategoryType, updateLatestTransactionId, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListUIStateByCategoryType } from './view/transactionList/transactionListReducer';
577
+ import { clearTransactionList, fetchAccountTransactionList, fetchEntityTransactionList, parallelFetchAccountTransactionList, parallelFetchClassTransactionList, parallelFetchProjectTransactionList, parallelFetchEntityTransactionList, parallelFetchTransactionListByCategoryType, updateLatestTransactionId, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByProject, updateTransactionListByProjectUIState, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListUIStateByCategoryType } from './view/transactionList/transactionListReducer';
574
578
  import { TransactionCategoryType } from './view/transactionList/transactionListState';
575
579
  import { clearTrendData, fetchExpenseTrend, fetchIncomeTrend } from './view/trend/trendReducer';
576
580
  import { TrendView, getCurrentFiscalQuarterDateRange, getTrendForEntity } from './view/trend/trendSelector';
@@ -693,8 +697,8 @@ export { fetchDashboard, getDashboard, DashboardReport, updateTreasuryVideoClose
693
697
  export { updateDashboardLayout };
694
698
  export { PandLWithForecastView, getPandLWithForecast, } from './view/profitAndLoss/pAndLWithForecast/pAndLWithForecastSelector';
695
699
  export { fetchProfitAndLoss, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, ProfitAndLossState, ProfitAndLossUIState, getProfitAndLossReport, ProfitAndLossReport, getPandLReportFetchState, fetchProfitAndLossForTimeframe, };
696
- export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, ProfitAndLossClassesViewUIState, ProfitAndLossClassesViewReport, getProfitAndLossClassesView, getEmptyHorizontalSectionBalancesSlice, getProfitAndLossClassesHorizontalView, PandLReportViewSectionID, PandLReportViewCalculatedSectionID, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, ClassViewLayout, ProfitAndLossByClassHorizontalReport, ClassColumnDefinition, HORIZONTAL_CLASS_TOTAL_BALANCE_ID, HorizontalAccountReportData, HorizontalAccountRow, HorizontalClassBalance, HorizontalSectionReport, HorizontalSectionTreeLayout, HorizontalCalculatedSection, isHorizontalAccountReportData, };
697
- export { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView, resetProfitAndLossProjectNodeCollapseState, updateProjectViewAccountViewMode, updateProjectsToFilterOut, updateProfitAndLossProjectViewUIState, ProfitAndLossProjectViewUIState, getProfitAndLossProjectView, ProfitAndLossProjectViewReport, Project, ProjectReportWithBalances, SectionProjectViewReport, };
700
+ export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, ProfitAndLossClassesViewUIState, ProfitAndLossClassesViewReport, getProfitAndLossClassesView, aggregateHorizontalDescendantBalances, getEmptyHorizontalSectionBalancesSlice, getProfitAndLossClassesHorizontalView, PandLReportViewSectionID, PandLReportViewCalculatedSectionID, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, ClassViewLayout, ProfitAndLossByClassHorizontalReport, ClassColumnDefinition, HORIZONTAL_CLASS_TOTAL_BALANCE_ID, HorizontalAccountReportData, HorizontalAccountRow, HorizontalClassBalance, HorizontalSectionReport, HorizontalSectionTreeLayout, HorizontalCalculatedSection, isHorizontalAccountReportData, };
701
+ export { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView, resetProfitAndLossProjectNodeCollapseState, updateProjectViewAccountViewMode, updateProjectsToFilterOut, updateProfitAndLossProjectViewUIState, ProfitAndLossProjectViewUIState, getProfitAndLossProjectView, ProfitAndLossProjectViewReport, Project, ProjectBase, ProjectReportWithBalances, SectionProjectViewReport, };
698
702
  export { AccountingProviderAttachmentSelector, getAccountingProviderAttachment };
699
703
  export { fetchUserListByType, getUserList, UserListSelectorView };
700
704
  export { fetchAllPeopleRequiredViews, fetchPeoplePage, fetchPeople, deletePerson, resendInvite, changeZeniPersonRoles, invitePeople, inviteZeniPeople, updatePeopleUIState, peopleSaveUpdates, resetUpdateErrorMessage, peopleSaveDataInLocalStore, peopleClearDataInLocalStore, PeopleSelectorView, PeopleLocalDataView, Person, getPeople, getPeopleLocalData, PeopleState, PersonUpdateType, PeoplePageMode, ZeniPersonUserRoleType, PeopleUIState, PeopleLocalData, initializeEditPerson, };
@@ -717,12 +721,12 @@ export { VendorTransaction, VendorTransactionWithCOT, isVendorTransaction, Vendo
717
721
  export { TransferTransaction, isTransferTransaction };
718
722
  export { MatchedTransaction };
719
723
  export { SupportedTransaction, SupportedTransactionWithCOT, SupportedTransactionPayload, getSupportedTransactionById, };
720
- export { clearTransactionList, updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass, updateTransactionListUIStateByCategoryType, parallelFetchTransactionListByCategoryType, };
724
+ export { clearTransactionList, updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass, parallelFetchProjectTransactionList, updateTransactionListByProjectUIState, updateTransactionListByProject, updateTransactionListUIStateByCategoryType, parallelFetchTransactionListByCategoryType, };
721
725
  export { TransactionListByAccountReport, getTransactionListByAccount, getTransactionListUIStateByAccountKey, };
722
726
  export { fetchEntityTransactionList, updateTransactionListByEntity, saveTransactionDetailLocalData, clearTransactionDetailSaveStatus, updateTransactionListByEntityFailure, resetLineItemsCategoryClassInLocalData, setAllLineItemsToCategoryClassInLocalData, saveTransactionDetail, setAllLineItemsLocalDataIsUpdateAllChecked, initializeTransactionDetailLocalData, removeEntityRecommendationForLineIdForTransactionDetail, updateSelectedVendor, updateSelectedCustomer, resetSelectedCustomer, resetVendor, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateVendorToAllLineItems, resetAllLineItemsToVendor, updateLatestSelectedEntity, updateVendorBulkRecommendationsFetchStatus, setIsVendorUpdateAllChecked, };
723
727
  export { TransactionUpdates, downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentSuccess, downloadAccountingProviderAttachmentFailure, fetchTransactionDetail, updateTransactionDetail, uploadMissingAttachmentSuccess, deleteTransactionAttachment, getThirdPartyIdFromTransactionId, };
724
728
  export { TransactionListByEntityView, getTransactionListByEntity };
725
- export { TransactionListByClassReport, getTransactionListByClass, getTransactionListUIStateByClassKey, getTransactionListByEntityForSinglePeriod, };
729
+ export { TransactionListByClassReport, getTransactionListByClass, getTransactionListUIStateByClassKey, TransactionListByProjectReport, getTransactionListByProject, getTransactionListUIStateByProjectKey, getTransactionListByEntityForSinglePeriod, };
726
730
  export { TransactionDetailReport, getTransactionDetail, getTransactionDetailForTransaction, VendorDetailsView, getInitialUpdatablePeriodsForTransactionRecommendations as getUpdatablePeriodsForTransactionRecommendations, };
727
731
  export { getInsights, fetchInsightsCard, updateSelectedInsightIndex, InsightsView, };
728
732
  export { fetchForecastList } from './view/forecastList/forecastListReducer';
@@ -786,7 +790,7 @@ export { fetchVendorsList, updateScrollYOffset, fetchVendorsFiling1099All, fetch
786
790
  export { W9FormProcessingPayload, W9Form, updateW9FormUploadFetchState, updateW9FormUploadFile, getVendorUploadDetailsByVendorId, VendorFiling1099UploadDetailsSelectorView, VendorFiling1099UploadDetailsState, vendorFiling1099UploadDetailsSave, vendorFiling1099UploadDetailsResetFormStatus, vendorFiling1099UploadDetailsResetLocalData, initializeVendorFiling1099UploadDetailsLocalState, updateVendor1099DetailsLocalData, updateW9FormOCRDataToLocalData, VendorsFiling1099UploadDetailsLocalData, };
787
791
  export { BillTransaction, BillPayInfo, BillStage, BillStageCodeType, BillTransactionView, InternationalTransferFeeBearerPaymentMethod, DeletionSourceType, BillBulkSelectExceptionInfoType, toOutsideZeniPaymentModeType, checkShowMarkAsPaidButton, };
788
792
  export { MilageReimbursementLine, OutofPocketReimbursementLine, ReimbursementLine, ReimbursementTypeCode, Reimbursement, RemiTabType, toRemiSubTabType, toRemiSubTabTypeStrict, toRemiTabType, toRemiTabTypeStrict, toReimbursementTypeCode, RemiSubTabType, ReimbursementViewSortKey, RemiListUIState, RemiListReport, RemiListDownloadReport, ReimbursementView, ReimbursementFilters, ReimbursementFilterCategory, RemiListViewFilterCategoryField, getRemiList, getRemiDownloadList, fetchRemiList, fetchRemiListPerTab, updateRemiListTab, updateRemiListSubTab, updateRemiDetailSaveRemiCode, updateRemiListUIState, updateRemiListSearchResult, updateBillListFilterResult, updateRemiListFilterResult, REIMBURSEMENT_FILTER_CATEGORIES, REIMBURSEMENT_FILTER_CATEGORIES_RESTRICTED, updateRemiListDownloadUIState, updateBillListDownloadUIState, updateBillsBulkActionList, removeBillFromBulkActionList, clearAllBillsFromBulkActionList, getBillsBulkReviewView, BillsBulkReviewView, validateBillsBulkAction, approveOrRejectBillsBulkAction, cancelOrDeleteBillsBulkAction, submitDraftBillsBulkAction, autoReviewPendingApprovalBills, incrementBulkActionProcessedCount, getBillsBulkOperationProgress, BulkOperationProgress, clearBillPayBulkActionView, isBillConditionallyValid, getRemisBulkReviewView, RemisBulkReviewView, getRemisBulkOperationProgress, updateRemisBulkActionList, removeRemiFromBulkActionList, clearAllRemisFromBulkActionList, reviewDraftRemisBulkAction, approveOrRejectRemisBulkAction, cancelOrDeleteRemisBulkAction, submitDraftRemisBulkAction, autoReviewPendingApprovalRemis, clearRemiBulkActionView, incrementRemiBulkActionProcessedCount, RemiBulkSelectExceptionInfoType, OutsideZeniPaymentLocalData, updateOutsideZeniPaymentLocalData, discardOutsideZeniPaymentLocalData, checkIfCreatorIsApprover, };
789
- export { AccountListSelectorView, ClassListSelectorView, getClassList, fetchClassList, };
793
+ export { AccountListSelectorView, ClassListSelectorView, getClassList, fetchClassList, ProjectListSelectorView, getProjectList, fetchProjectList, };
790
794
  export { BillTab, BillsSubTabType, SaveBillStageCode, BillPayReviewSelectorView, DuplicateBillsSelectorView, EditBillDetailSelectorView, LineItemRecommendationsLocalData, EditBillInitialDetails, BillableStatus, PaymentDetailsSection, BillListReport, BillListDownloadReport, WhatForSection, fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, fetchVendorByNameAndParseInvoice, saveBillUpdatesToLocalStore, discardBillUpdatesInLocalStore, saveBillDetail, approveOrRejectBill, updateApprovalStatusOnSuccess, deleteBill, cancelAndDeleteBill, retryOrRefundBill, getBillList, getBillDownloadList, BillDetailViewSelector, ActorActivityWithUser, BillActivity, StepWithStatus, getBillDetailView, checkApproveRejectBtnShowForBill, BillDetailView, getBillTransactionDetailKey, fetchBillDetail, fetchEditBillDetailPage, fetchAndUpdateVendorRecommendations, fetchDuplicateBill, clearBillPayReview, EditBillDetail, EditBillDetailViewState, getEditBillDetail, getReviewPageBillDetail, BillDetailLocalData, PaymentDetailsSectionView, fetchBillAndInitializeLocalStore, updateShowAutofill, saveVendorSuccessOrFailure, BillPaymentStatus, BillPaymentStatusCodeType, BillPaymentRefundStatus, BillPaymentRefundStatusCodeType, BillStatus, BillStatusCodeType, BillApprovalType, updateBillListUIState, BillListUIState, BillPayViewSortKey, BillPayFilters, BillPayFilterCategory, BillListViewFilterCategoryField, BILL_PAY_FILTER_CATEGORIES, updateVendorDetailLocalData, resetVendorDetailLocalData, resetVendorSaveStatus, updateContactsInVendorDetailLocalData, updateVendorTabDetailUIState, updateContactsInVendorTabDetailLocalData, updateBillUploadFetchState, updateBillListSearchResult, fetchUserDetails, verifyUser, updateVendorContact, PaymentToOption, toPaymentToOption, convertAmountToHomeCurrency, RecurringBillInstance, RecurringBillConfigLocalData, EditRecurringBillType, fetchVendorAndUpdateBillLocalData, markBillForRetry, updateWithdrawFromAccountId, removeBillFileFromLocalStore, replaceBillFileInLocalStore, updateShouldReplaceBillData, };
791
795
  export { SpendManagementFiltersType, SpendManagementFilterEntityType, FilterCategoryType, BillPayFilterCategoryDropdownOption, ReimbursementFilterCategoryDropdownOption, TaskFilterCategoryDropdownOption, SpendManagementFilterCategoryDropdownOption, MatchingOperatorDropdownOption, CategoryCombinationOperator, hideCreatedByFilter, };
792
796
  export { BillPaySetupViewState, ZeniAccountSetupViewState, BillPaySetupViewLocalData, ZeniAccountSetupViewLocalData, PlaidAccountState, fetchBillPaySetupView, fetchZeniAccountSetupView, enableSetup, getPaymentAccounts, getPlaidLinkToken, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, updateBusinessVerificationDetails, updatePaymentAccount, updatePaymentAccountLoginStatus, updatePaymentAccountStatus, establishPlaidConnection, updateMappedCashAccount, updatePrimaryFundingAccount, acceptBillPayTerms, acceptZeniAccountTerms, acceptBillPayUpdatedTerms, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearBillPaySetupView, clearZeniAccountSetupView, sendOtp, resendOtp, verifyOtp, CompanyDetails, CompanyOfficersDetails, BillPaySetupView, ZeniAccountSetupView, BillPayBusinessVerificationDetails, ZeniAccountBusinessVerificationDetails, TreasuryBusinessVerificationDetails, SetupViewState, SetupViewLocalData, SetupView, BusinessVerificationDetails, getBillPaySetupViewDetails, getPlaidAccountDetails, getZeniAccountSetupViewDetails, getBusinessVerificationDetails, getBillPayBusinessVerificationDetails, getZeniAccountBusinessVerificationDetails, getTreasuryBusinessVerificationDetails, getCommonSetupViewDetails, PlaidConnectionDetails, PlaidLinkTokenType, PlaidAccountKeyType, Token, FundingAccount, getTwoFactorAuthenticationView, getTwoFactorAuthenticationViewForCardUserOnboarding, getTwoFactorAuthenticationViewForChargeCardHolder, TwoFactorAuthenticationView, };
@@ -827,7 +831,7 @@ export { Filing1099TinType };
827
831
  export { BillPayCardReport };
828
832
  export { ReimbursementCardReport };
829
833
  export { VendorListViewSortKey, VendorViewUIState, VendorListSelectorView, VendorListQuery, getVendorList, VendorListView, updateSortUiState, updatePageToken, updateYTDSelectionUIState, VendorListViewYTDSpendSortKey, isColumnYTDSpend, isVendorsTabVisible, VendorViewType, VendorReportIDType, toVendorReportIDType, VendorFiling1099ListSelectorView, getVendorFiling1099List, VendorFiling1099ListViewSortKey, VendorFiling1099ViewUIState, VendorFiling1099DownloadData, fetchVendorsFiling1099Download, Type1099Download, VendorFiling1099DownloadDataForType, };
830
- export { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName, };
834
+ export { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForCategorization, fetchRecommendationByEntityId, fetchRecommendationByEntityName, setCategoryClassRecommendationsForCategorizationFailure, };
831
835
  export { fetchOwnerList };
832
836
  export { ZeniAccountsConfigSelectorView, getZeniAccountsConfigDetail, ZeniAccountListSelectorView, getZeniAccountList, fetchZeniAccountList, fetchAccountList, DepositAccount, createCheckingAccount, fetchPaymentAccountList, unlinkPaymentAccount, getDepositAccountDetail, DepositAccountDetailSelectorView, DepositAccountListSelectorView, getAllDepositAccounts, getDepositAccountDetailForPDF, DepositAccountDetailForPDF, fetchDepositAccount, fetchZeniAccountsConfig, AccountHistoryWithBalances, TransferDetailLocalData, ReviewTransferDetail, updateTransferMoneyLocalData, updateTransferToLocalData, updateDepositToLocalData, transferMoney, getTransferDetail, TransferDetailSelectorView, clearTransferDetail, clearReviewTransferDetail, fetchReviewTransferDetail, fetchDepositAccountDetail, DepositAccountTransaction, DepositAccountWithAutoTransferRules, DepositTransactionStatusCode, DepositTransactionStatus, CheckDepositLocalData, depositCheck, updateCheckDepositLocalData, clearCheckDeposit, CheckDepositSelectorView, getCheckDepositDetail, updateDepositAccount, fetchDepositAccountHistorySuccess, fetchDepositAccountHistoryFailure, DepositAccountUpdateType, ZeniAccountSummaryWithBalance, fetchZeniAccStatementPage, getZeniAccStatements, ZeniAccStatementsSelectorView, ZeniAccountPaymentMethod, };
833
837
  export { CommonHistoryView, HistoricEvent, HistoricEventUpdate, ActivityHistorySelectorView, };