import { PaginationService } from '@hed-hog/api-pagination';
import { PrismaService } from '@hed-hog/api-prisma';
import { ChallengeService } from '../challenge/challenge.service';
import { DeleteDTO } from '../dto/delete.dto';
import { FileService } from '../file/file.service';
import { IntegrationDeveloperApiService } from '../integration/services/integration-developer-api.service';
import { SecurityService } from '../security/security.service';
import { CreateWithEmailAndPasswordDTO } from './dto/create-with-email-and-password.dto';
import { ResetPasswordDTO } from './dto/reset-password.dto';
import { UpdateDTO } from './dto/update.dto';
export declare class UserService {
    private readonly prismaService;
    private readonly paginationService;
    private readonly security;
    private readonly challenge;
    private readonly file;
    private readonly integrationApi;
    constructor(prismaService: PrismaService, paginationService: PaginationService, security: SecurityService, challenge: ChallengeService, file: FileService, integrationApi: IntegrationDeveloperApiService);
    private validateUserExists;
    private validateRoleExists;
    private validateEmailAvailable;
    verifyIdentifier(locale: string, userId: number, identifierId: number): Promise<{
        type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
        id: number;
        value: string;
        enabled: boolean;
        user_id: number;
        created_at: Date;
        updated_at: Date;
        verified_at: Date | null;
    }>;
    list(paginationParams: any): Promise<{
        paginate: {
            total: any;
            lastPage: number;
            page: number;
            pageSize: number;
            data: any;
        };
        stats: {
            total: number;
            newLast7Days: number;
            blocked: number;
        };
    }>;
    get(locale: string, userId: number): Promise<{
        user_identifier: {
            type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
            id: number;
            value: string;
            enabled: boolean;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            verified_at: Date | null;
        }[];
        role_user: ({
            role: {
                id: number;
                created_at: Date;
                updated_at: Date;
                slug: string;
            };
        } & {
            id: number;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            role_id: number;
        })[];
        user_account: {
            id: number;
            email: string | null;
            provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            provider_user_id: string;
            scopes: string | null;
            refresh_token: import("@prisma/client/runtime/library").Bytes | null;
            token_expires_at: Date | null;
        }[];
        user_activity: {
            id: number;
            action: string;
            user_id: number;
            created_at: Date;
            updated_at: Date;
        }[];
        user_credential: {
            type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
            id: number;
            hash: string;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            expires_at: Date | null;
            revoked_at: Date | null;
            requires_reset: boolean;
        }[];
        user_session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        }[];
    } & {
        name: string;
        id: number;
        created_at: Date;
        updated_at: Date;
        photo_id: number | null;
        suspended_until: Date | null;
        last_login_at: Date | null;
        suspended_reason: string | null;
        deactivated_at: Date | null;
    }>;
    createWithEmailAndPassword(locale: string, { email, name, password }: CreateWithEmailAndPasswordDTO): Promise<{
        user: {
            name: string;
            id: number;
            created_at: Date;
            updated_at: Date;
            photo_id: number | null;
            suspended_until: Date | null;
            last_login_at: Date | null;
            suspended_reason: string | null;
            deactivated_at: Date | null;
        };
        challenge: {
            challengeId: number;
        };
    }>;
    update(locale: string, userId: number, { name }: UpdateDTO): Promise<{
        name: string;
        id: number;
        created_at: Date;
        updated_at: Date;
        photo_id: number | null;
        suspended_until: Date | null;
        last_login_at: Date | null;
        suspended_reason: string | null;
        deactivated_at: Date | null;
    }>;
    resetPassword(locale: string, userId: number, { password }: ResetPasswordDTO): Promise<{
        password: string;
        requiresReset: boolean;
    }>;
    delete(locale: string, { ids }: DeleteDTO): Promise<import("@prisma/client").Prisma.BatchPayload>;
    changeAvatar(locale: string, userId: number, avatar: MulterFile): Promise<{
        id: number;
        path: string;
    }>;
    openPublicAvatar(locale: string, fileId: number, res: any): Promise<void>;
    findUserById(locale: string, id: number): Promise<{
        user_identifier: {
            type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
            id: number;
            value: string;
            enabled: boolean;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            verified_at: Date | null;
        }[];
        role_user: ({
            role: {
                id: number;
                created_at: Date;
                updated_at: Date;
                slug: string;
            };
        } & {
            id: number;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            role_id: number;
        })[];
        user_account: {
            id: number;
            email: string | null;
            provider: import("@prisma/client").$Enums.user_account_provider_52222e2ecb_enum;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            provider_user_id: string;
            scopes: string | null;
            refresh_token: import("@prisma/client/runtime/library").Bytes | null;
            token_expires_at: Date | null;
        }[];
        user_activity: {
            id: number;
            action: string;
            user_id: number;
            created_at: Date;
            updated_at: Date;
        }[];
        user_credential: {
            type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
            id: number;
            hash: string;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            expires_at: Date | null;
            revoked_at: Date | null;
            requires_reset: boolean;
        }[];
        user_session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        }[];
    } & {
        name: string;
        id: number;
        created_at: Date;
        updated_at: Date;
        photo_id: number | null;
        suspended_until: Date | null;
        last_login_at: Date | null;
        suspended_reason: string | null;
        deactivated_at: Date | null;
    }>;
    findUserByEmail(_locale: string, email: string): Promise<{
        user_identifier: {
            type: import("@prisma/client").$Enums.user_identifier_type_e66d505520_enum;
            id: number;
            value: string;
            enabled: boolean;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            verified_at: Date | null;
        }[];
        user_credential: {
            type: import("@prisma/client").$Enums.user_credential_type_4466d7f008_enum;
            id: number;
            hash: string;
            user_id: number;
            created_at: Date;
            updated_at: Date;
            expires_at: Date | null;
            revoked_at: Date | null;
            requires_reset: boolean;
        }[];
        user_session: {
            id: number;
            hash: string;
            user_id: number;
            user_agent: string;
            created_at: Date;
            updated_at: Date;
            ip_address: string;
            expires_at: Date;
            revoked_at: Date | null;
        }[];
    } & {
        name: string;
        id: number;
        created_at: Date;
        updated_at: Date;
        photo_id: number | null;
        suspended_until: Date | null;
        last_login_at: Date | null;
        suspended_reason: string | null;
        deactivated_at: Date | null;
    }>;
    getUserRoles(userId: number): Promise<{
        id: any;
        slug: any;
        name: any;
        description: any;
        isAssigned: boolean;
    }[]>;
    getUserMenus(locale: string, userId: number): Promise<{
        id: number;
        menuId: any;
        url: any;
        icon: any;
        order: any;
        name: any;
        roles: any;
    }[]>;
    getUserRoutes(locale: string, userId: number): Promise<{
        id: number;
        url: string;
        method: import("@prisma/client").$Enums.route_method_3b4d117a29_enum;
        roles: any;
    }[]>;
    assignRoleToUser(locale: string, userId: number, roleId: number): Promise<{
        id: number;
        user_id: number;
        created_at: Date;
        updated_at: Date;
        role_id: number;
    }>;
    removeRoleFromUser(locale: string, userId: number, roleId: number): Promise<{
        count: number;
    }>;
    registerUserActivity(userId: number | null | undefined, action: string): Promise<{
        id: number;
        action: string;
        user_id: number;
        created_at: Date;
        updated_at: Date;
    }>;
    private validateDeleteIds;
    private deleteOldAvatar;
    private getDefaultUserRole;
    private generateRandomPassword;
    private getUserIncludeClause;
    private getUserStatistics;
    private getAllRolesWithLocale;
    private getUserAssignedRoles;
    private mapRolesWithAssignment;
    private findRoleUser;
}
//# sourceMappingURL=user.service.d.ts.map