robbyson-frontend-library 1.0.32 → 1.0.33
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/constants/chat.constants.js +7 -7
- package/package.json +1 -1
- package/src/components/checkbox/checkbox.interface.ts +1 -0
- package/src/components/table/table.interface.ts +1 -0
- package/src/constants/chat.constants.ts +3 -4
- package/src/models/chat.model.ts +2 -1
- package/src/repositories/chat.repository.interface.ts +5 -1
- package/src/services/angel-friend.service.interface.ts +1 -0
- package/src/services/chat.service.interface.ts +4 -0
- package/src/services/dtos/chat.dto.ts +6 -1
- package/src/states/main-container/tree-app.state.interface.ts +1 -1
|
@@ -13,11 +13,11 @@ export var TypeChat;
|
|
|
13
13
|
TypeChat["GROUP"] = "group";
|
|
14
14
|
TypeChat["CHATBOT"] = "chat-bot";
|
|
15
15
|
})(TypeChat || (TypeChat = {}));
|
|
16
|
-
var
|
|
17
|
-
(function (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})(
|
|
16
|
+
export var ChatClassification;
|
|
17
|
+
(function (ChatClassification) {
|
|
18
|
+
ChatClassification["TREE_MESSAGE"] = "tree-message";
|
|
19
|
+
ChatClassification["ANGEL_FRIEND"] = "angel-friend";
|
|
20
|
+
})(ChatClassification || (ChatClassification = {}));
|
|
21
21
|
var IMAGE_EXTENSIONS = ["jpg", "jpeg", "png", "gif"];
|
|
22
22
|
var ALLOWED_EXTENSIONS = new Set(__spreadArray(__spreadArray([], IMAGE_EXTENSIONS, true), [
|
|
23
23
|
"mp4",
|
|
@@ -31,7 +31,7 @@ var ALLOWED_EXTENSIONS = new Set(__spreadArray(__spreadArray([], IMAGE_EXTENSION
|
|
|
31
31
|
], false));
|
|
32
32
|
export var ChatConstants = {
|
|
33
33
|
TypeChat: TypeChat,
|
|
34
|
-
|
|
34
|
+
ChatClassification: ChatClassification,
|
|
35
35
|
ALLOWED_EXTENSIONS: ALLOWED_EXTENSIONS,
|
|
36
|
-
IMAGE_EXTENSIONS: IMAGE_EXTENSIONS
|
|
36
|
+
IMAGE_EXTENSIONS: IMAGE_EXTENSIONS,
|
|
37
37
|
};
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ export enum TypeChat {
|
|
|
4
4
|
CHATBOT = "chat-bot",
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
enum
|
|
7
|
+
export enum ChatClassification {
|
|
8
8
|
TREE_MESSAGE = "tree-message",
|
|
9
9
|
ANGEL_FRIEND = "angel-friend",
|
|
10
10
|
}
|
|
@@ -23,10 +23,9 @@ const ALLOWED_EXTENSIONS = new Set([
|
|
|
23
23
|
"pptx",
|
|
24
24
|
]);
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
export const ChatConstants = {
|
|
28
27
|
TypeChat,
|
|
29
|
-
|
|
28
|
+
ChatClassification,
|
|
30
29
|
ALLOWED_EXTENSIONS,
|
|
31
|
-
IMAGE_EXTENSIONS
|
|
30
|
+
IMAGE_EXTENSIONS,
|
|
32
31
|
};
|
package/src/models/chat.model.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TypeChat } from "../constants";
|
|
1
|
+
import { ChatClassification, TypeChat } from "../constants";
|
|
2
2
|
import { UserListModel } from "./user-list.model";
|
|
3
3
|
|
|
4
4
|
export class ChatModel {
|
|
@@ -22,6 +22,7 @@ export class ChatModel {
|
|
|
22
22
|
admin?: boolean;
|
|
23
23
|
active?: boolean;
|
|
24
24
|
deleted?: boolean;
|
|
25
|
+
classification?: ChatClassification;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export class ChatUser {
|
|
@@ -11,6 +11,10 @@ export interface IChatRepository {
|
|
|
11
11
|
conversationId: string,
|
|
12
12
|
params: ChatDTO.IUpdateGroupDTO
|
|
13
13
|
): Promise<void>;
|
|
14
|
+
updateClassification(
|
|
15
|
+
conversationId: string,
|
|
16
|
+
params: ChatDTO.IUpdateClassificationDTO
|
|
17
|
+
): Promise<void>;
|
|
14
18
|
addUsersToConversation(
|
|
15
19
|
conversationId: string,
|
|
16
20
|
users: UserDTO.GetUserDTO[]
|
|
@@ -45,7 +49,7 @@ export interface IChatRepository {
|
|
|
45
49
|
id: number,
|
|
46
50
|
user: UserDTO.GetUserDTO
|
|
47
51
|
): Promise<void>;
|
|
48
|
-
readConversationMessages(conversationId: string): void
|
|
52
|
+
readConversationMessages(conversationId: string): Promise<void>;
|
|
49
53
|
sendBroadcast(body: {
|
|
50
54
|
encryptionKey: string;
|
|
51
55
|
message: string;
|
|
@@ -16,6 +16,10 @@ export interface IChatService {
|
|
|
16
16
|
conversationId: string,
|
|
17
17
|
parameters: ChatDTO.IUpdateGroupDTO
|
|
18
18
|
): Promise<void>;
|
|
19
|
+
updateClassification(
|
|
20
|
+
conversationId: string,
|
|
21
|
+
params: ChatDTO.IUpdateClassificationDTO
|
|
22
|
+
): Promise<void>;
|
|
19
23
|
addUsersToConversation(
|
|
20
24
|
conversationId: string,
|
|
21
25
|
users: UserDTO.GetUserDTO[]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TypeChat } from "../../constants";
|
|
1
|
+
import { ChatClassification, TypeChat } from "../../constants";
|
|
2
2
|
import { ChatModel, MessageModel, UserListModel } from "../../models";
|
|
3
3
|
import { GetUserDTO } from "./user.dto";
|
|
4
4
|
|
|
@@ -22,6 +22,7 @@ export interface ICreateConversationDTO {
|
|
|
22
22
|
temporary?: boolean;
|
|
23
23
|
photo?: string;
|
|
24
24
|
admin?: boolean;
|
|
25
|
+
classification?: ChatClassification;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export interface IUpdateGroupDTO {
|
|
@@ -30,6 +31,10 @@ export interface IUpdateGroupDTO {
|
|
|
30
31
|
photo?: string;
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
export interface IUpdateClassificationDTO {
|
|
35
|
+
classification: ChatClassification;
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
export interface IChatPermissions {
|
|
34
39
|
canCreateGroup: boolean;
|
|
35
40
|
canReceive: boolean;
|