/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IctWithdrawalsForceRejectIctWithdrawalRequest = { /** * The account id. */ accountId: string; /** * The ictWithdrawal id. */ ictWithdrawalId: string; forceRejectIctWithdrawalRequestCreate: components.ForceRejectIctWithdrawalRequestCreate; }; export type IctWithdrawalsForceRejectIctWithdrawalResponse = { httpMeta: components.HTTPMetadata; /** * OK */ ictWithdrawal?: components.IctWithdrawal | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. */ status?: components.Status | undefined; }; /** @internal */ export const IctWithdrawalsForceRejectIctWithdrawalRequest$inboundSchema: z.ZodType< IctWithdrawalsForceRejectIctWithdrawalRequest, z.ZodTypeDef, unknown > = z.object({ account_id: z.string(), ictWithdrawal_id: z.string(), ForceRejectIctWithdrawalRequestCreate: components.ForceRejectIctWithdrawalRequestCreate$inboundSchema, }).transform((v) => { return remap$(v, { "account_id": "accountId", "ictWithdrawal_id": "ictWithdrawalId", "ForceRejectIctWithdrawalRequestCreate": "forceRejectIctWithdrawalRequestCreate", }); }); /** @internal */ export type IctWithdrawalsForceRejectIctWithdrawalRequest$Outbound = { account_id: string; ictWithdrawal_id: string; ForceRejectIctWithdrawalRequestCreate: components.ForceRejectIctWithdrawalRequestCreate$Outbound; }; /** @internal */ export const IctWithdrawalsForceRejectIctWithdrawalRequest$outboundSchema: z.ZodType< IctWithdrawalsForceRejectIctWithdrawalRequest$Outbound, z.ZodTypeDef, IctWithdrawalsForceRejectIctWithdrawalRequest > = z.object({ accountId: z.string(), ictWithdrawalId: z.string(), forceRejectIctWithdrawalRequestCreate: components.ForceRejectIctWithdrawalRequestCreate$outboundSchema, }).transform((v) => { return remap$(v, { accountId: "account_id", ictWithdrawalId: "ictWithdrawal_id", forceRejectIctWithdrawalRequestCreate: "ForceRejectIctWithdrawalRequestCreate", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IctWithdrawalsForceRejectIctWithdrawalRequest$ { /** @deprecated use `IctWithdrawalsForceRejectIctWithdrawalRequest$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalsForceRejectIctWithdrawalRequest$inboundSchema; /** @deprecated use `IctWithdrawalsForceRejectIctWithdrawalRequest$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalsForceRejectIctWithdrawalRequest$outboundSchema; /** @deprecated use `IctWithdrawalsForceRejectIctWithdrawalRequest$Outbound` instead. */ export type Outbound = IctWithdrawalsForceRejectIctWithdrawalRequest$Outbound; } export function ictWithdrawalsForceRejectIctWithdrawalRequestToJSON( ictWithdrawalsForceRejectIctWithdrawalRequest: IctWithdrawalsForceRejectIctWithdrawalRequest, ): string { return JSON.stringify( IctWithdrawalsForceRejectIctWithdrawalRequest$outboundSchema.parse( ictWithdrawalsForceRejectIctWithdrawalRequest, ), ); } export function ictWithdrawalsForceRejectIctWithdrawalRequestFromJSON( jsonString: string, ): SafeParseResult< IctWithdrawalsForceRejectIctWithdrawalRequest, SDKValidationError > { return safeParse( jsonString, (x) => IctWithdrawalsForceRejectIctWithdrawalRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IctWithdrawalsForceRejectIctWithdrawalRequest' from JSON`, ); } /** @internal */ export const IctWithdrawalsForceRejectIctWithdrawalResponse$inboundSchema: z.ZodType< IctWithdrawalsForceRejectIctWithdrawalResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, IctWithdrawal: components.IctWithdrawal$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "IctWithdrawal": "ictWithdrawal", "Status": "status", }); }); /** @internal */ export type IctWithdrawalsForceRejectIctWithdrawalResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; IctWithdrawal?: components.IctWithdrawal$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const IctWithdrawalsForceRejectIctWithdrawalResponse$outboundSchema: z.ZodType< IctWithdrawalsForceRejectIctWithdrawalResponse$Outbound, z.ZodTypeDef, IctWithdrawalsForceRejectIctWithdrawalResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, ictWithdrawal: components.IctWithdrawal$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", ictWithdrawal: "IctWithdrawal", status: "Status", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IctWithdrawalsForceRejectIctWithdrawalResponse$ { /** @deprecated use `IctWithdrawalsForceRejectIctWithdrawalResponse$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalsForceRejectIctWithdrawalResponse$inboundSchema; /** @deprecated use `IctWithdrawalsForceRejectIctWithdrawalResponse$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalsForceRejectIctWithdrawalResponse$outboundSchema; /** @deprecated use `IctWithdrawalsForceRejectIctWithdrawalResponse$Outbound` instead. */ export type Outbound = IctWithdrawalsForceRejectIctWithdrawalResponse$Outbound; } export function ictWithdrawalsForceRejectIctWithdrawalResponseToJSON( ictWithdrawalsForceRejectIctWithdrawalResponse: IctWithdrawalsForceRejectIctWithdrawalResponse, ): string { return JSON.stringify( IctWithdrawalsForceRejectIctWithdrawalResponse$outboundSchema.parse( ictWithdrawalsForceRejectIctWithdrawalResponse, ), ); } export function ictWithdrawalsForceRejectIctWithdrawalResponseFromJSON( jsonString: string, ): SafeParseResult< IctWithdrawalsForceRejectIctWithdrawalResponse, SDKValidationError > { return safeParse( jsonString, (x) => IctWithdrawalsForceRejectIctWithdrawalResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IctWithdrawalsForceRejectIctWithdrawalResponse' from JSON`, ); }