export type CreateApiFullenrichCompanySearchArgs = {body: {names?: Array | undefined, domains?: Array | undefined, industries?: Array | undefined, headcounts?: Array | undefined, headquarters_locations?: Array | undefined, types?: Array | undefined, specialties?: Array | undefined, keywords?: Array | undefined, professional_network_urls?: Array | undefined, founded_years?: Array | undefined, limit?: number | undefined, offset?: number | undefined, search_after?: string | undefined}}; export type CreateApiFullenrichCompanySearchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Search for companies based on various filters including industry, headcount, location, and more. Multiple filters within the same field use AND logic. Returns full company details. Costs 0.25 credits per result. * * POST /fullenrich/company/search */ export const createApiFullenrichCompanySearch = async (args: CreateApiFullenrichCompanySearchArgs, options?: CreateApiFullenrichCompanySearchOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/fullenrich/company/search${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };