import type { PropertyDescriptorInner, PropertyDescriptorTree, SchemaBuilder } from '@cleverbrush/schema'; import { ObjectSchemaBuilder } from '@cleverbrush/schema'; /** * Builds a map from PropertyDescriptorInner identity → dot-separated path * by traversing the descriptor tree recursively. */ export declare function buildDescriptorPathMap(tree: PropertyDescriptorTree, schema: ObjectSchemaBuilder): Map, string>; /** * Looks up the path for a given descriptor from the pre-built map. */ export declare function getDescriptorPath(inner: PropertyDescriptorInner, pathMap: Map, string>): string; /** * Returns the schema type string (e.g. "string", "number", "object"). */ export declare function getSchemaType(schema: SchemaBuilder): string; /** * Builds a selector function from a dot-separated path string. * The selector traverses the PropertyDescriptorTree by property access. * Example: "customer.address.city" → (tree) => tree.customer.address.city */ export declare function buildSelectorFromPath(path: string): (tree: any) => any; /** * Checks whether a validation error path matches a field's expected error path. * Matches exact path, path with nested suffix, or path with validator suffix. * Example: isErrorPathMatch("$.user.name", "$.user.name") → true * isErrorPathMatch("$.user.name($validators[0])", "$.user.name") → true */ export declare function isErrorPathMatch(errPath: string, fieldErrorPath: string): boolean; /** * Ensures all nested object structures exist in the values object * by traversing the schema and creating empty objects where needed. * This prevents ObjectSchemaBuilder.validate() from throwing when * nested object properties are undefined. * * Example: ensureNestedStructure({}, OrderSchema) * → { customer: { address: {} } } */ export declare function ensureNestedStructure(values: any, schema: ObjectSchemaBuilder): any;