/** * Cascading delete helpers for admin operations. * * Each function deletes the target entity and all dependent entities, * returning a summary of what was removed for audit logging. */ import type { DataStore } from "@openleash/core"; export interface CascadeSummary { agents_removed: number; policies_removed: number; bindings_removed: number; approval_requests_removed: number; policy_drafts_removed: number; memberships_removed: number; org_invites_removed: number; } /** * Delete an agent and all dependent data: * - Agent file * - Policies specifically targeting this agent (applies_to_agent_principal_id) * - Bindings for those policies * - Approval requests referencing this agent * - Policy drafts referencing this agent */ export declare function cascadeDeleteAgent(store: DataStore, agentPrincipalId: string): CascadeSummary; /** * Delete an organization and all dependent data: * - All org memberships * - All org agents (cascading) * - All org policies + bindings * - All org invites * - All org approval requests + policy drafts * - Organization file */ export declare function cascadeDeleteOrg(store: DataStore, orgId: string): CascadeSummary; /** * Delete a user/owner and all dependent data: * - All user's agents (cascading) * - All user's policies + bindings * - All user's memberships * - All org invites targeting this user * - All setup invites for this user * - All user approval requests + policy drafts * - User file */ export declare function cascadeDeleteUser(store: DataStore, userId: string): CascadeSummary; //# sourceMappingURL=cascade.d.ts.map