export type GetApiPeopledatalabsV5CompanyEnrichArgs = {name?: string | undefined, website?: string | undefined, ticker?: string | undefined, profile?: string | undefined, location?: string | undefined, pretty?: boolean | undefined}; export type GetApiPeopledatalabsV5CompanyEnrichOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Enrich a company by name, website, ticker, or LinkedIn URL. Returns full company profile with industry, size, location, funding, and more. * * GET /peopledatalabs/v5/company/enrich */ export const getApiPeopledatalabsV5CompanyEnrich = async (args: GetApiPeopledatalabsV5CompanyEnrichArgs, options?: GetApiPeopledatalabsV5CompanyEnrichOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.name != null) query.append("name", String(args.name)) if (args.website != null) query.append("website", String(args.website)) if (args.ticker != null) query.append("ticker", String(args.ticker)) if (args.profile != null) query.append("profile", String(args.profile)) if (args.location != null) query.append("location", String(args.location)) if (args.pretty != null) query.append("pretty", String(args.pretty)) const url = `${baseUrl.replace(/\/+$/, '')}/peopledatalabs/v5/company/enrich${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 };