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