import type Database from 'better-sqlite3'; import type { Sprint, SprintResult, SprintOverview } from '../models/sprint'; import type { SprintStatus } from '../models/common'; /** * Create a new sprint. * * @param db - Database connection * @param id - Sprint ID (unique) * @param name - Optional sprint name * @param goal - Optional sprint goal * @returns The created sprint result * @throws SprintInvalidError if ID is empty * @throws SprintDuplicateError if ID already exists */ export declare function createSprint(db: Database.Database, id: string, name?: string, goal?: string): SprintResult; /** * Get a sprint overview with task counts by status. * * @param db - Database connection * @param sprintId - Optional sprint ID (resolves default if omitted) * @returns Sprint overview with task counts * @throws SprintNotFoundError if sprint doesn't exist * @throws SprintNoneError if no sprintId and no sprints exist */ export declare function getSprintOverview(db: Database.Database, sprintId?: string): SprintOverview; /** * Get active (non-Done, non-Dropped) tasks for a sprint. */ export declare function getSprintActiveTasks(db: Database.Database, sprintId?: string): Array>; /** * List sprints with optional filters. */ export declare function listSprints(db: Database.Database, filters?: { status?: SprintStatus; }): Sprint[]; /** * Transition a sprint from one status to another. * * @param db - Database connection * @param id - Sprint ID * @param target - Target sprint status * @returns Updated sprint result * @throws SprintNotFoundError if sprint doesn't exist * @throws SprintBadStatusError if target is not a valid sprint status * @throws SprintTransitionError if transition is not allowed */ export declare function transitionSprintStatus(db: Database.Database, id: string, target: string): SprintResult; /** * Update a sprint's mutable properties (name, goal). * Uses per-sprint advisory locking (kanban:sprint{}) following AD-0015. * * @param db - Database connection * @param id - Sprint ID * @param updates - Partial update; absent fields are unchanged, empty string replaces * @returns Updated sprint result * @throws SprintNotFoundError if sprint doesn't exist * @throws LockTimeoutError if lock cannot be acquired */ export declare function updateSprint(db: Database.Database, id: string, updates: { name?: string; goal?: string; }): SprintResult; /** * Resolve the default sprint (most recently created non-CLOSED sprint). * Implements AD-0010: Default Sprint Resolution by Recency. * * @throws SprintNoneError if no sprints exist * @throws SprintNotFoundError if a specific ID was given but not found */ export declare function resolveSprint(db: Database.Database, sprintId?: string): Sprint; //# sourceMappingURL=sprint.d.ts.map