import { HTTP } from "./HTTP.ts";
export interface AuthSettings {
    path: string;
    key: string;
}
export interface PopupSettings {
    prefix: string;
    width: number;
    height: number;
}
/**
 * Response from getUserData()
 */
export interface UserDataResponse<UserData = any> {
    user: UserData;
}
/**
 * Response from authentication methods (login, register, anonymous, OAuth)
 */
export interface AuthResponse<UserData = any> {
    user: UserData;
    token: string;
}
/**
 * Response from sendPasswordResetEmail()
 */
export type ForgotPasswordResponse = boolean | unknown;
/**
 * @deprecated Use AuthResponse instead
 */
export type AuthData<UserData = any> = AuthResponse<UserData>;
export declare class Auth<UserData = any> {
    #private;
    settings: AuthSettings;
    protected http: HTTP<any>;
    constructor(http: HTTP<any>);
    set token(token: string);
    get token(): string | undefined;
    onChange<U = UserData>(callback: (response: AuthResponse<U | null>) => void): () => void;
    getUserData<U = UserData>(): Promise<UserDataResponse<U>>;
    registerWithEmailAndPassword<U = UserData>(email: string, password: string, options?: any): Promise<AuthResponse<U>>;
    signInWithEmailAndPassword<U = UserData>(email: string, password: string): Promise<AuthResponse<U>>;
    signInAnonymously<U = UserData>(options?: any): Promise<AuthResponse<U>>;
    sendPasswordResetEmail(email: string): Promise<ForgotPasswordResponse>;
    signInWithProvider<U = UserData>(providerName: string, settings?: Partial<PopupSettings>): Promise<AuthResponse<U>>;
    signOut(): Promise<void>;
    private emitChange;
}
