import type { Database as DatabaseType } from "better-sqlite3"; /** Derive the 3-letter candidate for a department slug. Falls back to X-padding * for short/letterless slugs instead of throwing like the company derivation. */ export declare function derivePrefixCandidate(slug: string): string; /** Deterministic collision fallback: try the candidate, then advance the third * letter A→Z, then the second, then the first. Throws only if every variant of * all three positions is taken (78 tries — practically impossible). */ export declare function pickFreePrefix(candidate: string, taken: ReadonlySet): string; /** Resolve (lazily registering) the immutable ID prefix for a department slug. * `reservedCompanyPrefix` is the company namespace and can never be assigned * to a department. Registration races resolve via the UNIQUE constraint. */ export declare function resolveDepartmentPrefix(db: DatabaseType, slug: string, reservedCompanyPrefix: string): string; export interface DepartmentRecord { slug: string; prefix: string; createdAt: string; } export interface DepartmentSummary extends DepartmentRecord { /** Live count of Todos currently IN the department (items keep their birth * prefix when moved, so this counts membership, not the ID namespace). */ todoCount: number; } /** The `GET /api/departments` surface: registry rows + one GROUP BY count. */ export declare function listDepartmentsWithCounts(db: DatabaseType): DepartmentSummary[]; //# sourceMappingURL=departments.d.ts.map