import { type CreateSyncularBridgeClientOptions, type SyncularAuthLeaseRecord, type SyncularBridge, type SyncularBridgeMutationBatch, type SyncularBridgeQueryRequest, type SyncularBridgeQueryResult, type SyncularBridgeStatus, type SyncularClientEventSink, type SyncularClientEventType, type SyncularClientLike, type SyncularConflictResolution, type SyncularConflictSummary, type SyncularDiagnosticSnapshot, type SyncularPresenceEntry, type SyncularSubscriptionSpec, type SyncularSyncResult } from '@syncular/client';
import type { SyncAuthLeaseIssueRequest } from '@syncular/core';
export type SyncularNativeEventSubscription = (() => void) | {
    remove(): void;
};
export interface SyncularNativeModule {
    executeSql<Row extends Record<string, unknown> = Record<string, unknown>>(request: SyncularBridgeQueryRequest): Promise<SyncularBridgeQueryResult<Row>> | SyncularBridgeQueryResult<Row>;
    applyMutationsCommit(batch: SyncularBridgeMutationBatch): Promise<string> | string;
    applyLeasedMutationsCommit?(batch: SyncularBridgeMutationBatch): Promise<string> | string;
    sync?(): Promise<SyncularSyncResult>;
    resumeFromBackground?(): Promise<SyncularSyncResult>;
    start?(): Promise<void>;
    stop?(): Promise<void>;
    setSubscriptions?(subscriptions: readonly SyncularSubscriptionSpec[]): Promise<void>;
    getStatus?(): SyncularBridgeStatus;
    issueAuthLease?(request: SyncAuthLeaseIssueRequest): Promise<SyncularAuthLeaseRecord>;
    upsertAuthLease?(lease: SyncularAuthLeaseRecord): Promise<void>;
    authLease?(leaseId: string): Promise<SyncularAuthLeaseRecord | null>;
    activeAuthLeases?(actorId?: string | null, nowMs?: number): Promise<SyncularAuthLeaseRecord[]>;
    diagnosticSnapshot?(): Promise<SyncularDiagnosticSnapshot>;
    addListener?<T extends SyncularClientEventType>(event: T, listener: SyncularClientEventSink<T>): SyncularNativeEventSubscription;
    getPresence?<TMetadata = Record<string, unknown>>(scopeKey: string): SyncularPresenceEntry<TMetadata>[];
    joinPresence?(scopeKey: string, metadata?: Record<string, unknown>): void;
    leavePresence?(scopeKey: string): void;
    updatePresenceMetadata?(scopeKey: string, metadata: Record<string, unknown>): void;
    conflictSummaries?(): Promise<SyncularConflictSummary[]>;
    retryConflictKeepLocal?(id: string): Promise<string>;
    resolveConflict?(id: string, resolution: SyncularConflictResolution): Promise<void>;
}
export interface CreateSyncularNativeClientOptions extends Omit<CreateSyncularBridgeClientOptions, 'bridge'> {
    module: SyncularNativeModule;
}
export declare function createSyncularNativeClient<DB>(options: CreateSyncularNativeClientOptions): Promise<SyncularClientLike<DB>>;
export declare function createSyncularNativeBridge(module: SyncularNativeModule): SyncularBridge;
//# sourceMappingURL=index.d.ts.map