import { DataSource, EntityManager, FindManyOptions, FindOneOptions, Repository } from 'typeorm';
import { NestAuthUser } from '../entities/user.entity';
import { EventEmitter2 } from '@nestjs/event-emitter';
import { TenantService } from '../../tenant';
import { DebugLoggerService } from '../../core/services/debug-logger.service';
import { AuthConfigService } from '../../core/services/auth-config.service';
import { NestAuthUserAccess } from '../entities/user-access.entity';
import { NestAuthTenant } from '../../tenant/entities/tenant.entity';
export declare class UserService {
    private readonly userRepository;
    private readonly userAccessRepository;
    private readonly dataSource;
    private readonly tenantService;
    private readonly eventEmitter;
    private readonly authConfigService;
    private readonly debugLogger;
    constructor(userRepository: Repository<NestAuthUser>, userAccessRepository: Repository<NestAuthUserAccess>, dataSource: DataSource, tenantService: TenantService, eventEmitter: EventEmitter2, authConfigService: AuthConfigService, debugLogger: DebugLoggerService);
    runInTransaction<T>(fn: (manager: EntityManager) => Promise<T>): Promise<T>;
    private getUserRepo;
    private getUserAccessRepo;
    createUser(data: Partial<NestAuthUser>, tenantId?: string, context?: any, manager?: EntityManager): Promise<NestAuthUser>;
    private createUserCore;
    getUserById(id: string, options?: FindOneOptions<NestAuthUser>, manager?: EntityManager): Promise<NestAuthUser>;
    getUserByEmail(email: string, tenantId?: string, options?: FindOneOptions<NestAuthUser>, manager?: EntityManager): Promise<NestAuthUser>;
    getUserByPhone(phone: string, tenantId?: string, options?: FindOneOptions<NestAuthUser>, manager?: EntityManager): Promise<NestAuthUser>;
    getUsers(options?: FindManyOptions<NestAuthUser>, manager?: EntityManager): Promise<NestAuthUser[]>;
    updateUser(id: string, data: Partial<NestAuthUser>, manager?: EntityManager): Promise<NestAuthUser>;
    ensureUserAccess(userId: string, tenantId: string, manager?: EntityManager): Promise<NestAuthUserAccess>;
    isUserInTenant(userId: string, tenantId: string, manager?: EntityManager): Promise<boolean>;
    setUserAccessRoles(userId: string, tenantId: string, roleIds: string[], manager?: EntityManager): Promise<NestAuthUserAccess>;
    getUserTenants(userId: string, manager?: EntityManager): Promise<NestAuthTenant[]>;
    deleteUserAccess(userId: string, tenantId: string, manager?: EntityManager): Promise<void>;
    deleteUser(id: string, manager?: EntityManager): Promise<void>;
    verifyUser(id: string, verificationType?: 'email' | 'phone' | 'none', manager?: EntityManager): Promise<NestAuthUser>;
    unverifyUser(id: string, verificationType?: 'email' | 'phone' | 'none', manager?: EntityManager): Promise<NestAuthUser>;
    updateUserStatus(id: string, isActive: boolean, manager?: EntityManager): Promise<NestAuthUser>;
    updateUserMetadata(id: string, metadata: Record<string, any>, manager?: EntityManager): Promise<NestAuthUser>;
    countUsers(options?: FindManyOptions<NestAuthUser>, manager?: EntityManager): Promise<number>;
    getUsersAndCount(options?: FindManyOptions<NestAuthUser>, manager?: EntityManager): Promise<[NestAuthUser[], number]>;
    getUsersByRole(roleName: string, guard: string, tenantId?: string, manager?: EntityManager): Promise<NestAuthUser[]>;
}
//# sourceMappingURL=user.service.d.ts.map