import 'dotenv/config';
import { Repository } from 'typeorm';
import { GlobalUser } from '../tenant/entities/global-user.entity';
import { GlobalUserTenant } from '../tenant/entities/global-user-tenant.entity';
import { JwtService } from '@nestjs/jwt';
import { TenantService } from '../tenant/tenant.service';
import { AdminService } from '../admin/admin.service';
import { SocialAuthService } from './social-auth.service';
import { AppleLoginDto, GoogleLoginDto } from './dto/social-login.dto';
import { TenantConnectionService } from '../tenant/tenant-connection.service';
import { Queue } from 'bullmq';
import { ForgotPasswordDto } from './dto/forgot-password.dto';
import { ResetPasswordDto } from './dto/reset-password.dto';
export interface SocialLoginResult {
    accessToken: string;
    refreshToken: string;
    isNewUser: boolean;
    userId: number;
    tenantId: string;
    username: string;
    email: string;
    fullName: string;
    avatar?: string;
    provider: string;
    roles: string[];
    permissions: string[];
    isSuperAdmin: boolean;
    hierarchy: {
        branch: {
            id: number;
            name: string;
        };
        department: {
            id: number;
            name: string;
        };
        team: {
            id: number;
            name: string;
        };
        position: {
            id: number | null;
            name: string | null;
        };
    }[];
    modules: string[];
    isFirstTime: number;
}
export declare class AuthService {
    private readonly globalUserRepo;
    private readonly gutRepo;
    private readonly tenantService;
    private readonly jwtService;
    private readonly adminService;
    private readonly socialAuthService;
    private readonly tenantConnectionService;
    private readonly mailQueue;
    private readonly logger;
    constructor(globalUserRepo: Repository<GlobalUser>, gutRepo: Repository<GlobalUserTenant>, tenantService: TenantService, jwtService: JwtService, adminService: AdminService, socialAuthService: SocialAuthService, tenantConnectionService: TenantConnectionService, mailQueue: Queue);
    login(email: string, password: string): Promise<{
        accessToken: string;
        refreshToken: string;
        userId: number;
        tenantId: string;
        email: string;
        username: string;
        fullName: string | undefined;
        roles: string[];
        permissions: string[];
        isSuperAdmin: boolean;
        hierarchy: {
            branch: {
                id: number;
                name: string;
            };
            department: {
                id: number;
                name: string;
            };
            team: {
                id: number;
                name: string;
            };
            position: {
                id: number | null;
                name: string | null;
            };
        }[];
        modules: any;
        isFirstTime: number;
    }>;
    refresh(refreshToken: string): Promise<{
        accessToken: string;
        userId: number;
        user: {
            id: number;
            email: string;
            roles: string[];
            permissions: string[];
            isSuperAdmin: boolean;
            hierarchy: {
                branch: {
                    id: number;
                    name: string;
                };
                department: {
                    id: number;
                    name: string;
                };
                team: {
                    id: number;
                    name: string;
                };
                position: {
                    id: number | null;
                    name: string | null;
                };
            }[];
            modules: any;
        };
    }>;
    logout(accessToken: string): Promise<{
        message: string;
    }>;
    googleLogin(dto: GoogleLoginDto): Promise<SocialLoginResult>;
    appleLogin(dto: AppleLoginDto): Promise<SocialLoginResult>;
    private handleSocialLogin;
    forgotPassword(dto: ForgotPasswordDto): Promise<{
        message: string;
    }>;
    resetPassword(dto: ResetPasswordDto): Promise<{
        message: string;
    }>;
}
