refactor(server): user core (#4733)

This commit is contained in:
Jason Rasmussen
2023-10-31 11:01:32 -04:00
committed by GitHub
parent 2377df9dae
commit 088d5addf2
9 changed files with 160 additions and 304 deletions
@@ -13,10 +13,14 @@ export interface UserStatsQueryResponse {
usage: number;
}
export interface UserFindOptions {
withDeleted?: boolean;
}
export const IUserRepository = 'IUserRepository';
export interface IUserRepository {
get(id: string, withDeleted?: boolean): Promise<UserEntity | null>;
get(id: string, options: UserFindOptions): Promise<UserEntity | null>;
getAdmin(): Promise<UserEntity | null>;
hasAdmin(): Promise<boolean>;
getByEmail(email: string, withPassword?: boolean): Promise<UserEntity | null>;