import type Database from 'better-sqlite3'; import type { Lock } from '../types.js'; export declare class LockRepository { private readonly db; constructor(db: Database.Database); /** * Try to acquire a lock for the given key and owner. * - If no lock exists, inserts a new one. Returns true. * - If a lock exists and has not expired, returns false. * - If a lock exists but has expired, replaces it. Returns true. */ acquire(key: string, owner: string, ttlSeconds?: number): boolean; /** * Release the lock for the given key, but only if the owner matches. * Returns true if a lock was deleted, false otherwise. */ release(key: string, owner: string): boolean; /** * Returns true if a non-expired lock exists for the given key. */ isHeld(key: string): boolean; /** * Find a lock by key. Returns null if not found or expired. */ findByKey(key: string): Lock | null; /** * Delete all expired locks. Returns the number deleted. */ cleanExpired(): number; } //# sourceMappingURL=lock.d.ts.map