/* * 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 AlternativeOrdersRetrievePendingInvestorActionsRequest = { /** * The account id. */ accountId: string; /** * The alternativeOrder id. */ alternativeOrderId: string; }; export type AlternativeOrdersRetrievePendingInvestorActionsResponse = { httpMeta: components.HTTPMetadata; /** * OK */ retrievePendingInvestorActionsResponse?: | components.RetrievePendingInvestorActionsResponse | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. */ status?: components.Status | undefined; }; /** @internal */ export const AlternativeOrdersRetrievePendingInvestorActionsRequest$inboundSchema: z.ZodType< AlternativeOrdersRetrievePendingInvestorActionsRequest, z.ZodTypeDef, unknown > = z.object({ account_id: z.string(), alternativeOrder_id: z.string(), }).transform((v) => { return remap$(v, { "account_id": "accountId", "alternativeOrder_id": "alternativeOrderId", }); }); /** @internal */ export type AlternativeOrdersRetrievePendingInvestorActionsRequest$Outbound = { account_id: string; alternativeOrder_id: string; }; /** @internal */ export const AlternativeOrdersRetrievePendingInvestorActionsRequest$outboundSchema: z.ZodType< AlternativeOrdersRetrievePendingInvestorActionsRequest$Outbound, z.ZodTypeDef, AlternativeOrdersRetrievePendingInvestorActionsRequest > = z.object({ accountId: z.string(), alternativeOrderId: z.string(), }).transform((v) => { return remap$(v, { accountId: "account_id", alternativeOrderId: "alternativeOrder_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeOrdersRetrievePendingInvestorActionsRequest$ { /** @deprecated use `AlternativeOrdersRetrievePendingInvestorActionsRequest$inboundSchema` instead. */ export const inboundSchema = AlternativeOrdersRetrievePendingInvestorActionsRequest$inboundSchema; /** @deprecated use `AlternativeOrdersRetrievePendingInvestorActionsRequest$outboundSchema` instead. */ export const outboundSchema = AlternativeOrdersRetrievePendingInvestorActionsRequest$outboundSchema; /** @deprecated use `AlternativeOrdersRetrievePendingInvestorActionsRequest$Outbound` instead. */ export type Outbound = AlternativeOrdersRetrievePendingInvestorActionsRequest$Outbound; } export function alternativeOrdersRetrievePendingInvestorActionsRequestToJSON( alternativeOrdersRetrievePendingInvestorActionsRequest: AlternativeOrdersRetrievePendingInvestorActionsRequest, ): string { return JSON.stringify( AlternativeOrdersRetrievePendingInvestorActionsRequest$outboundSchema.parse( alternativeOrdersRetrievePendingInvestorActionsRequest, ), ); } export function alternativeOrdersRetrievePendingInvestorActionsRequestFromJSON( jsonString: string, ): SafeParseResult< AlternativeOrdersRetrievePendingInvestorActionsRequest, SDKValidationError > { return safeParse( jsonString, (x) => AlternativeOrdersRetrievePendingInvestorActionsRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'AlternativeOrdersRetrievePendingInvestorActionsRequest' from JSON`, ); } /** @internal */ export const AlternativeOrdersRetrievePendingInvestorActionsResponse$inboundSchema: z.ZodType< AlternativeOrdersRetrievePendingInvestorActionsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, RetrievePendingInvestorActionsResponse: components .RetrievePendingInvestorActionsResponse$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "RetrievePendingInvestorActionsResponse": "retrievePendingInvestorActionsResponse", "Status": "status", }); }); /** @internal */ export type AlternativeOrdersRetrievePendingInvestorActionsResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; RetrievePendingInvestorActionsResponse?: | components.RetrievePendingInvestorActionsResponse$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const AlternativeOrdersRetrievePendingInvestorActionsResponse$outboundSchema: z.ZodType< AlternativeOrdersRetrievePendingInvestorActionsResponse$Outbound, z.ZodTypeDef, AlternativeOrdersRetrievePendingInvestorActionsResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, retrievePendingInvestorActionsResponse: components .RetrievePendingInvestorActionsResponse$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", retrievePendingInvestorActionsResponse: "RetrievePendingInvestorActionsResponse", 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 AlternativeOrdersRetrievePendingInvestorActionsResponse$ { /** @deprecated use `AlternativeOrdersRetrievePendingInvestorActionsResponse$inboundSchema` instead. */ export const inboundSchema = AlternativeOrdersRetrievePendingInvestorActionsResponse$inboundSchema; /** @deprecated use `AlternativeOrdersRetrievePendingInvestorActionsResponse$outboundSchema` instead. */ export const outboundSchema = AlternativeOrdersRetrievePendingInvestorActionsResponse$outboundSchema; /** @deprecated use `AlternativeOrdersRetrievePendingInvestorActionsResponse$Outbound` instead. */ export type Outbound = AlternativeOrdersRetrievePendingInvestorActionsResponse$Outbound; } export function alternativeOrdersRetrievePendingInvestorActionsResponseToJSON( alternativeOrdersRetrievePendingInvestorActionsResponse: AlternativeOrdersRetrievePendingInvestorActionsResponse, ): string { return JSON.stringify( AlternativeOrdersRetrievePendingInvestorActionsResponse$outboundSchema .parse(alternativeOrdersRetrievePendingInvestorActionsResponse), ); } export function alternativeOrdersRetrievePendingInvestorActionsResponseFromJSON( jsonString: string, ): SafeParseResult< AlternativeOrdersRetrievePendingInvestorActionsResponse, SDKValidationError > { return safeParse( jsonString, (x) => AlternativeOrdersRetrievePendingInvestorActionsResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'AlternativeOrdersRetrievePendingInvestorActionsResponse' from JSON`, ); }