import { Id } from 'src/models/types' ; import { User } from 'src/models/user' ; export interface UserRepository { getUserById ( id , attachAccount ? ) : Promise < User > ; getUserByEmail ( email ) : Promise < User > ; getUserByExternalId ( provider , externalId ) : Promise < User > ; assertUserWithExternalIdNotExist ( provider , externalId ) : Promise < void > ; getUsers ( accountId ) : Promise < User [ ] > ; createUser ( user ) : Promise < Id > ; patchUser ( id , user ) : Promise < User > ; deleteUser ( id ) : Promise < void > ; }