import { ConfigService } from '@nestjs/config';
import { Repository } from 'typeorm';
import { User, Role, WorkSchedule } from './entities/user.entity';
import { EmployeeProfile } from './entities/employee-profile.entity';
import { CareerHistory, CareerEventType } from './entities/career-history.entity';
import { Team } from '../teams/entities/team.entity';
import { Agency } from '../teams/entities/agency.entity';
import { MailService } from '../notifications/mail.service';
export interface CreateUserDto {
    matricule: string;
    first_name: string;
    last_name: string;
    email: string;
    password?: string;
    role: Role;
    roles?: Role[];
    work_schedule?: WorkSchedule;
    hired_at: string;
    team_id?: number;
    team_ids?: number[];
    agency_id?: number;
    is_active?: boolean;
    monthly_accrual_rate?: number;
}
export interface UpdateUserDto {
    matricule?: string;
    first_name?: string;
    last_name?: string;
    email?: string;
    role?: Role;
    roles?: Role[];
    work_schedule?: WorkSchedule;
    hired_at?: string;
    team_id?: number;
    team_ids?: number[];
    agency_id?: number;
    is_active?: boolean;
    password?: string;
    monthly_accrual_rate?: number;
}
export interface UpdateProfileDto {
    birth_date?: string;
    address?: string;
    phone?: string;
    emergency_contact_name?: string;
    emergency_contact_phone?: string;
    job_title?: string;
    contract_type?: string;
    skills?: string[];
}
export interface CreateCareerHistoryDto {
    user_id: number;
    event_type: CareerEventType;
    description: string;
    effective_date: string;
}
export interface UsersFilters {
    search?: string;
    role?: string;
    team_id?: number;
    agency_id?: number;
    is_active?: boolean;
    page?: number;
    limit?: number;
}
export type UserWithProfile = Omit<User, never> & {
    profile?: EmployeeProfile;
};
export declare class UsersService {
    private readonly userRepo;
    private readonly profileRepo;
    private readonly careerRepo;
    private readonly teamRepo;
    private readonly agencyRepo;
    private readonly mailService;
    private readonly configService;
    constructor(userRepo: Repository<User>, profileRepo: Repository<EmployeeProfile>, careerRepo: Repository<CareerHistory>, teamRepo: Repository<Team>, agencyRepo: Repository<Agency>, mailService: MailService, configService: ConfigService);
    findAll(filters: UsersFilters): Promise<User[]>;
    findOne(id: number): Promise<User>;
    findOneWithProfile(id: number): Promise<User & {
        profile?: EmployeeProfile;
    }>;
    create(dto: CreateUserDto): Promise<User>;
    update(id: number, dto: UpdateUserDto): Promise<User>;
    toggleActive(id: number): Promise<User>;
    getProfile(userId: number): Promise<EmployeeProfile | null>;
    updateProfile(userId: number, dto: UpdateProfileDto): Promise<EmployeeProfile>;
    getCareerHistory(userId: number): Promise<CareerHistory[]>;
    addCareerEvent(dto: CreateCareerHistoryDto, createdBy: User): Promise<CareerHistory>;
    updateAvatar(userId: number, filename: string): Promise<User>;
    generateInviteLink(userId: number): Promise<{
        invite_url: string;
        expires_at: Date;
    }>;
    getStats(): Promise<{
        total: number;
        by_role: {
            role: string;
            count: number;
        }[];
        by_team: {
            team_name: string;
            count: number;
        }[];
        by_schedule: {
            schedule: string;
            count: number;
        }[];
    }>;
    private buildEffectiveRoles;
    private buildEffectiveTeamIds;
}
