Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import { IUserAggregate } from '../domain';
export namespace IUserRepository {
export type UpdateData = Partial<Pick<IUserAggregate.State, 'role'>>;
}
export interface IUserRepository {
readonly findOne: (
profile: IUserAggregate.Profile,
) => Promise<IUserAggregate.State | null>;
readonly save: (state: IUserAggregate.State) => Promise<IUserAggregate.State>;
readonly update: (
filter: Pick<IUserAggregate.State, 'id'>,
data: IUserRepository.UpdateData,
) => Promise<void>;
readonly remove: (filter: Pick<IUserAggregate.State, 'id'>) => Promise<void>;
}
export const IUserRepository = Symbol('UserRepository');
|