/* * 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 AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest = { /** * The asset id. */ assetId: string; /** * The maximum number of orders to return. - Max value = 100 - Values above 100 will be coerced to 100. - If the specified value is greater than the number of orders, the service will return fewer than the specified value. - If unspecified, at most 100 orders will be returned. */ pageSize?: number | undefined; /** * For pagination, provide the page token, received from a previous `ListInvestmentDocuments` call, to retrieve the subsequent page. All other parameters provided to `ListInvestmentDocuments` must match the request that provided the page token. */ pageToken?: string | undefined; /** * A CEL string to filter results. All fields from the response can be used as filters. * * @remarks * * See the [CEL Search](https://developer.apexclearing.com/apex-fintech-solutions/docs/cel-search) guide for syntax details and examples. */ filter?: string | undefined; }; export type AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse = { httpMeta: components.HTTPMetadata; /** * OK */ listAlternativeInvestmentDocumentsResponse?: | components.ListAlternativeInvestmentDocumentsResponse | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. */ status?: components.Status | undefined; }; /** @internal */ export const AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$inboundSchema: z.ZodType< AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest, z.ZodTypeDef, unknown > = z.object({ asset_id: z.string(), page_size: z.number().int().optional(), page_token: z.string().optional(), filter: z.string().optional(), }).transform((v) => { return remap$(v, { "asset_id": "assetId", "page_size": "pageSize", "page_token": "pageToken", }); }); /** @internal */ export type AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$Outbound = { asset_id: string; page_size?: number | undefined; page_token?: string | undefined; filter?: string | undefined; }; /** @internal */ export const AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$outboundSchema: z.ZodType< AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$Outbound, z.ZodTypeDef, AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest > = z.object({ assetId: z.string(), pageSize: z.number().int().optional(), pageToken: z.string().optional(), filter: z.string().optional(), }).transform((v) => { return remap$(v, { assetId: "asset_id", pageSize: "page_size", pageToken: "page_token", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$ { /** @deprecated use `AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$inboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$outboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$Outbound` instead. */ export type Outbound = AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$Outbound; } export function alternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequestToJSON( alternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest: AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest, ): string { return JSON.stringify( AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$outboundSchema .parse( alternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest, ), ); } export function alternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequestFromJSON( jsonString: string, ): SafeParseResult< AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest, SDKValidationError > { return safeParse( jsonString, (x) => AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsRequest' from JSON`, ); } /** @internal */ export const AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$inboundSchema: z.ZodType< AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, ListAlternativeInvestmentDocumentsResponse: components .ListAlternativeInvestmentDocumentsResponse$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "ListAlternativeInvestmentDocumentsResponse": "listAlternativeInvestmentDocumentsResponse", "Status": "status", }); }); /** @internal */ export type AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; ListAlternativeInvestmentDocumentsResponse?: | components.ListAlternativeInvestmentDocumentsResponse$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$outboundSchema: z.ZodType< AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$Outbound, z.ZodTypeDef, AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, listAlternativeInvestmentDocumentsResponse: components .ListAlternativeInvestmentDocumentsResponse$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", listAlternativeInvestmentDocumentsResponse: "ListAlternativeInvestmentDocumentsResponse", 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 AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$ { /** @deprecated use `AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$inboundSchema` instead. */ export const inboundSchema = AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$inboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$outboundSchema` instead. */ export const outboundSchema = AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$outboundSchema; /** @deprecated use `AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$Outbound` instead. */ export type Outbound = AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$Outbound; } export function alternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponseToJSON( alternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse: AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse, ): string { return JSON.stringify( AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$outboundSchema .parse( alternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse, ), ); } export function alternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponseFromJSON( jsonString: string, ): SafeParseResult< AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse, SDKValidationError > { return safeParse( jsonString, (x) => AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'AlternativeInvestmentDocumentsListAlternativeInvestmentDocumentsResponse' from JSON`, ); }