export type CreateApiFiberV1ContactDetailsSingleArgs = {body: {linkedinUrl: string, enrichmentType?: Record | undefined, validateEmails?: boolean | undefined}}; export type CreateApiFiberV1ContactDetailsSingleOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Standard synchronous contact reveal. Returns emails and/or phone numbers for a person given their LinkedIn URL. Best balance of speed, cost, and coverage. * * POST /fiber/v1/contact-details/single */ export const createApiFiberV1ContactDetailsSingle = async (args: CreateApiFiberV1ContactDetailsSingleArgs, options?: CreateApiFiberV1ContactDetailsSingleOptions) => { 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/contact-details/single${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 };