/** * Pure classifiers mapping `@aws-cdk/cloudformation-diff` output onto the deploy * contract's vocabulary. No IO — every function here is a fixture-testable map. */ import { ResourceImpact } from "@aws-cdk/cloudformation-diff"; import type { PlanAction, PlanPropertyChange, ReplacementMode } from "../../../types/deployEvent.js"; export interface ImpactClassification { action: PlanAction; replacementMode: ReplacementMode; /** Replace OR destroy — a real mutation loss. Orphan/retain is NOT destructive. */ destructive: boolean; /** WILL_ORPHAN — removed from the stack but physically retained. */ retained: boolean; } /** * Map a cloudformation-diff ResourceImpact to our plan vocabulary. The enum is * EXACT-pinned via the blessed trio, so the switch is exhaustive; an unrecognised * impact (a deliberate bump shipping a new member) fails closed — flagged * destructive and conditional so the gate prompts rather than waving it through. */ export declare function classifyImpact(impact: ResourceImpact): ImpactClassification; export declare function isStatefulResourceType(resourceType: string): boolean; /** Data is lost when a stateful resource is replaced or destroyed (not retained). */ export declare function isDataLoss(args: { action: PlanAction; retained: boolean; resourceType: string; }): boolean; /** * Derive per-property change detail from a cloudformation-diff `propertyUpdates` * map. Records only the property PATH and whether it forces replacement — never * the old/new VALUES, which can embed credentials. Capped at 100 entries. */ export declare function derivePropertyChanges(propertyUpdates: Record | undefined): PlanPropertyChange[];