/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AlternativeInvestmentDocument, AlternativeInvestmentDocument$inboundSchema, AlternativeInvestmentDocument$Outbound, AlternativeInvestmentDocument$outboundSchema, } from "./alternativeinvestmentdocument.js"; /** * Response to list alternative investment documents. */ export type ListAlternativeInvestmentDocumentsResponse = { /** * The array of investment documents for the asset. */ alternativeInvestmentDocuments?: | Array | undefined; /** * A token that can be sent as the `page_token` query param value to retrieve the next page, when pagination is needed. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | undefined; }; /** @internal */ export const ListAlternativeInvestmentDocumentsResponse$inboundSchema: z.ZodType = z.object({ alternative_investment_documents: z.array( AlternativeInvestmentDocument$inboundSchema, ).optional(), next_page_token: z.string().optional(), }).transform((v) => { return remap$(v, { "alternative_investment_documents": "alternativeInvestmentDocuments", "next_page_token": "nextPageToken", }); }); /** @internal */ export type ListAlternativeInvestmentDocumentsResponse$Outbound = { alternative_investment_documents?: | Array | undefined; next_page_token?: string | undefined; }; /** @internal */ export const ListAlternativeInvestmentDocumentsResponse$outboundSchema: z.ZodType< ListAlternativeInvestmentDocumentsResponse$Outbound, z.ZodTypeDef, ListAlternativeInvestmentDocumentsResponse > = z.object({ alternativeInvestmentDocuments: z.array( AlternativeInvestmentDocument$outboundSchema, ).optional(), nextPageToken: z.string().optional(), }).transform((v) => { return remap$(v, { alternativeInvestmentDocuments: "alternative_investment_documents", nextPageToken: "next_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 ListAlternativeInvestmentDocumentsResponse$ { /** @deprecated use `ListAlternativeInvestmentDocumentsResponse$inboundSchema` instead. */ export const inboundSchema = ListAlternativeInvestmentDocumentsResponse$inboundSchema; /** @deprecated use `ListAlternativeInvestmentDocumentsResponse$outboundSchema` instead. */ export const outboundSchema = ListAlternativeInvestmentDocumentsResponse$outboundSchema; /** @deprecated use `ListAlternativeInvestmentDocumentsResponse$Outbound` instead. */ export type Outbound = ListAlternativeInvestmentDocumentsResponse$Outbound; } export function listAlternativeInvestmentDocumentsResponseToJSON( listAlternativeInvestmentDocumentsResponse: ListAlternativeInvestmentDocumentsResponse, ): string { return JSON.stringify( ListAlternativeInvestmentDocumentsResponse$outboundSchema.parse( listAlternativeInvestmentDocumentsResponse, ), ); } export function listAlternativeInvestmentDocumentsResponseFromJSON( jsonString: string, ): SafeParseResult< ListAlternativeInvestmentDocumentsResponse, SDKValidationError > { return safeParse( jsonString, (x) => ListAlternativeInvestmentDocumentsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'ListAlternativeInvestmentDocumentsResponse' from JSON`, ); }