/**
 * 统一接口公共模块
 * @date 2022-03-04
 * @author 何华东
 */
import { AxiosInstance } from 'axios';
import { TyApiConfig } from './Config';
/**
 * 统一接口请求基类
 */
export declare class ApiRequestBase {
    /**
     * 车场id
     */
    parkId?: any;
    /**
     * 接口业务代码
     */
    serviceCode?: string;
}
/**
 * 统一/非标接口响应
 */
export declare class ApiResponse<T = any> {
    constructor(resCode: any);
    /**
     * 响应码,0为成功
     */
    resCode: string;
    /**
     * 响应信息
     */
    resMsg?: string;
    /**
     * 响应数据
     */
    data?: T;
    /**
     * 判断响应码是否为成功
     */
    static resCodeIsSuccess(resCode: string): boolean;
    /**
     * 成功响应实例,resCode=0
     */
    static readonly success: ApiResponse;
    /**
     * 创建一个失败响应，默认响应码为-1
     * @param resMsg
     * @returns
     */
    static failed(resMsg?: string): ApiResponse<any>;
    /**
     * 重推响应实例,resCode=999
     */
    static readonly repush: ApiResponse;
    static successWithData(data: any): ApiResponse<any>;
    static successWithMsg(resMsg: string): ApiResponse<any>;
}
/**
 * 如果统一接口响应码为非成功则抛出异常
 * @param apiResponse
 */
export declare function throwIfResCodeNoSuccess(apiResponse: ApiResponse): void;
/**
 * 签名工具
 */
export declare class SignUtils {
    /**
     * 获取签名
     */
    static getSign(data: object, appSecret: string): string;
}
/**
 * 统一上行接口装饰器
 *
 * 对参数进行验签(仅PROD),异常捕获,记录日志,如果出现异常则自动返回失败报文
 *
 * @param description 服务描述，仅为日志输出
 */
export declare function Service(description?: string, config?: {
    isLog?: boolean;
}): MethodDecorator;
export declare function generateAxiosInstance(config: TyApiConfig): AxiosInstance;
/**
 * 统一接口axios实例
 *
 * 统一接口地址配置优先级：
 *
 * 1.ioc配置
 *
 * 2.配置中心
 *
 * 3.根据环境自动配置
 */
export declare let axiosInstance: AxiosInstance;
