import type { DatabaseSync } from 'node:sqlite'; export interface ResultSectionRecord { id: string; title: string; offset: number; length: number; locator: Record; } export declare function ownsResultDocumentLease(db: DatabaseSync, documentId: string, lease: string): boolean; export declare function markResultDocumentUnsupported(db: DatabaseSync, documentId: string, lease: string, reason: string): void; export declare function persistExtractedResultDocument(db: DatabaseSync, input: { documentId: string; lease: string; revision: string; text: string; sections: readonly ResultSectionRecord[]; limitations: readonly string[]; fingerprint?: string; charLength: (text: string) => number; }): void; export declare function markResultDocumentFailed(db: DatabaseSync, documentId: string, lease: string, errorMessage: string): void;