import type { SourcePath, ValidationError } from "@valbuild/core"; /** * Partition validation errors by whether the UI should surface them. * * `skipped` errors carry only fix codes the user can't (or shouldn't) act on * in the browser: * - image/file metadata checks (need to read bytes from disk) * - remote upload/download, and the singular remote check (need a personal * access token + network) * - gallery directory uniqueness + untracked-files checks (need fs traversal) * * The server (ValOps + createFixPatch) resolves all of these automatically on * save, and the CLI's `runValidation` does the same. So the user never needs * to see them in the studio — but we keep them in the `skipped` partition, * not dropped, so we can later surface a "N fixes pending — saving will * repair them" badge or wire up an explicit "fix all" affordance without * having to plumb the data back in. * * `keyof:check-keys` and `router:check-route` are surfaced if they reach * this function — they're meant to be resolved upfront by the shared * `resolveSchemaSourceFixes`. A remnant here means resolution didn't run * for some reason; the user-facing "Invalid key/route" message is more * useful than silent hiding. */ export declare function partitionValidationErrors(validationErrors: Record): { surfaced: Record; skipped: Record; }; /** * Whether the Studio leaves this error to the server, which repairs it on * save, rather than showing it and holding a publish back for it. One rule * for every gate: `val publish` asks the same question, so the CLI does not * refuse what the Studio would publish. */ export declare function isRepairedOnSave(error: ValidationError): boolean;