import { AxiosInstance, AxiosResponse } from 'axios';
import { Eventual, Logger, SubgraphDeploymentID } from '@graphprotocol/common-ts';
import { DocumentNode } from 'graphql';
import { OperationResult } from '@urql/core';
import { BlockPointer, IndexingError } from './types';
import { IndexingStatusResolver } from './indexing-status';
export interface NetworkSubgraphCreateOptions {
    logger: Logger;
    endpoint?: string;
    deployment?: {
        indexingStatusResolver: IndexingStatusResolver;
        graphNodeQueryEndpoint: string;
        deployment: SubgraphDeploymentID;
    };
}
interface DeploymentStatus {
    health: string;
    synced: boolean;
    latestBlock?: BlockPointer;
    chainHeadBlock?: BlockPointer;
    fatalError?: IndexingError;
}
export declare type QueryResult<Data> = Pick<OperationResult<Data>, 'error' | 'data' | 'extensions'>;
export declare class NetworkSubgraph {
    logger: Logger;
    endpointClient?: AxiosInstance;
    readonly deployment?: {
        id: SubgraphDeploymentID;
        client: AxiosInstance;
        status: Eventual<DeploymentStatus>;
    };
    private constructor();
    static create({ logger: parentLogger, endpoint, deployment, }: NetworkSubgraphCreateOptions): Promise<NetworkSubgraph>;
    private getClient;
    query<Data = any>(query: DocumentNode, variables?: Record<string, any>): Promise<QueryResult<Data>>;
    queryRaw(body: string): Promise<AxiosResponse>;
}
export {};
