easemob-websdk 4.0.1 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Easemob-chat.d.ts CHANGED
@@ -90,6 +90,9 @@ export declare namespace EasemobChat {
90
90
  autoReconnectNumMax?: number;
91
91
  }
92
92
 
93
+ interface RegisterUserResult extends AsyncResult {
94
+ entities: BaseUserInfo[]
95
+ }
93
96
 
94
97
  // chat room api result start
95
98
  interface ChatRoomBaseInfo {
@@ -570,8 +573,25 @@ export declare namespace EasemobChat {
570
573
  /** The number of unread messages. */
571
574
  unread_num: number
572
575
  }
576
+
577
+ interface DeleteSessionResult {
578
+ /** The result of request. */
579
+ /** 请求结果。 */
580
+ result: "ok";
581
+ }
573
582
  // The contact api result end.
574
583
 
584
+ interface LoginResult {
585
+ /** The connection token. */
586
+ /** 连接 token。 */
587
+ accessToken: string,
588
+ /** Expiration timestamp. */
589
+ /** 过期时间戳。 */
590
+ expireTimestamp?: number,
591
+ /** Valid duration of token. */
592
+ /** token 有效时长。 */
593
+ duration?: number
594
+ }
575
595
 
576
596
  enum Code {
577
597
  REQUEST_SUCCESS = 0,
@@ -724,7 +744,7 @@ export declare namespace EasemobChat {
724
744
  /**
725
745
  * @deprecated 4.0.1
726
746
  */
727
- onOpened?: () => any;
747
+ onOpened?: () => void;
728
748
  /**
729
749
  * @deprecated 4.0.1
730
750
  */
@@ -766,20 +786,20 @@ export declare namespace EasemobChat {
766
786
  registerUser(this: Connection, params: {
767
787
  username: string,
768
788
  password: string,
769
- nickname: string,
770
- success?: (res: any) => any,
771
- error?: (err: ErrorEvent) => any,
789
+ nickname?: string,
790
+ success?: (res: any) => void,
791
+ error?: (err: ErrorEvent) => void,
772
792
  apiUrl?: string,
773
- }): void;
793
+ }): Promise<RegisterUserResult>;
774
794
 
775
795
  open(parameters: {
776
796
  user: string,
777
- pwd: string,
797
+ pwd?: string,
778
798
  accessToken?: string,
779
799
  agoraToken?: string,
780
- success?: (res: any) => any,
781
- error?: (res: any) => any
782
- }): void;
800
+ success?: (res: any) => void,
801
+ error?: (res: any) => void
802
+ }): Promise<LoginResult>;
783
803
  isOpened(): boolean;
784
804
  close(): void;
785
805
  getChatToken(agoraToken: string): Promise<any>;
@@ -829,8 +849,8 @@ export declare namespace EasemobChat {
829
849
  destroyChatRoom(this: Connection, params: {
830
850
  chatRoomId: string,
831
851
  token: string,
832
- success?: (res: AsyncResult<CreateDeleteChatRoomResult>) => any,
833
- error?: (error: ErrorEvent) => any
852
+ success?: (res: AsyncResult<CreateDeleteChatRoomResult>) => void,
853
+ error?: (error: ErrorEvent) => void
834
854
  }): Promise<AsyncResult<CreateDeleteChatRoomResult>>;
835
855
 
836
856
  /**
@@ -842,8 +862,8 @@ export declare namespace EasemobChat {
842
862
  */
843
863
  getChatRoomDetails(this: Connection, params: {
844
864
  chatRoomId: string,
845
- success?: (res: AsyncResult<GetChatRoomDetailsResult>) => any,
846
- error?: (error: ErrorEvent) => any
865
+ success?: (res: AsyncResult<GetChatRoomDetailsResult>) => void,
866
+ error?: (error: ErrorEvent) => void
847
867
  }): Promise<AsyncResult<GetChatRoomDetailsResult>>;
848
868
 
849
869
  /**
@@ -858,16 +878,16 @@ export declare namespace EasemobChat {
858
878
  chatRoomName: string,
859
879
  description: string,
860
880
  maxusers: number,
861
- success?: (res: AsyncResult<ModifyChatRoomResult>) => any,
862
- error?: (error: ErrorEvent) => any,
881
+ success?: (res: AsyncResult<ModifyChatRoomResult>) => void,
882
+ error?: (error: ErrorEvent) => void,
863
883
  }): Promise<AsyncResult<ModifyChatRoomResult>>;
864
884
 
865
885
  /**@deprecated*/
866
886
  removeSingleChatRoomMember(this: Connection, params: {
867
887
  chatRoomId: string,
868
888
  username: string,
869
- success?: (res: AsyncResult<CommonRequestResult>) => any,
870
- error?: (error: ErrorEvent) => any
889
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
890
+ error?: (error: ErrorEvent) => void
871
891
  }): Promise<AsyncResult<CommonRequestResult>>;
872
892
 
873
893
  /**
@@ -881,16 +901,16 @@ export declare namespace EasemobChat {
881
901
  removeChatRoomMember(this: Connection, params: {
882
902
  chatRoomId: string,
883
903
  username: string,
884
- success?: (res: AsyncResult<CommonRequestResult>) => any,
885
- error?: (error: ErrorEvent) => any
904
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
905
+ error?: (error: ErrorEvent) => void
886
906
  }): Promise<AsyncResult<CommonRequestResult>>;
887
907
 
888
908
  /**@deprecated*/
889
909
  removeMultiChatRoomMember(this: Connection, params: {
890
910
  chatRoomId: string,
891
911
  users: string[],
892
- success?: (res: AsyncResult<CommonRequestResult[]>) => any,
893
- error?: (error: ErrorEvent) => any,
912
+ success?: (res: AsyncResult<CommonRequestResult[]>) => void,
913
+ error?: (error: ErrorEvent) => void,
894
914
  }): Promise<AsyncResult<CommonRequestResult[]>>;
895
915
 
896
916
  /**
@@ -904,8 +924,8 @@ export declare namespace EasemobChat {
904
924
  removeChatRoomMembers(this: Connection, params: {
905
925
  chatRoomId: string,
906
926
  users: string[],
907
- success?: (res: AsyncResult<CommonRequestResult[]>) => any,
908
- error?: (error: ErrorEvent) => any,
927
+ success?: (res: AsyncResult<CommonRequestResult[]>) => void,
928
+ error?: (error: ErrorEvent) => void,
909
929
  }): Promise<AsyncResult<CommonRequestResult[]>>;
910
930
 
911
931
  /**
@@ -918,8 +938,8 @@ export declare namespace EasemobChat {
918
938
  addUsersToChatRoom(this: Connection, params: {
919
939
  chatRoomId: string,
920
940
  users: string[],
921
- success?: (res: AsyncResult<AddUsersToChatRoomResult>) => any,
922
- error?: (error: ErrorEvent) => any,
941
+ success?: (res: AsyncResult<AddUsersToChatRoomResult>) => void,
942
+ error?: (error: ErrorEvent) => void,
923
943
  }): Promise<AsyncResult<AddUsersToChatRoomResult>>;
924
944
 
925
945
  /**
@@ -932,8 +952,8 @@ export declare namespace EasemobChat {
932
952
  joinChatRoom(this: Connection, params: {
933
953
  roomId: string,
934
954
  message?: string,
935
- success?: (res: AsyncResult<CommonRequestResult>) => any,
936
- error?: (error: ErrorEvent) => any,
955
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
956
+ error?: (error: ErrorEvent) => void,
937
957
  }): Promise<AsyncResult<CommonRequestResult>>;
938
958
 
939
959
  /**
@@ -945,8 +965,8 @@ export declare namespace EasemobChat {
945
965
  */
946
966
  quitChatRoom(this: Connection, params: {
947
967
  roomId: string,
948
- success?: (res: AsyncResult<{ result: boolean }>) => any,
949
- error?: (error: ErrorEvent) => any
968
+ success?: (res: AsyncResult<{ result: boolean }>) => void,
969
+ error?: (error: ErrorEvent) => void
950
970
  }): Promise<AsyncResult<{ result: boolean }>>;
951
971
 
952
972
  /** @deprecated */
@@ -954,8 +974,8 @@ export declare namespace EasemobChat {
954
974
  pageNum: number,
955
975
  pageSize: number,
956
976
  chatRoomId: string,
957
- success?: (res: AsyncResult<{ member: string }[]>) => any,
958
- error?: (error: ErrorEvent) => any,
977
+ success?: (res: AsyncResult<{ member: string }[]>) => void,
978
+ error?: (error: ErrorEvent) => void,
959
979
  }): Promise<AsyncResult<{ member: string }[]>>;
960
980
 
961
981
  /**
@@ -970,8 +990,8 @@ export declare namespace EasemobChat {
970
990
  pageNum: number,
971
991
  pageSize: number,
972
992
  chatRoomId: string,
973
- success?: (res: AsyncResult<{ member: string }[]>) => any,
974
- error?: (error: ErrorEvent) => any,
993
+ success?: (res: AsyncResult<{ member: string }[]>) => void,
994
+ error?: (error: ErrorEvent) => void,
975
995
  }): Promise<AsyncResult<{ member: string }[]>>;
976
996
 
977
997
  /**
@@ -983,8 +1003,8 @@ export declare namespace EasemobChat {
983
1003
  */
984
1004
  getChatRoomAdmin(this: Connection, params: {
985
1005
  chatRoomId: string,
986
- success?: (res: AsyncResult<GetChatRoomAdminResult>) => any,
987
- error?: (error: ErrorEvent) => any,
1006
+ success?: (res: AsyncResult<GetChatRoomAdminResult>) => void,
1007
+ error?: (error: ErrorEvent) => void,
988
1008
  }): Promise<AsyncResult<GetChatRoomAdminResult>>;
989
1009
 
990
1010
  /**
@@ -997,8 +1017,8 @@ export declare namespace EasemobChat {
997
1017
  setChatRoomAdmin(this: Connection, params: {
998
1018
  chatRoomId: string,
999
1019
  username: string,
1000
- success?: (res: AsyncResult<SetChatRoomAdminResult>) => any,
1001
- error?: (error: ErrorEvent) => any
1020
+ success?: (res: AsyncResult<SetChatRoomAdminResult>) => void,
1021
+ error?: (error: ErrorEvent) => void
1002
1022
  }): Promise<AsyncResult<SetChatRoomAdminResult>>;
1003
1023
 
1004
1024
  /**
@@ -1011,8 +1031,8 @@ export declare namespace EasemobChat {
1011
1031
  removeChatRoomAdmin(this: Connection, params: {
1012
1032
  chatRoomId: string,
1013
1033
  username: string,
1014
- success?: (res: AsyncResult<RemoveChatRoomAdminResult>) => any,
1015
- error?: (error: ErrorEvent) => any
1034
+ success?: (res: AsyncResult<RemoveChatRoomAdminResult>) => void,
1035
+ error?: (error: ErrorEvent) => void
1016
1036
  }): Promise<AsyncResult<RemoveChatRoomAdminResult>>;
1017
1037
 
1018
1038
  /**
@@ -1027,16 +1047,16 @@ export declare namespace EasemobChat {
1027
1047
  username: string,
1028
1048
  muteDuration: number,
1029
1049
  chatRoomId: string,
1030
- success?: (res: AsyncResult<MuteChatRoomMemberResult>) => any,
1031
- error?: (error: ErrorEvent) => any
1050
+ success?: (res: AsyncResult<MuteChatRoomMemberResult>) => void,
1051
+ error?: (error: ErrorEvent) => void
1032
1052
  }): Promise<AsyncResult<MuteChatRoomMemberResult>>;
1033
1053
 
1034
1054
  /** @deprecated */
1035
1055
  removeMuteChatRoomMember(this: Connection, params: {
1036
1056
  chatRoomId: string,
1037
1057
  username: string,
1038
- success?: (res: AsyncResult<UnmuteChatRoomMemberResult[]>) => any,
1039
- error?: (error: ErrorEvent) => any
1058
+ success?: (res: AsyncResult<UnmuteChatRoomMemberResult[]>) => void,
1059
+ error?: (error: ErrorEvent) => void
1040
1060
  }): Promise<AsyncResult<UnmuteChatRoomMemberResult[]>>;
1041
1061
 
1042
1062
  /**
@@ -1050,15 +1070,15 @@ export declare namespace EasemobChat {
1050
1070
  unmuteChatRoomMember(this: Connection, params: {
1051
1071
  chatRoomId: string,
1052
1072
  username: string,
1053
- success?: (res: AsyncResult<UnmuteChatRoomMemberResult[]>) => any,
1054
- error?: (error: ErrorEvent) => any
1073
+ success?: (res: AsyncResult<UnmuteChatRoomMemberResult[]>) => void,
1074
+ error?: (error: ErrorEvent) => void
1055
1075
  }): Promise<AsyncResult<UnmuteChatRoomMemberResult[]>>;
1056
1076
 
1057
1077
  /** @deprecated */
1058
1078
  getChatRoomMuted(this: Connection, params: {
1059
1079
  chatRoomId: string,
1060
- success?: (res: AsyncResult<GetChatRoomMuteListResult[]>) => any,
1061
- error?: (error: ErrorEvent) => any,
1080
+ success?: (res: AsyncResult<GetChatRoomMuteListResult[]>) => void,
1081
+ error?: (error: ErrorEvent) => void,
1062
1082
  }): Promise<AsyncResult<GetChatRoomMuteListResult[]>>;
1063
1083
 
1064
1084
  /**
@@ -1072,16 +1092,16 @@ export declare namespace EasemobChat {
1072
1092
  */
1073
1093
  getChatRoomMuteList(this: Connection, params: {
1074
1094
  chatRoomId: string,
1075
- success?: (res: AsyncResult<GetChatRoomMuteListResult[]>) => any,
1076
- error?: (error: ErrorEvent) => any,
1095
+ success?: (res: AsyncResult<GetChatRoomMuteListResult[]>) => void,
1096
+ error?: (error: ErrorEvent) => void,
1077
1097
  }): Promise<AsyncResult<GetChatRoomMuteListResult[]>>;
1078
1098
 
1079
1099
  /** @deprecated */
1080
1100
  chatRoomBlockSingle(this: Connection, params: {
1081
1101
  chatRoomId: string,
1082
1102
  username: string,
1083
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1084
- error?: (error: ErrorEvent) => any
1103
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1104
+ error?: (error: ErrorEvent) => void
1085
1105
  }): Promise<AsyncResult<CommonRequestResult>>;
1086
1106
 
1087
1107
  /**
@@ -1095,16 +1115,16 @@ export declare namespace EasemobChat {
1095
1115
  blockChatRoomMember(this: Connection, params: {
1096
1116
  chatRoomId: string,
1097
1117
  username: string,
1098
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1099
- error?: (error: ErrorEvent) => any
1118
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1119
+ error?: (error: ErrorEvent) => void
1100
1120
  }): Promise<AsyncResult<CommonRequestResult>>;
1101
1121
 
1102
1122
  /** @deprecated */
1103
1123
  chatRoomBlockMulti(this: Connection, params: {
1104
1124
  chatRoomId: string,
1105
1125
  usernames: string[],
1106
- success?: (res: AsyncResult<CommonRequestResult[]>) => any,
1107
- error?: (error: ErrorEvent) => any
1126
+ success?: (res: AsyncResult<CommonRequestResult[]>) => void,
1127
+ error?: (error: ErrorEvent) => void
1108
1128
  }): Promise<AsyncResult<CommonRequestResult[]>>;
1109
1129
 
1110
1130
  /**
@@ -1119,16 +1139,16 @@ export declare namespace EasemobChat {
1119
1139
  blockChatRoomMembers(this: Connection, params: {
1120
1140
  chatRoomId: string,
1121
1141
  usernames: string[],
1122
- success?: (res: AsyncResult<CommonRequestResult[]>) => any,
1123
- error?: (error: ErrorEvent) => any
1142
+ success?: (res: AsyncResult<CommonRequestResult[]>) => void,
1143
+ error?: (error: ErrorEvent) => void
1124
1144
  }): Promise<AsyncResult<CommonRequestResult[]>>;
1125
1145
 
1126
1146
  /** @deprecated */
1127
1147
  removeChatRoomBlockSingle(this: Connection, params: {
1128
1148
  chatRoomId: string,
1129
1149
  username: string,
1130
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1131
- error?: (error: ErrorEvent) => any,
1150
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1151
+ error?: (error: ErrorEvent) => void,
1132
1152
  }): Promise<AsyncResult<CommonRequestResult>>;
1133
1153
 
1134
1154
  /**
@@ -1142,16 +1162,16 @@ export declare namespace EasemobChat {
1142
1162
  unblockChatRoomMember(this: Connection, params: {
1143
1163
  chatRoomId: string,
1144
1164
  username: string,
1145
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1146
- error?: (error: ErrorEvent) => any,
1165
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1166
+ error?: (error: ErrorEvent) => void,
1147
1167
  }): Promise<AsyncResult<CommonRequestResult>>;
1148
1168
 
1149
1169
  /** @deprecated */
1150
1170
  removeChatRoomBlockMulti(this: Connection, params: {
1151
1171
  chatRoomId: string,
1152
1172
  usernames: string[],
1153
- success?: (res: AsyncResult<CommonRequestResult[]>) => any,
1154
- error?: (error: ErrorEvent) => any
1173
+ success?: (res: AsyncResult<CommonRequestResult[]>) => void,
1174
+ error?: (error: ErrorEvent) => void
1155
1175
  }): Promise<AsyncResult<CommonRequestResult[]>>;
1156
1176
 
1157
1177
  /**
@@ -1166,15 +1186,15 @@ export declare namespace EasemobChat {
1166
1186
  unblockChatRoomMembers(this: Connection, params: {
1167
1187
  chatRoomId: string,
1168
1188
  usernames: string[],
1169
- success?: (res: AsyncResult<CommonRequestResult[]>) => any,
1170
- error?: (error: ErrorEvent) => any
1189
+ success?: (res: AsyncResult<CommonRequestResult[]>) => void,
1190
+ error?: (error: ErrorEvent) => void
1171
1191
  }): Promise<AsyncResult<CommonRequestResult[]>>;
1172
1192
 
1173
1193
  /** @deprecated */
1174
1194
  getChatRoomBlacklistNew(this: Connection, params: {
1175
1195
  chatRoomId: string,
1176
- success?: (res: AsyncResult<UserId[]>) => any,
1177
- error?: (error: ErrorEvent) => any
1196
+ success?: (res: AsyncResult<UserId[]>) => void,
1197
+ error?: (error: ErrorEvent) => void
1178
1198
  }): Promise<AsyncResult<UserId[]>>;
1179
1199
 
1180
1200
  /**
@@ -1187,8 +1207,8 @@ export declare namespace EasemobChat {
1187
1207
  */
1188
1208
  getChatRoomBlacklist(this: Connection, params: {
1189
1209
  chatRoomId: string,
1190
- success?: (res: AsyncResult<UserId[]>) => any,
1191
- error?: (error: ErrorEvent) => any
1210
+ success?: (res: AsyncResult<UserId[]>) => void,
1211
+ error?: (error: ErrorEvent) => void
1192
1212
  }): Promise<AsyncResult<UserId[]>>;
1193
1213
 
1194
1214
  /**
@@ -1200,8 +1220,8 @@ export declare namespace EasemobChat {
1200
1220
  */
1201
1221
  disableSendChatRoomMsg(this: Connection, params: {
1202
1222
  chatRoomId: string,
1203
- success?: (res: AsyncResult<WhetherAbleSendChatRoomMsgResult>) => any,
1204
- error?: (errror: ErrorEvent) => any
1223
+ success?: (res: AsyncResult<WhetherAbleSendChatRoomMsgResult>) => void,
1224
+ error?: (errror: ErrorEvent) => void
1205
1225
  }): Promise<AsyncResult<WhetherAbleSendChatRoomMsgResult>>;
1206
1226
 
1207
1227
  /**
@@ -1213,8 +1233,8 @@ export declare namespace EasemobChat {
1213
1233
  */
1214
1234
  enableSendChatRoomMsg(this: Connection, params: {
1215
1235
  chatRoomId: string,
1216
- success?: (res: AsyncResult<WhetherAbleSendChatRoomMsgResult>) => any,
1217
- error?: (errror: ErrorEvent) => any
1236
+ success?: (res: AsyncResult<WhetherAbleSendChatRoomMsgResult>) => void,
1237
+ error?: (errror: ErrorEvent) => void
1218
1238
  }): Promise<AsyncResult<WhetherAbleSendChatRoomMsgResult>>;
1219
1239
 
1220
1240
  /**
@@ -1227,16 +1247,16 @@ export declare namespace EasemobChat {
1227
1247
  addUsersToChatRoomWhitelist(this: Connection, params: {
1228
1248
  chatRoomId: string,
1229
1249
  users: string[],
1230
- success?: (res: AsyncResult<CommonRequestResult | CommonRequestResult[]>) => any,
1231
- error?: (error: ErrorEvent) => any
1250
+ success?: (res: AsyncResult<CommonRequestResult | CommonRequestResult[]>) => void,
1251
+ error?: (error: ErrorEvent) => void
1232
1252
  }): Promise<AsyncResult<CommonRequestResult | CommonRequestResult[]>>;
1233
1253
 
1234
1254
  /** @deprecated */
1235
1255
  rmUsersFromChatRoomWhitelist(this: Connection, params: {
1236
1256
  chatRoomId: string,
1237
1257
  userName: string,
1238
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1239
- error?: (error: ErrorEvent) => any
1258
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1259
+ error?: (error: ErrorEvent) => void
1240
1260
  }): Promise<AsyncResult<CommonRequestResult>>;
1241
1261
 
1242
1262
  /**
@@ -1250,8 +1270,8 @@ export declare namespace EasemobChat {
1250
1270
  removeChatRoomWhitelistMember(this: Connection, params: {
1251
1271
  chatRoomId: string,
1252
1272
  userName: string,
1253
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1254
- error?: (error: ErrorEvent) => any
1273
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1274
+ error?: (error: ErrorEvent) => void
1255
1275
  }): Promise<AsyncResult<CommonRequestResult>>;
1256
1276
 
1257
1277
  /**
@@ -1263,8 +1283,8 @@ export declare namespace EasemobChat {
1263
1283
  */
1264
1284
  getChatRoomWhitelist(this: Connection, params: {
1265
1285
  chatRoomId: string,
1266
- success: (res: AsyncResult<UserId[]>) => any,
1267
- error: (error: ErrorEvent) => any
1286
+ success: (res: AsyncResult<UserId[]>) => void,
1287
+ error: (error: ErrorEvent) => void
1268
1288
  }): Promise<AsyncResult<UserId[]>>;
1269
1289
 
1270
1290
  /**
@@ -1277,8 +1297,8 @@ export declare namespace EasemobChat {
1277
1297
  isChatRoomWhiteUser(this: Connection, params: {
1278
1298
  chatRoomId: string,
1279
1299
  userName: string,
1280
- success?: (res: AsyncResult<IsChatRoomWhiteUserResult>) => any,
1281
- error?: (error: ErrorEvent) => any
1300
+ success?: (res: AsyncResult<IsChatRoomWhiteUserResult>) => void,
1301
+ error?: (error: ErrorEvent) => void
1282
1302
  }): Promise<AsyncResult<IsChatRoomWhiteUserResult>>;
1283
1303
 
1284
1304
  /**
@@ -1290,8 +1310,8 @@ export declare namespace EasemobChat {
1290
1310
  */
1291
1311
  fetchChatRoomAnnouncement(this: Connection, params: {
1292
1312
  roomId: string,
1293
- success?: (res: AsyncResult<FetchChatRoomAnnouncementResult>) => any,
1294
- error?: (error: ErrorEvent) => any
1313
+ success?: (res: AsyncResult<FetchChatRoomAnnouncementResult>) => void,
1314
+ error?: (error: ErrorEvent) => void
1295
1315
  }): Promise<AsyncResult<FetchChatRoomAnnouncementResult>>;
1296
1316
 
1297
1317
  /**
@@ -1304,8 +1324,8 @@ export declare namespace EasemobChat {
1304
1324
  updateChatRoomAnnouncement(this: Connection, params: {
1305
1325
  roomId: string,
1306
1326
  announcement: string,
1307
- success: (res: AsyncResult<UpdateChatRoomAnnouncementResult>) => any,
1308
- error: (error: ErrorEvent) => any
1327
+ success: (res: AsyncResult<UpdateChatRoomAnnouncementResult>) => void,
1328
+ error: (error: ErrorEvent) => void
1309
1329
  }): Promise<AsyncResult<UpdateChatRoomAnnouncementResult>>;
1310
1330
 
1311
1331
  /**
@@ -1318,11 +1338,11 @@ export declare namespace EasemobChat {
1318
1338
  */
1319
1339
  uploadChatRoomSharedFile(this: Connection, params: {
1320
1340
  roomId: string,
1321
- file: Object,
1322
- onFileUploadProgress?: (data: any) => any,
1323
- onFileUploadComplete?: (data: any) => any,
1324
- onFileUploadError?: (data: any) => any,
1325
- onFileUploadCanceled?: (data: any) => any,
1341
+ file: object,
1342
+ onFileUploadProgress?: (data: any) => void,
1343
+ onFileUploadComplete?: (data: any) => void,
1344
+ onFileUploadError?: (data: any) => void,
1345
+ onFileUploadCanceled?: (data: any) => void,
1326
1346
  }): void;
1327
1347
 
1328
1348
  /**
@@ -1335,8 +1355,8 @@ export declare namespace EasemobChat {
1335
1355
  deleteChatRoomSharedFile(this: Connection, params: {
1336
1356
  roomId: string,
1337
1357
  fileId: string,
1338
- success?: (res: AsyncResult<DeleteChatRoomSharedFileResult>) => any,
1339
- error?: (error: ErrorEvent) => any
1358
+ success?: (res: AsyncResult<DeleteChatRoomSharedFileResult>) => void,
1359
+ error?: (error: ErrorEvent) => void
1340
1360
  }): Promise<AsyncResult<DeleteChatRoomSharedFileResult>>;
1341
1361
 
1342
1362
  /**
@@ -1348,8 +1368,8 @@ export declare namespace EasemobChat {
1348
1368
  */
1349
1369
  fetchChatRoomSharedFileList(this: Connection, params: {
1350
1370
  roomId: string,
1351
- success?: (res: AsyncResult<FetchChatRoomSharedFileListResult[]>) => any,
1352
- error?: (error: ErrorEvent) => any
1371
+ success?: (res: AsyncResult<FetchChatRoomSharedFileListResult[]>) => void,
1372
+ error?: (error: ErrorEvent) => void
1353
1373
  }): Promise<AsyncResult<FetchChatRoomSharedFileListResult[]>>;
1354
1374
 
1355
1375
 
@@ -1365,8 +1385,8 @@ export declare namespace EasemobChat {
1365
1385
  allowinvites: boolean,
1366
1386
  inviteNeedConfirm: boolean
1367
1387
  },
1368
- success?: (res: AsyncResult<CreateGroupResult>) => any,
1369
- error?: (error: ErrorEvent) => any
1388
+ success?: (res: AsyncResult<CreateGroupResult>) => void,
1389
+ error?: (error: ErrorEvent) => void
1370
1390
  }): Promise<AsyncResult<CreateGroupResult>>;
1371
1391
 
1372
1392
  /**
@@ -1397,15 +1417,15 @@ export declare namespace EasemobChat {
1397
1417
  allowinvites: boolean,
1398
1418
  inviteNeedConfirm: boolean
1399
1419
  },
1400
- success?: (res: AsyncResult<CreateGroupResult>) => any,
1401
- error?: (error: ErrorEvent) => any
1420
+ success?: (res: AsyncResult<CreateGroupResult>) => void,
1421
+ error?: (error: ErrorEvent) => void
1402
1422
  }): Promise<AsyncResult<CreateGroupResult>>;
1403
1423
 
1404
1424
  /** @deprecated */
1405
1425
  blockGroup(this: Connection, params: {
1406
1426
  groupId: string,
1407
- success?: (res: AsyncResult<BlockGroupResult>) => any,
1408
- error?: (error: ErrorEvent) => any
1427
+ success?: (res: AsyncResult<BlockGroupResult>) => void,
1428
+ error?: (error: ErrorEvent) => void
1409
1429
  }): Promise<AsyncResult<BlockGroupResult>>;
1410
1430
 
1411
1431
  /**
@@ -1417,8 +1437,8 @@ export declare namespace EasemobChat {
1417
1437
  */
1418
1438
  blockGroupMessages(this: Connection, params: {
1419
1439
  groupId: string,
1420
- success?: (res: AsyncResult<BlockGroupResult>) => any,
1421
- error?: (error: ErrorEvent) => any
1440
+ success?: (res: AsyncResult<BlockGroupResult>) => void,
1441
+ error?: (error: ErrorEvent) => void
1422
1442
  }): Promise<AsyncResult<BlockGroupResult>>;
1423
1443
 
1424
1444
  /**
@@ -1432,8 +1452,8 @@ export declare namespace EasemobChat {
1432
1452
  listGroups(this: Connection, params: {
1433
1453
  limit: number,
1434
1454
  cursor?: string,
1435
- success?: (res: AsyncResult<BaseGroupInfo[]>) => any,
1436
- error?: (error: ErrorEvent) => any
1455
+ success?: (res: AsyncResult<BaseGroupInfo[]>) => void,
1456
+ error?: (error: ErrorEvent) => void
1437
1457
  }): Promise<AsyncResult<BaseGroupInfo[]>>;
1438
1458
 
1439
1459
  /**
@@ -1445,16 +1465,16 @@ export declare namespace EasemobChat {
1445
1465
  * @since 1.4.11
1446
1466
  */
1447
1467
  getGroup(this: Connection, params?: {
1448
- success?: (res: AsyncResult<BaseGroupInfo[]>) => any,
1449
- error?: (error: ErrorEvent) => any
1468
+ success?: (res: AsyncResult<BaseGroupInfo[]>) => void,
1469
+ error?: (error: ErrorEvent) => void
1450
1470
  }): Promise<AsyncResult<BaseGroupInfo[]>>;
1451
1471
 
1452
1472
  /** @deprecated */
1453
1473
  changeOwner(this: Connection, params: {
1454
1474
  groupId: string,
1455
1475
  newOwner: UserId,
1456
- success?: (res: AsyncResult<ChangeGroupOwnerResult>) => any,
1457
- error?: (error: ErrorEvent) => any
1476
+ success?: (res: AsyncResult<ChangeGroupOwnerResult>) => void,
1477
+ error?: (error: ErrorEvent) => void
1458
1478
  }): Promise<AsyncResult<ChangeGroupOwnerResult>>;
1459
1479
 
1460
1480
  /**
@@ -1468,8 +1488,8 @@ export declare namespace EasemobChat {
1468
1488
  changeGroupOwner(this: Connection, params: {
1469
1489
  groupId: string,
1470
1490
  newOwner: UserId,
1471
- success?: (res: AsyncResult<ChangeGroupOwnerResult>) => any,
1472
- error?: (error: ErrorEvent) => any
1491
+ success?: (res: AsyncResult<ChangeGroupOwnerResult>) => void,
1492
+ error?: (error: ErrorEvent) => void
1473
1493
  }): Promise<AsyncResult<ChangeGroupOwnerResult>>;
1474
1494
 
1475
1495
  /**
@@ -1481,8 +1501,8 @@ export declare namespace EasemobChat {
1481
1501
  */
1482
1502
  getGroupInfo(this: Connection, params: {
1483
1503
  groupId: string,
1484
- success?: (res: AsyncResult<GroupDetailInfo[]>) => any,
1485
- error?: (error: ErrorEvent) => any
1504
+ success?: (res: AsyncResult<GroupDetailInfo[]>) => void,
1505
+ error?: (error: ErrorEvent) => void
1486
1506
  }): Promise<AsyncResult<GroupDetailInfo[]>>;
1487
1507
 
1488
1508
  /**
@@ -1496,8 +1516,8 @@ export declare namespace EasemobChat {
1496
1516
  groupId: string,
1497
1517
  groupName: string,
1498
1518
  description: string
1499
- success?: (res: AsyncResult<ModifyGroupResult>) => any,
1500
- error?: (error: ErrorEvent) => any
1519
+ success?: (res: AsyncResult<ModifyGroupResult>) => void,
1520
+ error?: (error: ErrorEvent) => void
1501
1521
  }): Promise<AsyncResult<ModifyGroupResult>>;
1502
1522
 
1503
1523
  /** @deprecated */
@@ -1505,8 +1525,8 @@ export declare namespace EasemobChat {
1505
1525
  groupId: string,
1506
1526
  pageNum: number,
1507
1527
  pageSize: number,
1508
- success?: (res: AsyncResult<GroupMember[]>) => any,
1509
- error?: (error: ErrorEvent) => any
1528
+ success?: (res: AsyncResult<GroupMember[]>) => void,
1529
+ error?: (error: ErrorEvent) => void
1510
1530
  }): Promise<AsyncResult<GroupMember[]>>;
1511
1531
 
1512
1532
  /**
@@ -1521,8 +1541,8 @@ export declare namespace EasemobChat {
1521
1541
  groupId: string,
1522
1542
  pageNum: number,
1523
1543
  pageSize: number,
1524
- success?: (res: AsyncResult<GroupMember[]>) => any,
1525
- error?: (error: ErrorEvent) => any
1544
+ success?: (res: AsyncResult<GroupMember[]>) => void,
1545
+ error?: (error: ErrorEvent) => void
1526
1546
  }): Promise<AsyncResult<GroupMember[]>>;
1527
1547
 
1528
1548
  /**
@@ -1534,16 +1554,16 @@ export declare namespace EasemobChat {
1534
1554
  */
1535
1555
  getGroupAdmin(this: Connection, params: {
1536
1556
  groupId: string,
1537
- success?: (res: AsyncResult<UserId[]>) => any,
1538
- error?: (error: ErrorEvent) => any
1557
+ success?: (res: AsyncResult<UserId[]>) => void,
1558
+ error?: (error: ErrorEvent) => void
1539
1559
  }): Promise<AsyncResult<UserId[]>>;
1540
1560
 
1541
1561
  /** @deprecated */
1542
1562
  setAdmin(this: Connection, params: {
1543
1563
  groupId: string,
1544
1564
  username: UserId,
1545
- success?: (res: AsyncResult<SetGroupAdminResult>) => any,
1546
- error?: (error: ErrorEvent) => any
1565
+ success?: (res: AsyncResult<SetGroupAdminResult>) => void,
1566
+ error?: (error: ErrorEvent) => void
1547
1567
  }): Promise<AsyncResult<SetGroupAdminResult>>;
1548
1568
 
1549
1569
  /**
@@ -1557,8 +1577,8 @@ export declare namespace EasemobChat {
1557
1577
  setGroupAdmin(this: Connection, params: {
1558
1578
  groupId: string,
1559
1579
  username: UserId,
1560
- success?: (res: AsyncResult<SetGroupAdminResult>) => any,
1561
- error?: (error: ErrorEvent) => any
1580
+ success?: (res: AsyncResult<SetGroupAdminResult>) => void,
1581
+ error?: (error: ErrorEvent) => void
1562
1582
  }): Promise<AsyncResult<SetGroupAdminResult>>;
1563
1583
 
1564
1584
  /**
@@ -1571,15 +1591,15 @@ export declare namespace EasemobChat {
1571
1591
  removeAdmin(this: Connection, params: {
1572
1592
  groupId: string,
1573
1593
  username: string,
1574
- success?: (res: AsyncResult<RemoveGroupAdminResult>) => any,
1575
- error?: (error: ErrorEvent) => any
1594
+ success?: (res: AsyncResult<RemoveGroupAdminResult>) => void,
1595
+ error?: (error: ErrorEvent) => void
1576
1596
  }): Promise<AsyncResult<RemoveGroupAdminResult>>;
1577
1597
 
1578
1598
  /** @deprecated */
1579
1599
  dissolveGroup(this: Connection, params: {
1580
1600
  groupId: string,
1581
- success?: (res: AsyncResult<DestroyGroupResult>) => any,
1582
- error?: (error: ErrorEvent) => any
1601
+ success?: (res: AsyncResult<DestroyGroupResult>) => void,
1602
+ error?: (error: ErrorEvent) => void
1583
1603
  }): Promise<AsyncResult<DestroyGroupResult>>;
1584
1604
 
1585
1605
  /**
@@ -1592,8 +1612,8 @@ export declare namespace EasemobChat {
1592
1612
  */
1593
1613
  destroyGroup(this: Connection, params: {
1594
1614
  groupId: string,
1595
- success?: (res: AsyncResult<DestroyGroupResult>) => any,
1596
- error?: (error: ErrorEvent) => any
1615
+ success?: (res: AsyncResult<DestroyGroupResult>) => void,
1616
+ error?: (error: ErrorEvent) => void
1597
1617
  }): Promise<AsyncResult<DestroyGroupResult>>;
1598
1618
 
1599
1619
  /**
@@ -1605,16 +1625,16 @@ export declare namespace EasemobChat {
1605
1625
  */
1606
1626
  quitGroup(this: Connection, params: {
1607
1627
  groupId: string,
1608
- success?: (res: AsyncResult<{ result: true }>) => any,
1609
- error?: (error: ErrorEvent) => any
1628
+ success?: (res: AsyncResult<{ result: true }>) => void,
1629
+ error?: (error: ErrorEvent) => void
1610
1630
  }): Promise<AsyncResult<{ result: true }>>;
1611
1631
 
1612
1632
  /** @deprecated */
1613
1633
  inviteToGroup(this: Connection, params: {
1614
1634
  groupId: string,
1615
1635
  users: UserId[],
1616
- success?: (res: AsyncResult<InviteUsersToGroupResult[]>) => any,
1617
- error?: (error: ErrorEvent) => any
1636
+ success?: (res: AsyncResult<InviteUsersToGroupResult[]>) => void,
1637
+ error?: (error: ErrorEvent) => void
1618
1638
  }): Promise<AsyncResult<InviteUsersToGroupResult[]>>;
1619
1639
 
1620
1640
  /**
@@ -1628,8 +1648,8 @@ export declare namespace EasemobChat {
1628
1648
  inviteUsersToGroup(this: Connection, params: {
1629
1649
  groupId: string,
1630
1650
  users: UserId[],
1631
- success?: (res: AsyncResult<InviteUsersToGroupResult[]>) => any,
1632
- error?: (error: ErrorEvent) => any
1651
+ success?: (res: AsyncResult<InviteUsersToGroupResult[]>) => void,
1652
+ error?: (error: ErrorEvent) => void
1633
1653
  }): Promise<AsyncResult<InviteUsersToGroupResult[]>>;
1634
1654
 
1635
1655
  /**
@@ -1643,16 +1663,16 @@ export declare namespace EasemobChat {
1643
1663
  joinGroup(this: Connection, params: {
1644
1664
  groupId: string,
1645
1665
  message: string,
1646
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1647
- error?: (error: ErrorEvent) => any
1666
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1667
+ error?: (error: ErrorEvent) => void
1648
1668
  }): Promise<AsyncResult<CommonRequestResult>>;
1649
1669
 
1650
1670
  /** @deprecated */
1651
1671
  agreeJoinGroup(this: Connection, params: {
1652
1672
  applicant: UserId,
1653
1673
  groupId: string,
1654
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1655
- error?: (error: ErrorEvent) => any
1674
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1675
+ error?: (error: ErrorEvent) => void
1656
1676
  }): Promise<AsyncResult<CommonRequestResult>>;
1657
1677
 
1658
1678
  /**
@@ -1666,8 +1686,8 @@ export declare namespace EasemobChat {
1666
1686
  acceptGroupJoinRequest(this: Connection, params: {
1667
1687
  applicant: UserId,
1668
1688
  groupId: string,
1669
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1670
- error?: (error: ErrorEvent) => any
1689
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1690
+ error?: (error: ErrorEvent) => void
1671
1691
  }): Promise<AsyncResult<CommonRequestResult>>;
1672
1692
 
1673
1693
  /** @deprecated */
@@ -1675,8 +1695,8 @@ export declare namespace EasemobChat {
1675
1695
  applicant: UserId,
1676
1696
  groupId: string,
1677
1697
  reason: string,
1678
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1679
- error?: (error: ErrorEvent) => any
1698
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1699
+ error?: (error: ErrorEvent) => void
1680
1700
  }): Promise<AsyncResult<CommonRequestResult>>;
1681
1701
 
1682
1702
  /**
@@ -1691,16 +1711,16 @@ export declare namespace EasemobChat {
1691
1711
  applicant: UserId,
1692
1712
  groupId: string,
1693
1713
  reason: string,
1694
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1695
- error?: (error: ErrorEvent) => any
1714
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1715
+ error?: (error: ErrorEvent) => void
1696
1716
  }): Promise<AsyncResult<CommonRequestResult>>;
1697
1717
 
1698
1718
  /** @deprecated */
1699
1719
  agreeInviteIntoGroup(this: Connection, params: {
1700
1720
  invitee: UserId,
1701
1721
  groupId: string,
1702
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1703
- error?: (error: ErrorEvent) => any
1722
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1723
+ error?: (error: ErrorEvent) => void
1704
1724
  }): Promise<AsyncResult<CommonRequestResult>>;
1705
1725
 
1706
1726
  /**
@@ -1714,16 +1734,16 @@ export declare namespace EasemobChat {
1714
1734
  acceptGroupInvite(this: Connection, params: {
1715
1735
  invitee: UserId,
1716
1736
  groupId: string,
1717
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1718
- error?: (error: ErrorEvent) => any
1737
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1738
+ error?: (error: ErrorEvent) => void
1719
1739
  }): Promise<AsyncResult<CommonRequestResult>>;
1720
1740
 
1721
1741
  /** @deprecated */
1722
1742
  rejectInviteIntoGroup(this: Connection, params: {
1723
1743
  invitee: UserId,
1724
1744
  groupId: string,
1725
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1726
- error?: (error: ErrorEvent) => any
1745
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1746
+ error?: (error: ErrorEvent) => void
1727
1747
  }): Promise<any>;
1728
1748
 
1729
1749
  /**
@@ -1737,16 +1757,16 @@ export declare namespace EasemobChat {
1737
1757
  rejectGroupInvite(this: Connection, params: {
1738
1758
  invitee: UserId,
1739
1759
  groupId: string,
1740
- success?: (res: AsyncResult<CommonRequestResult>) => any,
1741
- error?: (error: ErrorEvent) => any
1760
+ success?: (res: AsyncResult<CommonRequestResult>) => void,
1761
+ error?: (error: ErrorEvent) => void
1742
1762
  }): Promise<any>;
1743
1763
 
1744
1764
  /** @deprecated */
1745
1765
  removeSingleGroupMember(this: Connection, params: {
1746
1766
  groupId: string,
1747
1767
  username: UserId,
1748
- success?: (res: AsyncResult<RemoveGroupMemberResult>) => any,
1749
- error?: (error: ErrorEvent) => any
1768
+ success?: (res: AsyncResult<RemoveGroupMemberResult>) => void,
1769
+ error?: (error: ErrorEvent) => void
1750
1770
  }): Promise<AsyncResult<RemoveGroupMemberResult>>;
1751
1771
 
1752
1772
  /**
@@ -1760,16 +1780,16 @@ export declare namespace EasemobChat {
1760
1780
  removeGroupMember(this: Connection, params: {
1761
1781
  groupId: string,
1762
1782
  username: UserId,
1763
- success?: (res: AsyncResult<RemoveGroupMemberResult>) => any,
1764
- error?: (error: ErrorEvent) => any
1783
+ success?: (res: AsyncResult<RemoveGroupMemberResult>) => void,
1784
+ error?: (error: ErrorEvent) => void
1765
1785
  }): Promise<AsyncResult<RemoveGroupMemberResult>>;
1766
1786
 
1767
1787
  /** @deprecated */
1768
1788
  removeMultiGroupMember(this: Connection, params: {
1769
1789
  groupId: string,
1770
1790
  users: UserId[],
1771
- success?: (res: AsyncResult<RemoveGroupMemberResult[]>) => any,
1772
- error?: (error: ErrorEvent) => any
1791
+ success?: (res: AsyncResult<RemoveGroupMemberResult[]>) => void,
1792
+ error?: (error: ErrorEvent) => void
1773
1793
  }): Promise<AsyncResult<RemoveGroupMemberResult[]>>;
1774
1794
 
1775
1795
  /**
@@ -1783,8 +1803,8 @@ export declare namespace EasemobChat {
1783
1803
  removeGroupMembers(this: Connection, params: {
1784
1804
  groupId: string,
1785
1805
  users: UserId[],
1786
- success?: (res: AsyncResult<RemoveGroupMemberResult[]>) => any,
1787
- error?: (error: ErrorEvent) => any
1806
+ success?: (res: AsyncResult<RemoveGroupMemberResult[]>) => void,
1807
+ error?: (error: ErrorEvent) => void
1788
1808
  }): Promise<AsyncResult<RemoveGroupMemberResult[]>>;
1789
1809
 
1790
1810
  /** @deprecated */
@@ -1792,8 +1812,8 @@ export declare namespace EasemobChat {
1792
1812
  username: UserId,
1793
1813
  muteDuration: number,
1794
1814
  groupId: string,
1795
- success?: (res: AsyncResult<MuteGroupMemberResult[]>) => any,
1796
- error?: (error: ErrorEvent) => any
1815
+ success?: (res: AsyncResult<MuteGroupMemberResult[]>) => void,
1816
+ error?: (error: ErrorEvent) => void
1797
1817
  }): Promise<AsyncResult<MuteGroupMemberResult[]>>;
1798
1818
 
1799
1819
  /**
@@ -1808,16 +1828,16 @@ export declare namespace EasemobChat {
1808
1828
  username: UserId,
1809
1829
  muteDuration: number,
1810
1830
  groupId: string,
1811
- success?: (res: AsyncResult<MuteGroupMemberResult[]>) => any,
1812
- error?: (error: ErrorEvent) => any
1831
+ success?: (res: AsyncResult<MuteGroupMemberResult[]>) => void,
1832
+ error?: (error: ErrorEvent) => void
1813
1833
  }): Promise<AsyncResult<MuteGroupMemberResult[]>>;
1814
1834
 
1815
1835
  /** @deprecated */
1816
1836
  removeMute(this: Connection, params: {
1817
1837
  groupId: string,
1818
1838
  username: UserId,
1819
- success?: (res: AsyncResult<UnmuteGroupMemberResult[]>) => any,
1820
- error?: (error: ErrorEvent) => any
1839
+ success?: (res: AsyncResult<UnmuteGroupMemberResult[]>) => void,
1840
+ error?: (error: ErrorEvent) => void
1821
1841
  }): Promise<AsyncResult<UnmuteGroupMemberResult[]>>
1822
1842
 
1823
1843
  /**
@@ -1831,15 +1851,15 @@ export declare namespace EasemobChat {
1831
1851
  unmuteGroupMember(this: Connection, params: {
1832
1852
  groupId: string,
1833
1853
  username: UserId,
1834
- success?: (res: AsyncResult<UnmuteGroupMemberResult[]>) => any,
1835
- error?: (error: ErrorEvent) => any
1854
+ success?: (res: AsyncResult<UnmuteGroupMemberResult[]>) => void,
1855
+ error?: (error: ErrorEvent) => void
1836
1856
  }): Promise<AsyncResult<UnmuteGroupMemberResult[]>>
1837
1857
 
1838
1858
  /** @deprecated */
1839
1859
  getMuted(this: Connection, params: {
1840
1860
  groupId: string,
1841
- success?: (res: AsyncResult<GetGroupMuteListResult[]>) => any,
1842
- error?: (error: ErrorEvent) => any
1861
+ success?: (res: AsyncResult<GetGroupMuteListResult[]>) => void,
1862
+ error?: (error: ErrorEvent) => void
1843
1863
  }): Promise<AsyncResult<GetGroupMuteListResult[]>>;
1844
1864
 
1845
1865
  /**
@@ -1852,16 +1872,16 @@ export declare namespace EasemobChat {
1852
1872
  */
1853
1873
  getGroupMuteList(this: Connection, params: {
1854
1874
  groupId: string,
1855
- success?: (res: AsyncResult<GetGroupMuteListResult[]>) => any,
1856
- error?: (error: ErrorEvent) => any
1875
+ success?: (res: AsyncResult<GetGroupMuteListResult[]>) => void,
1876
+ error?: (error: ErrorEvent) => void
1857
1877
  }): Promise<AsyncResult<GetGroupMuteListResult[]>>;
1858
1878
 
1859
1879
  /** @deprecated */
1860
1880
  groupBlockSingle(this: Connection, params: {
1861
1881
  groupId: string,
1862
1882
  username: UserId,
1863
- success?: (res: AsyncResult<GroupRequestResult>) => any,
1864
- error?: (error: ErrorEvent) => any
1883
+ success?: (res: AsyncResult<GroupRequestResult>) => void,
1884
+ error?: (error: ErrorEvent) => void
1865
1885
  }): Promise<AsyncResult<GroupRequestResult>>;
1866
1886
 
1867
1887
  /**
@@ -1875,16 +1895,16 @@ export declare namespace EasemobChat {
1875
1895
  blockGroupMember(this: Connection, params: {
1876
1896
  groupId: string,
1877
1897
  username: UserId,
1878
- success?: (res: AsyncResult<GroupRequestResult>) => any,
1879
- error?: (error: ErrorEvent) => any
1898
+ success?: (res: AsyncResult<GroupRequestResult>) => void,
1899
+ error?: (error: ErrorEvent) => void
1880
1900
  }): Promise<AsyncResult<GroupRequestResult>>;
1881
1901
 
1882
1902
  /** @deprecated */
1883
1903
  groupBlockMulti(this: Connection, params: {
1884
1904
  groupId: string,
1885
1905
  usernames: UserId[],
1886
- success?: (res: AsyncResult<GroupRequestResult[]>) => any,
1887
- error?: (error: ErrorEvent) => any
1906
+ success?: (res: AsyncResult<GroupRequestResult[]>) => void,
1907
+ error?: (error: ErrorEvent) => void
1888
1908
  }): Promise<AsyncResult<GroupRequestResult[]>>;
1889
1909
 
1890
1910
  /**
@@ -1898,16 +1918,16 @@ export declare namespace EasemobChat {
1898
1918
  blockGroupMembers(this: Connection, params: {
1899
1919
  groupId: string,
1900
1920
  usernames: UserId[],
1901
- success?: (res: AsyncResult<GroupRequestResult[]>) => any,
1902
- error?: (error: ErrorEvent) => any
1921
+ success?: (res: AsyncResult<GroupRequestResult[]>) => void,
1922
+ error?: (error: ErrorEvent) => void
1903
1923
  }): Promise<AsyncResult<GroupRequestResult[]>>;
1904
1924
 
1905
1925
  /** @deprecated */
1906
1926
  removeGroupBlockSingle(this: Connection, params: {
1907
1927
  groupId: string,
1908
1928
  username: string,
1909
- success?: (res: AsyncResult<GroupRequestResult>) => any,
1910
- error?: (error: ErrorEvent) => any
1929
+ success?: (res: AsyncResult<GroupRequestResult>) => void,
1930
+ error?: (error: ErrorEvent) => void
1911
1931
  }): Promise<AsyncResult<GroupRequestResult>>;
1912
1932
 
1913
1933
  /**
@@ -1921,16 +1941,16 @@ export declare namespace EasemobChat {
1921
1941
  unblockGroupMember(this: Connection, params: {
1922
1942
  groupId: string,
1923
1943
  username: string,
1924
- success?: (res: AsyncResult<GroupRequestResult>) => any,
1925
- error?: (error: ErrorEvent) => any
1944
+ success?: (res: AsyncResult<GroupRequestResult>) => void,
1945
+ error?: (error: ErrorEvent) => void
1926
1946
  }): Promise<AsyncResult<GroupRequestResult>>;
1927
1947
 
1928
1948
  /** @deprecated */
1929
1949
  removeGroupBlockMulti(this: Connection, params: {
1930
1950
  groupId: string,
1931
1951
  usernames: UserId[],
1932
- success?: (res: AsyncResult<GroupRequestResult[]>) => any,
1933
- error?: (error: ErrorEvent) => any
1952
+ success?: (res: AsyncResult<GroupRequestResult[]>) => void,
1953
+ error?: (error: ErrorEvent) => void
1934
1954
  }): Promise<AsyncResult<GroupRequestResult[]>>;
1935
1955
 
1936
1956
  /**
@@ -1944,15 +1964,15 @@ export declare namespace EasemobChat {
1944
1964
  unblockGroupMembers(this: Connection, params: {
1945
1965
  groupId: string,
1946
1966
  usernames: UserId[],
1947
- success?: (res: AsyncResult<GroupRequestResult[]>) => any,
1948
- error?: (error: ErrorEvent) => any
1967
+ success?: (res: AsyncResult<GroupRequestResult[]>) => void,
1968
+ error?: (error: ErrorEvent) => void
1949
1969
  }): Promise<AsyncResult<GroupRequestResult[]>>;
1950
1970
 
1951
1971
  /** @deprecated */
1952
1972
  getGroupBlacklistNew(this: Connection, params: {
1953
1973
  groupId: string,
1954
- success?: (res: AsyncResult<UserId[]>) => any,
1955
- error?: (error: ErrorEvent) => any
1974
+ success?: (res: AsyncResult<UserId[]>) => void,
1975
+ error?: (error: ErrorEvent) => void
1956
1976
  }): Promise<AsyncResult<UserId[]>>;
1957
1977
 
1958
1978
  /**
@@ -1965,8 +1985,8 @@ export declare namespace EasemobChat {
1965
1985
  */
1966
1986
  getGroupBlacklist(this: Connection, params: {
1967
1987
  groupId: string,
1968
- success?: (res: AsyncResult<UserId[]>) => any,
1969
- error?: (error: ErrorEvent) => any
1988
+ success?: (res: AsyncResult<UserId[]>) => void,
1989
+ error?: (error: ErrorEvent) => void
1970
1990
  }): Promise<AsyncResult<UserId[]>>;
1971
1991
 
1972
1992
  /**
@@ -1978,8 +1998,8 @@ export declare namespace EasemobChat {
1978
1998
  */
1979
1999
  disableSendGroupMsg(this: Connection, params: {
1980
2000
  groupId: string,
1981
- success?: (res: AsyncResult<{ mute: true }>) => any,
1982
- error?: (error: ErrorEvent) => any
2001
+ success?: (res: AsyncResult<{ mute: true }>) => void,
2002
+ error?: (error: ErrorEvent) => void
1983
2003
  }): Promise<AsyncResult<{ mute: true }>>;
1984
2004
 
1985
2005
  /**
@@ -1991,8 +2011,8 @@ export declare namespace EasemobChat {
1991
2011
  */
1992
2012
  enableSendGroupMsg(this: Connection, params: {
1993
2013
  groupId: string,
1994
- success?: (res: AsyncResult<{ mute: false }>) => any,
1995
- error?: (error: ErrorEvent) => any
2014
+ success?: (res: AsyncResult<{ mute: false }>) => void,
2015
+ error?: (error: ErrorEvent) => void
1996
2016
  }): Promise<AsyncResult<{ mute: false }>>;
1997
2017
 
1998
2018
  /**
@@ -2005,16 +2025,16 @@ export declare namespace EasemobChat {
2005
2025
  addUsersToGroupWhitelist(this: Connection, params: {
2006
2026
  groupId: string,
2007
2027
  users: UserId[],
2008
- success?: (res: AsyncResult<GroupRequestResult[]>) => any,
2009
- error?: (error: ErrorEvent) => any
2028
+ success?: (res: AsyncResult<GroupRequestResult[]>) => void,
2029
+ error?: (error: ErrorEvent) => void
2010
2030
  }): Promise<AsyncResult<GroupRequestResult[]>>;
2011
2031
 
2012
2032
  /** @deprecated */
2013
2033
  rmUsersFromGroupWhitelist(this: Connection, params: {
2014
2034
  groupId: string,
2015
2035
  userName: UserId,
2016
- success?: (res: AsyncResult<GroupRequestResult>) => any,
2017
- error?: (error: ErrorEvent) => any
2036
+ success?: (res: AsyncResult<GroupRequestResult>) => void,
2037
+ error?: (error: ErrorEvent) => void
2018
2038
  }): Promise<AsyncResult<GroupRequestResult>>;
2019
2039
 
2020
2040
  /**
@@ -2029,8 +2049,8 @@ export declare namespace EasemobChat {
2029
2049
  removeGroupWhitelistMember(this: Connection, params: {
2030
2050
  groupId: string,
2031
2051
  userName: UserId,
2032
- success?: (res: AsyncResult<GroupRequestResult>) => any,
2033
- error?: (error: ErrorEvent) => any
2052
+ success?: (res: AsyncResult<GroupRequestResult>) => void,
2053
+ error?: (error: ErrorEvent) => void
2034
2054
  }): Promise<AsyncResult<GroupRequestResult>>;
2035
2055
 
2036
2056
  /**
@@ -2042,16 +2062,16 @@ export declare namespace EasemobChat {
2042
2062
  */
2043
2063
  getGroupWhitelist(this: Connection, params: {
2044
2064
  groupId: string,
2045
- success?: (res: AsyncResult<UserId[]>) => any,
2046
- error?: (error: ErrorEvent) => any
2065
+ success?: (res: AsyncResult<UserId[]>) => void,
2066
+ error?: (error: ErrorEvent) => void
2047
2067
  }): Promise<AsyncResult<UserId[]>>;
2048
2068
 
2049
2069
  /** @deprecated */
2050
2070
  isGroupWhiteUser(this: Connection, params: {
2051
2071
  groupId: string,
2052
2072
  userName: UserId,
2053
- success?: (res: AsyncResult<IsInGroupWhiteListResult>) => any,
2054
- error?: (error: ErrorEvent) => any
2073
+ success?: (res: AsyncResult<IsInGroupWhiteListResult>) => void,
2074
+ error?: (error: ErrorEvent) => void
2055
2075
  }): Promise<AsyncResult<IsInGroupWhiteListResult>>;
2056
2076
 
2057
2077
  /**
@@ -2065,8 +2085,8 @@ export declare namespace EasemobChat {
2065
2085
  isInGroupWhiteList(this: Connection, params: {
2066
2086
  groupId: string,
2067
2087
  userName: UserId,
2068
- success?: (res: AsyncResult<IsInGroupWhiteListResult>) => any,
2069
- error?: (error: ErrorEvent) => any
2088
+ success?: (res: AsyncResult<IsInGroupWhiteListResult>) => void,
2089
+ error?: (error: ErrorEvent) => void
2070
2090
  }): Promise<AsyncResult<IsInGroupWhiteListResult>>;
2071
2091
 
2072
2092
  /**
@@ -2079,8 +2099,8 @@ export declare namespace EasemobChat {
2079
2099
  getGroupMsgReadUser(this: Connection, params: {
2080
2100
  groupId: string,
2081
2101
  msgId: string,
2082
- success?: (res: AsyncResult<GetGroupMsgReadUserResult>) => any,
2083
- error?: (error: ErrorEvent) => any
2102
+ success?: (res: AsyncResult<GetGroupMsgReadUserResult>) => void,
2103
+ error?: (error: ErrorEvent) => void
2084
2104
  }): Promise<AsyncResult<GetGroupMsgReadUserResult>>;
2085
2105
 
2086
2106
  /**
@@ -2092,8 +2112,8 @@ export declare namespace EasemobChat {
2092
2112
  */
2093
2113
  fetchGroupAnnouncement(this: Connection, params: {
2094
2114
  groupId: string,
2095
- success?: (res: AsyncResult<{ announcement: string }>) => any,
2096
- error?: (error: ErrorEvent) => any
2115
+ success?: (res: AsyncResult<{ announcement: string }>) => void,
2116
+ error?: (error: ErrorEvent) => void
2097
2117
  }): Promise<AsyncResult<{ announcement: string }>>;
2098
2118
 
2099
2119
  /**
@@ -2106,8 +2126,8 @@ export declare namespace EasemobChat {
2106
2126
  updateGroupAnnouncement(this: Connection, params: {
2107
2127
  groupId: string,
2108
2128
  announcement: string,
2109
- success?: (res: AsyncResult<UpdateGroupAnnouncementResult>) => any,
2110
- error?: (error: ErrorEvent) => any
2129
+ success?: (res: AsyncResult<UpdateGroupAnnouncementResult>) => void,
2130
+ error?: (error: ErrorEvent) => void
2111
2131
  }): Promise<AsyncResult<UpdateGroupAnnouncementResult>>;
2112
2132
 
2113
2133
  /**
@@ -2119,11 +2139,11 @@ export declare namespace EasemobChat {
2119
2139
  */
2120
2140
  uploadGroupSharedFile(this: Connection, params: {
2121
2141
  groupId: string,
2122
- file: Object,
2123
- onFileUploadProgress?: (data: ProgressEvent) => any,
2124
- onFileUploadComplete?: (data: any) => any,
2125
- onFileUploadError?: (data: any) => any,
2126
- onFileUploadCanceled?: (data: any) => any,
2142
+ file: object,
2143
+ onFileUploadProgress?: (data: ProgressEvent) => void,
2144
+ onFileUploadComplete?: (data: any) => void,
2145
+ onFileUploadError?: (data: any) => void,
2146
+ onFileUploadCanceled?: (data: any) => void,
2127
2147
  }): void;
2128
2148
 
2129
2149
  /**
@@ -2136,8 +2156,8 @@ export declare namespace EasemobChat {
2136
2156
  deleteGroupSharedFile(this: Connection, params: {
2137
2157
  groupId: string,
2138
2158
  fileId: string,
2139
- success?: (res: AsyncResult<DeleteGroupSharedFileResult>) => any,
2140
- error?: (error: ErrorEvent) => any
2159
+ success?: (res: AsyncResult<DeleteGroupSharedFileResult>) => void,
2160
+ error?: (error: ErrorEvent) => void
2141
2161
  }): Promise<AsyncResult<DeleteGroupSharedFileResult>>;
2142
2162
 
2143
2163
  /**
@@ -2149,10 +2169,27 @@ export declare namespace EasemobChat {
2149
2169
  */
2150
2170
  fetchGroupSharedFileList(this: Connection, params: {
2151
2171
  groupId: string,
2152
- success?: (res: AsyncResult<FetchGroupSharedFileListResult>) => any,
2153
- error?: (error: ErrorEvent) => any
2172
+ pageNum?: number,
2173
+ pageSize?: number,
2174
+ success?: (res: AsyncResult<FetchGroupSharedFileListResult>) => void,
2175
+ error?: (error: ErrorEvent) => void
2154
2176
  }): Promise<AsyncResult<FetchGroupSharedFileListResult>>;
2155
2177
 
2178
+ /**
2179
+ * Down load group file.
2180
+ *
2181
+ * ```typescript
2182
+ * connection.downloadGroupSharedFile({groupId: 'groupId', fileId: 'fileId', onFileDownloadComplete: (data)=>{console.log(data)}})
2183
+ * ```
2184
+ */
2185
+ downloadGroupSharedFile(this: Connection, params: {
2186
+ groupId: string,
2187
+ fileId: string,
2188
+ secret?: string,
2189
+ onFileDownloadComplete?: (data: Blob) => void,
2190
+ onFileDownloadError?: (err: ErrorEvent) => void
2191
+ }): void
2192
+
2156
2193
  // Contact API
2157
2194
  /**
2158
2195
  * Gets friends blacklist.
@@ -2162,14 +2199,14 @@ export declare namespace EasemobChat {
2162
2199
  * ```
2163
2200
  */
2164
2201
  getBlacklist(this: Connection, params?: {
2165
- success?: (res: AsyncResult<UserId[]>) => any,
2166
- error?: (error: ErrorEvent) => any
2202
+ success?: (res: AsyncResult<UserId[]>) => void,
2203
+ error?: (error: ErrorEvent) => void
2167
2204
  }): Promise<AsyncResult<UserId[]>>;
2168
2205
 
2169
2206
  /** @deprecated */
2170
2207
  getRoster(this: Connection, params?: {
2171
- success?: (res: RosterData[]) => any,
2172
- error?: (error: ErrorEvent) => any
2208
+ success?: (res: RosterData[]) => void,
2209
+ error?: (error: ErrorEvent) => void
2173
2210
  }): Promise<AsyncResult<UserId[]>>;
2174
2211
 
2175
2212
  /**
@@ -2181,8 +2218,8 @@ export declare namespace EasemobChat {
2181
2218
  * @since v4.0.1
2182
2219
  */
2183
2220
  getContacts(this: Connection, params?: {
2184
- success?: (res: RosterData[]) => any,
2185
- error?: (error: ErrorEvent) => any
2221
+ success?: (res: RosterData[]) => void,
2222
+ error?: (error: ErrorEvent) => void
2186
2223
  }): Promise<AsyncResult<UserId[]>>;
2187
2224
 
2188
2225
  /** @deprecated */
@@ -2190,8 +2227,8 @@ export declare namespace EasemobChat {
2190
2227
  deviceId: string,
2191
2228
  deviceToken: string,
2192
2229
  notifierName: string
2193
- success?: (res: AsyncResult<UploadTokenResult>) => any,
2194
- error?: (error: ErrorEvent) => any
2230
+ success?: (res: AsyncResult<UploadTokenResult>) => void,
2231
+ error?: (error: ErrorEvent) => void
2195
2232
  }): Promise<AsyncResult<UploadTokenResult>>;
2196
2233
 
2197
2234
  /**
@@ -2206,8 +2243,8 @@ export declare namespace EasemobChat {
2206
2243
  deviceId: string,
2207
2244
  deviceToken: string,
2208
2245
  notifierName: string
2209
- success?: (res: AsyncResult<UploadTokenResult>) => any,
2210
- error?: (error: ErrorEvent) => any
2246
+ success?: (res: AsyncResult<UploadTokenResult>) => void,
2247
+ error?: (error: ErrorEvent) => void
2211
2248
  }): Promise<AsyncResult<UploadTokenResult>>;
2212
2249
 
2213
2250
  /**
@@ -2218,10 +2255,26 @@ export declare namespace EasemobChat {
2218
2255
  * ```
2219
2256
  */
2220
2257
  getSessionList(this: Connection, params?: {
2221
- success?: (res: AsyncResult<SessionInfo[]>) => any,
2222
- error?: (error: ErrorEvent) => any
2258
+ success?: (res: AsyncResult<SessionInfo[]>) => void,
2259
+ error?: (error: ErrorEvent) => void
2223
2260
  }): Promise<AsyncResult<SessionInfo[]>>;
2224
2261
 
2262
+ /**
2263
+ * Delete the session.
2264
+ *
2265
+ * ```typescript
2266
+ * connection.deleteSession()
2267
+ * ```
2268
+ */
2269
+ deleteSession(this: Connection, params: {
2270
+ channel: string;
2271
+ chatType: "singleChat" | "groupChat";
2272
+ deleteRoam: boolean;
2273
+ success?: (res: AsyncResult<DeleteSessionResult>) => void;
2274
+ error?: (error: ErrorEvent) => void;
2275
+ }
2276
+ ): Promise<AsyncResult<DeleteSessionResult>>
2277
+
2225
2278
  /**
2226
2279
  * Updates own information.
2227
2280
  *
@@ -2265,8 +2318,9 @@ export declare namespace EasemobChat {
2265
2318
  start?: number | null,
2266
2319
  count?: number,
2267
2320
  isGroup?: boolean,
2268
- success?: (res: MessageBody[]) => any,
2269
- fail?: (error: ErrorEvent) => any
2321
+ format?: boolean,
2322
+ success?: (res: MessageBody[]) => void,
2323
+ fail?: (error: ErrorEvent) => void
2270
2324
  }): Promise<MessageBody[]>;
2271
2325
 
2272
2326
  /**
@@ -2369,8 +2423,8 @@ export declare namespace EasemobChat {
2369
2423
  to: UserId,
2370
2424
  type?: 'chat' | 'groupchat' | 'chatroom' // v3.0
2371
2425
  chatType?: 'singleChat' | 'groupChat' | 'chatRoom', // v4.0
2372
- success?: (res: number) => any,
2373
- fail?: (error: ErrorEvent) => any,
2426
+ success?: (res: number) => void,
2427
+ fail?: (error: ErrorEvent) => void,
2374
2428
  }): Promise<SendMsgResult>;
2375
2429
 
2376
2430
  // listen @since 3.0
@@ -2442,7 +2496,7 @@ export declare namespace EasemobChat {
2442
2496
  * @deprecated v4.0.1
2443
2497
  */
2444
2498
  interface ListenParameters {
2445
- onOpened?: () => any;
2499
+ onOpened?: () => void;
2446
2500
  onPresence?: (msg: PresenceMsg) => void;
2447
2501
  onTextMessage?: (msg: TextMsgBody) => void;
2448
2502
  onPictureMessage?: (msg: ImgMsgBody) => void;
@@ -2516,12 +2570,9 @@ export declare namespace EasemobChat {
2516
2570
  useCookiePersist: boolean;
2517
2571
  storageLogLevelKey: string;
2518
2572
  levels: typeof Levels;
2519
- // logMethods: string[];
2520
- // methodFactory: any;
2521
2573
  logs: string[];
2522
2574
  config: Config;
2523
2575
  logBytes: number;
2524
- // [key: string]: any;
2525
2576
  constructor(name: string, defaultLevel: Level, factory?: any);
2526
2577
  setConfig(cofig: Config): void;
2527
2578
  /**
@@ -2549,16 +2600,6 @@ export declare namespace EasemobChat {
2549
2600
  * down load logs
2550
2601
  */
2551
2602
  download(): void;
2552
- // _bindMethod(obj: any, methodName: string, useCache: boolean): any;
2553
- // getTime(): string;
2554
- // _cacheLog(...rest: any[]): void;
2555
- // _cacheLogCall(log: any): void;
2556
- // _getPersistedLevel(): any;
2557
- // _persistLevel(levelNum: number): void;
2558
- // replaceLoggingMethods(level: LevelNum, loggerName: string): void;
2559
- // defaultMethodFactory(methodName: string, level: LevelNum, loggerName: string): any;
2560
- // realMethod(methodName: string): any;
2561
- // enableLoggingWhenConsoleArrives(methodName: string, level: LevelNum, loggerName: string): () => void;
2562
2603
  }
2563
2604
 
2564
2605
 
@@ -2568,7 +2609,12 @@ export declare namespace EasemobChat {
2568
2609
  type MessageType = 'read' | 'delivery' | 'channel' | 'txt' | 'cmd' | 'custom' | 'loc' | 'img' | 'audio' | 'file' | 'video';
2569
2610
 
2570
2611
  type ChatType = 'singleChat' | 'groupChat' | 'chatRoom';
2571
-
2612
+ interface FileObj {
2613
+ url: string,
2614
+ filename: string,
2615
+ filetype: string,
2616
+ data: File
2617
+ }
2572
2618
  interface PresenceMsg {
2573
2619
  type: OnPresenceMsgType,
2574
2620
  to: string,
@@ -2586,14 +2632,16 @@ export declare namespace EasemobChat {
2586
2632
  interface ReadMsgSetParameters {
2587
2633
  id: string,
2588
2634
  to: string,
2589
- from?: string
2635
+ from?: string,
2636
+ chatType: 'singleChat' | 'groupChat',
2590
2637
  }
2591
2638
  interface ReadMsgBody extends ReadMsgSetParameters {
2592
2639
  type: 'read';
2593
2640
  ackId?: string;
2594
2641
  mid?: string,
2595
- groupReadCount?: number;
2642
+ groupReadCount?: { [key: string]: number };
2596
2643
  ackContent?: string;
2644
+ chatType: 'singleChat' | 'groupChat',
2597
2645
  }
2598
2646
  interface ReadParameters {
2599
2647
  type: 'read',
@@ -2604,7 +2652,9 @@ export declare namespace EasemobChat {
2604
2652
  to: string,
2605
2653
  from?: string,
2606
2654
  type: 'read';
2607
- id: string;
2655
+ id: string,
2656
+ ackContent?: string,
2657
+ chatType: 'singleChat' | 'groupChat',
2608
2658
  }
2609
2659
 
2610
2660
  interface DeliveryParameters {
@@ -2696,6 +2746,7 @@ export declare namespace EasemobChat {
2696
2746
  msg: string,
2697
2747
  from?: string
2698
2748
  ext?: { [key: string]: any },
2749
+ msgConfig?: { allowGroupAck: boolean }
2699
2750
  }
2700
2751
 
2701
2752
  interface CmdParameters {
@@ -2737,6 +2788,7 @@ export declare namespace EasemobChat {
2737
2788
  from?: string
2738
2789
  roomType?: boolean,
2739
2790
  ext?: { [key: string]: any },
2791
+ msgConfig?: { allowGroupAck: boolean }
2740
2792
  }
2741
2793
 
2742
2794
 
@@ -2782,6 +2834,7 @@ export declare namespace EasemobChat {
2782
2834
  customExts: { [key: string]: any }
2783
2835
  from?: string
2784
2836
  ext?: { [key: string]: any },
2837
+ msgConfig?: { allowGroupAck: boolean }
2785
2838
  }
2786
2839
 
2787
2840
  interface LocationParameters {
@@ -2792,6 +2845,7 @@ export declare namespace EasemobChat {
2792
2845
  chatType: ChatType,
2793
2846
  to: string,
2794
2847
  addr: string,
2848
+ buildingName: string,
2795
2849
  lat: number,
2796
2850
  lng: number,
2797
2851
  from?: string
@@ -2807,6 +2861,7 @@ export declare namespace EasemobChat {
2807
2861
  type: 'loc',
2808
2862
  to: string,
2809
2863
  addr: string,
2864
+ buildingName: string,
2810
2865
  lat: number,
2811
2866
  lng: number,
2812
2867
  from?: string
@@ -2815,7 +2870,8 @@ export declare namespace EasemobChat {
2815
2870
  success?: (data: SendMsgResult) => void,
2816
2871
  fail?: () => void,
2817
2872
  ext?: { [key: string]: any },
2818
- time: number
2873
+ time: number,
2874
+ msgConfig?: { allowGroupAck: boolean }
2819
2875
  }
2820
2876
 
2821
2877
  interface CreateLocationMsgParameters {
@@ -2823,10 +2879,12 @@ export declare namespace EasemobChat {
2823
2879
  chatType: ChatType,
2824
2880
  to: string,
2825
2881
  addr: string,
2882
+ buildingName: string,
2826
2883
  lat: number,
2827
2884
  lng: number,
2828
2885
  from?: string
2829
2886
  ext?: { [key: string]: any },
2887
+ msgConfig?: { allowGroupAck: boolean }
2830
2888
  }
2831
2889
 
2832
2890
  interface FileParameters {
@@ -2835,7 +2893,7 @@ export declare namespace EasemobChat {
2835
2893
  }
2836
2894
  interface FileMsgSetParameters {
2837
2895
  chatType: ChatType,
2838
- file: any,
2896
+ file: FileObj,
2839
2897
  filename: string,
2840
2898
  fileInputId?: string,
2841
2899
  to: string,
@@ -2872,8 +2930,8 @@ export declare namespace EasemobChat {
2872
2930
  interface CreateFileMsgParameters {
2873
2931
  type: 'file',
2874
2932
  chatType: ChatType,
2875
- file: any,
2876
- filename: string,
2933
+ file: FileObj,
2934
+ filename?: string,
2877
2935
  fileInputId?: string,
2878
2936
  to: string,
2879
2937
  from?: string
@@ -2886,7 +2944,8 @@ export declare namespace EasemobChat {
2886
2944
  url: string,
2887
2945
  type: string,
2888
2946
  filename: string
2889
- }
2947
+ },
2948
+ msgConfig?: { allowGroupAck: boolean }
2890
2949
  }
2891
2950
 
2892
2951
  interface ImgParameters {
@@ -2897,7 +2956,7 @@ export declare namespace EasemobChat {
2897
2956
  interface ImgMsgSetParameters {
2898
2957
  chatType: ChatType,
2899
2958
  to: string,
2900
- file: File,
2959
+ file?: FileObj,
2901
2960
  width?: number,
2902
2961
  height?: number,
2903
2962
  fileInputId?: string,
@@ -2933,7 +2992,7 @@ export declare namespace EasemobChat {
2933
2992
  interface CreateImgMsgParameters {
2934
2993
  type: 'img',
2935
2994
  chatType: ChatType,
2936
- file: File
2995
+ file?: FileObj
2937
2996
  url?: string,
2938
2997
  width?: number,
2939
2998
  height?: number,
@@ -2949,7 +3008,8 @@ export declare namespace EasemobChat {
2949
3008
  url: string,
2950
3009
  type: string,
2951
3010
  filename: string
2952
- }
3011
+ },
3012
+ msgConfig?: { allowGroupAck: boolean }
2953
3013
  }
2954
3014
 
2955
3015
  interface AudioParameters {
@@ -2958,7 +3018,7 @@ export declare namespace EasemobChat {
2958
3018
  }
2959
3019
  interface AudioMsgSetParameters {
2960
3020
  chatType: ChatType,
2961
- file: object,
3021
+ file: FileObj,
2962
3022
  filename: string,
2963
3023
  length: number,
2964
3024
  file_length: number,
@@ -2996,10 +3056,10 @@ export declare namespace EasemobChat {
2996
3056
  interface CreateAudioMsgParameters {
2997
3057
  type: 'audio',
2998
3058
  chatType: ChatType,
2999
- file: object,
3059
+ file: FileObj,
3000
3060
  filename: string,
3001
- length: number,
3002
- file_length: number,
3061
+ length?: number,
3062
+ file_length?: number,
3003
3063
  fileInputId?: string,
3004
3064
  to: string,
3005
3065
  from?: string
@@ -3015,7 +3075,8 @@ export declare namespace EasemobChat {
3015
3075
  url: string,
3016
3076
  type: string,
3017
3077
  filename: string
3018
- }
3078
+ },
3079
+ msgConfig?: { allowGroupAck: boolean }
3019
3080
  }
3020
3081
 
3021
3082
  interface VideoParameters {
@@ -3024,7 +3085,7 @@ export declare namespace EasemobChat {
3024
3085
  }
3025
3086
  interface VideoMsgSetParameters {
3026
3087
  chatType: ChatType,
3027
- file: object,
3088
+ file: FileObj,
3028
3089
  filename: string,
3029
3090
  length: number,
3030
3091
  file_length: number,
@@ -3032,13 +3093,13 @@ export declare namespace EasemobChat {
3032
3093
  to: string,
3033
3094
  from?: string
3034
3095
  roomType?: boolean,
3035
- success?: (data: SendMsgResult) => any,
3036
- fail?: () => any,
3096
+ success?: (data: SendMsgResult) => void,
3097
+ fail?: () => void,
3037
3098
  ext?: { [key: string]: any },
3038
3099
  apiUrl?: string,
3039
- onFileUploadError?: (err: any) => any,
3040
- onFileUploadComplete?: (data: any) => any,
3041
- onFileUploadProgress?: (data: ProgressEvent) => any,
3100
+ onFileUploadError?: (err: any) => void,
3101
+ onFileUploadComplete?: (data: any) => void,
3102
+ onFileUploadProgress?: (data: ProgressEvent) => void,
3042
3103
  body?: {
3043
3104
  url: string,
3044
3105
  type: string,
@@ -3061,23 +3122,24 @@ export declare namespace EasemobChat {
3061
3122
  interface CreateVideoMsgParameters {
3062
3123
  type: 'video'
3063
3124
  chatType: ChatType,
3064
- file: object,
3125
+ file: FileObj,
3065
3126
  filename: string,
3066
- length: number,
3067
- file_length: number,
3127
+ length?: number,
3128
+ file_length?: number,
3068
3129
  fileInputId?: string,
3069
3130
  to: string,
3070
3131
  from?: string
3071
3132
  ext?: { [key: string]: any },
3072
3133
  apiUrl?: string,
3073
- onFileUploadError?: (err: any) => any,
3074
- onFileUploadComplete?: (data: any) => any,
3075
- onFileUploadProgress?: (data: ProgressEvent) => any,
3134
+ onFileUploadError?: (err: any) => void,
3135
+ onFileUploadComplete?: (data: any) => void,
3136
+ onFileUploadProgress?: (data: ProgressEvent) => void,
3076
3137
  body?: {
3077
3138
  url: string,
3078
3139
  type: string,
3079
3140
  filename: string
3080
- }
3141
+ },
3142
+ msgConfig?: { allowGroupAck: boolean }
3081
3143
  }
3082
3144
 
3083
3145
  interface ReceivedMsgBody {
@@ -3136,14 +3198,15 @@ export declare namespace EasemobChat {
3136
3198
  headers?: KVString;
3137
3199
  responseType?: "arraybuffer" | "blob" | "document" | "json" | "text";
3138
3200
  mimeType?: string;
3139
- success?: (res: any) => any;
3140
- error?: (res: any) => any;
3201
+ success?: (res: any) => void;
3202
+ error?: (res: any) => void;
3141
3203
  }
3142
3204
 
3143
3205
  enum PLATFORM {
3144
3206
  WEB = "web",
3145
3207
  WX = "wx",
3146
3208
  ZFB = "zfb",
3209
+ DD = "dd",
3147
3210
  TT = "tt",
3148
3211
  BAIDU = "baidu",
3149
3212
  QUICK_APP = "quick_app",
@@ -3160,10 +3223,10 @@ export declare namespace EasemobChat {
3160
3223
  data: File | null;
3161
3224
  }
3162
3225
  interface UploadFile {
3163
- onFileUploadProgress?: (msg: any) => any;
3164
- onFileUploadComplete?: (msg: any) => any;
3165
- onFileUploadError?: (msg: any) => any;
3166
- onFileUploadCanceled?: (msg: any) => any;
3226
+ onFileUploadProgress?: (msg: any) => void;
3227
+ onFileUploadComplete?: (msg: any) => void;
3228
+ onFileUploadError?: (msg: any) => void;
3229
+ onFileUploadCanceled?: (msg: any) => void;
3167
3230
  accessToken: string;
3168
3231
  appKey: string;
3169
3232
  apiUrl?: string;
@@ -3171,8 +3234,8 @@ export declare namespace EasemobChat {
3171
3234
  file: object;
3172
3235
  }
3173
3236
  interface DownloadParams {
3174
- onFileDownloadComplete: (data: any) => any;
3175
- onFileDownloadError: (error: any) => any;
3237
+ onFileDownloadComplete: (data: any) => void;
3238
+ onFileDownloadError: (error: any) => void;
3176
3239
  id: string;
3177
3240
  secret: string;
3178
3241
  [key: string]: any;
@@ -3182,10 +3245,10 @@ export declare namespace EasemobChat {
3182
3245
  ajax: (options: AjaxOptions) => Promise<any>;
3183
3246
  getFileUrl: (fileInputId: string | HTMLInputElement) => Uri;
3184
3247
  uploadFile: (options: UploadFile) => void;
3185
- listenNetwork: (online: () => any, offline: () => any) => void;
3248
+ listenNetwork: (online: () => void, offline: () => void) => void;
3186
3249
  getEnvInfo: () => EnvInfo;
3187
3250
  wxRequest: (options: AjaxOptions) => Promise<any>;
3188
3251
  parseDownloadResponse: (res: any) => string;
3189
- download: (params: DownloadParams) => any;
3252
+ download: (params: DownloadParams) => void;
3190
3253
  }
3191
3254
  }