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.
@@ -0,0 +1 @@
1
+ export * from './notification-sound.interface';
@@ -11,6 +11,7 @@ export var TypeChat;
11
11
  (function (TypeChat) {
12
12
  TypeChat["CHAT"] = "chat";
13
13
  TypeChat["GROUP"] = "group";
14
+ TypeChat["GROUPS"] = "groups";
14
15
  TypeChat["CHATBOT"] = "chat-bot";
15
16
  })(TypeChat || (TypeChat = {}));
16
17
  export var ChatClassification;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -12,6 +12,7 @@ export type MenuItem = {
12
12
  checkWeight?: boolean;
13
13
  weight?: number;
14
14
  condition?: IWeightConditionTypes
15
+ shouldRender?: boolean;
15
16
  }
16
17
 
17
18
  export interface IMenuProps {
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ import { IBaseComponentProp } from "../base-component.prop.interface";
2
+
3
+ export interface INotificationSoundProps extends IBaseComponentProp {}
4
+
5
+ export interface INotificationSoundState {}
@@ -11,4 +11,5 @@ export interface ITermsOfUseState {
11
11
  isRead: boolean;
12
12
  disableButton: boolean;
13
13
  hasScroll: boolean | null;
14
+ hasError: boolean;
14
15
  }
@@ -1,6 +1,7 @@
1
1
  export enum TypeChat {
2
2
  CHAT = "chat",
3
3
  GROUP = "group",
4
+ GROUPS = "groups",
4
5
  CHATBOT = "chat-bot",
5
6
  }
6
7
 
@@ -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 {
@@ -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
@@ -94,6 +94,7 @@ export class UserSessionModel extends BaseRepositoryModel {
94
94
  chatSendFiles: boolean;
95
95
  chatMaxSizeFile?: number;
96
96
  enableVariableIncomes?: boolean;
97
+ enableEAD: boolean;
97
98
  };
98
99
  UsuarioAceitouTermoUsoAtual: boolean;
99
100
  colorBadge?: string;
@@ -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
  }
@@ -20,4 +20,5 @@ export interface IChatApp {
20
20
  addMemberModal: boolean;
21
21
  editGroupModal: boolean;
22
22
  updatedUsers: ChatDTO.IUpdatedUsers;
23
+ lastConversationsSearch: { search: string; type: string };
23
24
  }
@@ -4,4 +4,5 @@ export interface INotificationApp {
4
4
  recentNotifications: Array<NotificationModel | undefined>,
5
5
  showNotificationSidebar: boolean,
6
6
  unreadNotifications: number,
7
+ playNotificationSound: boolean,
7
8
  }