/**
 * Auth handlers for EE authentication capabilities.
 *
 * These routes enable Studio to:
 * - Detect available auth capabilities
 * - Initiate SSO login flows
 * - Handle OAuth callbacks
 * - Logout users
 */
/**
 * Get the public-facing origin from a request, respecting reverse proxy headers.
 * Behind a proxy (e.g. edge router), request.url contains the internal hostname.
 * X-Forwarded-Host tells us the real public hostname.
 * Always uses https when behind a proxy — Knative's queue-proxy overwrites
 * X-Forwarded-Proto based on the internal HTTP connection, so it's unreliable.
 */
export declare function getPublicOrigin(request: Request): string;
export declare const GET_AUTH_CAPABILITIES_ROUTE: import("../server-adapter").ServerRoute<{}, {
    enabled: boolean;
    login: {
        type: "credentials" | "sso" | "both";
        sso?: {
            provider: string;
            text: string;
            url: string;
            icon?: string | undefined;
        } | undefined;
        signUpEnabled?: boolean | undefined;
    } | null;
} | {
    enabled: boolean;
    login: {
        type: "credentials" | "sso" | "both";
        sso?: {
            provider: string;
            text: string;
            url: string;
            icon?: string | undefined;
        } | undefined;
        signUpEnabled?: boolean | undefined;
    } | null;
    user: {
        id: string;
        email?: string | undefined;
        name?: string | undefined;
        avatarUrl?: string | undefined;
    };
    capabilities: {
        user: boolean;
        session: boolean;
        sso: boolean;
        rbac: boolean;
        acl: boolean;
    };
    access: {
        roles: string[];
        permissions: string[];
    } | null;
}, "json", import("../server-adapter").RouteSchemas<undefined, undefined, undefined, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
    enabled: import("zod").ZodBoolean;
    login: import("zod").ZodNullable<import("zod").ZodObject<{
        type: import("zod").ZodEnum<{
            credentials: "credentials";
            sso: "sso";
            both: "both";
        }>;
        sso: import("zod").ZodOptional<import("zod").ZodObject<{
            provider: import("zod").ZodString;
            text: import("zod").ZodString;
            icon: import("zod").ZodOptional<import("zod").ZodString>;
            url: import("zod").ZodString;
        }, import("zod/v4/core").$strip>>;
        signUpEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
    }, import("zod/v4/core").$strip>>;
    user: import("zod").ZodObject<{
        id: import("zod").ZodString;
        email: import("zod").ZodOptional<import("zod").ZodString>;
        name: import("zod").ZodOptional<import("zod").ZodString>;
        avatarUrl: import("zod").ZodOptional<import("zod").ZodString>;
    }, import("zod/v4/core").$strip>;
    capabilities: import("zod").ZodObject<{
        user: import("zod").ZodBoolean;
        session: import("zod").ZodBoolean;
        sso: import("zod").ZodBoolean;
        rbac: import("zod").ZodBoolean;
        acl: import("zod").ZodBoolean;
    }, import("zod/v4/core").$strip>;
    access: import("zod").ZodNullable<import("zod").ZodObject<{
        roles: import("zod").ZodArray<import("zod").ZodString>;
        permissions: import("zod").ZodArray<import("zod").ZodString>;
    }, import("zod/v4/core").$strip>>;
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
    enabled: import("zod").ZodBoolean;
    login: import("zod").ZodNullable<import("zod").ZodObject<{
        type: import("zod").ZodEnum<{
            credentials: "credentials";
            sso: "sso";
            both: "both";
        }>;
        sso: import("zod").ZodOptional<import("zod").ZodObject<{
            provider: import("zod").ZodString;
            text: import("zod").ZodString;
            icon: import("zod").ZodOptional<import("zod").ZodString>;
            url: import("zod").ZodString;
        }, import("zod/v4/core").$strip>>;
        signUpEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
    }, import("zod/v4/core").$strip>>;
}, import("zod/v4/core").$strip>]>>, "GET", "/auth/capabilities">;
export declare const GET_CURRENT_USER_ROUTE: import("../server-adapter").ServerRoute<{}, {
    id: string;
    email?: string | undefined;
    name?: string | undefined;
    avatarUrl?: string | undefined;
    roles?: string[] | undefined;
    permissions?: string[] | undefined;
} | null, "json", import("../server-adapter").RouteSchemas<undefined, undefined, undefined, import("zod").ZodNullable<import("zod").ZodObject<{
    id: import("zod").ZodString;
    email: import("zod").ZodOptional<import("zod").ZodString>;
    name: import("zod").ZodOptional<import("zod").ZodString>;
    avatarUrl: import("zod").ZodOptional<import("zod").ZodString>;
    roles: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
    permissions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
}, import("zod/v4/core").$strip>>>, "GET", "/auth/me">;
export declare const GET_SSO_LOGIN_ROUTE: import("../server-adapter").ServerRoute<{
    redirect_uri?: string | undefined;
}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, import("zod").ZodObject<{
    redirect_uri: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod/v4/core").$strip>, undefined, undefined>, "GET", "/auth/sso/login">;
export declare const GET_SSO_CALLBACK_ROUTE: import("../server-adapter").ServerRoute<{
    code: string;
    state?: string | undefined;
}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, import("zod").ZodObject<{
    code: import("zod").ZodString;
    state: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod/v4/core").$strip>, undefined, undefined>, "GET", "/auth/sso/callback">;
export declare const POST_LOGOUT_ROUTE: import("../server-adapter").ServerRoute<{}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, undefined, undefined, undefined>, "POST", "/auth/logout">;
export declare const POST_CREDENTIALS_SIGN_IN_ROUTE: import("../server-adapter").ServerRoute<{
    email: string;
    password: string;
}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, undefined, import("zod").ZodObject<{
    email: import("zod").ZodString;
    password: import("zod").ZodString;
}, import("zod/v4/core").$strip>, undefined>, "POST", "/auth/credentials/sign-in">;
export declare const POST_CREDENTIALS_SIGN_UP_ROUTE: import("../server-adapter").ServerRoute<{
    email: string;
    password: string;
    name?: string | undefined;
}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, undefined, import("zod").ZodObject<{
    email: import("zod").ZodString;
    password: import("zod").ZodString;
    name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod/v4/core").$strip>, undefined>, "POST", "/auth/credentials/sign-up">;
export declare const AUTH_ROUTES: readonly [import("../server-adapter").ServerRoute<{}, {
    enabled: boolean;
    login: {
        type: "credentials" | "sso" | "both";
        sso?: {
            provider: string;
            text: string;
            url: string;
            icon?: string | undefined;
        } | undefined;
        signUpEnabled?: boolean | undefined;
    } | null;
} | {
    enabled: boolean;
    login: {
        type: "credentials" | "sso" | "both";
        sso?: {
            provider: string;
            text: string;
            url: string;
            icon?: string | undefined;
        } | undefined;
        signUpEnabled?: boolean | undefined;
    } | null;
    user: {
        id: string;
        email?: string | undefined;
        name?: string | undefined;
        avatarUrl?: string | undefined;
    };
    capabilities: {
        user: boolean;
        session: boolean;
        sso: boolean;
        rbac: boolean;
        acl: boolean;
    };
    access: {
        roles: string[];
        permissions: string[];
    } | null;
}, "json", import("../server-adapter").RouteSchemas<undefined, undefined, undefined, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
    enabled: import("zod").ZodBoolean;
    login: import("zod").ZodNullable<import("zod").ZodObject<{
        type: import("zod").ZodEnum<{
            credentials: "credentials";
            sso: "sso";
            both: "both";
        }>;
        sso: import("zod").ZodOptional<import("zod").ZodObject<{
            provider: import("zod").ZodString;
            text: import("zod").ZodString;
            icon: import("zod").ZodOptional<import("zod").ZodString>;
            url: import("zod").ZodString;
        }, import("zod/v4/core").$strip>>;
        signUpEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
    }, import("zod/v4/core").$strip>>;
    user: import("zod").ZodObject<{
        id: import("zod").ZodString;
        email: import("zod").ZodOptional<import("zod").ZodString>;
        name: import("zod").ZodOptional<import("zod").ZodString>;
        avatarUrl: import("zod").ZodOptional<import("zod").ZodString>;
    }, import("zod/v4/core").$strip>;
    capabilities: import("zod").ZodObject<{
        user: import("zod").ZodBoolean;
        session: import("zod").ZodBoolean;
        sso: import("zod").ZodBoolean;
        rbac: import("zod").ZodBoolean;
        acl: import("zod").ZodBoolean;
    }, import("zod/v4/core").$strip>;
    access: import("zod").ZodNullable<import("zod").ZodObject<{
        roles: import("zod").ZodArray<import("zod").ZodString>;
        permissions: import("zod").ZodArray<import("zod").ZodString>;
    }, import("zod/v4/core").$strip>>;
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
    enabled: import("zod").ZodBoolean;
    login: import("zod").ZodNullable<import("zod").ZodObject<{
        type: import("zod").ZodEnum<{
            credentials: "credentials";
            sso: "sso";
            both: "both";
        }>;
        sso: import("zod").ZodOptional<import("zod").ZodObject<{
            provider: import("zod").ZodString;
            text: import("zod").ZodString;
            icon: import("zod").ZodOptional<import("zod").ZodString>;
            url: import("zod").ZodString;
        }, import("zod/v4/core").$strip>>;
        signUpEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
    }, import("zod/v4/core").$strip>>;
}, import("zod/v4/core").$strip>]>>, "GET", "/auth/capabilities">, import("../server-adapter").ServerRoute<{}, {
    id: string;
    email?: string | undefined;
    name?: string | undefined;
    avatarUrl?: string | undefined;
    roles?: string[] | undefined;
    permissions?: string[] | undefined;
} | null, "json", import("../server-adapter").RouteSchemas<undefined, undefined, undefined, import("zod").ZodNullable<import("zod").ZodObject<{
    id: import("zod").ZodString;
    email: import("zod").ZodOptional<import("zod").ZodString>;
    name: import("zod").ZodOptional<import("zod").ZodString>;
    avatarUrl: import("zod").ZodOptional<import("zod").ZodString>;
    roles: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
    permissions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
}, import("zod/v4/core").$strip>>>, "GET", "/auth/me">, import("../server-adapter").ServerRoute<{
    redirect_uri?: string | undefined;
}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, import("zod").ZodObject<{
    redirect_uri: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod/v4/core").$strip>, undefined, undefined>, "GET", "/auth/sso/login">, import("../server-adapter").ServerRoute<{
    code: string;
    state?: string | undefined;
}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, import("zod").ZodObject<{
    code: import("zod").ZodString;
    state: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod/v4/core").$strip>, undefined, undefined>, "GET", "/auth/sso/callback">, import("../server-adapter").ServerRoute<{}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, undefined, undefined, undefined>, "POST", "/auth/logout">, import("../server-adapter").ServerRoute<{
    email: string;
    password: string;
}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, undefined, import("zod").ZodObject<{
    email: import("zod").ZodString;
    password: import("zod").ZodString;
}, import("zod/v4/core").$strip>, undefined>, "POST", "/auth/credentials/sign-in">, import("../server-adapter").ServerRoute<{
    email: string;
    password: string;
    name?: string | undefined;
}, unknown, "datastream-response", import("../server-adapter").RouteSchemas<undefined, undefined, import("zod").ZodObject<{
    email: import("zod").ZodString;
    password: import("zod").ZodString;
    name: import("zod").ZodOptional<import("zod").ZodString>;
}, import("zod/v4/core").$strip>, undefined>, "POST", "/auth/credentials/sign-up">];
//# sourceMappingURL=auth.d.ts.map