/* * 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 an ICT withdrawal */ export type ForceRejectIctWithdrawalRequestCreate = { /** * Full name of the ICT withdrawal resource to force a rejection on. Contains account id and ICT withdrawal id. */ name: string; /** * Reason why the ICT withdrawal is being rejected */ reason?: string | undefined; }; /** @internal */ export const ForceRejectIctWithdrawalRequestCreate$inboundSchema: z.ZodType< ForceRejectIctWithdrawalRequestCreate, z.ZodTypeDef, unknown > = z.object({ name: z.string(), reason: z.string().optional(), }); /** @internal */ export type ForceRejectIctWithdrawalRequestCreate$Outbound = { name: string; reason?: string | undefined; }; /** @internal */ export const ForceRejectIctWithdrawalRequestCreate$outboundSchema: z.ZodType< ForceRejectIctWithdrawalRequestCreate$Outbound, z.ZodTypeDef, ForceRejectIctWithdrawalRequestCreate > = 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 ForceRejectIctWithdrawalRequestCreate$ { /** @deprecated use `ForceRejectIctWithdrawalRequestCreate$inboundSchema` instead. */ export const inboundSchema = ForceRejectIctWithdrawalRequestCreate$inboundSchema; /** @deprecated use `ForceRejectIctWithdrawalRequestCreate$outboundSchema` instead. */ export const outboundSchema = ForceRejectIctWithdrawalRequestCreate$outboundSchema; /** @deprecated use `ForceRejectIctWithdrawalRequestCreate$Outbound` instead. */ export type Outbound = ForceRejectIctWithdrawalRequestCreate$Outbound; } export function forceRejectIctWithdrawalRequestCreateToJSON( forceRejectIctWithdrawalRequestCreate: ForceRejectIctWithdrawalRequestCreate, ): string { return JSON.stringify( ForceRejectIctWithdrawalRequestCreate$outboundSchema.parse( forceRejectIctWithdrawalRequestCreate, ), ); } export function forceRejectIctWithdrawalRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ForceRejectIctWithdrawalRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ForceRejectIctWithdrawalRequestCreate' from JSON`, ); }