@@ -478,6 +478,8 @@ declare namespace AV {
478478 interface GetOptions extends AuthOptions { }
479479 }
480480
481+ class FriendShipQuery extends Query { }
482+
481483 /**
482484 * Represents a Role on the AV server. Roles represent groupings of
483485 * Users for the purposes of granting permissions (e.g. specifying an ACL
@@ -513,28 +515,32 @@ declare namespace AV {
513515 export class User extends Object {
514516
515517 static current ( ) : User ;
516- static signUp < T > ( username : string , password : string , attrs : any , options ?: AuthOptions ) : Promise < T > ;
517- static logIn < T > ( username : string , password : string , options ?: AuthOptions ) : Promise < T > ;
518- static logOut < T > ( ) : Promise < T > ;
519- static become < T > ( sessionToken : string , options ?: AuthOptions ) : Promise < T > ;
520-
521- static loginWithWeapp < T > ( ) : Promise < T > ;
522- static logInWithMobilePhone < T > ( mobilePhone : string , password : string , options ?: AuthOptions ) : Promise < T > ;
523- static logInWithMobilePhoneSmsCode < T > ( mobilePhone : string , smsCode : string , options ?: AuthOptions ) : Promise < T > ;
524- static signUpOrlogInWithAuthData < T > ( data : any , platform : string , options ?: AuthOptions ) : Promise < T > ;
525- static signUpOrlogInWithMobilePhone < T > ( mobilePhoneNumber : string , smsCode : string , attributes ?: any , options ?: AuthOptions ) : Promise < T > ;
526- static requestEmailVerify < T > ( email : string , options ?: AuthOptions ) : Promise < T > ;
518+ static signUp ( username : string , password : string , attrs : any , options ?: AuthOptions ) : Promise < User > ;
519+ static logIn ( username : string , password : string , options ?: AuthOptions ) : Promise < User > ;
520+ static logOut ( ) : Promise < User > ;
521+ static become ( sessionToken : string , options ?: AuthOptions ) : Promise < User > ;
522+
523+ static loginWithWeapp ( ) : Promise < User > ;
524+ static logInWithMobilePhone ( mobilePhone : string , password : string , options ?: AuthOptions ) : Promise < User > ;
525+ static logInWithMobilePhoneSmsCode ( mobilePhone : string , smsCode : string , options ?: AuthOptions ) : Promise < User > ;
526+ static signUpOrlogInWithAuthData ( data : any , platform : string , options ?: AuthOptions ) : Promise < User > ;
527+ static signUpOrlogInWithMobilePhone ( mobilePhoneNumber : string , smsCode : string , attributes ?: any , options ?: AuthOptions ) : Promise < User > ;
528+ static requestEmailVerify ( email : string , options ?: AuthOptions ) : Promise < User > ;
527529 static requestLoginSmsCode ( mobilePhoneNumber : string , options ?: SMSAuthOptions ) : Promise < void > ;
528530 static requestMobilePhoneVerify ( mobilePhoneNumber : string , options ?: SMSAuthOptions ) : Promise < void > ;
529- static requestPasswordReset < T > ( email : string , options ?: AuthOptions ) : Promise < T > ;
531+ static requestPasswordReset ( email : string , options ?: AuthOptions ) : Promise < User > ;
530532 static requestPasswordResetBySmsCode ( mobilePhoneNumber : string , options ?: SMSAuthOptions ) : Promise < void > ;
531- static resetPasswordBySmsCode < T > ( code : string , password : string , options ?: AuthOptions ) : Promise < T > ;
532- static verifyMobilePhone < T > ( code : string , options ?: AuthOptions ) : Promise < T > ;
533- signUp < T > ( attrs ?: any , options ?: AuthOptions ) : Promise < T > ;
534- logIn < T > ( options ?: AuthOptions ) : Promise < T > ;
535- linkWithWeapp < T > ( ) : Promise < T > ;
536- fetch < T > ( options ?: AuthOptions ) : Promise < T > ;
537- save < T > ( arg1 ?: any , arg2 ?: any , arg3 ?: any ) : Promise < T > ;
533+ static resetPasswordBySmsCode ( code : string , password : string , options ?: AuthOptions ) : Promise < User > ;
534+ static verifyMobilePhone ( code : string , options ?: AuthOptions ) : Promise < User > ;
535+
536+ static followerQuery ( userObjectId : string ) : FriendShipQuery ;
537+ static followeeQuery ( userObjectId : string ) : FriendShipQuery ;
538+
539+ signUp ( attrs ?: any , options ?: AuthOptions ) : Promise < User > ;
540+ logIn ( options ?: AuthOptions ) : Promise < User > ;
541+ linkWithWeapp ( ) : Promise < User > ;
542+ fetch ( options ?: AuthOptions ) : Promise < User > ;
543+ save ( arg1 ?: any , arg2 ?: any , arg3 ?: any ) : Promise < User > ;
538544 isAuthenticated ( ) : Promise < boolean > ;
539545 isCurrent ( ) : boolean ;
540546
@@ -553,7 +559,13 @@ declare namespace AV {
553559 refreshSessionToken ( options ?: AuthOptions ) : Promise < User > ;
554560
555561 getRoles ( options ?: AuthOptions ) : Promise < Role > ;
556-
562+
563+ follow ( user : User | string , authOptions ?: AuthOptions ) : Promise < void > ;
564+ follow ( options : { user : User | string , attributes ?: Object } , authOptions ?: AuthOptions ) : Promise < void > ;
565+ unfollow ( user : User | string , authOptions ?: AuthOptions ) : Promise < void > ;
566+ unfollow ( options : { user : User | string } , authOptions ?: AuthOptions ) : Promise < void > ;
567+ followerQuery ( ) : FriendShipQuery ;
568+ followeeQuery ( ) : FriendShipQuery ;
557569 }
558570
559571 export class Captcha {
0 commit comments