import { User, SecurityClearance } from "vr-models"; /** * Get user's security clearance level * If user with security clearance is provided, extract level directly * Otherwise fetch from database */ export declare function getUserLevel(userOrId: User | string, securityClearance?: SecurityClearance): Promise<{ level: number; role: string; clearance: SecurityClearance | null; }>; /** * Check if admin level is superior to target level (strictly greater) */ export declare function isSuperior(adminLevel: number, targetLevel: number): boolean; /** * Check if admin level is subordinate to target level (strictly less) */ export declare function isSubordinate(adminLevel: number, targetLevel: number): boolean; /** * Check if admin level is equal to target level */ export declare function isRankEqual(adminLevel: number, targetLevel: number): boolean; /** * Check if admin level is subordinate or equal to target level */ export declare function isSubordinateOrEqual(adminLevel: number, targetLevel: number): boolean; /** * Check if admin level is superior or equal to target level */ export declare function isSuperiorOrEqual(adminLevel: number, targetLevel: number): boolean; /** * Validate hierarchy for an action with custom message */ export declare function validateHierarchy(adminLevel: number, targetLevel: number, action: string, allowEqual?: boolean): { allowed: boolean; message?: string; }; /** * Filter users based on hierarchical permissions using security clearance levels * Pure function - no database calls * * @param currentUserLevel - The level of the requesting user (from securityClearance.level) * @param users - Array of users to filter (must include securityClearance association) * @param currentUserId - Optional: ID of the requesting user to always include them * @returns Filtered array of users */ export declare const hierarchicalView: (currentUserLevel: number, users: any[], currentUserId?: string) => any[];