import { UnauthorizedException } from "@nestjs/common"; /** * Thrown when an unauthenticated request should be redirected to a login page * rather than receiving a 401 JSON response. * * Extends {@link UnauthorizedException} so existing 401 catch filters still apply. * The `getRedirect()` method provides the redirect URL and status code * for an exception filter to choose to handle as an HTTP redirect. * * @example * ```typescript * throw new UnauthorizedRedirectException("/auth/magic-link", HttpStatus.SEE_OTHER) * ``` */ export declare class UnauthorizedRedirectException extends UnauthorizedException { readonly url: string; readonly redirectStatus: number; /** * @param url - The URL to redirect the unauthenticated user to * @param redirectStatus - The HTTP status code for the redirect (e.g. 303 See Other) */ constructor(url: string, redirectStatus: number); /** * Returns the redirect target for an exception filter to handle. * * @returns Object containing the redirect URL and HTTP status code */ getRedirect(): { url: string; status: number; }; }