export declare const ApiContext: {
    Init: () => void;
    Create: <PO, RO>(context: IApiContextParam) => {
        Call: (params?: {
            noDefaultHandle?: number[] | boolean;
            onStream?: IOnStream<RO> | undefined;
            onStreamEnd?: IOnStream<RO> | undefined;
            po?: PO | undefined;
        } | undefined) => Promise<IApiCallResult<RO>>;
    };
    FetchBaseUrl: () => string;
    useDefaultHandler: (handler: (ro: IApiCallResult<any>, noDefaultHandle: number[] | boolean) => void) => void;
};
export interface IApiContextParam {
    method: 'GET' | 'POST' | 'PUT' | 'DELETE';
    paramType?: 'query' | 'body' | 'form';
    stream?: boolean;
    timeout?: number;
    url: string;
}
export interface IApiContext<PO, RO> {
    Call: (po?: PO) => Promise<IApiCallResult<RO>>;
}
export interface IApiCallResult<RO> {
    data?: RO;
    errorCode: number;
    message: string;
}
export interface IApiCallError {
    err_code: number;
    err_msg: string;
}
export type IOnStream<RO> = (ro: RO) => void;
