import type { FailedParams, RequestHookParam } from "./def";
import type { RequestReturn, RequestReturnData } from "./def";
import type { FastjsRequest } from "./fetch-types";
export interface GlobalConfig {
    timeout: number;
    hooks: RequestHookParam;
    handler: {
        handleResponse: (response: Response, request: FastjsRequest) => Promise<any>;
        responseCode: (code: number, request: FastjsRequest) => boolean;
    };
    check: {
        ignoreFormatWarning: boolean;
        stringBodyWarning: boolean;
        unrecommendedMethodWarning: boolean;
    };
}
export declare const globalConfig: GlobalConfig;
export declare function createConfig(config?: Partial<RequestConfig>): RequestConfig;
export interface RequestConfig {
    timeout: number;
    headers: {
        [key: string]: string;
    };
    wait: number;
    failed: (error: FailedParams<Error | number>) => void;
    callback: (data: RequestReturnData, response: RequestReturn) => void;
    query: {
        [key: string]: any;
    } | string | null;
    body: {
        [key: string]: any;
    } | string | null;
    hooks: RequestHookParam;
}
