/* * 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 TransferAccount = { accountID: string; email: string; displayName: string; }; /** @internal */ export const TransferAccount$inboundSchema: z.ZodType< TransferAccount, z.ZodTypeDef, unknown > = z.object({ accountID: z.string(), email: z.string(), displayName: z.string(), }); /** @internal */ export type TransferAccount$Outbound = { accountID: string; email: string; displayName: string; }; /** @internal */ export const TransferAccount$outboundSchema: z.ZodType< TransferAccount$Outbound, z.ZodTypeDef, TransferAccount > = z.object({ accountID: z.string(), email: z.string(), displayName: z.string(), }); export function transferAccountToJSON( transferAccount: TransferAccount, ): string { return JSON.stringify(TransferAccount$outboundSchema.parse(transferAccount)); } export function transferAccountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TransferAccount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransferAccount' from JSON`, ); }