import { TAtscriptAnnotatedType, TValidatorPlugin } from "@atscript/typescript/utils"; //#region src/db-validator-plugin.d.ts interface DbValidationContext { mode: "insert" | "replace" | "patch"; /** Flat map from the table — used to check if an array is a top-level array. */ flatMap?: Map; /** Precomputed nav field names — used to skip field-op validation inside TO/FROM/VIA relations. */ navFields?: ReadonlySet; /** * Depth-limit enforcement bundle. Set only on the root write call; nested * re-entries leave it unset so the root's check isn't repeated. `limit` is * `@db.depth.limit N`; `fromDepthMap` maps normalized paths (no array * indices) to from-chain depth. */ depthCheck?: { limit: number; fromDepthMap: ReadonlyMap; }; } /** * Validator plugin for database operations. * * Handles navigation field constraints and delegates to the standard validator * for type checking. The annotated type tree already includes nav fields with * their full target types — this plugin controls WHEN recursion is allowed * based on the operation mode (insert/replace/patch). * * Replaces the old `navFieldsValidatorPlugin` (which blindly skipped all nav * fields) and `_checkNavProps()` (which validated constraints separately). */ declare function createDbValidatorPlugin(): TValidatorPlugin; //#endregion export { createDbValidatorPlugin as n, DbValidationContext as t };