@zeniai/client-epic-state 4.20.3-betaVR2 → 4.20.3-betaVR4

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 (24) hide show
  1. package/lib/epic.d.ts +2 -1
  2. package/lib/epic.js +2 -1
  3. package/lib/esm/epic.js +2 -1
  4. package/lib/esm/index.js +2 -2
  5. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +6 -5
  6. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreAutomatchingOnBatchListLoadEpic.js +47 -0
  7. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +14 -6
  8. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
  9. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +16 -1
  10. package/lib/index.d.ts +2 -2
  11. package/lib/index.js +34 -32
  12. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +5 -5
  13. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +5 -4
  14. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreAutomatchingOnBatchListLoadEpic.d.ts +13 -0
  15. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreAutomatchingOnBatchListLoadEpic.js +51 -0
  16. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
  17. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +13 -5
  18. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
  19. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
  20. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +5 -2
  21. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +17 -2
  22. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +3 -0
  23. package/package.json +2 -2
  24. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
@@ -11,6 +11,8 @@ const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload")
11
11
  const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
12
12
  /** First poll after upload; then interval while batch not resolved via Pusher or API. */
13
13
  const FALLBACK_FIRST_DELAY_MS = 30000;
14
+ /** Shorter first poll for restored sessions — batch may already be near completion. */
15
+ const RESTORE_FIRST_DELAY_MS = 5000;
14
16
  const FALLBACK_POLL_INTERVAL_MS = 10000;
15
17
  /**
16
18
  * On Pusher batch completion: refresh batch list (then fetchMultipleBatchDetailsEpic runs),
@@ -29,7 +31,8 @@ exports.pusherBatchStatusCompletionEpic = pusherBatchStatusCompletionEpic;
29
31
  * force `phase` to `completed` (dismiss automatching banner) and refresh the batch list.
30
32
  * Cancels when the batch completes normally, bulk state is cleared, or another upload supersedes.
31
33
  */
32
- const bulkUploadAutomatchingTimeoutEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match), (0, operators_1.mergeMap)((action) => {
34
+ const bulkUploadAutomatchingTimeoutEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)((action) => missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match(action) ||
35
+ missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)), (0, operators_1.mergeMap)((action) => {
33
36
  const { batchId } = action.payload;
34
37
  return (0, rxjs_1.timer)(bulkUploadTiming_1.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS).pipe((0, operators_1.mergeMap)(() => {
35
38
  const bulk = state$.value.expenseAutomationMissingReceiptsViewState.bulkUpload;
@@ -50,7 +53,8 @@ exports.bulkUploadAutomatchingTimeoutEpic = bulkUploadAutomatchingTimeoutEpic;
50
53
  * only once: starts on `bulkUploadReceiptsSuccess`, waits for the first
51
54
  * batch details action for that batch, emits the toast, then stops.
52
55
  */
53
- const bulkUploadMatchResultToastEpic = (actions$) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match), (0, operators_1.switchMap)((uploadAction) => {
56
+ const bulkUploadMatchResultToastEpic = (actions$) => actions$.pipe((0, operators_1.filter)((action) => missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match(action) ||
57
+ missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)), (0, operators_1.switchMap)((uploadAction) => {
54
58
  const { batchId } = uploadAction.payload;
55
59
  return (0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatchDetailsSuccess.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.storeBatchDetails.match))).pipe((0, operators_1.filter)((a) => a.payload.batchId === batchId), (0, operators_1.take)(1), (0, operators_1.mergeMap)((action) => {
56
60
  const { summary } = action.payload;
@@ -69,7 +73,7 @@ const bulkUploadMatchResultToastEpic = (actions$) => actions$.pipe((0, operators
69
73
  },
70
74
  ],
71
75
  }));
72
- }), (0, operators_1.takeUntil)((0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.clearBulkUpload.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match)))));
76
+ }), (0, operators_1.takeUntil)((0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.clearBulkUpload.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match)))));
73
77
  }));
74
78
  exports.bulkUploadMatchResultToastEpic = bulkUploadMatchResultToastEpic;
75
79
  /**
@@ -77,10 +81,14 @@ exports.bulkUploadMatchResultToastEpic = bulkUploadMatchResultToastEpic;
77
81
  * error snackbar per upload session (first failure only) so the user is not spammed every
78
82
  * interval; Pusher or a later successful poll still completes the flow.
79
83
  */
80
- const pollBulkUploadBatchStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match), (0, operators_1.mergeMap)((action) => {
84
+ const pollBulkUploadBatchStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)((action) => missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess.match(action) ||
85
+ missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)), (0, operators_1.mergeMap)((action) => {
81
86
  const { batchId } = action.payload;
82
87
  let pollErrorNotified = false;
83
- return (0, rxjs_1.timer)(FALLBACK_FIRST_DELAY_MS, FALLBACK_POLL_INTERVAL_MS).pipe((0, operators_1.takeUntil)((0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.clearBulkUpload.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.pusherBatchStatusUpdate.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatchDetailsSuccess.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadAutomatchingTimedOut.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)))), (0, operators_1.switchMap)(() => zeniAPI
88
+ const firstDelay = missingReceiptsViewReducer_1.restoreBulkUploadMatchingState.match(action)
89
+ ? RESTORE_FIRST_DELAY_MS
90
+ : FALLBACK_FIRST_DELAY_MS;
91
+ return (0, rxjs_1.timer)(firstDelay, FALLBACK_POLL_INTERVAL_MS).pipe((0, operators_1.takeUntil)((0, rxjs_1.merge)(actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.clearBulkUpload.match)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.pusherBatchStatusUpdate.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatchDetailsSuccess.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)), actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadAutomatchingTimedOut.match), (0, operators_1.filter)((action) => action.payload.batchId === batchId)))), (0, operators_1.switchMap)(() => zeniAPI
84
92
  .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches/${batchId}`)
85
93
  .pipe((0, operators_1.mergeMap)((response) => {
86
94
  /** Same batch-details URL; polls until `status` is completed (Pusher may win first). */
@@ -40,6 +40,7 @@ export interface BatchListItemPayload {
40
40
  possible_matches_count: number;
41
41
  status: string;
42
42
  total_files: number;
43
+ user_id: string;
43
44
  }
44
45
  export type BatchListResponse = ZeniAPIResponse<BatchListResponsePayload>;
45
46
  export interface MatchedTransactionPayload {
@@ -81,6 +82,8 @@ export interface BatchDetailsResponsePayload {
81
82
  possible_matches: number;
82
83
  total: number;
83
84
  };
85
+ /** Uploader — used to scope automatching UI to the user who submitted the batch. */
86
+ user_id?: string;
84
87
  }
85
88
  export type BatchDetailsResponse = ZeniAPIResponse<BatchDetailsResponsePayload>;
86
89
  /**
@@ -93,6 +96,8 @@ export declare function toBatchFile(payload: BatchFilePayload, filesEndPoint?: s
93
96
  export declare function extractTransactionPayloadsFromBatchFiles(files: BatchFilePayload[]): SupportedTransactionPayload[];
94
97
  export declare function toBatchSummary(payload: BatchDetailsResponsePayload['summary']): BatchSummary;
95
98
  export declare function toBatchDetails(payload: BatchDetailsResponsePayload, filesEndPoint?: string): BatchDetails;
99
+ /** Batch is still in-flight for automatching (GET /batches/:id while not completed). */
100
+ export declare function isBatchDetailsStatusPendingOrProcessing(status: string): boolean;
96
101
  /** Batch list `status` is a string from the API — compare case-insensitively. */
97
102
  export declare function isBatchListStatusCompleted(status: string): boolean;
98
103
  /**
@@ -5,6 +5,7 @@ exports.toBatchFile = toBatchFile;
5
5
  exports.extractTransactionPayloadsFromBatchFiles = extractTransactionPayloadsFromBatchFiles;
6
6
  exports.toBatchSummary = toBatchSummary;
7
7
  exports.toBatchDetails = toBatchDetails;
8
+ exports.isBatchDetailsStatusPendingOrProcessing = isBatchDetailsStatusPendingOrProcessing;
8
9
  exports.isBatchListStatusCompleted = isBatchListStatusCompleted;
9
10
  exports.filterBatchListItemsForBatchDetailsFetch = filterBatchListItemsForBatchDetailsFetch;
10
11
  exports.isBatchDetailsApiStatusCompleted = isBatchDetailsApiStatusCompleted;
@@ -113,8 +114,16 @@ function toBatchDetails(payload, filesEndPoint) {
113
114
  files: payload.files.map((file) => toBatchFile(file, filesEndPoint)),
114
115
  status: (0, missingReceiptsViewState_1.toBatchStatusValue)(payload.status),
115
116
  summary: toBatchSummary(payload.summary),
117
+ ...(payload.user_id != null && payload.user_id !== ''
118
+ ? { userId: payload.user_id }
119
+ : {}),
116
120
  };
117
121
  }
122
+ /** Batch is still in-flight for automatching (GET /batches/:id while not completed). */
123
+ function isBatchDetailsStatusPendingOrProcessing(status) {
124
+ const s = status.toLowerCase();
125
+ return s === 'processing' || s === 'pending';
126
+ }
118
127
  /** Batch list `status` is a string from the API — compare case-insensitively. */
119
128
  function isBatchListStatusCompleted(status) {
120
129
  return status.toLowerCase() === 'completed';
@@ -172,6 +181,7 @@ function toBatchListItem(payload) {
172
181
  possibleMatchesCount: payload.possible_matches_count,
173
182
  status: payload.status,
174
183
  totalFiles: payload.total_files,
184
+ userId: payload.user_id,
175
185
  };
176
186
  }
177
187
  /**
@@ -35,11 +35,14 @@ export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCrea
35
35
  }, "expenseAutomationMissingReceiptsView/markMissingReceiptAsDone", never, never>, clearExpenseAutomationMissingReceiptsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearExpenseAutomationMissingReceiptsView">, bulkUploadReceipts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[files: File[]], {
36
36
  files: File[];
37
37
  fileCount: number;
38
- }, "expenseAutomationMissingReceiptsView/bulkUploadReceipts", never, never>, updateBulkUploadProgress: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "expenseAutomationMissingReceiptsView/updateBulkUploadProgress">, bulkUploadReceiptsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
38
+ }, "expenseAutomationMissingReceiptsView/bulkUploadReceipts", never, never>, updateBulkUploadProgress: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "expenseAutomationMissingReceiptsView/updateBulkUploadProgress">, setBulkUploadUploadedFileCount: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "expenseAutomationMissingReceiptsView/setBulkUploadUploadedFileCount">, bulkUploadReceiptsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
39
39
  batchId: ID;
40
40
  }, "expenseAutomationMissingReceiptsView/bulkUploadReceiptsSuccess">, bulkUploadReceiptsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
41
41
  error: ZeniAPIStatus;
42
- }, "expenseAutomationMissingReceiptsView/bulkUploadReceiptsFailure">, bulkUploadAutomatchingTimedOut: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[batchId: string], {
42
+ }, "expenseAutomationMissingReceiptsView/bulkUploadReceiptsFailure">, restoreBulkUploadMatchingState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
43
+ batchId: ID;
44
+ totalFiles: number;
45
+ }, "expenseAutomationMissingReceiptsView/restoreBulkUploadMatchingState">, bulkUploadAutomatchingTimedOut: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[batchId: string], {
43
46
  batchId: string;
44
47
  }, "expenseAutomationMissingReceiptsView/bulkUploadAutomatchingTimedOut", never, never>, pusherBatchStatusUpdate: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchStatus, "expenseAutomationMissingReceiptsView/pusherBatchStatusUpdate">, requestMissingReceiptsTabNavigation: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
45
48
  tab: BulkUploadResultsTab;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.fetchCompletedTransactionsFailure = exports.fetchCompletedTransactionsSuccess = exports.fetchCompletedTransactions = exports.acknowledgeBulkUploadConfirmMatchComplete = exports.clearManualSearchResults = exports.searchTransactionsForManualMatchFailure = exports.searchTransactionsForManualMatchSuccess = exports.searchTransactionsForManualMatch = exports.clearBulkUpload = exports.setBulkUploadSortConfig = exports.setBulkUploadCompletedSubTab = exports.setBulkUploadResultsTab = exports.confirmBulkUploadMatchFailure = exports.confirmBulkUploadMatchSuccess = exports.confirmBulkUploadMatch = exports.fetchBulkUploadBatchesFailure = exports.fetchBulkUploadBatchesSuccess = exports.fetchBulkUploadBatches = exports.fetchMoreBatchDetailsFailure = exports.fetchMoreBatchDetailsComplete = exports.fetchMoreBatchDetails = exports.setInitialBatchDetailsLoading = exports.batchDetailFetchFailed = exports.storeBatchDetails = exports.fetchBulkUploadBatchDetailsFailure = exports.fetchBulkUploadBatchDetailsSuccess = exports.clearMissingReceiptsTabNavigation = exports.requestMissingReceiptsTabNavigation = exports.pusherBatchStatusUpdate = exports.bulkUploadAutomatchingTimedOut = exports.bulkUploadReceiptsFailure = exports.bulkUploadReceiptsSuccess = exports.updateBulkUploadProgress = exports.bulkUploadReceipts = exports.clearExpenseAutomationMissingReceiptsView = exports.markMissingReceiptAsDone = exports.updateMissingReceiptsUIState = exports.updateMissingReceiptUploadState = exports.uploadMissingReceiptSuccess = exports.fetchMissingReceiptsFailure = exports.fetchMissingReceiptsSuccess = exports.fetchMissingReceipts = exports.fetchBulkUploadBatchDetails = exports.initialState = exports.initialBulkUploadState = exports.getCompletedTransactionsCacheKey = void 0;
4
+ exports.fetchCompletedTransactionsFailure = exports.fetchCompletedTransactionsSuccess = exports.fetchCompletedTransactions = exports.acknowledgeBulkUploadConfirmMatchComplete = exports.clearManualSearchResults = exports.searchTransactionsForManualMatchFailure = exports.searchTransactionsForManualMatchSuccess = exports.searchTransactionsForManualMatch = exports.clearBulkUpload = exports.setBulkUploadSortConfig = exports.setBulkUploadCompletedSubTab = exports.setBulkUploadResultsTab = exports.confirmBulkUploadMatchFailure = exports.confirmBulkUploadMatchSuccess = exports.confirmBulkUploadMatch = exports.fetchBulkUploadBatchesFailure = exports.fetchBulkUploadBatchesSuccess = exports.fetchBulkUploadBatches = exports.fetchMoreBatchDetailsFailure = exports.fetchMoreBatchDetailsComplete = exports.fetchMoreBatchDetails = exports.setInitialBatchDetailsLoading = exports.batchDetailFetchFailed = exports.storeBatchDetails = exports.fetchBulkUploadBatchDetailsFailure = exports.fetchBulkUploadBatchDetailsSuccess = exports.clearMissingReceiptsTabNavigation = exports.requestMissingReceiptsTabNavigation = exports.pusherBatchStatusUpdate = exports.bulkUploadAutomatchingTimedOut = exports.restoreBulkUploadMatchingState = exports.bulkUploadReceiptsFailure = exports.bulkUploadReceiptsSuccess = exports.setBulkUploadUploadedFileCount = exports.updateBulkUploadProgress = exports.bulkUploadReceipts = exports.clearExpenseAutomationMissingReceiptsView = exports.markMissingReceiptAsDone = exports.updateMissingReceiptsUIState = exports.updateMissingReceiptUploadState = exports.uploadMissingReceiptSuccess = exports.fetchMissingReceiptsFailure = exports.fetchMissingReceiptsSuccess = exports.fetchMissingReceipts = exports.fetchBulkUploadBatchDetails = exports.initialState = exports.initialBulkUploadState = exports.getCompletedTransactionsCacheKey = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
7
7
  const missingReceiptsViewState_1 = require("../types/missingReceiptsViewState");
@@ -178,6 +178,13 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
178
178
  updateBulkUploadProgress(draft, action) {
179
179
  draft.bulkUpload.uploadProgress = action.payload;
180
180
  },
181
+ /**
182
+ * Sync file count when bulk upload uses direct HTTP (`bulkUploadReceipts` Redux action is not
183
+ * dispatched, so `bulkUploadReceipts` reducer never runs).
184
+ */
185
+ setBulkUploadUploadedFileCount(draft, action) {
186
+ draft.bulkUpload.uploadedFileCount = action.payload;
187
+ },
181
188
  bulkUploadReceiptsSuccess(draft, action) {
182
189
  draft.bulkUpload.currentBatchId = action.payload.batchId;
183
190
  draft.bulkUpload.uploadProgress = 100;
@@ -194,6 +201,14 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
194
201
  };
195
202
  draft.bulkUpload.phase = 'idle';
196
203
  },
204
+ restoreBulkUploadMatchingState(draft, action) {
205
+ if (draft.bulkUpload.phase !== 'idle') {
206
+ return;
207
+ }
208
+ draft.bulkUpload.currentBatchId = action.payload.batchId;
209
+ draft.bulkUpload.uploadedFileCount = action.payload.totalFiles;
210
+ draft.bulkUpload.phase = 'matching';
211
+ },
197
212
  bulkUploadAutomatchingTimedOut: {
198
213
  reducer(draft, action) {
199
214
  if (draft.bulkUpload.phase !== 'matching' ||
@@ -558,7 +573,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
558
573
  });
559
574
  _a = expenseAutomationMissingReceiptsView.actions, exports.fetchMissingReceipts = _a.fetchMissingReceipts, exports.fetchMissingReceiptsSuccess = _a.fetchMissingReceiptsSuccess, exports.fetchMissingReceiptsFailure = _a.fetchMissingReceiptsFailure, exports.uploadMissingReceiptSuccess = _a.uploadMissingReceiptSuccess, exports.updateMissingReceiptUploadState = _a.updateMissingReceiptUploadState, exports.updateMissingReceiptsUIState = _a.updateMissingReceiptsUIState, exports.markMissingReceiptAsDone = _a.markMissingReceiptAsDone, exports.clearExpenseAutomationMissingReceiptsView = _a.clearExpenseAutomationMissingReceiptsView,
560
575
  // Bulk Upload
561
- exports.bulkUploadReceipts = _a.bulkUploadReceipts, exports.updateBulkUploadProgress = _a.updateBulkUploadProgress, exports.bulkUploadReceiptsSuccess = _a.bulkUploadReceiptsSuccess, exports.bulkUploadReceiptsFailure = _a.bulkUploadReceiptsFailure, exports.bulkUploadAutomatchingTimedOut = _a.bulkUploadAutomatchingTimedOut, exports.pusherBatchStatusUpdate = _a.pusherBatchStatusUpdate, exports.requestMissingReceiptsTabNavigation = _a.requestMissingReceiptsTabNavigation, exports.clearMissingReceiptsTabNavigation = _a.clearMissingReceiptsTabNavigation, exports.fetchBulkUploadBatchDetailsSuccess = _a.fetchBulkUploadBatchDetailsSuccess, exports.fetchBulkUploadBatchDetailsFailure = _a.fetchBulkUploadBatchDetailsFailure, exports.storeBatchDetails = _a.storeBatchDetails, exports.batchDetailFetchFailed = _a.batchDetailFetchFailed, exports.setInitialBatchDetailsLoading = _a.setInitialBatchDetailsLoading, exports.fetchMoreBatchDetails = _a.fetchMoreBatchDetails, exports.fetchMoreBatchDetailsComplete = _a.fetchMoreBatchDetailsComplete, exports.fetchMoreBatchDetailsFailure = _a.fetchMoreBatchDetailsFailure, exports.fetchBulkUploadBatches = _a.fetchBulkUploadBatches, exports.fetchBulkUploadBatchesSuccess = _a.fetchBulkUploadBatchesSuccess, exports.fetchBulkUploadBatchesFailure = _a.fetchBulkUploadBatchesFailure, exports.confirmBulkUploadMatch = _a.confirmBulkUploadMatch, exports.confirmBulkUploadMatchSuccess = _a.confirmBulkUploadMatchSuccess, exports.confirmBulkUploadMatchFailure = _a.confirmBulkUploadMatchFailure, exports.setBulkUploadResultsTab = _a.setBulkUploadResultsTab, exports.setBulkUploadCompletedSubTab = _a.setBulkUploadCompletedSubTab, exports.setBulkUploadSortConfig = _a.setBulkUploadSortConfig, exports.clearBulkUpload = _a.clearBulkUpload, exports.searchTransactionsForManualMatch = _a.searchTransactionsForManualMatch, exports.searchTransactionsForManualMatchSuccess = _a.searchTransactionsForManualMatchSuccess, exports.searchTransactionsForManualMatchFailure = _a.searchTransactionsForManualMatchFailure, exports.clearManualSearchResults = _a.clearManualSearchResults, exports.acknowledgeBulkUploadConfirmMatchComplete = _a.acknowledgeBulkUploadConfirmMatchComplete,
576
+ exports.bulkUploadReceipts = _a.bulkUploadReceipts, exports.updateBulkUploadProgress = _a.updateBulkUploadProgress, exports.setBulkUploadUploadedFileCount = _a.setBulkUploadUploadedFileCount, exports.bulkUploadReceiptsSuccess = _a.bulkUploadReceiptsSuccess, exports.bulkUploadReceiptsFailure = _a.bulkUploadReceiptsFailure, exports.restoreBulkUploadMatchingState = _a.restoreBulkUploadMatchingState, exports.bulkUploadAutomatchingTimedOut = _a.bulkUploadAutomatchingTimedOut, exports.pusherBatchStatusUpdate = _a.pusherBatchStatusUpdate, exports.requestMissingReceiptsTabNavigation = _a.requestMissingReceiptsTabNavigation, exports.clearMissingReceiptsTabNavigation = _a.clearMissingReceiptsTabNavigation, exports.fetchBulkUploadBatchDetailsSuccess = _a.fetchBulkUploadBatchDetailsSuccess, exports.fetchBulkUploadBatchDetailsFailure = _a.fetchBulkUploadBatchDetailsFailure, exports.storeBatchDetails = _a.storeBatchDetails, exports.batchDetailFetchFailed = _a.batchDetailFetchFailed, exports.setInitialBatchDetailsLoading = _a.setInitialBatchDetailsLoading, exports.fetchMoreBatchDetails = _a.fetchMoreBatchDetails, exports.fetchMoreBatchDetailsComplete = _a.fetchMoreBatchDetailsComplete, exports.fetchMoreBatchDetailsFailure = _a.fetchMoreBatchDetailsFailure, exports.fetchBulkUploadBatches = _a.fetchBulkUploadBatches, exports.fetchBulkUploadBatchesSuccess = _a.fetchBulkUploadBatchesSuccess, exports.fetchBulkUploadBatchesFailure = _a.fetchBulkUploadBatchesFailure, exports.confirmBulkUploadMatch = _a.confirmBulkUploadMatch, exports.confirmBulkUploadMatchSuccess = _a.confirmBulkUploadMatchSuccess, exports.confirmBulkUploadMatchFailure = _a.confirmBulkUploadMatchFailure, exports.setBulkUploadResultsTab = _a.setBulkUploadResultsTab, exports.setBulkUploadCompletedSubTab = _a.setBulkUploadCompletedSubTab, exports.setBulkUploadSortConfig = _a.setBulkUploadSortConfig, exports.clearBulkUpload = _a.clearBulkUpload, exports.searchTransactionsForManualMatch = _a.searchTransactionsForManualMatch, exports.searchTransactionsForManualMatchSuccess = _a.searchTransactionsForManualMatchSuccess, exports.searchTransactionsForManualMatchFailure = _a.searchTransactionsForManualMatchFailure, exports.clearManualSearchResults = _a.clearManualSearchResults, exports.acknowledgeBulkUploadConfirmMatchComplete = _a.acknowledgeBulkUploadConfirmMatchComplete,
562
577
  // Completed Transactions
563
578
  exports.fetchCompletedTransactions = _a.fetchCompletedTransactions, exports.fetchCompletedTransactionsSuccess = _a.fetchCompletedTransactionsSuccess, exports.fetchCompletedTransactionsFailure = _a.fetchCompletedTransactionsFailure;
564
579
  exports.default = expenseAutomationMissingReceiptsView.reducer;
@@ -83,6 +83,8 @@ export interface BatchDetails {
83
83
  files: BatchFile[];
84
84
  status: BatchStatusValue;
85
85
  summary: BatchSummary;
86
+ /** Present when batch-details API includes `user_id` (uploader). */
87
+ userId?: string;
86
88
  }
87
89
  export interface BatchListItem {
88
90
  batchId: ID;
@@ -93,6 +95,7 @@ export interface BatchListItem {
93
95
  possibleMatchesCount: number;
94
96
  status: string;
95
97
  totalFiles: number;
98
+ userId: string;
96
99
  }
97
100
  export interface ManualSearchResult {
98
101
  amount: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.20.3-betaVR2",
3
+ "version": "4.20.3-betaVR4",
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",
@@ -111,7 +111,7 @@
111
111
  "find-dead-code": "ts-prune | grep -v '(used in module)'",
112
112
  "find-unused-exports": "ts-unused-exports ./tsconfig.json",
113
113
  "circular-dependency": "npx madge --circular --extensions ts ./src",
114
- "build": "concurrently --kill-others-on-fail --handle-input \"echo 'Running ESLint...' && eslint . --ext .js,.jsx,.ts,.tsx\" \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\" \"echo 'Running tests and typecheck...' && pnpm test\" && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
114
+ "build": "concurrently --kill-others-on-fail --handle-input \"echo 'Running ESLint...' && eslint . --ext .js,.jsx,.ts,.tsx\" \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\"",
115
115
  "only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
116
116
  "only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
117
117
  "format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",