import { CreateProjectDTO, QueryProjectDTO } from "@/dtos/project.dto.js"; import { IProject } from "@/models/Projects.js"; import { DailyDeployments, ProjectUsageResults } from "../repository/IDeploymentRepository.js"; export type options = { updateStatusOnlyIfNoCurrentDeployment?: boolean; }; export interface IProjectService { createProject(projectData: CreateProjectDTO, userId: string): Promise; getAllProjects(userId: string, query: QueryProjectDTO): Promise<{ projects: IProject[]; total: number }>; getProjectById(id: string, userId: string, include?: string, full?: boolean): Promise; getProjectSettings(id: string, userId: string, include?: string): Promise; updateProject(id: string, userId: string, data: Partial): Promise; deleteProject(projectId: string, userId: string): Promise; getProjectBandwidthData(projectId: string, userId: string, isMonthly: boolean): Promise; getUserBandwidthData(userId: string, isMonthly: boolean): Promise; changeProjectSubdomain(userId: string, projectId: string, newSubdomain: string): Promise; checkSubdomainAvaiable(newSubdomain: string): Promise; findProjectSimpleStats( userId: string, projectId: string, ): Promise<{ totalDeployments: number; successRate: number; failureRate: number; failedBuilds: number; avgBuildTime: number; buildHistory: string[]; lastDeployed: Date | null; bandwidth: number; }>; findTotalUsage( userId: string, months: number, ): Promise<{ projectRslts: ProjectUsageResults[]; deploys: DailyDeployments[]; }>; __getProjectByRepository(repoId: number): Promise; __getProjectById(id: string): Promise; __updateProjectById(projectId: string, updateData: Partial, options?: options): Promise; __unLinkGhProjects(repos: number[], userId?: string): Promise; __linkGhProjectsBack(repos: number[], userId?: string): Promise; }