/* * 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 { PreIpoCompanyResearchDocument, PreIpoCompanyResearchDocument$inboundSchema, PreIpoCompanyResearchDocument$Outbound, PreIpoCompanyResearchDocument$outboundSchema, } from "./preipocompanyresearchdocument.js"; /** * Response for listing Pre IPO Company Research Documents. */ export type ListPreIpoCompanyResearchDocumentsResponse = { /** * A token to retrieve the next page of results. Pass this value in the `page_token` field of a subsequent `ListPreIpoCompanyResearchDocumentsRequest` to retrieve the next page of results. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | undefined; /** * The Pre IPO Company Research Documents. */ preIpoCompanyResearchDocuments?: | Array | undefined; }; /** @internal */ export const ListPreIpoCompanyResearchDocumentsResponse$inboundSchema: z.ZodType = z.object({ next_page_token: z.string().optional(), pre_ipo_company_research_documents: z.array( PreIpoCompanyResearchDocument$inboundSchema, ).optional(), }).transform((v) => { return remap$(v, { "next_page_token": "nextPageToken", "pre_ipo_company_research_documents": "preIpoCompanyResearchDocuments", }); }); /** @internal */ export type ListPreIpoCompanyResearchDocumentsResponse$Outbound = { next_page_token?: string | undefined; pre_ipo_company_research_documents?: | Array | undefined; }; /** @internal */ export const ListPreIpoCompanyResearchDocumentsResponse$outboundSchema: z.ZodType< ListPreIpoCompanyResearchDocumentsResponse$Outbound, z.ZodTypeDef, ListPreIpoCompanyResearchDocumentsResponse > = z.object({ nextPageToken: z.string().optional(), preIpoCompanyResearchDocuments: z.array( PreIpoCompanyResearchDocument$outboundSchema, ).optional(), }).transform((v) => { return remap$(v, { nextPageToken: "next_page_token", preIpoCompanyResearchDocuments: "pre_ipo_company_research_documents", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPreIpoCompanyResearchDocumentsResponse$ { /** @deprecated use `ListPreIpoCompanyResearchDocumentsResponse$inboundSchema` instead. */ export const inboundSchema = ListPreIpoCompanyResearchDocumentsResponse$inboundSchema; /** @deprecated use `ListPreIpoCompanyResearchDocumentsResponse$outboundSchema` instead. */ export const outboundSchema = ListPreIpoCompanyResearchDocumentsResponse$outboundSchema; /** @deprecated use `ListPreIpoCompanyResearchDocumentsResponse$Outbound` instead. */ export type Outbound = ListPreIpoCompanyResearchDocumentsResponse$Outbound; } export function listPreIpoCompanyResearchDocumentsResponseToJSON( listPreIpoCompanyResearchDocumentsResponse: ListPreIpoCompanyResearchDocumentsResponse, ): string { return JSON.stringify( ListPreIpoCompanyResearchDocumentsResponse$outboundSchema.parse( listPreIpoCompanyResearchDocumentsResponse, ), ); } export function listPreIpoCompanyResearchDocumentsResponseFromJSON( jsonString: string, ): SafeParseResult< ListPreIpoCompanyResearchDocumentsResponse, SDKValidationError > { return safeParse( jsonString, (x) => ListPreIpoCompanyResearchDocumentsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'ListPreIpoCompanyResearchDocumentsResponse' from JSON`, ); }