@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.
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -7
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +2 -5
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActionsObservable } from 'redux-observable';
|
|
2
2
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
3
|
-
import { bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess
|
|
4
|
-
export type ActionType = ReturnType<typeof bulkUploadReceipts> | ReturnType<typeof bulkUploadReceiptsSuccess> | ReturnType<typeof bulkUploadReceiptsFailure
|
|
3
|
+
import { bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess } from '../../reducers/missingReceiptsViewReducer';
|
|
4
|
+
export type ActionType = ReturnType<typeof bulkUploadReceipts> | ReturnType<typeof bulkUploadReceiptsSuccess> | ReturnType<typeof bulkUploadReceiptsFailure>;
|
|
5
5
|
export declare const bulkUploadReceiptsEpic: (actions$: ActionsObservable<ActionType>, _state$: unknown, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
6
6
|
payload: {
|
|
7
7
|
batchId: import("../../../..").ID;
|
|
@@ -12,7 +12,4 @@ export declare const bulkUploadReceiptsEpic: (actions$: ActionsObservable<Action
|
|
|
12
12
|
error: import("../../../../responsePayload").ZeniAPIStatus;
|
|
13
13
|
};
|
|
14
14
|
type: "expenseAutomationMissingReceiptsView/bulkUploadReceiptsFailure";
|
|
15
|
-
} | {
|
|
16
|
-
payload: number;
|
|
17
|
-
type: "expenseAutomationMissingReceiptsView/updateBulkUploadProgress";
|
|
18
15
|
}>;
|
|
@@ -12,12 +12,8 @@ const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0,
|
|
|
12
12
|
formData.append('files', file, file.name);
|
|
13
13
|
}
|
|
14
14
|
return zeniAPI
|
|
15
|
-
.
|
|
16
|
-
.pipe((0, operators_1.mergeMap)((
|
|
17
|
-
if (event.type === 'progress') {
|
|
18
|
-
return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.updateBulkUploadProgress)(event.percentage));
|
|
19
|
-
}
|
|
20
|
-
const response = event.data;
|
|
15
|
+
.postFormData(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`, formData)
|
|
16
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
17
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
22
18
|
return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess)({
|
|
23
19
|
batchId: response.data.batch_id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.37-
|
|
3
|
+
"version": "4.19.37-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",
|