@zeniai/client-epic-state 4.10.2 → 4.10.3

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 (90) hide show
  1. package/lib/commonPayloadTypes/commonPayload.d.ts +8 -0
  2. package/lib/commonPayloadTypes/commonPayload.js +18 -0
  3. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  4. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  5. package/lib/entity/account/accountSelector.d.ts +3 -3
  6. package/lib/entity/account/accountState.d.ts +2 -2
  7. package/lib/entity/account/accountState.js +1 -1
  8. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -1
  9. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -22
  10. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  11. package/lib/entity/class/classReducer.d.ts +4 -4
  12. package/lib/entity/class/classState.d.ts +1 -1
  13. package/lib/entity/forecast/forecastState.d.ts +1 -1
  14. package/lib/entity/notification/notificationPayload.d.ts +46 -0
  15. package/lib/entity/notification/notificationPayload.js +124 -0
  16. package/lib/entity/notification/notificationReducer.d.ts +20 -0
  17. package/lib/entity/notification/notificationReducer.js +118 -0
  18. package/lib/entity/notification/notificationSelector.d.ts +9 -0
  19. package/lib/entity/notification/notificationSelector.js +36 -0
  20. package/lib/entity/notification/notificationState.d.ts +7 -0
  21. package/lib/entity/notification/notificationState.js +2 -0
  22. package/lib/entity/notification/types/notificationSelectorTypes.d.ts +8 -0
  23. package/lib/entity/notification/types/notificationSelectorTypes.js +2 -0
  24. package/lib/entity/notification/types/notificationStateTypes.d.ts +50 -0
  25. package/lib/entity/notification/types/notificationStateTypes.js +2 -0
  26. package/lib/entity/notification/types/notificationTypes.d.ts +24 -0
  27. package/lib/entity/notification/types/notificationTypes.js +58 -0
  28. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  29. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  30. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  31. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  32. package/lib/entity/snackbar/snackbarTypes.js +2 -0
  33. package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
  34. package/lib/entity/tenant/clearAllEpic.js +5 -1
  35. package/lib/epic.d.ts +7 -3
  36. package/lib/epic.js +5 -1
  37. package/lib/index.d.ts +12 -4
  38. package/lib/index.js +49 -27
  39. package/lib/reducer.d.ts +6 -0
  40. package/lib/reducer.js +6 -0
  41. package/lib/view/accountList/accountListReducer.js +1 -1
  42. package/lib/view/accountMappingView/accountMappingPayload.js +14 -37
  43. package/lib/view/accountMappingView/accountMappingReducer.js +3 -3
  44. package/lib/view/accountMappingView/accountMappingState.d.ts +3 -3
  45. package/lib/view/accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload.d.ts +1 -1
  46. package/lib/view/accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload.js +1 -1
  47. package/lib/view/accountMappingView/saveAccountMappingViewEpic.d.ts +2 -1
  48. package/lib/view/accountMappingView/saveAccountMappingViewEpic.js +14 -5
  49. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  50. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  51. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -2
  52. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -2
  53. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  54. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  55. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  56. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  57. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  58. package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.d.ts +10 -0
  59. package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +39 -0
  60. package/lib/view/notificationView/epics/fetchNotificationViewEpic.d.ts +9 -0
  61. package/lib/view/notificationView/epics/fetchNotificationViewEpic.js +56 -0
  62. package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.d.ts +9 -0
  63. package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.js +50 -0
  64. package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.d.ts +9 -0
  65. package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.js +86 -0
  66. package/lib/view/notificationView/notificationView.helpers.d.ts +2 -0
  67. package/lib/view/notificationView/notificationView.helpers.js +11 -0
  68. package/lib/view/notificationView/notificationViewPayload.d.ts +48 -0
  69. package/lib/view/notificationView/notificationViewPayload.js +2 -0
  70. package/lib/view/notificationView/notificationViewReducer.d.ts +64 -0
  71. package/lib/view/notificationView/notificationViewReducer.js +372 -0
  72. package/lib/view/notificationView/notificationViewSelector.d.ts +29 -0
  73. package/lib/view/notificationView/notificationViewSelector.js +89 -0
  74. package/lib/view/notificationView/notificationViewState.d.ts +31 -0
  75. package/lib/view/notificationView/notificationViewState.js +19 -0
  76. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  77. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  78. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  79. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  80. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  81. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  82. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  83. package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
  84. package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +37 -5
  85. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  86. package/lib/view/topEx/topExSelector.d.ts +1 -1
  87. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +1 -1
  88. package/lib/zeniAPI.d.ts +2 -0
  89. package/lib/zeniAPI.js +8 -0
  90. package/package.json +2 -1
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toSaveAccountMappingPayload = void 0;
4
4
  const toSaveAccountMappingPayload = (accountingLocalData) => {
5
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
5
+ var _a, _b, _c, _d;
6
6
  const accounts = [];
7
7
  if (Boolean(accountingLocalData.selectedIncomeAccountId) === true) {
8
8
  accounts.push({
@@ -10,7 +10,7 @@ const toSaveAccountMappingPayload = (accountingLocalData) => {
10
10
  labels: ['uncategorized_income'],
11
11
  });
12
12
  }
13
- else {
13
+ else if (Boolean(accountingLocalData.previousIncomeAccount) === true) {
14
14
  accounts.push({
15
15
  account_id: (_a = accountingLocalData.previousIncomeAccount) === null || _a === void 0 ? void 0 : _a.accountId,
16
16
  labels: [],
@@ -22,46 +22,23 @@ const toSaveAccountMappingPayload = (accountingLocalData) => {
22
22
  labels: ['uncategorized_expense'],
23
23
  });
24
24
  }
25
- else {
25
+ else if (Boolean(accountingLocalData.previousExpenseAccount) === true) {
26
26
  accounts.push({
27
- account_id: (_b = accountingLocalData.previousExpenseAccount) === null || _b === void 0 ? void 0 : _b.accountId,
28
- labels: [],
29
- });
30
- }
31
- if (Boolean(accountingLocalData.selectedBillPayAccountId) === true) {
32
- accounts.push({
33
- account_id: accountingLocalData.selectedBillPayAccountId,
34
- labels: ['bank_charges_and_fees'],
35
- });
36
- }
37
- else {
38
- accounts.push({
39
- account_id: (_c = accountingLocalData.previousBillPayAccount) === null || _c === void 0 ? void 0 : _c.accountId,
40
- labels: [],
41
- });
42
- }
43
- if (Boolean(accountingLocalData.selectedReimbursementsAccountId) === true) {
44
- accounts.push({
45
- account_id: accountingLocalData.selectedReimbursementsAccountId,
46
- labels: ['mileage'],
47
- });
48
- }
49
- else {
50
- accounts.push({
51
- account_id: (_d = accountingLocalData.previousReimbursementsAccount) === null || _d === void 0 ? void 0 : _d.accountId,
27
+ account_id: accountingLocalData.previousExpenseAccount
28
+ .accountId,
52
29
  labels: [],
53
30
  });
54
31
  }
55
32
  if (accountingLocalData.selectedPrepaidExpensesAccountIds.length > 0) {
56
- (_e = accountingLocalData.selectedPrepaidExpensesAccountIds) === null || _e === void 0 ? void 0 : _e.forEach((accountId) => {
33
+ (_b = accountingLocalData.selectedPrepaidExpensesAccountIds) === null || _b === void 0 ? void 0 : _b.forEach((accountId) => {
57
34
  accounts.push({
58
35
  account_id: accountId,
59
36
  labels: ['prepaid_expenses'],
60
37
  });
61
38
  });
62
39
  }
63
- else {
64
- (_f = accountingLocalData.previousPrepaidExpensesAccount) === null || _f === void 0 ? void 0 : _f.forEach((account) => {
40
+ else if (accountingLocalData.previousPrepaidExpensesAccount.length > 0) {
41
+ accountingLocalData.previousPrepaidExpensesAccount.forEach((account) => {
65
42
  accounts.push({
66
43
  account_id: account.accountId,
67
44
  labels: [],
@@ -69,15 +46,15 @@ const toSaveAccountMappingPayload = (accountingLocalData) => {
69
46
  });
70
47
  }
71
48
  if (accountingLocalData.selectedFixedAssetsAccountIds.length > 0) {
72
- (_g = accountingLocalData.selectedFixedAssetsAccountIds) === null || _g === void 0 ? void 0 : _g.forEach((accountId) => {
49
+ (_c = accountingLocalData.selectedFixedAssetsAccountIds) === null || _c === void 0 ? void 0 : _c.forEach((accountId) => {
73
50
  accounts.push({
74
51
  account_id: accountId,
75
52
  labels: ['fixed_assets'],
76
53
  });
77
54
  });
78
55
  }
79
- else {
80
- (_h = accountingLocalData.previousFixedAssetsAccount) === null || _h === void 0 ? void 0 : _h.forEach((account) => {
56
+ else if (accountingLocalData.previousFixedAssetsAccount.length > 0) {
57
+ accountingLocalData.previousFixedAssetsAccount.forEach((account) => {
81
58
  accounts.push({
82
59
  account_id: account.accountId,
83
60
  labels: [],
@@ -85,15 +62,15 @@ const toSaveAccountMappingPayload = (accountingLocalData) => {
85
62
  });
86
63
  }
87
64
  if (accountingLocalData.selectedAccruedExpensesAccountIds.length > 0) {
88
- (_j = accountingLocalData.selectedAccruedExpensesAccountIds) === null || _j === void 0 ? void 0 : _j.forEach((accountId) => {
65
+ (_d = accountingLocalData.selectedAccruedExpensesAccountIds) === null || _d === void 0 ? void 0 : _d.forEach((accountId) => {
89
66
  accounts.push({
90
67
  account_id: accountId,
91
68
  labels: ['accrued_expenses'],
92
69
  });
93
70
  });
94
71
  }
95
- else {
96
- (_k = accountingLocalData.previousAccruedExpensesAccount) === null || _k === void 0 ? void 0 : _k.forEach((account) => {
72
+ else if (accountingLocalData.previousAccruedExpensesAccount.length > 0) {
73
+ accountingLocalData.previousAccruedExpensesAccount.forEach((account) => {
97
74
  accounts.push({
98
75
  account_id: account.accountId,
99
76
  labels: [],
@@ -64,8 +64,8 @@ const accountMapping = (0, toolkit_1.createSlice)({
64
64
  initialState: exports.initialState,
65
65
  reducers: {
66
66
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
- initializeAccountMappingView(_draft) {
68
- // do nothing
67
+ initializeAccountMappingView(draft) {
68
+ draft.data = exports.initialState.data;
69
69
  },
70
70
  fetchRecommendationForAccountMapping(draft) {
71
71
  draft.recommendationFetchState = {
@@ -193,7 +193,7 @@ const doUpdateAccountListForAccountTypes = (draft, accountPayloadList) => {
193
193
  draft.data = Object.assign(Object.assign({}, draft.data), { selectedBillPayAccountId: billPayAccountIdentified.accountId, previousBillPayAccount: billPayAccountIdentified });
194
194
  }
195
195
  draft.billPayNestedAccountListHeirarchy = (0, getNestedAccountIDHeirarchyForReport_1.geNestedAccountIDHierarchyForReport)(expenseAccountMetadata);
196
- const reimbursementsAccountIdentified = expenseAccountBase.find((account) => account.labels.includes('mileage'));
196
+ const reimbursementsAccountIdentified = expenseAccountBase.find((account) => account.labels.includes('travel_transportation'));
197
197
  if (reimbursementsAccountIdentified != null) {
198
198
  draft.data = Object.assign(Object.assign({}, draft.data), { selectedReimbursementsAccountId: reimbursementsAccountIdentified.accountId, previousReimbursementsAccount: reimbursementsAccountIdentified });
199
199
  }
@@ -18,9 +18,9 @@ export interface AccountMappingLocalData {
18
18
  previousExpenseAccount: AccountBase | undefined;
19
19
  previousBillPayAccount: AccountBase | undefined;
20
20
  previousReimbursementsAccount: AccountBase | undefined;
21
- previousPrepaidExpensesAccount: AccountBase[] | undefined;
22
- previousFixedAssetsAccount: AccountBase[] | undefined;
23
- previousAccruedExpensesAccount: AccountBase[] | undefined;
21
+ previousPrepaidExpensesAccount: AccountBase[];
22
+ previousFixedAssetsAccount: AccountBase[];
23
+ previousAccruedExpensesAccount: AccountBase[];
24
24
  }
25
25
  export interface AccountMappingState {
26
26
  data: AccountMappingLocalData;
@@ -20,7 +20,7 @@ export interface AccountRecommendationBillPay {
20
20
  accounts: Record<Extract<AccountLabel, 'bank_charges_and_fees'>, RecommendedAccountBasePayload[]>;
21
21
  }
22
22
  export interface AccountRecommendationReimbursements {
23
- accounts: Record<Extract<AccountLabel, 'mileage'>, RecommendedAccountBasePayload[]>;
23
+ accounts: Record<Extract<AccountLabel, 'travel_transportation'>, RecommendedAccountBasePayload[]>;
24
24
  }
25
25
  export interface AccountRecommendationPrepaidExpenses {
26
26
  accounts: Record<Extract<AccountLabel, 'prepaid_expenses'>, RecommendedAccountBasePayload[]>;
@@ -27,7 +27,7 @@ const mapAccountTypeRecommendationPayloadToAccountRecommendationByType = (payloa
27
27
  }
28
28
  });
29
29
  const reimbursementsRecommendations = [];
30
- payload.recommendations_by_type.reimbursement.accounts.mileage.forEach((recommendedAccount) => {
30
+ payload.recommendations_by_type.reimbursement.accounts.travel_transportation.forEach((recommendedAccount) => {
31
31
  const account = (0, accountPayload_1.mapRecommendedAccountBasePayloadToRecommendedAccountBase)(recommendedAccount);
32
32
  if (account != null) {
33
33
  reimbursementsRecommendations.push({ account });
@@ -3,5 +3,6 @@ import { Observable } from 'rxjs';
3
3
  import { saveAccountMapping, saveAccountMappingFailure, saveAccountMappingSuccess } from './accountMappingReducer';
4
4
  import { RootState } from '../../reducer';
5
5
  import { ZeniAPI } from '../../zeniAPI';
6
- export declare type ActionType = ReturnType<typeof saveAccountMapping> | ReturnType<typeof saveAccountMappingFailure> | ReturnType<typeof saveAccountMappingSuccess>;
6
+ import { openSnackbar } from '../../entity/snackbar/snackbarReducer';
7
+ export declare type ActionType = ReturnType<typeof saveAccountMapping> | ReturnType<typeof saveAccountMappingFailure> | ReturnType<typeof openSnackbar> | ReturnType<typeof saveAccountMappingSuccess>;
7
8
  export declare const saveAccountMappingViewEpic: (actions$: ActionsObservable<ActionType>, state: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -7,6 +7,7 @@ const accountMappingReducer_1 = require("./accountMappingReducer");
7
7
  const accountMappingPayload_1 = require("./accountMappingPayload");
8
8
  const responsePayload_1 = require("../../responsePayload");
9
9
  const tasksCardReducer_1 = require("../tasksCard/tasksCardReducer");
10
+ const snackbarReducer_1 = require("../../entity/snackbar/snackbarReducer");
10
11
  const saveAccountMappingViewEpic = (actions$, state, zeniAPI) => actions$.pipe((0, operators_1.filter)(accountMappingReducer_1.saveAccountMapping.match), (0, operators_1.mergeMap)(() => {
11
12
  const accountMappingState = state.value.accountMappingState;
12
13
  const payload = (0, accountMappingPayload_1.toSaveAccountMappingPayload)(accountMappingState.data);
@@ -18,16 +19,24 @@ const saveAccountMappingViewEpic = (actions$, state, zeniAPI) => actions$.pipe((
18
19
  .putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accounts`, { accounts: payload })
19
20
  .pipe((0, operators_1.mergeMap)((response) => {
20
21
  if ((0, responsePayload_1.isSuccessStatus)(response)) {
21
- const actions = [
22
+ const actionsSuccess = [
22
23
  (0, tasksCardReducer_1.fetchTasksCard)(),
23
24
  (0, accountMappingReducer_1.saveAccountMappingSuccess)(),
25
+ (0, snackbarReducer_1.openSnackbar)({
26
+ messageSection: 'settings_accounting_accounts_updated',
27
+ messageText: 'success',
28
+ type: 'success',
29
+ }),
24
30
  ];
25
- return (0, rxjs_1.from)(actions);
31
+ return (0, rxjs_1.from)(actionsSuccess);
26
32
  }
27
33
  else {
28
- return (0, rxjs_1.of)((0, accountMappingReducer_1.saveAccountMappingFailure)({
29
- status: response.status,
30
- }));
34
+ const actionsFailure = [
35
+ (0, accountMappingReducer_1.saveAccountMappingFailure)({
36
+ status: response.status,
37
+ }),
38
+ ];
39
+ return (0, rxjs_1.from)(actionsFailure);
31
40
  }
32
41
  }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, accountMappingReducer_1.saveAccountMappingFailure)({
33
42
  status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Save Account Mapping REST API call errored out' +
@@ -4,8 +4,8 @@ import { View } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
4
  export declare const AUDIT_RULE_ENTITY_TYPES: readonly ["reports", "transactions", "dashboard"];
5
5
  export declare const toAuditRuleEntityType: (v: string) => "dashboard" | "transactions" | "reports";
6
6
  export declare type AuditRuleEntityType = ReturnType<typeof toAuditRuleEntityType>;
7
- export declare const AUDIT_RULE_ENTITY_IDS: readonly ["uncategorized-expense", "uncategorized-income", "cash_balance", "card_balance", "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", "charge_cards", "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"];
8
- export declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "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" | "charge_cards" | "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" | "uncategorized-expense" | "uncategorized-income";
7
+ export declare const AUDIT_RULE_ENTITY_IDS: readonly ["uncategorized-expense", "uncategorized-income", "cash_balance", "card_balance", "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", "charge_cards", "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"];
8
+ export declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "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" | "charge_cards" | "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" | "uncategorized-expense" | "uncategorized-income";
9
9
  export declare type AuditRuleEntityIdType = ReturnType<typeof toAuditRuleEntityIdType>;
10
10
  export declare const AUDIT_REPORT_ACTION_TYPES: readonly ["generate", "view"];
11
11
  export declare const toAuditReportActionType: (v: string) => "view" | "generate";
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getBillPayCardReport: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
3
+ reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  fetchState: import("../..").FetchState;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="url-parse" />
2
2
  import { RootState } from '../../reducer';
3
3
  export declare const getCardBalance: (state: RootState) => {
4
- reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
4
+ reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
5
5
  reportTitle: string;
6
6
  version: string | number | undefined;
7
7
  status: import("../..").Status | undefined;
@@ -21,7 +21,7 @@ export declare const getCardBalance: (state: RootState) => {
21
21
  coaId: string | undefined;
22
22
  classesViewParentId: import("../../commonStateTypes/classesView/nestedClassID").ClassesViewParentID | undefined;
23
23
  accountsViewParentId: import("../../commonStateTypes/accountView/nestedAccountID").AccountsViewParentID | undefined;
24
- labels: ("prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "mileage" | "accrued_expenses")[];
24
+ labels: ("prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses")[];
25
25
  }[];
26
26
  balance: import("../..").Balance | undefined;
27
27
  firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="url-parse" />
2
2
  import { RootState } from '../../reducer';
3
3
  export declare const getCashBalance: (state: RootState) => {
4
- reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
4
+ reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
5
5
  reportTitle: string;
6
6
  version: string | number | undefined;
7
7
  status: import("../..").Status | undefined;
@@ -21,7 +21,7 @@ export declare const getCashBalance: (state: RootState) => {
21
21
  coaId: string | undefined;
22
22
  classesViewParentId: import("../../commonStateTypes/classesView/nestedClassID").ClassesViewParentID | undefined;
23
23
  accountsViewParentId: import("../../commonStateTypes/accountView/nestedAccountID").AccountsViewParentID | undefined;
24
- labels: ("prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "mileage" | "accrued_expenses")[];
24
+ labels: ("prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses")[];
25
25
  }[];
26
26
  balance: import("../..").Balance | undefined;
27
27
  firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
@@ -15,7 +15,7 @@ export declare const getCashInCashOut: (accountState: AccountState, accountGroup
15
15
  firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
16
16
  dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
17
17
  availableNumberOfPeriods: number | undefined;
18
- reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
18
+ reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
19
19
  reportTitle: string;
20
20
  version: string | number | undefined;
21
21
  status: import("../..").Status | undefined;
@@ -12,7 +12,7 @@ export declare const getCashPosition: (accountState: AccountState, cashPositionS
12
12
  firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
13
13
  dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
14
14
  availableNumberOfPeriods: number | undefined;
15
- reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
15
+ reportId: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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";
16
16
  reportTitle: string;
17
17
  version: string | number | undefined;
18
18
  status: import("../..").Status | undefined;
@@ -1,11 +1,11 @@
1
1
  import { DashboardState } from './dashboardState';
2
2
  export declare const initialState: DashboardState;
3
- export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "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" | "charge_cards" | "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")[] | undefined], {
3
+ export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "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" | "charge_cards" | "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")[] | undefined], {
4
4
  userId: string;
5
5
  companyId: string;
6
6
  fetchFullReport: any;
7
7
  cacheOverride: any;
8
- excludeResources: ("cash_balance" | "card_balance" | "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" | "charge_cards" | "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")[];
8
+ excludeResources: ("cash_balance" | "card_balance" | "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" | "charge_cards" | "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")[];
9
9
  }, string, never, never>, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
10
10
  declare const _default: import("@reduxjs/toolkit").Reducer<DashboardState, import("@reduxjs/toolkit").AnyAction>;
11
11
  export default _default;
@@ -16,7 +16,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
16
16
  thisPeriod: TimeframeTick;
17
17
  coaBalances: COABalance[];
18
18
  maxNumOfPeriodsToHighlight: number;
19
- }, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "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" | "charge_cards" | "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", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
19
+ }, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "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" | "charge_cards" | "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", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
20
20
  firstMonthOfFY: Month;
21
21
  isCompareModeOn: boolean;
22
22
  additionalBalances: COABalanceType[];
@@ -4,9 +4,9 @@ import { ID } from '../../commonStateTypes/common';
4
4
  import { ZeniAPIStatus } from '../../responsePayload';
5
5
  import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
6
6
  export declare const initialState: GlobalMerchantViewState;
7
- export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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" | undefined], {
7
+ export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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" | undefined], {
8
8
  merchantId: string | undefined;
9
- context: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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" | undefined;
9
+ context: "cash_balance" | "card_balance" | "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" | "charge_cards" | "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" | undefined;
10
10
  }, string, never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
11
11
  merchantId: ID;
12
12
  }, string>, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -0,0 +1,10 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../reducer';
4
+ import { ZeniAPI } from '../../../zeniAPI';
5
+ import { fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, fetchNotificationUnreadCountFailure } from '../notificationViewReducer';
6
+ import { updateAllUsers } from '../../../entity/user/userReducer';
7
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
8
+ import { updateAllNotifications } from '../../../entity/notification/notificationReducer';
9
+ export declare type ActionType = ReturnType<typeof updateAllNotifications> | ReturnType<typeof updateAllUsers> | ReturnType<typeof openSnackbar> | ReturnType<typeof fetchNotificationUnreadCount> | ReturnType<typeof fetchNotificationUnreadCountSuccess> | ReturnType<typeof fetchNotificationUnreadCountFailure>;
10
+ export declare const fetchNotificationUnreadCountEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchNotificationUnreadCountEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const notificationViewReducer_1 = require("../notificationViewReducer");
8
+ const fetchNotificationUnreadCountEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(notificationViewReducer_1.fetchNotificationUnreadCount.match), (0, operators_1.switchMap)((action) => {
9
+ const { notificationGroup, mode } = action.payload;
10
+ const queryParam = {
11
+ fetch_unread_notification_count: true,
12
+ notification_group: notificationGroup,
13
+ mode,
14
+ };
15
+ return zeniAPI
16
+ .getJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
17
+ .pipe((0, operators_1.switchMap)((response) => {
18
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
19
+ const { count: { unread }, } = response.data;
20
+ const actions = [
21
+ (0, notificationViewReducer_1.fetchNotificationUnreadCountSuccess)(unread, notificationGroup),
22
+ ];
23
+ return actions;
24
+ }
25
+ else {
26
+ return (0, rxjs_1.of)((0, notificationViewReducer_1.fetchNotificationUnreadCountFailure)({
27
+ status: response.status,
28
+ notificationGroup,
29
+ }));
30
+ }
31
+ }), (0, operators_1.catchError)((error) => {
32
+ return (0, rxjs_1.of)((0, notificationViewReducer_1.fetchNotificationUnreadCountFailure)({
33
+ status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Notification Unread Count API call errored out' +
34
+ JSON.stringify(error)),
35
+ notificationGroup,
36
+ }));
37
+ }));
38
+ }));
39
+ exports.fetchNotificationUnreadCountEpic = fetchNotificationUnreadCountEpic;
@@ -0,0 +1,9 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../reducer';
4
+ import { ZeniAPI } from '../../../zeniAPI';
5
+ import { fetchNotificationView, fetchNotificationViewSuccess, fetchNotificationViewFailure } from '../notificationViewReducer';
6
+ import { updateAllUsers } from '../../../entity/user/userReducer';
7
+ import { updateAllNotifications } from '../../../entity/notification/notificationReducer';
8
+ export declare type ActionType = ReturnType<typeof updateAllNotifications> | ReturnType<typeof updateAllUsers> | ReturnType<typeof fetchNotificationView> | ReturnType<typeof fetchNotificationViewSuccess> | ReturnType<typeof fetchNotificationViewFailure>;
9
+ export declare const fetchNotificationViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchNotificationViewEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const notificationViewReducer_1 = require("../notificationViewReducer");
8
+ const userReducer_1 = require("../../../entity/user/userReducer");
9
+ const notificationReducer_1 = require("../../../entity/notification/notificationReducer");
10
+ const fetchNotificationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(notificationViewReducer_1.fetchNotificationView.match), (0, operators_1.switchMap)((action) => {
11
+ const { notificationGroup, mode, status } = action.payload;
12
+ const { stateByTab } = state$.value.notificationViewState;
13
+ const notificationTab = (0, notificationViewReducer_1.toNotificationTab)(notificationGroup);
14
+ const notificationTabState = stateByTab[notificationTab];
15
+ const queryParam = {
16
+ status,
17
+ notification_group: notificationGroup,
18
+ is_paginated: true,
19
+ limit: 10,
20
+ mode,
21
+ page_token: notificationTabState.uiState.pageToken,
22
+ };
23
+ return zeniAPI
24
+ .getJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
25
+ .pipe((0, operators_1.switchMap)((response) => {
26
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
27
+ const { notifications, total_count, next_page_token } = response.data;
28
+ const allUsers = [];
29
+ notifications.forEach((notification) => {
30
+ allUsers.push(...notification.data.authors);
31
+ });
32
+ const allUniqueUsers = [
33
+ ...new Map(allUsers.map((user) => [user.user_id, user])).values(),
34
+ ];
35
+ const actions = [
36
+ (0, userReducer_1.updateAllUsers)({ users: allUniqueUsers, updateType: 'merge' }),
37
+ (0, notificationReducer_1.updateAllNotifications)(notifications, 'replace'),
38
+ (0, notificationViewReducer_1.fetchNotificationViewSuccess)(notifications, total_count, notificationGroup, next_page_token),
39
+ ];
40
+ return actions;
41
+ }
42
+ else {
43
+ return (0, rxjs_1.of)((0, notificationViewReducer_1.fetchNotificationViewFailure)({
44
+ status: response.status,
45
+ notificationGroup,
46
+ }));
47
+ }
48
+ }), (0, operators_1.catchError)((error) => {
49
+ return (0, rxjs_1.of)((0, notificationViewReducer_1.fetchNotificationViewFailure)({
50
+ status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Notification View API call errored out' +
51
+ JSON.stringify(error)),
52
+ notificationGroup,
53
+ }));
54
+ }));
55
+ }));
56
+ exports.fetchNotificationViewEpic = fetchNotificationViewEpic;
@@ -0,0 +1,9 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../reducer';
4
+ import { ZeniAPI } from '../../../zeniAPI';
5
+ import { updateNotificationViewAllNotificationsStatus, updateNotificationViewAllNotificationsStatusSuccess, updateNotificationViewAllNotificationsStatusFailure } from '../notificationViewReducer';
6
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
7
+ import { updateNotificationsStatuses } from '../../../entity/notification/notificationReducer';
8
+ export declare type ActionType = ReturnType<typeof openSnackbar> | ReturnType<typeof updateNotificationsStatuses> | ReturnType<typeof updateNotificationViewAllNotificationsStatus> | ReturnType<typeof updateNotificationViewAllNotificationsStatusSuccess> | ReturnType<typeof updateNotificationViewAllNotificationsStatusFailure>;
9
+ export declare const updateNotificationViewAllNotificationsStatusEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateNotificationViewAllNotificationsStatusEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const notificationViewReducer_1 = require("../notificationViewReducer");
8
+ const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
9
+ const notificationReducer_1 = require("../../../entity/notification/notificationReducer");
10
+ const updateNotificationViewAllNotificationsStatusEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(notificationViewReducer_1.updateNotificationViewAllNotificationsStatus.match), (0, operators_1.switchMap)((action) => {
11
+ const { notificationGroup, status } = action.payload;
12
+ const { notificationViewState } = state$.value;
13
+ const { stateByTab } = notificationViewState;
14
+ const { allNotificationsIds } = stateByTab['tasks'];
15
+ const queryParam = {
16
+ mark_all_as_read: status === 'read',
17
+ };
18
+ return zeniAPI
19
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification-dashboard?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
20
+ .pipe((0, operators_1.switchMap)((response) => {
21
+ if ((0, responsePayload_1.isSuccessStatus)(response)) {
22
+ return (0, rxjs_1.of)((0, snackbarReducer_1.openSnackbar)({
23
+ messageSection: 'notification_mark_as_read',
24
+ messageText: 'success',
25
+ type: 'success',
26
+ }), (0, notificationReducer_1.updateNotificationsStatuses)(allNotificationsIds, status), (0, notificationViewReducer_1.updateNotificationViewAllNotificationsStatusSuccess)(notificationGroup));
27
+ }
28
+ else {
29
+ return (0, rxjs_1.of)((0, notificationViewReducer_1.updateNotificationViewAllNotificationsStatusFailure)({
30
+ status: response.status,
31
+ notificationGroup,
32
+ }), (0, snackbarReducer_1.openSnackbar)({
33
+ messageSection: 'notification_mark_as_read',
34
+ messageText: 'failed',
35
+ type: 'error',
36
+ variables: [
37
+ {
38
+ variableName: '_api-error_',
39
+ variableValue: response.status.message,
40
+ },
41
+ ],
42
+ }));
43
+ }
44
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, notificationViewReducer_1.updateNotificationViewAllNotificationsStatusFailure)({
45
+ status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update All Notifications Status API call errored out' +
46
+ JSON.stringify(error)),
47
+ notificationGroup,
48
+ }))));
49
+ }));
50
+ exports.updateNotificationViewAllNotificationsStatusEpic = updateNotificationViewAllNotificationsStatusEpic;
@@ -0,0 +1,9 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../reducer';
4
+ import { ZeniAPI } from '../../../zeniAPI';
5
+ import { updateNotificationViewNotificationStatus, updateNotificationViewNotificationStatusSuccess, updateNotificationViewNotificationStatusFailure } from '../notificationViewReducer';
6
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
7
+ import { updateNotificationsStatuses } from '../../../entity/notification/notificationReducer';
8
+ export declare type ActionType = ReturnType<typeof openSnackbar> | ReturnType<typeof updateNotificationsStatuses> | ReturnType<typeof updateNotificationViewNotificationStatus> | ReturnType<typeof updateNotificationViewNotificationStatusSuccess> | ReturnType<typeof updateNotificationViewNotificationStatusFailure>;
9
+ export declare const updateNotificationViewNotificationStatusEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;