import type { z } from 'zod'; import type { ReferencePath } from '#src/references/types.js'; export type SchemaChildren = { readonly kind: 'leaf'; } | { readonly kind: 'leaf-union'; } | { readonly kind: 'wrapper'; readonly innerSchema: z.ZodType; readonly skipIfNullish: boolean; } | { readonly kind: 'object'; readonly entries: readonly (readonly [string, z.ZodType])[]; } | { readonly kind: 'array'; readonly elementSchema: z.ZodType; } | { readonly kind: 'tuple'; readonly items: readonly z.ZodType[]; readonly rest: z.ZodType | null; } | { readonly kind: 'record'; readonly valueSchema: z.ZodType; } | { readonly kind: 'intersection'; readonly left: z.ZodType; readonly right: z.ZodType; } | { readonly kind: 'discriminated-union'; readonly match: z.ZodType | undefined; }; /** * Given a list of discriminated union options, finds the branch whose * discriminator literal includes the value found at `data[discriminator]`. * * Returns `undefined` if: * - `data` is not a plain object or doesn't contain the discriminator key * - no option matches the discriminator value in the data * * Throws if any option is not a ZodObject or its discriminator field is not a literal schema. */ export declare function findDiscriminatedUnionMatch(options: z.ZodType[], discriminator: string, data: unknown): z.ZodType | undefined; /** * Classifies a Zod schema node and returns a descriptor of its child schemas. * * This is the single source of truth for schema structure traversal. * Both `walkDataWithSchema` and `transformDataWithSchema` delegate here * instead of duplicating the exhaustive type switch. * * Throws for unsupported schema types (transform, pipe, custom, etc.). */ export declare function getSchemaChildren(schema: z.ZodType, data: unknown, path: ReferencePath): SchemaChildren; //# sourceMappingURL=schema-structure.d.ts.map