/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Request to simulate the rejection of a wire deposit */ export type ForceRejectWireDepositRequestCreate = { /** * The name of the wire deposit to force a rejection on */ name: string; /** * The reason for the reject */ reason?: string | undefined; }; /** @internal */ export const ForceRejectWireDepositRequestCreate$inboundSchema: z.ZodType< ForceRejectWireDepositRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), reason: z.string().optional(), }); /** @internal */ export type ForceRejectWireDepositRequestCreate$Outbound = { name: string; reason?: string | undefined; }; /** @internal */ export const ForceRejectWireDepositRequestCreate$outboundSchema: z.ZodType< ForceRejectWireDepositRequestCreate$Outbound, z.ZodTypeDef, ForceRejectWireDepositRequestCreate > = z.object({ name: z.string(), reason: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ForceRejectWireDepositRequestCreate$ { /** @deprecated use `ForceRejectWireDepositRequestCreate$inboundSchema` instead. */ export const inboundSchema = ForceRejectWireDepositRequestCreate$inboundSchema; /** @deprecated use `ForceRejectWireDepositRequestCreate$outboundSchema` instead. */ export const outboundSchema = ForceRejectWireDepositRequestCreate$outboundSchema; /** @deprecated use `ForceRejectWireDepositRequestCreate$Outbound` instead. */ export type Outbound = ForceRejectWireDepositRequestCreate$Outbound; } export function forceRejectWireDepositRequestCreateToJSON( forceRejectWireDepositRequestCreate: ForceRejectWireDepositRequestCreate, ): string { return JSON.stringify( ForceRejectWireDepositRequestCreate$outboundSchema.parse( forceRejectWireDepositRequestCreate, ), ); } export function forceRejectWireDepositRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ForceRejectWireDepositRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ForceRejectWireDepositRequestCreate' from JSON`, ); }