export type CreateApiOpenfunnelApiV1EnrichDeepEnrichArgs = {body: {domain: string, goal?: string | undefined, icp_id?: number | undefined, target_icp_roles?: Array | undefined, timeframe?: number | undefined, max_jobs_to_check?: number | undefined, campaign_name?: string | undefined, people_locations?: Array | undefined, people_sub_locations?: Array | undefined}}; export type CreateApiOpenfunnelApiV1EnrichDeepEnrichOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Start a background enrichment run for a company domain. OpenFunnel creates or finds the account, discovers intent signals, finds relevant people, and ICP-qualifies them. Requires domain plus either icp_id or target_icp_roles; jobs can take 15 to 30 minutes. * * POST /openfunnel/api/v1/enrich/deep-enrich */ export const createApiOpenfunnelApiV1EnrichDeepEnrich = async (args: CreateApiOpenfunnelApiV1EnrichDeepEnrichArgs, options?: CreateApiOpenfunnelApiV1EnrichDeepEnrichOptions) => { 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(/\/+$/, '')}/openfunnel/api/v1/enrich/deep-enrich${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 };