export type CreateApiFullenrichContactEnrichBulkArgs = {body: {name: string, webhook_url?: string | undefined, webhook_events?: Record | undefined, data: Array}}; export type CreateApiFullenrichContactEnrichBulkOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Start enrichment for up to 100 B2B contacts. Provide first_name + last_name + company or linkedin_url. Returns enrichment_id to poll for results. Async: results delivered via webhook or GET endpoint. * * POST /fullenrich/contact/enrich/bulk */ export const createApiFullenrichContactEnrichBulk = async (args: CreateApiFullenrichContactEnrichBulkArgs, options?: CreateApiFullenrichContactEnrichBulkOptions) => { 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/enrich/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 };