@readerseye2/cr_type 1.0.17 → 1.0.19
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ChatMessageReadRequest, ChatMessageRefreshRequest, MessageRequest } from "./socket-message.types";
|
|
1
|
+
import { ChatMessageReadRequest, ChatMessageRefreshRequest, ImageMessageRequest, MessageRequest } from "./socket-message.types";
|
|
2
2
|
export interface ClientToServerEvents {
|
|
3
3
|
'chat-message:send': (msg: MessageRequest) => void;
|
|
4
4
|
'chat-message:refresh': (msg: ChatMessageRefreshRequest) => void;
|
|
5
5
|
'chat-message:read': (payload: ChatMessageReadRequest) => void;
|
|
6
|
+
'chat-image:send': (payload: ImageMessageRequest) => void;
|
|
6
7
|
}
|
|
@@ -6,6 +6,15 @@ export interface MessageRequest {
|
|
|
6
6
|
msg: string;
|
|
7
7
|
temp_id?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface ImageMessageRequest {
|
|
10
|
+
room_key: string;
|
|
11
|
+
receiver_type: OauthUserType;
|
|
12
|
+
receiver_idx: number;
|
|
13
|
+
file_url: string;
|
|
14
|
+
file_name: string;
|
|
15
|
+
temp_id?: string;
|
|
16
|
+
type: 'image';
|
|
17
|
+
}
|
|
9
18
|
export interface MessageResponse {
|
|
10
19
|
msg: string;
|
|
11
20
|
sender_type: OauthUserType;
|
|
@@ -17,6 +26,7 @@ export interface MessageResponse {
|
|
|
17
26
|
is_read: boolean;
|
|
18
27
|
_id: string;
|
|
19
28
|
temp_id?: string;
|
|
29
|
+
type: "text" | "image";
|
|
20
30
|
}
|
|
21
31
|
export interface ChatMessageRefreshRequest {
|
|
22
32
|
roomKey: string;
|
|
@@ -27,8 +37,6 @@ export interface ChatMessageRefreshRequest {
|
|
|
27
37
|
export interface ChatMessageReadRequest {
|
|
28
38
|
room_key: string;
|
|
29
39
|
last_read_at: string;
|
|
30
|
-
receiver_type: OauthUserType;
|
|
31
|
-
receiver_idx: number;
|
|
32
40
|
}
|
|
33
41
|
export interface MessageReadResponse {
|
|
34
42
|
room_key: string;
|