/* * 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 BirthDateUpdate = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export const BirthDateUpdate$inboundSchema: z.ZodType< BirthDateUpdate, z.ZodTypeDef, unknown > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); /** @internal */ export type BirthDateUpdate$Outbound = { day?: number | undefined; month?: number | undefined; year?: number | undefined; }; /** @internal */ export const BirthDateUpdate$outboundSchema: z.ZodType< BirthDateUpdate$Outbound, z.ZodTypeDef, BirthDateUpdate > = z.object({ day: z.number().int().optional(), month: z.number().int().optional(), year: z.number().int().optional(), }); export function birthDateUpdateToJSON( birthDateUpdate: BirthDateUpdate, ): string { return JSON.stringify(BirthDateUpdate$outboundSchema.parse(birthDateUpdate)); } export function birthDateUpdateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => BirthDateUpdate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BirthDateUpdate' from JSON`, ); }