import type { TBaseConfig } from "./types";
export type TApiConfig = TBaseConfig & {
    baseUrl: string;
    headers?: Record<string, string>;
    auth?: {
        type: "bearer" | "basic" | "apikey" | "oauth2";
        token?: string;
        credentials?: {
            username: string;
            password: string;
        };
        key?: string;
    };
};
type THttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
type TRequestOptions = {
    params?: Record<string, any>;
    body?: any;
    headers?: Record<string, string>;
};
export type TApiClient = {
    request<T>(method: THttpMethod, path: string, options?: TRequestOptions): Promise<T>;
    get<T>(path: string, options?: TRequestOptions): Promise<T>;
    post<T>(path: string, body?: any, options?: TRequestOptions): Promise<T>;
    put<T>(path: string, body?: any, options?: TRequestOptions): Promise<T>;
    delete<T>(path: string, options?: TRequestOptions): Promise<T>;
    patch<T>(path: string, body?: any, options?: TRequestOptions): Promise<T>;
};
export declare function createFyncApi(config: TApiConfig): TApiClient;
export {};
//# sourceMappingURL=api-factory.d.ts.map