@zeniai/client-epic-state 4.19.72 → 4.19.73-beta1AD
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/index.js +1 -1
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +14 -5
- package/lib/esm/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +3 -3
- package/lib/esm/view/notificationView/epics/fetchNotificationViewEpic.js +3 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -2
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +3 -1
- package/lib/view/aiCfoView/aiCfoViewReducer.js +15 -6
- package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +2 -2
- package/lib/view/notificationView/epics/fetchNotificationViewEpic.js +2 -2
- package/package.json +1 -1
|
@@ -84,7 +84,9 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
84
84
|
}, "aiCfoView/deleteChatSessionSuccess">, deleteChatSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
85
85
|
chatSessionId: ID;
|
|
86
86
|
error: ZeniAPIStatus;
|
|
87
|
-
}, "aiCfoView/deleteChatSessionFailure">,
|
|
87
|
+
}, "aiCfoView/deleteChatSessionFailure">, clearDeleteChatSessionStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
88
|
+
chatSessionId: ID;
|
|
89
|
+
}, "aiCfoView/clearDeleteChatSessionStatus">, clearAiCfoView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfoView/clearAiCfoView">, updateCotCollapsedState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
88
90
|
isCollapsed: boolean;
|
|
89
91
|
questionAnswerId: ID;
|
|
90
92
|
}, "aiCfoView/updateCotCollapsedState">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateCotCollapsedState = exports.clearAiCfoView = exports.deleteChatSessionFailure = exports.deleteChatSessionSuccess = exports.deleteChatSession = exports.acceptMasterTOSFailure = exports.acceptMasterTOSSuccess = exports.acceptMasterTOS = exports.stopSubmitQuestionFailure = exports.stopSubmitQuestionSuccess = exports.stopSubmitQuestion = exports.stopSubmitFailure = exports.stopSubmitSuccess = exports.stopSubmit = exports.clearLastContextMessage = exports.clearCurrentSessionId = exports.fetchChatHistoryFailure = exports.fetchChatHistorySuccess = exports.fetchChatHistory = exports.fetchChatSessionsForUserFailure = exports.fetchChatSessionsForUserSuccess = exports.fetchChatSessionsForUser = exports.createSessionAndSubmitFailure = exports.createSessionAndSubmitSuccess = exports.initializeNewSessionState = exports.createSessionAndSubmit = exports.createSessionFailure = exports.createSessionSuccess = exports.createSession = exports.setSession = exports.clearInput = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.updateResponseState = exports.submitQuestionFailure = exports.submitQuestionSuccess = exports.submitQuestion = exports.initialAiCfoViewState = void 0;
|
|
4
|
+
exports.updateCotCollapsedState = exports.clearAiCfoView = exports.clearDeleteChatSessionStatus = exports.deleteChatSessionFailure = exports.deleteChatSessionSuccess = exports.deleteChatSession = exports.acceptMasterTOSFailure = exports.acceptMasterTOSSuccess = exports.acceptMasterTOS = exports.stopSubmitQuestionFailure = exports.stopSubmitQuestionSuccess = exports.stopSubmitQuestion = exports.stopSubmitFailure = exports.stopSubmitSuccess = exports.stopSubmit = exports.clearLastContextMessage = exports.clearCurrentSessionId = exports.fetchChatHistoryFailure = exports.fetchChatHistorySuccess = exports.fetchChatHistory = exports.fetchChatSessionsForUserFailure = exports.fetchChatSessionsForUserSuccess = exports.fetchChatSessionsForUser = exports.createSessionAndSubmitFailure = exports.createSessionAndSubmitSuccess = exports.initializeNewSessionState = exports.createSessionAndSubmit = exports.createSessionFailure = exports.createSessionSuccess = exports.createSession = exports.setSession = exports.clearInput = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.updateResponseState = exports.submitQuestionFailure = exports.submitQuestionSuccess = exports.submitQuestion = exports.initialAiCfoViewState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
exports.initialAiCfoViewState = {
|
|
7
7
|
fetchState: 'Not-Started',
|
|
@@ -321,9 +321,11 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
321
321
|
},
|
|
322
322
|
deleteChatSession: {
|
|
323
323
|
reducer(draft, action) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -350,6 +355,10 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
350
355
|
error,
|
|
351
356
|
};
|
|
352
357
|
},
|
|
358
|
+
clearDeleteChatSessionStatus(draft, action) {
|
|
359
|
+
const { chatSessionId } = action.payload;
|
|
360
|
+
delete draft.deleteChatSessionStateByChatSessionId[chatSessionId];
|
|
361
|
+
},
|
|
353
362
|
clearInput(draft) {
|
|
354
363
|
draft.uiState.currentInput = '';
|
|
355
364
|
},
|
|
@@ -366,5 +375,5 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
366
375
|
},
|
|
367
376
|
},
|
|
368
377
|
});
|
|
369
|
-
_a = aiCfoView.actions, exports.submitQuestion = _a.submitQuestion, exports.submitQuestionSuccess = _a.submitQuestionSuccess, exports.submitQuestionFailure = _a.submitQuestionFailure, exports.updateResponseState = _a.updateResponseState, exports.updateAiCfoViewScrollPosition = _a.updateAiCfoViewScrollPosition, exports.updateCurrentInput = _a.updateCurrentInput, exports.clearInput = _a.clearInput, exports.setSession = _a.setSession, exports.createSession = _a.createSession, exports.createSessionSuccess = _a.createSessionSuccess, exports.createSessionFailure = _a.createSessionFailure, exports.createSessionAndSubmit = _a.createSessionAndSubmit, exports.initializeNewSessionState = _a.initializeNewSessionState, exports.createSessionAndSubmitSuccess = _a.createSessionAndSubmitSuccess, exports.createSessionAndSubmitFailure = _a.createSessionAndSubmitFailure, exports.fetchChatSessionsForUser = _a.fetchChatSessionsForUser, exports.fetchChatSessionsForUserSuccess = _a.fetchChatSessionsForUserSuccess, exports.fetchChatSessionsForUserFailure = _a.fetchChatSessionsForUserFailure, exports.fetchChatHistory = _a.fetchChatHistory, exports.fetchChatHistorySuccess = _a.fetchChatHistorySuccess, exports.fetchChatHistoryFailure = _a.fetchChatHistoryFailure, exports.clearCurrentSessionId = _a.clearCurrentSessionId, exports.clearLastContextMessage = _a.clearLastContextMessage, exports.stopSubmit = _a.stopSubmit, exports.stopSubmitSuccess = _a.stopSubmitSuccess, exports.stopSubmitFailure = _a.stopSubmitFailure, exports.stopSubmitQuestion = _a.stopSubmitQuestion, exports.stopSubmitQuestionSuccess = _a.stopSubmitQuestionSuccess, exports.stopSubmitQuestionFailure = _a.stopSubmitQuestionFailure, exports.acceptMasterTOS = _a.acceptMasterTOS, exports.acceptMasterTOSSuccess = _a.acceptMasterTOSSuccess, exports.acceptMasterTOSFailure = _a.acceptMasterTOSFailure, exports.deleteChatSession = _a.deleteChatSession, exports.deleteChatSessionSuccess = _a.deleteChatSessionSuccess, exports.deleteChatSessionFailure = _a.deleteChatSessionFailure, exports.clearAiCfoView = _a.clearAiCfoView, exports.updateCotCollapsedState = _a.updateCotCollapsedState;
|
|
378
|
+
_a = aiCfoView.actions, exports.submitQuestion = _a.submitQuestion, exports.submitQuestionSuccess = _a.submitQuestionSuccess, exports.submitQuestionFailure = _a.submitQuestionFailure, exports.updateResponseState = _a.updateResponseState, exports.updateAiCfoViewScrollPosition = _a.updateAiCfoViewScrollPosition, exports.updateCurrentInput = _a.updateCurrentInput, exports.clearInput = _a.clearInput, exports.setSession = _a.setSession, exports.createSession = _a.createSession, exports.createSessionSuccess = _a.createSessionSuccess, exports.createSessionFailure = _a.createSessionFailure, exports.createSessionAndSubmit = _a.createSessionAndSubmit, exports.initializeNewSessionState = _a.initializeNewSessionState, exports.createSessionAndSubmitSuccess = _a.createSessionAndSubmitSuccess, exports.createSessionAndSubmitFailure = _a.createSessionAndSubmitFailure, exports.fetchChatSessionsForUser = _a.fetchChatSessionsForUser, exports.fetchChatSessionsForUserSuccess = _a.fetchChatSessionsForUserSuccess, exports.fetchChatSessionsForUserFailure = _a.fetchChatSessionsForUserFailure, exports.fetchChatHistory = _a.fetchChatHistory, exports.fetchChatHistorySuccess = _a.fetchChatHistorySuccess, exports.fetchChatHistoryFailure = _a.fetchChatHistoryFailure, exports.clearCurrentSessionId = _a.clearCurrentSessionId, exports.clearLastContextMessage = _a.clearLastContextMessage, exports.stopSubmit = _a.stopSubmit, exports.stopSubmitSuccess = _a.stopSubmitSuccess, exports.stopSubmitFailure = _a.stopSubmitFailure, exports.stopSubmitQuestion = _a.stopSubmitQuestion, exports.stopSubmitQuestionSuccess = _a.stopSubmitQuestionSuccess, exports.stopSubmitQuestionFailure = _a.stopSubmitQuestionFailure, exports.acceptMasterTOS = _a.acceptMasterTOS, exports.acceptMasterTOSSuccess = _a.acceptMasterTOSSuccess, exports.acceptMasterTOSFailure = _a.acceptMasterTOSFailure, exports.deleteChatSession = _a.deleteChatSession, exports.deleteChatSessionSuccess = _a.deleteChatSessionSuccess, exports.deleteChatSessionFailure = _a.deleteChatSessionFailure, exports.clearDeleteChatSessionStatus = _a.clearDeleteChatSessionStatus, exports.clearAiCfoView = _a.clearAiCfoView, exports.updateCotCollapsedState = _a.updateCotCollapsedState;
|
|
370
379
|
exports.default = aiCfoView.reducer;
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
3
|
+
"version": "4.19.73-beta1AD",
|
|
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",
|