/**
 * SQLite Storage Implementation for PMO
 *
 * This is the main facade that delegates to domain-specific storage modules.
 * Uses the unified workspace.db database with pmo_ prefixed tables.
 */
import Database from 'better-sqlite3';
import { AcceptanceCriterion, Board, BoardConfig, BoardView, BoardViewFilter, BoardViewFilters, Column, CreateTicketInput, Epic, EpicDependency, EpicDependencyType, EpicFilter, PhaseFilter, PhaseTemplate, PhaseTemplateFilter, PMOStorage, Project, ProjectFilter, ProjectPhase, Spec, SpecDependency, SpecDependencyType, SpecFilter, StateCategory, Subtask, SyncResult, SyncStatus, Ticket, TicketDependency, TicketDependencyType, TicketFilter, TicketTemplate, TicketTemplateFilter, WorkAction, WorkActionFilter, Workflow, WorkflowFilter, WorkflowStatus } from '../types.js';
export declare class SQLiteStorage implements PMOStorage {
    readonly type: "sqlite";
    private db;
    private dbPath;
    private projectStorage;
    private ticketStorage;
    private subtaskStorage;
    private acceptanceCriteriaStorage;
    private specStorage;
    private epicStorage;
    private dependencyStorage;
    private statusStorage;
    private templateStorage;
    private phaseStorage;
    private actionStorage;
    private viewStorage;
    constructor(dbPath: string);
    /**
     * Get the underlying database connection.
     */
    getDatabase(): Database.Database;
    /**
     * Ensure PMO tables exist in the database.
     */
    private ensurePMOTables;
    init(projectId: string, config: BoardConfig): Promise<Board>;
    getBoard(projectId: string): Promise<Board>;
    getBoardMarkdown(projectId: string): Promise<string>;
    getColumnNames(projectId: string): string[];
    createColumn(projectId: string, name: string, position?: number): Promise<Column>;
    renameColumn(projectId: string, id: string, name: string): Promise<Column>;
    moveColumn(projectId: string, id: string, position: number): Promise<Column>;
    deleteColumn(projectId: string, id: string, _cascade?: boolean): Promise<void>;
    createTicket(projectId: string, ticket: CreateTicketInput): Promise<Ticket>;
    getTicket(id: string): Promise<Ticket | null>;
    getTicketById(id: string): Promise<Ticket | null>;
    updateTicket(id: string, changes: Partial<Ticket>): Promise<Ticket>;
    moveTicket(projectId: string, id: string, column: string, position?: number): Promise<Ticket>;
    moveTicketToProject(ticketId: string, newProjectId: string): Promise<Ticket>;
    deleteTicket(id: string): Promise<void>;
    listTickets(projectId: string | undefined, filter?: TicketFilter): Promise<Ticket[]>;
    addSubtask(ticketId: string, title: string): Promise<Subtask>;
    toggleSubtask(ticketId: string, subtaskId: string): Promise<Subtask>;
    removeSubtask(ticketId: string, subtaskId: string): Promise<void>;
    addAcceptanceCriterion(ticketId: string, criterion: string): Promise<AcceptanceCriterion>;
    removeAcceptanceCriterion(ticketId: string, criterionId: string): Promise<void>;
    clearAcceptanceCriteria(ticketId: string): Promise<void>;
    createSpec(spec: Partial<Spec>): Promise<Spec>;
    getSpec(id: string): Promise<Spec | null>;
    listSpecs(filter?: SpecFilter): Promise<Spec[]>;
    updateSpec(id: string, changes: Partial<Spec>): Promise<Spec>;
    deleteSpec(id: string): Promise<void>;
    linkTicketToSpec(ticketId: string, specId: string): Promise<void>;
    unlinkTicketFromSpec(ticketId: string, specId: string): Promise<void>;
    getTicketsForSpec(projectId: string, specId: string): Promise<Ticket[]>;
    getSpecsForTicket(ticketId: string): Promise<Spec[]>;
    addSpecDependency(specId: string, dependsOnId: string): Promise<void>;
    removeSpecDependency(specId: string, dependsOnId: string): Promise<void>;
    getSpecDependencies(specId: string): Promise<Spec[]>;
    getSpecDependents(specId: string): Promise<Spec[]>;
    linkProjectToSpec(projectId: string, specId: string): Promise<void>;
    unlinkProjectFromSpec(projectId: string, specId: string): Promise<void>;
    getSpecsForProject(projectId: string): Promise<Spec[]>;
    getProjectsForSpec(specId: string): Promise<Project[]>;
    createEpic(projectId: string, epic: Partial<Epic>): Promise<Epic>;
    getEpic(id: string): Promise<Epic | null>;
    listEpics(projectId: string, filter?: EpicFilter): Promise<Epic[]>;
    reorderEpic(projectId: string, epicId: string, newPosition: number): Promise<Epic>;
    updateEpic(id: string, changes: Partial<Epic>): Promise<Epic>;
    deleteEpic(id: string): Promise<void>;
    getTicketsForEpic(projectId: string, epicId: string): Promise<Ticket[]>;
    linkTicketToEpic(ticketId: string, epicId: string): Promise<void>;
    unlinkTicketFromEpic(ticketId: string): Promise<void>;
    createTicketDependency(ticketId: string, dependsOnId: string, type?: TicketDependencyType): Promise<TicketDependency>;
    deleteTicketDependency(ticketId: string, dependsOnId: string, type?: TicketDependencyType): Promise<void>;
    listTicketDependencies(ticketId: string): Promise<TicketDependency[]>;
    getTicketBlockers(ticketId: string): Promise<Ticket[]>;
    getTicketsBlockedBy(ticketId: string): Promise<Ticket[]>;
    isTicketBlocked(ticketId: string): Promise<boolean>;
    createSpecDependency(specId: string, dependsOnId: string, type?: SpecDependencyType): Promise<SpecDependency>;
    deleteSpecDependency(specId: string, dependsOnId: string, type?: SpecDependencyType): Promise<void>;
    listSpecDependencies(specId: string): Promise<SpecDependency[]>;
    createEpicDependency(epicId: string, dependsOnId: string, type?: EpicDependencyType): Promise<EpicDependency>;
    deleteEpicDependency(epicId: string, dependsOnId: string, type?: EpicDependencyType): Promise<void>;
    listEpicDependencies(epicId: string): Promise<EpicDependency[]>;
    isEpicBlocked(epicId: string): Promise<boolean>;
    listWorkflows(filter?: WorkflowFilter): Promise<Workflow[]>;
    getWorkflow(id: string): Promise<Workflow | null>;
    createWorkflow(workflow: Partial<Workflow>): Promise<Workflow>;
    updateWorkflow(id: string, changes: Partial<Workflow>): Promise<Workflow>;
    deleteWorkflow(id: string): Promise<void>;
    getProjectWorkflow(projectId: string): Promise<Workflow | null>;
    listStatuses(workflowId: string): Promise<WorkflowStatus[]>;
    getStatus(id: string): Promise<WorkflowStatus | null>;
    createStatus(workflowId: string, status: Partial<WorkflowStatus>): Promise<WorkflowStatus>;
    updateStatus(id: string, changes: Partial<WorkflowStatus>): Promise<WorkflowStatus>;
    deleteStatus(id: string): Promise<void>;
    reorderStatus(id: string, newPosition: number): Promise<WorkflowStatus>;
    getDefaultStatus(workflowId: string): Promise<WorkflowStatus | null>;
    listTicketTemplates(filter?: TicketTemplateFilter): Promise<TicketTemplate[]>;
    getTicketTemplate(id: string): Promise<TicketTemplate | null>;
    createTicketTemplate(template: Partial<TicketTemplate> & {
        name: string;
    }): Promise<TicketTemplate>;
    createTicketTemplateFromTicket(ticketId: string, name: string, description?: string): Promise<TicketTemplate>;
    updateTicketTemplate(id: string, changes: Partial<TicketTemplate>): Promise<TicketTemplate>;
    deleteTicketTemplate(id: string): Promise<void>;
    listPhases(filter?: PhaseFilter): Promise<ProjectPhase[]>;
    getPhase(id: string): Promise<ProjectPhase | null>;
    createPhase(phase: Partial<ProjectPhase>): Promise<ProjectPhase>;
    updatePhase(id: string, changes: Partial<ProjectPhase>): Promise<ProjectPhase>;
    deletePhase(id: string): Promise<void>;
    reorderPhase(id: string, newPosition: number): Promise<ProjectPhase>;
    getDefaultPhase(): Promise<ProjectPhase | null>;
    listPhaseTemplates(filter?: PhaseTemplateFilter): Promise<PhaseTemplate[]>;
    getPhaseTemplate(id: string): Promise<PhaseTemplate | null>;
    applyPhaseTemplate(templateId: string): Promise<ProjectPhase[]>;
    savePhaseTemplate(name: string, description?: string): Promise<PhaseTemplate>;
    updatePhaseTemplate(id: string, changes: {
        name?: string;
        description?: string;
    }): Promise<PhaseTemplate>;
    deletePhaseTemplate(id: string): Promise<void>;
    listActions(filter?: WorkActionFilter): Promise<WorkAction[]>;
    getAction(id: string): Promise<WorkAction | null>;
    createAction(action: Partial<WorkAction>): Promise<WorkAction>;
    updateAction(id: string, changes: Partial<WorkAction>): Promise<WorkAction>;
    deleteAction(id: string): Promise<void>;
    getSuggestedAction(category: StateCategory): Promise<WorkAction | null>;
    createProject(project: {
        id?: string;
        name: string;
        template?: string;
        description?: string;
    }): Promise<Board>;
    getProjectBoard(projectId: string): Promise<Board | null>;
    listProjectSummaries(): Promise<Array<{
        id: string;
        name: string;
        template: string | null;
        description: string | null;
        ticketCount: number;
    }>>;
    deleteProject(projectId: string): Promise<void>;
    getProject(id: string): Promise<Project | null>;
    updateProject(id: string, changes: Partial<Project>): Promise<Project>;
    listProjects(filter?: ProjectFilter): Promise<Project[]>;
    archiveProject(id: string): Promise<Project>;
    unarchiveProject(id: string): Promise<Project>;
    listBoardViews(filter?: BoardViewFilter): Promise<BoardView[]>;
    getBoardView(id: string): Promise<BoardView | null>;
    createBoardView(view: Partial<BoardView>): Promise<BoardView>;
    updateBoardView(id: string, changes: Partial<BoardView>): Promise<BoardView>;
    deleteBoardView(id: string): Promise<void>;
    getDefaultBoardView(projectId: string): Promise<BoardView | null>;
    getBoardWithView(projectId: string, viewId?: string, filters?: BoardViewFilters): Promise<Board>;
    pull(): Promise<SyncResult>;
    push(): Promise<SyncResult>;
    status(): Promise<SyncStatus>;
    rebuildFromBoard(board: Board): void;
    /**
     * Infer a status category from column name or position.
     */
    private inferCategoryFromColumnName;
    close(): Promise<void>;
    getCacheMetadata(): {
        boardMtime: number;
        cacheBuiltAt: number;
        contentHash?: string;
    } | null;
    setCacheMetadata(metadata: {
        boardMtime: number;
        cacheBuiltAt: number;
        contentHash?: string;
    }): void;
    clearCache(): void;
}
export { SQLiteStorage as default };
