/// <reference types="zen-observable" />
import { Operation, ApolloLink, FetchResult, Observable, GraphQLRequest } from '@apollo/client';
interface MockApolloLink extends ApolloLink {
    operation?: Operation;
}
export declare function mockSingleLink(...mockedResponses: MockedResponse[]): MockApolloLink;
export declare function mockObservableLink(): MockSubscriptionLink;
export interface MockedResponse {
    request: GraphQLRequest;
    result?: FetchResult;
    error?: Error;
    delay?: number;
}
export interface MockedSubscriptionResult {
    result?: FetchResult;
    error?: Error;
    delay?: number;
}
export interface MockedSubscription {
    request: Operation;
}
export declare class MockLink extends ApolloLink {
    operation: Operation;
    private mockedResponsesByKey;
    constructor(mockedResponses: MockedResponse[]);
    addMockedResponse(mockedResponse: MockedResponse): void;
    request(operation: Operation): Observable<FetchResult<{
        [key: string]: any;
    }, Record<string, any>, Record<string, any>>>;
}
export declare class MockSubscriptionLink extends ApolloLink {
    private observer;
    unsubscribers: any[];
    setups: any[];
    constructor();
    request(): Observable<FetchResult<{
        [key: string]: any;
    }, Record<string, any>, Record<string, any>>>;
    simulateResult(result: MockedSubscriptionResult): void;
    simulateComplete(): void;
    onSetup(listener: any): void;
    onUnsubscribe(listener: any): void;
}
export {};
