@zeniai/client-epic-state 4.10.3 → 4.10.4
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/commonPayloadTypes/commonPayload.d.ts +0 -8
- package/lib/commonPayloadTypes/commonPayload.js +0 -18
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -4
- package/lib/entity/tenant/clearAllEpic.js +1 -5
- package/lib/epic.d.ts +3 -7
- package/lib/epic.js +1 -5
- package/lib/index.d.ts +2 -10
- package/lib/index.js +8 -29
- package/lib/reducer.d.ts +0 -6
- package/lib/reducer.js +0 -6
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +1 -2
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +5 -37
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +1 -1
- package/lib/zeniAPI.d.ts +0 -2
- package/lib/zeniAPI.js +0 -8
- package/package.json +1 -2
- package/lib/entity/notification/notificationPayload.d.ts +0 -46
- package/lib/entity/notification/notificationPayload.js +0 -124
- package/lib/entity/notification/notificationReducer.d.ts +0 -20
- package/lib/entity/notification/notificationReducer.js +0 -118
- package/lib/entity/notification/notificationSelector.d.ts +0 -9
- package/lib/entity/notification/notificationSelector.js +0 -36
- package/lib/entity/notification/notificationState.d.ts +0 -7
- package/lib/entity/notification/notificationState.js +0 -2
- package/lib/entity/notification/types/notificationSelectorTypes.d.ts +0 -8
- package/lib/entity/notification/types/notificationSelectorTypes.js +0 -2
- package/lib/entity/notification/types/notificationStateTypes.d.ts +0 -50
- package/lib/entity/notification/types/notificationStateTypes.js +0 -2
- package/lib/entity/notification/types/notificationTypes.d.ts +0 -24
- package/lib/entity/notification/types/notificationTypes.js +0 -58
- package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.d.ts +0 -10
- package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +0 -39
- package/lib/view/notificationView/epics/fetchNotificationViewEpic.d.ts +0 -9
- package/lib/view/notificationView/epics/fetchNotificationViewEpic.js +0 -56
- package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.d.ts +0 -9
- package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.js +0 -50
- package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.d.ts +0 -9
- package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.js +0 -86
- package/lib/view/notificationView/notificationView.helpers.d.ts +0 -2
- package/lib/view/notificationView/notificationView.helpers.js +0 -11
- package/lib/view/notificationView/notificationViewPayload.d.ts +0 -48
- package/lib/view/notificationView/notificationViewPayload.js +0 -2
- package/lib/view/notificationView/notificationViewReducer.d.ts +0 -64
- package/lib/view/notificationView/notificationViewReducer.js +0 -372
- package/lib/view/notificationView/notificationViewSelector.d.ts +0 -29
- package/lib/view/notificationView/notificationViewSelector.js +0 -89
- package/lib/view/notificationView/notificationViewState.d.ts +0 -31
- package/lib/view/notificationView/notificationViewState.js +0 -19
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapNotificationPayloadToNotification = void 0;
|
|
4
|
-
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
5
|
-
const commonPayload_1 = require("../../commonPayloadTypes/commonPayload");
|
|
6
|
-
const notificationTypes_1 = require("./types/notificationTypes");
|
|
7
|
-
/**
|
|
8
|
-
* Helpers
|
|
9
|
-
*/
|
|
10
|
-
const toNotificationUpdates = (payload) => {
|
|
11
|
-
const { field, type, old_value, new_value } = payload;
|
|
12
|
-
const oldValue = {
|
|
13
|
-
text: '',
|
|
14
|
-
list: [],
|
|
15
|
-
codeNamePair: null,
|
|
16
|
-
};
|
|
17
|
-
const newValue = {
|
|
18
|
-
text: '',
|
|
19
|
-
list: [],
|
|
20
|
-
codeNamePair: null,
|
|
21
|
-
};
|
|
22
|
-
const updateType = (0, notificationTypes_1.toNotificationUpdateValueType)(type);
|
|
23
|
-
switch (updateType) {
|
|
24
|
-
case 'list':
|
|
25
|
-
if (Array.isArray(old_value) === false) {
|
|
26
|
-
throw new Error(`Invalid old_value - ${old_value} for type - ${type}`);
|
|
27
|
-
}
|
|
28
|
-
if (Array.isArray(new_value) === false) {
|
|
29
|
-
throw new Error(`Invalid new_value - ${new_value} for type - ${type}`);
|
|
30
|
-
}
|
|
31
|
-
oldValue[updateType] = old_value;
|
|
32
|
-
newValue[updateType] = new_value;
|
|
33
|
-
break;
|
|
34
|
-
case 'code_name_pair':
|
|
35
|
-
if ((0, commonPayload_1.isAllowedValueWithCodeOptionalPayload)(old_value) === false) {
|
|
36
|
-
throw new Error(`Invalid old_value - ${old_value} for type - ${type}`);
|
|
37
|
-
}
|
|
38
|
-
if ((0, commonPayload_1.isAllowedValueWithCodeOptionalPayload)(new_value) === false) {
|
|
39
|
-
throw new Error(`Invalid new_value - ${new_value} for type - ${type}`);
|
|
40
|
-
}
|
|
41
|
-
oldValue['codeNamePair'] =
|
|
42
|
-
old_value.code != null &&
|
|
43
|
-
old_value.name != null
|
|
44
|
-
? (0, commonPayload_1.toAllowedValueWithCode)(old_value)
|
|
45
|
-
: null;
|
|
46
|
-
newValue['codeNamePair'] =
|
|
47
|
-
new_value.code != null &&
|
|
48
|
-
new_value.name != null
|
|
49
|
-
? (0, commonPayload_1.toAllowedValueWithCode)(new_value)
|
|
50
|
-
: null;
|
|
51
|
-
break;
|
|
52
|
-
case 'string':
|
|
53
|
-
default:
|
|
54
|
-
if (typeof old_value !== 'string') {
|
|
55
|
-
throw new Error(`Invalid old_value - ${old_value} for type - ${type}`);
|
|
56
|
-
}
|
|
57
|
-
if (typeof new_value !== 'string') {
|
|
58
|
-
throw new Error(`Invalid new_value - ${new_value} for type - ${type}`);
|
|
59
|
-
}
|
|
60
|
-
oldValue['text'] = old_value;
|
|
61
|
-
newValue['text'] = new_value;
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
field,
|
|
66
|
-
type: updateType,
|
|
67
|
-
oldValue,
|
|
68
|
-
newValue,
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
const toNotificationAdditionalInfo = (payload) => {
|
|
72
|
-
if (payload == null) {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
const { due_date } = payload;
|
|
76
|
-
return { dueDate: (0, zeniDayJS_1.dateInUTC)(due_date) };
|
|
77
|
-
};
|
|
78
|
-
const toNotificationMetaData = (payload) => {
|
|
79
|
-
const { tags, event_description, event_title, event_status, updates, additional_info, } = payload;
|
|
80
|
-
return {
|
|
81
|
-
tags,
|
|
82
|
-
eventDescription: event_description,
|
|
83
|
-
eventTitle: event_title,
|
|
84
|
-
eventStatus: event_status != null && (0, commonPayload_1.isAllowedValueWithCodePayload)(event_status)
|
|
85
|
-
? (0, commonPayload_1.toAllowedValueWithCode)(event_status)
|
|
86
|
-
: undefined,
|
|
87
|
-
updates: updates.map((update) => toNotificationUpdates(update)),
|
|
88
|
-
additionalInfo: toNotificationAdditionalInfo(additional_info),
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
const toNotificationActivity = (payload) => {
|
|
92
|
-
const { activity_type, metadata } = payload;
|
|
93
|
-
return {
|
|
94
|
-
activityType: (0, notificationTypes_1.toNotificationActivityType)(activity_type),
|
|
95
|
-
metadata: toNotificationMetaData(metadata),
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
const toNotificationEventData = (payload) => {
|
|
99
|
-
const { entity_id, create_timestamp, title, description, authors, activities } = payload;
|
|
100
|
-
return {
|
|
101
|
-
entitiyId: entity_id,
|
|
102
|
-
createTimestamp: (0, zeniDayJS_1.dateInUTC)(create_timestamp),
|
|
103
|
-
title,
|
|
104
|
-
description: description !== null && description !== void 0 ? description : '',
|
|
105
|
-
authorIds: authors.map((author) => author.user_id),
|
|
106
|
-
activities: activities.map((activity) => toNotificationActivity(activity)),
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
const mapNotificationPayloadToNotification = (payload) => {
|
|
110
|
-
const { notification_identifier, user_notification_id, create_time, update_time, status, mode, tenant_id, user_id, notification_group, data, } = payload;
|
|
111
|
-
return {
|
|
112
|
-
notificationId: user_notification_id,
|
|
113
|
-
notificationIdentifier: (0, notificationTypes_1.toNotificationIdentifier)(notification_identifier),
|
|
114
|
-
updateTime: (0, zeniDayJS_1.dateInUTC)(update_time),
|
|
115
|
-
createTime: (0, zeniDayJS_1.dateInUTC)(create_time),
|
|
116
|
-
status: (0, notificationTypes_1.toNotificationStatus)(status),
|
|
117
|
-
mode: (0, notificationTypes_1.toNotificationMode)(mode),
|
|
118
|
-
tenantId: tenant_id,
|
|
119
|
-
userId: user_id,
|
|
120
|
-
notificationGroup: (0, notificationTypes_1.toNotificationGroup)(notification_group),
|
|
121
|
-
eventData: toNotificationEventData(data),
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
exports.mapNotificationPayloadToNotification = mapNotificationPayloadToNotification;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CoreNotificationData } from '@cord-sdk/types';
|
|
2
|
-
import { UpdateType } from '../../commonStateTypes/common';
|
|
3
|
-
import { NotificationPayload } from './notificationPayload';
|
|
4
|
-
import { NotificationState } from './notificationState';
|
|
5
|
-
export declare const initialState: NotificationState;
|
|
6
|
-
export declare const updateAllNotifications: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[notifications: NotificationPayload[], updateType?: UpdateType | undefined], {
|
|
7
|
-
notifications: NotificationPayload[];
|
|
8
|
-
updateType: UpdateType;
|
|
9
|
-
}, string, never, never>, updateNotificationsStatuses: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[notificationIds: string[], newStatus: "unread" | "read"], {
|
|
10
|
-
notificationIds: string[];
|
|
11
|
-
newStatus: "unread" | "read";
|
|
12
|
-
}, string, never, never>, updateCommentsNotifications: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[notifications: CoreNotificationData[], updateType?: UpdateType | undefined], {
|
|
13
|
-
notifications: CoreNotificationData[];
|
|
14
|
-
updateType: UpdateType;
|
|
15
|
-
}, string, never, never>, updateCommentsNotificationsStatuses: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[notificationIds: string[], newStatus: "unread" | "read"], {
|
|
16
|
-
notificationIds: string[];
|
|
17
|
-
newStatus: "unread" | "read";
|
|
18
|
-
}, string, never, never>, removeNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, removeCommentNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, clearAllNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
19
|
-
declare const _default: import("@reduxjs/toolkit").Reducer<NotificationState, import("@reduxjs/toolkit").AnyAction>;
|
|
20
|
-
export default _default;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
var _a;
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.clearAllNotifications = exports.removeCommentNotification = exports.removeNotification = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.updateNotificationsStatuses = exports.updateAllNotifications = exports.initialState = void 0;
|
|
8
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
|
-
const assignWith_1 = __importDefault(require("lodash/assignWith"));
|
|
10
|
-
const notificationPayload_1 = require("./notificationPayload");
|
|
11
|
-
exports.initialState = {
|
|
12
|
-
notificationById: {},
|
|
13
|
-
commentsNotificationById: {},
|
|
14
|
-
};
|
|
15
|
-
const notification = (0, toolkit_1.createSlice)({
|
|
16
|
-
name: 'notification',
|
|
17
|
-
initialState: exports.initialState,
|
|
18
|
-
reducers: {
|
|
19
|
-
updateAllNotifications: {
|
|
20
|
-
reducer(draft, action) {
|
|
21
|
-
doUpdateNotifications(draft.notificationById, action.payload.notifications, action.payload.updateType);
|
|
22
|
-
},
|
|
23
|
-
prepare(notifications, updateType = 'merge') {
|
|
24
|
-
return {
|
|
25
|
-
payload: {
|
|
26
|
-
notifications,
|
|
27
|
-
updateType,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
updateNotificationsStatuses: {
|
|
33
|
-
reducer(draft, action) {
|
|
34
|
-
const { notificationIds, newStatus } = action.payload;
|
|
35
|
-
notificationIds.forEach((notificationId) => {
|
|
36
|
-
if (draft.notificationById[notificationId] != null) {
|
|
37
|
-
draft.notificationById[notificationId].status = newStatus;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
},
|
|
41
|
-
prepare(notificationIds, newStatus) {
|
|
42
|
-
return {
|
|
43
|
-
payload: {
|
|
44
|
-
notificationIds,
|
|
45
|
-
newStatus,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
updateCommentsNotifications: {
|
|
51
|
-
reducer(draft, action) {
|
|
52
|
-
doUpdateCommentsNotifications(draft.commentsNotificationById, action.payload.notifications, action.payload.updateType);
|
|
53
|
-
},
|
|
54
|
-
prepare(notifications, updateType = 'merge') {
|
|
55
|
-
return {
|
|
56
|
-
payload: {
|
|
57
|
-
notifications,
|
|
58
|
-
updateType,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
updateCommentsNotificationsStatuses: {
|
|
64
|
-
reducer(draft, action) {
|
|
65
|
-
const { notificationIds, newStatus } = action.payload;
|
|
66
|
-
notificationIds.forEach((notificationId) => {
|
|
67
|
-
if (draft.commentsNotificationById[notificationId] != null) {
|
|
68
|
-
draft.commentsNotificationById[notificationId].readStatus =
|
|
69
|
-
newStatus;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
prepare(notificationIds, newStatus) {
|
|
74
|
-
return {
|
|
75
|
-
payload: {
|
|
76
|
-
notificationIds,
|
|
77
|
-
newStatus,
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
removeNotification(draft, action) {
|
|
83
|
-
delete draft.notificationById[action.payload];
|
|
84
|
-
},
|
|
85
|
-
removeCommentNotification(draft, action) {
|
|
86
|
-
delete draft.commentsNotificationById[action.payload];
|
|
87
|
-
},
|
|
88
|
-
clearAllNotifications(draft) {
|
|
89
|
-
Object.assign(draft, exports.initialState);
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
_a = notification.actions, exports.updateAllNotifications = _a.updateAllNotifications, exports.updateNotificationsStatuses = _a.updateNotificationsStatuses, exports.updateCommentsNotifications = _a.updateCommentsNotifications, exports.updateCommentsNotificationsStatuses = _a.updateCommentsNotificationsStatuses, exports.removeNotification = _a.removeNotification, exports.removeCommentNotification = _a.removeCommentNotification, exports.clearAllNotifications = _a.clearAllNotifications;
|
|
94
|
-
exports.default = notification.reducer;
|
|
95
|
-
/**
|
|
96
|
-
* Helpers
|
|
97
|
-
*/
|
|
98
|
-
const doUpdateNotifications = (draft, notifications, updateType) => {
|
|
99
|
-
notifications.forEach((notification) => {
|
|
100
|
-
const latestNotification = (0, notificationPayload_1.mapNotificationPayloadToNotification)(notification);
|
|
101
|
-
if (latestNotification.notificationId in draft && updateType === 'merge') {
|
|
102
|
-
(0, assignWith_1.default)(draft[latestNotification.notificationId], latestNotification, (objValue, srcValue) => srcValue !== null && srcValue !== void 0 ? srcValue : objValue); // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!);
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
draft[latestNotification.notificationId] = latestNotification;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
const doUpdateCommentsNotifications = (draft, notifications, updateType) => {
|
|
110
|
-
notifications.forEach((notification) => {
|
|
111
|
-
if (notification.id in draft && updateType === 'merge') {
|
|
112
|
-
(0, assignWith_1.default)(draft[notification.id], notification, (objValue, srcValue) => srcValue !== null && srcValue !== void 0 ? srcValue : objValue); // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
draft[notification.id] = notification;
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CoreNotificationData } from '@cord-sdk/types';
|
|
2
|
-
import { ID } from '../../commonStateTypes/common';
|
|
3
|
-
import { NotificationState } from './notificationState';
|
|
4
|
-
import { NotificationWithAuthors } from './types/notificationSelectorTypes';
|
|
5
|
-
import { UserState } from '../user/userState';
|
|
6
|
-
export declare function getNotificationsByNotificationIds(notificationState: NotificationState, userState: UserState, notificationIds: ID[]): NotificationWithAuthors[];
|
|
7
|
-
export declare function getNotificationByNotificationId(notificationState: NotificationState, userState: UserState, notificationId: ID): NotificationWithAuthors | undefined;
|
|
8
|
-
export declare function getCommentsNotificationsByNotificationIds(notificationState: NotificationState, notificationIds: ID[]): CoreNotificationData[];
|
|
9
|
-
export declare function getCommentsNotificationByNotificationId(notificationState: NotificationState, notificationId: ID): CoreNotificationData | undefined;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getCommentsNotificationByNotificationId = exports.getCommentsNotificationsByNotificationIds = exports.getNotificationByNotificationId = exports.getNotificationsByNotificationIds = void 0;
|
|
7
|
-
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
|
-
const userSelector_1 = require("../user/userSelector");
|
|
9
|
-
function getNotificationsByNotificationIds(notificationState, userState, notificationIds) {
|
|
10
|
-
const notifications = notificationIds
|
|
11
|
-
.map((notificationId) => getNotificationByNotificationId(notificationState, userState, notificationId))
|
|
12
|
-
.filter((value) => value != null);
|
|
13
|
-
return notifications;
|
|
14
|
-
}
|
|
15
|
-
exports.getNotificationsByNotificationIds = getNotificationsByNotificationIds;
|
|
16
|
-
function getNotificationByNotificationId(notificationState, userState, notificationId) {
|
|
17
|
-
const notification = notificationState.notificationById[notificationId];
|
|
18
|
-
if (notification != null) {
|
|
19
|
-
const notificationWithAuthors = Object.assign(Object.assign({}, notification), { eventData: Object.assign(Object.assign({}, (0, omit_1.default)(notification.eventData, ['authorIds'])), { authors: (0, userSelector_1.getUsersByUserIds)(userState, notification.eventData.authorIds) }) });
|
|
20
|
-
return notificationWithAuthors;
|
|
21
|
-
}
|
|
22
|
-
return undefined;
|
|
23
|
-
}
|
|
24
|
-
exports.getNotificationByNotificationId = getNotificationByNotificationId;
|
|
25
|
-
function getCommentsNotificationsByNotificationIds(notificationState, notificationIds) {
|
|
26
|
-
const notifications = notificationIds
|
|
27
|
-
.map((notificationId) => getCommentsNotificationByNotificationId(notificationState, notificationId))
|
|
28
|
-
.filter((value) => value != null);
|
|
29
|
-
return notifications;
|
|
30
|
-
}
|
|
31
|
-
exports.getCommentsNotificationsByNotificationIds = getCommentsNotificationsByNotificationIds;
|
|
32
|
-
function getCommentsNotificationByNotificationId(notificationState, notificationId) {
|
|
33
|
-
var _a;
|
|
34
|
-
return ((_a = notificationState.commentsNotificationById[notificationId]) !== null && _a !== void 0 ? _a : undefined);
|
|
35
|
-
}
|
|
36
|
-
exports.getCommentsNotificationByNotificationId = getCommentsNotificationByNotificationId;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CoreNotificationData } from '@cord-sdk/types';
|
|
2
|
-
import { ID } from '../../commonStateTypes/common';
|
|
3
|
-
import { Notification } from './types/notificationStateTypes';
|
|
4
|
-
export interface NotificationState {
|
|
5
|
-
notificationById: Record<ID, Notification>;
|
|
6
|
-
commentsNotificationById: Record<ID, CoreNotificationData>;
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { User } from '../../user/userState';
|
|
2
|
-
import { NotificationEventData, Notification } from './notificationStateTypes';
|
|
3
|
-
export interface NotificationEventDataWithAuthors extends Omit<NotificationEventData, 'authorIds'> {
|
|
4
|
-
authors: User[];
|
|
5
|
-
}
|
|
6
|
-
export interface NotificationWithAuthors extends Omit<Notification, 'eventData'> {
|
|
7
|
-
eventData: NotificationEventDataWithAuthors;
|
|
8
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ZeniDate } from '../../../zeniDayJS';
|
|
2
|
-
import { NotificationIdentifierType, NotificationStatus, NotificationMode, NotificationGroup, NotificationActivityType, NotificationUpdateValue } from './notificationTypes';
|
|
3
|
-
import { AllowedValueWithCode } from '../../../commonStateTypes/allowedValue';
|
|
4
|
-
import { ID } from '../../../commonStateTypes/common';
|
|
5
|
-
export interface NotificationValueFormat {
|
|
6
|
-
text: string;
|
|
7
|
-
list: string[];
|
|
8
|
-
codeNamePair: AllowedValueWithCode | null;
|
|
9
|
-
}
|
|
10
|
-
export interface NotificationUpdates {
|
|
11
|
-
field: string;
|
|
12
|
-
type: NotificationUpdateValue;
|
|
13
|
-
oldValue: NotificationValueFormat;
|
|
14
|
-
newValue: NotificationValueFormat;
|
|
15
|
-
}
|
|
16
|
-
export interface NotificationAdditionalInfo {
|
|
17
|
-
dueDate: ZeniDate;
|
|
18
|
-
}
|
|
19
|
-
export interface NotificationMetaData {
|
|
20
|
-
tags: string[];
|
|
21
|
-
eventDescription: string;
|
|
22
|
-
eventTitle: string;
|
|
23
|
-
eventStatus?: AllowedValueWithCode;
|
|
24
|
-
updates: NotificationUpdates[];
|
|
25
|
-
additionalInfo: NotificationAdditionalInfo | null;
|
|
26
|
-
}
|
|
27
|
-
export interface NotificationActivity {
|
|
28
|
-
activityType: NotificationActivityType;
|
|
29
|
-
metadata: NotificationMetaData;
|
|
30
|
-
}
|
|
31
|
-
export interface NotificationEventData {
|
|
32
|
-
entitiyId: ID;
|
|
33
|
-
createTimestamp: ZeniDate;
|
|
34
|
-
title: string;
|
|
35
|
-
description: string;
|
|
36
|
-
authorIds: ID[];
|
|
37
|
-
activities: NotificationActivity[];
|
|
38
|
-
}
|
|
39
|
-
export interface Notification {
|
|
40
|
-
notificationId: ID;
|
|
41
|
-
notificationIdentifier: NotificationIdentifierType;
|
|
42
|
-
updateTime: ZeniDate;
|
|
43
|
-
createTime: ZeniDate;
|
|
44
|
-
status: NotificationStatus;
|
|
45
|
-
mode: NotificationMode;
|
|
46
|
-
tenantId: ID;
|
|
47
|
-
userId: ID;
|
|
48
|
-
notificationGroup: NotificationGroup;
|
|
49
|
-
eventData: NotificationEventData;
|
|
50
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const ALL_NOTIFICATION_GROUPS: readonly ["task_manager"];
|
|
2
|
-
export declare const toNotificationGroup: (v: string) => "task_manager";
|
|
3
|
-
export declare const toNotificationGroupStrict: (v: string) => "task_manager" | undefined;
|
|
4
|
-
export declare type NotificationGroup = ReturnType<typeof toNotificationGroup>;
|
|
5
|
-
export declare const ALL_NOTIFICATION_STATUSES: readonly ["read", "unread"];
|
|
6
|
-
export declare const toNotificationStatus: (v: string) => "unread" | "read";
|
|
7
|
-
export declare const toNotificationStatusStrict: (v: string) => "unread" | "read" | undefined;
|
|
8
|
-
export declare type NotificationStatus = ReturnType<typeof toNotificationStatus>;
|
|
9
|
-
export declare const ALL_NOTIFICATION_MODES: readonly ["dashboard", "email"];
|
|
10
|
-
export declare const toNotificationMode: (v: string) => "dashboard" | "email";
|
|
11
|
-
export declare const toNotificationModeStrict: (v: string) => "dashboard" | "email" | undefined;
|
|
12
|
-
export declare type NotificationMode = ReturnType<typeof toNotificationMode>;
|
|
13
|
-
export declare const ALL_TASK_MANAGER_NOTIFICATION_ACTIVITY_TYPES: readonly ["task_assigned", "task_status_updated", "task_activities", "task_created", "task_deleted", "task_archived", "task_due", "task_overdue"];
|
|
14
|
-
export declare const ALL_NOTIFICATION_ACTIVITY_TYPES: readonly ["task_assigned", "task_status_updated", "task_activities", "task_created", "task_deleted", "task_archived", "task_due", "task_overdue"];
|
|
15
|
-
export declare const toNotificationActivityType: (v: string) => "task_assigned" | "task_status_updated" | "task_activities" | "task_created" | "task_deleted" | "task_archived" | "task_due" | "task_overdue";
|
|
16
|
-
export declare const toNotificationActivityTypeStrict: (v: string) => "task_assigned" | "task_status_updated" | "task_activities" | "task_created" | "task_deleted" | "task_archived" | "task_due" | "task_overdue" | undefined;
|
|
17
|
-
export declare type NotificationActivityType = ReturnType<typeof toNotificationActivityType>;
|
|
18
|
-
export declare const ALL_NOTIFICATION_UPDATE_VALUE_TYPES: readonly ["string", "list", "code_name_pair"];
|
|
19
|
-
export declare const toNotificationUpdateValueType: (v: string) => "string" | "list" | "code_name_pair";
|
|
20
|
-
export declare const toNotificationUpdateValueTypeStrict: (v: string) => "string" | "list" | "code_name_pair" | undefined;
|
|
21
|
-
export declare type NotificationUpdateValue = ReturnType<typeof toNotificationUpdateValueType>;
|
|
22
|
-
export declare const getNotificationIdentifier: (notificationGroup: NotificationGroup, notificationType: NotificationActivityType) => "task_manager.task_assigned.notification" | "task_manager.task_status_updated.notification" | "task_manager.task_activities.notification" | "task_manager.task_created.notification" | "task_manager.task_deleted.notification" | "task_manager.task_archived.notification" | "task_manager.task_due.notification" | "task_manager.task_overdue.notification";
|
|
23
|
-
export declare type NotificationIdentifierType = ReturnType<typeof getNotificationIdentifier>;
|
|
24
|
-
export declare const toNotificationIdentifier: (notification_identifier: string) => NotificationIdentifierType;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toNotificationIdentifier = exports.getNotificationIdentifier = exports.toNotificationUpdateValueTypeStrict = exports.toNotificationUpdateValueType = exports.ALL_NOTIFICATION_UPDATE_VALUE_TYPES = exports.toNotificationActivityTypeStrict = exports.toNotificationActivityType = exports.ALL_NOTIFICATION_ACTIVITY_TYPES = exports.ALL_TASK_MANAGER_NOTIFICATION_ACTIVITY_TYPES = exports.toNotificationModeStrict = exports.toNotificationMode = exports.ALL_NOTIFICATION_MODES = exports.toNotificationStatusStrict = exports.toNotificationStatus = exports.ALL_NOTIFICATION_STATUSES = exports.toNotificationGroupStrict = exports.toNotificationGroup = exports.ALL_NOTIFICATION_GROUPS = void 0;
|
|
4
|
-
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
-
exports.ALL_NOTIFICATION_GROUPS = ['task_manager'];
|
|
6
|
-
const toNotificationGroup = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_NOTIFICATION_GROUPS);
|
|
7
|
-
exports.toNotificationGroup = toNotificationGroup;
|
|
8
|
-
const toNotificationGroupStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_NOTIFICATION_GROUPS);
|
|
9
|
-
exports.toNotificationGroupStrict = toNotificationGroupStrict;
|
|
10
|
-
exports.ALL_NOTIFICATION_STATUSES = ['read', 'unread'];
|
|
11
|
-
const toNotificationStatus = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_NOTIFICATION_STATUSES);
|
|
12
|
-
exports.toNotificationStatus = toNotificationStatus;
|
|
13
|
-
const toNotificationStatusStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_NOTIFICATION_STATUSES);
|
|
14
|
-
exports.toNotificationStatusStrict = toNotificationStatusStrict;
|
|
15
|
-
exports.ALL_NOTIFICATION_MODES = ['dashboard', 'email'];
|
|
16
|
-
const toNotificationMode = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_NOTIFICATION_MODES);
|
|
17
|
-
exports.toNotificationMode = toNotificationMode;
|
|
18
|
-
const toNotificationModeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_NOTIFICATION_MODES);
|
|
19
|
-
exports.toNotificationModeStrict = toNotificationModeStrict;
|
|
20
|
-
exports.ALL_TASK_MANAGER_NOTIFICATION_ACTIVITY_TYPES = [
|
|
21
|
-
'task_assigned',
|
|
22
|
-
'task_status_updated',
|
|
23
|
-
'task_activities',
|
|
24
|
-
'task_created',
|
|
25
|
-
'task_deleted',
|
|
26
|
-
'task_archived',
|
|
27
|
-
'task_due',
|
|
28
|
-
'task_overdue',
|
|
29
|
-
];
|
|
30
|
-
exports.ALL_NOTIFICATION_ACTIVITY_TYPES = [
|
|
31
|
-
...exports.ALL_TASK_MANAGER_NOTIFICATION_ACTIVITY_TYPES, // We'll add more feature based lists here
|
|
32
|
-
];
|
|
33
|
-
const toNotificationActivityType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_NOTIFICATION_ACTIVITY_TYPES);
|
|
34
|
-
exports.toNotificationActivityType = toNotificationActivityType;
|
|
35
|
-
const toNotificationActivityTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_NOTIFICATION_ACTIVITY_TYPES);
|
|
36
|
-
exports.toNotificationActivityTypeStrict = toNotificationActivityTypeStrict;
|
|
37
|
-
exports.ALL_NOTIFICATION_UPDATE_VALUE_TYPES = [
|
|
38
|
-
'string',
|
|
39
|
-
'list',
|
|
40
|
-
'code_name_pair',
|
|
41
|
-
];
|
|
42
|
-
const toNotificationUpdateValueType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_NOTIFICATION_UPDATE_VALUE_TYPES);
|
|
43
|
-
exports.toNotificationUpdateValueType = toNotificationUpdateValueType;
|
|
44
|
-
const toNotificationUpdateValueTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_NOTIFICATION_UPDATE_VALUE_TYPES);
|
|
45
|
-
exports.toNotificationUpdateValueTypeStrict = toNotificationUpdateValueTypeStrict;
|
|
46
|
-
const getNotificationIdentifier = (notificationGroup, notificationType) => `${notificationGroup}.${notificationType}.notification`;
|
|
47
|
-
exports.getNotificationIdentifier = getNotificationIdentifier;
|
|
48
|
-
const toNotificationIdentifier = (notification_identifier // Expected format from platform is - {notification_group}.{notification_type}.notification
|
|
49
|
-
) => {
|
|
50
|
-
const notificationIdentifiers = notification_identifier.split('.');
|
|
51
|
-
if (notificationIdentifiers.length < 3 ||
|
|
52
|
-
notificationIdentifiers[2] !== 'notification') {
|
|
53
|
-
throw new Error(`Invalid notificationIdentifier received - ${notification_identifier}`);
|
|
54
|
-
}
|
|
55
|
-
const [notification_group, notification_type] = notificationIdentifiers;
|
|
56
|
-
return (0, exports.getNotificationIdentifier)((0, exports.toNotificationGroup)(notification_group), (0, exports.toNotificationActivityType)(notification_type));
|
|
57
|
-
};
|
|
58
|
-
exports.toNotificationIdentifier = toNotificationIdentifier;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, fetchNotificationUnreadCountFailure } from '../notificationViewReducer';
|
|
6
|
-
import { updateAllUsers } from '../../../entity/user/userReducer';
|
|
7
|
-
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
8
|
-
import { updateAllNotifications } from '../../../entity/notification/notificationReducer';
|
|
9
|
-
export declare type ActionType = ReturnType<typeof updateAllNotifications> | ReturnType<typeof updateAllUsers> | ReturnType<typeof openSnackbar> | ReturnType<typeof fetchNotificationUnreadCount> | ReturnType<typeof fetchNotificationUnreadCountSuccess> | ReturnType<typeof fetchNotificationUnreadCountFailure>;
|
|
10
|
-
export declare const fetchNotificationUnreadCountEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchNotificationUnreadCountEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
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) => {
|
|
9
|
-
const { notificationGroup, mode } = action.payload;
|
|
10
|
-
const queryParam = {
|
|
11
|
-
fetch_unread_notification_count: true,
|
|
12
|
-
notification_group: notificationGroup,
|
|
13
|
-
mode,
|
|
14
|
-
};
|
|
15
|
-
return zeniAPI
|
|
16
|
-
.getJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
17
|
-
.pipe((0, operators_1.switchMap)((response) => {
|
|
18
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
19
|
-
const { count: { unread }, } = response.data;
|
|
20
|
-
const actions = [
|
|
21
|
-
(0, notificationViewReducer_1.fetchNotificationUnreadCountSuccess)(unread, notificationGroup),
|
|
22
|
-
];
|
|
23
|
-
return actions;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
return (0, rxjs_1.of)((0, notificationViewReducer_1.fetchNotificationUnreadCountFailure)({
|
|
27
|
-
status: response.status,
|
|
28
|
-
notificationGroup,
|
|
29
|
-
}));
|
|
30
|
-
}
|
|
31
|
-
}), (0, operators_1.catchError)((error) => {
|
|
32
|
-
return (0, rxjs_1.of)((0, notificationViewReducer_1.fetchNotificationUnreadCountFailure)({
|
|
33
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Notification Unread Count API call errored out' +
|
|
34
|
-
JSON.stringify(error)),
|
|
35
|
-
notificationGroup,
|
|
36
|
-
}));
|
|
37
|
-
}));
|
|
38
|
-
}));
|
|
39
|
-
exports.fetchNotificationUnreadCountEpic = fetchNotificationUnreadCountEpic;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { fetchNotificationView, fetchNotificationViewSuccess, fetchNotificationViewFailure } from '../notificationViewReducer';
|
|
6
|
-
import { updateAllUsers } from '../../../entity/user/userReducer';
|
|
7
|
-
import { updateAllNotifications } from '../../../entity/notification/notificationReducer';
|
|
8
|
-
export declare type ActionType = ReturnType<typeof updateAllNotifications> | ReturnType<typeof updateAllUsers> | ReturnType<typeof fetchNotificationView> | ReturnType<typeof fetchNotificationViewSuccess> | ReturnType<typeof fetchNotificationViewFailure>;
|
|
9
|
-
export declare const fetchNotificationViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchNotificationViewEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
-
const notificationViewReducer_1 = require("../notificationViewReducer");
|
|
8
|
-
const userReducer_1 = require("../../../entity/user/userReducer");
|
|
9
|
-
const notificationReducer_1 = require("../../../entity/notification/notificationReducer");
|
|
10
|
-
const fetchNotificationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(notificationViewReducer_1.fetchNotificationView.match), (0, operators_1.switchMap)((action) => {
|
|
11
|
-
const { notificationGroup, mode, status } = action.payload;
|
|
12
|
-
const { stateByTab } = state$.value.notificationViewState;
|
|
13
|
-
const notificationTab = (0, notificationViewReducer_1.toNotificationTab)(notificationGroup);
|
|
14
|
-
const notificationTabState = stateByTab[notificationTab];
|
|
15
|
-
const queryParam = {
|
|
16
|
-
status,
|
|
17
|
-
notification_group: notificationGroup,
|
|
18
|
-
is_paginated: true,
|
|
19
|
-
limit: 10,
|
|
20
|
-
mode,
|
|
21
|
-
page_token: notificationTabState.uiState.pageToken,
|
|
22
|
-
};
|
|
23
|
-
return zeniAPI
|
|
24
|
-
.getJSON(`${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/user-notification?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
25
|
-
.pipe((0, operators_1.switchMap)((response) => {
|
|
26
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
27
|
-
const { notifications, total_count, next_page_token } = response.data;
|
|
28
|
-
const allUsers = [];
|
|
29
|
-
notifications.forEach((notification) => {
|
|
30
|
-
allUsers.push(...notification.data.authors);
|
|
31
|
-
});
|
|
32
|
-
const allUniqueUsers = [
|
|
33
|
-
...new Map(allUsers.map((user) => [user.user_id, user])).values(),
|
|
34
|
-
];
|
|
35
|
-
const actions = [
|
|
36
|
-
(0, userReducer_1.updateAllUsers)({ users: allUniqueUsers, updateType: 'merge' }),
|
|
37
|
-
(0, notificationReducer_1.updateAllNotifications)(notifications, 'replace'),
|
|
38
|
-
(0, notificationViewReducer_1.fetchNotificationViewSuccess)(notifications, total_count, notificationGroup, next_page_token),
|
|
39
|
-
];
|
|
40
|
-
return actions;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return (0, rxjs_1.of)((0, notificationViewReducer_1.fetchNotificationViewFailure)({
|
|
44
|
-
status: response.status,
|
|
45
|
-
notificationGroup,
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
}), (0, operators_1.catchError)((error) => {
|
|
49
|
-
return (0, rxjs_1.of)((0, notificationViewReducer_1.fetchNotificationViewFailure)({
|
|
50
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Notification View API call errored out' +
|
|
51
|
-
JSON.stringify(error)),
|
|
52
|
-
notificationGroup,
|
|
53
|
-
}));
|
|
54
|
-
}));
|
|
55
|
-
}));
|
|
56
|
-
exports.fetchNotificationViewEpic = fetchNotificationViewEpic;
|
package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { updateNotificationViewAllNotificationsStatus, updateNotificationViewAllNotificationsStatusSuccess, updateNotificationViewAllNotificationsStatusFailure } from '../notificationViewReducer';
|
|
6
|
-
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
7
|
-
import { updateNotificationsStatuses } from '../../../entity/notification/notificationReducer';
|
|
8
|
-
export declare type ActionType = ReturnType<typeof openSnackbar> | ReturnType<typeof updateNotificationsStatuses> | ReturnType<typeof updateNotificationViewAllNotificationsStatus> | ReturnType<typeof updateNotificationViewAllNotificationsStatusSuccess> | ReturnType<typeof updateNotificationViewAllNotificationsStatusFailure>;
|
|
9
|
-
export declare const updateNotificationViewAllNotificationsStatusEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|