import type { ArchitectsDb, Blueprint, ConvergenceRun, ConstructionLock, RelayMessage, WorkItem, WorkItemStatus, Worklist } from '../types.js';
export declare function mapBlueprint(row: any): Blueprint;
export declare function mapWorklist(row: any): Worklist;
export declare function mapWorkItem(row: any): WorkItem;
export declare function mapConstructionLock(row: any): ConstructionLock;
export declare function mapRelayMessage(row: any): RelayMessage;
export declare function mapConvergenceRun(row: any): ConvergenceRun;
export declare function insertBlueprint(db: ArchitectsDb, input: Partial<Blueprint> & {
    title: string;
    id?: string;
}): Blueprint;
export declare function getBlueprint(db: ArchitectsDb, blueprintId: string): Blueprint | null;
export declare function insertWorklist(db: ArchitectsDb, input: Partial<Worklist> & {
    blueprintId: string;
    title: string;
    id?: string;
}): Worklist;
export declare function getWorklist(db: ArchitectsDb, worklistId: string): Worklist | null;
export declare function insertWorkItem(db: ArchitectsDb, input: Partial<WorkItem> & {
    worklistId: string;
    title: string;
    id?: string;
}): WorkItem;
export declare function getWorkItem(db: ArchitectsDb, workItemId: string): WorkItem | null;
export declare function getWorkItemsForWorklist(db: ArchitectsDb, worklistId: string): WorkItem[];
export declare function upsertWorkItem(db: ArchitectsDb, input: Partial<WorkItem> & {
    id: string;
    worklistId: string;
    title: string;
}): WorkItem;
export declare function updateWorkItemStatus(db: ArchitectsDb, workItemId: string, status: WorkItemStatus, branch?: string | null): WorkItem | null;
export declare function insertConstructionLock(db: ArchitectsDb, input: Partial<ConstructionLock> & {
    workItemId: string;
    operativeId: string;
    id?: string;
}): ConstructionLock;
export declare function getConstructionLock(db: ArchitectsDb, lockId: string): ConstructionLock | null;
export declare function getLatestLockForWorkItem(db: ArchitectsDb, workItemId: string): ConstructionLock | null;
export declare function getActiveLockForWorkItem(db: ArchitectsDb, workItemId: string, now?: number): ConstructionLock | null;
export declare function renewConstructionLockRecord(db: ArchitectsDb, lockId: string, leaseDurationMs?: number, now?: number): ConstructionLock | null;
export declare function releaseConstructionLockRecord(db: ArchitectsDb, lockId: string): ConstructionLock | null;
export declare function insertRelayMessage(db: ArchitectsDb, input: Partial<RelayMessage> & {
    fromOperativeId: string;
    subject: string;
    body: string;
    id?: string;
}): RelayMessage;
export declare function getRelayMessage(db: ArchitectsDb, messageId: string): RelayMessage | null;
export declare function getRelayInbox(db: ArchitectsDb, input: {
    operativeId?: string;
    strikeTeamId?: string;
    markRead?: boolean;
}): RelayMessage[];
export declare function insertConvergenceRun(db: ArchitectsDb, input: Partial<ConvergenceRun> & {
    worklistId: string;
    workItemIds: string[];
    id?: string;
}): ConvergenceRun;
export declare function getConvergenceRun(db: ArchitectsDb, runId: string): ConvergenceRun | null;
export declare function finalizeConvergenceRun(db: ArchitectsDb, runId: string, status: ConvergenceRun['status'], failedItemId?: string | null): ConvergenceRun | null;
