@zeniai/client-epic-state 4.19.88-betaVR3 → 4.19.89

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 (113) hide show
  1. package/lib/entity/account/accountPayload.d.ts +0 -2
  2. package/lib/entity/account/accountPayload.js +0 -2
  3. package/lib/entity/account/accountState.d.ts +0 -2
  4. package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
  5. package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
  6. package/lib/entity/depositAccount/depositAccount.js +1 -8
  7. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  8. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  9. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
  10. package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -11
  11. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -3
  12. package/lib/epic.d.ts +1 -13
  13. package/lib/epic.js +1 -13
  14. package/lib/esm/entity/account/accountPayload.js +0 -2
  15. package/lib/esm/entity/depositAccount/depositAccount.js +1 -8
  16. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
  17. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -11
  18. package/lib/esm/epic.js +1 -13
  19. package/lib/esm/index.js +5 -11
  20. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
  21. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
  22. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
  23. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +1 -189
  24. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -433
  25. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +1 -23
  26. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -244
  27. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -2
  28. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -44
  29. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +1 -2
  30. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  31. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  32. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  33. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  34. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  35. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  36. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  37. package/lib/esm/zeniAPI.js +2 -0
  38. package/lib/index.d.ts +7 -12
  39. package/lib/index.js +32 -88
  40. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  41. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
  42. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
  43. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
  44. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
  45. package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
  46. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
  47. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  48. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
  49. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  50. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -118
  51. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -201
  52. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +3 -76
  53. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -434
  54. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -11
  55. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +2 -24
  56. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -69
  57. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -1
  58. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
  59. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +0 -243
  60. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -2
  61. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -142
  62. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -54
  63. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
  64. package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -2
  65. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  66. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  67. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  68. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  69. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  70. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  71. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  72. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  73. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  74. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  75. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
  76. package/lib/zeniAPI.js +2 -0
  77. package/package.json +1 -1
  78. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
  79. package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +0 -10
  80. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -29
  81. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -49
  82. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -40
  83. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -47
  84. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -61
  85. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -33
  86. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -56
  87. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -77
  88. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -79
  89. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -24
  90. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
  91. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
  92. package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +0 -10
  93. package/lib/view/expenseAutomationView/bulkUploadTiming.js +0 -13
  94. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +0 -18
  95. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -33
  96. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +0 -7
  97. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -53
  98. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +0 -8
  99. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -44
  100. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +0 -7
  101. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -51
  102. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +0 -8
  103. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -65
  104. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +0 -8
  105. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -37
  106. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +0 -9
  107. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -61
  108. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +0 -14
  109. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -81
  110. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +0 -25
  111. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -85
  112. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +0 -7
  113. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -28
@@ -64,7 +64,6 @@ exports.toRemiSubTabUnderScoreType = toRemiSubTabUnderScoreType;
64
64
  const ALL_REIMBURSEMENT_SORT_KEYS = [
65
65
  'reportName',
66
66
  'submittedOn',
67
- 'createdBy',
68
67
  'type',
69
68
  'status',
70
69
  'amount',
@@ -98,11 +98,11 @@ exports.allTaskStatus = [
98
98
  },
99
99
  {
100
100
  code: 'done',
101
- name: 'In Review',
101
+ name: 'Done',
102
102
  },
103
103
  {
104
104
  code: 'resolved',
105
- name: 'Complete',
105
+ name: 'Resolved',
106
106
  },
107
107
  ];
108
108
  exports.allTaskPriority = [
@@ -116,7 +116,7 @@ exports.allTaskPriority = [
116
116
  },
117
117
  {
118
118
  code: 'medium',
119
- name: 'Medium',
119
+ name: 'Normal',
120
120
  },
121
121
  {
122
122
  code: 'low',
package/lib/zeniAPI.js CHANGED
@@ -82,6 +82,8 @@ class ZeniAPIClient {
82
82
  return (0, rxjs_1.from)(promise);
83
83
  }
84
84
  postFormData(restEndPoint, formData, signal) {
85
+ // Use apiHeaders for auth headers, then remove Content-Type
86
+ // so the browser sets multipart/form-data with the correct boundary
85
87
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
86
88
  const { 'Content-Type': _contentType, ...headers } = this.apiHeaders();
87
89
  const promise = (0, cross_fetch_1.fetch)(restEndPoint, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.88-betaVR3",
3
+ "version": "4.19.89",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -1,29 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
4
- import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, } from '../aiCfoViewReducer';
5
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
6
- export const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchSuggestedQuestions.match),
7
- // mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
8
- // would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
9
- mergeMap((action) => {
10
- const { pageContext } = action.payload;
11
- const query = new URLSearchParams({ page_context: pageContext });
12
- const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
13
- return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
14
- if (isSuccessResponse(response) && response.data != null) {
15
- return of(fetchSuggestedQuestionsSuccess({
16
- pageContext: response.data.page_context,
17
- generatedAt: response.data.generated_at,
18
- suggestedQuestions: response.data.suggested_questions,
19
- }));
20
- }
21
- return of(fetchSuggestedQuestionsFailure({
22
- pageContext,
23
- error: response.status,
24
- }));
25
- }), catchError((error) => of(fetchSuggestedQuestionsFailure({
26
- pageContext,
27
- error: createZeniAPIStatus('Unexpected Error', 'Fetch suggested questions REST API call failed', error instanceof Error ? { message: error.message } : undefined),
28
- }))));
29
- }));
@@ -1,10 +0,0 @@
1
- /**
2
- * After upload API success, hold the bar at 100% this long before transitioning to matching,
3
- * so the fill animation can complete without an abrupt swap to the auto-matching banner.
4
- */
5
- export const BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = 400;
6
- /**
7
- * Max wall-clock wait for Pusher + batch-details resolution after upload. If exceeded, we stop
8
- * fallback polling, clear the automatching banner (`phase` → completed), and refresh batch list.
9
- */
10
- export const BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = 300000;
@@ -1,29 +0,0 @@
1
- import { concat, of, timer } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
4
- import { BULK_UPLOAD_BAR_COMPLETE_HOLD_MS } from '../../bulkUploadTiming';
5
- import { bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, updateBulkUploadProgress, } from '../../reducers/missingReceiptsViewReducer';
6
- export const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(bulkUploadReceipts.match), mergeMap((action) => {
7
- const { files } = action.payload;
8
- const formData = new FormData();
9
- for (const file of files) {
10
- formData.append('files', file, file.name);
11
- }
12
- return zeniAPI
13
- .postFormData(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`, formData)
14
- .pipe(mergeMap((response) => {
15
- if (isSuccessResponse(response) && response.data != null) {
16
- const batchId = String(response.data.batch_id ?? '').trim();
17
- if (batchId === '') {
18
- return of(bulkUploadReceiptsFailure({
19
- error: createZeniAPIStatus('Unexpected Error', 'Bulk upload succeeded but batch_id was missing or empty.'),
20
- }));
21
- }
22
- return concat(of(updateBulkUploadProgress(100)), timer(BULK_UPLOAD_BAR_COMPLETE_HOLD_MS).pipe(mergeMap(() => of(bulkUploadReceiptsSuccess({ batchId })))));
23
- }
24
- return of(bulkUploadReceiptsFailure({ error: response.status }));
25
- }), catchError((error) => of(bulkUploadReceiptsFailure({
26
- error: createZeniAPIStatus('Unexpected Error', 'Bulk upload receipts API call errored out: ' +
27
- JSON.stringify(error)),
28
- }))));
29
- }));
@@ -1,49 +0,0 @@
1
- import { from } from 'rxjs';
2
- import { catchError, exhaustMap, filter, mergeMap } from 'rxjs/operators';
3
- import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
4
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
- import { confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, } from '../../reducers/missingReceiptsViewReducer';
6
- export const confirmBulkUploadMatchEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(confirmBulkUploadMatch.match), exhaustMap((action) => {
7
- const { batchId, attachmentId, transactionId, transactionType, fileName } = action.payload;
8
- return zeniAPI
9
- .postAndGetJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipts/manual-match`, {
10
- attachment_id: attachmentId,
11
- transaction_id: transactionId,
12
- transaction_type: transactionType,
13
- file_name: fileName,
14
- })
15
- .pipe(mergeMap((response) => {
16
- if (isSuccessResponse(response)) {
17
- return from([
18
- confirmBulkUploadMatchSuccess({
19
- batchId,
20
- attachmentId,
21
- transactionId,
22
- }),
23
- openSnackbar({
24
- messageSection: 'receipt_match',
25
- messageText: 'success',
26
- type: 'success',
27
- }),
28
- ]);
29
- }
30
- return from([
31
- confirmBulkUploadMatchFailure({ error: response.status }),
32
- openSnackbar({
33
- messageSection: 'receipt_match',
34
- messageText: 'failed',
35
- type: 'error',
36
- }),
37
- ]);
38
- }), catchError((error) => from([
39
- confirmBulkUploadMatchFailure({
40
- error: createZeniAPIStatus('Unexpected Error', 'Confirm bulk upload match errored out: ' +
41
- JSON.stringify(error)),
42
- }),
43
- openSnackbar({
44
- messageSection: 'receipt_match',
45
- messageText: 'failed',
46
- type: 'error',
47
- }),
48
- ])));
49
- }));
@@ -1,40 +0,0 @@
1
- import { EMPTY, from, of } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
4
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
- import { extractTransactionPayloadsFromBatchFiles, isBatchDetailsApiStatusCompleted, shouldFetchBatchDetailsForBatchId, toBatchDetails, } from '../../payload/missingReceiptsPayload';
6
- import { fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, } from '../../reducers/missingReceiptsViewReducer';
7
- export const fetchBulkUploadBatchDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchBulkUploadBatchDetails.match), mergeMap(() => {
8
- const bulkUpload = state$.value.expenseAutomationMissingReceiptsViewState.bulkUpload;
9
- const { currentBatchId } = bulkUpload;
10
- if (currentBatchId == null) {
11
- return of(fetchBulkUploadBatchDetailsFailure({
12
- error: createZeniAPIStatus('Unexpected Error', 'No current batch ID available'),
13
- }));
14
- }
15
- if (!shouldFetchBatchDetailsForBatchId(bulkUpload.batchStatusById, bulkUpload.batchListByPeriod, currentBatchId)) {
16
- return EMPTY;
17
- }
18
- return zeniAPI
19
- .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches/${currentBatchId}`)
20
- .pipe(mergeMap((response) => {
21
- if (!isSuccessResponse(response) ||
22
- response.data == null ||
23
- !isBatchDetailsApiStatusCompleted(response.data.status)) {
24
- if (isSuccessResponse(response) && response.data != null) {
25
- return EMPTY;
26
- }
27
- return of(fetchBulkUploadBatchDetailsFailure({ error: response.status }));
28
- }
29
- const actions = [];
30
- const transactionPayloads = extractTransactionPayloadsFromBatchFiles(response.data.files);
31
- if (transactionPayloads.length > 0) {
32
- actions.push(updateTransactions(transactionPayloads, (value) => value.transaction_id));
33
- }
34
- actions.push(fetchBulkUploadBatchDetailsSuccess(toBatchDetails(response.data, zeniAPI.apiEndPoints.fileMicroServiceBaseUrl)));
35
- actions.push(fetchBulkUploadBatches({ cacheOverride: true }));
36
- return from(actions);
37
- }), catchError((error) => of(fetchBulkUploadBatchDetailsFailure({
38
- error: createZeniAPIStatus('Unexpected Error', 'Fetch batch details errored out: ' + JSON.stringify(error)),
39
- }))));
40
- }));
@@ -1,47 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
- import { convertToPeriod, toMonthYearPeriodId, } from '../../../../commonStateTypes/timePeriod';
4
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
6
- import { toBatchListItem, } from '../../payload/missingReceiptsPayload';
7
- import { fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, } from '../../reducers/missingReceiptsViewReducer';
8
- export const fetchBulkUploadBatchesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchBulkUploadBatches.match), switchMap((action) => {
9
- const { cacheOverride } = action.payload;
10
- const state = state$.value;
11
- const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
12
- const currentTenant = getCurrentTenant(state);
13
- const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
14
- const periodId = toMonthYearPeriodId(selectedPeriod);
15
- const existingBatches = bulkUpload.batchListByPeriod[periodId] ?? [];
16
- if (cacheOverride !== true && existingBatches.length > 0) {
17
- return of(fetchBulkUploadBatchesSuccess({
18
- batchList: existingBatches,
19
- selectedPeriod,
20
- }));
21
- }
22
- const period = convertToPeriod(selectedPeriod);
23
- const queryParam = {
24
- start_date: period.start,
25
- end_date: period.end,
26
- sort_order: 'desc',
27
- };
28
- return zeniAPI
29
- .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
30
- .pipe(mergeMap((response) => {
31
- if (isSuccessResponse(response) && response.data != null) {
32
- /** Full list (all statuses) for UI; batch-details epics filter to `completed` only. */
33
- return of(fetchBulkUploadBatchesSuccess({
34
- batchList: response.data.batches.map(toBatchListItem),
35
- selectedPeriod,
36
- }));
37
- }
38
- return of(fetchBulkUploadBatchesFailure({
39
- error: response.status,
40
- selectedPeriod,
41
- }));
42
- }), catchError((error) => of(fetchBulkUploadBatchesFailure({
43
- error: createZeniAPIStatus('Unexpected Error', 'Fetch bulk upload batches errored out: ' +
44
- JSON.stringify(error)),
45
- selectedPeriod,
46
- }))));
47
- }));
@@ -1,61 +0,0 @@
1
- import { from, of } from 'rxjs';
2
- import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
- import { convertToPeriod, toMonthYearPeriodId, } from '../../../../commonStateTypes/timePeriod';
4
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
- import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
6
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
7
- import { fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, getCompletedTransactionsCacheKey, } from '../../reducers/missingReceiptsViewReducer';
8
- export const fetchCompletedTransactionsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchCompletedTransactions.match), switchMap((action) => {
9
- const state = state$.value;
10
- const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
11
- const currentTenant = getCurrentTenant(state);
12
- const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
13
- const periodId = toMonthYearPeriodId(selectedPeriod);
14
- const isInitialLoad = action.payload.pageToken == null;
15
- const cacheKey = getCompletedTransactionsCacheKey(periodId, bulkUpload.sortKey, bulkUpload.sortOrder, bulkUpload.completedSubTab);
16
- const existingData = bulkUpload.completedTransactionsByPeriod[cacheKey];
17
- if (isInitialLoad &&
18
- action.payload.cacheOverride !== true &&
19
- existingData != null &&
20
- existingData.transactionIds.length > 0) {
21
- return from([]);
22
- }
23
- const period = convertToPeriod(selectedPeriod);
24
- const queryPayload = {
25
- start_date: period.start,
26
- end_date: period.end,
27
- sort_by: bulkUpload.sortKey,
28
- sort_order: bulkUpload.sortOrder === 'ascending' ? 'asc' : 'desc',
29
- page_token: action.payload.pageToken ?? null,
30
- page_size: 25,
31
- };
32
- if (bulkUpload.completedSubTab !== 'all') {
33
- queryPayload.match_type = bulkUpload.completedSubTab;
34
- }
35
- const encodedQuery = encodeURIComponent(JSON.stringify(queryPayload));
36
- return zeniAPI
37
- .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipt-agent/transactions/completed?query=${encodedQuery}`)
38
- .pipe(mergeMap((response) => {
39
- if (isSuccessResponse(response) && response.data != null) {
40
- const transactionIds = response.data.transactions.map((t) => t.transaction_id);
41
- const updateActions = [];
42
- updateActions.push(updateTransactions(response.data.transactions, (value) => value.transaction_id));
43
- updateActions.push(fetchCompletedTransactionsSuccess({
44
- isInitialLoad,
45
- transactionIds,
46
- nextPageToken: response.data.next_page_token,
47
- totalCount: response.data.total_count,
48
- selectedPeriod,
49
- }));
50
- return from(updateActions);
51
- }
52
- return of(fetchCompletedTransactionsFailure({
53
- error: response.status,
54
- selectedPeriod,
55
- }));
56
- }), catchError((error) => of(fetchCompletedTransactionsFailure({
57
- error: createZeniAPIStatus('Unexpected Error', 'Fetch completed transactions errored: ' +
58
- JSON.stringify(error)),
59
- selectedPeriod,
60
- }))));
61
- }));
@@ -1,33 +0,0 @@
1
- import { concat, of } from 'rxjs';
2
- import { catchError, exhaustMap, filter } from 'rxjs/operators';
3
- import { toMonthYearPeriodId } from '../../../../commonStateTypes/timePeriod';
4
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
- import { createZeniAPIStatus } from '../../../../responsePayload';
6
- import { filterBatchListItemsForBatchDetailsFetch } from '../../payload/missingReceiptsPayload';
7
- import { fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, } from '../../reducers/missingReceiptsViewReducer';
8
- import { fetchBatchDetailsByIds } from './fetchMultipleBatchDetailsEpic';
9
- const MORE_BATCH_PAGE_SIZE = 5;
10
- export const fetchMoreBatchDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchMoreBatchDetails.match),
11
- /** One page at a time — avoids duplicate loads if IO + scroll fallback both fire. */
12
- exhaustMap(() => {
13
- const state = state$.value;
14
- const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
15
- const currentTenant = getCurrentTenant(state);
16
- const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
17
- if (selectedPeriod == null) {
18
- return of(fetchMoreBatchDetailsComplete());
19
- }
20
- const periodId = toMonthYearPeriodId(selectedPeriod);
21
- const batchList = bulkUpload.batchListByPeriod[periodId] ?? [];
22
- const failedIds = new Set(bulkUpload.failedBatchDetailIds);
23
- const unfetchedBatches = filterBatchListItemsForBatchDetailsFetch(batchList).filter((batch) => bulkUpload.batchDetailsById[batch.batchId] == null &&
24
- !failedIds.has(batch.batchId));
25
- const unfetchedBatchIds = unfetchedBatches.map((batch) => batch.batchId);
26
- if (unfetchedBatchIds.length === 0) {
27
- return of(fetchMoreBatchDetailsComplete());
28
- }
29
- const nextPage = unfetchedBatchIds.slice(0, MORE_BATCH_PAGE_SIZE);
30
- return concat(fetchBatchDetailsByIds(nextPage, zeniAPI), of(fetchMoreBatchDetailsComplete())).pipe(catchError((error) => of(fetchMoreBatchDetailsFailure({
31
- error: createZeniAPIStatus('Unexpected Error', 'Fetch more batch details errored out: ' + JSON.stringify(error)),
32
- }))));
33
- }));
@@ -1,56 +0,0 @@
1
- import { EMPTY, concat, from, of } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
4
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
- import { extractTransactionPayloadsFromBatchFiles, filterBatchListItemsForBatchDetailsFetch, isBatchDetailsApiStatusCompleted, shouldFetchBatchDetailsForBatchId, toBatchDetails, } from '../../payload/missingReceiptsPayload';
6
- import { batchDetailFetchFailed, fetchBulkUploadBatchDetails, fetchBulkUploadBatchesSuccess, fetchMoreBatchDetailsComplete, setInitialBatchDetailsLoading, storeBatchDetails, } from '../../reducers/missingReceiptsViewReducer';
7
- const INITIAL_BATCH_PAGE_SIZE = 5;
8
- export function fetchBatchDetailsByIds(batchIds, zeniAPI) {
9
- if (batchIds.length === 0) {
10
- return EMPTY;
11
- }
12
- return from(batchIds).pipe(mergeMap((batchId) => zeniAPI
13
- .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches/${batchId}`)
14
- .pipe(mergeMap((response) => {
15
- if (!isSuccessResponse(response) ||
16
- response.data == null ||
17
- !isBatchDetailsApiStatusCompleted(response.data.status)) {
18
- return EMPTY;
19
- }
20
- const actions = [];
21
- const transactionPayloads = extractTransactionPayloadsFromBatchFiles(response.data.files);
22
- if (transactionPayloads.length > 0) {
23
- actions.push(updateTransactions(transactionPayloads, (value) => value.transaction_id));
24
- }
25
- actions.push(storeBatchDetails(toBatchDetails(response.data, zeniAPI.apiEndPoints.fileMicroServiceBaseUrl)));
26
- return from(actions);
27
- }), catchError((error) => {
28
- console.error(`Failed to fetch batch details for ${batchId}:`, createZeniAPIStatus('Unexpected Error', 'Fetch batch details errored out: ' + JSON.stringify(error)));
29
- return of(batchDetailFetchFailed({ batchId }));
30
- })), 5));
31
- }
32
- export const fetchMultipleBatchDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchBulkUploadBatchesSuccess.match), mergeMap((action) => {
33
- const batchList = action.payload.batchList;
34
- const { batchDetailsById } = state$.value.expenseAutomationMissingReceiptsViewState.bulkUpload;
35
- /** Only completed list rows may trigger batch-details API; preserve platform order. */
36
- const completedBatchesMissingDetails = filterBatchListItemsForBatchDetailsFetch(batchList).filter((batch) => batchDetailsById[batch.batchId] == null);
37
- const completedBatchIds = completedBatchesMissingDetails.map((batch) => batch.batchId);
38
- const batchIdsToFetch = completedBatchIds.slice(0, INITIAL_BATCH_PAGE_SIZE);
39
- if (batchIdsToFetch.length === 0) {
40
- /**
41
- * List refresh can complete while no row is `completed` yet (multi-fetch skips), or
42
- * `currentBatchId` may not appear in the filtered list but still needs `GET /batches/:id`.
43
- * Fall back to the single-batch-details epic so `phase` and details can resolve.
44
- */
45
- const bulkUpload = state$.value.expenseAutomationMissingReceiptsViewState.bulkUpload;
46
- const currentId = bulkUpload.currentBatchId;
47
- if (currentId != null &&
48
- bulkUpload.phase === 'matching' &&
49
- bulkUpload.batchDetailsById[currentId] == null &&
50
- shouldFetchBatchDetailsForBatchId(bulkUpload.batchStatusById, bulkUpload.batchListByPeriod, currentId)) {
51
- return of(fetchBulkUploadBatchDetails());
52
- }
53
- return EMPTY;
54
- }
55
- return concat(of(setInitialBatchDetailsLoading()), fetchBatchDetailsByIds(batchIdsToFetch, zeniAPI), of(fetchMoreBatchDetailsComplete()));
56
- }));
@@ -1,77 +0,0 @@
1
- import { EMPTY, from, merge, of } from 'rxjs';
2
- import { catchError, debounceTime, filter, mergeMap, switchMap, } from 'rxjs/operators';
3
- import { convertToPeriod } from '../../../../commonStateTypes/timePeriod';
4
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
- import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
6
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
7
- import { supportedTransactionPayloadToManualSearchResult } from '../../payload/missingReceiptsPayload';
8
- import { searchTransactionsForManualMatch, searchTransactionsForManualMatchFailure, searchTransactionsForManualMatchSuccess, } from '../../reducers/missingReceiptsViewReducer';
9
- import { toTransactionsSortKey } from '../../types/transactionsViewState';
10
- /**
11
- * `auto_categorized` for manual transaction search (Unmatched).
12
- * Backend contract TBD — align with `fetchTransactionCategorizationEpic` (`selectedTab === 'autoCategorized'`)
13
- * when the expense-automation API documents the intended filter for this flow.
14
- */
15
- export const MANUAL_TRANSACTION_SEARCH_AUTO_CATEGORIZED = false;
16
- export const searchTransactionsForManualMatchEpic = (actions$, state$, zeniAPI) => {
17
- const searchActions$ = actions$.pipe(filter(searchTransactionsForManualMatch.match));
18
- const pagination$ = searchActions$.pipe(filter((action) => action.payload.pageToken != null));
19
- /**
20
- * No API for empty or 1-char queries; immediate merge so switchMap cancels any in-flight HTTP.
21
- */
22
- const newSearchTooShortOrClear$ = searchActions$.pipe(filter((action) => action.payload.pageToken == null &&
23
- action.payload.query.trim().length < 2));
24
- const newSearchDebounced$ = searchActions$.pipe(filter((action) => action.payload.pageToken == null &&
25
- action.payload.query.trim().length >= 2), debounceTime(300));
26
- return merge(pagination$, newSearchTooShortOrClear$, newSearchDebounced$).pipe(switchMap((action) => {
27
- const { query, pageToken } = action.payload;
28
- if (pageToken == null && query.trim().length < 2) {
29
- return EMPTY;
30
- }
31
- const state = state$.value;
32
- const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload: { manualSearch, sortKey, sortOrder }, }, } = state;
33
- const currentTenant = getCurrentTenant(state);
34
- const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
35
- if (selectedPeriod == null) {
36
- return of(searchTransactionsForManualMatchFailure({
37
- error: createZeniAPIStatus('Unexpected Error', 'Manual search requires a selected accounting period.'),
38
- }));
39
- }
40
- const period = convertToPeriod(selectedPeriod);
41
- const queryParam = {
42
- start_date: period.start,
43
- end_date: period.end,
44
- auto_categorized: MANUAL_TRANSACTION_SEARCH_AUTO_CATEGORIZED,
45
- sort_by: toTransactionsSortKey(sortKey),
46
- sort_order: sortOrder === 'ascending' ? 'asc' : 'desc',
47
- page_token: pageToken ?? null,
48
- page_size: manualSearch.pageSize,
49
- search_text: query,
50
- };
51
- return zeniAPI
52
- .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
53
- .pipe(mergeMap((response) => {
54
- if (isSuccessResponse(response) && response.data != null) {
55
- const { transactions, next_page_token, total_count } = response.data;
56
- const append = pageToken != null;
57
- const results = transactions.map(supportedTransactionPayloadToManualSearchResult);
58
- const actionsOut = [
59
- updateTransactions(transactions, (value) => value.transaction_id, 'merge'),
60
- searchTransactionsForManualMatchSuccess({
61
- append,
62
- nextPageToken: next_page_token ?? null,
63
- results,
64
- totalCount: total_count,
65
- }),
66
- ];
67
- return from(actionsOut);
68
- }
69
- return of(searchTransactionsForManualMatchFailure({
70
- error: response.status,
71
- }));
72
- }), catchError((error) => of(searchTransactionsForManualMatchFailure({
73
- error: createZeniAPIStatus('Unexpected Error', 'Search transactions for manual match errored: ' +
74
- JSON.stringify(error)),
75
- }))));
76
- }));
77
- };
@@ -1,79 +0,0 @@
1
- import { EMPTY, from, merge, of, timer } from 'rxjs';
2
- import { catchError, debounceTime, filter, mergeMap, switchMap, takeUntil, } from 'rxjs/operators';
3
- import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
4
- import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
5
- import { isSuccessResponse } from '../../../../responsePayload';
6
- import { BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS } from '../../bulkUploadTiming';
7
- import { extractTransactionPayloadsFromBatchFiles, isBatchDetailsApiStatusCompleted, toBatchDetails, } from '../../payload/missingReceiptsPayload';
8
- import { bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, clearBulkUpload, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, } from '../../reducers/missingReceiptsViewReducer';
9
- /** First poll after upload; then interval while batch not resolved via Pusher or API. */
10
- const FALLBACK_FIRST_DELAY_MS = 30000;
11
- const FALLBACK_POLL_INTERVAL_MS = 10000;
12
- /**
13
- * On Pusher batch completion: refresh batch list (then fetchMultipleBatchDetailsEpic runs),
14
- * and request switching to the Unmatched tab. Debounced to reduce duplicate refreshes.
15
- */
16
- export const pusherBatchStatusCompletionEpic = (actions$) => actions$.pipe(filter(pusherBatchStatusUpdate.match), filter((action) => action.payload.status === 'completed'), debounceTime(300), mergeMap(() => from([
17
- fetchBulkUploadBatches({
18
- cacheOverride: true,
19
- invalidateBatchDetailsCache: true,
20
- }),
21
- requestMissingReceiptsTabNavigation({ tab: 'unmatched' }),
22
- ])));
23
- /**
24
- * If Pusher and batch-details are delayed beyond {@link BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS},
25
- * force `phase` to `completed` (dismiss automatching banner) and refresh the batch list.
26
- * Cancels when the batch completes normally, bulk state is cleared, or another upload supersedes.
27
- */
28
- export const bulkUploadAutomatchingTimeoutEpic = (actions$, state$) => actions$.pipe(filter(bulkUploadReceiptsSuccess.match), mergeMap((action) => {
29
- const { batchId } = action.payload;
30
- return timer(BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS).pipe(mergeMap(() => {
31
- const bulk = state$.value.expenseAutomationMissingReceiptsViewState.bulkUpload;
32
- if (bulk.phase !== 'matching' || bulk.currentBatchId !== batchId) {
33
- return EMPTY;
34
- }
35
- return from([
36
- bulkUploadAutomatchingTimedOut(batchId),
37
- fetchBulkUploadBatches({ cacheOverride: true }),
38
- ]);
39
- }), takeUntil(merge(actions$.pipe(filter(clearBulkUpload.match)), actions$.pipe(filter(pusherBatchStatusUpdate.match), filter((a) => a.payload.batchId === batchId &&
40
- a.payload.status === 'completed')), actions$.pipe(filter(fetchBulkUploadBatchDetailsSuccess.match), filter((a) => a.payload.batchId === batchId)))));
41
- }));
42
- /**
43
- * Fallback polling when Pusher is slow or unavailable. Network errors on a poll tick show one
44
- * error snackbar per upload session (first failure only) so the user is not spammed every
45
- * interval; Pusher or a later successful poll still completes the flow.
46
- */
47
- export const pollBulkUploadBatchStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(bulkUploadReceiptsSuccess.match), mergeMap((action) => {
48
- const { batchId } = action.payload;
49
- let pollErrorNotified = false;
50
- return timer(FALLBACK_FIRST_DELAY_MS, FALLBACK_POLL_INTERVAL_MS).pipe(takeUntil(merge(actions$.pipe(filter(clearBulkUpload.match)), actions$.pipe(filter(pusherBatchStatusUpdate.match), filter((action) => action.payload.batchId === batchId)), actions$.pipe(filter(fetchBulkUploadBatchDetailsSuccess.match), filter((action) => action.payload.batchId === batchId)), actions$.pipe(filter(bulkUploadAutomatchingTimedOut.match), filter((action) => action.payload.batchId === batchId)))), switchMap(() => zeniAPI
51
- .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches/${batchId}`)
52
- .pipe(mergeMap((response) => {
53
- /** Same batch-details URL; polls until `status` is completed (Pusher may win first). */
54
- if (isSuccessResponse(response) && response.data != null) {
55
- if (isBatchDetailsApiStatusCompleted(response.data.status)) {
56
- const actions = [];
57
- const transactionPayloads = extractTransactionPayloadsFromBatchFiles(response.data.files);
58
- if (transactionPayloads.length > 0) {
59
- actions.push(updateTransactions(transactionPayloads, (value) => value.transaction_id));
60
- }
61
- actions.push(fetchBulkUploadBatchDetailsSuccess(toBatchDetails(response.data, zeniAPI.apiEndPoints.fileMicroServiceBaseUrl)));
62
- actions.push(fetchBulkUploadBatches({ cacheOverride: true }));
63
- actions.push(requestMissingReceiptsTabNavigation({ tab: 'unmatched' }));
64
- return from(actions);
65
- }
66
- }
67
- return EMPTY;
68
- }), catchError(() => {
69
- if (!pollErrorNotified) {
70
- pollErrorNotified = true;
71
- return of(openSnackbar({
72
- messageSection: 'receipts_upload',
73
- messageText: 'failed',
74
- type: 'error',
75
- }));
76
- }
77
- return EMPTY;
78
- }))));
79
- }));
@@ -1,24 +0,0 @@
1
- import { from } from 'rxjs';
2
- import { filter, mergeMap } from 'rxjs/operators';
3
- import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
4
- import { updateTransaction } from '../../../../entity/transaction/transactionReducer';
5
- import { fetchMonthEndCloseChecks } from '../../../monthEndCloseChecksView/monthEndCloseChecksViewReducer';
6
- import { uploadTransactionCategorizationReceiptSuccess } from '../../reducers/transactionsViewReducer';
7
- export const uploadTransactionReceiptSuccessEpic = (actions$, state$) => actions$.pipe(filter(uploadTransactionCategorizationReceiptSuccess.match), mergeMap((action) => {
8
- const { transactionPayload, updateType } = action.payload;
9
- const updateActions = [];
10
- const currentTenant = getCurrentTenant(state$.value);
11
- const selectedPeriodByTenantId = state$.value.expenseAutomationViewState.selectedPeriodByTenantId;
12
- updateActions.push(updateTransaction(transactionPayload.transaction_id, transactionPayload, updateType));
13
- if (currentTenant != null) {
14
- const monthEndChecksPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
15
- if (monthEndChecksPeriod != null) {
16
- updateActions.push(fetchMonthEndCloseChecks({
17
- tenantId: currentTenant.tenantId,
18
- period: monthEndChecksPeriod,
19
- refreshViewInBackground: true,
20
- }));
21
- }
22
- }
23
- return from(updateActions);
24
- }));
@@ -1,8 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../reducer';
4
- import { ZeniAPI } from '../../../zeniAPI';
5
- import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess } from '../aiCfoViewReducer';
6
- export type ActionType = ReturnType<typeof fetchSuggestedQuestions> | ReturnType<typeof fetchSuggestedQuestionsSuccess> | ReturnType<typeof fetchSuggestedQuestionsFailure>;
7
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
8
- export declare const fetchSuggestedQuestionsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;