import type { DiffEntry } from '../../rest/projects.js'; export interface PlanSummaryOptions { /** Display names per resource type, for the types a user declares. */ prettyTypes: Record; /** Types reported as part of their owning check or group rather than on their own. */ foldedTypes: readonly string[]; } /** A relation the project does not manage, which this deploy will delete. */ export declare function isPrunedRelation(entry: DiffEntry): boolean; /** * True when every change reported on a resource is a relation the project does * not manage. Checkly reports those on the owning check or group whether or not * the deploy would delete them, and without `--prune-unmanaged-relations` it deletes * nothing — so the resource itself is untouched and naming it as an update * would describe a write that never happens. */ export declare function onlyUnmanagedChanges(entry: DiffEntry): boolean; /** * True for a resource the deploy writes only to set a baseline: Checkly * compared it with what is live for want of an earlier planned deploy * (`basis: 'live'`) and found nothing to report, or nothing but relations the * project does not manage. The write happens whatever was found, and the * reported changes are not exhaustive (a secret or content Checkly does not * return may differ), so the plan lists the resource; but as a baseline, not * as the update a resource with a difference to show is. Relations the * project does not manage count for nothing here whether or not the deploy * prunes them: pruned, each is deleted on an entry of its own, which the plan * lists; not pruned, they are left alone, which the `!` row says. */ export declare function writtenForBaseline(entry: DiffEntry): boolean; /** * True when the plan gives the deploy nothing to write: no resource to create, * update, delete or detach, and no relation to prune. Relations the project * does not manage and is not pruning do not count, since the deploy leaves * them alone. */ export declare function planHasNoChanges(diff: DiffEntry[], options: PlanSummaryOptions): boolean; /** * One line per resource the deploy would touch, deletions first and in full, * for the confirmation prompt and the agent envelope. */ export declare function planChangeLines(diff: DiffEntry[], options: PlanSummaryOptions): string[]; /** * A resource the plan reports as changed in Checkly since the last planned * deploy, which the deploy would overwrite: properties edited in Checkly * (`paths`), or the resource deleted there, which the deploy creates again. */ export interface DriftedResource { type: string; logicalId: string; deleted: boolean; paths: string[]; } /** * The resources the plan reports as changed in Checkly, one per check, group * or other declared resource: a relation's drift (an alert channel * subscription removed in Checkly, say) is reported on the resource it is * folded into. Relations the project does not manage are not drift: they are * left alone unless `--prune-unmanaged-relations` asks for them to be deleted. * * Blind to a resource without a baseline (`basis: 'live'`): Checkly compares * it with what is deployed, so code changes and edits made in Checkly look * the same. {@link unbaselinedResources} counts those. Also blind to a * resource the code removes: Checkly reports no changes on a deletion. */ export declare function findDrift(diff: readonly DiffEntry[], { foldedTypes }: PlanSummaryOptions): DriftedResource[]; /** * How many declared resources Checkly had no earlier planned deploy to * compare with (`basis: 'live'`), which {@link findDrift} cannot check. */ export declare function unbaselinedResources(diff: readonly DiffEntry[], { foldedTypes }: PlanSummaryOptions): number; /** One line per drifted resource, saying what changed in Checkly and what the deploy would do about it. */ export declare function driftLines(drift: readonly DriftedResource[], options: PlanSummaryOptions): string[]; /** * The plan as the agent envelope carries it: every entry and every changed * property, but without the resources' full current state and without the * large values the rendered diff needs. Rendering happens in the terminal * output; the envelope is there to be read, and it is the same plan, pinned by * the same `planToken`. */ export declare function reducePlanForAgent(diff: DiffEntry[]): DiffEntry[];