import { Types } from "mongoose"; import { IUser } from "@/models/User.js"; import { IPlans } from "@/constants/plan.js"; export type SimpleOptions = { fillPass: boolean; }; export type GithubIds = { installId: number; loginId: number }; export type GithubIdsOutput = { githubInstallationId: number; githubAccountId: number }; export interface IUserRepository { createUser(data: Partial): Promise; findByUserEmail(email: string, options?: SimpleOptions): Promise; findByUserId(id: string): Promise; incrementProjects(userId: Types.ObjectId | string): Promise; decrementProjects(userId: Types.ObjectId | string): Promise; updateUser(userId: string, updateData: Partial): Promise; updateUserPlansWithStripe(stripeId: string, planData: keyof IPlans, paymentData: IUser["payment"]): Promise; updateUserPlans(userId: string, planData: keyof IPlans): Promise; getOrUpdateDeployments(userId: string): Promise; findUserByCustomerId(id: string): Promise; incrementDeployment(userId: string): Promise; findAuthProviders(userId: string): Promise | null>; addGhbApCreds(userId: string, updateData: { installId: number; loginId: number }): Promise; removeGhbApCreds(installationId: number): Promise; findGhbApCreds(userId: string): Promise; findUserByInstallationId(installationId: number, onlyNeededFields: boolean): Promise; }