export type CreateApiFiberV1CompanySearchArgs = {body: {searchParams: {exactCompanyV2?: Record | undefined, domains?: Array | undefined, headquartersCountryCode?: Record | undefined, headquartersStateName?: Record | undefined, employeeCountV2?: Record | undefined, keywords?: Record | undefined, industriesV2?: Record | undefined, stage?: Record | undefined, totalFundingUSD?: Record | undefined, lastFundingUSD?: Record | undefined, lastFundedOn?: string | undefined, foundedOn?: string | undefined, nameLike?: Record | undefined, exactCompany?: Record | undefined, acceleratorsV2?: Record | undefined, employeeTrends?: Record | undefined, headquartersLocation?: Record | undefined, linkedinSlugs?: Array | undefined, specialFlags?: Record | undefined, employees?: Record | undefined, revenueUSD?: Record | undefined, naicsCodes?: Record | undefined, fortuneRankings?: Record | undefined, jobPostingsV2?: Record | undefined, jobPostingStats?: Record | undefined, officeLocationsV2?: Record | undefined, tlds?: Record | undefined, numWordsInName?: Record | undefined, status?: Record | undefined, technologies?: Record | undefined, investors?: Record | undefined, tags?: Record | undefined, crunchbaseCategories?: Record | undefined, crunchbaseCategoryGroups?: Record | undefined, linkedinIndustries?: Record | undefined, crunchbaseSlugs?: Array | undefined}, pageSize?: number | undefined, cursor?: string | undefined, companyExclusionListIDs?: Array | undefined}}; export type CreateApiFiberV1CompanySearchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Search for companies using filters Pagination billing: call the first page normally and save billing.requestId from the Orthogonal /v1/run response. For later page, offset, or cursor calls on the same logical search, pass parentRequestId with unchanged non-pagination parameters. Valid continuation calls still get their own request IDs and quoted price, but are charged 0. Changing filters starts a new billable request. * * POST /fiber/v1/company-search */ export const createApiFiberV1CompanySearch = async (args: CreateApiFiberV1CompanySearchArgs, options?: CreateApiFiberV1CompanySearchOptions) => { 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(/\/+$/, '')}/fiber/v1/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 };