import { ApolloLink, Observable, FetchResult, Operation, NextLink } from "@apollo/client/core";
import type { Consumer } from "@rails/actioncable";
type RequestResult = FetchResult<{
    [key: string]: any;
}, Record<string, any>, Record<string, any>>;
type ConnectionParams = object | ((operation: Operation) => object);
type SubscriptionCallbacks = {
    connected?: (args?: {
        reconnected: boolean;
    }) => void;
    disconnected?: () => void;
    received?: (payload: any) => void;
};
type CreateChannelId = () => string;
declare class ActionCableLink extends ApolloLink {
    cable: Consumer;
    channelName: string;
    actionName: string;
    connectionParams: ConnectionParams;
    callbacks: SubscriptionCallbacks;
    createChannelId: CreateChannelId;
    constructor(options: {
        cable: Consumer;
        createChannelId?: CreateChannelId;
        channelName?: string;
        actionName?: string;
        connectionParams?: ConnectionParams;
        callbacks?: SubscriptionCallbacks;
    });
    request(operation: Operation, _next: NextLink): Observable<RequestResult>;
}
export default ActionCableLink;
