robbyson-frontend-library 1.0.39 → 1.0.41
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/dist/components/notification-sound/index.js +1 -0
- package/dist/components/notification-sound/notification-sound.interface.js +1 -0
- package/dist/constants/chat.constants.js +1 -0
- package/package.json +1 -1
- package/src/components/menu.interface.ts +1 -0
- package/src/components/notification-sound/index.ts +1 -0
- package/src/components/notification-sound/motification-sound.types.d.ts +10 -0
- package/src/components/notification-sound/notification-sound.interface.tsx +5 -0
- package/src/components/terms-of-use/terms-of-use.interface.tsx +1 -0
- package/src/constants/chat.constants.ts +1 -0
- package/src/models/angel-friend-status.model.ts +13 -0
- package/src/models/chat.model.ts +3 -0
- package/src/models/user-session.model.ts +1 -0
- package/src/repositories/angel-friend.repository.interface.ts +5 -1
- package/src/repositories/notification.repository.interface.ts +3 -1
- package/src/services/angel-friend.service.interface.ts +5 -1
- package/src/services/chat.service.interface.ts +7 -1
- package/src/services/dtos/chat.dto.ts +6 -0
- package/src/services/notification.service.interface.ts +3 -1
- package/src/states/chat-container/chat-app.state.interface.ts +1 -0
- package/src/states/main-container/notification-app.state.interface.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './notification-sound.interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './notification-sound.interface';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module 'terms_of_use_application/NotificationSound' {
|
|
5
|
+
|
|
6
|
+
import { INotificationSoundProps } from "robbyson-frontend-library";
|
|
7
|
+
const NotificationSound: React.ComponentType<INotificationSoundProps<any>>;
|
|
8
|
+
|
|
9
|
+
export default NotificationSound;
|
|
10
|
+
}
|
|
@@ -156,6 +156,8 @@ export interface IAngelFriendStatus {
|
|
|
156
156
|
activeSponsorships: ISponsorship[];
|
|
157
157
|
color: string;
|
|
158
158
|
countTotalGodson?: number;
|
|
159
|
+
isGodson: boolean;
|
|
160
|
+
isGodfather: boolean;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
export interface IAngelFriendStatusResponse {
|
|
@@ -163,6 +165,14 @@ export interface IAngelFriendStatusResponse {
|
|
|
163
165
|
statusLog: StatusLog[];
|
|
164
166
|
}
|
|
165
167
|
|
|
168
|
+
export interface ISponsorshipSendRating {
|
|
169
|
+
sponsorshipId: string,
|
|
170
|
+
userId: number,
|
|
171
|
+
stars: number,
|
|
172
|
+
message: string,
|
|
173
|
+
notification_id: string
|
|
174
|
+
}
|
|
175
|
+
|
|
166
176
|
export interface AngelFriendMeta {
|
|
167
177
|
type: string;
|
|
168
178
|
sponsorship_id: string;
|
|
@@ -175,6 +185,7 @@ export interface INotification {
|
|
|
175
185
|
favorite: boolean;
|
|
176
186
|
read: boolean;
|
|
177
187
|
notified: boolean;
|
|
188
|
+
answered?: boolean;
|
|
178
189
|
targetSystems: number[];
|
|
179
190
|
_id: string;
|
|
180
191
|
hideSender: boolean;
|
|
@@ -256,6 +267,8 @@ export interface SponsorshipData {
|
|
|
256
267
|
rating: string[];
|
|
257
268
|
accepted: boolean;
|
|
258
269
|
beginDate: string | null;
|
|
270
|
+
godsonEndLevel?: number;
|
|
271
|
+
godsonStartLevel?: number;
|
|
259
272
|
}
|
|
260
273
|
|
|
261
274
|
export interface INotificationResponse {
|
package/src/models/chat.model.ts
CHANGED
|
@@ -23,6 +23,7 @@ export class ChatModel {
|
|
|
23
23
|
active?: boolean;
|
|
24
24
|
deleted?: boolean;
|
|
25
25
|
classification?: ChatClassification;
|
|
26
|
+
isUserActive?: boolean;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export class ChatUser {
|
|
@@ -41,6 +42,8 @@ export class ChatUser {
|
|
|
41
42
|
user_id: number;
|
|
42
43
|
_id: string;
|
|
43
44
|
id?: string;
|
|
45
|
+
isUserActive?: boolean;
|
|
46
|
+
hierarchyLevel?: number;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
// InviteList is a combination of UserListModel and ChatModel
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AngelFriendDTO } from "../services";
|
|
2
2
|
import {
|
|
3
3
|
IAngelFriendStatus,
|
|
4
|
+
ISponsorshipSendRating,
|
|
4
5
|
IGodfatherAnswer,
|
|
5
6
|
IGodfatherAnswerResponse,
|
|
6
7
|
INotificationResponse,
|
|
@@ -13,7 +14,8 @@ export interface IAngelFriendRepository {
|
|
|
13
14
|
getAngelFriendStatus(_id: number): Promise<IAngelFriendStatus>;
|
|
14
15
|
getNotificationList(
|
|
15
16
|
robbysonUserId: number,
|
|
16
|
-
data: AngelFriendDTO.NotificationReceivedDTO
|
|
17
|
+
data: AngelFriendDTO.NotificationReceivedDTO,
|
|
18
|
+
limit?: number
|
|
17
19
|
): Promise<INotificationResponse>;
|
|
18
20
|
getPossibleGodsons(data: {
|
|
19
21
|
page: number;
|
|
@@ -22,11 +24,13 @@ export interface IAngelFriendRepository {
|
|
|
22
24
|
}): Promise<IPossibleGodsonResponse>;
|
|
23
25
|
getPendingInvitations(): Promise<IPendingInvitationResponse>;
|
|
24
26
|
getGodfatherAnswers(): Promise<IGodfatherAnswerResponse>;
|
|
27
|
+
sponsorshipSendRating(rating: ISponsorshipSendRating): Promise<void>;
|
|
25
28
|
acceptGodfather(data: {
|
|
26
29
|
_id: number | string;
|
|
27
30
|
accepted: boolean;
|
|
28
31
|
}): Promise<string>;
|
|
29
32
|
removeSponsorship(sponsorship_id: string): Promise<string>;
|
|
33
|
+
getSponsorship(sponsorship_id: string): Promise<SponsorshipData[]>;
|
|
30
34
|
answerSponsorship(
|
|
31
35
|
data: { sponsorship_id: string },
|
|
32
36
|
answer: boolean
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MenusNotificationsModel, NotificationModel } from "../models";
|
|
1
|
+
import { ISponsorshipSendRating, MenusNotificationsModel, NotificationModel } from "../models";
|
|
2
2
|
export interface INotificationRepository {
|
|
3
3
|
getMenusNotifications(params: {
|
|
4
4
|
"$filter.$or.targetSystems.0.$exists": boolean;
|
|
@@ -22,6 +22,8 @@ export interface INotificationRepository {
|
|
|
22
22
|
page: number;
|
|
23
23
|
totalRecords: number;
|
|
24
24
|
}>;
|
|
25
|
+
|
|
26
|
+
markAsAngelFriendRead(rating: ISponsorshipSendRating): Promise<void>;
|
|
25
27
|
markAsRead(params: {
|
|
26
28
|
user_id: number;
|
|
27
29
|
arr_notification_id: Array<string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IAngelFriendStatus,
|
|
3
|
+
ISponsorshipSendRating,
|
|
3
4
|
IGodfatherAnswer,
|
|
4
5
|
IGodfatherAnswerResponse,
|
|
5
6
|
INotificationResponse,
|
|
@@ -12,7 +13,8 @@ export interface IAngelFriendService {
|
|
|
12
13
|
getAngelFriendStatus(_id: number): Promise<IAngelFriendStatus>;
|
|
13
14
|
getNotificationList(
|
|
14
15
|
robbysonUserId: number,
|
|
15
|
-
data: { skip: number }
|
|
16
|
+
data: { skip: number },
|
|
17
|
+
limit?: number
|
|
16
18
|
): Promise<INotificationResponse>;
|
|
17
19
|
getPossibleGodsons(data: {
|
|
18
20
|
page: number;
|
|
@@ -27,6 +29,8 @@ export interface IAngelFriendService {
|
|
|
27
29
|
lastConfigurationToAF?: string;
|
|
28
30
|
}): Promise<string>;
|
|
29
31
|
removeSponsorship(sponsorship_id: string): Promise<string>;
|
|
32
|
+
getSponsorship(sponsorship_id: string): Promise<SponsorshipData[]>;
|
|
33
|
+
sponsorshipSendRating(rating: ISponsorshipSendRating): Promise<void>;
|
|
30
34
|
answerSponsorship(
|
|
31
35
|
data: { sponsorship_id: string },
|
|
32
36
|
answer: boolean
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ChatModel, ChatUser, MessageModel, UserListModel } from "../models";
|
|
2
2
|
import { ChatDTO, UserDTO } from "./dtos";
|
|
3
3
|
import { RequestPayload } from "./dtos/chat.dto";
|
|
4
|
-
import { ChatConstants } from "../constants";
|
|
5
4
|
|
|
6
5
|
export interface IChatService {
|
|
7
6
|
getConversation(conversationId: string): Promise<ChatModel>;
|
|
@@ -67,6 +66,7 @@ export interface IChatService {
|
|
|
67
66
|
): Promise<void>;
|
|
68
67
|
addMessage(message: ChatDTO.ISubscribeMessage): void;
|
|
69
68
|
updateUsers(message: ChatDTO.IUpdatedUsers): void;
|
|
69
|
+
updateGroup(message: ChatDTO.IUpdatedGroup): void;
|
|
70
70
|
getConversationSidebar(): ChatDTO.IConversationDTO;
|
|
71
71
|
setConversationSidebar(payload: ChatDTO.IConversationDTO): void;
|
|
72
72
|
sendBroadcast(
|
|
@@ -82,4 +82,10 @@ export interface IChatService {
|
|
|
82
82
|
setEditGroupModal(isOpen: boolean): void;
|
|
83
83
|
getEditGroupModal(): boolean;
|
|
84
84
|
getGroupImage(): Promise<string>;
|
|
85
|
+
getIsAngelFriendInChat(
|
|
86
|
+
identification: number,
|
|
87
|
+
chat: ChatModel
|
|
88
|
+
): Promise<boolean>;
|
|
89
|
+
readConversationMessages(conversationId: string): Promise<void>;
|
|
90
|
+
isCallOpen(conversationId: string): Promise<boolean>;
|
|
85
91
|
}
|
|
@@ -177,9 +177,15 @@ export interface ISubscribeMessage {
|
|
|
177
177
|
sender: string;
|
|
178
178
|
receivedAt: string;
|
|
179
179
|
receiver: string;
|
|
180
|
+
conversation?: ChatModel;
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
export interface IUpdatedUsers {
|
|
183
184
|
conversation_id: string;
|
|
184
185
|
user: ChatModel;
|
|
186
|
+
conversation: ChatModel;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface IUpdatedGroup {
|
|
190
|
+
conversation: ChatModel;
|
|
185
191
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { MenusNotificationsModel, NotificationModel } from "../models";
|
|
1
|
+
import { ISponsorshipSendRating, MenusNotificationsModel, NotificationModel } from "../models";
|
|
2
2
|
|
|
3
3
|
export interface INotificationService {
|
|
4
4
|
showNotificationSidebar(data: boolean): void;
|
|
5
5
|
getMenusNotifications(): Promise<Array<MenusNotificationsModel>>;
|
|
6
|
+
markAsAngelFriendRead(rating:ISponsorshipSendRating): Promise<void>;
|
|
6
7
|
setRecentNotificationsSidebar(
|
|
7
8
|
notification: Array<NotificationModel | undefined>
|
|
8
9
|
): Promise<void>;
|
|
@@ -41,4 +42,5 @@ export interface INotificationService {
|
|
|
41
42
|
fileName: string
|
|
42
43
|
): Promise<Blob | MediaSource>;
|
|
43
44
|
getVideo(fileName: string): Promise<Blob | MediaSource>;
|
|
45
|
+
playNotificationSound(data: boolean): void;
|
|
44
46
|
}
|