export type GetApiFinancialDatasetsIposArgs = {ticker?: string | undefined, cik?: string | undefined, classification?: string | undefined, limit?: number | undefined, cursor?: string | undefined}; export type GetApiFinancialDatasetsIposOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get SEC registration statements (Form S-1 and S-1/A), newest filings first. Every filing is classified (ipo, shell_company, spac, resale, or other) with structured cover-page metadata: proposed ticker, exchange, and expected offering price or price range. For IPO-grade filings whose financial statements have been extracted, the item embeds full income statements, balance sheets, and cash flow statements under financials, in the same shape as the /financials endpoints. No parameters are required: by default the latest filings across all companies are returned. * * GET /financial-datasets/ipos */ export const getApiFinancialDatasetsIpos = async (args: GetApiFinancialDatasetsIposArgs, options?: GetApiFinancialDatasetsIposOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.ticker != null) query.append("ticker", String(args.ticker)) if (args.cik != null) query.append("cik", String(args.cik)) if (args.classification != null) query.append("classification", String(args.classification)) if (args.limit != null) query.append("limit", String(args.limit)) if (args.cursor != null) query.append("cursor", String(args.cursor)) const url = `${baseUrl.replace(/\/+$/, '')}/financial-datasets/ipos${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };