export type CollectionEvent = '' | 'update' | 'destroy';
export interface SubscribeOptions {
    companyId?: number;
    userId?: number;
    feed?: {
        companyId?: number;
        userId?: number;
    };
    provider?: string;
    collection?: string;
    dataset?: string;
    assetId?: number;
    event?: CollectionEvent;
}
export interface AcknowledgeCb {
    (err?: Error): void;
}
export interface OnDataReceive<T> {
    (data: T): void | Promise<void>;
}
export interface SubscriptionsClientV2Events {
    [event: `data#${string}`]: any;
}
export interface SubscriptionsClientV2ServerEvents {
    subscribe: (opts: {
        channel: string;
        _current_location_href?: string;
    }, ack?: AcknowledgeCb) => void;
    unsubscribe: (opts: {
        channel: string;
        _current_location_href?: string;
    }, ack?: AcknowledgeCb) => void;
}
export interface SubcriptionsClient {
    subscribe<T>(channel: string, onData: OnDataReceive<T>, ack?: AcknowledgeCb): () => void;
    unsubscribe<T>(channel: string, onData: OnDataReceive<T>, ack?: AcknowledgeCb): void;
    disconnect(): void;
    onConnectionChange(handler: OnConnectionChange): () => void;
}
export type ConnectionStatus = 'connected' | 'disconnected' | 'reconnecting' | 'error';
export type ConnectionChange = {
    status: ConnectionStatus;
    reason?: string;
};
export type OnConnectionChange = (change: ConnectionChange) => void;
//# sourceMappingURL=types.d.ts.map