export type GetApiCaptaindataCompaniesEnrichArgs = {li_company_url: string}; export type GetApiCaptaindataCompaniesEnrichOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get comprehensive company information from a LinkedIn Company URL. Returns company details, industry, size, and more. * * GET /captaindata/companies/enrich */ export const getApiCaptaindataCompaniesEnrich = async (args: GetApiCaptaindataCompaniesEnrichArgs, options?: GetApiCaptaindataCompaniesEnrichOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.li_company_url != null) query.append("li_company_url", String(args.li_company_url)) const url = `${baseUrl.replace(/\/+$/, '')}/captaindata/companies/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 };