export type SafeErrorItem = {
    Code: () => string;
    Error: () => string;
};
export type SafeErrorParamsResolver = {
    Params: () => Record<string, unknown>;
};
export type SafeErrorResolver = {
    Resolve: (data: Record<string, unknown>) => unknown;
};
export declare class ApiError extends Error {
    rawData: unknown;
    Data: Record<string, unknown>;
    Message: string;
    Status: number;
    constructor(status?: number, message?: string, rawData?: unknown);
    Error(): string;
    RawData(): unknown;
    Is(target: unknown): boolean;
    toJSON(): Record<string, unknown>;
}
export declare function NewNotFoundError(message?: string, rawErrData?: unknown): ApiError;
export declare function NewBadRequestError(message?: string, rawErrData?: unknown): ApiError;
export declare function NewForbiddenError(message?: string, rawErrData?: unknown): ApiError;
export declare function NewUnauthorizedError(message?: string, rawErrData?: unknown): ApiError;
export declare function NewInternalServerError(message?: string, rawErrData?: unknown): ApiError;
export declare function NewTooManyRequestsError(message?: string, rawErrData?: unknown): ApiError;
export declare function NewApiError(status?: number, message?: string, rawErrData?: unknown): ApiError;
export declare function ToApiError(err: unknown): ApiError;
export declare function apiErrorResponse(event: {
    json: (status: number, body: unknown) => Response;
}, apiErr: ApiError): Response;
export declare function safeErrorsData(err: unknown): Record<string, unknown>;
