/* * 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"; import { PazeMobileNumber, PazeMobileNumber$inboundSchema, PazeMobileNumber$Outbound, PazeMobileNumber$outboundSchema, } from "./pazemobilenumber.js"; export type PazeDeliveryContactDetails = { /** * Consumer-provided name of the contact person. */ contactFullName: string | null; contactPhoneNumber: PazeMobileNumber | null; }; /** @internal */ export const PazeDeliveryContactDetails$inboundSchema: z.ZodType< PazeDeliveryContactDetails, z.ZodTypeDef, unknown > = z.object({ contactFullName: z.nullable(z.string()), contactPhoneNumber: z.nullable(PazeMobileNumber$inboundSchema), }); /** @internal */ export type PazeDeliveryContactDetails$Outbound = { contactFullName: string | null; contactPhoneNumber: PazeMobileNumber$Outbound | null; }; /** @internal */ export const PazeDeliveryContactDetails$outboundSchema: z.ZodType< PazeDeliveryContactDetails$Outbound, z.ZodTypeDef, PazeDeliveryContactDetails > = z.object({ contactFullName: z.nullable(z.string()), contactPhoneNumber: z.nullable(PazeMobileNumber$outboundSchema), }); export function pazeDeliveryContactDetailsToJSON( pazeDeliveryContactDetails: PazeDeliveryContactDetails, ): string { return JSON.stringify( PazeDeliveryContactDetails$outboundSchema.parse(pazeDeliveryContactDetails), ); } export function pazeDeliveryContactDetailsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PazeDeliveryContactDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PazeDeliveryContactDetails' from JSON`, ); }