@zeniai/client-epic-state 5.0.42 → 5.0.43-betaRD1

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 (118) hide show
  1. package/lib/commonStateTypes/recommendationBase.d.ts +1 -1
  2. package/lib/entity/chargeCardRepayment/chargeCardRepayment.d.ts +1 -1
  3. package/lib/entity/creditAgent/creditAgentPayload.d.ts +41 -0
  4. package/lib/entity/creditAgent/creditAgentPayload.js +40 -0
  5. package/lib/entity/creditAgent/creditAgentReducer.d.ts +9 -0
  6. package/lib/entity/creditAgent/creditAgentReducer.js +37 -0
  7. package/lib/entity/creditAgent/creditAgentSelector.d.ts +3 -0
  8. package/lib/entity/creditAgent/creditAgentSelector.js +10 -0
  9. package/lib/entity/creditAgent/creditAgentState.d.ts +39 -0
  10. package/lib/entity/creditAgent/creditAgentState.js +17 -0
  11. package/lib/entity/project/projectPayload.d.ts +7 -0
  12. package/lib/entity/project/projectPayload.js +15 -1
  13. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  14. package/lib/entity/snackbar/snackbarTypes.js +3 -0
  15. package/lib/entity/task/taskPayload.d.ts +1 -0
  16. package/lib/entity/task/taskPayload.js +5 -0
  17. package/lib/entity/task/taskState.d.ts +5 -0
  18. package/lib/entity/task/taskState.js +6 -1
  19. package/lib/entity/tenant/clearAllEpic.d.ts +6 -3
  20. package/lib/entity/tenant/clearAllEpic.js +8 -2
  21. package/lib/entity/transaction/payloadTypes/transactionLinePayload.d.ts +2 -0
  22. package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +9 -0
  23. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +2 -0
  24. package/lib/epic.d.ts +8 -1
  25. package/lib/epic.js +8 -1
  26. package/lib/esm/entity/creditAgent/creditAgentPayload.js +36 -0
  27. package/lib/esm/entity/creditAgent/creditAgentReducer.js +33 -0
  28. package/lib/esm/entity/creditAgent/creditAgentSelector.js +6 -0
  29. package/lib/esm/entity/creditAgent/creditAgentState.js +13 -0
  30. package/lib/esm/entity/project/projectPayload.js +12 -0
  31. package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
  32. package/lib/esm/entity/task/taskPayload.js +6 -1
  33. package/lib/esm/entity/task/taskState.js +3 -0
  34. package/lib/esm/entity/tenant/clearAllEpic.js +8 -2
  35. package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +9 -0
  36. package/lib/esm/epic.js +8 -1
  37. package/lib/esm/index.js +18 -10
  38. package/lib/esm/reducer.js +12 -3
  39. package/lib/esm/view/common/recurringViewHelper.js +17 -0
  40. package/lib/esm/view/creditAgentView/buildCreditReportCsv.js +44 -0
  41. package/lib/esm/view/creditAgentView/creditAgentViewPayload.js +2 -0
  42. package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +183 -0
  43. package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +85 -0
  44. package/lib/esm/view/creditAgentView/creditAgentViewState.js +20 -0
  45. package/lib/esm/view/creditAgentView/epics/fetchCardProfilesEpic.js +20 -0
  46. package/lib/esm/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +13 -0
  47. package/lib/esm/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +19 -0
  48. package/lib/esm/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +58 -0
  49. package/lib/esm/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +39 -0
  50. package/lib/esm/view/creditAgentView/epics/updateCardProfileEpic.js +62 -0
  51. package/lib/esm/view/projectList/fetchProjectListEpic.js +38 -0
  52. package/lib/esm/view/projectList/projectListPayload.js +1 -0
  53. package/lib/esm/view/projectList/projectListReducer.js +39 -0
  54. package/lib/esm/view/projectList/projectListSelector.js +9 -0
  55. package/lib/esm/view/projectList/projectListState.js +1 -0
  56. package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +2 -0
  57. package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +5 -0
  58. package/lib/esm/view/taskManager/taskDetailView/taskDetail.js +1 -0
  59. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +5 -0
  60. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +1 -0
  61. package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +6 -0
  62. package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +3 -0
  63. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +14 -2
  64. package/lib/index.d.ts +24 -14
  65. package/lib/index.js +81 -46
  66. package/lib/reducer.d.ts +12 -3
  67. package/lib/reducer.js +12 -3
  68. package/lib/view/common/recurringViewHelper.d.ts +3 -2
  69. package/lib/view/common/recurringViewHelper.js +18 -1
  70. package/lib/view/creditAgentView/buildCreditReportCsv.d.ts +17 -0
  71. package/lib/view/creditAgentView/buildCreditReportCsv.js +47 -0
  72. package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +9 -0
  73. package/lib/view/creditAgentView/creditAgentViewPayload.js +7 -0
  74. package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +41 -0
  75. package/lib/view/creditAgentView/creditAgentViewReducer.js +187 -0
  76. package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +20 -0
  77. package/lib/view/creditAgentView/creditAgentViewSelector.js +93 -0
  78. package/lib/view/creditAgentView/creditAgentViewState.d.ts +34 -0
  79. package/lib/view/creditAgentView/creditAgentViewState.js +22 -0
  80. package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.d.ts +15 -0
  81. package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.js +24 -0
  82. package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.d.ts +11 -0
  83. package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +17 -0
  84. package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.d.ts +15 -0
  85. package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +23 -0
  86. package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.d.ts +29 -0
  87. package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +62 -0
  88. package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.d.ts +30 -0
  89. package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +43 -0
  90. package/lib/view/creditAgentView/epics/updateCardProfileEpic.d.ts +37 -0
  91. package/lib/view/creditAgentView/epics/updateCardProfileEpic.js +66 -0
  92. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  93. package/lib/view/projectList/fetchProjectListEpic.d.ts +8 -0
  94. package/lib/view/projectList/fetchProjectListEpic.js +42 -0
  95. package/lib/view/projectList/projectListPayload.d.ts +7 -0
  96. package/lib/view/projectList/projectListPayload.js +2 -0
  97. package/lib/view/projectList/projectListReducer.d.ts +9 -0
  98. package/lib/view/projectList/projectListReducer.js +43 -0
  99. package/lib/view/projectList/projectListSelector.d.ts +8 -0
  100. package/lib/view/projectList/projectListSelector.js +13 -0
  101. package/lib/view/projectList/projectListState.d.ts +4 -0
  102. package/lib/view/projectList/projectListState.js +2 -0
  103. package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +2 -0
  104. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +5 -0
  105. package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +3 -1
  106. package/lib/view/taskManager/taskDetailView/taskDetail.js +1 -0
  107. package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +1 -0
  108. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +5 -0
  109. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +1 -0
  110. package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +2 -1
  111. package/lib/view/transactionDetail/epics/transactionDetailEpic.js +6 -0
  112. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +3 -0
  113. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +3 -0
  114. package/lib/view/transactionDetail/transactionDetailSelector.js +13 -1
  115. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -0
  116. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +2 -0
  117. package/package.json +1 -1
  118. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getCardProfilesData = exports.getCreditAgentMacro = exports.getCreditAgentEntity = exports.getCreditAgentView = void 0;
7
+ const toolkit_1 = require("@reduxjs/toolkit");
8
+ const orderBy_1 = __importDefault(require("lodash/orderBy"));
9
+ const getCreditAgentView = (state) => state.creditAgentViewState;
10
+ exports.getCreditAgentView = getCreditAgentView;
11
+ const getCreditAgentEntity = (state) => state.creditAgentEntityState;
12
+ exports.getCreditAgentEntity = getCreditAgentEntity;
13
+ exports.getCreditAgentMacro = (0, toolkit_1.createSelector)(exports.getCreditAgentView, exports.getCreditAgentEntity, (view, entity) => ({
14
+ ...view.macro,
15
+ data: entity.macro,
16
+ }));
17
+ exports.getCardProfilesData = (0, toolkit_1.createSelector)(exports.getCreditAgentView, exports.getCreditAgentEntity, (view, entity) => {
18
+ const { uiState } = view;
19
+ const allRows = Object.values(entity.rowByTenantId).map((row) => {
20
+ const tenantView = view.tenantViewByTenantId[row.tenantId];
21
+ return {
22
+ ...row,
23
+ analyzeStatus: tenantView?.analyzeStatus ?? {
24
+ fetchState: 'Not-Started',
25
+ },
26
+ updateStatus: tenantView?.updateStatus ?? { fetchState: 'Not-Started' },
27
+ };
28
+ });
29
+ let filteredRows = allRows;
30
+ // Text filter
31
+ const trimmedFilterText = uiState.filterText.trim();
32
+ if (trimmedFilterText.length > 0) {
33
+ const query = trimmedFilterText.toLowerCase();
34
+ filteredRows = filteredRows.filter((row) => (row.customerName ?? '').toLowerCase().includes(query) ||
35
+ row.tenantId.toLowerCase().includes(query));
36
+ }
37
+ // Focus filter
38
+ filteredRows = applyFocusFilter(filteredRows, uiState.focus);
39
+ // Min score filter
40
+ if (uiState.minScore > 0) {
41
+ filteredRows = filteredRows.filter((row) => {
42
+ const score = parseFloat(row.creditScore ?? '0');
43
+ return score >= uiState.minScore;
44
+ });
45
+ }
46
+ // Sorting
47
+ const sortedRows = getSortedRows(filteredRows, uiState.sortKey, uiState.sortDir);
48
+ return {
49
+ fetchStatus: view.profilesFetchStatus,
50
+ rows: sortedRows,
51
+ uiState,
52
+ };
53
+ });
54
+ // ── Helpers ──
55
+ const applyFocusFilter = (rows, focus) => {
56
+ switch (focus) {
57
+ case 'New only':
58
+ return rows.filter((row) => row.isNew);
59
+ case 'Interested':
60
+ return rows.filter((row) => row.cardStatus === 'Interested');
61
+ case 'Active only':
62
+ return rows.filter((row) => row.cardStatus === 'Active' || row.cardStatus === 'Enabled');
63
+ case 'All':
64
+ default:
65
+ return rows;
66
+ }
67
+ };
68
+ const getSortedRows = (rows, sortKey, sortDir) => {
69
+ if (sortKey == null) {
70
+ return rows;
71
+ }
72
+ const direction = sortDir === 'asc' ? 'asc' : 'desc';
73
+ return (0, orderBy_1.default)(rows, (row) => {
74
+ switch (sortKey) {
75
+ case 'name':
76
+ return (row.customerName ?? '').toLowerCase();
77
+ case 'status':
78
+ return row.cardStatus.toLowerCase();
79
+ case 'creditLimit':
80
+ return row.creditLimit ?? 0;
81
+ case 'creditScore':
82
+ return parseFloat(row.creditScore ?? '0');
83
+ case 'recAmount':
84
+ return row.recommendedAmount ?? 0;
85
+ case 'reportDate':
86
+ return row.reportDate?.valueOf() ?? 0;
87
+ case 'updatedBy':
88
+ return (row.updatedByName ?? '').toLowerCase();
89
+ default:
90
+ return (row.customerName ?? '').toLowerCase();
91
+ }
92
+ }, direction);
93
+ };
@@ -0,0 +1,34 @@
1
+ import { FetchStateAndError, ID } from '../../commonStateTypes/common';
2
+ export type { CardStatus, CardTenantProfileRow, CreditAgentMacro, } from '../../entity/creditAgent/creditAgentState';
3
+ declare const toCreditAgentSortKeyType: (v: string) => "status" | "name" | "creditLimit" | "creditScore" | "reportDate" | "recAmount" | "updatedBy";
4
+ export type CreditAgentSortKey = ReturnType<typeof toCreditAgentSortKeyType>;
5
+ export type CreditAgentSortDir = 'asc' | 'desc';
6
+ declare const toCreditAgentFocusFilterType: (v: string) => "Interested" | "All" | "New only" | "Active only";
7
+ export type CreditAgentFocusFilter = ReturnType<typeof toCreditAgentFocusFilterType>;
8
+ export interface CreditAgentUIState {
9
+ filterText: string;
10
+ focus: CreditAgentFocusFilter;
11
+ minScore: number;
12
+ sortDir: CreditAgentSortDir;
13
+ sortKey?: CreditAgentSortKey;
14
+ }
15
+ export interface CreditAgentAccessState {
16
+ fetchStatus: FetchStateAndError;
17
+ isAllowed: boolean;
18
+ }
19
+ export interface CreditAgentTenantView {
20
+ analyzeStatus: FetchStateAndError;
21
+ tenantId: ID;
22
+ updateStatus: FetchStateAndError;
23
+ }
24
+ export interface CreditAgentMacroState {
25
+ fetchStatus: FetchStateAndError;
26
+ updateStatus: FetchStateAndError;
27
+ }
28
+ export interface CreditAgentViewState {
29
+ access: CreditAgentAccessState;
30
+ macro: CreditAgentMacroState;
31
+ profilesFetchStatus: FetchStateAndError;
32
+ tenantViewByTenantId: Record<ID, CreditAgentTenantView>;
33
+ uiState: CreditAgentUIState;
34
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
4
+ const ALL_CREDIT_AGENT_SORT_KEYS = [
5
+ 'name',
6
+ 'status',
7
+ 'creditLimit',
8
+ 'creditScore',
9
+ 'recAmount',
10
+ 'reportDate',
11
+ 'updatedBy',
12
+ ];
13
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
14
+ const toCreditAgentSortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_CREDIT_AGENT_SORT_KEYS);
15
+ const ALL_CREDIT_AGENT_FOCUS_FILTERS = [
16
+ 'All',
17
+ 'New only',
18
+ 'Interested',
19
+ 'Active only',
20
+ ];
21
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
+ const toCreditAgentFocusFilterType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_CREDIT_AGENT_FOCUS_FILTERS);
@@ -0,0 +1,15 @@
1
+ import { ActionsObservable } from 'redux-observable';
2
+ import { updateCreditAgentRows } from '../../../entity/creditAgent/creditAgentReducer';
3
+ import { ZeniAPI } from '../../../zeniAPI';
4
+ import { fetchCardProfiles, fetchCardProfilesFailure, fetchCardProfilesSuccess } from '../creditAgentViewReducer';
5
+ export type ActionType = ReturnType<typeof fetchCardProfiles> | ReturnType<typeof fetchCardProfilesSuccess> | ReturnType<typeof fetchCardProfilesFailure> | ReturnType<typeof updateCreditAgentRows>;
6
+ export declare const fetchCardProfilesEpic: (actions$: ActionsObservable<ActionType>, _state$: unknown, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
+ payload: import("../creditAgentViewPayload").CardTenantProfileRowPayload[];
8
+ type: "creditAgentView/fetchCardProfilesSuccess";
9
+ } | {
10
+ payload: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
11
+ type: "creditAgentView/fetchCardProfilesFailure";
12
+ } | {
13
+ payload: import("../creditAgentViewPayload").CardTenantProfileRowPayload[];
14
+ type: "creditAgent/updateCreditAgentRows";
15
+ }>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchCardProfilesEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const creditAgentReducer_1 = require("../../../entity/creditAgent/creditAgentReducer");
7
+ const responsePayload_1 = require("../../../responsePayload");
8
+ const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
9
+ const fetchCardProfilesEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.fetchCardProfiles.match), (0, operators_1.switchMap)(() => {
10
+ const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cockpit/card-tenant-profiles`;
11
+ return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
12
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
13
+ const rawRows = response.data.rows;
14
+ return (0, rxjs_1.from)([
15
+ (0, creditAgentReducer_1.updateCreditAgentRows)(rawRows),
16
+ (0, creditAgentViewReducer_1.fetchCardProfilesSuccess)(rawRows),
17
+ ]);
18
+ }
19
+ else {
20
+ return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCardProfilesFailure)(response.status));
21
+ }
22
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCardProfilesFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
23
+ }));
24
+ exports.fetchCardProfilesEpic = fetchCardProfilesEpic;
@@ -0,0 +1,11 @@
1
+ import { ActionsObservable } from 'redux-observable';
2
+ import { ZeniAPI } from '../../../zeniAPI';
3
+ import { fetchCreditAgentAccess, fetchCreditAgentAccessFailure, fetchCreditAgentAccessSuccess } from '../creditAgentViewReducer';
4
+ export type ActionType = ReturnType<typeof fetchCreditAgentAccess> | ReturnType<typeof fetchCreditAgentAccessSuccess> | ReturnType<typeof fetchCreditAgentAccessFailure>;
5
+ export declare const fetchCreditAgentAccessEpic: (actions$: ActionsObservable<ActionType>, _state$: unknown, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
6
+ payload: boolean;
7
+ type: "creditAgentView/fetchCreditAgentAccessSuccess";
8
+ } | {
9
+ payload: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
10
+ type: "creditAgentView/fetchCreditAgentAccessFailure";
11
+ }>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchCreditAgentAccessEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
8
+ const fetchCreditAgentAccessEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.fetchCreditAgentAccess.match), (0, operators_1.switchMap)(() => {
9
+ const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cockpit/cards-cockpit-access`;
10
+ return zeniAPI.getJSON(url).pipe((0, operators_1.switchMap)((response) => {
11
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
12
+ return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentAccessSuccess)(response.data.is_allowed === true));
13
+ }
14
+ return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentAccessFailure)(response.status));
15
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentAccessFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
16
+ }));
17
+ exports.fetchCreditAgentAccessEpic = fetchCreditAgentAccessEpic;
@@ -0,0 +1,15 @@
1
+ import { ActionsObservable } from 'redux-observable';
2
+ import { updateCreditAgentMacro } from '../../../entity/creditAgent/creditAgentReducer';
3
+ import { ZeniAPI } from '../../../zeniAPI';
4
+ import { fetchCreditAgentMacro, fetchCreditAgentMacroFailure, fetchCreditAgentMacroSuccess } from '../creditAgentViewReducer';
5
+ export type ActionType = ReturnType<typeof fetchCreditAgentMacro> | ReturnType<typeof fetchCreditAgentMacroSuccess> | ReturnType<typeof fetchCreditAgentMacroFailure> | ReturnType<typeof updateCreditAgentMacro>;
6
+ export declare const fetchCreditAgentMacroEpic: (actions$: ActionsObservable<ActionType>, _state$: unknown, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
+ payload: undefined;
8
+ type: "creditAgentView/fetchCreditAgentMacroSuccess";
9
+ } | {
10
+ payload: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
11
+ type: "creditAgentView/fetchCreditAgentMacroFailure";
12
+ } | {
13
+ payload: import("../creditAgentViewPayload").MacroPayload;
14
+ type: "creditAgent/updateCreditAgentMacro";
15
+ }>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchCreditAgentMacroEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const creditAgentReducer_1 = require("../../../entity/creditAgent/creditAgentReducer");
7
+ const responsePayload_1 = require("../../../responsePayload");
8
+ const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
9
+ const fetchCreditAgentMacroEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.fetchCreditAgentMacro.match), (0, operators_1.switchMap)(() => {
10
+ const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/macros/credit-agent`;
11
+ return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
12
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
13
+ return (0, rxjs_1.from)([
14
+ (0, creditAgentReducer_1.updateCreditAgentMacro)(response.data),
15
+ (0, creditAgentViewReducer_1.fetchCreditAgentMacroSuccess)(),
16
+ ]);
17
+ }
18
+ else {
19
+ return (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentMacroFailure)(response.status));
20
+ }
21
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, creditAgentViewReducer_1.fetchCreditAgentMacroFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))))));
22
+ }));
23
+ exports.fetchCreditAgentMacroEpic = fetchCreditAgentMacroEpic;
@@ -0,0 +1,29 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { updateCreditAgentMacro } from '../../../entity/creditAgent/creditAgentReducer';
3
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
4
+ import { RootState } from '../../../reducer';
5
+ import { ZeniAPI } from '../../../zeniAPI';
6
+ import { saveCreditAgentMacro, saveCreditAgentMacroFailure, saveCreditAgentMacroSuccess } from '../creditAgentViewReducer';
7
+ export type ActionType = ReturnType<typeof saveCreditAgentMacro> | ReturnType<typeof saveCreditAgentMacroSuccess> | ReturnType<typeof saveCreditAgentMacroFailure> | ReturnType<typeof updateCreditAgentMacro> | ReturnType<typeof openSnackbar>;
8
+ export declare const saveCreditAgentMacroEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
9
+ payload: {
10
+ messageSection: import("../../..").SnackbarMessageSections;
11
+ messageText: import("../../..").SnackbarMessageSectionTexts;
12
+ type: import("../../..").SnackbarMessageType;
13
+ showStatusIcon?: boolean;
14
+ variables?: {
15
+ variableName: string;
16
+ variableValue: string;
17
+ }[];
18
+ };
19
+ type: "snackbar/openSnackbar";
20
+ } | {
21
+ payload: import("../creditAgentViewPayload").MacroPayload;
22
+ type: "creditAgent/updateCreditAgentMacro";
23
+ } | {
24
+ payload: undefined;
25
+ type: "creditAgentView/saveCreditAgentMacroSuccess";
26
+ } | {
27
+ payload: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
28
+ type: "creditAgentView/saveCreditAgentMacroFailure";
29
+ }>;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.saveCreditAgentMacroEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const creditAgentReducer_1 = require("../../../entity/creditAgent/creditAgentReducer");
7
+ const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
8
+ const responsePayload_1 = require("../../../responsePayload");
9
+ const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
10
+ const saveCreditAgentMacroEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.saveCreditAgentMacro.match), (0, operators_1.switchMap)((action) => {
11
+ const { instructions } = action.payload;
12
+ const existingMacro = state$.value.creditAgentEntityState.macro;
13
+ // Fail fast if macro has not been loaded yet — avoids overwriting server-side
14
+ // name/description fields with empty defaults.
15
+ if (existingMacro == null) {
16
+ return (0, rxjs_1.from)([
17
+ (0, creditAgentViewReducer_1.saveCreditAgentMacroFailure)((0, responsePayload_1.createZeniAPIStatus)('Save failed', 'Cannot save macro: macro data has not been loaded yet.')),
18
+ (0, snackbarReducer_1.openSnackbar)({
19
+ messageSection: 'credit_agent_save_macro',
20
+ messageText: 'failed',
21
+ type: 'error',
22
+ }),
23
+ ]);
24
+ }
25
+ const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/macros/credit-agent`;
26
+ const body = {
27
+ instructions,
28
+ name: existingMacro.name,
29
+ description: existingMacro.description,
30
+ };
31
+ return zeniAPI.putAndGetJSON(url, body).pipe((0, operators_1.mergeMap)((response) => {
32
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
33
+ return (0, rxjs_1.from)([
34
+ (0, creditAgentReducer_1.updateCreditAgentMacro)(response.data),
35
+ (0, creditAgentViewReducer_1.saveCreditAgentMacroSuccess)(),
36
+ (0, snackbarReducer_1.openSnackbar)({
37
+ messageSection: 'credit_agent_save_macro',
38
+ messageText: 'success',
39
+ type: 'success',
40
+ }),
41
+ ]);
42
+ }
43
+ else {
44
+ return (0, rxjs_1.from)([
45
+ (0, creditAgentViewReducer_1.saveCreditAgentMacroFailure)(response.status),
46
+ (0, snackbarReducer_1.openSnackbar)({
47
+ messageSection: 'credit_agent_save_macro',
48
+ messageText: 'failed',
49
+ type: 'error',
50
+ }),
51
+ ]);
52
+ }
53
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
54
+ (0, creditAgentViewReducer_1.saveCreditAgentMacroFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))),
55
+ (0, snackbarReducer_1.openSnackbar)({
56
+ messageSection: 'credit_agent_save_macro',
57
+ messageText: 'failed',
58
+ type: 'error',
59
+ }),
60
+ ])));
61
+ }));
62
+ exports.saveCreditAgentMacroEpic = saveCreditAgentMacroEpic;
@@ -0,0 +1,30 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
3
+ import { RootState } from '../../../reducer';
4
+ import { ZeniAPI } from '../../../zeniAPI';
5
+ import { scheduleTenantCreditScoreCron, scheduleTenantCreditScoreCronFailure, scheduleTenantCreditScoreCronSuccess } from '../creditAgentViewReducer';
6
+ export type ActionType = ReturnType<typeof scheduleTenantCreditScoreCron> | ReturnType<typeof scheduleTenantCreditScoreCronSuccess> | ReturnType<typeof scheduleTenantCreditScoreCronFailure> | ReturnType<typeof openSnackbar>;
7
+ export declare const scheduleTenantCreditScoreCronEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
8
+ payload: {
9
+ messageSection: import("../../..").SnackbarMessageSections;
10
+ messageText: import("../../..").SnackbarMessageSectionTexts;
11
+ type: import("../../..").SnackbarMessageType;
12
+ showStatusIcon?: boolean;
13
+ variables?: {
14
+ variableName: string;
15
+ variableValue: string;
16
+ }[];
17
+ };
18
+ type: "snackbar/openSnackbar";
19
+ } | {
20
+ payload: {
21
+ tenantId: string | undefined;
22
+ };
23
+ type: "creditAgentView/scheduleTenantCreditScoreCronSuccess";
24
+ } | {
25
+ payload: {
26
+ tenantId: string | undefined;
27
+ error: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
28
+ };
29
+ type: "creditAgentView/scheduleTenantCreditScoreCronFailure";
30
+ }>;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scheduleTenantCreditScoreCronEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
7
+ const responsePayload_1 = require("../../../responsePayload");
8
+ const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
9
+ const scheduleTenantCreditScoreCronEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.scheduleTenantCreditScoreCron.match), (0, operators_1.mergeMap)((action) => {
10
+ const { tenantId } = action.payload;
11
+ const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/crons/cards/tenant-credit-score`;
12
+ const body = tenantId != null ? { tenant_id: tenantId } : {};
13
+ return zeniAPI.postAndGetJSON(url, body).pipe((0, operators_1.mergeMap)((response) => {
14
+ if ((0, responsePayload_1.isSuccessResponse)(response)) {
15
+ return (0, rxjs_1.from)([
16
+ (0, creditAgentViewReducer_1.scheduleTenantCreditScoreCronSuccess)(tenantId),
17
+ (0, snackbarReducer_1.openSnackbar)({
18
+ messageSection: 'credit_agent_schedule_cron',
19
+ messageText: 'success',
20
+ type: 'success',
21
+ }),
22
+ ]);
23
+ }
24
+ else {
25
+ return (0, rxjs_1.from)([
26
+ (0, creditAgentViewReducer_1.scheduleTenantCreditScoreCronFailure)(tenantId, response.status),
27
+ (0, snackbarReducer_1.openSnackbar)({
28
+ messageSection: 'credit_agent_schedule_cron',
29
+ messageText: 'failed',
30
+ type: 'error',
31
+ }),
32
+ ]);
33
+ }
34
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
35
+ (0, creditAgentViewReducer_1.scheduleTenantCreditScoreCronFailure)(tenantId, (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))),
36
+ (0, snackbarReducer_1.openSnackbar)({
37
+ messageSection: 'credit_agent_schedule_cron',
38
+ messageText: 'failed',
39
+ type: 'error',
40
+ }),
41
+ ])));
42
+ }));
43
+ exports.scheduleTenantCreditScoreCronEpic = scheduleTenantCreditScoreCronEpic;
@@ -0,0 +1,37 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { updateCreditAgentRow } from '../../../entity/creditAgent/creditAgentReducer';
3
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
4
+ import { RootState } from '../../../reducer';
5
+ import { ZeniAPI } from '../../../zeniAPI';
6
+ import { updateCardProfile, updateCardProfileFailure, updateCardProfileSuccess } from '../creditAgentViewReducer';
7
+ export type ActionType = ReturnType<typeof updateCardProfile> | ReturnType<typeof updateCardProfileSuccess> | ReturnType<typeof updateCardProfileFailure> | ReturnType<typeof updateCreditAgentRow> | ReturnType<typeof openSnackbar>;
8
+ export declare const updateCardProfileEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
9
+ payload: {
10
+ messageSection: import("../../..").SnackbarMessageSections;
11
+ messageText: import("../../..").SnackbarMessageSectionTexts;
12
+ type: import("../../..").SnackbarMessageType;
13
+ showStatusIcon?: boolean;
14
+ variables?: {
15
+ variableName: string;
16
+ variableValue: string;
17
+ }[];
18
+ };
19
+ type: "snackbar/openSnackbar";
20
+ } | {
21
+ payload: {
22
+ tenantId: string;
23
+ };
24
+ type: "creditAgentView/updateCardProfileSuccess";
25
+ } | {
26
+ payload: {
27
+ tenantId: string;
28
+ error: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
29
+ };
30
+ type: "creditAgentView/updateCardProfileFailure";
31
+ } | {
32
+ payload: {
33
+ payload: import("../creditAgentViewPayload").CardTenantProfileRowPayload;
34
+ tenantId: string;
35
+ };
36
+ type: "creditAgent/updateCreditAgentRow";
37
+ }>;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateCardProfileEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const creditAgentReducer_1 = require("../../../entity/creditAgent/creditAgentReducer");
7
+ const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
8
+ const responsePayload_1 = require("../../../responsePayload");
9
+ const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
10
+ const updateCardProfileEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.updateCardProfile.match), (0, operators_1.mergeMap)((action) => {
11
+ const { tenantId, tenantEmailDomain, update } = action.payload;
12
+ const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cockpit/card-tenant-profiles`;
13
+ const body = {
14
+ tenant_namespace: tenantEmailDomain,
15
+ };
16
+ if (update.cardStatus != null) {
17
+ body.card_status = update.cardStatus;
18
+ }
19
+ if (update.creditLimit != null) {
20
+ body.credit_limit = update.creditLimit;
21
+ }
22
+ if (update.updatedByName != null) {
23
+ body.updated_by_name = update.updatedByName;
24
+ }
25
+ if (update.reason != null && update.reason.trim() !== '') {
26
+ body.reason = update.reason.trim();
27
+ }
28
+ return zeniAPI
29
+ .putAndGetJSON(url, body)
30
+ .pipe((0, operators_1.mergeMap)((response) => {
31
+ if ((0, responsePayload_1.isSuccessResponse)(response) &&
32
+ response.data != null &&
33
+ response.data.profile != null) {
34
+ return (0, rxjs_1.from)([
35
+ (0, creditAgentReducer_1.updateCreditAgentRow)({
36
+ payload: response.data.profile,
37
+ tenantId,
38
+ }),
39
+ (0, creditAgentViewReducer_1.updateCardProfileSuccess)(tenantId),
40
+ (0, snackbarReducer_1.openSnackbar)({
41
+ messageSection: 'credit_agent_update_profile',
42
+ messageText: 'success',
43
+ type: 'success',
44
+ }),
45
+ ]);
46
+ }
47
+ else {
48
+ return (0, rxjs_1.from)([
49
+ (0, creditAgentViewReducer_1.updateCardProfileFailure)(tenantId, response.status),
50
+ (0, snackbarReducer_1.openSnackbar)({
51
+ messageSection: 'credit_agent_update_profile',
52
+ messageText: 'failed',
53
+ type: 'error',
54
+ }),
55
+ ]);
56
+ }
57
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
58
+ (0, creditAgentViewReducer_1.updateCardProfileFailure)(tenantId, (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))),
59
+ (0, snackbarReducer_1.openSnackbar)({
60
+ messageSection: 'credit_agent_update_profile',
61
+ messageText: 'failed',
62
+ type: 'error',
63
+ }),
64
+ ])));
65
+ }));
66
+ exports.updateCardProfileEpic = updateCardProfileEpic;
@@ -37,7 +37,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
37
37
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
38
38
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
39
39
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
40
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request";
40
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
41
41
  messageText: "notification" | "failed" | "success";
42
42
  type: "error" | "success" | "info";
43
43
  variables: {
@@ -0,0 +1,8 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateProjects } from '../../entity/project/projectReducer';
4
+ import { RootState } from '../../reducer';
5
+ import { ZeniAPI } from '../../zeniAPI';
6
+ import { fetchProjectList, updateProjectList, updateProjectListFailure } from './projectListReducer';
7
+ export type ActionType = ReturnType<typeof fetchProjectList> | ReturnType<typeof updateProjects> | ReturnType<typeof updateProjectList> | ReturnType<typeof updateProjectListFailure>;
8
+ export declare const fetchProjectListEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;