import { AsyncExecutor, SyncExecutor } from '@graphql-tools/utils';
import { GraphQLResolveInfo } from 'graphql';
import { isLiveQueryOperationDefinitionNode } from './isLiveQueryOperationDefinitionNode.cjs';
export declare type SyncFetchFn = (url: string, init?: RequestInit, context?: any, info?: GraphQLResolveInfo) => SyncResponse;
export declare type SyncResponse = Omit<Response, 'json' | 'text'> & {
    json: () => any;
    text: () => string;
};
export declare type AsyncFetchFn = (url: string, options?: RequestInit, context?: any, info?: GraphQLResolveInfo) => Promise<Response>;
export declare type FetchFn = AsyncFetchFn | SyncFetchFn;
export declare type AsyncImportFn = (moduleName: string) => PromiseLike<any>;
export declare type SyncImportFn = (moduleName: string) => any;
export interface HTTPExecutorOptions {
    endpoint?: string;
    fetch?: FetchFn;
    /**
     * Whether to use the GET HTTP method for queries when querying the original schema
     */
    useGETForQueries?: boolean;
    /**
     * Additional headers to include when querying the original schema
     */
    headers?: HeadersConfig;
    /**
     * HTTP method to use when querying the original schema.
     */
    method?: 'GET' | 'POST';
    /**
     * Timeout in milliseconds
     */
    timeout?: number;
    /**
     * Request Credentials (default: 'same-origin')
     * @see https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials
     */
    credentials?: RequestCredentials;
    /**
     * Retry attempts
     */
    retry?: number;
}
export declare type HeadersConfig = Record<string, string>;
export declare function buildHTTPExecutor(options?: Omit<HTTPExecutorOptions, 'fetch'> & {
    fetch: SyncFetchFn;
}): SyncExecutor<any, HTTPExecutorOptions>;
export declare function buildHTTPExecutor(options?: Omit<HTTPExecutorOptions, 'fetch'> & {
    fetch: AsyncFetchFn;
}): AsyncExecutor<any, HTTPExecutorOptions>;
export { isLiveQueryOperationDefinitionNode };
