/**
 * Helper functions for converting database rows to domain types.
 */
import type { DrizzleDB } from '../../database/drizzle.js';
import { AcceptanceCriterion, Spec, StateCategory, Ticket } from '../types.js';
import { SpecRow, TicketRow, WorkflowStatusRow } from './types.js';
/**
 * Wrap SQLite constraint errors with user-friendly messages.
 * This function always throws - it never returns.
 *
 * @param entityType - The type of entity being operated on (e.g., 'Ticket', 'Spec', 'Project')
 * @param operation - The operation being performed ('create', 'update', 'delete')
 * @param err - The error thrown by SQLite
 * @throws {PMOError} Always throws a user-friendly PMOError
 */
export declare function wrapSqliteError(entityType: string, operation: 'create' | 'update' | 'delete', err: unknown): never;
/**
 * Convert a database row to a Ticket object.
 * Fetches related data (subtasks, metadata, status info) using Drizzle ORM.
 */
export declare function rowToTicket(drizzle: DrizzleDB, row: TicketRow): Promise<Ticket>;
/**
 * Get acceptance criteria for a ticket (sync version).
 */
export declare function getAcceptanceCriteriaSync(drizzle: DrizzleDB, ticketId: string): AcceptanceCriterion[];
/**
 * Convert a database row to a Spec object.
 */
export declare function rowToSpec(row: SpecRow): Spec;
/**
 * Convert a workflow status database row to WorkflowStatus.
 */
export declare function rowToStatus(row: WorkflowStatusRow): {
    id: string;
    workflowId: string;
    name: string;
    category: StateCategory;
    position: number;
    color: string | undefined;
    description: string | undefined;
    isDefault: boolean;
    createdAt: Date;
};
