export type CreateApiFiberV1NaturalLanguageSearchCombinedSyncArgs = {body: {query: string, companyConfig: Record, profileConfig: Record}}; export type CreateApiFiberV1NaturalLanguageSearchCombinedSyncOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Natural language search for both companies and profiles. Converts text query to search params and returns results. Fixed cost for param generation plus per-result charges. * * POST /fiber/v1/natural-language-search/combined/sync */ export const createApiFiberV1NaturalLanguageSearchCombinedSync = async (args: CreateApiFiberV1NaturalLanguageSearchCombinedSyncArgs, options?: CreateApiFiberV1NaturalLanguageSearchCombinedSyncOptions) => { 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/natural-language-search/combined/sync${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 };