@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.
@@ -321,9 +321,11 @@ const aiCfoView = (0, toolkit_1.createSlice)({
321
321
  },
322
322
  deleteChatSession: {
323
323
  reducer(draft, action) {
324
- // No-op; session removed from state only when API completes (deleteChatSessionSuccess).
325
- void draft;
326
- void action;
324
+ const { chatSessionId } = action.payload;
325
+ draft.deleteChatSessionStateByChatSessionId[chatSessionId] = {
326
+ fetchState: 'In-Progress',
327
+ error: undefined,
328
+ };
327
329
  },
328
330
  prepare(chatSessionId) {
329
331
  return { payload: { chatSessionId } };
@@ -331,7 +333,10 @@ const aiCfoView = (0, toolkit_1.createSlice)({
331
333
  },
332
334
  deleteChatSessionSuccess(draft, action) {
333
335
  const { chatSessionId } = action.payload;
334
- delete draft.deleteChatSessionStateByChatSessionId[chatSessionId];
336
+ draft.deleteChatSessionStateByChatSessionId[chatSessionId] = {
337
+ fetchState: 'Completed',
338
+ error: undefined,
339
+ };
335
340
  draft.allChatSessionIds = draft.allChatSessionIds.filter((id) => id !== chatSessionId);
336
341
  if (draft.uiState.currentChatSessionId === chatSessionId) {
337
342
  draft.uiState.currentChatSessionId = undefined;
@@ -5,7 +5,7 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const responsePayload_1 = require("../../../responsePayload");
7
7
  const notificationViewReducer_1 = require("../notificationViewReducer");
8
- const fetchNotificationUnreadCountEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(notificationViewReducer_1.fetchNotificationUnreadCount.match), (0, operators_1.switchMap)((action) => {
8
+ const fetchNotificationUnreadCountEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(notificationViewReducer_1.fetchNotificationUnreadCount.match), (0, operators_1.mergeMap)((action) => {
9
9
  const { notificationGroup, mode } = action.payload;
10
10
  const queryParam = {
11
11
  fetch_unread_notification_count: true,
@@ -14,7 +14,7 @@ const fetchNotificationUnreadCountEpic = (actions$, _state$, zeniAPI) => actions
14
14
  };
15
15
  return zeniAPI
16
16
  .getJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
17
- .pipe((0, operators_1.switchMap)((response) => {
17
+ .pipe((0, operators_1.mergeMap)((response) => {
18
18
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
19
19
  const { count: { unread }, } = response.data;
20
20
  const actions = [
@@ -7,7 +7,7 @@ const notificationReducer_1 = require("../../../entity/notification/notification
7
7
  const userReducer_1 = require("../../../entity/user/userReducer");
8
8
  const responsePayload_1 = require("../../../responsePayload");
9
9
  const notificationViewReducer_1 = require("../notificationViewReducer");
10
- const fetchNotificationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(notificationViewReducer_1.fetchNotificationView.match), (0, operators_1.switchMap)((action) => {
10
+ const fetchNotificationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(notificationViewReducer_1.fetchNotificationView.match), (0, operators_1.concatMap)((action) => {
11
11
  const { notificationGroup, mode, status, isNewNotificationFetch } = action.payload;
12
12
  const { stateByTab } = state$.value.notificationViewState;
13
13
  const notificationTab = (0, notificationViewReducer_1.toNotificationTab)(notificationGroup);
@@ -24,7 +24,7 @@ const fetchNotificationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((
24
24
  };
25
25
  return zeniAPI
26
26
  .getJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
27
- .pipe((0, operators_1.switchMap)((response) => {
27
+ .pipe((0, operators_1.mergeMap)((response) => {
28
28
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
29
29
  const { notifications, total_count, next_page_token } = response.data;
30
30
  const allUsers = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.72",
3
+ "version": "4.19.73-beta0AD",
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",