add TS definition for retrieveAccount

This commit is contained in:
blagoev 2017-07-06 12:33:47 +03:00
parent e31529397f
commit 55c7c8f68c

12
lib/index.d.ts vendored
View File

@ -240,6 +240,17 @@ declare namespace Realm {
*/
declare namespace Realm.Sync {
interface UserInfo {
id: string;
isAdmin: boolean;
}
interface Account {
provider_id: string;
provider: string;
user: UserInfo
}
/**
* User
* @see { @link https://realm.io/docs/javascript/latest/api/Realm.Sync.User.html }
@ -258,6 +269,7 @@ declare namespace Realm.Sync {
static registerWithProvider(server: string, options: { provider: string, providerToken: string, userInfo: any }, callback: (error: Error | null, user: User | null) => void): void;
logout(): void;
openManagementRealm(): Realm;
retrieveAccount(provider: string, username: string): Promise<Account>;
}
interface SyncConfiguration {