import { Plugin } from "postgraphile-core";
declare module "graphile-build" {
    interface GraphileBuildOptions {
        pgLDSUrl?: string;
        ldsSleepDuration?: number;
        ldsTablePattern?: string;
    }
}
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?;
    private tablePattern?;
    /**
     * @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;
    tablePattern?: string;
}
declare const PgLDSSourcePlugin: Plugin;
export default PgLDSSourcePlugin;
//# sourceMappingURL=PgLDSSourcePlugin.d.ts.map