easemob-websdk 4.0.1 → 4.0.2-beta
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 +317 -285
- package/Easemob-chat.js +1 -1
- package/package.json +1 -1
- package/readme.md +1 -2
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?: () =>
|
|
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
|
|
770
|
-
success?: (res: any) =>
|
|
771
|
-
error?: (err: ErrorEvent) =>
|
|
789
|
+
nickname?: string,
|
|
790
|
+
success?: (res: any) => void,
|
|
791
|
+
error?: (err: ErrorEvent) => void,
|
|
772
792
|
apiUrl?: string,
|
|
773
|
-
}):
|
|
793
|
+
}): Promise<RegisterUserResult>;
|
|
774
794
|
|
|
775
795
|
open(parameters: {
|
|
776
796
|
user: string,
|
|
777
|
-
pwd
|
|
797
|
+
pwd?: string,
|
|
778
798
|
accessToken?: string,
|
|
779
799
|
agoraToken?: string,
|
|
780
|
-
success?: (res: any) =>
|
|
781
|
-
error?: (res: any) =>
|
|
782
|
-
}):
|
|
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>) =>
|
|
833
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
846
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
862
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
870
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
885
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
893
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
908
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
922
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
936
|
-
error?: (error: ErrorEvent) =>
|
|
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 }>) =>
|
|
949
|
-
error?: (error: ErrorEvent) =>
|
|
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 }[]>) =>
|
|
958
|
-
error?: (error: ErrorEvent) =>
|
|
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 }[]>) =>
|
|
974
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
987
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1001
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1015
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1031
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1039
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1054
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1061
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1076
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1084
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1099
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1107
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1123
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1131
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1146
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1154
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1170
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1177
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1191
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1204
|
-
error?: (errror: ErrorEvent) =>
|
|
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>) =>
|
|
1217
|
-
error?: (errror: ErrorEvent) =>
|
|
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[]>) =>
|
|
1231
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1239
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1254
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1267
|
-
error: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1281
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1294
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1308
|
-
error: (error: ErrorEvent) =>
|
|
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:
|
|
1322
|
-
onFileUploadProgress?: (data: any) =>
|
|
1323
|
-
onFileUploadComplete?: (data: any) =>
|
|
1324
|
-
onFileUploadError?: (data: any) =>
|
|
1325
|
-
onFileUploadCanceled?: (data: 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>) =>
|
|
1339
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1352
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1369
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1401
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1408
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1421
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1436
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1449
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1457
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1472
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1485
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1500
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1509
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1525
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1538
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1546
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1561
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1575
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1582
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1596
|
-
error?: (error: ErrorEvent) =>
|
|
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 }>) =>
|
|
1609
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1617
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1632
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1647
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1655
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1670
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1679
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1695
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1703
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1718
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1726
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1741
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1749
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1764
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1772
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1787
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1796
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1812
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1820
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1835
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1842
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1856
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1864
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1879
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1887
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1902
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1910
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
1925
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1933
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1948
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1955
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
1969
|
-
error?: (error: ErrorEvent) =>
|
|
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 }>) =>
|
|
1982
|
-
error?: (error: ErrorEvent) =>
|
|
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 }>) =>
|
|
1995
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
2009
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
2017
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
2033
|
-
error?: (error: ErrorEvent) =>
|
|
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[]>) =>
|
|
2046
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
2054
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
2069
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
2083
|
-
error?: (error: ErrorEvent) =>
|
|
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 }>) =>
|
|
2096
|
-
error?: (error: ErrorEvent) =>
|
|
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>) =>
|
|
2110
|
-
error?: (error: ErrorEvent) =>
|
|
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:
|
|
2123
|
-
onFileUploadProgress?: (data: ProgressEvent) =>
|
|
2124
|
-
onFileUploadComplete?: (data: any) =>
|
|
2125
|
-
onFileUploadError?: (data: any) =>
|
|
2126
|
-
onFileUploadCanceled?: (data: 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>) =>
|
|
2140
|
-
error?: (error: ErrorEvent) =>
|
|
2159
|
+
success?: (res: AsyncResult<DeleteGroupSharedFileResult>) => void,
|
|
2160
|
+
error?: (error: ErrorEvent) => void
|
|
2141
2161
|
}): Promise<AsyncResult<DeleteGroupSharedFileResult>>;
|
|
2142
2162
|
|
|
2143
2163
|
/**
|
|
@@ -2149,8 +2169,8 @@ export declare namespace EasemobChat {
|
|
|
2149
2169
|
*/
|
|
2150
2170
|
fetchGroupSharedFileList(this: Connection, params: {
|
|
2151
2171
|
groupId: string,
|
|
2152
|
-
success?: (res: AsyncResult<FetchGroupSharedFileListResult>) =>
|
|
2153
|
-
error?: (error: ErrorEvent) =>
|
|
2172
|
+
success?: (res: AsyncResult<FetchGroupSharedFileListResult>) => void,
|
|
2173
|
+
error?: (error: ErrorEvent) => void
|
|
2154
2174
|
}): Promise<AsyncResult<FetchGroupSharedFileListResult>>;
|
|
2155
2175
|
|
|
2156
2176
|
// Contact API
|
|
@@ -2162,14 +2182,14 @@ export declare namespace EasemobChat {
|
|
|
2162
2182
|
* ```
|
|
2163
2183
|
*/
|
|
2164
2184
|
getBlacklist(this: Connection, params?: {
|
|
2165
|
-
success?: (res: AsyncResult<UserId[]>) =>
|
|
2166
|
-
error?: (error: ErrorEvent) =>
|
|
2185
|
+
success?: (res: AsyncResult<UserId[]>) => void,
|
|
2186
|
+
error?: (error: ErrorEvent) => void
|
|
2167
2187
|
}): Promise<AsyncResult<UserId[]>>;
|
|
2168
2188
|
|
|
2169
2189
|
/** @deprecated */
|
|
2170
2190
|
getRoster(this: Connection, params?: {
|
|
2171
|
-
success?: (res: RosterData[]) =>
|
|
2172
|
-
error?: (error: ErrorEvent) =>
|
|
2191
|
+
success?: (res: RosterData[]) => void,
|
|
2192
|
+
error?: (error: ErrorEvent) => void
|
|
2173
2193
|
}): Promise<AsyncResult<UserId[]>>;
|
|
2174
2194
|
|
|
2175
2195
|
/**
|
|
@@ -2181,8 +2201,8 @@ export declare namespace EasemobChat {
|
|
|
2181
2201
|
* @since v4.0.1
|
|
2182
2202
|
*/
|
|
2183
2203
|
getContacts(this: Connection, params?: {
|
|
2184
|
-
success?: (res: RosterData[]) =>
|
|
2185
|
-
error?: (error: ErrorEvent) =>
|
|
2204
|
+
success?: (res: RosterData[]) => void,
|
|
2205
|
+
error?: (error: ErrorEvent) => void
|
|
2186
2206
|
}): Promise<AsyncResult<UserId[]>>;
|
|
2187
2207
|
|
|
2188
2208
|
/** @deprecated */
|
|
@@ -2190,8 +2210,8 @@ export declare namespace EasemobChat {
|
|
|
2190
2210
|
deviceId: string,
|
|
2191
2211
|
deviceToken: string,
|
|
2192
2212
|
notifierName: string
|
|
2193
|
-
success?: (res: AsyncResult<UploadTokenResult>) =>
|
|
2194
|
-
error?: (error: ErrorEvent) =>
|
|
2213
|
+
success?: (res: AsyncResult<UploadTokenResult>) => void,
|
|
2214
|
+
error?: (error: ErrorEvent) => void
|
|
2195
2215
|
}): Promise<AsyncResult<UploadTokenResult>>;
|
|
2196
2216
|
|
|
2197
2217
|
/**
|
|
@@ -2206,8 +2226,8 @@ export declare namespace EasemobChat {
|
|
|
2206
2226
|
deviceId: string,
|
|
2207
2227
|
deviceToken: string,
|
|
2208
2228
|
notifierName: string
|
|
2209
|
-
success?: (res: AsyncResult<UploadTokenResult>) =>
|
|
2210
|
-
error?: (error: ErrorEvent) =>
|
|
2229
|
+
success?: (res: AsyncResult<UploadTokenResult>) => void,
|
|
2230
|
+
error?: (error: ErrorEvent) => void
|
|
2211
2231
|
}): Promise<AsyncResult<UploadTokenResult>>;
|
|
2212
2232
|
|
|
2213
2233
|
/**
|
|
@@ -2218,10 +2238,26 @@ export declare namespace EasemobChat {
|
|
|
2218
2238
|
* ```
|
|
2219
2239
|
*/
|
|
2220
2240
|
getSessionList(this: Connection, params?: {
|
|
2221
|
-
success?: (res: AsyncResult<SessionInfo[]>) =>
|
|
2222
|
-
error?: (error: ErrorEvent) =>
|
|
2241
|
+
success?: (res: AsyncResult<SessionInfo[]>) => void,
|
|
2242
|
+
error?: (error: ErrorEvent) => void
|
|
2223
2243
|
}): Promise<AsyncResult<SessionInfo[]>>;
|
|
2224
2244
|
|
|
2245
|
+
/**
|
|
2246
|
+
* Delete the session.
|
|
2247
|
+
*
|
|
2248
|
+
* ```typescript
|
|
2249
|
+
* connection.deleteSession()
|
|
2250
|
+
* ```
|
|
2251
|
+
*/
|
|
2252
|
+
deleteSession(this: Connection, params: {
|
|
2253
|
+
channel: string;
|
|
2254
|
+
chatType: "singleChat" | "groupChat";
|
|
2255
|
+
deleteRoam: boolean;
|
|
2256
|
+
success?: (res: AsyncResult<DeleteSessionResult>) => void;
|
|
2257
|
+
error?: (error: ErrorEvent) => void;
|
|
2258
|
+
}
|
|
2259
|
+
): Promise<AsyncResult<DeleteSessionResult>>
|
|
2260
|
+
|
|
2225
2261
|
/**
|
|
2226
2262
|
* Updates own information.
|
|
2227
2263
|
*
|
|
@@ -2265,8 +2301,8 @@ export declare namespace EasemobChat {
|
|
|
2265
2301
|
start?: number | null,
|
|
2266
2302
|
count?: number,
|
|
2267
2303
|
isGroup?: boolean,
|
|
2268
|
-
success?: (res: MessageBody[]) =>
|
|
2269
|
-
fail?: (error: ErrorEvent) =>
|
|
2304
|
+
success?: (res: MessageBody[]) => void,
|
|
2305
|
+
fail?: (error: ErrorEvent) => void
|
|
2270
2306
|
}): Promise<MessageBody[]>;
|
|
2271
2307
|
|
|
2272
2308
|
/**
|
|
@@ -2369,8 +2405,8 @@ export declare namespace EasemobChat {
|
|
|
2369
2405
|
to: UserId,
|
|
2370
2406
|
type?: 'chat' | 'groupchat' | 'chatroom' // v3.0
|
|
2371
2407
|
chatType?: 'singleChat' | 'groupChat' | 'chatRoom', // v4.0
|
|
2372
|
-
success?: (res: number) =>
|
|
2373
|
-
fail?: (error: ErrorEvent) =>
|
|
2408
|
+
success?: (res: number) => void,
|
|
2409
|
+
fail?: (error: ErrorEvent) => void,
|
|
2374
2410
|
}): Promise<SendMsgResult>;
|
|
2375
2411
|
|
|
2376
2412
|
// listen @since 3.0
|
|
@@ -2442,7 +2478,7 @@ export declare namespace EasemobChat {
|
|
|
2442
2478
|
* @deprecated v4.0.1
|
|
2443
2479
|
*/
|
|
2444
2480
|
interface ListenParameters {
|
|
2445
|
-
onOpened?: () =>
|
|
2481
|
+
onOpened?: () => void;
|
|
2446
2482
|
onPresence?: (msg: PresenceMsg) => void;
|
|
2447
2483
|
onTextMessage?: (msg: TextMsgBody) => void;
|
|
2448
2484
|
onPictureMessage?: (msg: ImgMsgBody) => void;
|
|
@@ -2516,12 +2552,9 @@ export declare namespace EasemobChat {
|
|
|
2516
2552
|
useCookiePersist: boolean;
|
|
2517
2553
|
storageLogLevelKey: string;
|
|
2518
2554
|
levels: typeof Levels;
|
|
2519
|
-
// logMethods: string[];
|
|
2520
|
-
// methodFactory: any;
|
|
2521
2555
|
logs: string[];
|
|
2522
2556
|
config: Config;
|
|
2523
2557
|
logBytes: number;
|
|
2524
|
-
// [key: string]: any;
|
|
2525
2558
|
constructor(name: string, defaultLevel: Level, factory?: any);
|
|
2526
2559
|
setConfig(cofig: Config): void;
|
|
2527
2560
|
/**
|
|
@@ -2549,16 +2582,6 @@ export declare namespace EasemobChat {
|
|
|
2549
2582
|
* down load logs
|
|
2550
2583
|
*/
|
|
2551
2584
|
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
2585
|
}
|
|
2563
2586
|
|
|
2564
2587
|
|
|
@@ -2568,7 +2591,12 @@ export declare namespace EasemobChat {
|
|
|
2568
2591
|
type MessageType = 'read' | 'delivery' | 'channel' | 'txt' | 'cmd' | 'custom' | 'loc' | 'img' | 'audio' | 'file' | 'video';
|
|
2569
2592
|
|
|
2570
2593
|
type ChatType = 'singleChat' | 'groupChat' | 'chatRoom';
|
|
2571
|
-
|
|
2594
|
+
interface FileObj {
|
|
2595
|
+
url: string,
|
|
2596
|
+
filename: string,
|
|
2597
|
+
filetype: string,
|
|
2598
|
+
data: File
|
|
2599
|
+
}
|
|
2572
2600
|
interface PresenceMsg {
|
|
2573
2601
|
type: OnPresenceMsgType,
|
|
2574
2602
|
to: string,
|
|
@@ -2792,6 +2820,7 @@ export declare namespace EasemobChat {
|
|
|
2792
2820
|
chatType: ChatType,
|
|
2793
2821
|
to: string,
|
|
2794
2822
|
addr: string,
|
|
2823
|
+
buildingName: string,
|
|
2795
2824
|
lat: number,
|
|
2796
2825
|
lng: number,
|
|
2797
2826
|
from?: string
|
|
@@ -2807,6 +2836,7 @@ export declare namespace EasemobChat {
|
|
|
2807
2836
|
type: 'loc',
|
|
2808
2837
|
to: string,
|
|
2809
2838
|
addr: string,
|
|
2839
|
+
buildingName: string,
|
|
2810
2840
|
lat: number,
|
|
2811
2841
|
lng: number,
|
|
2812
2842
|
from?: string
|
|
@@ -2823,6 +2853,7 @@ export declare namespace EasemobChat {
|
|
|
2823
2853
|
chatType: ChatType,
|
|
2824
2854
|
to: string,
|
|
2825
2855
|
addr: string,
|
|
2856
|
+
buildingName: string,
|
|
2826
2857
|
lat: number,
|
|
2827
2858
|
lng: number,
|
|
2828
2859
|
from?: string
|
|
@@ -2835,7 +2866,7 @@ export declare namespace EasemobChat {
|
|
|
2835
2866
|
}
|
|
2836
2867
|
interface FileMsgSetParameters {
|
|
2837
2868
|
chatType: ChatType,
|
|
2838
|
-
file:
|
|
2869
|
+
file: FileObj,
|
|
2839
2870
|
filename: string,
|
|
2840
2871
|
fileInputId?: string,
|
|
2841
2872
|
to: string,
|
|
@@ -2872,8 +2903,8 @@ export declare namespace EasemobChat {
|
|
|
2872
2903
|
interface CreateFileMsgParameters {
|
|
2873
2904
|
type: 'file',
|
|
2874
2905
|
chatType: ChatType,
|
|
2875
|
-
file:
|
|
2876
|
-
filename
|
|
2906
|
+
file: FileObj,
|
|
2907
|
+
filename?: string,
|
|
2877
2908
|
fileInputId?: string,
|
|
2878
2909
|
to: string,
|
|
2879
2910
|
from?: string
|
|
@@ -2897,7 +2928,7 @@ export declare namespace EasemobChat {
|
|
|
2897
2928
|
interface ImgMsgSetParameters {
|
|
2898
2929
|
chatType: ChatType,
|
|
2899
2930
|
to: string,
|
|
2900
|
-
file
|
|
2931
|
+
file?: FileObj,
|
|
2901
2932
|
width?: number,
|
|
2902
2933
|
height?: number,
|
|
2903
2934
|
fileInputId?: string,
|
|
@@ -2933,7 +2964,7 @@ export declare namespace EasemobChat {
|
|
|
2933
2964
|
interface CreateImgMsgParameters {
|
|
2934
2965
|
type: 'img',
|
|
2935
2966
|
chatType: ChatType,
|
|
2936
|
-
file
|
|
2967
|
+
file?: FileObj
|
|
2937
2968
|
url?: string,
|
|
2938
2969
|
width?: number,
|
|
2939
2970
|
height?: number,
|
|
@@ -2958,7 +2989,7 @@ export declare namespace EasemobChat {
|
|
|
2958
2989
|
}
|
|
2959
2990
|
interface AudioMsgSetParameters {
|
|
2960
2991
|
chatType: ChatType,
|
|
2961
|
-
file:
|
|
2992
|
+
file: FileObj,
|
|
2962
2993
|
filename: string,
|
|
2963
2994
|
length: number,
|
|
2964
2995
|
file_length: number,
|
|
@@ -2996,7 +3027,7 @@ export declare namespace EasemobChat {
|
|
|
2996
3027
|
interface CreateAudioMsgParameters {
|
|
2997
3028
|
type: 'audio',
|
|
2998
3029
|
chatType: ChatType,
|
|
2999
|
-
file:
|
|
3030
|
+
file: FileObj,
|
|
3000
3031
|
filename: string,
|
|
3001
3032
|
length: number,
|
|
3002
3033
|
file_length: number,
|
|
@@ -3024,7 +3055,7 @@ export declare namespace EasemobChat {
|
|
|
3024
3055
|
}
|
|
3025
3056
|
interface VideoMsgSetParameters {
|
|
3026
3057
|
chatType: ChatType,
|
|
3027
|
-
file:
|
|
3058
|
+
file: FileObj,
|
|
3028
3059
|
filename: string,
|
|
3029
3060
|
length: number,
|
|
3030
3061
|
file_length: number,
|
|
@@ -3032,13 +3063,13 @@ export declare namespace EasemobChat {
|
|
|
3032
3063
|
to: string,
|
|
3033
3064
|
from?: string
|
|
3034
3065
|
roomType?: boolean,
|
|
3035
|
-
success?: (data: SendMsgResult) =>
|
|
3036
|
-
fail?: () =>
|
|
3066
|
+
success?: (data: SendMsgResult) => void,
|
|
3067
|
+
fail?: () => void,
|
|
3037
3068
|
ext?: { [key: string]: any },
|
|
3038
3069
|
apiUrl?: string,
|
|
3039
|
-
onFileUploadError?: (err: any) =>
|
|
3040
|
-
onFileUploadComplete?: (data: any) =>
|
|
3041
|
-
onFileUploadProgress?: (data: ProgressEvent) =>
|
|
3070
|
+
onFileUploadError?: (err: any) => void,
|
|
3071
|
+
onFileUploadComplete?: (data: any) => void,
|
|
3072
|
+
onFileUploadProgress?: (data: ProgressEvent) => void,
|
|
3042
3073
|
body?: {
|
|
3043
3074
|
url: string,
|
|
3044
3075
|
type: string,
|
|
@@ -3061,7 +3092,7 @@ export declare namespace EasemobChat {
|
|
|
3061
3092
|
interface CreateVideoMsgParameters {
|
|
3062
3093
|
type: 'video'
|
|
3063
3094
|
chatType: ChatType,
|
|
3064
|
-
file:
|
|
3095
|
+
file: FileObj,
|
|
3065
3096
|
filename: string,
|
|
3066
3097
|
length: number,
|
|
3067
3098
|
file_length: number,
|
|
@@ -3070,9 +3101,9 @@ export declare namespace EasemobChat {
|
|
|
3070
3101
|
from?: string
|
|
3071
3102
|
ext?: { [key: string]: any },
|
|
3072
3103
|
apiUrl?: string,
|
|
3073
|
-
onFileUploadError?: (err: any) =>
|
|
3074
|
-
onFileUploadComplete?: (data: any) =>
|
|
3075
|
-
onFileUploadProgress?: (data: ProgressEvent) =>
|
|
3104
|
+
onFileUploadError?: (err: any) => void,
|
|
3105
|
+
onFileUploadComplete?: (data: any) => void,
|
|
3106
|
+
onFileUploadProgress?: (data: ProgressEvent) => void,
|
|
3076
3107
|
body?: {
|
|
3077
3108
|
url: string,
|
|
3078
3109
|
type: string,
|
|
@@ -3136,14 +3167,15 @@ export declare namespace EasemobChat {
|
|
|
3136
3167
|
headers?: KVString;
|
|
3137
3168
|
responseType?: "arraybuffer" | "blob" | "document" | "json" | "text";
|
|
3138
3169
|
mimeType?: string;
|
|
3139
|
-
success?: (res: any) =>
|
|
3140
|
-
error?: (res: any) =>
|
|
3170
|
+
success?: (res: any) => void;
|
|
3171
|
+
error?: (res: any) => void;
|
|
3141
3172
|
}
|
|
3142
3173
|
|
|
3143
3174
|
enum PLATFORM {
|
|
3144
3175
|
WEB = "web",
|
|
3145
3176
|
WX = "wx",
|
|
3146
3177
|
ZFB = "zfb",
|
|
3178
|
+
DD = "dd",
|
|
3147
3179
|
TT = "tt",
|
|
3148
3180
|
BAIDU = "baidu",
|
|
3149
3181
|
QUICK_APP = "quick_app",
|
|
@@ -3160,10 +3192,10 @@ export declare namespace EasemobChat {
|
|
|
3160
3192
|
data: File | null;
|
|
3161
3193
|
}
|
|
3162
3194
|
interface UploadFile {
|
|
3163
|
-
onFileUploadProgress?: (msg: any) =>
|
|
3164
|
-
onFileUploadComplete?: (msg: any) =>
|
|
3165
|
-
onFileUploadError?: (msg: any) =>
|
|
3166
|
-
onFileUploadCanceled?: (msg: any) =>
|
|
3195
|
+
onFileUploadProgress?: (msg: any) => void;
|
|
3196
|
+
onFileUploadComplete?: (msg: any) => void;
|
|
3197
|
+
onFileUploadError?: (msg: any) => void;
|
|
3198
|
+
onFileUploadCanceled?: (msg: any) => void;
|
|
3167
3199
|
accessToken: string;
|
|
3168
3200
|
appKey: string;
|
|
3169
3201
|
apiUrl?: string;
|
|
@@ -3171,8 +3203,8 @@ export declare namespace EasemobChat {
|
|
|
3171
3203
|
file: object;
|
|
3172
3204
|
}
|
|
3173
3205
|
interface DownloadParams {
|
|
3174
|
-
onFileDownloadComplete: (data: any) =>
|
|
3175
|
-
onFileDownloadError: (error: any) =>
|
|
3206
|
+
onFileDownloadComplete: (data: any) => void;
|
|
3207
|
+
onFileDownloadError: (error: any) => void;
|
|
3176
3208
|
id: string;
|
|
3177
3209
|
secret: string;
|
|
3178
3210
|
[key: string]: any;
|
|
@@ -3182,10 +3214,10 @@ export declare namespace EasemobChat {
|
|
|
3182
3214
|
ajax: (options: AjaxOptions) => Promise<any>;
|
|
3183
3215
|
getFileUrl: (fileInputId: string | HTMLInputElement) => Uri;
|
|
3184
3216
|
uploadFile: (options: UploadFile) => void;
|
|
3185
|
-
listenNetwork: (online: () =>
|
|
3217
|
+
listenNetwork: (online: () => void, offline: () => void) => void;
|
|
3186
3218
|
getEnvInfo: () => EnvInfo;
|
|
3187
3219
|
wxRequest: (options: AjaxOptions) => Promise<any>;
|
|
3188
3220
|
parseDownloadResponse: (res: any) => string;
|
|
3189
|
-
download: (params: DownloadParams) =>
|
|
3221
|
+
download: (params: DownloadParams) => void;
|
|
3190
3222
|
}
|
|
3191
3223
|
}
|