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