/* * 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 WireDepositsGetWireDepositRequest = { /** * The account id. */ accountId: string; /** * The wireDeposit id. */ wireDepositId: string; }; export type WireDepositsGetWireDepositResponse = { httpMeta: components.HTTPMetadata; /** * OK */ wireDeposit?: components.WireDeposit | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. */ status?: components.Status | undefined; }; /** @internal */ export const WireDepositsGetWireDepositRequest$inboundSchema: z.ZodType< WireDepositsGetWireDepositRequest, z.ZodTypeDef, unknown > = z.object({ account_id: z.string(), wireDeposit_id: z.string(), }).transform((v) => { return remap$(v, { "account_id": "accountId", "wireDeposit_id": "wireDepositId", }); }); /** @internal */ export type WireDepositsGetWireDepositRequest$Outbound = { account_id: string; wireDeposit_id: string; }; /** @internal */ export const WireDepositsGetWireDepositRequest$outboundSchema: z.ZodType< WireDepositsGetWireDepositRequest$Outbound, z.ZodTypeDef, WireDepositsGetWireDepositRequest > = z.object({ accountId: z.string(), wireDepositId: z.string(), }).transform((v) => { return remap$(v, { accountId: "account_id", wireDepositId: "wireDeposit_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WireDepositsGetWireDepositRequest$ { /** @deprecated use `WireDepositsGetWireDepositRequest$inboundSchema` instead. */ export const inboundSchema = WireDepositsGetWireDepositRequest$inboundSchema; /** @deprecated use `WireDepositsGetWireDepositRequest$outboundSchema` instead. */ export const outboundSchema = WireDepositsGetWireDepositRequest$outboundSchema; /** @deprecated use `WireDepositsGetWireDepositRequest$Outbound` instead. */ export type Outbound = WireDepositsGetWireDepositRequest$Outbound; } export function wireDepositsGetWireDepositRequestToJSON( wireDepositsGetWireDepositRequest: WireDepositsGetWireDepositRequest, ): string { return JSON.stringify( WireDepositsGetWireDepositRequest$outboundSchema.parse( wireDepositsGetWireDepositRequest, ), ); } export function wireDepositsGetWireDepositRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WireDepositsGetWireDepositRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WireDepositsGetWireDepositRequest' from JSON`, ); } /** @internal */ export const WireDepositsGetWireDepositResponse$inboundSchema: z.ZodType< WireDepositsGetWireDepositResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, WireDeposit: components.WireDeposit$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "WireDeposit": "wireDeposit", "Status": "status", }); }); /** @internal */ export type WireDepositsGetWireDepositResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; WireDeposit?: components.WireDeposit$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const WireDepositsGetWireDepositResponse$outboundSchema: z.ZodType< WireDepositsGetWireDepositResponse$Outbound, z.ZodTypeDef, WireDepositsGetWireDepositResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, wireDeposit: components.WireDeposit$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", wireDeposit: "WireDeposit", 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 WireDepositsGetWireDepositResponse$ { /** @deprecated use `WireDepositsGetWireDepositResponse$inboundSchema` instead. */ export const inboundSchema = WireDepositsGetWireDepositResponse$inboundSchema; /** @deprecated use `WireDepositsGetWireDepositResponse$outboundSchema` instead. */ export const outboundSchema = WireDepositsGetWireDepositResponse$outboundSchema; /** @deprecated use `WireDepositsGetWireDepositResponse$Outbound` instead. */ export type Outbound = WireDepositsGetWireDepositResponse$Outbound; } export function wireDepositsGetWireDepositResponseToJSON( wireDepositsGetWireDepositResponse: WireDepositsGetWireDepositResponse, ): string { return JSON.stringify( WireDepositsGetWireDepositResponse$outboundSchema.parse( wireDepositsGetWireDepositResponse, ), ); } export function wireDepositsGetWireDepositResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => WireDepositsGetWireDepositResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WireDepositsGetWireDepositResponse' from JSON`, ); }