/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type BirthDateValidationError = { day?: string | undefined; month?: string | undefined; year?: string | undefined; }; /** @internal */ export const BirthDateValidationError$inboundSchema: z.ZodType< BirthDateValidationError, z.ZodTypeDef, unknown > = z.object({ day: z.string().optional(), month: z.string().optional(), year: z.string().optional(), }); /** @internal */ export type BirthDateValidationError$Outbound = { day?: string | undefined; month?: string | undefined; year?: string | undefined; }; /** @internal */ export const BirthDateValidationError$outboundSchema: z.ZodType< BirthDateValidationError$Outbound, z.ZodTypeDef, BirthDateValidationError > = z.object({ day: z.string().optional(), month: z.string().optional(), year: z.string().optional(), }); export function birthDateValidationErrorToJSON( birthDateValidationError: BirthDateValidationError, ): string { return JSON.stringify( BirthDateValidationError$outboundSchema.parse(birthDateValidationError), ); } export function birthDateValidationErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BirthDateValidationError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BirthDateValidationError' from JSON`, ); }