import type { ApiObject, fetcherResult, fetcherConfig } from './index'; export declare type ApiString = string; export declare type Api = ApiString | ApiObject; export interface Payload { ok: boolean; msg: string; msgTimeout?: number; data: any; errors?: { [propName: string]: string; }; } export declare function normalizeApi(api: Api, defaultMethod?: string): ApiObject; export declare function str2function(contents: string, ...args: Array): Function | null; export declare function buildApi(api: Api, data?: object, options?: { autoAppend?: boolean; ignoreData?: boolean; [propName: string]: any; }): ApiObject; export declare function responseAdaptor(ret: fetcherResult, api: ApiObject): Payload; export declare function wrapAdaptor(promise: Promise, api: ApiObject): Promise; export declare function wrapFetcher(fn: (config: fetcherConfig) => Promise): (api: Api, data: object, options?: object) => Promise;