import { ActualAssignment, AssignmentUpdate, DesiredAssignment, ReconcileMode } from './model.js'; /** What a mode deliberately leaves alone, reported beneath a plan as drift. */ export type Drift = { adds: number; updates: number; removes: number; }; /** A diff narrowed to one mode: what that mode acts on, and the drift it leaves behind. */ export declare class ScopedChange { readonly additions: DesiredAssignment[]; readonly updates: AssignmentUpdate[]; readonly removals: ActualAssignment[]; readonly drift: Drift; constructor(additions: DesiredAssignment[], updates: AssignmentUpdate[], removals: ActualAssignment[], drift: Drift); /** How many assignments this mode would act on. */ count(): number; /** How many distinct users this mode would touch. */ usersAffected(): number; } /** The change set between the desired model and the org's current state. */ export declare class Diff { readonly toAdd: DesiredAssignment[]; readonly toUpdate: AssignmentUpdate[]; readonly toRemove: ActualAssignment[]; readonly unchanged: ActualAssignment[]; constructor(toAdd: DesiredAssignment[], toUpdate: AssignmentUpdate[], toRemove: ActualAssignment[], unchanged: ActualAssignment[]); /** The diff of a run that aborted before it ever reached the org. */ static empty(): Diff; /** How many assignments differ, whatever the mode would act on. */ changeCount(): number; /** * Narrow the diff to what the chosen mode acts on: additive skips removals, * destructive skips adds and updates, sync acts on all. Whatever the mode skips * comes back as drift, so plan and apply report it rather than hiding it. */ scopeTo(mode: ReconcileMode): ScopedChange; } /** * Compare the desired assignments against the org's current memberships of the * managed targets. `actual` must hold only assignments for targets that appear * in `desired` (the managed set), so any actual row not in `desired` is an * undeclared assignment eligible for removal. A declared assignment whose * expiration differs from the org's is an update rather than unchanged. */ export declare function diffAssignments(desired: DesiredAssignment[], actual: ActualAssignment[]): Diff; //# sourceMappingURL=diff.d.ts.map