/* * 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 PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest = { /** * The preIpoCompany id. */ preIpoCompanyId: string; /** * The maximum number of Pre IPO Company Research Documents to return. The service may return fewer than this value. If unspecified, at most 100 Pre IPO Company Research Documents will be returned. The maximum value is 100; values above 100 will be coerced to 100. */ pageSize?: number | undefined; /** * A page token, received from a previous `ListPreIpoCompanyResearchDocumentsRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPreIpoCompanyResearchDocumentsRequest` must match the call that provided the page token. */ pageToken?: string | undefined; /** * A CEL string to filter results. Filterable fields: * * @remarks * - type * - relation * Only `&&` and `==` operators are allowed. * See the [CEL Search](https://developer.apexclearing.com/apex-fintech-solutions/docs/cel-search) * page in Guides for more information; */ filter?: string | undefined; }; export type PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse = { httpMeta: components.HTTPMetadata; /** * OK */ listPreIpoCompanyResearchDocumentsResponse?: | components.ListPreIpoCompanyResearchDocumentsResponse | undefined; /** * INVALID_ARGUMENT: The request has an invalid argument. */ status?: components.Status | undefined; }; /** @internal */ export const PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$inboundSchema: z.ZodType< PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest, z.ZodTypeDef, unknown > = z.object({ preIpoCompany_id: z.string(), page_size: z.number().int().optional(), page_token: z.string().optional(), filter: z.string().optional(), }).transform((v) => { return remap$(v, { "preIpoCompany_id": "preIpoCompanyId", "page_size": "pageSize", "page_token": "pageToken", }); }); /** @internal */ export type PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$Outbound = { preIpoCompany_id: string; page_size?: number | undefined; page_token?: string | undefined; filter?: string | undefined; }; /** @internal */ export const PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$outboundSchema: z.ZodType< PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$Outbound, z.ZodTypeDef, PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest > = z.object({ preIpoCompanyId: z.string(), pageSize: z.number().int().optional(), pageToken: z.string().optional(), filter: z.string().optional(), }).transform((v) => { return remap$(v, { preIpoCompanyId: "preIpoCompany_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 PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$ { /** @deprecated use `PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$inboundSchema` instead. */ export const inboundSchema = PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$inboundSchema; /** @deprecated use `PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$outboundSchema` instead. */ export const outboundSchema = PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$outboundSchema; /** @deprecated use `PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$Outbound` instead. */ export type Outbound = PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$Outbound; } export function preIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequestToJSON( preIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest: PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest, ): string { return JSON.stringify( PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$outboundSchema .parse( preIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest, ), ); } export function preIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequestFromJSON( jsonString: string, ): SafeParseResult< PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest, SDKValidationError > { return safeParse( jsonString, (x) => PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsRequest' from JSON`, ); } /** @internal */ export const PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$inboundSchema: z.ZodType< PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, ListPreIpoCompanyResearchDocumentsResponse: components .ListPreIpoCompanyResearchDocumentsResponse$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "ListPreIpoCompanyResearchDocumentsResponse": "listPreIpoCompanyResearchDocumentsResponse", "Status": "status", }); }); /** @internal */ export type PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; ListPreIpoCompanyResearchDocumentsResponse?: | components.ListPreIpoCompanyResearchDocumentsResponse$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$outboundSchema: z.ZodType< PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$Outbound, z.ZodTypeDef, PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, listPreIpoCompanyResearchDocumentsResponse: components .ListPreIpoCompanyResearchDocumentsResponse$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", listPreIpoCompanyResearchDocumentsResponse: "ListPreIpoCompanyResearchDocumentsResponse", 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 PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$ { /** @deprecated use `PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$inboundSchema` instead. */ export const inboundSchema = PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$inboundSchema; /** @deprecated use `PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$outboundSchema` instead. */ export const outboundSchema = PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$outboundSchema; /** @deprecated use `PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$Outbound` instead. */ export type Outbound = PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$Outbound; } export function preIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponseToJSON( preIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse: PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse, ): string { return JSON.stringify( PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$outboundSchema .parse( preIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse, ), ); } export function preIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponseFromJSON( jsonString: string, ): SafeParseResult< PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse, SDKValidationError > { return safeParse( jsonString, (x) => PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'PreIpoCompanyResearchDocumentsListPreIpoCompanyResearchDocumentsResponse' from JSON`, ); }