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
package/Easemob-chat.d.ts CHANGED
@@ -9,20 +9,30 @@ declare const easemobChat: EasemobChatStatic;
9
9
  export default easemobChat;
10
10
  export declare namespace EasemobChat {
11
11
  interface AsyncResult<T = any> {
12
+ /** Status of the request. */
12
13
  type: Code;
14
+ /** Data returned by successful request. */
13
15
  data?: T;
16
+ /** Data returned by successful request. */
14
17
  entities?: T;
18
+ /** The error message. */
15
19
  message?: string;
16
20
  [key: string]: any;
17
21
  }
18
22
 
23
+ /** The user ID. */
19
24
  type UserId = string;
20
25
 
21
26
  interface CommonRequestResult {
27
+ /** The result of request. */
22
28
  result: boolean;
29
+ /** Action. */
23
30
  action: string;
31
+ /** The reason of failure. */
24
32
  reason?: string;
33
+ /** The user ID. */
25
34
  user: string;
35
+ /** The group/chat room ID. */
26
36
  id: string;
27
37
  }
28
38
 
@@ -37,19 +47,13 @@ export declare namespace EasemobChat {
37
47
  [key: string]: string;
38
48
  }
39
49
 
50
+ /** @deprecated */
40
51
  interface RosterData {
41
52
  name: string;
42
53
  subscription: 'both';
43
54
  jid: Jid;
44
55
  }
45
56
 
46
- interface Host {
47
- protocol: string;
48
- domain: string;
49
- ip: string;
50
- port: string;
51
- }
52
-
53
57
  interface SendMsgResult {
54
58
  /** The message local ID. */
55
59
  localMsgId: string;
@@ -102,6 +106,7 @@ export declare namespace EasemobChat {
102
106
  | 'subscribed'
103
107
  | 'onPresenceStatusChange';
104
108
 
109
+ /** @deprecated */
105
110
  interface OnPresenceMsg {
106
111
  type: OnPresenceMsgType;
107
112
  to: string;
@@ -120,30 +125,39 @@ export declare namespace EasemobChat {
120
125
  | 'chatThreadJoin'
121
126
  | 'chatThreadLeave'
122
127
  | 'chatThreadNameUpdate';
128
+
123
129
  interface ThreadMultiDeviceInfo {
130
+ /** Event name of thread multi device event. */
124
131
  operation: multiDeviceEventType;
132
+ /** The message thread ID. */
125
133
  chatThreadId?: string;
134
+ /** The message thread name. */
126
135
  chatThreadName?: string;
136
+ /** The group ID to which the message thread belongs. */
127
137
  parentId?: string;
128
138
  }
129
139
 
130
- /**
131
- * The connection module is the module where the SDK creates long link, And all about links, friends, groups, and chat apis are all in this module
132
- *
133
- * @module connection
134
- */
135
-
136
140
  interface ConnectionParameters {
141
+ /** The unique application key registered in console. */
137
142
  appKey: string;
138
- apiUrl?: string;
139
- url?: string;
143
+ /** Whether to enable the delivery receipt function. - `true`: Enable; - (Default)`false`: Do not enable. */
140
144
  delivery?: boolean;
141
- isDebug?: boolean;
142
- isHttpDNS?: boolean;
145
+ /** Heartbeat interval, in milliseconds. */
143
146
  heartBeatWait?: number;
147
+ /** The unique ID of the login device is random by default and can be set by yourself. This parameter is required for multiple terminals and multiple devices. */
144
148
  deviceId?: string;
149
+ /** Whether to use your own upload function, for example, when uploading images and files to your server. - `true`: Use your own upload function; - (Default)`false`: Do not use your own upload function. */
145
150
  useOwnUploadFun?: boolean;
151
+ /** The maximum number of reconnection. */
146
152
  autoReconnectNumMax?: number;
153
+ /** Whether DNS is enabled or not. It is enabled by default. The private cloud should be turned off */
154
+ isHttpDNS?: boolean;
155
+ /** The URL of the specified REST server. This command is used when DNS is not enabled. Usually this API is used for specific customers and need to contact account manager to get it. */
156
+ apiUrl?: string;
157
+ /** The URL of the specified message server. This command is used when DNS is not enabled. Usually this API is used for specific customers and need to contact account manager to get it. */
158
+ url?: string;
159
+ /** Whether to use HTTPS only. By default, the browser determines whether to use HTTPS only according to the domain name. */
160
+ https?: boolean;
147
161
  }
148
162
 
149
163
  interface RegisterUserResult extends AsyncResult {
@@ -668,7 +682,7 @@ export declare namespace EasemobChat {
668
682
 
669
683
  interface TranslationResult {
670
684
  /** Translation results. */
671
- ranslations: {
685
+ translations: {
672
686
  /** Translated text. */
673
687
  text: string;
674
688
  /** The target language of translation. */
@@ -905,7 +919,7 @@ export declare namespace EasemobChat {
905
919
  interface ConversationSilentModeType {
906
920
  /** User push map. */
907
921
  user: {
908
- [propname: UserId]: SilentModeConversationType;
922
+ [propname: string]: SilentModeConversationType;
909
923
  };
910
924
  /** Group push map. */
911
925
  group: {
@@ -1015,147 +1029,178 @@ export declare namespace EasemobChat {
1015
1029
  reactionList: ReactionListItem[];
1016
1030
  }
1017
1031
 
1032
+ /**
1033
+ * The error code defined by SDK.
1034
+ * @module Code
1035
+ */
1018
1036
  enum Code {
1037
+ /** No error. */
1019
1038
  REQUEST_SUCCESS = 0,
1039
+ /** The server response times out. */
1020
1040
  REQUEST_TIMEOUT = -1,
1041
+ /** A general error. */
1021
1042
  REQUEST_UNKNOWN = -2,
1043
+ /** The parameter is invalid. */
1022
1044
  REQUEST_PARAMETER_ERROR = -3,
1023
- REQUEST_ABORT = -4,
1024
- WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR = 0,
1045
+ /** The request is canceled. */
1046
+ REQUEST_ABORT = -4, // 取消请求
1047
+ /** Login failed. */
1025
1048
  WEBIM_CONNCTION_OPEN_ERROR = 1,
1049
+ /** The user authentication fails. The reasons are as follows. The SDK is not initiated. The user is not login. */
1026
1050
  WEBIM_CONNCTION_AUTH_ERROR = 2,
1027
- WEBIM_CONNCTION_OPEN_USERGRID_ERROR = 3,
1028
- WEBIM_CONNCTION_ATTACH_ERROR = 4,
1029
- WEBIM_CONNCTION_ATTACH_USERGRID_ERROR = 5,
1030
- WEBIM_CONNCTION_REOPEN_ERROR = 6,
1031
- WEBIM_CONNCTION_SERVER_CLOSE_ERROR = 7,
1032
- WEBIM_CONNCTION_SERVER_ERROR = 8,
1033
- WEBIM_CONNCTION_IQ_ERROR = 9,
1034
- WEBIM_CONNCTION_PING_ERROR = 10,
1035
- WEBIM_CONNCTION_NOTIFYVERSION_ERROR = 11,
1051
+
1052
+ /** Fails to get the token. */
1036
1053
  WEBIM_CONNCTION_GETROSTER_ERROR = 12,
1037
- WEBIM_CONNCTION_CROSSDOMAIN_ERROR = 13,
1038
- WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES = 14,
1039
- WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR = 15,
1054
+ /** Websocket is disconnected */
1040
1055
  WEBIM_CONNCTION_DISCONNECTED = 16,
1056
+ /** A general error. */
1041
1057
  WEBIM_CONNCTION_AJAX_ERROR = 17,
1042
- WEBIM_CONNCTION_JOINROOM_ERROR = 18,
1043
- WEBIM_CONNCTION_GETROOM_ERROR = 19,
1044
- WEBIM_CONNCTION_GETROOMINFO_ERROR = 20,
1045
- WEBIM_CONNCTION_GETROOMMEMBER_ERROR = 21,
1046
- WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR = 22,
1047
- WEBIM_CONNCTION_LOAD_CHATROOM_ERROR = 23,
1048
- WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR = 24,
1049
- WEBIM_CONNCTION_JOINCHATROOM_ERROR = 25,
1050
- WEBIM_CONNCTION_QUITCHATROOM_ERROR = 26,
1058
+ /** The App Key is invalid. */
1051
1059
  WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR = 27,
1060
+ /** The token is invalid. */
1052
1061
  WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR = 28,
1053
- WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR = 29,
1054
- WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR = 30,
1062
+ /** The callback inner error code while the message is successfully sent. */
1055
1063
  WEBIM_CONNCTION_CALLBACK_INNER_ERROR = 31,
1056
- WEBIM_CONNCTION_CLIENT_OFFLINE = 32,
1057
- WEBIM_CONNCTION_CLIENT_LOGOUT = 33,
1058
- WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR = 34,
1059
- WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP = 35,
1060
- WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP = 36,
1061
- WEBIM_CONNECTION_ACCEPT_JOIN_GROUP = 37,
1062
- WEBIM_CONNECTION_DECLINE_JOIN_GROUP = 38,
1064
+ /** The current user is offline. */
1065
+ WEBIM_CONNCTION_CLIENT_OFFLINE = 32, //32 = client offline
1066
+ /** The user is not logged in.*/
1063
1067
  WEBIM_CONNECTION_CLOSED = 39,
1068
+ /** The user authentication fails. */
1064
1069
  WEBIM_CONNECTION_ERROR = 40,
1070
+
1071
+ /** The upper limit is reached. */
1065
1072
  MAX_LIMIT = 50,
1073
+ /** The message is not found. */
1066
1074
  MESSAGE_NOT_FOUND = 51,
1075
+ /** Unauthorized operation. */
1067
1076
  NO_PERMISSION = 52,
1077
+ /** Unsupported Operation. */
1068
1078
  OPERATION_UNSUPPORTED = 53,
1069
- WEBIM_UPLOADFILE_BROWSER_ERROR = 100,
1079
+ /** An operation that is not allowed. */
1080
+ OPERATION_NOT_ALLOWED = 54,
1081
+ /** The uploading of the file failed. */
1070
1082
  WEBIM_UPLOADFILE_ERROR = 101,
1083
+ /** The current user is not logged in when uploading the file. */
1071
1084
  WEBIM_UPLOADFILE_NO_LOGIN = 102,
1072
- WEBIM_UPLOADFILE_NO_FILE = 103,
1085
+ /** File-downloading failed. */
1073
1086
  WEBIM_DOWNLOADFILE_ERROR = 200,
1074
- WEBIM_DOWNLOADFILE_NO_LOGIN = 201,
1075
- WEBIM_DOWNLOADFILE_BROWSER_ERROR = 202,
1087
+ /** User does not found. */
1076
1088
  USER_NOT_FOUND = 204,
1089
+ /** The user is logged in on another device. */
1077
1090
  WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE = 206,
1091
+ /** The user was removed. */
1078
1092
  WEBIM_CONNCTION_USER_REMOVED = 207,
1093
+ /** The password is renewed. */
1079
1094
  WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD = 216,
1095
+ /** The user was kicked off from another device. */
1080
1096
  WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE = 217,
1097
+ /** Global muted. */
1081
1098
  USER_MUTED_BY_ADMIN = 219,
1099
+ /**
1100
+ * The user is not on your contact list, and you cannot send messages to him or her.
1101
+ * Note: You can send messages to strangers by default. This error occurs only when you enable the function of allowing to send messages only to your contacts.
1102
+ */
1082
1103
  USER_NOT_FRIEND = 221,
1083
- WEBIM_MESSAGE_REC_TEXT = 300,
1084
- WEBIM_MESSAGE_REC_TEXT_ERROR = 301,
1085
- WEBIM_MESSAGE_REC_EMOTION = 302,
1086
- WEBIM_MESSAGE_REC_PHOTO = 303,
1087
- WEBIM_MESSAGE_REC_AUDIO = 304,
1088
- WEBIM_MESSAGE_REC_AUDIO_FILE = 305,
1089
- WEBIM_MESSAGE_REC_VEDIO = 306,
1090
- WEBIM_MESSAGE_REC_VEDIO_FILE = 307,
1091
- WEBIM_MESSAGE_REC_FILE = 308,
1092
- WEBIM_MESSAGE_SED_TEXT = 309,
1093
- WEBIM_MESSAGE_SED_EMOTION = 310,
1094
- WEBIM_MESSAGE_SED_PHOTO = 311,
1095
- WEBIM_MESSAGE_SED_AUDIO = 312,
1096
- WEBIM_MESSAGE_SED_AUDIO_FILE = 313,
1097
- WEBIM_MESSAGE_SED_VEDIO = 314,
1098
- WEBIM_MESSAGE_SED_VEDIO_FILE = 315,
1099
- WEBIM_MESSAGE_SED_FILE = 316,
1100
- WEBIM_MESSAGE_SED_ERROR = 317,
1101
- STATUS_INIT = 400,
1102
- STATUS_DOLOGIN_USERGRID = 401,
1103
- STATUS_DOLOGIN_IM = 402,
1104
- STATUS_OPENED = 403,
1105
- STATUS_CLOSING = 404,
1106
- STATUS_CLOSED = 405,
1107
- STATUS_ERROR = 406,
1104
+
1105
+ /** The server is busy. */
1108
1106
  SERVER_BUSY = 500,
1107
+ /** The message content contains illegal or sensitive words. */
1109
1108
  MESSAGE_INCLUDE_ILLEGAL_CONTENT = 501,
1109
+ /** The message was blocked. */
1110
1110
  MESSAGE_EXTERNAL_LOGIC_BLOCKED = 502,
1111
+ /** Unknown error. */
1111
1112
  SERVER_UNKNOWN_ERROR = 503,
1113
+ /** The message recall has exceeded the time limit.*/
1112
1114
  MESSAGE_RECALL_TIME_LIMIT = 504,
1115
+ /** The service is not enabled. */
1113
1116
  SERVICE_NOT_ENABLED = 505,
1117
+ /** The message fails to be delivered because the user is not on the allow list.*/
1114
1118
  SERVICE_NOT_ALLOW_MESSAGING = 506,
1119
+ /** The current user is muted. */
1115
1120
  SERVICE_NOT_ALLOW_MESSAGING_MUTE = 507,
1121
+ /** The message is blocked by the Moderation service. */
1116
1122
  MESSAGE_MODERATION_BLOCKED = 508,
1123
+ /** Group chat ID current limiting. */
1124
+ MESSAGE_CURRENT_LIMITING = 509,
1125
+ /** The group is not found. */
1117
1126
  GROUP_NOT_EXIST = 605,
1127
+ /** The user being operated is not in the group. */
1118
1128
  GROUP_NOT_JOINED = 602,
1129
+ /** The number of members in the group reaches the limit. */
1119
1130
  GROUP_MEMBERS_FULL = 606,
1131
+ /** Permission denied. */
1120
1132
  PERMISSION_DENIED = 603,
1133
+ /** Internal error. */
1121
1134
  WEBIM_LOAD_MSG_ERROR = 604,
1135
+ /** The current user is already in the group. */
1122
1136
  GROUP_ALREADY_JOINED = 601,
1137
+ /** The maximum number of group members exceeds the limit during group creation. */
1123
1138
  GROUP_MEMBERS_LIMIT = 607,
1139
+ /** Group disabled */
1140
+ GROUP_IS_DISABLED = 608,
1141
+ /** Invalid token or App Key. */
1124
1142
  REST_PARAMS_STATUS = 700,
1143
+ /** The user being operated is not in the chatroom. */
1144
+ CHATROOM_NOT_JOINED = 702,
1145
+ /** The number of chatroom members reaches the limit.*/
1125
1146
  CHATROOM_MEMBERS_FULL = 704,
1147
+ /** The chatroom is not found. */
1126
1148
  CHATROOM_NOT_EXIST = 705,
1149
+ /** Websocket error. */
1127
1150
  SDK_RUNTIME_ERROR = 999,
1151
+ /** The parameter length exceeds the limit when posting custom presence status. */
1128
1152
  PRESENCE_PARAM_EXCEED = 1100,
1153
+ /** The Reaction already exists. */
1129
1154
  REACTION_ALREADY_ADDED = 1101,
1155
+ /** A Reaction is being created by multiple users at the same time. */
1130
1156
  REACTION_CREATING = 1102,
1157
+ /** The user does not have the permission for the Reaction operation. For example, the user who does not add the reaction attempts to delete it, or the user that is neither the sender nor recipient of the one-to-one message attempts to add the Reaction. */
1131
1158
  REACTION_OPERATION_IS_ILLEGAL = 1103,
1159
+ /** Invalid language code. */
1132
1160
  TRANSLATION_NOT_VALID = 1200,
1161
+ /** The translated text is too long. */
1133
1162
  TRANSLATION_TEXT_TOO_LONG = 1201,
1163
+ /** Failed to obtain the translation service. */
1134
1164
  TRANSLATION_FAILED = 1204,
1165
+ /** The chatThread is not found. */
1135
1166
  THREAD_NOT_EXIST = 1300,
1167
+ /** Chat thread already exists. */
1136
1168
  THREAD_ALREADY_EXIST = 1301,
1137
1169
  }
1138
1170
 
1139
1171
  /**
1140
- * @category Connection
1172
+ * The connection module is the module where the SDK creates long link, And all about links, friends, groups, and chat apis are all in this module
1173
+ *
1174
+ * @module connection
1141
1175
  */
1142
1176
  class Connection {
1177
+ /** @deprecated */
1143
1178
  isDebug: boolean;
1179
+ /** Whether to enable DNS to prevent DNS hijacking. - (Default)`true`: Enable; - `false`: Do not enable. */
1144
1180
  isHttpDNS: boolean;
1181
+ /** The heartbeat interval (in seconds). The default value is 30,000s. */
1145
1182
  heartBeatWait: number;
1183
+ /** The unique application key registered in console. */
1146
1184
  appKey: string;
1147
1185
  appName: string;
1148
1186
  orgName: string;
1149
1187
  token: string;
1188
+ /** The maximum number of reconnection. */
1150
1189
  autoReconnectNumMax: number;
1151
- autoReconnectNumTotal: number;
1190
+ private autoReconnectNumTotal: number;
1191
+ /** SDK version number. */
1152
1192
  version: string;
1193
+ /** The unique web device ID. By default, it is a random number. */
1153
1194
  deviceId: string;
1154
- osType: number;
1195
+ private osType: number;
1196
+ /** Whether to use your own upload function, for example, when uploading images and files to your server. - `true`: Use your own upload function; - (Default)`false`: Do not use your own upload function. */
1155
1197
  useOwnUploadFun: boolean;
1198
+ /** The URL of the specified REST server. This command is used when DNS is not enabled. Usually this API is used for specific customers and need to contact account manager to get it. */
1156
1199
  apiUrl: string;
1200
+ /** The URL of the specified message server. This command is used when DNS is not enabled. Usually this API is used for specific customers and need to contact account manager to get it. */
1157
1201
  url: string;
1158
1202
  https: boolean;
1203
+ /** The way to log in. */
1159
1204
  grantType: 'password' | 'accessToken' | 'agoraToken' | '';
1160
1205
  context: {
1161
1206
  jid: {
@@ -1177,16 +1222,14 @@ export declare namespace EasemobChat {
1177
1222
  _msgHash: {
1178
1223
  [key: string]: any;
1179
1224
  };
1180
- /**
1181
- * @since 4.0.1
1182
- */
1225
+
1183
1226
  eventHandler?: EventHandler;
1184
1227
  /**
1185
- * @deprecated 4.0.1
1228
+ * @deprecated
1186
1229
  */
1187
1230
  onOpened?: () => void;
1188
1231
  /**
1189
- * @deprecated 4.0.1
1232
+ * @deprecated
1190
1233
  */
1191
1234
  onPresence?: (msg: PresenceMsg) => void;
1192
1235
  onTextMessage?: (msg: TextMsgBody) => void;
@@ -1201,19 +1244,11 @@ export declare namespace EasemobChat {
1201
1244
  onDeliveredMessage?: (msg: DeliveryMsgBody) => void;
1202
1245
  onReadMessage?: (msg: ReadMsgBody) => void;
1203
1246
  onRecallMessage?: (msg: RecallMsgBody) => void;
1204
- onMutedMessage?: (msg: MuteMsgBody) => void;
1205
1247
  onChannelMessage?: (msg: ChannelMsgBody) => void;
1206
1248
  onError?: (error: ErrorEvent) => void;
1207
1249
  onOffline?: () => void;
1208
1250
  onOnline?: () => void;
1209
- onRoster?: (rosters: RosterData[]) => void;
1210
1251
  onStatisticMessage?: (msg: any) => void;
1211
- onCreateGroup?: (data: any) => void;
1212
- onBlacklistUpdate?: (list: {
1213
- [key: string]: {
1214
- name: string;
1215
- };
1216
- }) => void;
1217
1252
  onContactAgreed?: (msg: ContactMsgBody) => void;
1218
1253
  onContactRefuse?: (msg: ContactMsgBody) => void;
1219
1254
  onContactDeleted?: (msg: ContactMsgBody) => void;
@@ -1223,31 +1258,40 @@ export declare namespace EasemobChat {
1223
1258
  // eslint-disable-next-line no-undef
1224
1259
  [key: string]: any;
1225
1260
  constructor(options: ConnectionParameters);
1226
-
1261
+ /** Registers a user. */
1227
1262
  registerUser(
1228
1263
  this: Connection,
1229
1264
  params: {
1265
+ /** The User ID. */
1230
1266
  username: string;
1267
+ /** The password. */
1231
1268
  password: string;
1269
+ /** The display nickname. It is the display name in the iOS or Android notification. */
1232
1270
  nickname?: string;
1233
1271
  success?: (res: any) => void;
1234
1272
  error?: (err: ErrorEvent) => void;
1235
1273
  apiUrl?: string;
1236
1274
  }
1237
1275
  ): Promise<RegisterUserResult>;
1238
-
1276
+ /** Logs in. */
1239
1277
  open(parameters: {
1278
+ /** The User ID. */
1240
1279
  user: string;
1280
+ /** The password. */
1241
1281
  pwd?: string;
1282
+ /** Token required to connect to the message service. */
1242
1283
  accessToken?: string;
1284
+ /** The Agora token. */
1243
1285
  agoraToken?: string;
1244
1286
  success?: (res: any) => void;
1245
1287
  error?: (res: any) => void;
1246
1288
  }): Promise<LoginResult>;
1289
+ /** Checks the connection status. - `true`: Connected; - (Default)`false`: Not connected. */
1247
1290
  isOpened(): boolean;
1291
+ /** Closes the connection. */
1248
1292
  close(): void;
1249
- getChatToken(agoraToken: string): Promise<any>;
1250
- reconnect(): void;
1293
+ private getChatToken(agoraToken: string): Promise<any>;
1294
+ private reconnect(): void;
1251
1295
  /** send message */
1252
1296
  send(params: MessageBody): Promise<SendMsgResult>;
1253
1297
 
@@ -1262,7 +1306,9 @@ export declare namespace EasemobChat {
1262
1306
  getChatRooms(
1263
1307
  this: Connection,
1264
1308
  params: {
1309
+ /** The page number, starting from 1. */
1265
1310
  pagenum: number;
1311
+ /** The number of records per page. The default value is 20. */
1266
1312
  pagesize: number;
1267
1313
  success?: (res: AsyncResult<GetChatRoomsResult>) => any;
1268
1314
  error?: (error: ErrorEvent) => any;
@@ -1279,10 +1325,15 @@ export declare namespace EasemobChat {
1279
1325
  createChatRoom(
1280
1326
  this: Connection,
1281
1327
  params: {
1328
+ /** The chat room name. */
1282
1329
  name: string;
1330
+ /** The description of the chat room. */
1283
1331
  description: string;
1332
+ /** The maximum number of members in the chat room, including the chat room creator. The value is of integer type, 200 by default, and can not exceed 5,000. */
1284
1333
  maxusers: number;
1285
- members: UserId[];
1334
+ /** (Optional) The members in the chat room. An array of user IDs. If you set this parameter, ensure that the array contains at least one user. */
1335
+ members?: UserId[];
1336
+ /** The super admin token. */
1286
1337
  token: string;
1287
1338
  success?: (res: AsyncResult<CreateDeleteChatRoomResult>) => any;
1288
1339
  error?: (error: ErrorEvent) => any;
@@ -1299,7 +1350,9 @@ export declare namespace EasemobChat {
1299
1350
  destroyChatRoom(
1300
1351
  this: Connection,
1301
1352
  params: {
1353
+ /** The chat room ID */
1302
1354
  chatRoomId: string;
1355
+ /** The super admin token. */
1303
1356
  token: string;
1304
1357
  success?: (
1305
1358
  res: AsyncResult<CreateDeleteChatRoomResult>
@@ -1318,6 +1371,7 @@ export declare namespace EasemobChat {
1318
1371
  getChatRoomDetails(
1319
1372
  this: Connection,
1320
1373
  params: {
1374
+ /** The chat room ID. */
1321
1375
  chatRoomId: string;
1322
1376
  success?: (res: AsyncResult<GetChatRoomDetailsResult>) => void;
1323
1377
  error?: (error: ErrorEvent) => void;
@@ -1334,9 +1388,13 @@ export declare namespace EasemobChat {
1334
1388
  modifyChatRoom(
1335
1389
  this: Connection,
1336
1390
  params: {
1391
+ /** The chat room ID. */
1337
1392
  chatRoomId: string;
1393
+ /** The chat room name. */
1338
1394
  chatRoomName: string;
1395
+ /** The description of the chat room. */
1339
1396
  description: string;
1397
+ /** The maximum number of members in the chat room. */
1340
1398
  maxusers: number;
1341
1399
  success?: (res: AsyncResult<ModifyChatRoomResult>) => void;
1342
1400
  error?: (error: ErrorEvent) => void;
@@ -1347,7 +1405,9 @@ export declare namespace EasemobChat {
1347
1405
  removeSingleChatRoomMember(
1348
1406
  this: Connection,
1349
1407
  params: {
1408
+ /** The chat room ID. */
1350
1409
  chatRoomId: string;
1410
+ /** The member to be removed. */
1351
1411
  username: string;
1352
1412
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1353
1413
  error?: (error: ErrorEvent) => void;
@@ -1364,7 +1424,9 @@ export declare namespace EasemobChat {
1364
1424
  removeChatRoomMember(
1365
1425
  this: Connection,
1366
1426
  params: {
1427
+ /** The chat room ID. */
1367
1428
  chatRoomId: string;
1429
+ /** The member to be removed. */
1368
1430
  username: string;
1369
1431
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1370
1432
  error?: (error: ErrorEvent) => void;
@@ -1375,7 +1437,9 @@ export declare namespace EasemobChat {
1375
1437
  removeMultiChatRoomMember(
1376
1438
  this: Connection,
1377
1439
  params: {
1440
+ /** The chat room ID. */
1378
1441
  chatRoomId: string;
1442
+ /** The members to be removed. */
1379
1443
  users: string[];
1380
1444
  success?: (res: AsyncResult<CommonRequestResult[]>) => void;
1381
1445
  error?: (error: ErrorEvent) => void;
@@ -1392,7 +1456,9 @@ export declare namespace EasemobChat {
1392
1456
  removeChatRoomMembers(
1393
1457
  this: Connection,
1394
1458
  params: {
1459
+ /** The chat room ID. */
1395
1460
  chatRoomId: string;
1461
+ /** The members to be removed. */
1396
1462
  users: string[];
1397
1463
  success?: (res: AsyncResult<CommonRequestResult[]>) => void;
1398
1464
  error?: (error: ErrorEvent) => void;
@@ -1409,7 +1475,9 @@ export declare namespace EasemobChat {
1409
1475
  addUsersToChatRoom(
1410
1476
  this: Connection,
1411
1477
  params: {
1478
+ /** The chat room ID. */
1412
1479
  chatRoomId: string;
1480
+ /** The users to be added. */
1413
1481
  users: string[];
1414
1482
  success?: (res: AsyncResult<AddUsersToChatRoomResult>) => void;
1415
1483
  error?: (error: ErrorEvent) => void;
@@ -1426,7 +1494,9 @@ export declare namespace EasemobChat {
1426
1494
  joinChatRoom(
1427
1495
  this: Connection,
1428
1496
  params: {
1497
+ /** The chat room ID. */
1429
1498
  roomId: string;
1499
+ /** The reason for joining the chat room. It is optional. It is only used for groups. */
1430
1500
  message?: string;
1431
1501
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1432
1502
  error?: (error: ErrorEvent) => void;
@@ -1444,6 +1514,7 @@ export declare namespace EasemobChat {
1444
1514
  quitChatRoom(
1445
1515
  this: Connection,
1446
1516
  params: {
1517
+ /** The chat room ID. */
1447
1518
  roomId: string;
1448
1519
  success?: (res: AsyncResult<{ result: boolean }>) => void;
1449
1520
  error?: (error: ErrorEvent) => void;
@@ -1460,6 +1531,7 @@ export declare namespace EasemobChat {
1460
1531
  leaveChatRoom(
1461
1532
  this: Connection,
1462
1533
  params: {
1534
+ /** The chat room ID. */
1463
1535
  roomId: string;
1464
1536
  success?: (res: AsyncResult<{ result: boolean }>) => void;
1465
1537
  error?: (error: ErrorEvent) => void;
@@ -1470,8 +1542,11 @@ export declare namespace EasemobChat {
1470
1542
  listChatRoomMember(
1471
1543
  this: Connection,
1472
1544
  params: {
1545
+ /** The page number, starting from 1. */
1473
1546
  pageNum: number;
1547
+ /** The number of members per page. The value cannot exceed 1,000. */
1474
1548
  pageSize: number;
1549
+ /** The chat room ID. */
1475
1550
  chatRoomId: string;
1476
1551
  success?: (res: AsyncResult<{ member: string }[]>) => void;
1477
1552
  error?: (error: ErrorEvent) => void;
@@ -1488,8 +1563,11 @@ export declare namespace EasemobChat {
1488
1563
  listChatRoomMembers(
1489
1564
  this: Connection,
1490
1565
  params: {
1566
+ /** The page number, starting from 1. */
1491
1567
  pageNum: number;
1568
+ /** The number of members per page. The value cannot exceed 1,000. */
1492
1569
  pageSize: number;
1570
+ /** The chat room ID. */
1493
1571
  chatRoomId: string;
1494
1572
  success?: (res: AsyncResult<{ member: string }[]>) => void;
1495
1573
  error?: (error: ErrorEvent) => void;
@@ -1506,6 +1584,7 @@ export declare namespace EasemobChat {
1506
1584
  getChatRoomAdmin(
1507
1585
  this: Connection,
1508
1586
  params: {
1587
+ /** The chat room ID. */
1509
1588
  chatRoomId: string;
1510
1589
  success?: (res: AsyncResult<GetChatRoomAdminResult>) => void;
1511
1590
  error?: (error: ErrorEvent) => void;
@@ -1522,7 +1601,9 @@ export declare namespace EasemobChat {
1522
1601
  setChatRoomAdmin(
1523
1602
  this: Connection,
1524
1603
  params: {
1604
+ /** The chat room ID. */
1525
1605
  chatRoomId: string;
1606
+ /** The members to be set as admin. */
1526
1607
  username: string;
1527
1608
  success?: (res: AsyncResult<SetChatRoomAdminResult>) => void;
1528
1609
  error?: (error: ErrorEvent) => void;
@@ -1539,7 +1620,9 @@ export declare namespace EasemobChat {
1539
1620
  removeChatRoomAdmin(
1540
1621
  this: Connection,
1541
1622
  params: {
1623
+ /** The chat room ID. */
1542
1624
  chatRoomId: string;
1625
+ /** The admins to be removed. */
1543
1626
  username: string;
1544
1627
  success?: (res: AsyncResult<RemoveChatRoomAdminResult>) => void;
1545
1628
  error?: (error: ErrorEvent) => void;
@@ -1556,8 +1639,11 @@ export declare namespace EasemobChat {
1556
1639
  muteChatRoomMember(
1557
1640
  this: Connection,
1558
1641
  params: {
1642
+ /** The member to be muted in the chat room. */
1559
1643
  username: string;
1644
+ /** The mute duration in milliseconds. The value -1 indicates that the member is muted permanently. */
1560
1645
  muteDuration: number;
1646
+ /** The chat room ID. */
1561
1647
  chatRoomId: string;
1562
1648
  success?: (res: AsyncResult<MuteChatRoomMemberResult>) => void;
1563
1649
  error?: (error: ErrorEvent) => void;
@@ -1568,7 +1654,9 @@ export declare namespace EasemobChat {
1568
1654
  removeMuteChatRoomMember(
1569
1655
  this: Connection,
1570
1656
  params: {
1657
+ /** The chat room ID. */
1571
1658
  chatRoomId: string;
1659
+ /** The member to be unmuted. */
1572
1660
  username: string;
1573
1661
  success?: (
1574
1662
  res: AsyncResult<UnmuteChatRoomMemberResult[]>
@@ -1587,7 +1675,9 @@ export declare namespace EasemobChat {
1587
1675
  unmuteChatRoomMember(
1588
1676
  this: Connection,
1589
1677
  params: {
1678
+ /** The chat room ID. */
1590
1679
  chatRoomId: string;
1680
+ /** The member to be unmuted. */
1591
1681
  username: string;
1592
1682
  success?: (
1593
1683
  res: AsyncResult<UnmuteChatRoomMemberResult[]>
@@ -1600,6 +1690,7 @@ export declare namespace EasemobChat {
1600
1690
  getChatRoomMuted(
1601
1691
  this: Connection,
1602
1692
  params: {
1693
+ /** The chat room ID. */
1603
1694
  chatRoomId: string;
1604
1695
  success?: (
1605
1696
  res: AsyncResult<GetChatRoomMuteListResult[]>
@@ -1619,6 +1710,7 @@ export declare namespace EasemobChat {
1619
1710
  getChatRoomMuteList(
1620
1711
  this: Connection,
1621
1712
  params: {
1713
+ /** The chat room ID. */
1622
1714
  chatRoomId: string;
1623
1715
  success?: (
1624
1716
  res: AsyncResult<GetChatRoomMuteListResult[]>
@@ -1637,6 +1729,7 @@ export declare namespace EasemobChat {
1637
1729
  getChatRoomMutelist(
1638
1730
  this: Connection,
1639
1731
  params: {
1732
+ /** The chat room ID. */
1640
1733
  chatRoomId: string;
1641
1734
  success?: (
1642
1735
  res: AsyncResult<GetChatRoomMuteListResult[]>
@@ -1649,7 +1742,9 @@ export declare namespace EasemobChat {
1649
1742
  chatRoomBlockSingle(
1650
1743
  this: Connection,
1651
1744
  params: {
1745
+ /** The chat room ID. */
1652
1746
  chatRoomId: string;
1747
+ /** The member to be added to the blocklist. */
1653
1748
  username: string;
1654
1749
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1655
1750
  error?: (error: ErrorEvent) => void;
@@ -1666,7 +1761,9 @@ export declare namespace EasemobChat {
1666
1761
  blockChatRoomMember(
1667
1762
  this: Connection,
1668
1763
  params: {
1764
+ /** The chat room ID. */
1669
1765
  chatRoomId: string;
1766
+ /** The member to be added to the blocklist. */
1670
1767
  username: string;
1671
1768
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1672
1769
  error?: (error: ErrorEvent) => void;
@@ -1677,7 +1774,9 @@ export declare namespace EasemobChat {
1677
1774
  chatRoomBlockMulti(
1678
1775
  this: Connection,
1679
1776
  params: {
1777
+ /** The chat room ID. */
1680
1778
  chatRoomId: string;
1779
+ /** The members to be added to the blocklist. */
1681
1780
  usernames: string[];
1682
1781
  success?: (res: AsyncResult<CommonRequestResult[]>) => void;
1683
1782
  error?: (error: ErrorEvent) => void;
@@ -1694,7 +1793,9 @@ export declare namespace EasemobChat {
1694
1793
  blockChatRoomMembers(
1695
1794
  this: Connection,
1696
1795
  params: {
1796
+ /** The chat room ID. */
1697
1797
  chatRoomId: string;
1798
+ /** The members to be added to the blocklist. */
1698
1799
  usernames: string[];
1699
1800
  success?: (res: AsyncResult<CommonRequestResult[]>) => void;
1700
1801
  error?: (error: ErrorEvent) => void;
@@ -1705,7 +1806,9 @@ export declare namespace EasemobChat {
1705
1806
  removeChatRoomBlockSingle(
1706
1807
  this: Connection,
1707
1808
  params: {
1809
+ /** The chat room ID. */
1708
1810
  chatRoomId: string;
1811
+ /** The member to be removed from the blocklist. */
1709
1812
  username: string;
1710
1813
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1711
1814
  error?: (error: ErrorEvent) => void;
@@ -1722,7 +1825,9 @@ export declare namespace EasemobChat {
1722
1825
  unblockChatRoomMember(
1723
1826
  this: Connection,
1724
1827
  params: {
1828
+ /** The chat room ID. */
1725
1829
  chatRoomId: string;
1830
+ /** The member to be removed from the blocklist. */
1726
1831
  username: string;
1727
1832
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1728
1833
  error?: (error: ErrorEvent) => void;
@@ -1733,7 +1838,9 @@ export declare namespace EasemobChat {
1733
1838
  removeChatRoomBlockMulti(
1734
1839
  this: Connection,
1735
1840
  params: {
1841
+ /** The chat room ID. */
1736
1842
  chatRoomId: string;
1843
+ /** The array of members to be removed from the blocklist. */
1737
1844
  usernames: string[];
1738
1845
  success?: (res: AsyncResult<CommonRequestResult[]>) => void;
1739
1846
  error?: (error: ErrorEvent) => void;
@@ -1750,7 +1857,9 @@ export declare namespace EasemobChat {
1750
1857
  unblockChatRoomMembers(
1751
1858
  this: Connection,
1752
1859
  params: {
1860
+ /** The chat room ID. */
1753
1861
  chatRoomId: string;
1862
+ /** The array of members to be removed from the blocklist. */
1754
1863
  usernames: string[];
1755
1864
  success?: (res: AsyncResult<CommonRequestResult[]>) => void;
1756
1865
  error?: (error: ErrorEvent) => void;
@@ -1761,6 +1870,7 @@ export declare namespace EasemobChat {
1761
1870
  getChatRoomBlacklistNew(
1762
1871
  this: Connection,
1763
1872
  params: {
1873
+ /** The chat room ID. */
1764
1874
  chatRoomId: string;
1765
1875
  success?: (res: AsyncResult<UserId[]>) => void;
1766
1876
  error?: (error: ErrorEvent) => void;
@@ -1777,6 +1887,7 @@ export declare namespace EasemobChat {
1777
1887
  getChatRoomBlacklist(
1778
1888
  this: Connection,
1779
1889
  params: {
1890
+ /** The chat room ID. */
1780
1891
  chatRoomId: string;
1781
1892
  success?: (res: AsyncResult<UserId[]>) => void;
1782
1893
  error?: (error: ErrorEvent) => void;
@@ -1793,6 +1904,7 @@ export declare namespace EasemobChat {
1793
1904
  disableSendChatRoomMsg(
1794
1905
  this: Connection,
1795
1906
  params: {
1907
+ /** The chat room ID. */
1796
1908
  chatRoomId: string;
1797
1909
  success?: (
1798
1910
  res: AsyncResult<WhetherAbleSendChatRoomMsgResult>
@@ -1811,6 +1923,7 @@ export declare namespace EasemobChat {
1811
1923
  enableSendChatRoomMsg(
1812
1924
  this: Connection,
1813
1925
  params: {
1926
+ /** The chat room ID. */
1814
1927
  chatRoomId: string;
1815
1928
  success?: (
1816
1929
  res: AsyncResult<WhetherAbleSendChatRoomMsgResult>
@@ -1830,7 +1943,9 @@ export declare namespace EasemobChat {
1830
1943
  addUsersToChatRoomWhitelist(
1831
1944
  this: Connection,
1832
1945
  params: {
1946
+ /** The chat room ID. */
1833
1947
  chatRoomId: string;
1948
+ /** The members to be added to the allowlist. */
1834
1949
  users: string[];
1835
1950
  success?: (
1836
1951
  res: AsyncResult<
@@ -1851,7 +1966,9 @@ export declare namespace EasemobChat {
1851
1966
  addUsersToChatRoomAllowlist(
1852
1967
  this: Connection,
1853
1968
  params: {
1969
+ /** The chat room ID. */
1854
1970
  chatRoomId: string;
1971
+ /** The members to be added to the allowlist. */
1855
1972
  users: string[];
1856
1973
  success?: (
1857
1974
  res: AsyncResult<
@@ -1866,7 +1983,9 @@ export declare namespace EasemobChat {
1866
1983
  rmUsersFromChatRoomWhitelist(
1867
1984
  this: Connection,
1868
1985
  params: {
1986
+ /** The chat room ID. */
1869
1987
  chatRoomId: string;
1988
+ /** The members to be removed from the allowlist. */
1870
1989
  userName: string;
1871
1990
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1872
1991
  error?: (error: ErrorEvent) => void;
@@ -1884,7 +2003,9 @@ export declare namespace EasemobChat {
1884
2003
  removeChatRoomWhitelistMember(
1885
2004
  this: Connection,
1886
2005
  params: {
2006
+ /** The chat room ID. */
1887
2007
  chatRoomId: string;
2008
+ /** The members to be removed from the allowlist. */
1888
2009
  userName: string;
1889
2010
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1890
2011
  error?: (error: ErrorEvent) => void;
@@ -1901,7 +2022,9 @@ export declare namespace EasemobChat {
1901
2022
  removeChatRoomAllowlistMember(
1902
2023
  this: Connection,
1903
2024
  params: {
2025
+ /** The chat room ID. */
1904
2026
  chatRoomId: string;
2027
+ /** The members to be removed from the allowlist. */
1905
2028
  userName: string;
1906
2029
  success?: (res: AsyncResult<CommonRequestResult>) => void;
1907
2030
  error?: (error: ErrorEvent) => void;
@@ -1919,6 +2042,7 @@ export declare namespace EasemobChat {
1919
2042
  getChatRoomWhitelist(
1920
2043
  this: Connection,
1921
2044
  params: {
2045
+ /** The chat room ID. */
1922
2046
  chatRoomId: string;
1923
2047
  success: (res: AsyncResult<UserId[]>) => void;
1924
2048
  error: (error: ErrorEvent) => void;
@@ -1935,6 +2059,7 @@ export declare namespace EasemobChat {
1935
2059
  getChatRoomAllowlist(
1936
2060
  this: Connection,
1937
2061
  params: {
2062
+ /** The chat room ID. */
1938
2063
  chatRoomId: string;
1939
2064
  success: (res: AsyncResult<UserId[]>) => void;
1940
2065
  error: (error: ErrorEvent) => void;
@@ -1952,7 +2077,9 @@ export declare namespace EasemobChat {
1952
2077
  isChatRoomWhiteUser(
1953
2078
  this: Connection,
1954
2079
  params: {
2080
+ /** The chat room ID. */
1955
2081
  chatRoomId: string;
2082
+ /** The member ID. */
1956
2083
  userName: string;
1957
2084
  success?: (res: AsyncResult<IsChatRoomWhiteUserResult>) => void;
1958
2085
  error?: (error: ErrorEvent) => void;
@@ -1969,7 +2096,9 @@ export declare namespace EasemobChat {
1969
2096
  isInChatRoomAllowlist(
1970
2097
  this: Connection,
1971
2098
  params: {
2099
+ /** The chat room ID. */
1972
2100
  chatRoomId: string;
2101
+ /** The member ID. */
1973
2102
  userName: string;
1974
2103
  success?: (res: AsyncResult<IsChatRoomWhiteUserResult>) => void;
1975
2104
  error?: (error: ErrorEvent) => void;
@@ -1986,6 +2115,7 @@ export declare namespace EasemobChat {
1986
2115
  fetchChatRoomAnnouncement(
1987
2116
  this: Connection,
1988
2117
  params: {
2118
+ /** The chat room ID. */
1989
2119
  roomId: string;
1990
2120
  success?: (
1991
2121
  res: AsyncResult<FetchChatRoomAnnouncementResult>
@@ -2004,7 +2134,9 @@ export declare namespace EasemobChat {
2004
2134
  updateChatRoomAnnouncement(
2005
2135
  this: Connection,
2006
2136
  params: {
2137
+ /** The chat room ID. */
2007
2138
  roomId: string;
2139
+ /** The announcement content. */
2008
2140
  announcement: string;
2009
2141
  success: (
2010
2142
  res: AsyncResult<UpdateChatRoomAnnouncementResult>
@@ -2023,11 +2155,17 @@ export declare namespace EasemobChat {
2023
2155
  uploadChatRoomSharedFile(
2024
2156
  this: Connection,
2025
2157
  params: {
2158
+ /** The chat room ID. */
2026
2159
  roomId: string;
2160
+ /** The shared file object to upload. */
2027
2161
  file: object;
2162
+ /** The upload progress callback. */
2028
2163
  onFileUploadProgress?: (data: any) => void;
2164
+ /** The upload completion callback. */
2029
2165
  onFileUploadComplete?: (data: any) => void;
2166
+ /** The upload failure callback. */
2030
2167
  onFileUploadError?: (data: any) => void;
2168
+ /** The upload cancellation callback. */
2031
2169
  onFileUploadCanceled?: (data: any) => void;
2032
2170
  }
2033
2171
  ): void;
@@ -2042,7 +2180,9 @@ export declare namespace EasemobChat {
2042
2180
  deleteChatRoomSharedFile(
2043
2181
  this: Connection,
2044
2182
  params: {
2183
+ /** The chat room ID. */
2045
2184
  roomId: string;
2185
+ /** The shared file ID. */
2046
2186
  fileId: string;
2047
2187
  success?: (
2048
2188
  res: AsyncResult<DeleteChatRoomSharedFileResult>
@@ -2062,6 +2202,7 @@ export declare namespace EasemobChat {
2062
2202
  fetchChatRoomSharedFileList(
2063
2203
  this: Connection,
2064
2204
  params: {
2205
+ /** The chat room ID. */
2065
2206
  roomId: string;
2066
2207
  success?: (
2067
2208
  res: AsyncResult<FetchChatRoomSharedFileListResult[]>
@@ -2080,6 +2221,7 @@ export declare namespace EasemobChat {
2080
2221
  getChatRoomSharedFilelist(
2081
2222
  this: Connection,
2082
2223
  params: {
2224
+ /** The chat room ID. */
2083
2225
  roomId: string;
2084
2226
  success?: (
2085
2227
  res: AsyncResult<FetchChatRoomSharedFileListResult[]>
@@ -2089,18 +2231,30 @@ export declare namespace EasemobChat {
2089
2231
  ): Promise<AsyncResult<FetchChatRoomSharedFileListResult[]>>;
2090
2232
 
2091
2233
  // Group API
2092
- /** @deprecated */
2234
+ /** @deprecated User {@link createGroup instead.} */
2093
2235
  createGroupNew(
2094
2236
  this: Connection,
2095
2237
  params: {
2238
+ /** The group information. */
2096
2239
  data: {
2240
+ /** The group name. */
2097
2241
  groupname: string;
2242
+ /** The description of the group. */
2098
2243
  desc: string;
2244
+ /** The array of member IDs to add to the group. These users will be added directly into the group and receive "operation: 'directJoined'" in the callback of onGroupEvent. */
2099
2245
  members: UserId[];
2246
+ /** Whether it is a public group. -`true`: Yes; -`false`: No. Public group: the group that others can query by calling `listgroups`. */
2100
2247
  public: boolean;
2248
+ /** Whether a user requires the approval from the group admin to join the group. -`true`: Yes; -`false`: No.*/
2101
2249
  approval: boolean;
2250
+ /** Whether to allow group members to invite others to the group. `true`: Allow; `false`: Do not allow.*/
2102
2251
  allowinvites: boolean;
2252
+ /** Whether the invitee needs to accept the invitation before joining the group.
2253
+ - `true`: The invitee's consent is required. The default value is `true`.
2254
+ - `false`: The invitee will be directly added to the group without confirmation.
2255
+ */
2103
2256
  inviteNeedConfirm: boolean;
2257
+ /** The group max users. */
2104
2258
  maxusers: number;
2105
2259
  };
2106
2260
  success?: (res: AsyncResult<CreateGroupResult>) => void;
@@ -2128,14 +2282,26 @@ export declare namespace EasemobChat {
2128
2282
  createGroup(
2129
2283
  this: Connection,
2130
2284
  params: {
2285
+ /** The group information. */
2131
2286
  data: {
2287
+ /** The group name. */
2132
2288
  groupname: string;
2289
+ /** The description of the group. */
2133
2290
  desc: string;
2291
+ /** The array of member IDs to add to the group. These users will be added directly into the group and receive "operation: 'directJoined'" in the callback of onGroupEvent. */
2134
2292
  members: UserId[];
2293
+ /** Whether it is a public group. -`true`: Yes; -`false`: No. Public group: the group that others can query by calling `listgroups`. */
2135
2294
  public: boolean;
2295
+ /** Whether a user requires the approval from the group admin to join the group. -`true`: Yes; -`false`: No.*/
2136
2296
  approval: boolean;
2297
+ /** Whether to allow group members to invite others to the group. `true`: Allow; `false`: Do not allow.*/
2137
2298
  allowinvites: boolean;
2299
+ /** Whether the invitee needs to accept the invitation before joining the group.
2300
+ - `true`: The invitee's consent is required. The default value is `true`.
2301
+ - `false`: The invitee will be directly added to the group without confirmation.
2302
+ */
2138
2303
  inviteNeedConfirm: boolean;
2304
+ /** The group max users. */
2139
2305
  maxusers: number;
2140
2306
  };
2141
2307
  success?: (res: AsyncResult<CreateGroupResult>) => void;
@@ -2143,10 +2309,11 @@ export declare namespace EasemobChat {
2143
2309
  }
2144
2310
  ): Promise<AsyncResult<CreateGroupResult>>;
2145
2311
 
2146
- /** @deprecated */
2312
+ /** @deprecated Use {@link blockGroupMessages instead.} */
2147
2313
  blockGroup(
2148
2314
  this: Connection,
2149
2315
  params: {
2316
+ /** The group ID. */
2150
2317
  groupId: string;
2151
2318
  success?: (res: AsyncResult<BlockGroupResult>) => void;
2152
2319
  error?: (error: ErrorEvent) => void;
@@ -2162,6 +2329,7 @@ export declare namespace EasemobChat {
2162
2329
  blockGroupMessages(
2163
2330
  this: Connection,
2164
2331
  params: {
2332
+ /** The group ID. */
2165
2333
  groupId: string;
2166
2334
  success?: (res: AsyncResult<BlockGroupResult>) => void;
2167
2335
  error?: (error: ErrorEvent) => void;
@@ -2179,7 +2347,9 @@ export declare namespace EasemobChat {
2179
2347
  listGroups(
2180
2348
  this: Connection,
2181
2349
  params: {
2350
+ /** The number of records per page. */
2182
2351
  limit: number;
2352
+ /** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is null, the data of the first page will be fetched. */
2183
2353
  cursor?: string;
2184
2354
  success?: (res: AsyncResult<BaseGroupInfo[]>) => void;
2185
2355
  error?: (error: ErrorEvent) => void;
@@ -2196,7 +2366,9 @@ export declare namespace EasemobChat {
2196
2366
  getPublicGroups(
2197
2367
  this: Connection,
2198
2368
  params: {
2369
+ /** The number of records per page. */
2199
2370
  limit: number;
2371
+ /** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is null, the data of the first page will be fetched. */
2200
2372
  cursor?: string;
2201
2373
  success?: (res: AsyncResult<BaseGroupInfo[]>) => void;
2202
2374
  error?: (error: ErrorEvent) => void;
@@ -2209,7 +2381,7 @@ export declare namespace EasemobChat {
2209
2381
  * ```typescript
2210
2382
  * connection.getGroup()
2211
2383
  * ```
2212
- * @deprecated
2384
+ * @deprecated Use {@link getJoinedGroups instead.}
2213
2385
  */
2214
2386
  getGroup(
2215
2387
  this: Connection,
@@ -2229,9 +2401,13 @@ export declare namespace EasemobChat {
2229
2401
  getJoinedGroups(
2230
2402
  this: Connection,
2231
2403
  params: {
2404
+ /** The current page number. */
2232
2405
  pageNum: number;
2406
+ /** The number of group per page. */
2233
2407
  pageSize: number;
2408
+ /** Whether the number of group members is required. */
2234
2409
  needAffiliations?: boolean;
2410
+ /** Whether the role of the account in the group is required. */
2235
2411
  needRole?: boolean;
2236
2412
  success?: (res: AsyncResult<BaseGroupInfo[]>) => void;
2237
2413
  error?: (error: ErrorEvent) => void;
@@ -2242,7 +2418,9 @@ export declare namespace EasemobChat {
2242
2418
  changeOwner(
2243
2419
  this: Connection,
2244
2420
  params: {
2421
+ /** The group ID. */
2245
2422
  groupId: string;
2423
+ /** The new group owner. */
2246
2424
  newOwner: UserId;
2247
2425
  success?: (res: AsyncResult<ChangeGroupOwnerResult>) => void;
2248
2426
  error?: (error: ErrorEvent) => void;
@@ -2259,7 +2437,9 @@ export declare namespace EasemobChat {
2259
2437
  changeGroupOwner(
2260
2438
  this: Connection,
2261
2439
  params: {
2440
+ /** The group ID. */
2262
2441
  groupId: string;
2442
+ /** The new group owner. */
2263
2443
  newOwner: UserId;
2264
2444
  success?: (res: AsyncResult<ChangeGroupOwnerResult>) => void;
2265
2445
  error?: (error: ErrorEvent) => void;
@@ -2275,6 +2455,7 @@ export declare namespace EasemobChat {
2275
2455
  getGroupInfo(
2276
2456
  this: Connection,
2277
2457
  params: {
2458
+ /** The group ID or group ID list. */
2278
2459
  groupId: string | string[];
2279
2460
  success?: (res: AsyncResult<GroupDetailInfo[]>) => void;
2280
2461
  error?: (error: ErrorEvent) => void;
@@ -2291,8 +2472,11 @@ export declare namespace EasemobChat {
2291
2472
  modifyGroup(
2292
2473
  this: Connection,
2293
2474
  params: {
2475
+ /** The Group ID. */
2294
2476
  groupId: string;
2477
+ /** The group name. */
2295
2478
  groupName: string;
2479
+ /** The group description. */
2296
2480
  description: string;
2297
2481
  success?: (res: AsyncResult<ModifyGroupResult>) => void;
2298
2482
  error?: (error: ErrorEvent) => void;
@@ -2303,8 +2487,11 @@ export declare namespace EasemobChat {
2303
2487
  listGroupMember(
2304
2488
  this: Connection,
2305
2489
  params: {
2490
+ /** The group ID。 */
2306
2491
  groupId: string;
2492
+ /** The page number, starting from 1. */
2307
2493
  pageNum: number;
2494
+ /** The number of members per page. The value cannot exceed 1000. */
2308
2495
  pageSize: number;
2309
2496
  success?: (res: AsyncResult<GroupMember[]>) => void;
2310
2497
  error?: (error: ErrorEvent) => void;
@@ -2321,8 +2508,11 @@ export declare namespace EasemobChat {
2321
2508
  listGroupMembers(
2322
2509
  this: Connection,
2323
2510
  params: {
2511
+ /** The group ID. */
2324
2512
  groupId: string;
2513
+ /** The page number, starting from 1. */
2325
2514
  pageNum: number;
2515
+ /** The number of members per page. The value cannot exceed 1000. */
2326
2516
  pageSize: number;
2327
2517
  success?: (res: AsyncResult<GroupMember[]>) => void;
2328
2518
  error?: (error: ErrorEvent) => void;
@@ -2338,17 +2528,20 @@ export declare namespace EasemobChat {
2338
2528
  getGroupAdmin(
2339
2529
  this: Connection,
2340
2530
  params: {
2531
+ /** The group ID. */
2341
2532
  groupId: string;
2342
2533
  success?: (res: AsyncResult<UserId[]>) => void;
2343
2534
  error?: (error: ErrorEvent) => void;
2344
2535
  }
2345
2536
  ): Promise<AsyncResult<UserId[]>>;
2346
2537
 
2347
- /** @deprecated */
2538
+ /** @deprecated Use {@link setGroupAdmin instead.} */
2348
2539
  setAdmin(
2349
2540
  this: Connection,
2350
2541
  params: {
2542
+ /** The group ID. */
2351
2543
  groupId: string;
2544
+ /** The ID of the user set as admin. */
2352
2545
  username: UserId;
2353
2546
  success?: (res: AsyncResult<SetGroupAdminResult>) => void;
2354
2547
  error?: (error: ErrorEvent) => void;
@@ -2365,7 +2558,9 @@ export declare namespace EasemobChat {
2365
2558
  setGroupAdmin(
2366
2559
  this: Connection,
2367
2560
  params: {
2561
+ /** The group ID. */
2368
2562
  groupId: string;
2563
+ /** The ID of the user set as admin. */
2369
2564
  username: UserId;
2370
2565
  success?: (res: AsyncResult<SetGroupAdminResult>) => void;
2371
2566
  error?: (error: ErrorEvent) => void;
@@ -2373,6 +2568,7 @@ export declare namespace EasemobChat {
2373
2568
  ): Promise<AsyncResult<SetGroupAdminResult>>;
2374
2569
 
2375
2570
  /**
2571
+ * @deprecated Use {@link removeGroupAdmin} instead.
2376
2572
  * Removes a group admin. Only the group owner can call this method. The user whose admin permissions are revoked will receive "operation: 'removeAdmin'" in the callback of onGroupEvent.
2377
2573
  *
2378
2574
  * ```typescript
@@ -2382,17 +2578,39 @@ export declare namespace EasemobChat {
2382
2578
  removeAdmin(
2383
2579
  this: Connection,
2384
2580
  params: {
2581
+ /** The group ID. */
2385
2582
  groupId: string;
2583
+ /** The ID of the user with admin privileges revoked. */
2386
2584
  username: string;
2387
2585
  success?: (res: AsyncResult<RemoveGroupAdminResult>) => void;
2388
2586
  error?: (error: ErrorEvent) => void;
2389
2587
  }
2390
2588
  ): Promise<AsyncResult<RemoveGroupAdminResult>>;
2391
2589
 
2392
- /** @deprecated */
2590
+ /**
2591
+ * Removes a group admin. Only the group owner can call this method. The user whose admin permissions are revoked will receive "operation: 'removeAdmin'" in the callback of onGroupEvent.
2592
+ *
2593
+ * ```typescript
2594
+ * connection.removeGroupAdmin({groupId: 'groupId', username: 'user1'})
2595
+ * ```
2596
+ */
2597
+ removeGroupAdmin(
2598
+ this: Connection,
2599
+ params: {
2600
+ /** The group ID. */
2601
+ groupId: string;
2602
+ /** The ID of the user with admin privileges revoked. */
2603
+ username: string;
2604
+ success?: (res: AsyncResult<RemoveGroupAdminResult>) => void;
2605
+ error?: (error: ErrorEvent) => void;
2606
+ }
2607
+ ): Promise<AsyncResult<RemoveGroupAdminResult>>;
2608
+
2609
+ /** @deprecated Use {@link destroyGroup instead.}*/
2393
2610
  dissolveGroup(
2394
2611
  this: Connection,
2395
2612
  params: {
2613
+ /** The group ID. */
2396
2614
  groupId: string;
2397
2615
  success?: (res: AsyncResult<DestroyGroupResult>) => void;
2398
2616
  error?: (error: ErrorEvent) => void;
@@ -2409,6 +2627,7 @@ export declare namespace EasemobChat {
2409
2627
  destroyGroup(
2410
2628
  this: Connection,
2411
2629
  params: {
2630
+ /** The group ID. */
2412
2631
  groupId: string;
2413
2632
  success?: (res: AsyncResult<DestroyGroupResult>) => void;
2414
2633
  error?: (error: ErrorEvent) => void;
@@ -2416,6 +2635,7 @@ export declare namespace EasemobChat {
2416
2635
  ): Promise<AsyncResult<DestroyGroupResult>>;
2417
2636
 
2418
2637
  /**
2638
+ * @deprecated Use {@link leaveGroup} instead.
2419
2639
  * Leaves the group. Group members will receive "operation: 'memberAbsence'" in the callback of onGroupEvent.
2420
2640
  *
2421
2641
  * ```typescript
@@ -2425,17 +2645,37 @@ export declare namespace EasemobChat {
2425
2645
  quitGroup(
2426
2646
  this: Connection,
2427
2647
  params: {
2648
+ /** The group ID. */
2428
2649
  groupId: string;
2429
2650
  success?: (res: AsyncResult<{ result: true }>) => void;
2430
2651
  error?: (error: ErrorEvent) => void;
2431
2652
  }
2432
2653
  ): Promise<AsyncResult<{ result: true }>>;
2433
2654
 
2434
- /** @deprecated */
2655
+ /**
2656
+ * Leaves the group. Group members will receive "operation: 'memberAbsence'" in the callback of onGroupEvent.
2657
+ *
2658
+ * ```typescript
2659
+ * connection.leaveGroup({groupId: 'groupId'})
2660
+ * ```
2661
+ */
2662
+ leaveGroup(
2663
+ this: Connection,
2664
+ params: {
2665
+ /** The group ID. */
2666
+ groupId: string;
2667
+ success?: (res: AsyncResult<{ result: true }>) => void;
2668
+ error?: (error: ErrorEvent) => void;
2669
+ }
2670
+ ): Promise<AsyncResult<{ result: true }>>;
2671
+
2672
+ /** @deprecated Use {@link inviteUsersToGroup} instead.*/
2435
2673
  inviteToGroup(
2436
2674
  this: Connection,
2437
2675
  params: {
2676
+ /** The group ID. */
2438
2677
  groupId: string;
2678
+ /** The array of invitee IDs. */
2439
2679
  users: UserId[];
2440
2680
  success?: (
2441
2681
  res: AsyncResult<InviteUsersToGroupResult[]>
@@ -2456,7 +2696,9 @@ export declare namespace EasemobChat {
2456
2696
  inviteUsersToGroup(
2457
2697
  this: Connection,
2458
2698
  params: {
2699
+ /** The group ID. */
2459
2700
  groupId: string;
2701
+ /** The array of invitee IDs. */
2460
2702
  users: UserId[];
2461
2703
  success?: (
2462
2704
  res: AsyncResult<InviteUsersToGroupResult[]>
@@ -2475,18 +2717,22 @@ export declare namespace EasemobChat {
2475
2717
  joinGroup(
2476
2718
  this: Connection,
2477
2719
  params: {
2720
+ /** The group ID. */
2478
2721
  groupId: string;
2722
+ /** The additional information of the request. */
2479
2723
  message: string;
2480
2724
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2481
2725
  error?: (error: ErrorEvent) => void;
2482
2726
  }
2483
2727
  ): Promise<AsyncResult<CommonRequestResult>>;
2484
2728
 
2485
- /** @deprecated */
2729
+ /** @deprecated Use {@link acceptGroupJoinRequest} instead. */
2486
2730
  agreeJoinGroup(
2487
2731
  this: Connection,
2488
2732
  params: {
2733
+ /** The ID of the user requesting to join the group. */
2489
2734
  applicant: UserId;
2735
+ /** The group ID. */
2490
2736
  groupId: string;
2491
2737
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2492
2738
  error?: (error: ErrorEvent) => void;
@@ -2503,19 +2749,24 @@ export declare namespace EasemobChat {
2503
2749
  acceptGroupJoinRequest(
2504
2750
  this: Connection,
2505
2751
  params: {
2752
+ /** The ID of the user requesting to join the group. */
2506
2753
  applicant: UserId;
2754
+ /** The group ID. */
2507
2755
  groupId: string;
2508
2756
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2509
2757
  error?: (error: ErrorEvent) => void;
2510
2758
  }
2511
2759
  ): Promise<AsyncResult<CommonRequestResult>>;
2512
2760
 
2513
- /** @deprecated */
2761
+ /** @deprecated Use {@link rejectGroupJoinRequest} instead. */
2514
2762
  rejectJoinGroup(
2515
2763
  this: Connection,
2516
2764
  params: {
2765
+ /** The ID of the user who sends the request to join the group. */
2517
2766
  applicant: UserId;
2767
+ /** The group ID. */
2518
2768
  groupId: string;
2769
+ /** The reason of declining. */
2519
2770
  reason: string;
2520
2771
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2521
2772
  error?: (error: ErrorEvent) => void;
@@ -2532,19 +2783,24 @@ export declare namespace EasemobChat {
2532
2783
  rejectGroupJoinRequest(
2533
2784
  this: Connection,
2534
2785
  params: {
2786
+ /** The ID of the user who sends the request to join the group. */
2535
2787
  applicant: UserId;
2788
+ /** The group ID. */
2536
2789
  groupId: string;
2790
+ /** The reason of declining. */
2537
2791
  reason: string;
2538
2792
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2539
2793
  error?: (error: ErrorEvent) => void;
2540
2794
  }
2541
2795
  ): Promise<AsyncResult<CommonRequestResult>>;
2542
2796
 
2543
- /** @deprecated */
2797
+ /** @deprecated Use {@link acceptGroupInvite} instead. */
2544
2798
  agreeInviteIntoGroup(
2545
2799
  this: Connection,
2546
2800
  params: {
2801
+ /** The user ID of the invitee. */
2547
2802
  invitee: UserId;
2803
+ /** The group ID. */
2548
2804
  groupId: string;
2549
2805
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2550
2806
  error?: (error: ErrorEvent) => void;
@@ -2561,23 +2817,27 @@ export declare namespace EasemobChat {
2561
2817
  acceptGroupInvite(
2562
2818
  this: Connection,
2563
2819
  params: {
2820
+ /** The user ID of the invitee. */
2564
2821
  invitee: UserId;
2822
+ /** The group ID. */
2565
2823
  groupId: string;
2566
2824
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2567
2825
  error?: (error: ErrorEvent) => void;
2568
2826
  }
2569
2827
  ): Promise<AsyncResult<CommonRequestResult>>;
2570
2828
 
2571
- /** @deprecated */
2829
+ /** @deprecated Use {@link rejectGroupInvite} instead. */
2572
2830
  rejectInviteIntoGroup(
2573
2831
  this: Connection,
2574
2832
  params: {
2833
+ /** The user ID of the invitee. */
2575
2834
  invitee: UserId;
2835
+ /** The group ID. */
2576
2836
  groupId: string;
2577
2837
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2578
2838
  error?: (error: ErrorEvent) => void;
2579
2839
  }
2580
- ): Promise<any>;
2840
+ ): Promise<AsyncResult<CommonRequestResult>>;
2581
2841
 
2582
2842
  /**
2583
2843
  * Declines a group invitation. If a group member invites a user to join a group, the invitee can call this method to decline the invitation.
@@ -2589,18 +2849,22 @@ export declare namespace EasemobChat {
2589
2849
  rejectGroupInvite(
2590
2850
  this: Connection,
2591
2851
  params: {
2852
+ /** The user ID of the invitee. */
2592
2853
  invitee: UserId;
2854
+ /** The group ID. */
2593
2855
  groupId: string;
2594
2856
  success?: (res: AsyncResult<CommonRequestResult>) => void;
2595
2857
  error?: (error: ErrorEvent) => void;
2596
2858
  }
2597
- ): Promise<any>;
2859
+ ): Promise<AsyncResult<CommonRequestResult>>;
2598
2860
 
2599
- /** @deprecated */
2861
+ /** @deprecated Use {@link removeGroupMember} instead. */
2600
2862
  removeSingleGroupMember(
2601
2863
  this: Connection,
2602
2864
  params: {
2865
+ /** The group ID. */
2603
2866
  groupId: string;
2867
+ /** The member ID to remove. */
2604
2868
  username: UserId;
2605
2869
  success?: (res: AsyncResult<RemoveGroupMemberResult>) => void;
2606
2870
  error?: (error: ErrorEvent) => void;
@@ -2617,18 +2881,22 @@ export declare namespace EasemobChat {
2617
2881
  removeGroupMember(
2618
2882
  this: Connection,
2619
2883
  params: {
2884
+ /** The group ID. */
2620
2885
  groupId: string;
2886
+ /** The member ID to remove. */
2621
2887
  username: UserId;
2622
2888
  success?: (res: AsyncResult<RemoveGroupMemberResult>) => void;
2623
2889
  error?: (error: ErrorEvent) => void;
2624
2890
  }
2625
2891
  ): Promise<AsyncResult<RemoveGroupMemberResult>>;
2626
2892
 
2627
- /** @deprecated */
2893
+ /** @deprecated Use {@link removeGroupMembers} instead. */
2628
2894
  removeMultiGroupMember(
2629
2895
  this: Connection,
2630
2896
  params: {
2897
+ /** The group ID. */
2631
2898
  groupId: string;
2899
+ /** The array of member IDs to remove. */
2632
2900
  users: UserId[];
2633
2901
  success?: (res: AsyncResult<RemoveGroupMemberResult[]>) => void;
2634
2902
  error?: (error: ErrorEvent) => void;
@@ -2645,19 +2913,24 @@ export declare namespace EasemobChat {
2645
2913
  removeGroupMembers(
2646
2914
  this: Connection,
2647
2915
  params: {
2916
+ /** The group ID. */
2648
2917
  groupId: string;
2918
+ /** The array of member IDs to remove. */
2649
2919
  users: UserId[];
2650
2920
  success?: (res: AsyncResult<RemoveGroupMemberResult[]>) => void;
2651
2921
  error?: (error: ErrorEvent) => void;
2652
2922
  }
2653
2923
  ): Promise<AsyncResult<RemoveGroupMemberResult[]>>;
2654
2924
 
2655
- /** @deprecated */
2925
+ /** @deprecated Use {@link muteGroupMember} instead. */
2656
2926
  mute(
2657
2927
  this: Connection,
2658
2928
  params: {
2929
+ /** The ID of the group member to mute. */
2659
2930
  username: UserId;
2931
+ /** The mute duration in milliseconds. The value `-1` indicates that the member is muted permanently.*/
2660
2932
  muteDuration: number;
2933
+ /** The group ID. */
2661
2934
  groupId: string;
2662
2935
  success?: (res: AsyncResult<MuteGroupMemberResult[]>) => void;
2663
2936
  error?: (error: ErrorEvent) => void;
@@ -2674,19 +2947,24 @@ export declare namespace EasemobChat {
2674
2947
  muteGroupMember(
2675
2948
  this: Connection,
2676
2949
  params: {
2950
+ /** The ID of the group member to mute. */
2677
2951
  username: UserId;
2952
+ /** The mute duration in milliseconds. The value `-1` indicates that the member is muted permanently.*/
2678
2953
  muteDuration: number;
2954
+ /** The group ID. */
2679
2955
  groupId: string;
2680
2956
  success?: (res: AsyncResult<MuteGroupMemberResult[]>) => void;
2681
2957
  error?: (error: ErrorEvent) => void;
2682
2958
  }
2683
2959
  ): Promise<AsyncResult<MuteGroupMemberResult[]>>;
2684
2960
 
2685
- /** @deprecated */
2961
+ /** @deprecated Use {@link unmuteGroupMember} instead. */
2686
2962
  removeMute(
2687
2963
  this: Connection,
2688
2964
  params: {
2965
+ /** The group ID. */
2689
2966
  groupId: string;
2967
+ /** The group member ID to unmute. */
2690
2968
  username: UserId;
2691
2969
  success?: (res: AsyncResult<UnmuteGroupMemberResult[]>) => void;
2692
2970
  error?: (error: ErrorEvent) => void;
@@ -2703,17 +2981,20 @@ export declare namespace EasemobChat {
2703
2981
  unmuteGroupMember(
2704
2982
  this: Connection,
2705
2983
  params: {
2984
+ /** The group ID. */
2706
2985
  groupId: string;
2986
+ /** The group member ID to unmute. */
2707
2987
  username: UserId;
2708
2988
  success?: (res: AsyncResult<UnmuteGroupMemberResult[]>) => void;
2709
2989
  error?: (error: ErrorEvent) => void;
2710
2990
  }
2711
2991
  ): Promise<AsyncResult<UnmuteGroupMemberResult[]>>;
2712
2992
 
2713
- /** @deprecated */
2993
+ /** @deprecated Use {@link getGroupMutelist} instead. */
2714
2994
  getMuted(
2715
2995
  this: Connection,
2716
2996
  params: {
2997
+ /** The group ID. */
2717
2998
  groupId: string;
2718
2999
  success?: (res: AsyncResult<GetGroupMuteListResult[]>) => void;
2719
3000
  error?: (error: ErrorEvent) => void;
@@ -2730,17 +3011,20 @@ export declare namespace EasemobChat {
2730
3011
  getGroupMuteList(
2731
3012
  this: Connection,
2732
3013
  params: {
3014
+ /** The group ID. */
2733
3015
  groupId: string;
2734
3016
  success?: (res: AsyncResult<GetGroupMuteListResult[]>) => void;
2735
3017
  error?: (error: ErrorEvent) => void;
2736
3018
  }
2737
3019
  ): Promise<AsyncResult<GetGroupMuteListResult[]>>;
2738
3020
 
2739
- /** @deprecated */
3021
+ /** @deprecated Use {@link blockGroupMember} instead. */
2740
3022
  groupBlockSingle(
2741
3023
  this: Connection,
2742
3024
  params: {
3025
+ /** The group ID. */
2743
3026
  groupId: string;
3027
+ /** User ID to be added to the blocklist. */
2744
3028
  username: UserId;
2745
3029
  success?: (res: AsyncResult<GroupRequestResult>) => void;
2746
3030
  error?: (error: ErrorEvent) => void;
@@ -2757,18 +3041,22 @@ export declare namespace EasemobChat {
2757
3041
  blockGroupMember(
2758
3042
  this: Connection,
2759
3043
  params: {
3044
+ /** The group ID. */
2760
3045
  groupId: string;
3046
+ /** User ID to be added to the blocklist. */
2761
3047
  username: UserId;
2762
3048
  success?: (res: AsyncResult<GroupRequestResult>) => void;
2763
3049
  error?: (error: ErrorEvent) => void;
2764
3050
  }
2765
3051
  ): Promise<AsyncResult<GroupRequestResult>>;
2766
3052
 
2767
- /** @deprecated */
3053
+ /** @deprecated Use {@link blockGroupMembers} instead. */
2768
3054
  groupBlockMulti(
2769
3055
  this: Connection,
2770
3056
  params: {
3057
+ /** The group ID. */
2771
3058
  groupId: string;
3059
+ /** The array of member's user IDs to be added to the blocklist. */
2772
3060
  usernames: UserId[];
2773
3061
  success?: (res: AsyncResult<GroupRequestResult[]>) => void;
2774
3062
  error?: (error: ErrorEvent) => void;
@@ -2785,18 +3073,22 @@ export declare namespace EasemobChat {
2785
3073
  blockGroupMembers(
2786
3074
  this: Connection,
2787
3075
  params: {
3076
+ /** The group ID. */
2788
3077
  groupId: string;
3078
+ /** The array of member's user IDs to be added to the blocklist. */
2789
3079
  usernames: UserId[];
2790
3080
  success?: (res: AsyncResult<GroupRequestResult[]>) => void;
2791
3081
  error?: (error: ErrorEvent) => void;
2792
3082
  }
2793
3083
  ): Promise<AsyncResult<GroupRequestResult[]>>;
2794
3084
 
2795
- /** @deprecated */
3085
+ /** @deprecated Use {@link unblockGroupMember} instead. */
2796
3086
  removeGroupBlockSingle(
2797
3087
  this: Connection,
2798
3088
  params: {
3089
+ /** The group ID. */
2799
3090
  groupId: string;
3091
+ /** The user ID of the member to be removed from the blocklist. */
2800
3092
  username: string;
2801
3093
  success?: (res: AsyncResult<GroupRequestResult>) => void;
2802
3094
  error?: (error: ErrorEvent) => void;
@@ -2813,18 +3105,22 @@ export declare namespace EasemobChat {
2813
3105
  unblockGroupMember(
2814
3106
  this: Connection,
2815
3107
  params: {
3108
+ /** The group ID. */
2816
3109
  groupId: string;
3110
+ /** The user ID of the member to be removed from the blocklist. */
2817
3111
  username: string;
2818
3112
  success?: (res: AsyncResult<GroupRequestResult>) => void;
2819
3113
  error?: (error: ErrorEvent) => void;
2820
3114
  }
2821
3115
  ): Promise<AsyncResult<GroupRequestResult>>;
2822
3116
 
2823
- /** @deprecated */
3117
+ /** @deprecated Use {@link unblockGroupMembers} instead. */
2824
3118
  removeGroupBlockMulti(
2825
3119
  this: Connection,
2826
3120
  params: {
3121
+ /** The group ID. */
2827
3122
  groupId: string;
3123
+ /** The array of members‘ user IDs to be removed from the group blocklist. */
2828
3124
  usernames: UserId[];
2829
3125
  success?: (res: AsyncResult<GroupRequestResult[]>) => void;
2830
3126
  error?: (error: ErrorEvent) => void;
@@ -2841,17 +3137,20 @@ export declare namespace EasemobChat {
2841
3137
  unblockGroupMembers(
2842
3138
  this: Connection,
2843
3139
  params: {
3140
+ /** The group ID. */
2844
3141
  groupId: string;
3142
+ /** The array of members‘ user IDs to be removed from the group blocklist. */
2845
3143
  usernames: UserId[];
2846
3144
  success?: (res: AsyncResult<GroupRequestResult[]>) => void;
2847
3145
  error?: (error: ErrorEvent) => void;
2848
3146
  }
2849
3147
  ): Promise<AsyncResult<GroupRequestResult[]>>;
2850
3148
 
2851
- /** @deprecated */
3149
+ /** @deprecated Use {@link getGroupBlocklist} instead. */
2852
3150
  getGroupBlacklistNew(
2853
3151
  this: Connection,
2854
3152
  params: {
3153
+ /** The group ID. */
2855
3154
  groupId: string;
2856
3155
  success?: (res: AsyncResult<UserId[]>) => void;
2857
3156
  error?: (error: ErrorEvent) => void;
@@ -2859,17 +3158,12 @@ export declare namespace EasemobChat {
2859
3158
  ): Promise<AsyncResult<UserId[]>>;
2860
3159
 
2861
3160
  /**
2862
- * Gets the group blocklist.
2863
- *
2864
- * ```typescript
2865
- * connection.getGroupBlacklist({groupId: 'groupId'})
2866
- * ```
2867
- * @hidden
2868
- * @deprecated
3161
+ * @deprecated Use {@link getGroupBlocklist} instead.
2869
3162
  */
2870
3163
  getGroupBlacklist(
2871
3164
  this: Connection,
2872
3165
  params: {
3166
+ /** The group ID. */
2873
3167
  groupId: string;
2874
3168
  success?: (res: AsyncResult<UserId[]>) => void;
2875
3169
  error?: (error: ErrorEvent) => void;
@@ -2886,6 +3180,7 @@ export declare namespace EasemobChat {
2886
3180
  getGroupBlocklist(
2887
3181
  this: Connection,
2888
3182
  params: {
3183
+ /** The group ID. */
2889
3184
  groupId: string;
2890
3185
  success?: (res: AsyncResult<UserId[]>) => void;
2891
3186
  error?: (error: ErrorEvent) => void;
@@ -2902,6 +3197,7 @@ export declare namespace EasemobChat {
2902
3197
  disableSendGroupMsg(
2903
3198
  this: Connection,
2904
3199
  params: {
3200
+ /** The group ID. */
2905
3201
  groupId: string;
2906
3202
  success?: (res: AsyncResult<{ mute: true }>) => void;
2907
3203
  error?: (error: ErrorEvent) => void;
@@ -2918,6 +3214,7 @@ export declare namespace EasemobChat {
2918
3214
  enableSendGroupMsg(
2919
3215
  this: Connection,
2920
3216
  params: {
3217
+ /** The group ID. */
2921
3218
  groupId: string;
2922
3219
  success?: (res: AsyncResult<{ mute: false }>) => void;
2923
3220
  error?: (error: ErrorEvent) => void;
@@ -2925,7 +3222,6 @@ export declare namespace EasemobChat {
2925
3222
  ): Promise<AsyncResult<{ mute: false }>>;
2926
3223
 
2927
3224
  /**
2928
- * @hidden
2929
3225
  * @deprecated Use {@link addUsersToGroupAllowlist} instead.
2930
3226
  * Adds members to the group allowlist. Members on the allowlist can still post messages even if they are muted in the group. Only the group admin or above can call this method. Members added to the allowlist will receive "operation: 'addUserToAllowlist'" in the callback of onGroupEvent.
2931
3227
  *
@@ -2936,7 +3232,9 @@ export declare namespace EasemobChat {
2936
3232
  addUsersToGroupWhitelist(
2937
3233
  this: Connection,
2938
3234
  params: {
3235
+ /** The group ID. */
2939
3236
  groupId: string;
3237
+ /** An array of member IDs to be added to the allowlist. */
2940
3238
  users: UserId[];
2941
3239
  success?: (res: AsyncResult<GroupRequestResult[]>) => void;
2942
3240
  error?: (error: ErrorEvent) => void;
@@ -2953,18 +3251,22 @@ export declare namespace EasemobChat {
2953
3251
  addUsersToGroupAllowlist(
2954
3252
  this: Connection,
2955
3253
  params: {
3254
+ /** The group ID. */
2956
3255
  groupId: string;
3256
+ /** An array of member IDs to be added to the allowlist. */
2957
3257
  users: UserId[];
2958
3258
  success?: (res: AsyncResult<GroupRequestResult[]>) => void;
2959
3259
  error?: (error: ErrorEvent) => void;
2960
3260
  }
2961
3261
  ): Promise<AsyncResult<GroupRequestResult[]>>;
2962
3262
 
2963
- /** @deprecated */
3263
+ /** @deprecated Use {@link removeGroupWhitelistMember} instead. */
2964
3264
  rmUsersFromGroupWhitelist(
2965
3265
  this: Connection,
2966
3266
  params: {
3267
+ /** The group ID. */
2967
3268
  groupId: string;
3269
+ /** The ID of the member to be removed from the group allowlist. */
2968
3270
  userName: UserId;
2969
3271
  success?: (res: AsyncResult<GroupRequestResult>) => void;
2970
3272
  error?: (error: ErrorEvent) => void;
@@ -2982,7 +3284,9 @@ export declare namespace EasemobChat {
2982
3284
  removeGroupWhitelistMember(
2983
3285
  this: Connection,
2984
3286
  params: {
3287
+ /** The group ID. */
2985
3288
  groupId: string;
3289
+ /** The ID of the member to be removed from the group allowlist. */
2986
3290
  userName: UserId;
2987
3291
  success?: (res: AsyncResult<GroupRequestResult>) => void;
2988
3292
  error?: (error: ErrorEvent) => void;
@@ -2999,7 +3303,9 @@ export declare namespace EasemobChat {
2999
3303
  removeGroupAllowlistMember(
3000
3304
  this: Connection,
3001
3305
  params: {
3306
+ /** The group ID. */
3002
3307
  groupId: string;
3308
+ /** The ID of the member to be removed from the group allowlist. */
3003
3309
  userName: UserId;
3004
3310
  success?: (res: AsyncResult<GroupRequestResult>) => void;
3005
3311
  error?: (error: ErrorEvent) => void;
@@ -3017,6 +3323,7 @@ export declare namespace EasemobChat {
3017
3323
  getGroupWhitelist(
3018
3324
  this: Connection,
3019
3325
  params: {
3326
+ /** The group ID. */
3020
3327
  groupId: string;
3021
3328
  success?: (res: AsyncResult<UserId[]>) => void;
3022
3329
  error?: (error: ErrorEvent) => void;
@@ -3033,17 +3340,20 @@ export declare namespace EasemobChat {
3033
3340
  getGroupAllowlist(
3034
3341
  this: Connection,
3035
3342
  params: {
3343
+ /** The group ID. */
3036
3344
  groupId: string;
3037
3345
  success?: (res: AsyncResult<UserId[]>) => void;
3038
3346
  error?: (error: ErrorEvent) => void;
3039
3347
  }
3040
3348
  ): Promise<AsyncResult<UserId[]>>;
3041
3349
 
3042
- /** @deprecated */
3350
+ /** @deprecated Use {@link isInGroupAllowlist} instead. */
3043
3351
  isGroupWhiteUser(
3044
3352
  this: Connection,
3045
3353
  params: {
3354
+ /** The group ID. */
3046
3355
  groupId: string;
3356
+ /** The user ID to query. */
3047
3357
  userName: UserId;
3048
3358
  success?: (res: AsyncResult<IsInGroupWhiteListResult>) => void;
3049
3359
  error?: (error: ErrorEvent) => void;
@@ -3061,7 +3371,9 @@ export declare namespace EasemobChat {
3061
3371
  isInGroupWhiteList(
3062
3372
  this: Connection,
3063
3373
  params: {
3374
+ /** The group ID. */
3064
3375
  groupId: string;
3376
+ /** The user ID to query. */
3065
3377
  userName: UserId;
3066
3378
  success?: (res: AsyncResult<IsInGroupWhiteListResult>) => void;
3067
3379
  error?: (error: ErrorEvent) => void;
@@ -3078,7 +3390,9 @@ export declare namespace EasemobChat {
3078
3390
  isInGroupAllowlist(
3079
3391
  this: Connection,
3080
3392
  params: {
3393
+ /** The group ID. */
3081
3394
  groupId: string;
3395
+ /** The user ID to query. */
3082
3396
  userName: UserId;
3083
3397
  success?: (res: AsyncResult<IsInGroupWhiteListResult>) => void;
3084
3398
  error?: (error: ErrorEvent) => void;
@@ -3095,7 +3409,9 @@ export declare namespace EasemobChat {
3095
3409
  getGroupMsgReadUser(
3096
3410
  this: Connection,
3097
3411
  params: {
3412
+ /** The group ID. */
3098
3413
  groupId: string;
3414
+ /** The ID of message to query. */
3099
3415
  msgId: string;
3100
3416
  success?: (res: AsyncResult<GetGroupMsgReadUserResult>) => void;
3101
3417
  error?: (error: ErrorEvent) => void;
@@ -3112,6 +3428,7 @@ export declare namespace EasemobChat {
3112
3428
  fetchGroupAnnouncement(
3113
3429
  this: Connection,
3114
3430
  params: {
3431
+ /** The group ID. */
3115
3432
  groupId: string;
3116
3433
  success?: (res: AsyncResult<{ announcement: string }>) => void;
3117
3434
  error?: (error: ErrorEvent) => void;
@@ -3128,7 +3445,9 @@ export declare namespace EasemobChat {
3128
3445
  updateGroupAnnouncement(
3129
3446
  this: Connection,
3130
3447
  params: {
3448
+ /** The group ID. */
3131
3449
  groupId: string;
3450
+ /** The group announcement. */
3132
3451
  announcement: string;
3133
3452
  success?: (
3134
3453
  res: AsyncResult<UpdateGroupAnnouncementResult>
@@ -3147,11 +3466,17 @@ export declare namespace EasemobChat {
3147
3466
  uploadGroupSharedFile(
3148
3467
  this: Connection,
3149
3468
  params: {
3469
+ /** The group ID. */
3150
3470
  groupId: string;
3471
+ /** The shared file object to upload. */
3151
3472
  file: object;
3473
+ /** The upload progress callback. */
3152
3474
  onFileUploadProgress?: (data: ProgressEvent) => void;
3475
+ /** The upload completion callback. */
3153
3476
  onFileUploadComplete?: (data: any) => void;
3477
+ /** The upload failure callback. */
3154
3478
  onFileUploadError?: (data: any) => void;
3479
+ /** The upload cancellation callback. */
3155
3480
  onFileUploadCanceled?: (data: any) => void;
3156
3481
  }
3157
3482
  ): void;
@@ -3166,7 +3491,9 @@ export declare namespace EasemobChat {
3166
3491
  deleteGroupSharedFile(
3167
3492
  this: Connection,
3168
3493
  params: {
3494
+ /** The group ID. */
3169
3495
  groupId: string;
3496
+ /** The shared file ID. */
3170
3497
  fileId: string;
3171
3498
  success?: (
3172
3499
  res: AsyncResult<DeleteGroupSharedFileResult>
@@ -3186,9 +3513,12 @@ export declare namespace EasemobChat {
3186
3513
  fetchGroupSharedFileList(
3187
3514
  this: Connection,
3188
3515
  params: {
3516
+ /** The group ID. */
3189
3517
  groupId: string;
3190
- pageNum?: number;
3191
- pageSize?: number;
3518
+ /** The page number, starting from 1. */
3519
+ pageNum: number;
3520
+ /** The number of members per page. The value cannot exceed 10. */
3521
+ pageSize: number;
3192
3522
  success?: (
3193
3523
  res: AsyncResult<FetchGroupSharedFileListResult>
3194
3524
  ) => void;
@@ -3206,9 +3536,12 @@ export declare namespace EasemobChat {
3206
3536
  getGroupSharedFilelist(
3207
3537
  this: Connection,
3208
3538
  params: {
3539
+ /** The group ID. */
3209
3540
  groupId: string;
3210
- pageNum?: number;
3211
- pageSize?: number;
3541
+ /** The page number, starting from 1. */
3542
+ pageNum: number;
3543
+ /** The number of members per page. The value cannot exceed 10. */
3544
+ pageSize: number;
3212
3545
  success?: (
3213
3546
  res: AsyncResult<FetchGroupSharedFileListResult>
3214
3547
  ) => void;
@@ -3226,8 +3559,11 @@ export declare namespace EasemobChat {
3226
3559
  downloadGroupSharedFile(
3227
3560
  this: Connection,
3228
3561
  params: {
3562
+ /** The group ID. */
3229
3563
  groupId: string;
3564
+ /** The shared file ID. */
3230
3565
  fileId: string;
3566
+ /** The secret key required to download the file. */
3231
3567
  secret?: string;
3232
3568
  onFileDownloadComplete?: (data: Blob) => void;
3233
3569
  onFileDownloadError?: (err: ErrorEvent) => void;
@@ -3266,15 +3602,6 @@ export declare namespace EasemobChat {
3266
3602
  }
3267
3603
  ): Promise<AsyncResult<UserId[]>>;
3268
3604
 
3269
- /** @deprecated */
3270
- getRoster(
3271
- this: Connection,
3272
- params?: {
3273
- success?: (res: RosterData[]) => void;
3274
- error?: (error: ErrorEvent) => void;
3275
- }
3276
- ): Promise<AsyncResult<UserId[]>>;
3277
-
3278
3605
  /**
3279
3606
  * Gets the contact list.
3280
3607
  *
@@ -3290,12 +3617,15 @@ export declare namespace EasemobChat {
3290
3617
  }
3291
3618
  ): Promise<AsyncResult<UserId[]>>;
3292
3619
 
3293
- /** @deprecated */
3620
+ /** @deprecated Use {@link uploadPushToken} instead. */
3294
3621
  uploadToken(
3295
3622
  this: Connection,
3296
3623
  params: {
3624
+ /** The device ID that identifies the device. Custom device IDs are allowed. */
3297
3625
  deviceId: string;
3626
+ /** The push token, which identifies a device during message push. Custom push tokens are allowed.*/
3298
3627
  deviceToken: string;
3628
+ /** The app ID for the push service, which is the senderID for Firebase Cloud Messaging (FCM) and "appId+#+AppKey" for the vivo push service. */
3299
3629
  notifierName: string;
3300
3630
  success?: (res: AsyncResult<UploadTokenResult>) => void;
3301
3631
  error?: (error: ErrorEvent) => void;
@@ -3312,8 +3642,11 @@ export declare namespace EasemobChat {
3312
3642
  uploadPushToken(
3313
3643
  this: Connection,
3314
3644
  params: {
3645
+ /** The device ID that identifies the device. Custom device IDs are allowed. */
3315
3646
  deviceId: string;
3647
+ /** The push token, which identifies a device during message push. Custom push tokens are allowed.*/
3316
3648
  deviceToken: string;
3649
+ /** The app ID for the push service, which is the senderID for Firebase Cloud Messaging (FCM) and "appId+#+AppKey" for the vivo push service. */
3317
3650
  notifierName: string;
3318
3651
  success?: (res: AsyncResult<UploadTokenResult>) => void;
3319
3652
  error?: (error: ErrorEvent) => void;
@@ -3344,10 +3677,10 @@ export declare namespace EasemobChat {
3344
3677
  * Gets the conversation list and the latest message under the conversation.
3345
3678
  *
3346
3679
  * ```typescript
3347
- * connection.getConversationList()
3680
+ * connection.getConversationlist()
3348
3681
  * ```
3349
3682
  */
3350
- getConversationList(
3683
+ getConversationlist(
3351
3684
  this: Connection,
3352
3685
  params?: {
3353
3686
  success?: (res: AsyncResult<SessionInfo[]>) => void;
@@ -3366,8 +3699,17 @@ export declare namespace EasemobChat {
3366
3699
  deleteSession(
3367
3700
  this: Connection,
3368
3701
  params: {
3702
+ /** The conversation ID: the peer's user ID or group ID. */
3369
3703
  channel: string;
3704
+ /** The conversation type.
3705
+ * - `singleChat`: one-to-one chat;
3706
+ * - `groupChat`: group chat.
3707
+ */
3370
3708
  chatType: 'singleChat' | 'groupChat';
3709
+ /** Whether to delete server roaming messages during conversation deletion.
3710
+ * - `true`: Yes;
3711
+ * - `false`: No.
3712
+ */
3371
3713
  deleteRoam: boolean;
3372
3714
  success?: (res: AsyncResult<DeleteSessionResult>) => void;
3373
3715
  error?: (error: ErrorEvent) => void;
@@ -3384,8 +3726,17 @@ export declare namespace EasemobChat {
3384
3726
  deleteConversation(
3385
3727
  this: Connection,
3386
3728
  params: {
3729
+ /** The conversation ID: the peer's user ID or group ID. */
3387
3730
  channel: string;
3731
+ /** The conversation type.
3732
+ * - `singleChat`: one-to-one chat;
3733
+ * - `groupChat`: group chat.
3734
+ */
3388
3735
  chatType: 'singleChat' | 'groupChat';
3736
+ /** Whether to delete server roaming messages during conversation deletion.
3737
+ * - `true`: Yes;
3738
+ * - `false`: No.
3739
+ */
3389
3740
  deleteRoam: boolean;
3390
3741
  success?: (res: AsyncResult<DeleteSessionResult>) => void;
3391
3742
  error?: (error: ErrorEvent) => void;
@@ -3432,7 +3783,9 @@ export declare namespace EasemobChat {
3432
3783
  */
3433
3784
  fetchUserInfoById(
3434
3785
  this: Connection,
3786
+ /** The array of IDs of users or user ID to query. */
3435
3787
  userId: UserId | UserId[],
3788
+ /** User properties to query. If the parameter is blank, query all. */
3436
3789
  properties?: ConfigurableKey[] | ConfigurableKey
3437
3790
  ): Promise<
3438
3791
  AsyncResult<{
@@ -3449,6 +3802,7 @@ export declare namespace EasemobChat {
3449
3802
  */
3450
3803
  updateCurrentUserNick(
3451
3804
  this: Connection,
3805
+ /** The nickname shown when a message push notification is received. */
3452
3806
  nick: string
3453
3807
  ): Promise<AsyncResult<BaseUserInfo[]>>;
3454
3808
 
@@ -3463,10 +3817,21 @@ export declare namespace EasemobChat {
3463
3817
  fetchHistoryMessages(
3464
3818
  this: Connection,
3465
3819
  options: {
3820
+ /** The user ID of the other party or the group ID. */
3466
3821
  queue: string;
3467
- start?: number | null;
3822
+ /** The starting message ID for this query. The default value is -1, which means to start retrieving from the latest message. */
3823
+ start?: number | string | null;
3824
+ /** The number of messages to retrieve each time. The default value is 20. */
3468
3825
  count?: number;
3826
+ /** Whether it is a group chat.
3827
+ * - `true`: Yes.
3828
+ * - (Default)`false`: No.
3829
+ */
3469
3830
  isGroup?: boolean;
3831
+ /** Whether to format messages.
3832
+ * - `true`: Yes.
3833
+ * - (Default)`false`: No.
3834
+ */
3470
3835
  format?: boolean;
3471
3836
  success?: (res: MessageBody[]) => void;
3472
3837
  fail?: (error: ErrorEvent) => void;
@@ -3525,7 +3890,7 @@ export declare namespace EasemobChat {
3525
3890
  */
3526
3891
  deleteContact(this: Connection, to: string): void;
3527
3892
 
3528
- /** @deprecated */
3893
+ /** @deprecated Use {@link acceptContactInvite} instead. */
3529
3894
  acceptInvitation(this: Connection, to: string): void;
3530
3895
 
3531
3896
  /**
@@ -3537,7 +3902,7 @@ export declare namespace EasemobChat {
3537
3902
  */
3538
3903
  acceptContactInvite(this: Connection, to: string): void;
3539
3904
 
3540
- /** @deprecated */
3905
+ /** @deprecated Use {@link declineContactInvite} instead. */
3541
3906
  declineInvitation(this: Connection, to: string): void;
3542
3907
 
3543
3908
  /**
@@ -3549,25 +3914,22 @@ export declare namespace EasemobChat {
3549
3914
  */
3550
3915
  declineContactInvite(this: Connection, to: string): void;
3551
3916
 
3552
- /** @deprecated */
3917
+ /** @deprecated Use {@link addUsersToBlocklist} instead. */
3553
3918
  addToBlackList(
3554
3919
  this: Connection,
3555
3920
  options: {
3921
+ /** The user ID. You can type a specific user ID to add a single user to the blocklist or type an array of user IDs, like ["user1","user2"], to add multiple users. */
3556
3922
  name: UserId | UserId[];
3557
3923
  }
3558
3924
  ): void;
3559
3925
 
3560
3926
  /**
3561
- * @deprecated
3562
- * Add contacts to your blacklist.
3563
- *
3564
- * ```typescript
3565
- * connection.addUsersToBlacklist({name: 'user1'})
3566
- * ```
3927
+ * @deprecated Use {@link addUsersToBlocklist} instead.
3567
3928
  */
3568
3929
  addUsersToBlacklist(
3569
3930
  this: Connection,
3570
3931
  options: {
3932
+ /** The user ID. You can type a specific user ID to add a single user to the blocklist or type an array of user IDs, like ["user1","user2"], to add multiple users. */
3571
3933
  name: UserId | UserId[];
3572
3934
  }
3573
3935
  ): void;
@@ -3582,29 +3944,27 @@ export declare namespace EasemobChat {
3582
3944
  addUsersToBlocklist(
3583
3945
  this: Connection,
3584
3946
  options: {
3947
+ /** The user ID. You can type a specific user ID to add a single user to the blocklist or type an array of user IDs, like ["user1","user2"], to add multiple users. */
3585
3948
  name: UserId | UserId[];
3586
3949
  }
3587
3950
  ): void;
3588
3951
 
3589
- /** @deprecated */
3952
+ /** @deprecated Use {@link removeUserFromBlackList} instead. */
3590
3953
  removeFromBlackList(
3591
3954
  this: Connection,
3592
3955
  options: {
3956
+ /** The user ID. You can type a specific user ID to remove a single user from the blocklist or type an array of user IDs, like ["user1","user2"], to remove multiple users. */
3593
3957
  name: UserId | UserId[];
3594
3958
  }
3595
3959
  ): void;
3596
3960
 
3597
3961
  /**
3598
- * @deprecated
3599
- * Removes friends from your blacklist
3600
- *
3601
- * ```typescript
3602
- * connection.removeUserFromBlackList({name: 'user1'})
3603
- * ```
3962
+ * @deprecated Use {@link removeUserFromBlackList} instead.
3604
3963
  */
3605
3964
  removeUserFromBlackList(
3606
3965
  this: Connection,
3607
3966
  options: {
3967
+ /** The user ID. You can type a specific user ID to remove a single user from the blocklist or type an array of user IDs, like ["user1","user2"], to remove multiple users. */
3608
3968
  name: UserId | UserId[];
3609
3969
  }
3610
3970
  ): void;
@@ -3619,22 +3979,11 @@ export declare namespace EasemobChat {
3619
3979
  removeUserFromBlocklist(
3620
3980
  this: Connection,
3621
3981
  options: {
3982
+ /** The user ID. You can type a specific user ID to remove a single user from the blocklist or type an array of user IDs, like ["user1","user2"], to remove multiple users. */
3622
3983
  name: UserId | UserId[];
3623
3984
  }
3624
3985
  ): void;
3625
3986
 
3626
- /** @deprecated*/
3627
- subscribe(
3628
- this: Connection,
3629
- options: { to: UserId; message?: string }
3630
- ): void;
3631
- /** @deprecated*/
3632
- subscribed(this: Connection, options: { to: UserId }): void;
3633
- /** @deprecated*/
3634
- unsubscribed(this: Connection, options: { to: UserId }): void;
3635
- /** @deprecated*/
3636
- removeRoster(this: Connection, options: { to: UserId }): void;
3637
-
3638
3987
  /**
3639
3988
  * Recalls a message.
3640
3989
  *
@@ -3645,21 +3994,52 @@ export declare namespace EasemobChat {
3645
3994
  recallMessage(
3646
3995
  this: Connection,
3647
3996
  option: {
3997
+ /** The ID of the message to be recalled. */
3648
3998
  mid: string;
3999
+ /** The recipient of the message. */
3649
4000
  to: UserId;
3650
- type?: 'chat' | 'groupchat' | 'chatroom'; // v3.0
3651
- chatType?: 'singleChat' | 'groupChat' | 'chatRoom'; // v4.0
4001
+ /** The chat type for SDK old:
4002
+ * - chat: one-to-one chat;
4003
+ * - groupchat: group chat;
4004
+ * - chatroom: chat room.
4005
+ */
4006
+ type?: 'chat' | 'groupchat' | 'chatroom';
4007
+ /** The chat type for SDK new:
4008
+ * - `singleChat`: one-to-one chat;
4009
+ * - `groupchat`: group chat;
4010
+ * - `chatroom`: chat room.
4011
+ */
4012
+ chatType?: 'singleChat' | 'groupChat' | 'chatRoom';
4013
+ /** Is it a message in the thread. */
3652
4014
  isChatThread?: boolean;
3653
4015
  success?: (res: number) => void;
3654
4016
  fail?: (error: ErrorEvent) => void;
3655
4017
  }
3656
4018
  ): Promise<SendMsgResult>;
3657
4019
 
3658
- // listen @since 3.0
4020
+ // listen @deprecated
3659
4021
  listen(this: Connection, parameters: ListenParameters): void;
3660
4022
 
3661
- // eventHandler @since 4.0
4023
+ /**
4024
+ * Adds listening events.
4025
+ *
4026
+ * ```typescript
4027
+ * connection.addEventHandler('customId', {
4028
+ * onTextMessage: (message) => {
4029
+ * console.log(message)
4030
+ * }
4031
+ * })
4032
+ * ```
4033
+ */
3662
4034
  addEventHandler(id: string, handler: EventHandlerType): void;
4035
+
4036
+ /**
4037
+ * Removes listening events.
4038
+ *
4039
+ * ```typescript
4040
+ * connection.removeEventHandler('customId')
4041
+ * ```
4042
+ */
3663
4043
  removeEventHandler(id: string): void;
3664
4044
 
3665
4045
  /**
@@ -3983,8 +4363,11 @@ export declare namespace EasemobChat {
3983
4363
  reportMessage(
3984
4364
  this: Connection,
3985
4365
  params: {
4366
+ /** The type of report. */
3986
4367
  reportType: string;
4368
+ /** The reason for reporting. */
3987
4369
  reportReason: string;
4370
+ /** ID of the message to be reported. */
3988
4371
  messageId: string;
3989
4372
  }
3990
4373
  ): Promise<void>;
@@ -4181,7 +4564,7 @@ export declare namespace EasemobChat {
4181
4564
  ): Promise<void>;
4182
4565
 
4183
4566
  /**
4184
- * @deprecated
4567
+ * @deprecated Use { getReactionlist } instead.
4185
4568
  * Gets the reaction list for the message.
4186
4569
  *
4187
4570
  * ```typescript
@@ -4245,18 +4628,132 @@ export declare namespace EasemobChat {
4245
4628
  pageSize?: number;
4246
4629
  }
4247
4630
  ): Promise<AsyncResult<GetReactionDetailResult>>;
4631
+
4632
+ /**
4633
+ * Get the chat room all properties.
4634
+ *
4635
+ * ```typescript
4636
+ * connection.getChatRoomAttributes({chatRoomId: 'roomId')
4637
+ * ```
4638
+ */
4639
+ getChatRoomAttributes(
4640
+ this: Connection,
4641
+ params: {
4642
+ /** The chat room ID. */
4643
+ chatRoomId: string;
4644
+ /** The custom attribute to get. If you pass the attribute key, the SDK returns the attribute value. If you set it as null, the SDK returns all the attributes value. */
4645
+ attributeKeys?: Array<string>;
4646
+ }
4647
+ ): Promise<AsyncResult<GetChatroomAttributesResult>>;
4648
+
4649
+ /**
4650
+ * Set chat room properties in batches.
4651
+ *
4652
+ * ```typescript
4653
+ * connection.setChatRoomAttributes({chatRoomId: 'roomId', attributes: {"key1": "value1","key2":"value2"}, autoDelete: true, isForced: false})
4654
+ * ```
4655
+ */
4656
+ setChatRoomAttributes(
4657
+ this: Connection,
4658
+ params: {
4659
+ /** The chat room ID. */
4660
+ chatRoomId: string;
4661
+ /** The attributes. */
4662
+ attributes: {
4663
+ [key: string]: string;
4664
+ };
4665
+ /** Whether to delete chat room attributes set by the member when he or she exits the chat room.
4666
+ * (Default)`true`: Yes.
4667
+ * `false`: No. */
4668
+ autoDelete?: boolean;
4669
+ /** Whether to allow a member to overwrite the chat room attribute set by another member.
4670
+ * `true`: Yes.
4671
+ * (Default)`false`: No. */
4672
+ isForced?: boolean;
4673
+ }
4674
+ ): Promise<AsyncResult<ChatroomAttributes>>;
4675
+
4676
+ /**
4677
+ * Set chat room properties individually.
4678
+ *
4679
+ * ```typescript
4680
+ * connection.setChatroomAttribute({chatRoomId: 'roomId', attributeKey:"key1", attributeValue:"value1", autoDelete: true, isForced: false})
4681
+ * ```
4682
+ */
4683
+ setChatRoomAttribute(
4684
+ this: Connection,
4685
+ params: {
4686
+ /** The chat room ID. */
4687
+ chatRoomId: string;
4688
+ /** The custom attribute key. */
4689
+ attributeKey: string;
4690
+ /** The custom attribute value. */
4691
+ attributeValue: string;
4692
+ /**
4693
+ * Whether to delete chat room attributes set by the member when he or she exits the chat room.
4694
+ * - (Default)`true`: Yes;
4695
+ * - `false`: No.
4696
+ */
4697
+ autoDelete?: boolean;
4698
+ /**
4699
+ * Whether to allow a member to overwrite the chat room attribute set by another member.
4700
+ * - `true`: Yes;
4701
+ * - (Default)`false`: No.
4702
+ */
4703
+ isForced?: boolean;
4704
+ }
4705
+ ): Promise<void>;
4706
+
4707
+ /**
4708
+ * Batch remove chat room attributes.
4709
+ *
4710
+ * ```typescript
4711
+ * connection.removeChatRoomAttributes({chatRoomId: 'roomId', attributeKeys: ['key1','key2',...], isForced: false })
4712
+ * ```
4713
+ */
4714
+ removeChatRoomAttributes(
4715
+ this: Connection,
4716
+ params: {
4717
+ /** The chat room ID. */
4718
+ chatRoomId: string;
4719
+ /** The key of the chat room attribute to delete. */
4720
+ attributeKey: string;
4721
+ /**
4722
+ * Whether to allow a member to delete any chat room attribute set by any member.
4723
+ * - `true`: Yes;
4724
+ * - (Default)`false`: No.
4725
+ */
4726
+ isForced?: boolean;
4727
+ }
4728
+ ): Promise<AsyncResult<ChatroomAttributes>>;
4729
+
4730
+ /**
4731
+ * Remove chat room attributes individually.
4732
+ *
4733
+ * ```typescript
4734
+ * connection.removeChatRoomAttribute({chatRoomId: 'roomId', attributeKey: 'attributeValue', isForced: false })
4735
+ * ```
4736
+ */
4737
+ removeChatRoomAttribute(
4738
+ this: Connection,
4739
+ params: {
4740
+ /** The chat room ID. */
4741
+ chatRoomId: string;
4742
+ /** Delete attribute key. */
4743
+ attributeKey: string;
4744
+ /** remove chatRoom attributes (Allow to delete all contents of the chat room). */
4745
+ isForced?: boolean;
4746
+ }
4747
+ ): Promise<void>;
4248
4748
  }
4249
4749
 
4250
- /**
4251
- *
4252
- * @module eventHandler
4253
- */
4750
+ // ----- for EventHandler ------
4751
+
4254
4752
  type DispatchParameters =
4255
4753
  | MessageBody
4256
4754
  | OnPresenceMsg
4257
4755
  | RosterData
4258
4756
  | ErrorEvent
4259
- | MuteMsgBody
4260
4757
  | ReceivedMsgBody
4261
4758
  | RecallMsgBody
4262
4759
  | ChannelMsgBody;
@@ -4278,20 +4775,35 @@ export declare namespace EasemobChat {
4278
4775
 
4279
4776
  interface EventData {
4280
4777
  /** The type of operation. */
4281
- /** 操作类型。 */
4282
4778
  operation: string;
4283
4779
  /** The ID of a group or chatroom. */
4284
- /** 群组或者聊天室 ID。 */
4285
4780
  id: string;
4286
4781
  /** Message sender. */
4287
- /** 消息发送者。 */
4288
4782
  from: string;
4289
4783
  /** Message receiver. */
4290
- /** 消息接收者。 */
4291
- to: string;
4292
- /** Additional data for the operation event. */
4293
- /** 操作事件的其他数据。 */
4294
4784
  data?: any;
4785
+ /** ChatRoom Attributes. */
4786
+ /** 聊天室属性。 */
4787
+ attributes?: {
4788
+ [key: string]: string;
4789
+ };
4790
+ }
4791
+
4792
+ interface GetChatroomAttributesResult {
4793
+ /** ChatRoom ID.*/
4794
+ chatRoomId: string;
4795
+ /** The custom attribute to get. If you pass the attribute key, the SDK returns the attribute value. If you set it as null, the SDK returns all the attributes value. */
4796
+ attributeKeys: Array<string>;
4797
+ }
4798
+ interface ChatroomAttributes {
4799
+ /** Status code. */
4800
+ status: 'success' | 'fail';
4801
+ /** The keys of failure. */
4802
+ errorKeys: {
4803
+ [key: string]: string;
4804
+ };
4805
+ /** The keys of success. */
4806
+ successKeys: Array<string>;
4295
4807
  }
4296
4808
 
4297
4809
  type Event =
@@ -4309,12 +4821,10 @@ export declare namespace EasemobChat {
4309
4821
  | 'onDeliveredMessage'
4310
4822
  | 'onReadMessage'
4311
4823
  | 'onRecallMessage'
4312
- | 'onMutedMessage'
4313
4824
  | 'onChannelMessage'
4314
4825
  | 'onError'
4315
4826
  | 'onOffline'
4316
4827
  | 'onOnline'
4317
- | 'onRoster'
4318
4828
  | 'onStatisticMessage'
4319
4829
  | 'onContactAgreed'
4320
4830
  | 'onContactRefuse'
@@ -4336,44 +4846,79 @@ export declare namespace EasemobChat {
4336
4846
  | 'onChatroomEvent';
4337
4847
 
4338
4848
  interface EventHandlerType {
4849
+ /** @deprecated Use { onConnected } instead. */
4339
4850
  onOpened?: (msg: any) => void;
4851
+ /** @deprecated */
4340
4852
  onPresence?: (msg: OnPresenceMsg) => void;
4853
+ /** The callback to receive a text message. */
4341
4854
  onTextMessage?: (msg: TextMsgBody) => void;
4855
+ /** The callback to receive a image message. */
4342
4856
  onImageMessage?: (msg: ImgMsgBody) => void;
4857
+ /** The callback to receive a audio message. */
4343
4858
  onAudioMessage?: (msg: AudioMsgBody) => void;
4859
+ /** The callback to receive a video message. */
4344
4860
  onVideoMessage?: (msg: VideoMsgBody) => void;
4861
+ /** The callback to receive a file message. */
4345
4862
  onFileMessage?: (msg: FileMsgBody) => void;
4863
+ /** The callback to receive a location message. */
4346
4864
  onLocationMessage?: (msg: LocationMsgBody) => void;
4865
+ /** The callback to receive a command message. */
4347
4866
  onCmdMessage?: (msg: CmdMsgBody) => void;
4867
+ /** The callback to receive a custom message. */
4348
4868
  onCustomMessage?: (msg: CustomMsgBody) => void;
4869
+ /** The callback to receive a received ack. */
4349
4870
  onReceivedMessage?: (msg: ReceivedMsgBody) => void;
4871
+ /** The callback to receive a delivery ack. */
4350
4872
  onDeliveredMessage?: (msg: DeliveryMsgBody) => void;
4873
+ /** The callback to receive a read ack. */
4351
4874
  onReadMessage?: (msg: ReadMsgBody) => void;
4875
+ /** The callback to receive a recall message. */
4352
4876
  onRecallMessage?: (msg: RecallMsgBody) => void;
4353
- onMutedMessage?: (msg: MuteMsgBody) => void;
4877
+ /** The callback to receive a session read ack. */
4354
4878
  onChannelMessage?: (msg: ChannelMsgBody) => void;
4879
+ /** The callback to receive error. */
4355
4880
  onError?: (error: ErrorEvent) => void;
4356
- onOffline?: (msg: any) => void;
4357
- onOnline?: (msg: any) => void;
4358
- onRoster?: (rosters: RosterData[]) => void;
4881
+ /** The callback for network disconnection. */
4882
+ onOffline?: () => void;
4883
+ /** The callback for network connection. */
4884
+ onOnline?: () => void;
4885
+ /** The callback to receive a statistic message. */
4359
4886
  onStatisticMessage?: (msg: any) => void;
4887
+ /** The callback to accept contact request. */
4360
4888
  onContactAgreed?: (msg: ContactMsgBody) => void;
4889
+ /** The callback to refuse contact request. */
4361
4890
  onContactRefuse?: (msg: ContactMsgBody) => void;
4891
+ /** The callback to deleted a contact. */
4362
4892
  onContactDeleted?: (msg: ContactMsgBody) => void;
4893
+ /** The callback to added a contact. */
4363
4894
  onContactAdded?: (msg: ContactMsgBody) => void;
4364
- onTokenWillExpire?: (msg: any) => void;
4365
- onTokenExpired?: (msg: any) => void;
4366
- onContactInvited?: (msg: any) => void;
4895
+ /** The callback whose token is about to expire. */
4896
+ onTokenWillExpire?: () => void;
4897
+ /** The callback whose token has expired. */
4898
+ onTokenExpired?: () => void;
4899
+ /** The callback to contact request was received. */
4900
+ onContactInvited?: (msg: ContactMsgBody) => void;
4901
+ /** The callback for successful connection. */
4367
4902
  onConnected?: () => void;
4903
+ /** The callback for disconnected. */
4368
4904
  onDisconnected?: () => void;
4905
+ /** @deprecated Use { onGroupEvent } instead. */
4369
4906
  onGroupChange?: (msg: any) => void;
4907
+ /** @deprecated Use { onChatroomEvent } instead. */
4370
4908
  onChatroomChange?: (msg: any) => void;
4909
+ /** @deprecated */
4371
4910
  onContactChange?: (msg: any) => void;
4911
+ /** Occurs when the presence state of a subscribed user changes. */
4372
4912
  onPresenceStatusChange?: (msg: PresenceType[]) => void;
4913
+ /** The callback to receive a reaction message. */
4373
4914
  onChatThreadChange?: (msg: ThreadChangeInfo) => void;
4915
+ /** The callback to receive a multi device event. */
4374
4916
  onMultiDeviceEvent?: (msg: ThreadMultiDeviceInfo) => void;
4917
+ /** The callback to receive a reaction message. */
4375
4918
  onReactionChange?: (msg: ReactionMessage) => void;
4919
+ /** The callback to receive a group event. */
4376
4920
  onGroupEvent?: (eventData: EventData) => void;
4921
+ /** The callback to receive a chatroom event. */
4377
4922
  onChatroomEvent?: (eventData: EventData) => void;
4378
4923
  }
4379
4924
 
@@ -4381,6 +4926,10 @@ export declare namespace EasemobChat {
4381
4926
  [key: string]: EventHandlerType;
4382
4927
  }
4383
4928
 
4929
+ /**
4930
+ * This is the module of the SDK that is responsible for registering listening events.
4931
+ * @module eventHandler
4932
+ */
4384
4933
  class EventHandler {
4385
4934
  handlerData: HandlerData;
4386
4935
  constructor(
@@ -4388,10 +4937,12 @@ export declare namespace EasemobChat {
4388
4937
  eventHandlerId: string,
4389
4938
  eventHandler: EventHandlerType
4390
4939
  );
4940
+ /** Adds listening events. */
4391
4941
  addEventHandler(
4392
4942
  eventHandlerId: string,
4393
4943
  eventHandler: EventHandlerType
4394
4944
  ): void;
4945
+ /** Removes listening events. */
4395
4946
  removeEventHandler(eventHandlerId: string): void;
4396
4947
  dispatch(
4397
4948
  this: EventHandler,
@@ -4419,15 +4970,11 @@ export declare namespace EasemobChat {
4419
4970
  onDeliveredMessage?: (msg: DeliveryMsgBody) => void;
4420
4971
  onReadMessage?: (msg: ReadMsgBody) => void;
4421
4972
  onRecallMessage?: (msg: RecallMsgBody) => void;
4422
- onMutedMessage?: (msg: MuteMsgBody) => void;
4423
4973
  onChannelMessage?: (msg: ChannelMsgBody) => void;
4424
4974
  onError?: (error: ErrorEvent) => void;
4425
4975
  onOffline?: () => void;
4426
4976
  onOnline?: () => void;
4427
- onRoster?: (rosters: RosterData[]) => void;
4428
4977
  onStatisticMessage?: () => void;
4429
- onCreateGroup?: () => void;
4430
- onBlacklistUpdate?: () => void;
4431
4978
  onContactAgreed?: (msg: ContactMsgBody) => void;
4432
4979
  onContactRefuse?: (msg: ContactMsgBody) => void;
4433
4980
  onContactDeleted?: (msg: ContactMsgBody) => void;
@@ -4438,25 +4985,34 @@ export declare namespace EasemobChat {
4438
4985
  onPresenceStatusChange?: (msg: PresenceType[]) => void;
4439
4986
  }
4440
4987
 
4441
- /**
4442
- * @module Error
4443
- */
4988
+ // ----- for Error -----
4989
+
4444
4990
  interface ErrorParameters {
4991
+ /** Error code. */
4445
4992
  type: Code;
4993
+ /** Error message. */
4446
4994
  message: string;
4995
+ /** Other data. */
4447
4996
  data?: any;
4448
4997
  }
4998
+
4999
+ /**
5000
+ * Error class
5001
+ * @module Error
5002
+ */
4449
5003
  class ErrorEvent {
5004
+ /** Error code. */
4450
5005
  type: Code;
5006
+ /** Error message. */
4451
5007
  message: string;
5008
+ /** Other data. */
4452
5009
  data?: any;
4453
5010
  constructor(parameters: ErrorParameters);
4454
5011
  static create(parameters: ErrorParameters): ErrorEvent;
4455
5012
  }
4456
5013
 
4457
- /**
4458
- * @module Logger
4459
- */
5014
+ // ---- for Logger ---
5015
+
4460
5016
  type DefaultLevel =
4461
5017
  | 'TRACE'
4462
5018
  | 'DEBUG'
@@ -4480,6 +5036,11 @@ export declare namespace EasemobChat {
4480
5036
  color: string;
4481
5037
  background: string;
4482
5038
  }
5039
+
5040
+ /**
5041
+ * SDK log function
5042
+ * @module Logger
5043
+ */
4483
5044
  class Logger {
4484
5045
  name: string;
4485
5046
  currentLevel: LevelNum;
@@ -4522,9 +5083,8 @@ export declare namespace EasemobChat {
4522
5083
  download(): void;
4523
5084
  }
4524
5085
 
4525
- /**
4526
- * @moudle message
4527
- */
5086
+ // --- for Message ---
5087
+
4528
5088
  type MessageType =
4529
5089
  | 'read'
4530
5090
  | 'delivery'
@@ -4540,9 +5100,13 @@ export declare namespace EasemobChat {
4540
5100
 
4541
5101
  type ChatType = 'singleChat' | 'groupChat' | 'chatRoom';
4542
5102
  interface FileObj {
5103
+ /** The file URL. */
4543
5104
  url: string;
5105
+ /** The file name. */
4544
5106
  filename: string;
5107
+ /** The file type. */
4545
5108
  filetype: string;
5109
+ /** The File object. */
4546
5110
  data: File;
4547
5111
  }
4548
5112
 
@@ -4562,6 +5126,18 @@ export declare namespace EasemobChat {
4562
5126
  isAddedBySelf?: boolean;
4563
5127
  }
4564
5128
 
5129
+ /** Message online state type. */
5130
+ enum ONLINESTATETYPE {
5131
+ /** Offline message. */
5132
+ OFFLINE = 0,
5133
+ /** Online message. */
5134
+ ONLINE = 1,
5135
+ /** Unknown state. */
5136
+ UNKNOWN = 2,
5137
+ /** Message online status is not enabled. */
5138
+ NONE = 3,
5139
+ }
5140
+
4565
5141
  interface PresenceMsg {
4566
5142
  type: OnPresenceMsgType;
4567
5143
  to: string;
@@ -4577,565 +5153,1046 @@ export declare namespace EasemobChat {
4577
5153
  }
4578
5154
 
4579
5155
  interface ReadMsgSetParameters {
5156
+ /** The message ID. */
4580
5157
  id: string;
5158
+ /** The recipient. */
4581
5159
  to: string;
5160
+ /** The sender, which can only be the current user and can not be changed. */
4582
5161
  from?: string;
5162
+ /** The session type. */
4583
5163
  chatType: 'singleChat' | 'groupChat';
4584
5164
  }
4585
5165
  interface ReadMsgBody extends ReadMsgSetParameters {
5166
+ /** The message type. */
4586
5167
  type: 'read';
5168
+ /** Session type. */
5169
+ chatType: 'singleChat' | 'groupChat';
5170
+ /** The ID of the read message */
4587
5171
  ackId?: string;
5172
+ /** The ID of the read message This parameter has the same value as ackId.*/
4588
5173
  mid?: string;
5174
+ /** The number of group members that have read the messages. */
4589
5175
  groupReadCount?: { [key: string]: number };
5176
+ /** The message content. */
4590
5177
  ackContent?: string;
4591
- chatType: 'singleChat' | 'groupChat';
5178
+ /** Whether the message is a thread message. */
4592
5179
  isChatThread?: boolean;
5180
+ /** Message online state type. */
5181
+ onlineState?: ONLINESTATETYPE;
4593
5182
  }
4594
5183
  interface ReadParameters {
5184
+ /** The message type. */
4595
5185
  type: 'read';
5186
+ /** The recipient. */
4596
5187
  id: string;
4597
5188
  }
4598
5189
 
4599
5190
  interface CreateReadMsgParameters {
5191
+ /** The recipient. */
4600
5192
  to: string;
5193
+ /** The sender, which can only be the current user and can not be changed. */
4601
5194
  from?: string;
5195
+ /** The message type. */
4602
5196
  type: 'read';
5197
+ /** The session type. */
5198
+ chatType: 'singleChat' | 'groupChat';
5199
+ /** The ID of the read message. */
4603
5200
  id: string;
5201
+ /** The message content. */
4604
5202
  ackContent?: string;
4605
- chatType: 'singleChat' | 'groupChat';
5203
+ /** Whether the message is a thread message. */
4606
5204
  isChatThread?: boolean;
4607
5205
  }
4608
5206
 
4609
5207
  interface DeliveryParameters {
5208
+ /** The ID of the delivery receipt. */
4610
5209
  id: string;
5210
+ /** The message type. */
4611
5211
  type: 'delivery';
4612
5212
  }
4613
5213
  interface DeliveryMsgSetParameters {
5214
+ /** The ID of the delivered message. This parameter has the same value as mid. */
4614
5215
  ackId: string;
5216
+ /** The recipient. */
4615
5217
  to: string;
5218
+ /** The sender, which can only be the current user and can not be changed. */
4616
5219
  from?: string;
4617
5220
  }
4618
5221
  interface DeliveryMsgBody {
5222
+ /** The ID of the delivery receipt. */
4619
5223
  id: string;
5224
+ /** The ID of the delivered message. */
4620
5225
  mid?: string;
5226
+ /** The ID of the delivered message. This parameter has the same value as mid. */
4621
5227
  ackId?: string;
5228
+ /** The message type. */
4622
5229
  type: 'delivery';
5230
+ /** The recipient. */
4623
5231
  to: string;
5232
+ /** The sender, which can only be the current user and can not be changed. */
4624
5233
  from?: string;
5234
+ /** Whether the message is a thread message. */
4625
5235
  isChatThread?: boolean;
5236
+ /** Message online state type. */
5237
+ onlineState?: ONLINESTATETYPE;
4626
5238
  }
4627
5239
 
4628
5240
  interface CreateDeliveryMsgParameters {
5241
+ /** The ID of the delivered message. */
4629
5242
  ackId: string;
5243
+ /** The message type. */
4630
5244
  type: 'delivery';
5245
+ /** The recipient. */
4631
5246
  to: string;
5247
+ /** The sender, which can only be the current user and can not be changed.*/
4632
5248
  from?: string;
5249
+ /** Whether the message is a thread message. */
4633
5250
  isChatThread?: boolean;
4634
5251
  }
4635
5252
 
4636
5253
  interface ChannelMsgSetParameters {
5254
+ /** The session type. */
4637
5255
  chatType: ChatType;
5256
+ /** The receipt. */
4638
5257
  to: string;
5258
+ /** The sender, which can only be the current user and can not be changed. */
4639
5259
  from?: string;
4640
5260
  }
4641
5261
 
4642
5262
  interface ChannelMsgBody extends ChannelMsgSetParameters {
5263
+ /** The message ID. */
4643
5264
  id: string;
5265
+ /** Whether it's group chat. */
4644
5266
  group?: string;
5267
+ /** The message type. */
4645
5268
  type: 'channel';
5269
+ /** Time. */
4646
5270
  time: number;
5271
+ /** Whether the message is a thread message. */
4647
5272
  isChatThread?: boolean;
5273
+ /** Message online state type. */
5274
+ onlineState?: ONLINESTATETYPE;
4648
5275
  }
5276
+
4649
5277
  interface ChannelParameters {
5278
+ /** The message type. */
4650
5279
  type: 'channel';
5280
+ /** The message ID. */
4651
5281
  id: string;
4652
5282
  }
4653
5283
 
4654
5284
  interface CreateChannelMsgParameters {
5285
+ /** The message type. */
4655
5286
  type: 'channel';
5287
+ /** The session type. */
4656
5288
  chatType: ChatType;
5289
+ /** The receipt. */
4657
5290
  to: string;
5291
+ /** The sender, which can only be the current user and can not be changed. */
4658
5292
  from?: string;
5293
+ /** Whether the message is a thread message. */
4659
5294
  isChatThread?: boolean;
4660
5295
  }
4661
5296
 
4662
5297
  interface TextParameters {
5298
+ /** The message type. */
4663
5299
  type: 'txt';
5300
+ /** The message ID. */
4664
5301
  id: string;
4665
5302
  }
5303
+
4666
5304
  interface TextMsgSetParameters {
5305
+ /** The session type. */
4667
5306
  chatType: ChatType;
5307
+ /** The recipient. */
4668
5308
  to: string;
5309
+ /** The message content. */
4669
5310
  msg: string;
5311
+ /** The sender, which can only be the current user and can not be changed.*/
4670
5312
  from?: string;
5313
+ /** @deprecated Whether the session type is chat room. */
4671
5314
  roomType?: boolean;
5315
+ /** The callback for message sending success. */
4672
5316
  success?: (data: SendMsgResult) => void;
5317
+ /** The callback for a message sending failure. */
4673
5318
  fail?: () => void;
5319
+ /** Message extension. */
4674
5320
  ext?: { [key: string]: any };
5321
+ /** Whether the message is a thread message. */
5322
+ isChatThread?: boolean;
4675
5323
  }
4676
5324
 
4677
5325
  interface TextMsgBody {
5326
+ /** The message ID. */
4678
5327
  id: string;
5328
+ /** The session type. */
4679
5329
  chatType: ChatType;
5330
+ /** The message type. */
4680
5331
  type: 'txt';
5332
+ /** The recipient. */
4681
5333
  to: string;
5334
+ /** The message content. */
4682
5335
  msg: string;
5336
+ /** The sender, which can only be the current user and can not be changed.*/
4683
5337
  from?: string;
5338
+ /** @deprecated Whether the session type is chat room. */
4684
5339
  roomType?: boolean;
5340
+ /** @deprecated Whether the session type is group. */
4685
5341
  group?: string;
5342
+ /** The callback for message sending success. */
4686
5343
  success?: (data: SendMsgResult) => void;
5344
+ /** The callback for a message sending failure. */
4687
5345
  fail?: () => void;
5346
+ /** Message extension. */
4688
5347
  ext?: { [key: string]: any };
5348
+ /** Whether read receipts are required during a group session. */
4689
5349
  msgConfig?: { allowGroupAck?: boolean; languages?: string[] };
5350
+ /** Message translation */
4690
5351
  translations?: TranslationResult;
5352
+ /** Time. */
4691
5353
  time: number;
5354
+ /** Whether the message is a thread message. */
4692
5355
  isChatThread?: boolean;
5356
+ /** The reaction to be added to the message. The length is limited to 128 characters. */
4693
5357
  reactions?: Reaction;
5358
+ /** The message thread. */
5359
+ chatThread?: ChatThread;
5360
+ /** The message thread overview. */
5361
+ chatThreadOverview?: ChatThreadOverview;
5362
+ /** Message online state type. */
5363
+ onlineState?: ONLINESTATETYPE;
4694
5364
  }
4695
5365
 
4696
5366
  interface CreateTextMsgParameters {
5367
+ /** The session type. */
4697
5368
  chatType: ChatType;
5369
+ /** The message type. */
4698
5370
  type: 'txt';
5371
+ /** The recipient. */
4699
5372
  to: string;
5373
+ /** The message content. */
4700
5374
  msg: string;
5375
+ /** The sender, which can only be the current user and can not be changed.*/
4701
5376
  from?: string;
5377
+ /** Message extension. */
4702
5378
  ext?: { [key: string]: any };
5379
+ /** Whether read receipts are required during a group session. */
4703
5380
  msgConfig?: { allowGroupAck?: boolean; languages?: string[] };
5381
+ /** Whether the message is a thread message. */
4704
5382
  isChatThread?: boolean;
4705
5383
  }
4706
5384
 
4707
5385
  interface CmdParameters {
5386
+ /** The message type. */
4708
5387
  type: 'cmd';
5388
+ /** The message ID. */
4709
5389
  id: string;
4710
5390
  }
4711
5391
  interface CmdMsgSetParameters {
5392
+ /** The session type. */
4712
5393
  chatType: ChatType;
5394
+ /** The recipient. */
4713
5395
  to: string;
5396
+ /** The command. */
4714
5397
  action: string;
5398
+ /** The sender, which can only be the current user and can not be changed.*/
4715
5399
  from?: string;
5400
+ /** @deprecated Whether the session type is chat room. */
4716
5401
  roomType?: boolean;
5402
+ /** The callback for message sending success. */
4717
5403
  success?: (data: SendMsgResult) => void;
5404
+ /** The callback for a message sending failure. */
4718
5405
  fail?: () => void;
5406
+ /** Message extension. */
4719
5407
  ext?: { [key: string]: any };
4720
5408
  }
4721
5409
 
4722
5410
  interface CmdMsgBody {
5411
+ /** The message ID. */
4723
5412
  id: string;
5413
+ /** The session type. */
4724
5414
  chatType: ChatType;
5415
+ /** The message type. */
4725
5416
  type: 'cmd';
5417
+ /** The recipient. */
4726
5418
  to: string;
5419
+ /** The command. */
4727
5420
  action: string;
5421
+ /** The sender, which can only be the current user and can not be changed.*/
4728
5422
  from?: string;
5423
+ /** @deprecated Whether the session type is chat room. */
4729
5424
  roomType?: boolean;
5425
+ /** @deprecated Whether the session type is group. */
4730
5426
  group?: string;
5427
+ /** The callback for message sending success. */
4731
5428
  success?: (data: SendMsgResult) => void;
5429
+ /** The callback for a message sending failure. */
4732
5430
  fail?: () => void;
5431
+ /** Message extension. */
4733
5432
  ext?: { [key: string]: any };
5433
+ /** Whether read receipts are required during a group session. */
4734
5434
  msgConfig?: { [key: string]: any };
5435
+ /** Time. */
4735
5436
  time: number;
5437
+ /** Whether the message is a thread message. */
4736
5438
  isChatThread?: boolean;
5439
+ /** The reaction to be added to the message. The length is limited to 128 characters. */
4737
5440
  reactions?: Reaction;
5441
+ /** The message thread. */
5442
+ chatThread?: ChatThread;
5443
+ /** The message thread overview. */
5444
+ chatThreadOverview?: ChatThreadOverview;
5445
+ /** Message online state type. */
5446
+ onlineState?: ONLINESTATETYPE;
4738
5447
  }
4739
5448
 
4740
5449
  interface CreateCmdMsgParameters {
5450
+ /** The message type. */
4741
5451
  type: 'cmd';
5452
+ /** The session type. */
4742
5453
  chatType: ChatType;
5454
+ /** The recipient. */
4743
5455
  to: string;
5456
+ /** The command. */
4744
5457
  action: string;
5458
+ /** The sender, which can only be the current user and can not be changed.*/
4745
5459
  from?: string;
5460
+ /** @deprecated Whether the session type is chat room. */
4746
5461
  roomType?: boolean;
5462
+ /** Message extension. */
4747
5463
  ext?: { [key: string]: any };
5464
+ /** Whether read receipts are required during a group session. */
4748
5465
  msgConfig?: { allowGroupAck: boolean };
5466
+ /** Whether the message is a thread message. */
4749
5467
  isChatThread?: boolean;
4750
5468
  }
4751
5469
 
4752
5470
  interface CustomParameters {
5471
+ /** The message type. */
4753
5472
  type: 'custom';
5473
+ /** The message ID. */
4754
5474
  id: string;
4755
5475
  }
4756
5476
  interface CustomMsgSetParameters {
5477
+ /** The session type. */
4757
5478
  chatType: ChatType;
5479
+ /** The recipient. */
4758
5480
  to: string;
5481
+ /** The custom event. */
4759
5482
  customEvent: string;
5483
+ /** The custom event extension. */
4760
5484
  customExts: { [key: string]: any };
5485
+ /** The sender, which can only be the current user and can not be changed.*/
4761
5486
  from?: string;
5487
+ /** @deprecated Whether the session type is chat room. */
4762
5488
  roomType?: boolean;
5489
+ /** The callback for message sending success. */
4763
5490
  success?: (data: SendMsgResult) => void;
5491
+ /** The callback for a message sending failure. */
4764
5492
  fail?: () => void;
5493
+ /** Message extension. */
4765
5494
  ext?: { [key: string]: any };
4766
5495
  }
4767
5496
 
4768
5497
  interface CustomMsgBody {
5498
+ /** The message ID. */
4769
5499
  id: string;
5500
+ /** The session type. */
4770
5501
  chatType: ChatType;
5502
+ /** The message type. */
4771
5503
  type: 'custom';
5504
+ /** The recipient. */
4772
5505
  to: string;
5506
+ /** The custom event. */
4773
5507
  customEvent: string;
5508
+ /** The custom event extension. */
4774
5509
  customExts: { [key: string]: any };
5510
+ /** The sender, which can only be the current user and can not be changed.*/
4775
5511
  from?: string;
5512
+ /** @deprecated Whether the session type is chat room. */
4776
5513
  roomType?: boolean;
5514
+ /** @deprecated Whether the session type is group. */
4777
5515
  group?: string;
4778
5516
  params?: { [key: string]: any };
5517
+ /** The callback for message sending success. */
4779
5518
  success?: (data: SendMsgResult) => void;
5519
+ /** The callback for a message sending failure. */
4780
5520
  fail?: () => void;
5521
+ /** Message extension. */
4781
5522
  ext?: { [key: string]: any };
5523
+ /** Whether read receipts are required during a group session. */
4782
5524
  msgConfig?: { [key: string]: any };
5525
+ /** Time. */
4783
5526
  time: number;
5527
+ /** Whether the message is a thread message. */
4784
5528
  isChatThread?: boolean;
5529
+ /** The reaction to be added to the message. The length is limited to 128 characters. */
4785
5530
  reactions?: Reaction;
5531
+ /** The message thread. */
5532
+ chatThread?: ChatThread;
5533
+ /** The message thread overview. */
5534
+ chatThreadOverview?: ChatThreadOverview;
5535
+ /** Message online state type. */
5536
+ onlineState?: ONLINESTATETYPE;
4786
5537
  }
4787
5538
 
4788
5539
  interface CreateCustomMsgParameters {
5540
+ /** The message type. */
4789
5541
  type: 'custom';
5542
+ /** The session type. */
4790
5543
  chatType: ChatType;
5544
+ /** The recipient. */
4791
5545
  to: string;
5546
+ /** The custom event. */
4792
5547
  customEvent: string;
5548
+ /** The custom event extension. */
4793
5549
  customExts: { [key: string]: any };
5550
+ /** The sender, which can only be the current user and can not be changed.*/
4794
5551
  from?: string;
5552
+ /** Message extension. */
4795
5553
  ext?: { [key: string]: any };
5554
+ /** Whether read receipts are required during a group session. */
4796
5555
  msgConfig?: { allowGroupAck: boolean };
5556
+ /** Whether the message is a thread message. */
4797
5557
  isChatThread?: boolean;
4798
5558
  }
4799
5559
 
4800
5560
  interface LocationParameters {
5561
+ /** The message type. */
4801
5562
  type: 'loc';
5563
+ /** The message ID. */
4802
5564
  id: string;
4803
5565
  }
5566
+
4804
5567
  interface LocationMsgSetParameters {
5568
+ /** The session type. */
4805
5569
  chatType: ChatType;
5570
+ /** The recipient. */
4806
5571
  to: string;
5572
+ /** The address. */
4807
5573
  addr: string;
5574
+ /** The building name. */
4808
5575
  buildingName: string;
5576
+ /** The latitude. */
4809
5577
  lat: number;
5578
+ /** The longitude. */
4810
5579
  lng: number;
5580
+ /** The sender, which can only be the current user and can not be changed. */
4811
5581
  from?: string;
5582
+ /** @deprecated Whether the session type is chat room. */
4812
5583
  roomType?: boolean;
5584
+ /** The callback for message sending success. */
4813
5585
  success?: (data: SendMsgResult) => void;
5586
+ /** The callback for a message sending failure. */
4814
5587
  fail?: () => void;
5588
+ /** The message extension. */
4815
5589
  ext?: { [key: string]: any };
4816
5590
  }
4817
5591
 
4818
5592
  interface LocationMsgBody {
5593
+ /** The message ID. */
4819
5594
  id: string;
5595
+ /** The session type. */
4820
5596
  chatType: ChatType;
5597
+ /** The message type. */
4821
5598
  type: 'loc';
5599
+ /** The recipient. */
4822
5600
  to: string;
5601
+ /** The address. */
4823
5602
  addr: string;
5603
+ /** The building name. */
4824
5604
  buildingName: string;
5605
+ /** The latitude. */
4825
5606
  lat: number;
5607
+ /** The longitude. */
4826
5608
  lng: number;
5609
+ /** The sender, which can only be the current user and can not be changed. */
4827
5610
  from?: string;
5611
+ /** @deprecated Whether the session type is chat room. */
4828
5612
  roomType?: boolean;
5613
+ /** @deprecated Whether the session type is group. */
4829
5614
  group?: string;
5615
+ /** The callback for message sending success. */
4830
5616
  success?: (data: SendMsgResult) => void;
5617
+ /** The callback for a message sending failure. */
4831
5618
  fail?: () => void;
5619
+ /** The message extension. */
4832
5620
  ext?: { [key: string]: any };
5621
+ /** Time. */
4833
5622
  time: number;
5623
+ /** Whether read receipts are required during a group session. */
4834
5624
  msgConfig?: { allowGroupAck: boolean };
5625
+ /** Whether the message is a thread message. */
4835
5626
  isChatThread?: boolean;
5627
+ /** The reaction to be added to the message. The length is limited to 128 characters. */
4836
5628
  reactions?: Reaction;
5629
+ /** The message thread. */
5630
+ chatThread?: ChatThread;
5631
+ /** The message thread overview. */
5632
+ chatThreadOverview?: ChatThreadOverview;
5633
+ /** Message online state type. */
5634
+ onlineState?: ONLINESTATETYPE;
4837
5635
  }
4838
5636
 
4839
5637
  interface CreateLocationMsgParameters {
5638
+ /** The message type. */
4840
5639
  type: 'loc';
5640
+ /** The session type. */
4841
5641
  chatType: ChatType;
5642
+ /** The recipient. */
4842
5643
  to: string;
5644
+ /** The address. */
4843
5645
  addr: string;
5646
+ /** The building name. */
4844
5647
  buildingName: string;
5648
+ /** The latitude. */
4845
5649
  lat: number;
5650
+ /** The longitude. */
4846
5651
  lng: number;
5652
+ /** The sender, which can only be the current user and can not be changed. */
4847
5653
  from?: string;
5654
+ /** The message extension. */
4848
5655
  ext?: { [key: string]: any };
5656
+ /** Whether read receipts are required during a group session. */
4849
5657
  msgConfig?: { allowGroupAck: boolean };
5658
+ /** Whether the message is a thread message. */
4850
5659
  isChatThread?: boolean;
4851
5660
  }
4852
5661
 
4853
5662
  interface FileParameters {
5663
+ /** The message type. */
4854
5664
  type: 'file';
5665
+ /** The message ID. */
4855
5666
  id: string;
4856
5667
  }
5668
+
5669
+ interface UploadFileResult {
5670
+ /** The file URL. */
5671
+ url: string;
5672
+ entities: {
5673
+ /** Secret required to download the file. */
5674
+ 'share-secret': string;
5675
+ /** the file category. */
5676
+ type: 'chatfile';
5677
+ /** Unique ID generated by the file on the server. */
5678
+ uuid: string;
5679
+ }[];
5680
+ [key: string]: any;
5681
+ }
5682
+
4857
5683
  interface FileMsgSetParameters {
5684
+ /** The session type. */
4858
5685
  chatType: ChatType;
5686
+ /** The file object. */
4859
5687
  file: FileObj;
5688
+ /** The file name. */
4860
5689
  filename?: string;
5690
+ /** The input ID of the file to be uploaded. */
4861
5691
  fileInputId?: string;
5692
+ /** The recipient. */
4862
5693
  to: string;
5694
+ /** The sender, which can only be the current user and can not be changed.*/
4863
5695
  from?: string;
5696
+ /** @deprecated Whether the session type is chat room. */
4864
5697
  roomType?: boolean;
5698
+ /** The callback for message sending success. */
4865
5699
  success?: (data: SendMsgResult) => void;
5700
+ /** The callback for a message sending failure. */
4866
5701
  fail?: () => void;
5702
+ /** The message extension. */
4867
5703
  ext?: { [key: string]: any };
5704
+ /** File upload address. */
4868
5705
  apiUrl?: string;
4869
- onFileUploadError?: (err: any) => void;
4870
- onFileUploadComplete?: (data: any) => void;
5706
+ /** The callback of a file upload error. */
5707
+ onFileUploadError?: (err: ErrorEvent) => void;
5708
+ /** The callback of file upload completion. */
5709
+ onFileUploadComplete?: (data: UploadFileResult) => void;
5710
+ /** The callback of the file upload progress. */
4871
5711
  onFileUploadProgress?: (data: ProgressEvent) => void;
5712
+ /** The message body. */
4872
5713
  body?: {
5714
+ /** The file URL. */
4873
5715
  url: string;
5716
+ /** The file type. */
4874
5717
  type: string;
5718
+ /** The file name. */
4875
5719
  filename: string;
4876
5720
  };
5721
+ /** Whether the message is a thread message. */
5722
+ isChatThread?: boolean;
4877
5723
  }
4878
5724
 
4879
5725
  interface FileMsgBody extends CreateFileMsgParameters {
5726
+ /** The message ID. */
4880
5727
  id: string;
5728
+ /** The message type. */
4881
5729
  type: 'file';
5730
+ /** @deprecated Whether the session type is group. */
4882
5731
  group?: string;
5732
+ /** The file URL. */
4883
5733
  url?: string;
5734
+ /** Secret required to download the file. */
4884
5735
  secret?: string;
4885
5736
  length?: number;
5737
+ /** The file size. */
4886
5738
  file_length?: number;
5739
+ /** The file type. */
4887
5740
  filetype?: string;
5741
+ /** AccessToken needed to download files */
4888
5742
  accessToken?: string;
5743
+ /** Whether read receipts are required during a group session. */
4889
5744
  msgConfig?: { allowGroupAck: boolean };
5745
+ /** Time. */
4890
5746
  time: number;
5747
+ /** The reaction to be added to the message. The length is limited to 128 characters. */
4891
5748
  reactions?: Reaction;
5749
+ /** The message thread. */
5750
+ chatThread?: ChatThread;
5751
+ /** The message thread overview. */
5752
+ chatThreadOverview?: ChatThreadOverview;
5753
+ /** Message online state type. */
5754
+ onlineState?: ONLINESTATETYPE;
5755
+ /** Whether the message is a thread message. */
5756
+ isChatThread?: boolean;
4892
5757
  }
4893
5758
 
4894
5759
  interface CreateFileMsgParameters {
5760
+ /** The message type. */
4895
5761
  type: 'file';
5762
+ /** The session type. */
4896
5763
  chatType: ChatType;
5764
+ /** The file object. */
4897
5765
  file: FileObj;
5766
+ /** The file name. */
4898
5767
  filename?: string;
5768
+ /** The input ID of the file to be uploaded. */
4899
5769
  fileInputId?: string;
5770
+ /** The recipient. */
4900
5771
  to: string;
5772
+ /** The sender, which can only be the current user and can not be changed.*/
4901
5773
  from?: string;
5774
+ /** The message extension. */
4902
5775
  ext?: { [key: string]: any };
5776
+ /** File upload address. */
4903
5777
  apiUrl?: string;
4904
- onFileUploadError?: (err: any) => void;
4905
- onFileUploadComplete?: (data: any) => void;
5778
+ /** The callback of a file upload error. */
5779
+ onFileUploadError?: (err: ErrorEvent) => void;
5780
+ /** The callback of file upload completion. */
5781
+ onFileUploadComplete?: (data: UploadFileResult) => void;
5782
+ /** The callback of the file upload progress. */
4906
5783
  onFileUploadProgress?: (data: ProgressEvent) => void;
5784
+ /** The message body. */
4907
5785
  body?: {
5786
+ /** The file URL. */
4908
5787
  url: string;
5788
+ /** The file type. */
4909
5789
  type: string;
5790
+ /** The file name. */
4910
5791
  filename: string;
4911
5792
  };
5793
+ /** Whether read receipts are required during a group session. */
4912
5794
  msgConfig?: { allowGroupAck: boolean };
5795
+ /** Whether the message is a thread message. */
4913
5796
  isChatThread?: boolean;
4914
5797
  }
4915
5798
 
4916
5799
  interface ImgParameters {
5800
+ /** The message type. */
4917
5801
  type: 'img';
5802
+ /** The message ID. */
4918
5803
  id: string;
4919
5804
  }
4920
5805
 
4921
5806
  interface ImgMsgSetParameters {
5807
+ /** The session type. */
4922
5808
  chatType: ChatType;
5809
+ /** The recipient. */
4923
5810
  to: string;
5811
+ /** The file object. */
4924
5812
  file?: FileObj;
5813
+ /** The image width. */
4925
5814
  width?: number;
5815
+ /** The image height. */
4926
5816
  height?: number;
5817
+ /** The input ID of the file to be uploaded. */
4927
5818
  fileInputId?: string;
5819
+ /** The sender, which can only be the current user and can not be changed.*/
4928
5820
  from?: string;
5821
+ /** @deprecated Whether the session type is chat room. */
4929
5822
  roomType?: boolean;
5823
+ /** @deprecated Whether the session type is group. */
4930
5824
  group?: string;
5825
+ /** The callback for message sending success. */
4931
5826
  success?: (data: SendMsgResult) => void;
5827
+ /** The callback for a message sending failure. */
4932
5828
  fail?: () => void;
5829
+ /** The message extension. */
4933
5830
  ext?: { [key: string]: any };
5831
+ /** The file URL. If the file is uploaded, you can directly use the URL. */
4934
5832
  url?: string;
4935
- onFileUploadError?: (error: any) => void;
4936
- onFileUploadComplete?: (data: any) => void;
5833
+ /** The callback of a file upload error. */
5834
+ onFileUploadError?: (err: ErrorEvent) => void;
5835
+ /** The callback of file upload completion. */
5836
+ onFileUploadComplete?: (data: UploadFileResult) => void;
5837
+ /** The callback of the file upload progress. */
4937
5838
  onFileUploadProgress?: (data: ProgressEvent) => void;
4938
- uploadError?: (error: any) => void;
4939
- uploadComplete?: (data: any) => void;
5839
+ /** Whether read receipts are required during a group session. */
4940
5840
  msgConfig?: { [key: string]: any };
5841
+ /** The message body. */
4941
5842
  body?: {
5843
+ /** The file URL. */
4942
5844
  url: string;
5845
+ /** The file type. */
4943
5846
  type: string;
5847
+ /** The file name. */
4944
5848
  filename: string;
4945
5849
  };
4946
5850
  }
4947
5851
 
4948
5852
  interface ImgMsgBody extends ImgMsgSetParameters {
5853
+ /** The message ID. */
4949
5854
  id: string;
5855
+ /** The message type. */
4950
5856
  type: 'img';
5857
+ /** Time. */
4951
5858
  time: number;
5859
+ /** Secret required to download the image. */
4952
5860
  secret?: string;
5861
+ /** The thumbnails of image. */
4953
5862
  thumb?: string;
5863
+ /** Secret required to download the thumbnails. */
4954
5864
  thumb_secret?: string;
5865
+ /** Whether the message is a thread message. */
4955
5866
  isChatThread?: boolean;
5867
+ /** The reaction to be added to the message. The length is limited to 128 characters. */
4956
5868
  reactions?: Reaction;
5869
+ /** The message thread. */
5870
+ chatThread?: ChatThread;
5871
+ /** The message thread overview. */
5872
+ chatThreadOverview?: ChatThreadOverview;
5873
+ /** Message online state type. */
5874
+ onlineState?: ONLINESTATETYPE;
4957
5875
  }
4958
5876
 
4959
5877
  interface CreateImgMsgParameters {
5878
+ /** The message type. */
4960
5879
  type: 'img';
5880
+ /** The session type. */
4961
5881
  chatType: ChatType;
5882
+ /** The file object. */
4962
5883
  file?: FileObj;
5884
+ /** The file URL. If the file is uploaded, you can directly use the URL. */
4963
5885
  url?: string;
5886
+ /** The image width. */
4964
5887
  width?: number;
5888
+ /** The image height. */
4965
5889
  height?: number;
5890
+ /** The recipient. */
4966
5891
  to: string;
5892
+ /** The sender, which can only be the current user and can not be changed.*/
4967
5893
  from?: string;
4968
- onFileUploadError?: (error: any) => void;
4969
- onFileUploadComplete?: (data: any) => void;
5894
+ /** The callback of a file upload error. */
5895
+ onFileUploadError?: (err: ErrorEvent) => void;
5896
+ /** The callback of file upload completion. */
5897
+ onFileUploadComplete?: (data: UploadFileResult) => void;
5898
+ /** The callback of the file upload progress. */
4970
5899
  onFileUploadProgress?: (data: ProgressEvent) => void;
4971
- uploadError?: (error: any) => void;
4972
- uploadComplete?: (data: any) => void;
5900
+ /** The message extension. */
4973
5901
  ext?: { [key: string]: any };
5902
+ /** The message body. */
4974
5903
  body?: {
5904
+ /** The file URL. */
4975
5905
  url: string;
5906
+ /** The file type. */
4976
5907
  type: string;
5908
+ /** The file name. */
4977
5909
  filename: string;
4978
5910
  };
5911
+ /** Whether read receipts are required during a group session. */
4979
5912
  msgConfig?: { allowGroupAck: boolean };
5913
+ /** Whether the message is a thread message. */
4980
5914
  isChatThread?: boolean;
4981
5915
  }
4982
5916
 
4983
5917
  interface AudioParameters {
5918
+ /** The message type. */
4984
5919
  type: 'audio';
5920
+ /** The message ID. */
4985
5921
  id: string;
4986
5922
  }
4987
5923
  interface AudioMsgSetParameters {
5924
+ /** The session type. */
4988
5925
  chatType: ChatType;
5926
+ /** The file object. */
4989
5927
  file: FileObj;
5928
+ /** The file name. */
4990
5929
  filename: string;
5930
+ /** The audio duration. */
4991
5931
  length?: number;
5932
+ /** The file size. */
4992
5933
  file_length?: number;
5934
+ /** The input ID of the file to be uploaded. */
4993
5935
  fileInputId?: string;
5936
+ /** The recipient. */
4994
5937
  to: string;
5938
+ /** The sender, which can only be the current user and can not be changed.*/
4995
5939
  from?: string;
5940
+ /** @deprecated Whether the session type is chat room. */
4996
5941
  roomType?: boolean;
5942
+ /** The callback for message sending success. */
4997
5943
  success?: (data: SendMsgResult) => void;
5944
+ /** The callback for a message sending failure. */
4998
5945
  fail?: () => void;
5946
+ /** The message extension. */
4999
5947
  ext?: { [key: string]: any };
5948
+ /** File upload address. */
5000
5949
  apiUrl?: string;
5001
- onFileUploadError?: (err: any) => void;
5002
- onFileUploadComplete?: (data: any) => void;
5950
+ /** The callback of a file upload error. */
5951
+ onFileUploadError?: (err: ErrorEvent) => void;
5952
+ /** The callback of file upload completion. */
5953
+ onFileUploadComplete?: (data: UploadFileResult) => void;
5954
+ /** The callback of the file upload progress. */
5003
5955
  onFileUploadProgress?: (data: ProgressEvent) => void;
5956
+ /** The message body. */
5004
5957
  body?: {
5958
+ /** The file URL. */
5005
5959
  url: string;
5960
+ /** The file type. */
5006
5961
  type: string;
5962
+ /** The file name. */
5007
5963
  filename: string;
5008
5964
  };
5009
5965
  }
5010
5966
 
5011
5967
  interface AudioMsgBody extends AudioMsgSetParameters {
5968
+ /** The message ID. */
5012
5969
  id: string;
5970
+ /** The message type. */
5013
5971
  type: 'audio';
5972
+ /** The audio file URL. */
5014
5973
  url?: string;
5974
+ /** Secret required to download the audio file. */
5015
5975
  secret?: string;
5976
+ /** The file type. */
5016
5977
  filetype?: string;
5978
+ /** AccessToken needed to download files */
5017
5979
  accessToken?: string;
5980
+ /** @deprecated Whether the session type is group. */
5018
5981
  group?: string;
5982
+ /** Whether read receipts are required during a group session. */
5019
5983
  msgConfig?: { [key: string]: any };
5984
+ /** Time. */
5020
5985
  time: number;
5986
+ /** Whether the message is a thread message. */
5021
5987
  isChatThread?: boolean;
5988
+ /** The reaction to be added to the message. The length is limited to 128 characters. */
5022
5989
  reactions?: Reaction;
5990
+ /** The message thread. */
5991
+ chatThread?: ChatThread;
5992
+ /** The message thread overview. */
5993
+ chatThreadOverview?: ChatThreadOverview;
5994
+ /** Message online state type. */
5995
+ onlineState?: ONLINESTATETYPE;
5023
5996
  }
5024
5997
 
5025
5998
  interface CreateAudioMsgParameters {
5999
+ /** The message type. */
5026
6000
  type: 'audio';
6001
+ /** The session type. */
5027
6002
  chatType: ChatType;
6003
+ /** The file object. */
5028
6004
  file: FileObj;
6005
+ /** The file name. */
5029
6006
  filename: string;
6007
+ /** The audio duration. */
5030
6008
  length?: number;
6009
+ /** The audio file length. */
5031
6010
  file_length?: number;
6011
+ /** The input ID of the file to be uploaded. */
5032
6012
  fileInputId?: string;
6013
+ /** The recipient. */
5033
6014
  to: string;
6015
+ /** The sender, which can only be the current user and can not be changed.*/
5034
6016
  from?: string;
5035
- roomType?: boolean;
5036
- success?: (data: SendMsgResult) => void;
5037
- fail?: () => void;
6017
+ /** The message extension. */
5038
6018
  ext?: { [key: string]: any };
5039
- apiUrl?: string;
5040
- onFileUploadError?: (err: any) => void;
5041
- onFileUploadComplete?: (data: any) => void;
6019
+ /** The callback of a file upload error. */
6020
+ onFileUploadError?: (err: ErrorEvent) => void;
6021
+ /** The callback of file upload completion. */
6022
+ onFileUploadComplete?: (data: UploadFileResult) => void;
6023
+ /** The callback of the file upload progress. */
5042
6024
  onFileUploadProgress?: (data: ProgressEvent) => void;
6025
+ /** The message body. */
5043
6026
  body?: {
6027
+ /** The file URL. */
5044
6028
  url: string;
6029
+ /** The file type. */
5045
6030
  type: string;
6031
+ /** The file name. */
5046
6032
  filename: string;
5047
6033
  };
6034
+ /** Whether read receipts are required during a group session. */
5048
6035
  msgConfig?: { allowGroupAck: boolean };
6036
+ /** Whether the message is a thread message. */
5049
6037
  isChatThread?: boolean;
5050
6038
  }
5051
6039
 
5052
6040
  interface VideoParameters {
6041
+ /** The message type. */
5053
6042
  type: 'video';
6043
+ /** The message ID. */
5054
6044
  id: string;
5055
6045
  }
5056
6046
  interface VideoMsgSetParameters {
6047
+ /** The session type. */
5057
6048
  chatType: ChatType;
6049
+ /** The file object. */
5058
6050
  file: FileObj;
6051
+ /** The file name. */
5059
6052
  filename: string;
6053
+ /** The video duration. */
5060
6054
  length?: number;
6055
+ /** The size of the video file. */
5061
6056
  file_length?: number;
6057
+ /** The input ID of the file to be uploaded. */
5062
6058
  fileInputId?: string;
6059
+ /** The recipient. */
5063
6060
  to: string;
6061
+ /** The sender, which can only be the current user and can not be changed. */
5064
6062
  from?: string;
6063
+ /** @deprecated Whether the session type is chat room. */
5065
6064
  roomType?: boolean;
6065
+ /** The callback for message sending success. */
5066
6066
  success?: (data: SendMsgResult) => void;
6067
+ /** The callback for a message sending failure. */
5067
6068
  fail?: () => void;
6069
+ /** The message extension. */
5068
6070
  ext?: { [key: string]: any };
6071
+ /** File upload address. */
5069
6072
  apiUrl?: string;
5070
- onFileUploadError?: (err: any) => void;
5071
- onFileUploadComplete?: (data: any) => void;
6073
+ /** The callback of a file upload error. */
6074
+ onFileUploadError?: (err: ErrorEvent) => void;
6075
+ /** The callback of file upload completion. */
6076
+ onFileUploadComplete?: (data: UploadFileResult) => void;
6077
+ /** The callback of the file upload progress. */
5072
6078
  onFileUploadProgress?: (data: ProgressEvent) => void;
6079
+ /** The message body. */
5073
6080
  body?: {
6081
+ /** The file URL. */
5074
6082
  url: string;
6083
+ /** The file type. */
5075
6084
  type: string;
6085
+ /** The file name. */
5076
6086
  filename: string;
5077
6087
  };
5078
6088
  }
5079
6089
 
5080
6090
  interface VideoMsgBody extends VideoMsgSetParameters {
6091
+ /** The message ID. */
5081
6092
  id: string;
6093
+ /** The message type. */
5082
6094
  type: 'video';
6095
+ /** The file URL. */
5083
6096
  url?: string;
6097
+ /** Secret required to download the video file. */
5084
6098
  secret?: string;
6099
+ /** The file type. */
5085
6100
  filetype?: string;
6101
+ /** AccessToken needed to download files */
5086
6102
  accessToken?: string;
6103
+ /** Whether read receipts are required during a group session. */
5087
6104
  msgConfig?: { [key: string]: any };
6105
+ /** @deprecated Whether the session type is group. */
5088
6106
  group?: string;
6107
+ /** Time. */
5089
6108
  time: number;
6109
+ /** Whether the message is a thread message. */
5090
6110
  isChatThread?: boolean;
6111
+ /** The reaction to be added to the message. The length is limited to 128 characters. */
5091
6112
  reactions?: Reaction;
6113
+ /** The message thread. */
6114
+ chatThread?: ChatThread;
6115
+ /** The message thread overview. */
6116
+ chatThreadOverview?: ChatThreadOverview;
6117
+ /** Message online state type. */
6118
+ onlineState?: ONLINESTATETYPE;
5092
6119
  }
5093
6120
 
5094
6121
  interface CreateVideoMsgParameters {
6122
+ /** The message type. */
5095
6123
  type: 'video';
6124
+ /** The session type. */
5096
6125
  chatType: ChatType;
6126
+ /** The file object. */
5097
6127
  file: FileObj;
6128
+ /** The file name. */
5098
6129
  filename: string;
6130
+ /** The video duration. */
5099
6131
  length?: number;
6132
+ /** The size of the video file. */
5100
6133
  file_length?: number;
6134
+ /** The input ID of the file to be uploaded. */
5101
6135
  fileInputId?: string;
6136
+ /** The recipient. */
5102
6137
  to: string;
6138
+ /** The sender, which can only be the current user and can not be changed. */
5103
6139
  from?: string;
6140
+ /** The message extension. */
5104
6141
  ext?: { [key: string]: any };
6142
+ /** File upload address. */
5105
6143
  apiUrl?: string;
5106
- onFileUploadError?: (err: any) => void;
5107
- onFileUploadComplete?: (data: any) => void;
6144
+ /** The callback of a file upload error. */
6145
+ onFileUploadError?: (err: ErrorEvent) => void;
6146
+ /** The callback of file upload completion. */
6147
+ onFileUploadComplete?: (data: UploadFileResult) => void;
6148
+ /** The callback of the file upload progress. */
5108
6149
  onFileUploadProgress?: (data: ProgressEvent) => void;
6150
+ /** The message body. */
5109
6151
  body?: {
6152
+ /** The file URL. */
5110
6153
  url: string;
6154
+ /** The file type. */
5111
6155
  type: string;
6156
+ /** The file name. */
5112
6157
  filename: string;
5113
6158
  };
6159
+ /** Whether read receipts are required during a group session. */
5114
6160
  msgConfig?: { allowGroupAck: boolean };
6161
+ /** Whether the message is a thread message. */
5115
6162
  isChatThread?: boolean;
5116
6163
  }
5117
6164
 
5118
6165
  interface ReceivedMsgBody {
6166
+ /** Locally generated message ID. */
5119
6167
  id: string;
6168
+ /** Message ID generated by the server. */
5120
6169
  mid: string;
6170
+ /** The recipient. */
5121
6171
  to: string;
5122
- time: number;
5123
6172
  }
5124
6173
 
5125
6174
  interface RecallMsgBody {
5126
- id?: string;
6175
+ /** The message ID. */
6176
+ id: string;
6177
+ /** The message sender. */
5127
6178
  from: string;
6179
+ /** The message receiver. */
5128
6180
  to: string;
6181
+ /** The ID of the message to be recalled. */
5129
6182
  mid: string;
6183
+ /** Message online state type. */
6184
+ onlineState?: ONLINESTATETYPE;
5130
6185
  }
5131
- interface MuteMsgBody {
5132
- mid: string;
5133
- }
6186
+
5134
6187
  interface ContactMsgBody {
6188
+ /** The message type, subscribe: request a contact, unsubscribed: cancel or refuse to add contact, subscribed: added contact successfully. */
6189
+ type: 'subscribe' | 'unsubscribed' | 'subscribed';
6190
+ /** The message receiver. */
5135
6191
  to: string;
6192
+ /** The message sender. */
5136
6193
  from: string;
5137
- status: string;
5138
- type: 'subscribed' | 'unsubscribed' | 'subscribe';
6194
+ /** Reason. */
6195
+ status?: string;
5139
6196
  }
5140
6197
 
5141
6198
  type NewMessageParamters =
@@ -5190,19 +6247,26 @@ export declare namespace EasemobChat {
5190
6247
  | VideoMsgBody
5191
6248
  | FileMsgBody;
5192
6249
 
6250
+ /**
6251
+ * Message class is used to create a message.
6252
+ * @module message
6253
+ */
5193
6254
  class Message {
6255
+ /** The message ID. */
5194
6256
  id: string;
6257
+ /** The message type. */
5195
6258
  type: MessageType;
5196
6259
  body?: MessageBody;
5197
6260
  constructor(type: MessageType, id?: string);
6261
+ /** @deprecated */
5198
6262
  static createOldMsg(options: NewMessageParamters): MessageBody;
6263
+ /** Create messages. */
5199
6264
  static create(options: CreateMsgType): MessageBody;
6265
+ /** @deprecated */
5200
6266
  set(options: MessageSetParameters): void;
5201
6267
  }
5202
6268
 
5203
- /**
5204
- * @moudle utils
5205
- */
6269
+ // ---- for Utils
5206
6270
 
5207
6271
  interface AjaxOptions {
5208
6272
  url: string;
@@ -5227,20 +6291,16 @@ export declare namespace EasemobChat {
5227
6291
  UNI = 'uni',
5228
6292
  }
5229
6293
  interface EnvInfo {
6294
+ /** Code running platform. */
5230
6295
  platform: PLATFORM;
6296
+ /** global variable. */
5231
6297
  global: any;
5232
6298
  }
5233
- interface Uri {
5234
- url: string;
5235
- filename: string;
5236
- filetype: string;
5237
- data: File | null;
5238
- }
5239
6299
  interface UploadFile {
5240
- onFileUploadProgress?: (msg: any) => void;
5241
- onFileUploadComplete?: (msg: any) => void;
5242
- onFileUploadError?: (msg: any) => void;
5243
- onFileUploadCanceled?: (msg: any) => void;
6300
+ onFileUploadProgress?: (data: ProgressEvent) => void;
6301
+ onFileUploadComplete?: (data: any) => void;
6302
+ onFileUploadError?: (error: ErrorEvent) => void;
6303
+ onFileUploadCanceled?: () => void;
5244
6304
  accessToken: string;
5245
6305
  appKey: string;
5246
6306
  apiUrl?: string;
@@ -5248,16 +6308,27 @@ export declare namespace EasemobChat {
5248
6308
  file: object;
5249
6309
  }
5250
6310
  interface DownloadParams {
6311
+ url: string;
5251
6312
  onFileDownloadComplete: (data: any) => void;
5252
- onFileDownloadError: (error: any) => void;
5253
- id: string;
5254
- secret: string;
6313
+ onFileDownloadError: (error: {
6314
+ type: Code;
6315
+ id: string;
6316
+ xhr: XMLHttpRequest;
6317
+ }) => void;
6318
+ id?: string;
6319
+ headers?: { [key: string]: any };
6320
+ secret?: string;
5255
6321
  [key: string]: any;
5256
6322
  }
6323
+
6324
+ /**
6325
+ * Some utility methods provided in SDK
6326
+ * @module utils
6327
+ */
5257
6328
  interface Utils {
5258
6329
  getUniqueId: () => string;
5259
6330
  ajax: (options: AjaxOptions) => Promise<any>;
5260
- getFileUrl: (fileInputId: string | HTMLInputElement) => Uri;
6331
+ getFileUrl: (fileInputId: string | HTMLInputElement) => FileObj;
5261
6332
  uploadFile: (options: UploadFile) => void;
5262
6333
  listenNetwork: (online: () => void, offline: () => void) => void;
5263
6334
  getEnvInfo: () => EnvInfo;