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