import { DataSource, FindManyOptions, FindOneOptions, Repository } from 'typeorm';
import { EventEmitter2 } from '@nestjs/event-emitter';
import { AuthConfigService } from '../../core/services/auth-config.service';
import { NestAuthRole } from '../entities/role.entity';
import { IUpdateRoleInput } from '@ackplus/nest-auth-contracts';
export declare class RoleService {
    private roleRepository;
    private dataSource;
    private authConfigService;
    private readonly eventEmitter;
    constructor(roleRepository: Repository<NestAuthRole>, dataSource: DataSource, authConfigService: AuthConfigService, eventEmitter: EventEmitter2);
    private getDefaultRoleGuard;
    private getRoleRelations;
    private resolveAndValidateGuard;
    private normalizePermissionNames;
    private buildRoleConflictMessage;
    private ensureRoleIsUnique;
    private resolvePermissionsByNames;
    private replaceRolePermissions;
    private getHydratedRole;
    createRole(name: string, guard: string | null | undefined, tenantId?: string | null, isSystem?: boolean, permissionNames?: string | string[], isActive?: boolean): Promise<NestAuthRole>;
    getRoleById(id: string, options?: Omit<FindOneOptions<NestAuthRole>, 'where'>): Promise<NestAuthRole>;
    getRoleByName(name: string, guard?: string, tenantId?: string, options?: Omit<FindOneOptions<NestAuthRole>, 'where'>): Promise<NestAuthRole>;
    getSystemRoles(options?: Omit<FindManyOptions<NestAuthRole>, 'where'>): Promise<NestAuthRole[]>;
    getRoles(params?: {
        guard?: string;
        tenantId?: string;
        onlyTenantRoles?: boolean;
        onlySystemRoles?: boolean;
        includeTenant?: boolean;
    }, options?: FindManyOptions<NestAuthRole>): Promise<NestAuthRole[]>;
    updateRole(id: string, data: IUpdateRoleInput): Promise<NestAuthRole>;
    updateRolePermissions(id: string, permissionNames: string[]): Promise<NestAuthRole>;
    deleteRole(id: string): Promise<void>;
}
//# sourceMappingURL=role.service.d.ts.map