/**
 * Document Lock Operations
 *
 * Provides database operations for document-level locking to prevent
 * concurrent edits. Supports exclusive and shared lock types with
 * automatic expiry via TTL.
 *
 * CRITICAL: NEVER use console.log() - stdout is reserved for JSON-RPC protocol.
 *
 * @module database/lock-operations
 */
import type Database from 'better-sqlite3';
export interface LockRow {
    document_id: string;
    user_id: string;
    session_id: string;
    lock_type: string;
    reason: string | null;
    acquired_at: string;
    expires_at: string;
}
export interface AcquireLockParams {
    document_id: string;
    user_id: string;
    session_id: string;
    lock_type: string;
    reason?: string;
    ttl_minutes?: number;
}
/**
 * Acquire a lock on a document.
 *
 * Exclusive locks prevent any other lock. Shared locks allow other shared
 * locks but block exclusive locks. Expired locks are cleaned up first.
 *
 * @param conn - Database connection
 * @param params - Lock parameters
 * @returns The acquired lock row
 * @throws Error if document not found or lock conflict
 */
export declare function acquireLock(conn: Database.Database, params: AcquireLockParams): LockRow;
/**
 * Release a lock on a document.
 *
 * @param conn - Database connection
 * @param documentId - Document ID
 * @throws Error if no lock found
 */
export declare function releaseLock(conn: Database.Database, documentId: string): void;
/**
 * Get the current lock status for a document.
 * Cleans up expired locks before checking.
 *
 * @param conn - Database connection
 * @param documentId - Document ID
 * @returns Lock row or null if no active lock
 */
export declare function getLockStatus(conn: Database.Database, documentId: string): LockRow | null;
//# sourceMappingURL=lock-operations.d.ts.map