/* * 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 PazeMobileNumber = { /** * ITU country dialing code. */ countryCode: string; /** * Phone number without country code. */ phoneNumber: string; }; /** @internal */ export const PazeMobileNumber$inboundSchema: z.ZodType< PazeMobileNumber, z.ZodTypeDef, unknown > = z.object({ countryCode: z.string(), phoneNumber: z.string(), }); /** @internal */ export type PazeMobileNumber$Outbound = { countryCode: string; phoneNumber: string; }; /** @internal */ export const PazeMobileNumber$outboundSchema: z.ZodType< PazeMobileNumber$Outbound, z.ZodTypeDef, PazeMobileNumber > = z.object({ countryCode: z.string(), phoneNumber: z.string(), }); export function pazeMobileNumberToJSON( pazeMobileNumber: PazeMobileNumber, ): string { return JSON.stringify( PazeMobileNumber$outboundSchema.parse(pazeMobileNumber), ); } export function pazeMobileNumberFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PazeMobileNumber$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PazeMobileNumber' from JSON`, ); }