Cleanup
Remove the records an apply receipt proves DomainKit created, with the same review the customer gave the plan.
Cleanup.Flow plans the removal from an apply receipt and reviews it the same way provisioning
does.
export function RemoveRecords() {
return <Cleanup.Flow domain={domain} trigger="Remove records" />;
}Usage
export function RemoveRecords() {
return <Cleanup.Flow domain={domain} trigger="Remove records" />;
}What it removes
Only records the receipt proves DomainKit created, and only while they still match exactly. A record someone edited by hand becomes a conflict and is left alone, and the dialog says so.
Pass receiptId to clean a specific apply. Without one, the controller uses the domain’s latest
provisioning receipt, which is what Domain.Flow does.
Parts
The same set as provisioning: Cleanup.Dialog, Cleanup.Actions, Cleanup.Status, and
Cleanup.Outcome, wording adjusted for removal.
Composing it yourself
Cleanup.useController({ domain, receiptId?, onCleaned? }) runs the same machine as
Provision.useController. See controllers.