@@ -491,6 +491,8 @@ declare namespace AV {
491491 interface GetOptions extends AuthOptions { }
492492 }
493493
494+ class FriendShipQuery extends Query { }
495+
494496 /**
495497 * Represents a Role on the AV server. Roles represent groupings of
496498 * Users for the purposes of granting permissions (e.g. specifying an ACL
@@ -526,28 +528,32 @@ declare namespace AV {
526528 export class User extends Object {
527529
528530 static current ( ) : User ;
529- static signUp < T > ( username : string , password : string , attrs : any , options ?: AuthOptions ) : Promise < T > ;
530- static logIn < T > ( username : string , password : string , options ?: AuthOptions ) : Promise < T > ;
531- static logOut < T > ( ) : Promise < T > ;
532- static become < T > ( sessionToken : string , options ?: AuthOptions ) : Promise < T > ;
533-
534- static loginWithWeapp < T > ( ) : Promise < T > ;
535- static logInWithMobilePhone < T > ( mobilePhone : string , password : string , options ?: AuthOptions ) : Promise < T > ;
536- static logInWithMobilePhoneSmsCode < T > ( mobilePhone : string , smsCode : string , options ?: AuthOptions ) : Promise < T > ;
537- static signUpOrlogInWithAuthData < T > ( data : any , platform : string , options ?: AuthOptions ) : Promise < T > ;
538- static signUpOrlogInWithMobilePhone < T > ( mobilePhoneNumber : string , smsCode : string , attributes ?: any , options ?: AuthOptions ) : Promise < T > ;
539- static requestEmailVerify < T > ( email : string , options ?: AuthOptions ) : Promise < T > ;
531+ static signUp ( username : string , password : string , attrs : any , options ?: AuthOptions ) : Promise < User > ;
532+ static logIn ( username : string , password : string , options ?: AuthOptions ) : Promise < User > ;
533+ static logOut ( ) : Promise < User > ;
534+ static become ( sessionToken : string , options ?: AuthOptions ) : Promise < User > ;
535+
536+ static loginWithWeapp ( ) : Promise < User > ;
537+ static logInWithMobilePhone ( mobilePhone : string , password : string , options ?: AuthOptions ) : Promise < User > ;
538+ static logInWithMobilePhoneSmsCode ( mobilePhone : string , smsCode : string , options ?: AuthOptions ) : Promise < User > ;
539+ static signUpOrlogInWithAuthData ( data : any , platform : string , options ?: AuthOptions ) : Promise < User > ;
540+ static signUpOrlogInWithMobilePhone ( mobilePhoneNumber : string , smsCode : string , attributes ?: any , options ?: AuthOptions ) : Promise < User > ;
541+ static requestEmailVerify ( email : string , options ?: AuthOptions ) : Promise < User > ;
540542 static requestLoginSmsCode ( mobilePhoneNumber : string , options ?: SMSAuthOptions ) : Promise < void > ;
541543 static requestMobilePhoneVerify ( mobilePhoneNumber : string , options ?: SMSAuthOptions ) : Promise < void > ;
542- static requestPasswordReset < T > ( email : string , options ?: AuthOptions ) : Promise < T > ;
544+ static requestPasswordReset ( email : string , options ?: AuthOptions ) : Promise < User > ;
543545 static requestPasswordResetBySmsCode ( mobilePhoneNumber : string , options ?: SMSAuthOptions ) : Promise < void > ;
544- static resetPasswordBySmsCode < T > ( code : string , password : string , options ?: AuthOptions ) : Promise < T > ;
545- static verifyMobilePhone < T > ( code : string , options ?: AuthOptions ) : Promise < T > ;
546- signUp < T > ( attrs ?: any , options ?: AuthOptions ) : Promise < T > ;
547- logIn < T > ( options ?: AuthOptions ) : Promise < T > ;
548- linkWithWeapp < T > ( ) : Promise < T > ;
549- fetch < T > ( options ?: AuthOptions ) : Promise < T > ;
550- save < T > ( arg1 ?: any , arg2 ?: any , arg3 ?: any ) : Promise < T > ;
546+ static resetPasswordBySmsCode ( code : string , password : string , options ?: AuthOptions ) : Promise < User > ;
547+ static verifyMobilePhone ( code : string , options ?: AuthOptions ) : Promise < User > ;
548+
549+ static followerQuery ( userObjectId : string ) : FriendShipQuery ;
550+ static followeeQuery ( userObjectId : string ) : FriendShipQuery ;
551+
552+ signUp ( attrs ?: any , options ?: AuthOptions ) : Promise < User > ;
553+ logIn ( options ?: AuthOptions ) : Promise < User > ;
554+ linkWithWeapp ( ) : Promise < User > ;
555+ fetch ( options ?: AuthOptions ) : Promise < User > ;
556+ save ( arg1 ?: any , arg2 ?: any , arg3 ?: any ) : Promise < User > ;
551557 isAuthenticated ( ) : Promise < boolean > ;
552558 isCurrent ( ) : boolean ;
553559
@@ -566,7 +572,13 @@ declare namespace AV {
566572 refreshSessionToken ( options ?: AuthOptions ) : Promise < User > ;
567573
568574 getRoles ( options ?: AuthOptions ) : Promise < Role > ;
569-
575+
576+ follow ( user : User | string , authOptions ?: AuthOptions ) : Promise < void > ;
577+ follow ( options : { user : User | string , attributes ?: Object } , authOptions ?: AuthOptions ) : Promise < void > ;
578+ unfollow ( user : User | string , authOptions ?: AuthOptions ) : Promise < void > ;
579+ unfollow ( options : { user : User | string } , authOptions ?: AuthOptions ) : Promise < void > ;
580+ followerQuery ( ) : FriendShipQuery ;
581+ followeeQuery ( ) : FriendShipQuery ;
570582 }
571583
572584 export class Captcha {
0 commit comments