import { Repository } from 'typeorm'; import { Role, Permission, UserRole, RolePermission } from '../entities'; import { CreateRoleDto, UpdateRoleDto, AssignRoleDto } from '../dto'; export declare class RbacService { private readonly roleRepository; private readonly permissionRepository; private readonly userRoleRepository; private readonly rolePermissionRepository; constructor(roleRepository: Repository, permissionRepository: Repository, userRoleRepository: Repository, rolePermissionRepository: Repository); createRole(dto: CreateRoleDto, tenantId: string): Promise; updateRole(roleId: string, dto: UpdateRoleDto, tenantId: string): Promise; deleteRole(roleId: string, tenantId: string): Promise; findAllRoles(tenantId: string): Promise; findRoleById(roleId: string, tenantId: string): Promise; getRoleWithPermissions(roleId: string, tenantId: string): Promise<{ role: Role; permissions: Permission[]; }>; findAllPermissions(): Promise; findPermissionsByCategory(category: string): Promise; getRolePermissions(roleId: string): Promise; setRolePermissions(roleId: string, permissionCodes: string[], tenantId: string): Promise; assignRoleToUser(dto: AssignRoleDto, tenantId: string, assignedBy: string): Promise; removeRoleFromUser(userId: string, roleId: string, tenantId: string): Promise; getUserRoles(userId: string, tenantId: string): Promise; getUserPermissions(userId: string, tenantId: string): Promise; userHasPermission(userId: string, tenantId: string, permissionCode: string): Promise; userHasAnyPermission(userId: string, tenantId: string, permissionCodes: string[]): Promise; userHasAllPermissions(userId: string, tenantId: string, permissionCodes: string[]): Promise; userHasRole(userId: string, tenantId: string, roleCode: string): Promise; }