import type { ApiResponse, ErrorHandlingStrategy, Options } from "./request-types";
import { ApiClient } from "./request-types";
export interface HttpClientConfig {
    apiUrl: string;
    errorHandlingStrategy?: ErrorHandlingStrategy;
    client?: ApiClient;
}
export declare class HttpClient {
    private config;
    private csrfToken;
    private csrfTokenPromise;
    constructor(config: HttpClientConfig);
    get apiUrl(): string;
    setApiUrl(url: string): void;
    get client(): ApiClient | undefined;
    get errorHandlingStrategy(): ErrorHandlingStrategy;
    static isValidObject(value: any): boolean;
    static flattenObject(value: any, path?: any[]): any;
    static jsonToQueryString(json: Record<string, any>): string;
    fetchJson<T = any>(url: string, options?: Options): Promise<ApiResponse<T>>;
    fetchData(url: string, options?: Options): Promise<Response>;
    private createHeaders;
    private interceptResponse;
    private isUnauthorized;
    private isLimitExceeded;
    private getMethod;
    private isBrowserRuntime;
    private shouldAttachCsrf;
    private fetchCsrfToken;
    private getOrCreateCsrfToken;
    private attachCsrfHeaderIfNeeded;
}
