/** * Role-Based Access Control (RBAC) types */ /** * Configuration mapping roles to permissions */ export interface RBACConfig

{ [role: string]: P[]; } /** * Generic user interface that can be extended by specific applications. * Optionally supports multiple roles via the `roleNames` property. */ export interface RBACUser { [key: string]: unknown; roleNames?: string[]; } /** * RBAC configuration options. * Supports both single-role and multi-role users. */ export interface RBACOptions { /** * Configuration mapping roles to permissions */ rbacConfig: RBACConfig

; /** * The permission value that represents "ALL permissions" */ allPermissionValue: P; /** * Array of all available permissions */ allPermissions: P[]; /** * The key in the user object that contains the role(s) - can be a string or array of strings */ roleKey?: keyof U; }