import { AxiosRequestConfig } from 'axios'; import { GraphQLError } from 'graphql'; export declare type SendRequestFunction = (query: string, variables?: V) => Promise; export declare class JgqlError extends Error { private _graphQLErrors; private _responseError; private _errorMessage; constructor(errorData: any); readonly type: "GRAPHQL" | "RESPONSE" | "STRING" | "REQUEST"; readonly graphQLErrors: GraphQLError[] | null; readonly responseError: { status: number; data: string; } | null; toString(): string; } export interface Params { getUrl: () => string; augmentRequest?: (request: AxiosRequestConfig) => AxiosRequestConfig | Promise; processResponse?: (response: any) => any | Promise; processError?: (error: JgqlError) => any | Promise; } export declare const createSendRequestFunction: ({ getUrl, augmentRequest, processResponse, processError, }: Params) => SendRequestFunction;