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