import { Context, IUser, IUserCreateRequest, IUserUpdates } from '..'; import { LoginIdentifierRepository } from './login-identifier.repository'; export declare const USER_SERVICE = "UserService"; export declare const normaliseEmail: (email: string) => string; export interface UserService { getByEmail(context: Context, email: string): Promise; get(context: Context, userId: string): Promise; createOrUpdate(context: Context, user: C, beforeUpdate?: (user: T) => void): Promise; create(context: Context, user: C): Promise; update(context: Context, id: string, updates: U): Promise; } export declare abstract class AbstractUserService implements UserService { protected readonly loginIdentifierRepository: LoginIdentifierRepository; private readonly baseLogger; protected constructor(loginIdentifierRepository: LoginIdentifierRepository); abstract get(context: Context, userId: string): Promise; protected abstract createUser(context: Context, user: C): Promise; protected abstract updateUser(context: Context, user: T, updates: U): Promise; getByEmail(context: Context, email: string): Promise; createOrUpdate(context: Context, updates: C, beforeUpdate?: (user: T) => void): Promise; create(context: Context, user: C): Promise; update(context: Context, id: string, updates: U): Promise; private updateRetrievedUser; private createLoginIdentifier; private validateEmailAddressAvailable; }