import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.2/strict/openapi-document'; /** * Walk an object schema along a dotted-row path and return the resolved leaf schema, * or undefined when any segment is not a declared object property. */ export declare const resolveLeafSchema: (schema: SchemaObject | undefined, segments: string[]) => SchemaObject | undefined; /** * The form table stringifies every value for display, so an edited nested field comes back * as a string (`false` -> "false", `[]` -> "[]"). When the leaf schema declares a non-string * type, parse the string back to that type so the regrouped JSON part keeps its original * shape instead of becoming string-typed (issue #9416). * * Coercion is deliberately conservative: schemas that allow `string` keep the raw text, and a * value that does not parse as its declared type is left untouched so user input is never lost. */ export declare const coerceLeafValueToSchemaType: (value: unknown, schema: SchemaObject | undefined) => unknown; /** * Best-effort coercion for row values whose property is not declared in the schema. * * Without a declared type we have no authority to keep `"5"` a string, and leaving it * untouched would string-type every undeclared number/boolean on the first form edit. * So values that parse as non-string JSON (`5`, `true`, `null`, `[1]`, `{"a":1}`) become * that value, and anything else stays the raw text the user typed. */ export declare const coerceUntypedValue: (value: unknown) => unknown; /** * Build a predicate that recognizes rows whose dotted name encodes a path into a nested * object property of the body schema. Without a schema (or when the dotted prefix is not * declared as a nested object), a row like `user.email` is treated as a literal name and * stays flat — only schema-derived leaves emitted by the form-row builders are folded * back into nested objects. */ export declare const buildDottedNestedRowPredicate: (schema: unknown) => (_name: string, _value: unknown) => boolean; //# sourceMappingURL=schema-value-coercion.d.ts.map