import { ILogLevel, PowerSyncConnectionOptions, SubscribedStream } from '@powersync/common';
import { SharedSyncImplementation, SharedSyncInitOptions, WrappedSyncPort } from './SharedSyncImplementation';
/**
 * A client to the shared sync worker.
 *
 * The shared sync implementation needs a per-client view of subscriptions so that subscriptions of closed tabs can
 * automatically be evicted later.
 */
export declare class WorkerClient {
    private readonly sync;
    private readonly port;
    private resolvedPort;
    protected resolvedPortPromise: Promise<WrappedSyncPort> | null;
    constructor(sync: SharedSyncImplementation, port: MessagePort);
    private removePort;
    /**
     * Called by a client after obtaining a lock with a random name.
     *
     * When the client tab is closed, its lock will be returned. So when the shared worker attempts to acquire the lock,
     * it can consider the connection to be closed.
     */
    addLockBasedCloseSignal(name: string): Promise<void>;
    setLogLevel(level: ILogLevel): void;
    triggerCrudUpload(): void;
    setParams(params: SharedSyncInitOptions, subscriptions: SubscribedStream[]): Promise<void>;
    getWriteCheckpoint(): Promise<string>;
    hasCompletedSync(): Promise<boolean>;
    connect(options?: PowerSyncConnectionOptions): Promise<void>;
    updateSubscriptions(subscriptions: SubscribedStream[]): void;
    disconnect(): Promise<void>;
}
