export type CreateApiFullenrichContactReverseEmailBulkArgs = {body: {name: string, webhook_url?: string | undefined, data: Array}}; export type CreateApiFullenrichContactReverseEmailBulkOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Identify the person and company behind one or more email addresses. Returns full person profile (name, job title, work history) and company details (industry, headcount). Async: results via webhook or GET endpoint. * * POST /fullenrich/contact/reverse/email/bulk */ export const createApiFullenrichContactReverseEmailBulk = async (args: CreateApiFullenrichContactReverseEmailBulkArgs, options?: CreateApiFullenrichContactReverseEmailBulkOptions) => { 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/contact/reverse/email/bulk${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 };