import type { BlobRef, SyncAuthLeaseIssueRequest, SyncOperation } from '@syncular/core';
import type { ResolvedSyncularClientConfig, SyncularApplyYjsEnvelopeToPayloadArgs, SyncularApplyYjsTextUpdatesArgs, SyncularApplyYjsTextUpdatesResult, SyncularAuthHeaders, SyncularAuthLeaseRecord, SyncularBlobCacheStats, SyncularBlobEncryptionConfig, SyncularBlobLimits, SyncularBlobStoreOptions, SyncularBlobUploadQueueProcessOptions, SyncularBlobUploadQueueStats, SyncularBuildYjsTextUpdateArgs, SyncularBuildYjsTextUpdateResult, SyncularClientConfig, SyncularConflictResolution, SyncularConflictSummary, SyncularConnectionState, SyncularCrdtDocumentSnapshot, SyncularCrdtFieldCompactionReceipt, SyncularCrdtFieldCompactionRequest, SyncularCrdtFieldDescriptor, SyncularCrdtFieldMaterialization, SyncularCrdtFieldRequest, SyncularCrdtFieldTextRequest, SyncularCrdtFieldWriteReceipt, SyncularCrdtFieldYjsUpdateRequest, SyncularCrdtUpdateLogEntry, SyncularDiagnosticSink, SyncularDiagnosticSnapshot, SyncularEncryptedCrdtConfig, SyncularEncryptionHelperMethod, SyncularFieldEncryptionConfig, SyncularLifecycleState, SyncularLiveQueryDependencyHint, SyncularLiveQueryDiagnostics, SyncularLiveQueryEvent, SyncularLiveQuerySnapshot, SyncularLocalHealthRepairReport, SyncularLocalHealthRepairRequest, SyncularLocalHealthReport, SyncularLocalSupportBundle, SyncularLocalSupportBundleImportReport, SyncularLocalSyncResetReport, SyncularLocalSyncResetRequest, SyncularPullOptions, SyncularRowsChangedSink, SyncularRuntimeArtifact, SyncularRuntimeInfo, SyncularSchemaState, SyncularSqlResult, SyncularStorageCompactionOptions, SyncularStorageCompactionReport, SyncularSubscriptionSpec, SyncularSyncRequestOptions, SyncularSyncResult, SyncularTransportStats } from './types';
import { type SyncularRustOwnedSqliteClient, type SyncularWasmGlue } from './wasm-runtime';
interface CreateSyncularRustClientOptions {
    module?: SyncularWasmGlue | Promise<SyncularWasmGlue>;
    wasmGlueUrl?: string | URL;
    wasmUrl?: string | URL | Request;
    runtime?: SyncularRuntimeArtifact;
    config: SyncularClientConfig;
    blobLimits?: SyncularBlobLimits;
}
export declare function openSyncularRustClient(options: CreateSyncularRustClientOptions): Promise<SyncularRustClient>;
export declare class SyncularRustClient {
    #private;
    private readonly raw;
    private readonly runtime;
    private readonly config;
    private readonly pullOptions;
    private readonly blobLimits;
    constructor(raw: SyncularRustOwnedSqliteClient, runtime: SyncularRuntimeInfo, config: ResolvedSyncularClientConfig, pullOptions: SyncularPullOptions | undefined, blobLimits: SyncularBlobLimits | undefined);
    setSubscriptions(subscriptions: readonly SyncularSubscriptionSpec[]): void;
    forceSubscriptionsBootstrap(subscriptionIds?: readonly string[]): Promise<number>;
    setAuthHeaders(headers: SyncularAuthHeaders): void;
    issueAuthLease(request: SyncAuthLeaseIssueRequest): Promise<SyncularAuthLeaseRecord>;
    upsertAuthLease(lease: SyncularAuthLeaseRecord): Promise<void>;
    authLease(leaseId: string): Promise<SyncularAuthLeaseRecord | null>;
    activeAuthLeases(actorId?: string | null, nowMs?: number): Promise<SyncularAuthLeaseRecord[]>;
    setFieldEncryption(config: SyncularFieldEncryptionConfig | null): void;
    setEncryptedCrdt(config: SyncularEncryptedCrdtConfig | null): void;
    setBlobEncryption(config: SyncularBlobEncryptionConfig | null): void;
    setAbortSignal(signal?: AbortSignal | null): void;
    applyMutation(operation: SyncOperation, localRow?: unknown): Promise<string>;
    applyLeasedMutation(operation: SyncOperation, localRow?: unknown): Promise<string>;
    applyMutationsBatch(operations: Array<{
        operation: SyncOperation;
        localRow?: unknown | null;
    }>): Promise<string[]>;
    applyMutationsCommit(operations: Array<{
        operation: SyncOperation;
        localRow?: unknown | null;
    }>): Promise<string>;
    applyLeasedMutationsCommit(operations: Array<{
        operation: SyncOperation;
        localRow?: unknown | null;
    }>): Promise<string>;
    syncPull(options?: SyncularSyncRequestOptions): Promise<SyncularSyncResult>;
    applyRealtimeSyncPack(bytes: Uint8Array): Promise<SyncularSyncResult>;
    syncPush(options?: SyncularSyncRequestOptions): Promise<SyncularSyncResult>;
    syncOnce(options?: SyncularSyncRequestOptions): Promise<SyncularSyncResult>;
    resumeFromBackground(options?: SyncularSyncRequestOptions): Promise<SyncularSyncResult>;
    transportStats(): SyncularTransportStats;
    resetTransportStats(): void;
    conflictSummaries(): Promise<SyncularConflictSummary[]>;
    retryConflictKeepLocal(id: string): Promise<string>;
    resolveConflict(id: string, resolution: SyncularConflictResolution): Promise<void>;
    executeSql<Row extends Record<string, unknown> = Record<string, unknown>>(sql: string, params?: readonly unknown[]): SyncularSqlResult<Row>;
    executeUnsafeSql<Row extends Record<string, unknown> = Record<string, unknown>>(sql: string, params?: readonly unknown[]): SyncularSqlResult<Row>;
    subscribeQuery<Row extends Record<string, unknown> = Record<string, unknown>>(sql: string, params: readonly unknown[], tables: readonly string[], hints?: readonly SyncularLiveQueryDependencyHint[]): SyncularLiveQuerySnapshot<Row>;
    unsubscribeQuery(id: string): void;
    drainLiveQueryEvents<Row extends Record<string, unknown> = Record<string, unknown>>(): Array<SyncularLiveQueryEvent<Row>>;
    liveQueryDiagnostics(): SyncularLiveQueryDiagnostics;
    addRowsChangedListener(listener: SyncularRowsChangedSink): () => void;
    listTable<Row extends Record<string, unknown> = Record<string, unknown>>(table: string): Promise<Row[]>;
    storeBlob(data: Uint8Array, options?: SyncularBlobStoreOptions): Promise<BlobRef>;
    retrieveBlob(ref: BlobRef): Promise<Uint8Array>;
    isBlobLocal(hash: string): boolean;
    processBlobUploadQueue(options?: SyncularBlobUploadQueueProcessOptions): Promise<{
        uploaded: number;
        failed: number;
    }>;
    blobUploadQueueStats(): SyncularBlobUploadQueueStats;
    blobCacheStats(): SyncularBlobCacheStats;
    pruneBlobCache(maxBytes?: number): number;
    clearBlobCache(): void;
    compactStorage(options?: SyncularStorageCompactionOptions): SyncularStorageCompactionReport;
    generatedSchemaState(): SyncularSchemaState;
    localHealthCheck(): Promise<SyncularLocalHealthReport>;
    exportLocalSupportBundle(): Promise<SyncularLocalSupportBundle>;
    importLocalSupportBundle(bundle: SyncularLocalSupportBundle | string): Promise<SyncularLocalSupportBundleImportReport>;
    repairLocalHealth(request: SyncularLocalHealthRepairRequest): Promise<SyncularLocalHealthRepairReport>;
    resetLocalSyncState(request?: SyncularLocalSyncResetRequest): Promise<SyncularLocalSyncResetReport>;
    buildYjsTextUpdate(args: SyncularBuildYjsTextUpdateArgs): SyncularBuildYjsTextUpdateResult;
    applyYjsTextUpdates(args: SyncularApplyYjsTextUpdatesArgs): SyncularApplyYjsTextUpdatesResult;
    applyYjsEnvelopeToPayload(args: SyncularApplyYjsEnvelopeToPayloadArgs): Record<string, unknown>;
    openCrdtField(request: SyncularCrdtFieldRequest): Promise<SyncularCrdtFieldDescriptor>;
    applyCrdtFieldText(request: SyncularCrdtFieldTextRequest): Promise<SyncularCrdtFieldWriteReceipt>;
    applyCrdtFieldYjsUpdate(request: SyncularCrdtFieldYjsUpdateRequest): Promise<SyncularCrdtFieldWriteReceipt>;
    materializeCrdtField(request: SyncularCrdtFieldRequest): Promise<SyncularCrdtFieldMaterialization>;
    crdtDocumentSnapshot(request: SyncularCrdtFieldRequest): Promise<SyncularCrdtDocumentSnapshot>;
    crdtUpdateLog(request: SyncularCrdtFieldRequest & {
        limit?: number;
    }): Promise<SyncularCrdtUpdateLogEntry[]>;
    snapshotCrdtFieldStateVector(request: SyncularCrdtFieldRequest): Promise<{
        stateVectorBase64: string;
    }>;
    compactCrdtField(request: SyncularCrdtFieldCompactionRequest): Promise<SyncularCrdtFieldCompactionReceipt>;
    encryptionHelper<T = unknown>(method: SyncularEncryptionHelperMethod, args?: unknown): T;
    runtimeInfo(): Promise<SyncularRuntimeInfo>;
    connectionState(): SyncularConnectionState;
    lifecycleState(): SyncularLifecycleState;
    diagnosticSnapshot(): Promise<SyncularDiagnosticSnapshot>;
    addDiagnosticListener(listener: SyncularDiagnosticSink): () => void;
    close(): void;
}
export {};
//# sourceMappingURL=rust-client.d.ts.map