import { CTErrorType as CloudTowerErrorResponse } from "../utils/type";
import { AxiosError } from "axios";
type ParsedCTErrorItem = {
    code?: string | number;
    params?: CloudTowerErrorResponse["params"];
    message?: string;
} | {
    message: string;
};
type ParsedCTError = ParsedCTErrorItem[];
export type CTError = AxiosError<CloudTowerErrorResponse> | CloudTowerErrorResponse;
export declare const isResponseCTError: (error: unknown) => error is CloudTowerErrorResponse;
/**
 * 处理响应错误
 */
export declare const handleResponseCTError: (error: CloudTowerErrorResponse) => ParsedCTError;
type AxiosCTError = AxiosError<CloudTowerErrorResponse>;
export declare const isAxiosCTError: (error: unknown) => error is AxiosCTError;
/**
 * 处理 Axios 错误
 */
export declare const handleAxiosCTError: (error: AxiosCTError) => ParsedCTError;
/**
 * 统一错误处理函数
 * @param error - 各种类型的错误对象
 * @returns 解析后的错误信息，包含 code 或 message
 */
export declare const parseCTError: (error: CTError) => ParsedCTError;
export {};
