import { Extension, LoginWithEmailOTPConfiguration, LoginWithMagicLinkConfiguration, LoginWithSmsConfiguration, UpdateEmailConfiguration } from '@magic-sdk/commons'; declare type UpdateEmailEventHandlers = { [UpdateEmailEventsOnReceived.EmailSent]: () => void; [UpdateEmailEventsOnReceived.EmailNotDeliverable]: () => void; [UpdateEmailEventsOnReceived.OldEmailConfirmed]: () => void; [UpdateEmailEventsOnReceived.NewEmailConfirmed]: () => void; [UpdateEmailEventsEmit.Retry]: () => void; }; export declare enum UpdateEmailEventsEmit { Retry = "retry" } export declare enum UpdateEmailEventsOnReceived { EmailSent = "email-sent", EmailNotDeliverable = "email-not-deliverable", OldEmailConfirmed = "old-email-confirmed", NewEmailConfirmed = "new-email-confirmed" } export declare class AuthExtension extends Extension.Internal<'auth', any> { name: "auth"; config: any; /** * Initiate the "magic link" login flow for a user. If the flow is successful, * this method will return a Decentralized ID token (with a default lifespan * of 15 minutes). */ loginWithMagicLink(configuration: LoginWithMagicLinkConfiguration): import("@magic-sdk/commons").PromiEvent void; "email-not-deliverable": () => void; retry: () => void; } & { "device-needs-approval": () => void; /** * Initiate an Email with OTP login flow for a user. If successful, * this method will return a Decenteralized ID token (with a default lifespan * of 15 minutes) */ "device-verification-email-sent": () => void; "device-verification-link-expired": () => void; "device-approved": () => void; "device-retry": () => void; } & { done: (result: string | null) => void; error: (reason: any) => void; settled: () => void; }>; /** * Initiate an SMS login flow for a user. If successful, * this method will return a Decenteralized ID token (with a default lifespan * of 15 minutes) */ loginWithSMS(configuration: LoginWithSmsConfiguration): import("@magic-sdk/commons").PromiEvent void; error: (reason: any) => void; settled: () => void; }>; /** * Initiate an Email with OTP login flow for a user. If successful, * this method will return a Decenteralized ID token (with a default lifespan * of 15 minutes) */ loginWithEmailOTP(configuration: LoginWithEmailOTPConfiguration): import("@magic-sdk/commons").PromiEvent void; "invalid-email-otp": () => void; "expired-email-otp": () => void; "verify-email-otp": (otp: string) => void; cancel: () => void; } & { "device-needs-approval": () => void; /** * Initiate an Email with OTP login flow for a user. If successful, * this method will return a Decenteralized ID token (with a default lifespan * of 15 minutes) */ "device-verification-email-sent": () => void; "device-verification-link-expired": () => void; "device-approved": () => void; "device-retry": () => void; } & { done: (result: string | null) => void; error: (reason: any) => void; settled: () => void; }>; /** * Log a user in with a special one-time-use credential token. This is * currently used during magic link flows with a configured redirect to * hydrate the user session at the end of the flow. If the flow is successful, * this method will return a Decentralized ID token (with a default lifespan * of 15 minutes). * * If no argument is provided, a credential is automatically parsed from * `window.location.search`. */ loginWithCredential(credentialOrQueryString?: string): import("@magic-sdk/commons").PromiEvent void; error: (reason: any) => void; settled: () => void; }>; setAuthorizationToken(jwt: string): import("@magic-sdk/commons").PromiEvent void; error: (reason: any) => void; settled: () => void; }>; updateEmailWithUI(configuration: UpdateEmailConfiguration): import("@magic-sdk/commons").PromiEvent void; error: (reason: any) => void; settled: () => void; }>; } export * from './types';