@zeniai/client-epic-state 4.7.85 → 4.7.86
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/view/taskManager/taskDetailView/epics/deleteTaskEpic.js +1 -1
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +1 -1
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskHistoryEpic.js +1 -1
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +2 -2
- package/lib/view/taskManager/taskListView/fetchTaskListEpic.js +1 -1
- package/lib/zeniAPI.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer")
|
|
|
9
9
|
const deleteTaskEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskDetailReducer_1.deleteTask.match), (0, operators_1.mergeMap)((action) => {
|
|
10
10
|
const { taskId } = action.payload;
|
|
11
11
|
return zeniAPI
|
|
12
|
-
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
12
|
+
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}`)
|
|
13
13
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
14
14
|
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
15
15
|
const actions = [];
|
|
@@ -24,7 +24,7 @@ const fetchTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
24
24
|
taskDetail.fetchTaskStatus.fetchState !== 'In-Progress') {
|
|
25
25
|
taskActions.push((0, taskDetailReducer_1.updateEditTaskFetchStatus)({ taskId, fetchState: 'In-Progress' }));
|
|
26
26
|
const getTaskDetail$ = zeniAPI
|
|
27
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
27
|
+
.getJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}`)
|
|
28
28
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
29
29
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
30
30
|
const fetchActions = [
|
|
@@ -22,7 +22,7 @@ const fetchTaskHistoryEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
|
|
|
22
22
|
fetchState: 'In-Progress',
|
|
23
23
|
}));
|
|
24
24
|
const getHistoryDetail$ = zeniAPI
|
|
25
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
25
|
+
.getJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}/history`)
|
|
26
26
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
27
27
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
28
28
|
return (0, rxjs_1.of)((0, taskDetailReducer_1.updateTaskHistory)({
|
|
@@ -13,8 +13,8 @@ const saveTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
|
|
|
13
13
|
const state = state$.value;
|
|
14
14
|
const payload = prepareTaskPayload(state, isArchive, taskId);
|
|
15
15
|
const saveTaskApi = taskId != null
|
|
16
|
-
? zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
17
|
-
: zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
16
|
+
? zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}`, payload)
|
|
17
|
+
: zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks`, payload);
|
|
18
18
|
return saveTaskApi.pipe((0, operators_1.mergeMap)((response) => {
|
|
19
19
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
20
20
|
const fetchActions = [
|
|
@@ -8,7 +8,7 @@ const taskListReducer_1 = require("./taskListReducer");
|
|
|
8
8
|
const taskReducer_1 = require("../../../entity/task/taskReducer");
|
|
9
9
|
const fetchTaskListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.fetchTaskList.match), (0, operators_1.switchMap)(() => {
|
|
10
10
|
return zeniAPI
|
|
11
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
11
|
+
.getJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks?query=${encodeURIComponent(`{"task_type": "all"}`)}`)
|
|
12
12
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
13
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
14
14
|
return (0, rxjs_1.of)((0, taskReducer_1.updateTasks)(response.data.tasks), (0, taskListReducer_1.updateTaskList)({
|
package/lib/zeniAPI.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface RESTAPIEndpoints {
|
|
|
14
14
|
readonly documentAIMicroServiceBaseUrl: string;
|
|
15
15
|
readonly approvalMicroServiceBaseUrl: string;
|
|
16
16
|
readonly cardMicroServiceBaseUrl: string;
|
|
17
|
-
readonly
|
|
17
|
+
readonly taskMicroServiceBaseUrl: string;
|
|
18
18
|
}
|
|
19
19
|
export interface ZeniAPI<ResponseType = FetchResponse> {
|
|
20
20
|
readonly apiEndPoints: RESTAPIEndpoints;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.86",
|
|
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
|
"types": "lib/index.d.ts",
|