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