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