@zeniai/client-epic-state 4.19.72 → 4.19.73-beta0AD
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/aiCfoView/aiCfoViewReducer.js +9 -4
- package/lib/esm/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +3 -3
- package/lib/esm/view/notificationView/epics/fetchNotificationViewEpic.js +3 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiCfoView/aiCfoViewReducer.js +9 -4
- package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +2 -2
- package/lib/view/notificationView/epics/fetchNotificationViewEpic.js +2 -2
- package/package.json +1 -1
|
@@ -317,9 +317,11 @@ const aiCfoView = createSlice({
|
|
|
317
317
|
},
|
|
318
318
|
deleteChatSession: {
|
|
319
319
|
reducer(draft, action) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
const { chatSessionId } = action.payload;
|
|
321
|
+
draft.deleteChatSessionStateByChatSessionId[chatSessionId] = {
|
|
322
|
+
fetchState: 'In-Progress',
|
|
323
|
+
error: undefined,
|
|
324
|
+
};
|
|
323
325
|
},
|
|
324
326
|
prepare(chatSessionId) {
|
|
325
327
|
return { payload: { chatSessionId } };
|
|
@@ -327,7 +329,10 @@ const aiCfoView = createSlice({
|
|
|
327
329
|
},
|
|
328
330
|
deleteChatSessionSuccess(draft, action) {
|
|
329
331
|
const { chatSessionId } = action.payload;
|
|
330
|
-
|
|
332
|
+
draft.deleteChatSessionStateByChatSessionId[chatSessionId] = {
|
|
333
|
+
fetchState: 'Completed',
|
|
334
|
+
error: undefined,
|
|
335
|
+
};
|
|
331
336
|
draft.allChatSessionIds = draft.allChatSessionIds.filter((id) => id !== chatSessionId);
|
|
332
337
|
if (draft.uiState.currentChatSessionId === chatSessionId) {
|
|
333
338
|
draft.uiState.currentChatSessionId = undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter,
|
|
2
|
+
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
4
4
|
import { fetchNotificationUnreadCount, fetchNotificationUnreadCountFailure, fetchNotificationUnreadCountSuccess, } from '../notificationViewReducer';
|
|
5
|
-
export const fetchNotificationUnreadCountEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchNotificationUnreadCount.match),
|
|
5
|
+
export const fetchNotificationUnreadCountEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchNotificationUnreadCount.match), mergeMap((action) => {
|
|
6
6
|
const { notificationGroup, mode } = action.payload;
|
|
7
7
|
const queryParam = {
|
|
8
8
|
fetch_unread_notification_count: true,
|
|
@@ -11,7 +11,7 @@ export const fetchNotificationUnreadCountEpic = (actions$, _state$, zeniAPI) =>
|
|
|
11
11
|
};
|
|
12
12
|
return zeniAPI
|
|
13
13
|
.getJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
14
|
-
.pipe(
|
|
14
|
+
.pipe(mergeMap((response) => {
|
|
15
15
|
if (isSuccessResponse(response) && response.data != null) {
|
|
16
16
|
const { count: { unread }, } = response.data;
|
|
17
17
|
const actions = [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter,
|
|
2
|
+
import { catchError, concatMap, filter, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { updateAllNotifications } from '../../../entity/notification/notificationReducer';
|
|
4
4
|
import { updateAllUsers } from '../../../entity/user/userReducer';
|
|
5
5
|
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
6
6
|
import { fetchNotificationView, fetchNotificationViewFailure, fetchNotificationViewSuccess, toNotificationTab, } from '../notificationViewReducer';
|
|
7
|
-
export const fetchNotificationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchNotificationView.match),
|
|
7
|
+
export const fetchNotificationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchNotificationView.match), concatMap((action) => {
|
|
8
8
|
const { notificationGroup, mode, status, isNewNotificationFetch } = action.payload;
|
|
9
9
|
const { stateByTab } = state$.value.notificationViewState;
|
|
10
10
|
const notificationTab = toNotificationTab(notificationGroup);
|
|
@@ -21,7 +21,7 @@ export const fetchNotificationViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
21
21
|
};
|
|
22
22
|
return zeniAPI
|
|
23
23
|
.getJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
24
|
-
.pipe(
|
|
24
|
+
.pipe(mergeMap((response) => {
|
|
25
25
|
if (isSuccessResponse(response) && response.data != null) {
|
|
26
26
|
const { notifications, total_count, next_page_token } = response.data;
|
|
27
27
|
const allUsers = [];
|