/* * 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 { EstimatedActivityError, EstimatedActivityError$inboundSchema, EstimatedActivityError$Outbound, EstimatedActivityError$outboundSchema, } from "./estimatedactivityerror.js"; export type MoneyTransferPushToCardError = { estimatedActivity?: EstimatedActivityError | undefined; }; /** @internal */ export const MoneyTransferPushToCardError$inboundSchema: z.ZodType< MoneyTransferPushToCardError, z.ZodTypeDef, unknown > = z.object({ estimatedActivity: EstimatedActivityError$inboundSchema.optional(), }); /** @internal */ export type MoneyTransferPushToCardError$Outbound = { estimatedActivity?: EstimatedActivityError$Outbound | undefined; }; /** @internal */ export const MoneyTransferPushToCardError$outboundSchema: z.ZodType< MoneyTransferPushToCardError$Outbound, z.ZodTypeDef, MoneyTransferPushToCardError > = z.object({ estimatedActivity: EstimatedActivityError$outboundSchema.optional(), }); export function moneyTransferPushToCardErrorToJSON( moneyTransferPushToCardError: MoneyTransferPushToCardError, ): string { return JSON.stringify( MoneyTransferPushToCardError$outboundSchema.parse( moneyTransferPushToCardError, ), ); } export function moneyTransferPushToCardErrorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MoneyTransferPushToCardError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MoneyTransferPushToCardError' from JSON`, ); }