/* * 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 IctWithdrawalsGetIctWithdrawalRequest = { /** * The account id. */ accountId: string; /** * The ictWithdrawal id. */ ictWithdrawalId: string; }; export type IctWithdrawalsGetIctWithdrawalResponse = { httpMeta: components.HTTPMetadata; /** * OK */ ictWithdrawal?: components.IctWithdrawal | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. */ status?: components.Status | undefined; }; /** @internal */ export const IctWithdrawalsGetIctWithdrawalRequest$inboundSchema: z.ZodType< IctWithdrawalsGetIctWithdrawalRequest, z.ZodTypeDef, unknown > = z.object({ account_id: z.string(), ictWithdrawal_id: z.string(), }).transform((v) => { return remap$(v, { "account_id": "accountId", "ictWithdrawal_id": "ictWithdrawalId", }); }); /** @internal */ export type IctWithdrawalsGetIctWithdrawalRequest$Outbound = { account_id: string; ictWithdrawal_id: string; }; /** @internal */ export const IctWithdrawalsGetIctWithdrawalRequest$outboundSchema: z.ZodType< IctWithdrawalsGetIctWithdrawalRequest$Outbound, z.ZodTypeDef, IctWithdrawalsGetIctWithdrawalRequest > = z.object({ accountId: z.string(), ictWithdrawalId: z.string(), }).transform((v) => { return remap$(v, { accountId: "account_id", ictWithdrawalId: "ictWithdrawal_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IctWithdrawalsGetIctWithdrawalRequest$ { /** @deprecated use `IctWithdrawalsGetIctWithdrawalRequest$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalsGetIctWithdrawalRequest$inboundSchema; /** @deprecated use `IctWithdrawalsGetIctWithdrawalRequest$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalsGetIctWithdrawalRequest$outboundSchema; /** @deprecated use `IctWithdrawalsGetIctWithdrawalRequest$Outbound` instead. */ export type Outbound = IctWithdrawalsGetIctWithdrawalRequest$Outbound; } export function ictWithdrawalsGetIctWithdrawalRequestToJSON( ictWithdrawalsGetIctWithdrawalRequest: IctWithdrawalsGetIctWithdrawalRequest, ): string { return JSON.stringify( IctWithdrawalsGetIctWithdrawalRequest$outboundSchema.parse( ictWithdrawalsGetIctWithdrawalRequest, ), ); } export function ictWithdrawalsGetIctWithdrawalRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalsGetIctWithdrawalRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalsGetIctWithdrawalRequest' from JSON`, ); } /** @internal */ export const IctWithdrawalsGetIctWithdrawalResponse$inboundSchema: z.ZodType< IctWithdrawalsGetIctWithdrawalResponse, 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 IctWithdrawalsGetIctWithdrawalResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; IctWithdrawal?: components.IctWithdrawal$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const IctWithdrawalsGetIctWithdrawalResponse$outboundSchema: z.ZodType< IctWithdrawalsGetIctWithdrawalResponse$Outbound, z.ZodTypeDef, IctWithdrawalsGetIctWithdrawalResponse > = 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 IctWithdrawalsGetIctWithdrawalResponse$ { /** @deprecated use `IctWithdrawalsGetIctWithdrawalResponse$inboundSchema` instead. */ export const inboundSchema = IctWithdrawalsGetIctWithdrawalResponse$inboundSchema; /** @deprecated use `IctWithdrawalsGetIctWithdrawalResponse$outboundSchema` instead. */ export const outboundSchema = IctWithdrawalsGetIctWithdrawalResponse$outboundSchema; /** @deprecated use `IctWithdrawalsGetIctWithdrawalResponse$Outbound` instead. */ export type Outbound = IctWithdrawalsGetIctWithdrawalResponse$Outbound; } export function ictWithdrawalsGetIctWithdrawalResponseToJSON( ictWithdrawalsGetIctWithdrawalResponse: IctWithdrawalsGetIctWithdrawalResponse, ): string { return JSON.stringify( IctWithdrawalsGetIctWithdrawalResponse$outboundSchema.parse( ictWithdrawalsGetIctWithdrawalResponse, ), ); } export function ictWithdrawalsGetIctWithdrawalResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => IctWithdrawalsGetIctWithdrawalResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IctWithdrawalsGetIctWithdrawalResponse' from JSON`, ); }