import type { SupabaseClient } from '../index';
type Client = SupabaseClient & {
    native: org.nativescript.supabase.SupabaseClient;
};
import { OauthProviderType } from '.';
export declare class UserIdentity {
    native: io.github.jan.supabase.auth.user.Identity;
    static fromNative(identity: io.github.jan.supabase.auth.user.Identity): UserIdentity;
    get createdAt(): Date;
    get id(): string;
    private _identityData;
    get identityData(): Record<string, any>;
    get identityId(): string;
    get lastSignInAt(): Date;
    get provider(): string;
    get updatedAt(): Date;
    get userId(): string;
    toJSON(): any;
}
export declare class Factor {
    native: io.github.jan.supabase.auth.user.UserMfaFactor;
    static fromNative(factor: io.github.jan.supabase.auth.user.UserMfaFactor): Factor;
    get createdAt(): Date;
    get factorType(): string;
    get friendlyName(): string;
    get id(): string;
    get status(): 'verified' | 'unverified';
    get updatedAt(): Date;
    toJSON(): any;
}
export declare class User {
    native: io.github.jan.supabase.auth.user.UserInfo;
    static fromNative(user: io.github.jan.supabase.auth.user.UserInfo): User;
    get actionLink(): string;
    private _appMetadata;
    get appMetadata(): Record<string, any>;
    get aud(): string;
    get confirmationSentAt(): Date;
    get confirmedAt(): Date;
    get createdAt(): Date;
    get email(): string;
    get emailChangeSentAt(): Date;
    get emailConfirmedAt(): Date;
    private _factors;
    get factors(): Factor[];
    get id(): string;
    get identities(): any[];
    get invitedAt(): Date;
    get isAnonymous(): boolean;
    get lastSignInAt(): Date;
    get newEmail(): string;
    get phone(): string;
    get phoneConfirmedAt(): Date;
    get recoverySentAt(): Date;
    get role(): string;
    get updatedAt(): Date;
    private _userMetadata;
    get userMetadata(): Record<string, any>;
}
export declare class Session {
    native_: io.github.jan.supabase.auth.user.UserSession;
    static fromNative(session: io.github.jan.supabase.auth.user.UserSession): Session;
    get native(): io.github.jan.supabase.auth.user.UserSession;
    get accessToken(): string;
    get expiresAt(): number;
    get expiresIn(): number;
    get isExpired(): boolean;
    get providerRefreshToken(): string;
    get providerToken(): string;
    get refreshToken(): string;
    get tokenType(): string;
    private _user;
    get user(): User;
    toJSON(): any;
}
export declare class AuthMetaSecurity {
    native_: org.nativescript.supabase.SupabaseAuth.AuthMetaSecurity;
    constructor(captchaToken: string);
    static fromNative(meta: org.nativescript.supabase.SupabaseAuth.AuthMetaSecurity): AuthMetaSecurity;
    get native(): org.nativescript.supabase.SupabaseAuth.AuthMetaSecurity;
    get captchaToken(): string;
}
export declare class OpenIDConnectCredentials {
    native_: org.nativescript.supabase.SupabaseAuth.OpenIDConnectCredentials;
    constructor(provider: 'google' | 'apple' | 'azure' | 'facebook', idToken: string);
    get native(): org.nativescript.supabase.SupabaseAuth.OpenIDConnectCredentials;
    get accessToken(): string | null;
    set accessToken(token: string | null);
    get gotrueMetaSecurity(): AuthMetaSecurity | null;
    set gotrueMetaSecurity(meta: AuthMetaSecurity | null);
    get idToken(): string;
    set idToken(token: string);
    get nonce(): string | null;
    set nonce(nonce: string | null);
    get provider(): 'google' | 'apple' | 'azure' | 'facebook';
    set provider(provider: 'google' | 'apple' | 'azure' | 'facebook');
}
export declare class Admin {
    native_: NSCSupabaseAuthAdmin;
    static fromNative(admin: NSCSupabaseAuthAdmin): Admin;
    get native(): NSCSupabaseAuthAdmin;
}
export declare class Auth {
    client: Client;
    constructor(client: Client);
    get native(): org.nativescript.supabase.SupabaseAuth;
    get currentSession(): Session;
    get currentUser(): User;
    onAuthStateChange(callback: (eventName: 'INITIAL_SESSION' | 'SIGNED_IN' | 'SIGNED_OUT' | 'TOKEN_REFRESHED' | 'USER_UPDATED' | 'PASSWORD_RECOVERY', session: Session) => void): {
        remove: () => void;
    };
    getSession(): Promise<Session>;
    setSession(currentSession: {
        accessToken: string;
        refreshToken: string;
    }): Promise<Session>;
    signInWithPassword(credentials: {
        email?: string;
        phone?: string;
        password: string;
        options?: {
            captchaToken?: string;
        };
    }): Promise<{
        user: User;
        session: Session;
    }>;
    signInAnonymously(credentials?: {
        data?: Record<string, any>;
        options?: {
            captchaToken?: string;
        };
    }): Promise<Session>;
    signInWithIdToken(credentials: OpenIDConnectCredentials): Promise<Session>;
    signUp(value: {
        email?: string;
        phone?: string;
        password: string;
        captchaToken?: string;
        options?: {
            data?: Record<string, any>;
            emailRedirectTo?: string;
        };
    }): Promise<{
        session?: Session;
        user: User;
    }>;
    signInWithOtp(credentials: {
        email?: string;
        phone?: string;
        options?: {
            captchaToken?: string;
            data?: Record<string, any>;
            emailRedirectTo?: string;
            shouldCreateUser?: boolean;
            channel?: 'sms' | 'whatsapp';
        };
    }): Promise<void>;
    signInWithOAuth(credentials: {
        provider: OauthProviderType;
        options?: {
            queryParams?: Record<string, string>;
            redirectTo?: string;
            scopes?: string;
        };
    }): Promise<Session>;
    signInWithSSO(params: {
        providerId?: string;
        domain?: string;
        options?: {
            captchaToken?: string;
            redirectTo?: string;
        };
    }): Promise<string>;
    signOut(options?: {
        scope?: 'global' | 'local' | 'others';
    }): Promise<void>;
    resetPasswordForEmail(email: string, options?: {
        captchaToken?: string;
        redirectTo?: string;
    }): Promise<void>;
    verifyOtp(params: {
        phone: string;
        token: string;
        type: 'sms' | 'phone_change';
        options?: {
            captchaToken?: string;
            redirectTo?: string;
        };
    } | {
        email: string;
        token: string;
        type: 'signup' | 'invite' | 'magiclink' | 'recovery' | 'email_change' | 'email';
        options?: {
            captchaToken?: string;
            redirectTo?: string;
        };
    } | {
        token_hash: string;
        type: 'signup' | 'invite' | 'magiclink' | 'recovery' | 'email_change' | 'email';
        options?: {
            captchaToken?: string;
            redirectTo?: string;
        };
    }): Promise<unknown>;
    refreshSession(refreshToken: string): Promise<Session>;
    update(attributes: {
        data?: Record<string, any>;
        email?: string;
        nonce?: string;
        password?: string;
        phone?: string;
    }): Promise<User>;
    getUserIdentities(): Promise<UserIdentity[]>;
    linkIdentity(credentials: {
        provider: OauthProviderType;
        options?: {
            queryParams?: Record<string, string>;
            scopes?: string;
            redirectTo?: string;
        };
    }): Promise<void>;
    unlinkIdentity(identity: UserIdentity): Promise<void>;
    reauthenticate(): Promise<void>;
    resend(credentials: {
        email?: string;
        type: 'signup' | 'email_change' | 'sms' | 'phone_change';
        phone?: string;
        options?: {
            emailRedirectTo?: string;
            captchaToken?: string;
        };
    }): Promise<void>;
    exchangeCodeForSession(authCode: string): Promise<Session>;
    getUser(jwt?: string): Promise<User>;
}
export {};
