import type { UmbProblemDetails } from './types.js';
export declare class UmbError extends Error {
    name: string;
    static isUmbError(error: unknown): error is UmbError;
}
export declare class UmbCancelError extends UmbError {
    name: string;
    static isUmbCancelError(error: unknown): error is UmbCancelError;
    /**
     * Transforms a CancelError into an UmbCancelError.
     * @param {*} error The CancelError to transform.
     * @returns {UmbCancelError} The transformed UmbCancelError.
     * @deprecated Use `UmbCancelError.isUmbCancelError` instead and map your object to `UmbCancelError` if needed.
     */
    static fromLegacyCancelError(error: Error): UmbCancelError;
}
/**
 * UmbApiError is a class that extends UmbError and represents an error that occurs during an API call.
 */
export declare class UmbApiError extends UmbError {
    name: string;
    status: number;
    request: unknown;
    problemDetails: UmbProblemDetails;
    constructor(message: string, status: number, request: unknown, problemDetails: UmbProblemDetails);
    static isUmbApiError(error: unknown): error is UmbApiError;
    /**
     * Transforms an ApiError into an UmbApiError.
     * @param {*} error The ApiError to transform.
     * @returns {UmbApiError} The transformed UmbApiError.
     * @deprecated Use `UmbCancelError.isUmbApiError` instead and map your object to `UmbApiError` if needed.
     */
    static fromLegacyApiError(error: Error & {
        body?: string;
        status?: number;
        request?: unknown;
    }): UmbApiError;
}
