easemob-websdk 4.0.9 → 4.1.0-beta2

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/Easemob-chat.d.ts +1338 -267
  3. package/Easemob-chat.js +1 -3
  4. package/chatroom/chatroom.d.ts +590 -0
  5. package/chatroom/chatroom.js +1 -0
  6. package/contact/contact.d.ts +322 -0
  7. package/contact/contact.js +1 -0
  8. package/group/group.d.ts +645 -0
  9. package/group/group.js +1 -0
  10. package/message/audio.d.ts +140 -0
  11. package/message/channel.d.ts +58 -0
  12. package/message/cmd.d.ts +102 -0
  13. package/message/custom.d.ts +94 -0
  14. package/message/delivery.d.ts +53 -0
  15. package/message/file.d.ts +134 -0
  16. package/message/img.d.ts +150 -0
  17. package/message/index.d.ts +147 -0
  18. package/message/location.d.ts +98 -0
  19. package/message/read.d.ts +61 -0
  20. package/message/text.d.ts +107 -0
  21. package/message/video.d.ts +140 -0
  22. package/miniCore/miniCore.d.ts +148 -0
  23. package/miniCore/miniCore.js +1 -0
  24. package/package.json +1 -1
  25. package/presence/presence.d.ts +67 -0
  26. package/presence/presence.js +1 -0
  27. package/readme.md +15 -11
  28. package/silent/silent.d.ts +110 -0
  29. package/silent/silent.js +1 -0
  30. package/thread/thread.d.ts +157 -0
  31. package/thread/thread.js +1 -0
  32. package/translation/translation.d.ts +28 -0
  33. package/translation/translation.js +1 -0
  34. package/types/chatRoomApi.d.ts +198 -0
  35. package/types/common.d.ts +56 -0
  36. package/types/engineCore.d.ts +83 -0
  37. package/types/error.d.ts +12 -0
  38. package/types/eventHandler.d.ts +201 -0
  39. package/types/groupApi.d.ts +235 -0
  40. package/types/indexApi.d.ts +134 -0
  41. package/types/presenceApi.d.ts +66 -0
  42. package/types/reactionApi.d.ts +74 -0
  43. package/types/restApis.d.ts +6 -0
  44. package/types/silentModeApi.d.ts +90 -0
  45. package/types/threadApi.d.ts +169 -0
  46. package/types/translation.d.ts +25 -0
@@ -0,0 +1,102 @@
1
+ type ChatType = 'singleChat' | 'groupChat' | 'chatRoom';
2
+ export interface CmdParameters {
3
+ /** The message type. */
4
+ type: 'cmd';
5
+ /** The message ID. */
6
+ id: string;
7
+ }
8
+ export interface CmdMsgSetParameters {
9
+ /** The session type. */
10
+ chatType: ChatType;
11
+ /** The recipient. */
12
+ to: string;
13
+ /** The command. */
14
+ action: string;
15
+ /** The sender, which can only be the current user and can not be changed. */
16
+ from?: string;
17
+ /** @deprecated Whether the session type is chat room. */
18
+ roomType?: boolean;
19
+ /** The callback for message sending success. */
20
+ success?: () => void;
21
+ /** The callback for a message sending failure. */
22
+ fail?: () => void;
23
+ /** The message extension. */
24
+ ext?: {
25
+ [key: string]: any;
26
+ };
27
+ }
28
+ export interface CmdMsgBody {
29
+ /** The message ID. */
30
+ id: string;
31
+ /** The message type. */
32
+ type: 'cmd';
33
+ /** The session type. */
34
+ chatType: ChatType;
35
+ /** The recipient. */
36
+ to: string;
37
+ /** The command. */
38
+ action: string;
39
+ /** The sender, which can only be the current user and can not be changed. */
40
+ from?: string;
41
+ /** @deprecated Whether the session type is chat room. */
42
+ roomType?: boolean;
43
+ /** @deprecated Whether the session type is chat room. */
44
+ group?: string;
45
+ /** Whether read receipts are required during a group session. */
46
+ msgConfig?: {
47
+ allowGroupAck: boolean;
48
+ };
49
+ /** The callback for message sending success. */
50
+ success?: () => void;
51
+ /** The callback for a message sending failure. */
52
+ fail?: () => void;
53
+ /** The message extension. */
54
+ ext?: {
55
+ [key: string]: any;
56
+ };
57
+ /** Time. */
58
+ time: number;
59
+ /** Whether the message is a thread message. */
60
+ isChatThread?: boolean;
61
+ }
62
+ export interface CreateCmdMsgParameters {
63
+ /** The message type. */
64
+ type: 'cmd';
65
+ /** The session type. */
66
+ chatType: ChatType;
67
+ /** The recipient. */
68
+ to: string;
69
+ /** The command. */
70
+ action: string;
71
+ /** The sender, which can only be the current user and can not be changed.*/
72
+ from?: string;
73
+ /** The message extension. */
74
+ ext?: {
75
+ [key: string]: any;
76
+ };
77
+ /** Whether read receipts are required during a group session. */
78
+ msgConfig?: {
79
+ allowGroupAck: boolean;
80
+ };
81
+ /** Whether the message is a thread message. */
82
+ isChatThread?: boolean;
83
+ }
84
+ export declare class Cmd {
85
+ id: string;
86
+ type: 'cmd';
87
+ body?: CmdMsgBody;
88
+ constructor(parameters: CmdParameters);
89
+ /**
90
+ * @hidden
91
+ */
92
+ set(options: CmdMsgSetParameters): void;
93
+ /**
94
+ * @hidden
95
+ */
96
+ setChatType(chatType: ChatType): boolean;
97
+ /**
98
+ * @hidden
99
+ */
100
+ setGroup(group: string): boolean;
101
+ static create(options: CreateCmdMsgParameters): CmdMsgBody;
102
+ }
@@ -0,0 +1,94 @@
1
+ type ChatType = 'singleChat' | 'groupChat' | 'chatRoom';
2
+ export interface CustomParameters {
3
+ /** The message type. */
4
+ type: 'custom';
5
+ /** The message ID. */
6
+ id: string;
7
+ }
8
+ export interface CustomMsgSetParameters {
9
+ /** The session type. */
10
+ chatType: ChatType;
11
+ /** The recipient. */
12
+ to: string;
13
+ /** The custom event. */
14
+ customEvent: string;
15
+ /** The custom event extension. */
16
+ customExts: {
17
+ [key: string]: any;
18
+ };
19
+ /** The sender, which can only be the current user and can not be changed. */
20
+ from?: string;
21
+ /** @deprecated Whether the session type is chat room. */
22
+ roomType?: boolean;
23
+ /** The callback for message sending success. */
24
+ success?: () => void;
25
+ /** The callback for a message sending failure. */
26
+ fail?: () => void;
27
+ /** The message extension. */
28
+ ext?: {
29
+ [key: string]: any;
30
+ };
31
+ }
32
+ export interface CustomMsgBody extends CreateCustomMsgParameters {
33
+ /** The message ID. */
34
+ id: string;
35
+ /** @deprecated Whether the session type is chat room. */
36
+ roomType?: boolean;
37
+ /** @deprecated Whether the session type is group. */
38
+ group?: string;
39
+ /** Whether read receipts are required during a group session. */
40
+ msgConfig?: {
41
+ allowGroupAck: boolean;
42
+ };
43
+ /** The callback for message sending success. */
44
+ success?: () => void;
45
+ /** The callback for a message sending failure. */
46
+ fail?: () => void;
47
+ /** Time. */
48
+ time: number;
49
+ }
50
+ export interface CreateCustomMsgParameters {
51
+ /** The message type. */
52
+ type: 'custom';
53
+ /** The session type. */
54
+ chatType: ChatType;
55
+ /** The recipient. */
56
+ to: string;
57
+ /** The custom event. */
58
+ customEvent: string;
59
+ /** The custom event extension. */
60
+ customExts: {
61
+ [key: string]: any;
62
+ };
63
+ /** The sender, which can only be the current user and can not be changed. */
64
+ from?: string;
65
+ /** The message extension. */
66
+ ext?: {
67
+ [key: string]: any;
68
+ };
69
+ /** Whether read receipts are required during a group session. */
70
+ msgConfig?: {
71
+ allowGroupAck: boolean;
72
+ };
73
+ /** Whether the message is a thread message. */
74
+ isChatThread?: boolean;
75
+ }
76
+ export declare class Custom {
77
+ id: string;
78
+ type: 'custom';
79
+ body?: CustomMsgBody;
80
+ constructor(parameters: CustomParameters);
81
+ /**
82
+ * @hidden
83
+ */
84
+ set(options: CustomMsgSetParameters): void;
85
+ /**
86
+ * @hidden
87
+ */
88
+ setChatType(chatType: ChatType): boolean;
89
+ /**
90
+ * @hidden
91
+ */
92
+ setGroup(group: string): boolean;
93
+ static create(options: CreateCustomMsgParameters): CustomMsgBody;
94
+ }
@@ -0,0 +1,53 @@
1
+ export interface DeliveryParameters {
2
+ /** The ID of the delivery receipt. */
3
+ id: string;
4
+ /** The message type. */
5
+ type: 'delivery';
6
+ }
7
+ export interface DeliveryMsgSetParameters {
8
+ /** The ID of the delivered message. This parameter has the same value as mid. */
9
+ ackId: string;
10
+ /** The recipient. */
11
+ to: string;
12
+ /** The sender, which can only be the current user and can not be changed. */
13
+ from?: string;
14
+ }
15
+ export interface DeliveryMsgBody {
16
+ /** The ID of the delivery receipt. */
17
+ id: string;
18
+ /** The ID of the delivered message. */
19
+ mid?: string;
20
+ /** The ID of the delivered message. This parameter has the same value as mid. */
21
+ ackId: string;
22
+ /** The message type. */
23
+ type: 'delivery';
24
+ /** The recipient. */
25
+ to: string;
26
+ /** The sender, which can only be the current user and can not be changed. */
27
+ from?: string;
28
+ /** Whether the message is a thread message. */
29
+ isChatThread?: boolean;
30
+ }
31
+ export interface CreateDeliveryMsgParameters {
32
+ /** The ID of the delivered message. */
33
+ ackId: string;
34
+ /** The message type. */
35
+ type: 'delivery';
36
+ /** The recipient. */
37
+ to: string;
38
+ /** The sender, which can only be the current user and can not be changed.*/
39
+ from?: string;
40
+ /** Whether the message is a thread message. */
41
+ isChatThread?: boolean;
42
+ }
43
+ export declare class Delivery {
44
+ id: string;
45
+ type: 'delivery';
46
+ body?: DeliveryMsgBody;
47
+ constructor(parameters: DeliveryParameters);
48
+ /**
49
+ * @hidden
50
+ */
51
+ set(options: DeliveryMsgSetParameters): void;
52
+ static create(options: CreateDeliveryMsgParameters): DeliveryMsgBody;
53
+ }
@@ -0,0 +1,134 @@
1
+ type ChatType = 'singleChat' | 'groupChat' | 'chatRoom';
2
+ export interface FileParameters {
3
+ /** The message type. */
4
+ type: 'file';
5
+ /** The message ID. */
6
+ id: string;
7
+ }
8
+ export interface FileObj {
9
+ url: string;
10
+ filename: string;
11
+ filetype: string;
12
+ data: File;
13
+ }
14
+ export interface FileMsgSetParameters {
15
+ /** The session type. */
16
+ chatType: ChatType;
17
+ /** The file object. */
18
+ file: FileObj;
19
+ /** The file name. */
20
+ filename?: string;
21
+ /** The input ID of the file to be uploaded. */
22
+ fileInputId?: string;
23
+ /** The recipient. */
24
+ to: string;
25
+ /** The sender, which can only be the current user and can not be changed.*/
26
+ from?: string;
27
+ /** @deprecated Whether the session type is chat room. */
28
+ roomType?: boolean;
29
+ /** The callback for message sending success. */
30
+ success?: () => void;
31
+ /** The callback for a message sending failure. */
32
+ fail?: () => void;
33
+ /** The message extension. */
34
+ ext?: {
35
+ [key: string]: any;
36
+ };
37
+ /** File upload address. */
38
+ apiUrl?: string;
39
+ /** The callback of a file upload error. */
40
+ onFileUploadError?: (error: any) => void;
41
+ /** The callback of file upload completion. */
42
+ onFileUploadComplete?: (data: any) => void;
43
+ /** The callback of the file upload progress. */
44
+ onFileUploadProgress?: (data: any) => void;
45
+ /** The message body. */
46
+ body?: {
47
+ /** The file URL. */
48
+ url: string;
49
+ /** The file type. */
50
+ type: string;
51
+ /** The file name. */
52
+ filename: string;
53
+ };
54
+ /** Whether the message is a thread message. */
55
+ isChatThread?: boolean;
56
+ }
57
+ export interface FileMsgBody extends CreateFileMsgParameters {
58
+ /** The message ID. */
59
+ id: string;
60
+ /** @deprecated Whether the session type is group. */
61
+ group?: string;
62
+ /** @deprecated Whether the session type is chat room. */
63
+ roomType?: boolean;
64
+ /** The callback for message sending success. */
65
+ success?: () => void;
66
+ /** The callback for a message sending failure. */
67
+ fail?: () => void;
68
+ /** Time. */
69
+ time: number;
70
+ /** Whether read receipts are required during a group session. */
71
+ msgConfig?: {
72
+ allowGroupAck: boolean;
73
+ };
74
+ }
75
+ export interface CreateFileMsgParameters {
76
+ /** The message type. */
77
+ type: 'file';
78
+ /** The session type. */
79
+ chatType: ChatType;
80
+ /** The file object. */
81
+ file: FileObj;
82
+ /** The file name. */
83
+ filename?: string;
84
+ /** The input ID of the file to be uploaded. */
85
+ fileInputId?: string;
86
+ /** The recipient. */
87
+ to: string;
88
+ /** The sender, which can only be the current user and can not be changed.*/
89
+ from?: string;
90
+ /** The message extension. */
91
+ ext?: {
92
+ [key: string]: any;
93
+ };
94
+ /** The callback of a file upload error. */
95
+ onFileUploadError?: (error: any) => void;
96
+ /** The callback of file upload completion. */
97
+ onFileUploadComplete?: (data: any) => void;
98
+ /** The callback of the file upload progress. */
99
+ onFileUploadProgress?: (data: any) => void;
100
+ /** The message body. */
101
+ body?: {
102
+ /** The file URL. */
103
+ url: string;
104
+ /** The file type. */
105
+ type: string;
106
+ /** The file name. */
107
+ filename: string;
108
+ };
109
+ /** Whether read receipts are required during a group session. */
110
+ msgConfig?: {
111
+ allowGroupAck: boolean;
112
+ };
113
+ /** Whether the message is a thread message. */
114
+ isChatThread?: boolean;
115
+ }
116
+ export declare class FileMsg {
117
+ id: string;
118
+ type: 'file';
119
+ body?: FileMsgBody;
120
+ constructor(parameters: FileParameters);
121
+ /**
122
+ * @hidden
123
+ */
124
+ set(options: FileMsgSetParameters): void;
125
+ /**
126
+ * @hidden
127
+ */
128
+ setChatType(chatType: ChatType): boolean;
129
+ /**
130
+ * @hidden
131
+ */
132
+ setGroup(group: string): boolean;
133
+ static create(options: CreateFileMsgParameters): FileMsgBody;
134
+ }
@@ -0,0 +1,150 @@
1
+ type ChatType = 'singleChat' | 'groupChat' | 'chatRoom';
2
+ export interface ImgParameters {
3
+ /** The message type. */
4
+ type: 'img';
5
+ /** The message ID. */
6
+ id: string;
7
+ }
8
+ export interface FileObj {
9
+ url: string;
10
+ filename: string;
11
+ filetype: string;
12
+ data: File;
13
+ }
14
+ export interface ImgMsgSetParameters {
15
+ /** Session type. */
16
+ chatType: ChatType;
17
+ /** The recipient. */
18
+ to: string;
19
+ /** The file object. */
20
+ file?: FileObj;
21
+ /** The image width. */
22
+ width?: number;
23
+ /** The image height. */
24
+ height?: number;
25
+ /** The input ID of the file to be uploaded. */
26
+ fileInputId?: string;
27
+ /** The sender, which can only be the current user and can not be changed. */
28
+ from?: string;
29
+ /** @deprecated Whether the session type is chat room. */
30
+ roomType?: boolean;
31
+ /** Whether it's group chat. */
32
+ group?: string;
33
+ /** The callback for message sending success. */
34
+ success?: () => void;
35
+ /** The callback for a message sending failure. */
36
+ fail?: () => void;
37
+ /** The message extension. */
38
+ ext?: {
39
+ [key: string]: any;
40
+ };
41
+ /** The file URL. If the file is uploaded, you can directly use the URL. */
42
+ url?: string;
43
+ /** The callback of a file upload error. */
44
+ onFileUploadError?: (error: any) => void;
45
+ /** The callback of file upload completion. */
46
+ onFileUploadComplete?: (data: any) => void;
47
+ /** The callback of the file upload progress. */
48
+ onFileUploadProgress?: (data: any) => void;
49
+ /** The message body. */
50
+ body?: {
51
+ /** The file URL. */
52
+ url: string;
53
+ /** The file type. */
54
+ type: string;
55
+ /** The file name. */
56
+ filename: string;
57
+ };
58
+ /** Whether read receipts are required during a group session. */
59
+ msgConfig?: {
60
+ allowGroupAck: boolean;
61
+ };
62
+ /** Whether the message is a thread message. */
63
+ isChatThread?: boolean;
64
+ }
65
+ export interface ImgMsgBody extends CreateImgMsgParameters {
66
+ /** The message ID. */
67
+ id: string;
68
+ /** Time. */
69
+ time: number;
70
+ /** The key required to download the file. */
71
+ secret?: string;
72
+ /** The thumbnail URL. */
73
+ thumb?: string;
74
+ /** The key required to download the thumbnail. */
75
+ thumb_secret?: string;
76
+ /** @deprecated Whether the session type is chat room. */
77
+ roomType?: boolean;
78
+ /** @deprecated Whether the session type is group. */
79
+ group?: string;
80
+ /** Whether read receipts are required during a group session. */
81
+ msgConfig?: {
82
+ allowGroupAck: boolean;
83
+ };
84
+ /** The callback for message sending success. */
85
+ success?: () => void;
86
+ /** The callback for a message sending failure. */
87
+ fail?: () => void;
88
+ }
89
+ export interface CreateImgMsgParameters {
90
+ /** The message type. */
91
+ type: 'img';
92
+ /** Session type. */
93
+ chatType: ChatType;
94
+ /** The file object. */
95
+ file?: FileObj;
96
+ /** The file URL. If the file is uploaded, you can directly use the URL. */
97
+ url?: string;
98
+ /** The image width. */
99
+ width?: number;
100
+ /** The image height. */
101
+ height?: number;
102
+ /** The recipient. */
103
+ to: string;
104
+ /** The sender, which can only be the current user and can not be changed. */
105
+ from?: string;
106
+ /** The callback of a file upload error. */
107
+ onFileUploadError?: (error: any) => void;
108
+ /** The callback of file upload completion. */
109
+ onFileUploadComplete?: (data: any) => void;
110
+ /** The callback of the file upload progress. */
111
+ onFileUploadProgress?: (data: any) => void;
112
+ /** The message extension. */
113
+ ext?: {
114
+ [key: string]: any;
115
+ };
116
+ /** The message body. */
117
+ body?: {
118
+ /** The file URL. */
119
+ url: string;
120
+ /** The file type. */
121
+ type: string;
122
+ /** The file name. */
123
+ filename: string;
124
+ };
125
+ /** Whether read receipts are required during a group session. */
126
+ msgConfig?: {
127
+ allowGroupAck: boolean;
128
+ };
129
+ /** Whether the message is a thread message. */
130
+ isChatThread?: boolean;
131
+ }
132
+ export declare class Img {
133
+ id: string;
134
+ type: 'img';
135
+ body?: ImgMsgBody;
136
+ constructor(parameters: ImgParameters);
137
+ /**
138
+ * @hidden
139
+ */
140
+ set(options: ImgMsgSetParameters): void;
141
+ /**
142
+ * @hidden
143
+ */
144
+ setChatType(chatType: ChatType): boolean;
145
+ /**
146
+ * @hidden
147
+ */
148
+ setGroup(group: string): boolean;
149
+ static create(options: CreateImgMsgParameters): ImgMsgBody;
150
+ }
@@ -0,0 +1,147 @@
1
+ import {
2
+ ReadMsgBody,
3
+ CreateReadMsgParameters,
4
+ ReadMsgSetParameters,
5
+ ReadParameters,
6
+ } from './read';
7
+ import {
8
+ DeliveryMsgBody,
9
+ CreateDeliveryMsgParameters,
10
+ DeliveryMsgSetParameters,
11
+ DeliveryParameters,
12
+ } from './delivery';
13
+ import {
14
+ ChannelMsgBody,
15
+ CreateChannelMsgParameters,
16
+ ChannelMsgSetParameters,
17
+ ChannelParameters,
18
+ } from './channel';
19
+ import {
20
+ TextMsgBody,
21
+ CreateTextMsgParameters,
22
+ TextMsgSetParameters,
23
+ TextParameters,
24
+ } from './text';
25
+ import {
26
+ CmdMsgBody,
27
+ CreateCmdMsgParameters,
28
+ CmdMsgSetParameters,
29
+ CmdParameters,
30
+ } from './cmd';
31
+ import {
32
+ CustomMsgBody,
33
+ CreateCustomMsgParameters,
34
+ CustomMsgSetParameters,
35
+ CustomParameters,
36
+ } from './custom';
37
+ import {
38
+ LocationMsgBody,
39
+ CreateLocationMsgParameters,
40
+ LocationMsgSetParameters,
41
+ LocationParameters,
42
+ } from './location';
43
+ import {
44
+ ImgMsgBody,
45
+ CreateImgMsgParameters,
46
+ ImgMsgSetParameters,
47
+ ImgParameters,
48
+ } from './img';
49
+ import {
50
+ AudioMsgBody,
51
+ CreateAudioMsgParameters,
52
+ AudioMsgSetParameters,
53
+ AudioParameters,
54
+ } from './audio';
55
+ import {
56
+ VideoMsgBody,
57
+ CreateVideoMsgParameters,
58
+ VideoMsgSetParameters,
59
+ VideoParameters,
60
+ } from './video';
61
+ import {
62
+ FileMsgBody,
63
+ CreateFileMsgParameters,
64
+ FileMsgSetParameters,
65
+ FileParameters,
66
+ } from './file';
67
+ export type MessageType =
68
+ | 'read'
69
+ | 'delivery'
70
+ | 'channel'
71
+ | 'txt'
72
+ | 'cmd'
73
+ | 'custom'
74
+ | 'loc'
75
+ | 'img'
76
+ | 'audio'
77
+ | 'file'
78
+ | 'video';
79
+ export declare type NewMessageParamters =
80
+ | ReadParameters
81
+ | DeliveryParameters
82
+ | ChannelParameters
83
+ | TextParameters
84
+ | CmdParameters
85
+ | CustomParameters
86
+ | LocationParameters
87
+ | ImgParameters
88
+ | AudioParameters
89
+ | VideoParameters
90
+ | FileParameters;
91
+ export declare type MessageSetParameters =
92
+ | ReadMsgSetParameters
93
+ | DeliveryMsgSetParameters
94
+ | ChannelMsgSetParameters
95
+ | TextMsgSetParameters
96
+ | CmdMsgSetParameters
97
+ | CustomMsgSetParameters
98
+ | LocationMsgSetParameters
99
+ | ImgMsgSetParameters
100
+ | AudioMsgSetParameters
101
+ | VideoMsgSetParameters
102
+ | FileMsgSetParameters;
103
+ export declare type CreateMsgType =
104
+ | CreateTextMsgParameters
105
+ | CreateImgMsgParameters
106
+ | CreateCmdMsgParameters
107
+ | CreateFileMsgParameters
108
+ | CreateVideoMsgParameters
109
+ | CreateCustomMsgParameters
110
+ | CreateLocationMsgParameters
111
+ | CreateChannelMsgParameters
112
+ | CreateDeliveryMsgParameters
113
+ | CreateReadMsgParameters
114
+ | CreateAudioMsgParameters;
115
+ export declare type MessageBody =
116
+ | ReadMsgBody
117
+ | DeliveryMsgBody
118
+ | ChannelMsgBody
119
+ | TextMsgBody
120
+ | CmdMsgBody
121
+ | CustomMsgBody
122
+ | LocationMsgBody
123
+ | ImgMsgBody
124
+ | AudioMsgBody
125
+ | VideoMsgBody
126
+ | FileMsgBody;
127
+ declare class Message {
128
+ id: string;
129
+ body: any;
130
+ type: MessageType;
131
+ constructor(type: MessageType, id?: string);
132
+ /** @hidden */
133
+ static createOldMsg(options: NewMessageParamters): any;
134
+ /** Creates a message. */
135
+ /** 创建消息。*/
136
+ static create(options: CreateMsgType): MessageBody;
137
+ /**
138
+ * @hidden
139
+ * Set the message body.
140
+ */
141
+ /**
142
+ * @hidden
143
+ * 设置消息体。
144
+ */
145
+ set(options: MessageSetParameters): void;
146
+ }
147
+ export { Message };