/**
 * Cycles — time-boxed iteration periods (like Linear.app cycles).
 *
 * A cycle has a start/end date, a number, and a duration in weeks.
 * Tasks can be assigned to a cycle via the cycle_id column on tasks.
 */
import type { Database } from "bun:sqlite";
export interface Cycle {
    id: string;
    project_id: string | null;
    number: number;
    start_date: string;
    end_date: string;
    duration_weeks: number;
    status: "active" | "completed" | "archived";
    created_at: string;
    updated_at: string;
}
export interface CycleWithStats extends Cycle {
    task_count: number;
    completed_count: number;
    started_count: number;
    uncompleted_count: number;
}
export interface CreateCycleInput {
    project_id?: string;
    number?: number;
    start_date: string;
    duration_weeks?: number;
    status?: string;
}
export interface CycleUpdateInput {
    status?: string;
    start_date?: string;
    end_date?: string;
}
export interface CycleQueryOptions {
    project_id?: string;
    status?: string;
    limit?: number;
}
export declare function createCycle(input: CreateCycleInput, db?: Database): Cycle;
export declare function getCycle(id: string, db?: Database): Cycle | null;
export declare function getCycleByNumber(project_id: string, number: number, db?: Database): Cycle | null;
export declare function listCycles(options?: CycleQueryOptions, db?: Database): Cycle[];
export declare function updateCycle(id: string, input: CycleUpdateInput, db?: Database): Cycle | null;
export declare function deleteCycle(id: string, db?: Database): boolean;
/**
 * Generate a sequence of cycles starting from a given date.
 * Creates `count` cycles with the specified duration_weeks.
 */
export declare function generateCycles(project_id: string, options: {
    start_date: string;
    count: number;
    duration_weeks?: number;
}, db?: Database): Cycle[];
/**
 * Get the currently active cycle for a project (today falls within start/end).
 */
export declare function getCurrentCycle(project_id: string, db?: Database): Cycle | null;
/**
 * Get the next upcoming cycle (start_date is in the future).
 */
export declare function getNextCycle(project_id: string, db?: Database): Cycle | null;
/**
 * Get cycle statistics (task counts by state).
 */
export declare function getCycleStats(cycle_id: string, db?: Database): {
    task_count: number;
    completed_count: number;
    started_count: number;
    uncompleted_count: number;
} | null;
/**
 * List all cycles with their task stats for a project.
 */
export declare function listCyclesWithStats(options?: CycleQueryOptions, db?: Database): CycleWithStats[];
//# sourceMappingURL=cycles.d.ts.map