import { DBLiveClient, DBLiveClientInternalLibrary, DBLiveClientLock } from "../client/client"; import { Disposable } from "../common/interfaces/disposable"; import { DBLiveKeyEventHandlerArgs, DBLiveKeyEventListener } from "./key.eventlistener"; export declare class DBLiveKey implements Disposable { private readonly key; private readonly client; private readonly lib; private _isWatching; private _ready; private clientKeyListenerId?; private currentValue?; private readonly clientSocketReconnectListenerId; private readonly listeners; private readonly logger; constructor(key: string, client: DBLiveClient, lib: DBLiveClientInternalLibrary); private get isWatching(); private set isWatching(value); private get ready(); private set ready(value); dispose(): void; get(options?: DBLiveKeyGetOptions): Promise; getAndListen(handler: (args: DBLiveKeyGetAndListenHandlerArgs) => unknown): DBLiveKeyEventListener; onChanged(handler: (args: DBLiveKeyEventHandlerArgs) => unknown): DBLiveKeyEventListener; set(value: T, options?: DBLiveKeySetOptions): Promise; private checkListenerStatus; private emitToListeners; private loadFromCache; private onKeyEvent; private refresh; private startWatching; private stopWatching; private waitForReady; } export declare type DBLiveKeyGetAndListenHandlerArgs = { value?: T; customArgs?: Record; }; export declare type DBLiveKeyGetOptions = { bypassCache?: boolean; }; export declare type DBLiveKeySetOptions = { customArgs?: { [key: string]: string | number; }; lock?: DBLiveClientLock; };