import type { GitService } from "./git.js";
import type { RepoRow, RepositoryService } from "./repositories.js";
import { type ProjectService } from "./projects.js";
import type { WsControlPlane } from "../ws.js";
type ProjectRow = ReturnType<ProjectService["getById"]>;
export interface ProjectRepositoryAssignment {
    project: NonNullable<ProjectRow>;
    repo: RepoRow;
    assigned: boolean;
    skipped: boolean;
    created: boolean;
}
export declare class ProjectRepositoryAssignmentError extends Error {
    readonly code: "PROJECT_NOT_FOUND" | "REPOSITORY_NOT_FOUND" | "PROJECT_HAS_NO_ROOT" | "PROJECT_NOT_GIT";
    constructor(code: "PROJECT_NOT_FOUND" | "REPOSITORY_NOT_FOUND" | "PROJECT_HAS_NO_ROOT" | "PROJECT_NOT_GIT", message: string);
}
export declare function projectHasGitMetadata(rootPath: string | null | undefined): boolean;
export declare function assignRepositoryToProject(params: {
    projectService: ProjectService;
    repoService: RepositoryService;
    gitService: GitService;
    projectId: string;
    userId?: string;
    repoId?: string | null;
    ws?: WsControlPlane;
}): Promise<ProjectRepositoryAssignment>;
export declare function autoAssignProjectRepositories(params: {
    projectService: ProjectService;
    repoService: RepositoryService;
    gitService: GitService;
    userId?: string;
    ws?: WsControlPlane;
}): Promise<ProjectRepositoryAssignment[]>;
export {};
//# sourceMappingURL=project-repositories.d.ts.map