22// Project: https://sendbird.com/
33
44interface SendBirdFactory {
5+ version : number ; // SendBird SDK version
6+
57 new ( option : Object ) : SendBird_Instance ;
68}
79
@@ -11,7 +13,9 @@ interface SendBirdFactory {
1113 */
1214interface SendBird_Instance {
1315 connect ( userId : string , callback ?: Function ) : void ;
16+ connect ( userId : string , apiHost : string , wsHost : string , callback ?: Function ) : void ;
1417 connect ( userId : string , accessToken : string , callback ?: Function ) : void ;
18+ connect ( userId : string , accessToken : string , apiHost : string , wsHost : string , callback ?: Function ) : void ;
1519 disconnect ( callback ?: Function ) : void ;
1620 // You can reinitate auto-reconnect manually.
1721 reconnect ( ) : boolean ;
@@ -20,6 +24,7 @@ interface SendBird_Instance {
2024 getApplicationId ( ) : string ;
2125
2226 updateCurrentUserInfo ( nickname : string , profileImage : string , callback ?: Function ) : void ;
27+ updateCurrentUserInfo ( nickname : string , profileImage : File , callback ?: Function ) : void ;
2328
2429 // Push token
2530 registerGCMPushTokenForCurrentUser ( gcmRegToken : string , callback ?: Function ) : void ;
@@ -38,6 +43,9 @@ interface SendBird_Instance {
3843 setDoNotDisturb ( doNotDisturbOn : boolean , startHour : number , startMin : number , endHour : number , endMin : number , timezone : string , callback ?: Function ) : void ;
3944 getDoNotDisturb ( callback : Function ) : void ;
4045
46+ setPushTemplate ( templateName : string , callback ?: Function ) : void ;
47+ getPushTemplate ( callback ?: Function ) : void ;
48+
4149 // Block / Unblock
4250 blockUser ( userToBlock : User , callback ?: Function ) : void ;
4351 blockUserWithUserId ( userToBlock : string , callback ?: Function ) : void ;
@@ -60,6 +68,8 @@ interface SendBird_Instance {
6068 removeAllConnectionHandlers ( ) : void ;
6169
6270 createUserListQuery ( ) : UserListQuery ;
71+ createUserListQuery ( userIds : Array < string > ) : UserListQuery ;
72+
6373 createBlockedUserListQuery ( ) : UserListQuery ;
6474
6575 // Background/Foreground Appstate for push notifications in React Native / Ionic
@@ -99,7 +109,7 @@ interface UserListQuery {
99109 limit : number ;
100110 isLoading : boolean ;
101111
102- next ( callback : Function ) : void ;
112+ next ( callback ? : Function ) : void ;
103113}
104114
105115
@@ -207,7 +217,7 @@ interface BaseChannel {
207217 updateFileMessage ( messageId : number , data : string , customType : string , callback : Function ) : void ;
208218
209219 /* Cancel File Upload */
210- cancelUploadingFileMessage ( messageReqId : string , callback : Function ) : void ;
220+ cancelUploadingFileMessage ( messageReqId : string , callback : Function ) : boolean ;
211221
212222 /* MetaCounter */
213223 createMetaCounters ( metaCounterMap : Object , callback : Function ) : void ;
0 commit comments