Download src/interfaces/repository/IProjectRepository.ts from lynfera/api: direct link, hf CLI and curl.
- Browser
- Download file 1.49 kB
-
https://huggingface.co/spaces/lynfera/api/resolve/c044fc22a5e2de895ca9282affe402eeab2b7f3d/src/interfaces/repository/IProjectRepository.ts
- Command line
-
hf download hf://spaces/lynfera/api@c044fc22a5e2de895ca9282affe402eeab2b7f3d/src/interfaces/repository/IProjectRepository.ts
-
curl -L -o IProjectRepository.ts https://huggingface.co/spaces/lynfera/api/resolve/c044fc22a5e2de895ca9282affe402eeab2b7f3d/src/interfaces/repository/IProjectRepository.ts
1.49 kB
| import { QueryProjectDTO } from "@/dtos/project.dto.js"; | |
| import { IProject } from "@/models/Projects.js"; | |
| import { Types } from "mongoose"; | |
| export interface IProjectRepository { | |
| createProject(project: Partial<IProject>): Promise<IProject | null>; | |
| getAllProjects(userId: string, query: QueryProjectDTO & { fields?: string[] }): Promise<{ projects: IProject[]; total: number }>; | |
| findProject(projectId: string, userId: string, options?: { include?: string; fields?: string[]; deletedToo?: boolean }): Promise<IProject | null>; | |
| findProjectsBySubdomain(subdomain: string): Promise<IProject[]>; | |
| deleteProject(projectId: string, userId: string): Promise<IProject | null>; | |
| checkProjectExistBySubdomain(subdomain: string): Promise<{ _id: string } | null>; | |
| updateProject(projectId: string, userId: string, updateData: Partial<IProject>): Promise<IProject | null>; | |
| pushToDeployments(prjectId: string, userId: string, newDeployment: string | Types.ObjectId): Promise<IProject | null>; | |
| pullDeployments( | |
| projectId: string, | |
| userId: string, | |
| newDeployment: string | Types.ObjectId, | |
| backUpDeployment: string | null, | |
| ): Promise<IProject | null>; | |
| __findProject(projectId: string): Promise<IProject | null>; | |
| __findProjectByRepo(repoId: number): Promise<IProject | null>; | |
| __updateProject(projectId: string, updateData: Partial<IProject>): Promise<IProject | null>; | |
| __updateManyProject(repoIds: number[], updateData: Partial<IProject>, userId?: string): Promise<IProject | null>; | |
| } | |