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