import type { EscalationChain, RoleDetail } from './types';
/**
 * Get the roles a given source role can escalate to.
 */
export declare function getEscalationTargets(sourceRole: string): Promise<string[]>;
/**
 * Get all escalation chain pairs.
 */
export declare function getAllEscalationChains(): Promise<EscalationChain[]>;
/**
 * Add a single escalation chain entry.
 */
export declare function addEscalationChain(sourceRole: string, targetRole: string): Promise<void>;
/**
 * Remove a single escalation chain entry.
 */
export declare function removeEscalationChain(sourceRole: string, targetRole: string): Promise<boolean>;
/**
 * Replace all escalation targets for a source role.
 */
export declare function replaceEscalationTargets(sourceRole: string, targets: string[]): Promise<void>;
/**
 * Check whether a user can escalate from sourceRole to targetRole.
 * Superadmins 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<boolean>;
/**
 * 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<string[]>;
/**
 * List all roles with usage counts (users, escalation chains, workflows).
 */
export declare function listRolesWithDetails(): Promise<RoleDetail[]>;
/**
 * Create a standalone role entry.
 */
export declare function createRole(role: string): Promise<void>;
/**
 * Delete a role. Returns an error message if the role is referenced.
 */
export declare function deleteRole(role: string): Promise<{
    deleted: boolean;
    error?: string;
}>;
