import type { CloudFormationClient } from "@aws-sdk/client-cloudformation"; import type { S3Client } from "@aws-sdk/client-s3"; import { type Result } from "@fjall/generator"; import type { DeployCallbacks } from "../../types/callbacks.js"; export interface PreEmptyBucketsSummary { /** Buckets carrying a pre-empty tag; the empty pass ran over them (warn-only inside). */ matched: string[]; /** * Buckets evaluated and left untouched (no pre-empty tag, or tags * unreadable). Already-deleted buckets appear in neither list — nothing * survives the destroy, so reporting them as retained would mislead. */ skipped: string[]; } /** * SDK-empty a live stack's pre-empty-tagged S3 buckets before CFN destroy, so * the auto-delete custom resource (where present) is a fast no-op and never * hits its Lambda timeout — the S3 quarantine trigger. * * Per-bucket failures (throttle, AccessDenied, anything) warn via callback and * continue; they never produce a Result failure. Failure is reserved for * "could not even list stack resources" — callers proceed to destroy on * failure too, degrading to today's behaviour. */ export declare function preEmptyStackBuckets(cfnClient: CloudFormationClient, s3Client: S3Client, stackName: string, callbacks?: DeployCallbacks, abortSignal?: AbortSignal): Promise>; /** * Extract the marker-tagged buckets a pre-empty pass captured, or [] when the * pass failed (the failure already warned via callbacks; destroy proceeds * regardless). * * Call BEFORE the destroy — once CFN reports the stack gone the resource list * is unreadable, so the captured list is the only record of which marked * buckets the orphan sweep (AC3.3) may touch. */ export declare function capturedSweepBuckets(preEmptyResult: Result): readonly string[];