import { User, Role, SecurityEvent } from './types.js'; /** * Authorization service for miura Framework * Handles role-based access control (RBAC) and permission checking */ export declare class AuthorizationService { private static instance; private roles; private eventListeners; private constructor(); static getInstance(): AuthorizationService; /** * Check if user has permission for a specific resource and action */ hasPermission(user: User, resource: string, action: string, conditions?: Record): boolean; /** * Check if user has any of the specified roles */ hasRole(user: User, roles: string | string[]): boolean; /** * Check if user has all of the specified roles */ hasAllRoles(user: User, roles: string[]): boolean; /** * Add a new role */ addRole(role: Role): void; /** * Remove a role */ removeRole(roleName: string): void; /** * Get all roles */ getRoles(): Role[]; /** * Get role by name */ getRole(roleName: string): Role | undefined; /** * Get current user's permissions */ getCurrentUserPermissions(): string[]; /** * Check if current user has permission */ can(resource: string, action: string, conditions?: Record): boolean; /** * Check if current user has role */ is(roles: string | string[]): boolean; /** * Add event listener */ on(event: string, callback: (event: SecurityEvent) => void): void; /** * Remove event listener */ off(event: string, callback: (event: SecurityEvent) => void): void; private initializeDefaultRoles; private evaluateConditions; private emitSecurityEvent; } export declare const authz: AuthorizationService; //# sourceMappingURL=authorization.d.ts.map