export type CreateApiFiberV1TextToSearchParamsProfilesArgs = {body: {query: string}}; export type CreateApiFiberV1TextToSearchParamsProfilesOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Takes free-form text (e.g., 'Software engineers in US with 5+ years of experience') and converts it into a structured set of filters for profile search. This endpoint helps transform natural language queries into standardized search parameters such as job titles, skills, seniority, locations, past experiences, education, languages, and more. * * POST /fiber/v1/text-to-search-params/profiles */ export const createApiFiberV1TextToSearchParamsProfiles = async (args: CreateApiFiberV1TextToSearchParamsProfilesArgs, options?: CreateApiFiberV1TextToSearchParamsProfilesOptions) => { 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/text-to-search-params/profiles${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 };