import { Plugin } from "@dwwoelfel/postgraphile-core";
declare type SubscriptionReleaser = () => void;
declare type Predicate = (record: any) => boolean;
export declare class LDSLiveSource {
    readonly slotName: string | null;
    private lds;
    private url;
    private connectionString;
    private reconnecting;
    private live;
    private subscriptions;
    private ws;
    private sleepDuration?;
    /**
     * @param url - If not specified, we'll spawn our own LDS listener
     */
    constructor(options: Options);
    init(): Promise<void>;
    subscribeCollection(callback: () => void, collectionIdentifier: any, predicate?: Predicate): SubscriptionReleaser | null;
    subscribeRecord(callback: () => void, collectionIdentifier: any, recordIdentifier: any): SubscriptionReleaser | null;
    close(): Promise<void>;
    private connect;
    private reconnect;
    private sub;
    private announce;
    private handleAnnouncement;
    private handleMessage;
}
interface Options {
    ldsURL?: string;
    connectionString?: string;
    sleepDuration?: number;
}
declare const PgLDSSourcePlugin: Plugin;
export default PgLDSSourcePlugin;
