import { ApiRouter } from "../http/ApiRouter";
import { ViewRouter } from "../http/ViewRouter";
import type { IAuthenticationAdapter, User } from "./adapters/types";
import { ServiceProvider } from "../services/ServiceProvider";
import type { OAuthProvider } from "./oauth/OAuthProvider";
declare class OAuthViewRouter extends ViewRouter {
    middlewares: string[];
    routes: {
        "/:provider": import("../http/ViewRouter").ViewRoute<Record<string, never>, Promise<{
            destination: string;
        }>, Record<string, never>>;
        "/:provider/callback": import("../http/ViewRouter").ViewRoute<Record<string, never>, Promise<{
            session: import("./adapters/types").SessionWithUser;
        }>, Record<string, never>>;
    };
}
export declare class AuthViewRouter extends ViewRouter {
    middlewares: string[];
    routes: {
        "/sign-in/magic-link": import("../http/ViewRouter").ViewRoute<Record<string, never>, Promise<{
            error: string;
            session?: undefined;
        } | {
            session: import("./adapters/types").SessionWithUser;
            error?: undefined;
        }>, Record<string, never>>;
        "/oauth": typeof OAuthViewRouter;
    };
}
export declare class AuthApiRouter extends ApiRouter {
    middlewares: string[];
    routes: {
        "/sign-in": import("../http/ApiRouter").RouteHandler<"POST", {
            email: string;
            password: string;
        }, Promise<{
            id: number;
            publicId: string;
            name: string | null;
            email: string | null;
            emailVerifiedAt: Date | null;
            globalRole: number;
            organizationId: number | null;
            accounts: import("./adapters/types").Account[];
            extension: Record<string, any>;
        }>, Record<string, string>>;
        "/sign-in-v2": import("../http/ApiRouter").RouteHandler<"POST", {
            email: string;
            password: string;
        }, Promise<{
            id: number;
            publicId: string;
            name: string | null;
            email: string | null;
            emailVerifiedAt: Date | null;
            globalRole: number;
            organizationId: number | null;
            accounts: import("./adapters/types").Account[];
            extension: Record<string, any>;
        }>, Record<string, string>>;
        "/sign-up": import("../http/ApiRouter").RouteHandler<"POST", import("../http/HttpRequest").Body, Promise<User>, unknown>;
        "/sign-out": import("../http/ApiRouter").RouteHandler<"POST", Record<string, never>, Promise<{}>, Record<string, never>>;
        "/forgot-password": import("../http/ApiRouter").RouteHandler<"POST", {
            email: string;
        }, Promise<{}>, Record<string, string>>;
        "/reset-password": import("../http/ApiRouter").RouteHandler<"POST", {
            password: string;
            token: string;
        }, Promise<{}>, Record<string, string>>;
        "/change-password": import("../http/ApiRouter").RouteHandler<"POST", {
            oldPassword: string;
            newPassword: string;
        }, Promise<{}>, Record<string, never>>;
        "/verify-email": import("../http/ApiRouter").RouteHandler<"POST", {
            token: string;
        }, Promise<{
            email: string;
        }>, Record<string, never>>;
        "/me": import("../http/ApiRouter").RouteHandler<"GET", import("../http/HttpRequest").Body, Promise<User>, unknown>;
        "/magic-link": import("../http/ApiRouter").RouteHandler<"POST", {
            email: string;
        }, Promise<{
            email: string;
        }>, Record<string, never>>;
        "/sign-in-with-pin": import("../http/ApiRouter").RouteHandler<"POST", {
            email: string;
            pin: string;
        }, Promise<{
            session: import("./adapters/types").SessionWithUser;
        }>, Record<string, never>>;
        "/sign-in-with-pin-v2": import("../http/ApiRouter").RouteHandler<"POST", {
            email: string;
            pin: string;
        }, Promise<import("./adapters/types").SessionWithUser>, Record<string, never>>;
    };
}
export declare class AuthenticationServiceProvider extends ServiceProvider {
    basePath: string;
    verifyEmail: boolean;
    redirectPath: string;
    sessionExpiresInHours: number;
    sessionAbsoluteExpiresInHours: number;
    signUpRequest: any;
    adapter: IAuthenticationAdapter;
    oauthProviders: Record<string, OAuthProvider>;
    boot(): void;
    verifyPassword(password: string, hash: string): Promise<boolean>;
    hashPassword(password: string): Promise<string>;
    generateForgotPasswordToken(user: User): Promise<string>;
    generateEmailVerificationToken(email: string): Promise<string> | string;
    generateMagicLinkToken(email: string): Promise<string> | string;
    extendSession<T extends User>(_user: T): Promise<any> | any;
    onSignUp(_user: User, _verificationToken: string, search: Record<string, string>): Promise<void> | void;
    onSignIn(_session: any, search: Record<string, string>): Promise<void> | void;
    onSignOut(_session: any): Promise<void> | void;
    onForgotPassword(_user: any, _verificationToken: string): Promise<void> | void;
    onResetPassword(_session: any): Promise<void> | void;
    onMagicLinkCreated(_session: any, _args: {
        email: string;
        token: string;
        pin: string;
    }): Promise<void> | void;
}
export {};
//# sourceMappingURL=AuthenticationServiceProvider.d.ts.map