/** * Shared helper utilities for Zod schema preprocessing. * * @module udp-schema/helpers */ import { z } from 'zod'; /** * Converts empty / whitespace-only strings to `undefined` * so Zod `.optional()` treats them as "not provided". */ export declare const emptyStringToUndefined: (value: unknown) => unknown; /** * Optional trimmed string with 100-char max. * Empty strings are coerced to `undefined`. */ export declare const optionalTrimmedString: z.ZodPreprocess>; /** * Optional 4-digit year (1900–2099). * Empty strings and undefined are treated as "not provided". * Accepts strings like "2020". Rejects non-digits and out-of-range values. * * Uses superRefine (not preprocess) to keep input type as `string | undefined` * for full react-hook-form compatibility. */ export declare const optionalYearSchema: z.ZodOptional; /** * Optional phone number — digits only, 7–15 characters. * Accepts an optional leading + for country code (e.g. +919876543210). * Empty strings and undefined are treated as "not provided". * * Uses superRefine (not preprocess) to keep input type as `string | undefined` * for full react-hook-form compatibility. */ export declare const optionalPhoneSchema: z.ZodOptional; //# sourceMappingURL=zod-helpers.d.ts.map