/** * PermissionService — centralized permission checking for Groups and Channels. * * Tracks member roles and mute status per context (group or channel ID). * Uses the DEFAULT_ROLE_PERMISSIONS map from brightchain-lib to resolve * whether a given role grants a specific permission. * * Requirements: 7.1, 7.2, 7.3, 7.4 */ import { DefaultRole, Permission } from '../../enumerations/communication'; export declare class PermissionService { /** memberId:contextId → DefaultRole */ private readonly roles; /** memberId:contextId → mute expiry timestamp (ms since epoch) */ private readonly mutes; /** * Check whether a member has a specific permission in a context. * Returns false if the member has no role in the context or is missing the permission. * * Requirement 7.1: check member permissions against role-based permission sets. */ hasPermission(memberId: string, contextId: string, permission: Permission): boolean; /** * Assign (or update) a role for a member in a context. * * Requirement 7.2: assign and retrieve member roles per context. */ assignRole(memberId: string, contextId: string, role: DefaultRole): void; /** * Get the role assigned to a member in a context, or null if none. */ getMemberRole(memberId: string, contextId: string): DefaultRole | null; /** * Check whether a member is currently muted in a context. * A mute is active when the stored expiry timestamp is in the future. * * Requirement 7.3, 7.4: track mute status with expiration, auto-clear on check. */ isMuted(memberId: string, contextId: string): boolean; /** * Mute a member in a context for the given duration (milliseconds). * * Requirement 7.3: track member mute status with expiration. */ muteMember(memberId: string, contextId: string, durationMs: number): void; } //# sourceMappingURL=permissionService.d.ts.map