/**
 * AuthService - Servicio de Autenticación
 *
 * Gestiona login, logout, refresh tokens y validación de JWT.
 * Implementa patrón multi-tenant con verificación de tenant_id.
 *
 * @module Auth
 */
import { Repository } from 'typeorm';
import { User } from '../../core/entities/user.entity';
import { Tenant } from '../../core/entities/tenant.entity';
import { LoginDto, RegisterDto, RefreshTokenDto, ChangePasswordDto, AuthResponse, TokenValidationResult } from '../dto/auth.dto';
export interface RefreshToken {
    id: string;
    userId: string;
    token: string;
    expiresAt: Date;
    revokedAt?: Date;
}
export declare class AuthService {
    private readonly userRepository;
    private readonly tenantRepository;
    private readonly refreshTokenRepository;
    private readonly jwtSecret;
    private readonly jwtExpiresIn;
    private readonly jwtRefreshExpiresIn;
    constructor(userRepository: Repository<User>, tenantRepository: Repository<Tenant>, refreshTokenRepository: Repository<RefreshToken>);
    /**
     * Login de usuario
     */
    login(dto: LoginDto): Promise<AuthResponse>;
    /**
     * Registro de usuario
     */
    register(dto: RegisterDto): Promise<AuthResponse>;
    /**
     * Refresh de token
     */
    refresh(dto: RefreshTokenDto): Promise<AuthResponse>;
    /**
     * Logout - Revocar refresh token
     */
    logout(refreshToken: string): Promise<void>;
    /**
     * Cambiar password
     */
    changePassword(userId: string, dto: ChangePasswordDto): Promise<void>;
    /**
     * Validar access token
     */
    validateAccessToken(token: string): TokenValidationResult;
    /**
     * Validar token
     */
    private validateToken;
    /**
     * Generar access token
     */
    private generateAccessToken;
    /**
     * Generar refresh token
     */
    private generateRefreshToken;
    /**
     * Convertir expiresIn a segundos
     */
    private getExpiresInSeconds;
}
//# sourceMappingURL=auth.service.d.ts.map