@zeniai/client-epic-state 4.19.37-betaVR3 → 4.19.37-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.
@@ -1,7 +1,7 @@
1
1
  import { of } from 'rxjs';
2
2
  import { catchError, filter, mergeMap } from 'rxjs/operators';
3
3
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
4
- import { bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, updateBulkUploadProgress, } from '../../reducers/missingReceiptsViewReducer';
4
+ import { bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, } from '../../reducers/missingReceiptsViewReducer';
5
5
  export const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(bulkUploadReceipts.match), mergeMap((action) => {
6
6
  const { files } = action.payload;
7
7
  const formData = new FormData();
@@ -9,12 +9,8 @@ export const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.p
9
9
  formData.append('files', file, file.name);
10
10
  }
11
11
  return zeniAPI
12
- .postFormDataWithProgress(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`, formData)
13
- .pipe(mergeMap((event) => {
14
- if (event.type === 'progress') {
15
- return of(updateBulkUploadProgress(event.percentage));
16
- }
17
- const response = event.data;
12
+ .postFormData(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`, formData)
13
+ .pipe(mergeMap((response) => {
18
14
  if (isSuccessResponse(response) && response.data != null) {
19
15
  return of(bulkUploadReceiptsSuccess({
20
16
  batchId: response.data.batch_id,