import { QueryDeploymentDTO } from "@/dtos/deployment.dto.js"; import { IDeployment } from "@/models/Deployment.js"; export type DeploymentDbOptions = { fields?: string[]; includes?: string; exclude?: string[]; }; export type ProjectUsageResults = { projectId: string; deploys: number; projectName: string; total_build: number; isDeleted: boolean; bandwidthMontly: number; bandwidthTotal: number; month: string; }; export type DailyDeployments = { _id: string; count: number }; export interface IDeploymentRepository { createDeployment(deploymentData: Partial): Promise; findDeploymentById(id: string, userId: string, options?: DeploymentDbOptions): Promise; findAllDeployments( userId: string, query: QueryDeploymentDTO, options?: DeploymentDbOptions, ): Promise<{ deployments: IDeployment[]; total: number }>; findProjectDeployments( userId: string, projectId: string, query: QueryDeploymentDTO, options?: DeploymentDbOptions, ): Promise<{ deployments: IDeployment[]; total: number }>; deleteDeployment(projectId: string, deploymentId: string, userId: string): Promise; getTotalBuildTime(userId: string): Promise; getDailyDeployments(userId: string, months: number): Promise; __findDeployment(id: string): Promise; __updateDeployment(projectId: string, deploymentId: string, updateData: Partial): Promise; __findAllProjectDeployment(projectId: string, sortOptions?: string | Record): Promise; }