UNPKG

mockbase

Version:
73 lines (72 loc) 3.32 kB
import * as firebase from "firebase"; import { UserCredential } from "./user-credential"; import { UserStore } from "./user-store"; export interface UserSchema { emailVerified: boolean; isAnonymous: boolean; metadata: firebase.auth.UserMetadata; password?: string; phoneNumber: string | null; providerData: UserInfo[]; refreshToken: string; displayName: string | null; email: string | null; photoURL: string | null; providerId: string; uid: string; tenantId: string | null; } export declare class UserInfo implements firebase.UserInfo { readonly uid: string; readonly providerId: string; readonly displayName: string | null; readonly email: string | null; readonly phoneNumber: string | null; readonly photoURL: string | null; constructor(uid: string, providerId: string, rest: Partial<Omit<firebase.UserInfo, "uid" | "providerId">>); } export declare class User implements firebase.User, UserSchema { private readonly store; readonly uid: string; displayName: string | null; email: string | null; emailVerified: boolean; isAnonymous: boolean; metadata: firebase.auth.UserMetadata; password?: string; phoneNumber: string | null; photoURL: string | null; providerData: UserInfo[]; providerId: string; refreshToken: string; tenantId: string | null; multiFactor: firebase.User.MultiFactorUser; constructor(data: Partial<UserSchema>, store: UserStore); delete(): Promise<any>; getIdToken(forceRefresh?: boolean): Promise<any>; getIdTokenResult(forceRefresh?: boolean): Promise<any>; getToken(forceRefresh?: boolean): Promise<any>; linkAndRetrieveDataWithCredential(credential: firebase.auth.AuthCredential): Promise<any>; linkWithCredential(credential: firebase.auth.AuthCredential): Promise<any>; linkWithPhoneNumber(phoneNumber: string, applicationVerifier: firebase.auth.ApplicationVerifier): Promise<any>; private linkWithSocial; linkWithPopup(provider: firebase.auth.AuthProvider): Promise<UserCredential>; linkWithRedirect(provider: firebase.auth.AuthProvider): Promise<void>; reauthenticateAndRetrieveDataWithCredential(credential: firebase.auth.AuthCredential): Promise<any>; reauthenticateWithCredential(credential: firebase.auth.AuthCredential): Promise<any>; reauthenticateWithPhoneNumber(phoneNumber: string, applicationVerifier: firebase.auth.ApplicationVerifier): Promise<any>; reauthenticateWithPopup(provider: firebase.auth.AuthProvider): Promise<any>; reauthenticateWithRedirect(provider: firebase.auth.AuthProvider): Promise<any>; reload(): Promise<any>; sendEmailVerification(actionCodeSettings?: firebase.auth.ActionCodeSettings | null): Promise<any>; toJSON(): Object; unlink(providerId: string): Promise<User>; updateEmail(newEmail: string): Promise<void>; updatePassword(newPassword: string): Promise<void>; updatePhoneNumber(phoneCredential: firebase.auth.AuthCredential): Promise<any>; updateProfile({ displayName, photoURL, }: { displayName?: string | null; photoURL?: string | null; }): Promise<void>; verifyBeforeUpdateEmail(newEmail: string, actionCodeSettings?: firebase.auth.ActionCodeSettings | null | undefined): Promise<void>; }