@zeniai/client-epic-state 4.20.3-betaML22 → 4.20.3-betaNB1

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 (88) hide show
  1. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  2. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
  3. package/lib/entity/account/accountPayload.d.ts +0 -2
  4. package/lib/entity/account/accountReducer.d.ts +2 -5
  5. package/lib/entity/account/accountReducer.js +2 -7
  6. package/lib/entity/account/accountState.d.ts +1 -1
  7. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  8. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
  9. package/lib/entity/accountRecon/accountReconPayload.js +2 -4
  10. package/lib/entity/class/classReducer.d.ts +4 -4
  11. package/lib/entity/class/classState.d.ts +1 -1
  12. package/lib/entity/forecast/forecastState.d.ts +1 -1
  13. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  14. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  15. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  16. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  17. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  18. package/lib/entity/tenant/tenantReducer.d.ts +2 -5
  19. package/lib/entity/tenant/tenantReducer.js +2 -8
  20. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -6
  21. package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -62
  22. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -6
  23. package/lib/epic.d.ts +7 -10
  24. package/lib/epic.js +7 -10
  25. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
  26. package/lib/esm/entity/account/accountReducer.js +1 -6
  27. package/lib/esm/entity/accountRecon/accountReconPayload.js +2 -4
  28. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
  29. package/lib/esm/entity/tenant/tenantReducer.js +1 -7
  30. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -62
  31. package/lib/esm/epic.js +7 -10
  32. package/lib/esm/index.js +7 -7
  33. package/lib/esm/view/companyView/companyViewReducer.js +1 -26
  34. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
  35. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
  36. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -5
  37. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +3 -167
  38. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -1
  39. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -114
  40. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -10
  41. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -6
  42. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +2 -4
  43. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +1 -1
  44. package/lib/index.d.ts +7 -7
  45. package/lib/index.js +33 -38
  46. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  47. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  48. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  49. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  50. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  51. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  52. package/lib/view/companyView/companyViewReducer.d.ts +1 -6
  53. package/lib/view/companyView/companyViewReducer.js +2 -28
  54. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +0 -1
  55. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
  56. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  57. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
  58. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  59. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -45
  60. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -5
  61. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +4 -18
  62. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -168
  63. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +2 -7
  64. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  65. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -114
  66. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -9
  67. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -3
  68. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -8
  69. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -14
  70. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  71. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  72. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +2 -4
  73. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  74. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  75. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +1 -1
  76. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  77. package/lib/view/topEx/topExSelector.d.ts +1 -1
  78. package/package.json +1 -1
  79. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -61
  80. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
  81. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
  82. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
  83. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +0 -10
  84. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -65
  85. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +0 -8
  86. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -48
  87. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +0 -9
  88. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -48
@@ -11,7 +11,7 @@ import { Vendor } from '../../../entity/vendor/vendorState';
11
11
  import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
12
12
  import { AccountReconciliationLocalData, ActionFetchStates, ReconListUIState, ReconciliationTabsState, ReconciliationViewTabType } from '../types/reconciliationViewState';
13
13
  export declare const ALL_ACCOUNT_RECON_SECTION_IDS: readonly ["assets", "liabilities"];
14
- export declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
14
+ declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
15
15
  export type AccountReconSectionID = ReturnType<typeof toAccountReconSectionID>;
16
16
  export interface ExpenseAutomationReconciliationViewSelector {
17
17
  accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
@@ -24,12 +24,7 @@ export interface ExpenseAutomationReconciliationViewSelector {
24
24
  classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
25
25
  completionStatus: CompletionStatusType;
26
26
  creditCards: AccountBase[];
27
- excludeAccountFetchState: FetchStateAndError;
28
- excludedAccountIDs: ID[];
29
- excludedAccountReconciliationByAccountID: Record<ID, AccountReconciliationByAccount>;
30
- excludedAccountReconciliationBySectionID: Record<AccountReconSectionID, AccountReconciliationBySection>;
31
27
  fetchStatus: FetchStateAndError;
32
- includeAccountFetchState: FetchStateAndError;
33
28
  monthYearPeriod: MonthYearPeriod;
34
29
  plaidConnectionDetails: PlaidConnectionDetails;
35
30
  reconciliationTabsState: ReconciliationTabsState;
@@ -62,6 +57,6 @@ export interface AccountReconciliationByAccount {
62
57
  statementUpdateStatus: FetchStateAndError;
63
58
  statementUploadStatus: FetchStateAndError;
64
59
  transactionFetchState: FetchStateAndError;
65
- accountDetectionReason?: string;
66
60
  paymentAccountId?: ID;
67
61
  }
62
+ export {};
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toAccountReconSectionID = exports.ALL_ACCOUNT_RECON_SECTION_IDS = void 0;
3
+ exports.ALL_ACCOUNT_RECON_SECTION_IDS = void 0;
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_ACCOUNT_RECON_SECTION_IDS = ['assets', 'liabilities'];
6
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
7
  const toAccountReconSectionID = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ACCOUNT_RECON_SECTION_IDS);
7
- exports.toAccountReconSectionID = toAccountReconSectionID;
@@ -15,7 +15,6 @@ const accountSelector_1 = require("../../../entity/account/accountSelector");
15
15
  const accountReconSelector_1 = require("../../../entity/accountRecon/accountReconSelector");
16
16
  const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
17
17
  const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
18
- const zeniDayJS_1 = require("../../../zeniDayJS");
19
18
  const accountListSelector_1 = require("../../accountList/accountListSelector");
20
19
  const classListSelector_1 = require("../../classList/classListSelector");
21
20
  const reconciliationViewReducer_1 = require("../reducers/reconciliationViewReducer");
@@ -97,30 +96,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
97
96
  totalVariancePercentage: undefined,
98
97
  },
99
98
  },
100
- excludedAccountReconciliationByAccountID: {},
101
- excludedAccountReconciliationBySectionID: {
102
- assets: {
103
- sectionId: 'assets',
104
- accountIDs: [],
105
- totalBankBalance: undefined,
106
- totalClearedBalance: undefined,
107
- totalReconciledBalance: undefined,
108
- totalVariance: undefined,
109
- totalVariancePercentage: undefined,
110
- },
111
- liabilities: {
112
- sectionId: 'liabilities',
113
- accountIDs: [],
114
- totalBankBalance: undefined,
115
- totalClearedBalance: undefined,
116
- totalReconciledBalance: undefined,
117
- totalVariance: undefined,
118
- totalVariancePercentage: undefined,
119
- },
120
- },
121
- excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
122
- includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
123
- excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
124
99
  };
125
100
  }
126
101
  const allAccountIDs = accountReconForMonthYearPeriod.accountIDs;
@@ -258,8 +233,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
258
233
  .transactionFetchState,
259
234
  accountListState.byReportId.accountList,
260
235
  ]),
261
- accountDetectionReason: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
262
- .accountDetectionReason,
263
236
  };
264
237
  });
265
238
  const accountReconciliationBySectionID = {
@@ -282,88 +255,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
282
255
  totalVariancePercentage: liabilityTotals.variancePercentage,
283
256
  },
284
257
  };
285
- const bankAccountIdSet = new Set(uniqueBankAccounts.map((a) => a.accountId));
286
- const creditCardIdSet = new Set(uniqueCreditCards.map((a) => a.accountId));
287
- const excludedAssetAccountIDs = [];
288
- const excludedLiabilityAccountIDs = [];
289
- reconciliationViewState.excludedAccountIDs.forEach((accountID) => {
290
- const isAsset = bankAccountIdSet.has(accountID);
291
- const isLiability = creditCardIdSet.has(accountID);
292
- if (!isAsset && !isLiability) {
293
- return;
294
- }
295
- if (isAsset) {
296
- excludedAssetAccountIDs.push(accountID);
297
- }
298
- else {
299
- excludedLiabilityAccountIDs.push(accountID);
300
- }
301
- });
302
- const excludedAccountReconciliationBySectionID = {
303
- assets: {
304
- sectionId: 'assets',
305
- accountIDs: excludedAssetAccountIDs,
306
- },
307
- liabilities: {
308
- sectionId: 'liabilities',
309
- accountIDs: excludedLiabilityAccountIDs,
310
- },
311
- };
312
- const excludedAccountReconciliationByAccountID = {};
313
- const accountsInState = Object.values(accountState.accountsByKey);
314
- const accountsInStateMap = new Map(accountsInState.map((a) => [a.accountId, a]));
315
- reconciliationViewState.excludedAccountIDs.forEach((excludedAccountID) => {
316
- const account = accountsInStateMap.get(excludedAccountID);
317
- const exclusionInfo = reconciliationViewState.excludedAccountExclusionInfo[excludedAccountID];
318
- if (account != null) {
319
- excludedAccountReconciliationByAccountID[excludedAccountID] = {
320
- refreshStatus: { fetchState: 'Not-Started' },
321
- statementUpdateStatus: { fetchState: 'Not-Started' },
322
- statementUploadStatus: { fetchState: 'Not-Started' },
323
- statementDeleteStatus: { fetchState: 'Not-Started' },
324
- localData: {},
325
- connectionInProgress: false,
326
- statementParseInProgress: false,
327
- accountConnectionStatus: 'not_connected',
328
- transactionFetchState: { fetchState: 'Not-Started' },
329
- accountReconEntity: {
330
- account: {
331
- accountId: account.accountId,
332
- accountName: account.accountName,
333
- accountType: account.accountType,
334
- accountSubType: account.accountSubType,
335
- accountDescription: account.accountDescription,
336
- qboId: account.qboId,
337
- coaId: account.coaId,
338
- labels: account.labels,
339
- },
340
- currency: {
341
- currencyCode: exclusionInfo?.bankBalance?.currencyCode ??
342
- exclusionInfo?.clearedBalance?.currencyCode ??
343
- 'USD',
344
- currencySymbol: exclusionInfo?.bankBalance?.currencySymbol ??
345
- exclusionInfo?.clearedBalance?.currencySymbol ??
346
- '$',
347
- },
348
- startDate: (0, zeniDayJS_1.date)(new Date().toDateString()),
349
- endDate: (0, zeniDayJS_1.date)(new Date().toDateString()),
350
- statementStatus: { code: 'not_found', label: 'Not Found' },
351
- transactionsToReconcile: [],
352
- transactionsToReview: [],
353
- balance: exclusionInfo?.bankBalance,
354
- clearedBalance: exclusionInfo?.clearedBalance,
355
- variance: exclusionInfo?.variance,
356
- variancePercentage: exclusionInfo?.variance != null &&
357
- exclusionInfo?.bankBalance != null &&
358
- exclusionInfo?.bankBalance.amount !== 0
359
- ? Math.abs((exclusionInfo.variance.amount /
360
- exclusionInfo.bankBalance.amount) *
361
- 100)
362
- : undefined,
363
- },
364
- };
365
- }
366
- });
367
258
  const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
368
259
  const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
369
260
  const accountsList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
@@ -424,11 +315,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
424
315
  allClassList: allClasses,
425
316
  reviewTabSelectedVendorByTransactionId,
426
317
  reconListUIState: reconciliationViewState.reconListUIState,
427
- excludedAccountReconciliationBySectionID,
428
- excludedAccountReconciliationByAccountID,
429
- excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
430
- includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
431
- excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
432
318
  };
433
319
  });
434
320
  const isAccountReconReport = (reportId) => {
@@ -50,16 +50,12 @@ function getExpenseAutomationTransactionView(state) {
50
50
  const monthEndFetchState = monthYearPeriodId != null
51
51
  ? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
52
52
  : { fetchState: 'Not-Started', error: undefined };
53
- const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state);
54
- const allFetchStateList = [
55
- accountList,
56
- expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
57
- ];
58
- if (isAccountingClassesEnabled) {
59
- allFetchStateList.push(classList);
60
- }
61
53
  const fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
62
- (0, reduceFetchState_1.reduceAllFetchState)(allFetchStateList),
54
+ (0, reduceFetchState_1.reduceAllFetchState)([
55
+ accountList,
56
+ classList,
57
+ expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
58
+ ]),
63
59
  monthEndFetchState,
64
60
  ]);
65
61
  const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
@@ -8,15 +8,12 @@ import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSched
8
8
  import { VendorBase } from '../../../entity/vendor/vendorState';
9
9
  export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
10
10
  export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
11
- export declare const toJEScheduleMainTab: (v: string) => "completed" | "pending_review" | "ongoing";
12
- export type JEScheduleMainTab = ReturnType<typeof toJEScheduleMainTab>;
13
11
  export interface JESchedulesViewUIState {
14
12
  scrollPosition: {
15
13
  scrollTop: number;
16
14
  scrollLeft?: number;
17
15
  } | undefined;
18
16
  searchString: string;
19
- selectedMainTab: JEScheduleMainTab;
20
17
  sortKey: JEScheduleSortKey;
21
18
  sortOrder: SortOrder;
22
19
  totalCount: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toJEScheduleMainTab = exports.toJEScheduleSortKey = void 0;
3
+ exports.toJEScheduleSortKey = void 0;
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  const JE_SCHEDULE_SORT_KEYS = [
6
6
  'vendor',
@@ -20,10 +20,3 @@ const JE_SCHEDULE_SORT_KEYS = [
20
20
  ];
21
21
  const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
22
22
  exports.toJEScheduleSortKey = toJEScheduleSortKey;
23
- const JE_SCHEDULE_MAIN_TABS = [
24
- 'pending_review',
25
- 'ongoing',
26
- 'completed',
27
- ];
28
- const toJEScheduleMainTab = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_MAIN_TABS);
29
- exports.toJEScheduleMainTab = toJEScheduleMainTab;
@@ -74,24 +74,13 @@ export interface ReconciliationReviewTabLocalData {
74
74
  matchedTransactionId?: ID;
75
75
  vendor?: VendorBase;
76
76
  }
77
- export interface ExcludeAccountFromReconciliationPayload {
78
- accountId: ID;
79
- }
80
- export interface ExclusionInfo {
81
- bankBalance: Amount | undefined;
82
- clearedBalance: Amount | undefined;
83
- variance: Amount | undefined;
84
- }
85
77
  export interface ActionFetchStates {
86
- excludeAccountFetch: FetchStateAndError;
87
78
  excludeFetchById: Record<ID, FetchStateAndError>;
88
- includeAccountFetch: FetchStateAndError;
89
79
  reconcileFetch: FetchStateAndError;
90
80
  saveForLaterFetch: FetchStateAndError;
91
81
  saveReconciliationReviewFetch: Record<ID, FetchStateAndError>;
92
82
  }
93
83
  export interface ReconListUIState {
94
- nodeCollapseState: Record<ID, boolean>;
95
84
  scrollPosition: {
96
85
  scrollTop: number;
97
86
  scrollLeft?: number;
@@ -101,8 +90,6 @@ export interface ReconciliationViewState extends FetchStateAndError {
101
90
  accountConnectionStatusByAccountID: Record<ID, BankConnectionStatus>;
102
91
  accountReconciliationRecordsBySelectedPeriod: Record<MonthYearPeriodId, AccountReconciliationRecords>;
103
92
  actionFetchState: ActionFetchStates;
104
- excludedAccountExclusionInfo: Record<ID, ExclusionInfo>;
105
- excludedAccountIDs: ID[];
106
93
  reconListUIState: ReconListUIState;
107
94
  reconTabsState: ReconciliationTabsState;
108
95
  refreshStatus: FetchStateAndError;
@@ -132,7 +119,6 @@ export interface AccountReconciliationDataWithTransactionFetchState {
132
119
  statementUpdateStatus: FetchStateAndError;
133
120
  statementUploadStatus: FetchStateAndError;
134
121
  transactionFetchState: FetchStateAndError;
135
- accountDetectionReason?: string;
136
122
  reconciliationId?: ID;
137
123
  }
138
124
  export {};
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
17
17
  firstMonthOfFY: Month;
18
18
  maxNumOfPeriodsToHighlight: number;
19
19
  thisPeriod: TimeframeTick;
20
- }, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
20
+ }, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
21
21
  additionalBalances: COABalanceType[];
22
22
  coaBalances: COABalance[];
23
23
  firstMonthOfFY: Month;
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
3
3
  import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
4
4
  import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
5
5
  export declare const initialState: GlobalMerchantViewState;
6
- export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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" | undefined], {
6
+ export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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" | undefined], {
7
7
  merchantId: string | undefined;
8
- context: "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" | undefined;
8
+ context: "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" | undefined;
9
9
  }, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
10
  merchantId: ID;
11
11
  }, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -126,12 +126,10 @@ function buildClassColumns(classHierarchy, classesToFilterOut) {
126
126
  qboId: c.qboId,
127
127
  }))
128
128
  .sort((a, b) => {
129
- const aIsNotSpecified = a.classId === exports.NOT_SPECIFIED_CLASS_ID;
130
- const bIsNotSpecified = b.classId === exports.NOT_SPECIFIED_CLASS_ID;
131
- if (aIsNotSpecified && !bIsNotSpecified) {
129
+ if (a.classId === exports.NOT_SPECIFIED_CLASS_ID) {
132
130
  return 1;
133
131
  }
134
- if (!aIsNotSpecified && bIsNotSpecified) {
132
+ if (b.classId === exports.NOT_SPECIFIED_CLASS_ID) {
135
133
  return -1;
136
134
  }
137
135
  return a.className.localeCompare(b.className, [], {
@@ -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" | "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;
@@ -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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"], {
6
+ reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
7
7
  }, "initiateReportsResync/initiateReportsResync", never, never>, initiateReportsClassViewRefetching: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
8
8
  reportIdToResync: ReportID;
9
9
  }, "initiateReportsResync/initiateReportsClassViewRefetching">, reportsResyncSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -28,7 +28,7 @@ const fetchAutoTransferReviewDetailEpic = (actions$, state$, zeniAPI) => actions
28
28
  }),
29
29
  };
30
30
  return zeniAPI
31
- .postAndGetJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/rules/transfer/auto/review`, payload)
31
+ .postAndGetJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/transfers/review`, payload)
32
32
  .pipe((0, operators_1.mergeMap)((response) => {
33
33
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
34
34
  return (0, rxjs_1.of)((0, autoTransferRulesReducer_1.updateAutoTransferReviewDetail)(response.data));
@@ -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" | "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" | "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-betaML22",
3
+ "version": "4.20.3-betaNB1",
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,61 +0,0 @@
1
- import { from } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
- import { updateCompanies } from '../../../../entity/company/companyReducer';
4
- import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
5
- import { updateTenantAccountingClassesEnabled } from '../../../../entity/tenant/tenantReducer';
6
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
7
- import { updateAccountingClassesEnabled, updateAccountingClassesEnabledFailure, updateAccountingClassesEnabledSuccess, } from '../../companyViewReducer';
8
- export const updateAccountingClassesEnabledEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(updateAccountingClassesEnabled.match), switchMap((action) => {
9
- const { companyId, enabled } = action.payload;
10
- const tenantId = Object.values(state$.value.tenantState.tenantsById).find((t) => t.companyId === companyId)?.tenantId;
11
- return zeniAPI
12
- .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, { is_accounting_classes_enabled: enabled })
13
- .pipe(mergeMap((response) => {
14
- const companies = response.data?.companies ?? [];
15
- if (isSuccessResponse(response) && companies.length > 0) {
16
- const actions = [
17
- updateCompanies({
18
- payload: companies,
19
- schema: {},
20
- }),
21
- ];
22
- if (tenantId != null) {
23
- actions.push(updateTenantAccountingClassesEnabled({
24
- enabled,
25
- tenantId,
26
- }));
27
- }
28
- actions.push(updateAccountingClassesEnabledSuccess());
29
- actions.push(openSnackbar({
30
- messageSection: 'accounting_classes_enabled_update',
31
- messageText: 'success',
32
- type: 'success',
33
- }));
34
- return from(actions);
35
- }
36
- else {
37
- return from([
38
- updateAccountingClassesEnabledFailure({
39
- status: response.status,
40
- }),
41
- openSnackbar({
42
- messageSection: 'accounting_classes_enabled_update',
43
- messageText: 'failed',
44
- type: 'error',
45
- }),
46
- ]);
47
- }
48
- }), catchError((error) => from([
49
- updateAccountingClassesEnabledFailure({
50
- status: createZeniAPIStatus('Unexpected error', 'Update Accounting Classes Enabled errored out' +
51
- (error instanceof Error
52
- ? error.message
53
- : JSON.stringify(error))),
54
- }),
55
- openSnackbar({
56
- messageSection: 'accounting_classes_enabled_update',
57
- messageText: 'failed',
58
- type: 'error',
59
- }),
60
- ])));
61
- }));
@@ -1,44 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { changeAccountKey } from '../../../../entity/account/accountReducer';
4
- import { getAccountKey } from '../../../../entity/account/accountState';
5
- import { getAccountReconByAccountIdAndSelectedPeriod } from '../../../../entity/accountRecon/accountReconSelector';
6
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
7
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
8
- import { excludeAccountFromReconciliation, excludeAccountFromReconciliationFailure, excludeAccountFromReconciliationSuccess, } from '../../reducers/reconciliationViewReducer';
9
- export const excludeAccountFromReconciliationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(excludeAccountFromReconciliation.match), mergeMap((action) => {
10
- const { accountId } = action.payload;
11
- const state = state$.value;
12
- const currentTenant = getCurrentTenant(state);
13
- const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
14
- const reconciliationData = getAccountReconByAccountIdAndSelectedPeriod(state, accountId, selectedPeriod);
15
- const payload = {
16
- account_id: accountId,
17
- bank_balance: reconciliationData?.balance?.amount ?? null,
18
- cleared_balance: reconciliationData?.clearedBalance?.amount ?? null,
19
- variance: reconciliationData?.variance?.amount ?? null,
20
- };
21
- const apiUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts`;
22
- return zeniAPI
23
- .postAndGetJSON(apiUrl, payload)
24
- .pipe(mergeMap((response) => {
25
- if (isSuccessResponse(response)) {
26
- const newAccountKey = getAccountKey('excluded_account_reconciliation', accountId);
27
- const oldAccountKey = getAccountKey('account_reconciliation', accountId);
28
- return of(excludeAccountFromReconciliationSuccess({
29
- account: response.data?.excluded_account ?? undefined,
30
- selectedPeriod,
31
- }), changeAccountKey({
32
- oldKey: oldAccountKey,
33
- newKey: newAccountKey,
34
- }));
35
- }
36
- else {
37
- return of(excludeAccountFromReconciliationFailure({
38
- error: response.status,
39
- }));
40
- }
41
- }), catchError((error) => of(excludeAccountFromReconciliationFailure({
42
- error: createZeniAPIStatus('Unexpected Error', `Exclude account from reconciliation REST API call errored out ${JSON.stringify(error)}`),
43
- }))));
44
- }));
@@ -1,44 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { convertToPeriod } from '../../../../commonStateTypes/timePeriod';
4
- import { changeAccountKey } from '../../../../entity/account/accountReducer';
5
- import { getAccountKey } from '../../../../entity/account/accountState';
6
- import { updateAccountRecon } from '../../../../entity/accountRecon/accountReconReducer';
7
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
8
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
9
- import { includeAccountInReconciliation, includeAccountInReconciliationFailure, includeAccountInReconciliationSuccess, } from '../../reducers/reconciliationViewReducer';
10
- export const includeAccountInReconciliationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(includeAccountInReconciliation.match), mergeMap((action) => {
11
- const { accountId } = action.payload;
12
- const state = state$.value;
13
- const currentTenant = getCurrentTenant(state);
14
- const selectedPeriod = state.expenseAutomationViewState.selectedPeriodByTenantId[currentTenant.tenantId];
15
- const period = convertToPeriod(selectedPeriod, true);
16
- const query = JSON.stringify({
17
- start_date: period.start,
18
- end_date: period.end,
19
- });
20
- const apiUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/excluded-accounts/${accountId}?query=${encodeURIComponent(query)}`;
21
- return zeniAPI
22
- .deleteAndGetJSON(apiUrl)
23
- .pipe(mergeMap((response) => {
24
- if (isSuccessResponse(response) && response.data != null) {
25
- const reconciliation = response.data.reconciliation;
26
- const oldAccountKey = getAccountKey('excluded_account_reconciliation', reconciliation.account_id);
27
- const newAccountKey = getAccountKey('account_reconciliation', reconciliation.account_id);
28
- return of(updateAccountRecon(selectedPeriod, [reconciliation]), includeAccountInReconciliationSuccess({
29
- reconciliation,
30
- selectedPeriod,
31
- }), changeAccountKey({
32
- oldKey: oldAccountKey,
33
- newKey: newAccountKey,
34
- }));
35
- }
36
- else {
37
- return of(includeAccountInReconciliationFailure({
38
- error: response.status,
39
- }));
40
- }
41
- }), catchError((error) => of(includeAccountInReconciliationFailure({
42
- error: createZeniAPIStatus('Unexpected Error', `Include account in reconciliation REST API call errored out ${JSON.stringify(error)}`),
43
- }))));
44
- }));