import type { GridSchema, GridState } from 'apex-grid'; import { type StatePatch } from './ai-schema.js'; /** * Defense-in-depth on top of the grid's defensive `setState`: strip anything the * reasoner returned that the {@link GridSchema} does not advertise, so the applied * patch is a faithful, predictable record and the UI can report exactly what was * refused. Drops, with a warning each: sort on unknown / non-sortable columns or * invalid directions (and extra entries on a single-sort grid); filters on unknown * columns or with operands invalid for the column; column-layout entries on unknown * keys; selection / pagination when the grid disables them; out-of-vocabulary * grouping / pivot / aggregation fields; and any slice outside the documented * {@link StatePatch} surface. Used by the view-state tools before `applyState`. */ export declare function sanitizePatch(patch: Partial, schema: GridSchema): { patch: StatePatch; warnings: string[]; };