import { StatusEvent } from './syncEvents';
import { ConnectP2PLocalOptions, ConnectSyncServerOptions, ConnectUdpOptions } from './Sync';
export default interface ISync {
    connect(options?: string | ConnectSyncServerOptions | ConnectP2PLocalOptions | ConnectUdpOptions): Promise<void>;
    close(): Promise<void>;
    init(groupName?: string, deviceIdentification?: string): Promise<void>;
    joinGroup({ groupName, deviceIdentification }: {
        groupName?: string;
        deviceIdentification?: string;
    }): Promise<void>;
    leaveGroup(groupName?: string): Promise<void>;
    wait(data?: any, groupName?: string, timeout?: number): Promise<any>;
    cancelWait(groupName?: string): Promise<void>;
    setValue(key: string, value: any, groupName?: string): Promise<void>;
    broadcastValue({ groupName, key, value }: {
        groupName?: string;
        key: string;
        value: any;
    }): Promise<void>;
    onValue(listener: (key: string, value: any, groupName?: string) => void): void;
    onStatus(listener: (status: StatusEvent) => void): void;
    onClosed(listener: (error?: Error) => void): void;
}
