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