import type { DocumentNode, FormattedExecutionResult } from "graphql";
import type { ErrorLike } from "@apollo/client";
import type { Operation } from "@apollo/client/link";
import { ApolloLink } from "@apollo/client/link";
import type { Prettify } from "@apollo/client/utilities/internal";
export declare const VERSION = 1;
type CallbackOptions = {
    error: ErrorLike;
    operation: Operation;
    meta: ErrorMeta;
    result?: FormattedExecutionResult;
};
type ErrorMeta = {
    persistedQueryNotSupported: boolean;
    persistedQueryNotFound: boolean;
};
type SHA256Function = (...args: any[]) => string | PromiseLike<string>;
type GenerateHashFunction = (document: DocumentNode) => string | PromiseLike<string>;
interface BaseOptions {
    disable?: (options: PersistedQueryLink.DisableFunctionOptions) => boolean;
    retry?: (options: PersistedQueryLink.RetryFunctionOptions) => boolean;
    useGETForHashedQueries?: boolean;
}
export declare namespace PersistedQueryLink {
    interface SHA256Options extends BaseOptions {
        sha256: SHA256Function;
        generateHash?: never;
    }
    interface GenerateHashOptions extends BaseOptions {
        sha256?: never;
        generateHash: GenerateHashFunction;
    }
    export type Options = SHA256Options | GenerateHashOptions;
    export type RetryFunctionOptions = Prettify<CallbackOptions>;
    export type DisableFunctionOptions = Prettify<CallbackOptions>;
    export {};
}
/**
 * @deprecated
 * Use `PersistedQueryLink` from `@apollo/client/link/persisted-queries` instead.
 */
export declare const createPersistedQueryLink: (options: PersistedQueryLink.Options) => PersistedQueryLink;
export declare class PersistedQueryLink extends ApolloLink {
    constructor(options: PersistedQueryLink.Options);
    resetHashCache: () => void;
}
export {};
//# sourceMappingURL=index.d.ts.map
