import { Repository, UpdateResult } from 'typeorm'; import { MailerService } from '@nest-modules/mailer'; import { OnModuleInit } from '@nestjs/common'; import { ModuleRef } from '@nestjs/core'; import { ConfigService } from '@sierralabs/nest-utils'; import { AuthService } from '../auth/auth.service'; import { JwtToken } from '../auth/jwt-token.interface'; import { User } from '../entities/user.entity'; import { RolesService } from '../roles/roles.service'; import { RegisterDto } from './user.dto'; export declare class UserService implements OnModuleInit { protected readonly userRepository: Repository; protected readonly configService: ConfigService; protected readonly rolesService: RolesService; protected readonly moduleRef: ModuleRef; protected readonly mailerProvider?: MailerService; protected authService: AuthService; private logger; private LIKE_OPERATOR; constructor(userRepository: Repository, configService: ConfigService, rolesService: RolesService, moduleRef: ModuleRef, mailerProvider?: MailerService); /** * Implement circular dependency for UserService. */ onModuleInit(): void; initialize(superAdmin?: User): Promise; findById(id: number): Promise; /** * Look up a `User` record by `email` address. Additional configuration can be provided * through the `options` parameter. * @param email The email address to look up. * @param options The options configuration. * @param options.selectPassword Set this flag to enable the password field to be returned. * @param options.fields An array of strings for custom field selection. */ findByEmail(email: string, options?: { selectPassword?: boolean; fields?: string[]; }): Promise; findWithFilter(order: any, limit: number, offset: number, filter: string, fields?: string[], includeDeleted?: boolean): Promise<[User[], number]>; countWithFilter(filter: string, includeDeleted?: boolean): Promise; /** Note: this is misleading, should be renamed to encryptPassword */ changePassword(user: User, password: string): Promise; login(email: string, password: string): Promise>; loginWithGoogle(token: string): Promise>; logout(): Promise; create(user: User): Promise; register(userDto: RegisterDto): Promise; sendRegistrationEmail(user: User): void; getEmailConfig(): any; update(user: User): Promise; remove(id: number, modifiedBy: number): Promise; recoverPassword(emailorId: string | number): Promise; generateTokenUrl(user: User, baseUrl: string, config: any): string; private delay; resetPassword(password: string, token: string): Promise; verifyResetToken(token: string): Promise; verifyEmail(token: string): Promise>; }