import { IErrorDetail } from 'ts-interface-checker';
import { Request, Response } from './api-ua.js';
interface Options {
    cause?: unknown;
}
export declare class APIError extends Error {
    readonly request: Request;
    readonly response: Response | undefined;
    readonly errCause: unknown;
    constructor(request: Request, response: Response | undefined, message: string, options?: Options);
}
export declare class APIAuthorisationError extends APIError {
    constructor(request: Request, response: Response | undefined, message: string, options?: Options);
}
export declare class APIStatusCodeError extends APIError {
    readonly text: string;
    constructor(request: Request, response: Response, text: string, options?: Options);
    static getMessage(response: Response, text: string): string;
    get key(): string | undefined;
    get description(): string | undefined;
    get simpleMessage(): string | undefined;
    static getBodyDescription(text: string): string | undefined;
    static parseBody(text: string): {
        key?: string;
        description?: string;
    };
}
export declare class APIValidationError extends APIError {
    readonly validation: IErrorDetail[];
    constructor(request: Request, response: Response, validation: IErrorDetail[], options?: Options);
    static getMessage(errors: IErrorDetail[]): string;
}
export declare class APIEventStreamError extends APIError {
    readonly sse: Record<string, string>;
    constructor(request: Request, response: Response, message: string, sse: Record<string, string>, options?: Options);
    static getMessage(description: string, sse: Record<string, string>): string;
}
export {};
//# sourceMappingURL=api-errors.d.ts.map