/**
 * Copyright (c) 2017-Present, Nitrogen Labs, Inc.
 * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
 */
export interface HunterOptionsType {
    readonly headers?: Headers;
    readonly token?: string;
    readonly variables?: any;
    readonly timeout?: number;
    readonly cache?: boolean;
}
export interface HunterQueryType {
    readonly query: string;
    readonly variables?: any;
}
export interface HunterSSEOptionsType {
    readonly headers?: Headers;
    readonly token?: string;
    readonly timeout?: number;
    readonly retryInterval?: number;
    readonly maxRetries?: number;
}
export interface HunterSSEEventType {
    readonly data: string;
    readonly type: string;
    readonly id?: string;
    readonly retry?: number | undefined;
}
export interface HunterSSECallbackType {
    onMessage?: (event: HunterSSEEventType) => void;
    onOpen?: (event: Event) => void;
    onError?: (error: Error | Event) => void;
    onRetry?: (attempt: number, delay: number) => void;
}
export interface HunterSubscriptionOptionsType {
    readonly headers?: Headers;
    readonly token?: string;
    readonly variables?: Record<string, unknown>;
    readonly connectionParams?: Record<string, unknown>;
    readonly reconnectInterval?: number;
    readonly maxReconnectAttempts?: number;
    readonly timeout?: number;
}
export interface HunterSubscriptionCallbackType {
    onNext?: (data: any) => void;
    onError?: (error: Error | Event) => void;
    onComplete?: () => void;
    onReconnect?: (attempt: number) => void;
}
export declare const removeSpaces: (str: string) => string;
export declare const queryString: (json: any) => string;
export declare const ajax: (url: string, method: string, params?: any, options?: HunterOptionsType) => Promise<any>;
export declare const get: (url: string, params?: any, options?: HunterOptionsType) => Promise<any>;
export declare const post: (url: string, params?: any, options?: HunterOptionsType) => Promise<any>;
export declare const put: (url: string, params?: any, options?: HunterOptionsType) => Promise<any>;
export declare const del: (url: string, params?: any, options?: HunterOptionsType) => Promise<any>;
export declare const toGql: (obj: any) => string;
export declare const graphqlQuery: (url: string, query: HunterQueryType | HunterQueryType[], options?: HunterOptionsType) => Promise<any>;
export declare const query: (url: string, body: string, options?: HunterOptionsType) => Promise<any>;
export declare const mutation: (url: string, body: string, options?: HunterOptionsType) => Promise<any>;
export declare const subscribe: (url: string, query: string, callbacks: HunterSubscriptionCallbackType, options?: HunterSubscriptionOptionsType) => (() => void);
export declare const subscribeSSE: (url: string, callbacks: HunterSSECallbackType, options?: HunterSSEOptionsType) => (() => void);
export { ApiError } from './errors/ApiError.js';
//# sourceMappingURL=index.d.ts.map