import type { EscalationChain, RoleDetail } from './types'; /** * Get the roles a given source role can escalate to. */ export declare function getEscalationTargets(sourceRole: string): Promise; /** * Get all escalation chain pairs. */ export declare function getAllEscalationChains(): Promise; /** * Add a single escalation chain entry. */ export declare function addEscalationChain(sourceRole: string, targetRole: string): Promise; /** * Remove a single escalation chain entry. */ export declare function removeEscalationChain(sourceRole: string, targetRole: string): Promise; /** * Replace all escalation targets for a source role. */ export declare function replaceEscalationTargets(sourceRole: string, targets: string[]): Promise; /** * Check whether a user can escalate from sourceRole to targetRole. * Superadmins and admin/admin can escalate to any role. * Others must hold the sourceRole AND the chain must exist. */ export declare function canEscalateTo(userId: string, sourceRole: string, targetRole: string): Promise; /** * List all distinct role names known to the system. * lt_roles is the canonical source — all other tables reference it via FK. */ export declare function listDistinctRoles(): Promise; /** * List all roles with usage counts (users, escalation chains, workflows). */ export declare function listRolesWithDetails(): Promise; /** * Create a standalone role entry. */ export declare function createRole(role: string): Promise; /** * Delete a role. Returns an error message if the role is referenced. */ export declare function deleteRole(role: string): Promise<{ deleted: boolean; error?: string; }>;