import { CapacitySnapshot } from "./capacity-tracker.mjs"; import { components, paths } from "./generated/openapi.types.mjs"; import { Client } from "openapi-fetch"; //#region src/pipe0.d.ts type PipesRequest = paths["/v1/pipes/run"]["post"]["requestBody"]["content"]["application/json"]; type PipesResponse = paths["/v1/pipes/check/{run_id}"]["get"]["responses"]["200"]["content"]["application/json"]; type SearchesRequest = paths["/v1/searches/run"]["post"]["requestBody"]["content"]["application/json"]; type SearchesResponse = paths["/v1/searches/check/{run_id}"]["get"]["responses"]["200"]["content"]["application/json"]; type SearchRequest = paths["/v1/search/run"]["post"]["requestBody"]["content"]["application/json"]; type SearchResponse = paths["/v1/search/check/{run_id}"]["get"]["responses"]["200"]["content"]["application/json"]; type SheetEffectsRequest = paths["/v1/sheets/{sheet_id}/effects/run"]["post"]["requestBody"]["content"]["application/json"]; type SheetEffectsResponse = paths["/v1/sheets/{sheet_id}/effects/check/{run_id}"]["get"]["responses"]["200"]["content"]["application/json"]; declare class Pipe0TimeoutError extends Error { readonly runId?: string | undefined; constructor(message: string, runId?: string | undefined); } declare class Pipe0AbortError extends Error { readonly runId?: string | undefined; constructor(message: string, runId?: string | undefined); } /** * The server reports the run as `canceled` (via `pipes.cancel` / * `searches.cancel` or another client). Subclasses {@link Pipe0AbortError} so * existing `instanceof Pipe0AbortError` handling keeps working. */ declare class Pipe0CanceledError extends Pipe0AbortError { constructor(message: string, runId?: string); } declare class Pipe0BatchError extends Error { readonly errors: Array<{ batchIndex: number; error: Error; }>; readonly successfulBatches: PipesResponse[]; constructor(message: string, errors: Array<{ batchIndex: number; error: Error; }>, successfulBatches: PipesResponse[]); } declare class Pipe0TaskError extends Error { readonly responseBody?: unknown | undefined; constructor(message: string, responseBody?: unknown | undefined); } declare class Pipe0ServerError extends Error { /** HTTP status of the error response, when known. */ readonly status?: number; /** RFC 7807 problem `type` discriminator (e.g. "queue-limit-exceeded", "org-rate-limited"). */ readonly problemType?: string; constructor(message: string, options?: { status?: number; problemType?: string; }); } /** * Thrown only after the SDK's automatic 429 handling exhausted its wait * budget (`rateLimitMaxWaitMs` / `queueFullMaxWaitMs`), or immediately when * `autoRetry429` is disabled the error surfaces as a plain * {@link Pipe0ServerError} instead. Subclasses Pipe0ServerError so existing * handling keeps working. */ declare class Pipe0RateLimitError extends Pipe0ServerError { /** The delay the SDK would have waited next, in ms. */ readonly retryAfterMs?: number; /** Attempts made before giving up. */ readonly attempts: number; constructor(message: string, options?: { problemType?: string; retryAfterMs?: number; attempts?: number; }); } interface BatchOptions { /** * Callback invoked on each poll for any batch */ onPoll?: (_batchIndex: number, _response: PipesResponse) => void; /** * Callback invoked when each batch completes */ onBatchComplete?: (_batchIndex: number, _result: PipesResponse) => void; /** * Whether to stop all batches if one fails * @default true */ stopOnError?: boolean; /** * AbortSignal to cancel all batch operations */ signal?: AbortSignal; /** * The worst task priority the pool will voluntarily submit at. When the * next batch would land below this floor, submission waits for capacity * (returned by your own runs completing) instead. `3` means only the hard * ceiling paces you. @default the instance `priorityFloor` (2) */ priorityFloor?: 1 | 2 | 3; /** * Cancel still-pending runs server-side when the AbortSignal fires. * @default the instance `cancelOnAbort` (true) */ cancelOnAbort?: boolean; } interface SearchAllItem { /** The search payload (`search_id` + `config`), same shape as `searches.search`. */ search: SearchRequest["search"]; /** * Max pages to fetch for this search. Pagination is auto-detected from each * response's `next_page`, so cursor- and page-number-based searches both work. * @default the call-level `maxPages` */ maxPages?: number; } interface SearchAllOptions { /** Searches to run concurrently. Results are merged into one array. */ searches: SearchAllItem[]; /** Shared request config (e.g. `{ environment }`) applied to every search. */ config?: SearchRequest["config"]; /** * Field names to dedupe the merged results by, compared on each field's * resolved `.value`. Multiple fields form a composite key; first match wins. * Rows missing any key field are kept as-is (never deduped away). */ dedupeBy?: string[]; /** * Default max pages per search when an item doesn't set its own. Pass * `Infinity` to fetch every page until the server reports no `next_page`. * @default 1 */ maxPages?: number; /** * Normalize the merged results to a single shape: every row gets the union of * all field names seen across every search, with absent fields set to `null` * (e.g. so `crustdata_company_match` / `amplemarket_company_match` both exist * on every row). @default true */ normalize?: boolean; /** Max searches to run at once. @default maxConcurrentBatches */ maxConcurrency?: number; /** AbortSignal to cancel all searches. */ signal?: AbortSignal; /** * Throw on the first search error. When `false`, failed searches are collected * in `errors` and partial results are returned. @default true */ stopOnError?: boolean; /** * Cancel still-pending search runs server-side when the AbortSignal fires. * @default the instance `cancelOnAbort` (true) */ cancelOnAbort?: boolean; } interface SearchAllResult { /** Merged (and optionally deduped) results across every search and page. */ results: SearchResponse["results"]; /** Per-search failures, populated only when `stopOnError` is `false`. */ errors: Array<{ searchIndex: number; error: Error; }>; } interface Pipe0Options { apiKey?: string; baseUrl?: string; credentials?: RequestInit["credentials"]; /** * Default timeout for polling operations in milliseconds * @default 900000 (15 minutes) */ pollingTimeoutMs?: number; /** * Default polling interval in milliseconds * @default 1000 (1 second) */ minPollingIntervalMs?: number; /** * Maximum polling interval in milliseconds (for exponential backoff) * @default 3000 (3 seconds) */ maxPollingIntervalMs?: number; /** * Default batch size for large payloads * @default 100 */ defaultBatchSize?: number; /** * Maximum number of concurrent batch requests * @default 5 */ maxConcurrentBatches?: number; /** * Automatically absorb 429 responses: `org-rate-limited` sleeps the * server's Retry-After and retries; `queue-limit-exceeded` (queued-record * hard ceiling) backoff-retries the create until capacity frees. A * {@link Pipe0RateLimitError} is thrown only after the wait budget below is * exhausted. @default true */ autoRetry429?: boolean; /** * Upper bound on a single Retry-After wait in milliseconds. * @default 30000 (30 seconds) */ retryAfterCapMs?: number; /** * Total wait budget for `org-rate-limited` retries per request. * @default 120000 (2 minutes) */ rateLimitMaxWaitMs?: number; /** * Total wait budget for `queue-limit-exceeded` retries per create. * @default 900000 (15 minutes) */ queueFullMaxWaitMs?: number; /** * When an AbortSignal fires while the SDK is waiting on runs, cancel the * still-pending runs server-side (best-effort) so their records return to * your capacity immediately. Set `false` for abort-but-keep-running * semantics. @default true */ cancelOnAbort?: boolean; /** * Default priority floor for `pipeInBatches`: the worst task priority the * batch pool voluntarily submits at (see the X-P1/P2/P3-Capacity headers). * @default 2 */ priorityFloor?: 1 | 2 | 3; /** * When batch submission is capacity-blocked with nothing of its own in * flight (capacity held by other clients), the pool re-probes by submitting * one batch after this delay — its response headers re-baseline the * capacity estimate. @default 15000 (15 seconds) */ pacingProbeMs?: number; /** Observer invoked whenever fresh capacity headers are seen. */ onCapacity?: (snapshot: CapacitySnapshot) => void; /** Custom fetch implementation (e.g. for testing). */ fetch?: (input: Request) => Promise; } declare class Pipe0 { client: Client; private apiKey?; private pollingTimeoutMs; private minPollingIntervalMs; private maxPollingIntervalMs; private defaultBatchSize; private maxConcurrentBatches; private autoRetry429; private retryAfterCapMs; private rateLimitMaxWaitMs; private queueFullMaxWaitMs; private defaultCancelOnAbort; private defaultPriorityFloor; private pacingProbeMs; private onCapacity?; private tracker; constructor(options?: Pipe0Options); /** * The SDK's current estimate of your organization's queue capacity, from * the most recent run-creating response's headers adjusted by runs the SDK * has since observed completing. Null until the first create. */ get capacity(): CapacitySnapshot | null; /** * The single request funnel: every API call goes through here so 429 * handling and capacity bookkeeping live in exactly one place. * * - `org-rate-limited` (request bucket, has Retry-After): sleep and retry, * budget `rateLimitMaxWaitMs`. * - `queue-limit-exceeded` (queued-record hard ceiling, no Retry-After): * exponential backoff retry, budget `queueFullMaxWaitMs` — re-issuing the * create is safe because the ceiling rejects before anything is queued. * - Anything else throws {@link Pipe0ServerError} with `status` + * `problemType` attached. */ private request; /** * Centralized logic to poll until a task completes, fails, or times out. */ private _pollUntilComplete; pipes: { /** * Create and immediately wait for completion (convenience method) */ pipe: (payload: PipesRequest, options?: { onPoll?: (_response: PipesResponse) => unknown; signal?: AbortSignal; cancelOnAbort?: boolean; }) => Promise; /** * Create a pipes task but don't wait for it. Use this method if you want to fire and forget. */ create: (payload: PipesRequest, options?: { signal?: AbortSignal; }) => Promise; /** * Check the status of a pipes task manually. */ check: (runId: string, options?: { signal?: AbortSignal; }) => Promise<{ id: string; organization_id: string; order: (number | string)[]; field_definitions: { [key: string]: { type: "string" | "number" | "boolean" | "json" | "unknown"; label: string; added_by: { ref: ("prompt:run@1" | "agent:run@1" | "company:newssummary:website@1" | "company:newssummary:domain@1" | "company:techstack:builtwith@1" | "company:techstack:builtwith@2" | "company:websiteurl:email@1" | "company:domain:workemail@1" | "company:funding:leadmagic@1" | "company:funding:waterfall@1" | "people:workemail:waterfall@1" | "person:workemail:waterfall@1" | "people:email:iswork@1" | "email:iswork@1" | "people:name:split@1" | "person:name:split@1" | "person:name:join@1" | "people:email:validate:zerobounce@2" | "email:validate:zerobounce@1" | "company:overview@1" | "company:overview@2" | "company:overview@3" | "json:extract:multi@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "email:draft:gmail@1" | "message:send:slack@1" | "message:send-direct:slack@1" | "template:fill@1" | "contact:create:resend@1" | "lead:enroll:lemlist@1" | "contact:match:hubspot@1" | "company:match:hubspot@1" | "deal:match:hubspot@1" | "object:update:hubspot@1" | "object:associations:hubspot@1" | "activity:log:hubspot@1" | "person:match:salesforce@1" | "account:match:salesforce@1" | "opportunity:match:salesforce@1" | "record:lookup:salesforce@1" | "record:update:salesforce@1" | "record:assert:salesforce@1" | "activities:find:salesforce@1" | "activity:log:salesforce@1" | "person:match:attio@1" | "company:match:attio@1" | "deal:match:attio@1" | "record:match:attio@1" | "record:lookup:attio@1" | "record:update:attio@1" | "activities:find:attio@1" | "lead:enroll:amplemarket@1" | "people:match:role:waterfall@1" | "role:waterfall@1" | "roles:waterfall@1" | "company:identity@2" | "company:identity@3" | "company:identity:crustdata@1" | "people:phone:profile:waterfall@1" | "person:mobile:profileurl:waterfall@1" | "people:personalemail:profile:waterfall@1" | "person:personalemail:profileurl:waterfall@1" | "people:profile:waterfall@1" | "person:profile:waterfall@1" | "person:profile:waterfall@2" | "people:profileurl:email:waterfall@1" | "person:profileurl:email:waterfall@1" | "person:profileurl:name@1" | "person:email:validate:millionverifier@1" | "person:mobile:workemail:waterfall@1" | "fields:merge@1" | "field:slugify@1" | "field:domainify@1" | "field:timestamp@1" | "formula:run@1" | "signals:personprofilematch@1" | "website:scrape:firecrawl@1" | "website:extract:parallel@1" | "website:markdown:parallel@1" | "row:append:sheet@1" | "row:expandappend:sheet@1" | "row:roundrobin:sheet@1" | "bucket:claim@1" | "stream:enroll@1" | "stream:unenroll@1" | "bucket:count@1" | "bucket:check@1" | "bucket:countif@1" | "rows:find:sheet@1" | "rows:delete:sheet@1" | "rows:find:postgres@1" | "rows:find:databricks@1" | "company:lookalikes:companyenrich@2" | "person:posts:content:crustdata@1" | "profile:posts:x@1" | "post:create:x@1" | "ads:linkedin:waterfall@1" | "ads:google:waterfall@1" | "ads:meta:waterfall@1" | "company:match:crustdata@1" | "company:match:crustdata@2" | "company:match:amplemarket@1" | "company:jobs:amplemarket@1" | "people:profile:workemail:crustdata@1" | "person:profile:workemail:crustdata@1" | "people:workemail:profileurl:waterfall@1" | "person:workemail:profileurl:waterfall@1" | "people:identity:email:waterfall@1" | "person:identity:email:waterfall@1" | "person:identity:email:waterfall@2" | "person:devprofileurl:profileurl:waterfall@1" | "http:request@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1") | "input"; config_hash: string | null; pipe_index: number | null; }; format: "json_object" | "json_list" | "json_list_string" | "url" | "website_url" | "profile_url" | "email" | "datetime" | "currency" | "date" | "phone" | "markdown" | "long_text" | "text" | "int" | "decimal" | "address_line_1" | "zip_code" | "percent" | "domain" | null; is_primary_output: boolean; order?: number | null; }; }; errors: { code: string; message: string; path?: string; }[]; records: { [key: string]: { id: number | string; fields: { [key: string]: { value: string | number | boolean | null | { [key: string]: unknown; } | unknown[]; status: "completed" | "failed" | "pending" | "queued" | "processing" | "no_result" | "skipped"; type: "string" | "number" | "boolean" | "json" | "unknown"; reason: { code: string; summary: string; message: string; } | null; claimed_by: { ref: "prompt:run@1" | "agent:run@1" | "company:newssummary:website@1" | "company:newssummary:domain@1" | "company:techstack:builtwith@1" | "company:techstack:builtwith@2" | "company:websiteurl:email@1" | "company:domain:workemail@1" | "company:funding:leadmagic@1" | "company:funding:waterfall@1" | "people:workemail:waterfall@1" | "person:workemail:waterfall@1" | "people:email:iswork@1" | "email:iswork@1" | "people:name:split@1" | "person:name:split@1" | "person:name:join@1" | "people:email:validate:zerobounce@2" | "email:validate:zerobounce@1" | "company:overview@1" | "company:overview@2" | "company:overview@3" | "json:extract:multi@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "email:draft:gmail@1" | "message:send:slack@1" | "message:send-direct:slack@1" | "template:fill@1" | "contact:create:resend@1" | "lead:enroll:lemlist@1" | "contact:match:hubspot@1" | "company:match:hubspot@1" | "deal:match:hubspot@1" | "object:update:hubspot@1" | "object:associations:hubspot@1" | "activity:log:hubspot@1" | "person:match:salesforce@1" | "account:match:salesforce@1" | "opportunity:match:salesforce@1" | "record:lookup:salesforce@1" | "record:update:salesforce@1" | "record:assert:salesforce@1" | "activities:find:salesforce@1" | "activity:log:salesforce@1" | "person:match:attio@1" | "company:match:attio@1" | "deal:match:attio@1" | "record:match:attio@1" | "record:lookup:attio@1" | "record:update:attio@1" | "activities:find:attio@1" | "lead:enroll:amplemarket@1" | "people:match:role:waterfall@1" | "role:waterfall@1" | "roles:waterfall@1" | "company:identity@2" | "company:identity@3" | "company:identity:crustdata@1" | "people:phone:profile:waterfall@1" | "person:mobile:profileurl:waterfall@1" | "people:personalemail:profile:waterfall@1" | "person:personalemail:profileurl:waterfall@1" | "people:profile:waterfall@1" | "person:profile:waterfall@1" | "person:profile:waterfall@2" | "people:profileurl:email:waterfall@1" | "person:profileurl:email:waterfall@1" | "person:profileurl:name@1" | "person:email:validate:millionverifier@1" | "person:mobile:workemail:waterfall@1" | "fields:merge@1" | "field:slugify@1" | "field:domainify@1" | "field:timestamp@1" | "formula:run@1" | "signals:personprofilematch@1" | "website:scrape:firecrawl@1" | "website:extract:parallel@1" | "website:markdown:parallel@1" | "row:append:sheet@1" | "row:expandappend:sheet@1" | "row:roundrobin:sheet@1" | "bucket:claim@1" | "stream:enroll@1" | "stream:unenroll@1" | "bucket:count@1" | "bucket:check@1" | "bucket:countif@1" | "rows:find:sheet@1" | "rows:delete:sheet@1" | "rows:find:postgres@1" | "rows:find:databricks@1" | "company:lookalikes:companyenrich@2" | "person:posts:content:crustdata@1" | "profile:posts:x@1" | "post:create:x@1" | "ads:linkedin:waterfall@1" | "ads:google:waterfall@1" | "ads:meta:waterfall@1" | "company:match:crustdata@1" | "company:match:crustdata@2" | "company:match:amplemarket@1" | "company:jobs:amplemarket@1" | "people:profile:workemail:crustdata@1" | "person:profile:workemail:crustdata@1" | "people:workemail:profileurl:waterfall@1" | "person:workemail:profileurl:waterfall@1" | "people:identity:email:waterfall@1" | "person:identity:email:waterfall@1" | "person:identity:email:waterfall@2" | "person:devprofileurl:profileurl:waterfall@1" | "http:request@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "input" | null; config_hash: string | null; }; resolved_by: { ref: "prompt:run@1" | "agent:run@1" | "company:newssummary:website@1" | "company:newssummary:domain@1" | "company:techstack:builtwith@1" | "company:techstack:builtwith@2" | "company:websiteurl:email@1" | "company:domain:workemail@1" | "company:funding:leadmagic@1" | "company:funding:waterfall@1" | "people:workemail:waterfall@1" | "person:workemail:waterfall@1" | "people:email:iswork@1" | "email:iswork@1" | "people:name:split@1" | "person:name:split@1" | "person:name:join@1" | "people:email:validate:zerobounce@2" | "email:validate:zerobounce@1" | "company:overview@1" | "company:overview@2" | "company:overview@3" | "json:extract:multi@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "email:draft:gmail@1" | "message:send:slack@1" | "message:send-direct:slack@1" | "template:fill@1" | "contact:create:resend@1" | "lead:enroll:lemlist@1" | "contact:match:hubspot@1" | "company:match:hubspot@1" | "deal:match:hubspot@1" | "object:update:hubspot@1" | "object:associations:hubspot@1" | "activity:log:hubspot@1" | "person:match:salesforce@1" | "account:match:salesforce@1" | "opportunity:match:salesforce@1" | "record:lookup:salesforce@1" | "record:update:salesforce@1" | "record:assert:salesforce@1" | "activities:find:salesforce@1" | "activity:log:salesforce@1" | "person:match:attio@1" | "company:match:attio@1" | "deal:match:attio@1" | "record:match:attio@1" | "record:lookup:attio@1" | "record:update:attio@1" | "activities:find:attio@1" | "lead:enroll:amplemarket@1" | "people:match:role:waterfall@1" | "role:waterfall@1" | "roles:waterfall@1" | "company:identity@2" | "company:identity@3" | "company:identity:crustdata@1" | "people:phone:profile:waterfall@1" | "person:mobile:profileurl:waterfall@1" | "people:personalemail:profile:waterfall@1" | "person:personalemail:profileurl:waterfall@1" | "people:profile:waterfall@1" | "person:profile:waterfall@1" | "person:profile:waterfall@2" | "people:profileurl:email:waterfall@1" | "person:profileurl:email:waterfall@1" | "person:profileurl:name@1" | "person:email:validate:millionverifier@1" | "person:mobile:workemail:waterfall@1" | "fields:merge@1" | "field:slugify@1" | "field:domainify@1" | "field:timestamp@1" | "formula:run@1" | "signals:personprofilematch@1" | "website:scrape:firecrawl@1" | "website:extract:parallel@1" | "website:markdown:parallel@1" | "row:append:sheet@1" | "row:expandappend:sheet@1" | "row:roundrobin:sheet@1" | "bucket:claim@1" | "stream:enroll@1" | "stream:unenroll@1" | "bucket:count@1" | "bucket:check@1" | "bucket:countif@1" | "rows:find:sheet@1" | "rows:delete:sheet@1" | "rows:find:postgres@1" | "rows:find:databricks@1" | "company:lookalikes:companyenrich@2" | "person:posts:content:crustdata@1" | "profile:posts:x@1" | "post:create:x@1" | "ads:linkedin:waterfall@1" | "ads:google:waterfall@1" | "ads:meta:waterfall@1" | "company:match:crustdata@1" | "company:match:crustdata@2" | "company:match:amplemarket@1" | "company:jobs:amplemarket@1" | "people:profile:workemail:crustdata@1" | "person:profile:workemail:crustdata@1" | "people:workemail:profileurl:waterfall@1" | "person:workemail:profileurl:waterfall@1" | "people:identity:email:waterfall@1" | "person:identity:email:waterfall@1" | "person:identity:email:waterfall@2" | "person:devprofileurl:profileurl:waterfall@1" | "http:request@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "input" | "system" | null; environment: "production" | "sandbox" | null; config_hash: string | null; input_hash: string | null; } | null; widgets?: { display_value?: { type?: "static"; label?: string; marks?: ("bold" | "italic" | "underline" | "strikethrough")[]; }; entity_logo?: { type?: "static"; image_url: string; entity: string; }; external_link?: { type?: "static"; url: string; }; location_indicator?: { type?: "static"; emoji: string; }; avatar?: { type?: "static"; image_url: string; name: string; }; waterfall?: { type?: "static"; attempted_providers: { provider: "pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom"; }[]; available_providers: ("pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom")[]; successful_provider?: "pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom"; }; icon?: { type?: "static"; key: "linkedin" | "job" | "seniority_c_suite" | "seniority_leadership" | "seniority_manager" | "seniority_senior_ic" | "seniority_ic" | "seniority_frontline" | "seniority_junior" | "seniority_unknown"; }; action_summary?: { type?: "static"; result_status: "completed" | "failed"; }; sources?: { type?: "static"; list: { source: string; description?: string; url: string; }[]; }; confidence?: { type?: "static"; numeric: number; }; emoji?: { type?: "static"; value: string; }; }; format: "json_object" | "json_list" | "json_list_string" | "url" | "website_url" | "profile_url" | "email" | "datetime" | "currency" | "date" | "phone" | "markdown" | "long_text" | "text" | "int" | "decimal" | "address_line_1" | "zip_code" | "percent" | "domain" | null; }; }; }; }; status: "completed" | "failed" | "pending" | "processing" | "canceled"; credits?: components["schemas"]["RunCreditsSchema"]; }>; /** * Cancel a still-pending pipes run. Its records return to your * organization's capacity immediately. Runs that are already processing * or finished throw a {@link Pipe0ServerError} with `status: 409`. */ cancel: (runId: string, options?: { signal?: AbortSignal; }) => Promise<{ id: string; organization_id: string; order: (number | string)[]; field_definitions: { [key: string]: { type: "string" | "number" | "boolean" | "json" | "unknown"; label: string; added_by: { ref: ("prompt:run@1" | "agent:run@1" | "company:newssummary:website@1" | "company:newssummary:domain@1" | "company:techstack:builtwith@1" | "company:techstack:builtwith@2" | "company:websiteurl:email@1" | "company:domain:workemail@1" | "company:funding:leadmagic@1" | "company:funding:waterfall@1" | "people:workemail:waterfall@1" | "person:workemail:waterfall@1" | "people:email:iswork@1" | "email:iswork@1" | "people:name:split@1" | "person:name:split@1" | "person:name:join@1" | "people:email:validate:zerobounce@2" | "email:validate:zerobounce@1" | "company:overview@1" | "company:overview@2" | "company:overview@3" | "json:extract:multi@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "email:draft:gmail@1" | "message:send:slack@1" | "message:send-direct:slack@1" | "template:fill@1" | "contact:create:resend@1" | "lead:enroll:lemlist@1" | "contact:match:hubspot@1" | "company:match:hubspot@1" | "deal:match:hubspot@1" | "object:update:hubspot@1" | "object:associations:hubspot@1" | "activity:log:hubspot@1" | "person:match:salesforce@1" | "account:match:salesforce@1" | "opportunity:match:salesforce@1" | "record:lookup:salesforce@1" | "record:update:salesforce@1" | "record:assert:salesforce@1" | "activities:find:salesforce@1" | "activity:log:salesforce@1" | "person:match:attio@1" | "company:match:attio@1" | "deal:match:attio@1" | "record:match:attio@1" | "record:lookup:attio@1" | "record:update:attio@1" | "activities:find:attio@1" | "lead:enroll:amplemarket@1" | "people:match:role:waterfall@1" | "role:waterfall@1" | "roles:waterfall@1" | "company:identity@2" | "company:identity@3" | "company:identity:crustdata@1" | "people:phone:profile:waterfall@1" | "person:mobile:profileurl:waterfall@1" | "people:personalemail:profile:waterfall@1" | "person:personalemail:profileurl:waterfall@1" | "people:profile:waterfall@1" | "person:profile:waterfall@1" | "person:profile:waterfall@2" | "people:profileurl:email:waterfall@1" | "person:profileurl:email:waterfall@1" | "person:profileurl:name@1" | "person:email:validate:millionverifier@1" | "person:mobile:workemail:waterfall@1" | "fields:merge@1" | "field:slugify@1" | "field:domainify@1" | "field:timestamp@1" | "formula:run@1" | "signals:personprofilematch@1" | "website:scrape:firecrawl@1" | "website:extract:parallel@1" | "website:markdown:parallel@1" | "row:append:sheet@1" | "row:expandappend:sheet@1" | "row:roundrobin:sheet@1" | "bucket:claim@1" | "stream:enroll@1" | "stream:unenroll@1" | "bucket:count@1" | "bucket:check@1" | "bucket:countif@1" | "rows:find:sheet@1" | "rows:delete:sheet@1" | "rows:find:postgres@1" | "rows:find:databricks@1" | "company:lookalikes:companyenrich@2" | "person:posts:content:crustdata@1" | "profile:posts:x@1" | "post:create:x@1" | "ads:linkedin:waterfall@1" | "ads:google:waterfall@1" | "ads:meta:waterfall@1" | "company:match:crustdata@1" | "company:match:crustdata@2" | "company:match:amplemarket@1" | "company:jobs:amplemarket@1" | "people:profile:workemail:crustdata@1" | "person:profile:workemail:crustdata@1" | "people:workemail:profileurl:waterfall@1" | "person:workemail:profileurl:waterfall@1" | "people:identity:email:waterfall@1" | "person:identity:email:waterfall@1" | "person:identity:email:waterfall@2" | "person:devprofileurl:profileurl:waterfall@1" | "http:request@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1") | "input"; config_hash: string | null; pipe_index: number | null; }; format: "json_object" | "json_list" | "json_list_string" | "url" | "website_url" | "profile_url" | "email" | "datetime" | "currency" | "date" | "phone" | "markdown" | "long_text" | "text" | "int" | "decimal" | "address_line_1" | "zip_code" | "percent" | "domain" | null; is_primary_output: boolean; order?: number | null; }; }; errors: { code: string; message: string; path?: string; }[]; records: { [key: string]: { id: number | string; fields: { [key: string]: { value: string | number | boolean | null | { [key: string]: unknown; } | unknown[]; status: "completed" | "failed" | "pending" | "queued" | "processing" | "no_result" | "skipped"; type: "string" | "number" | "boolean" | "json" | "unknown"; reason: { code: string; summary: string; message: string; } | null; claimed_by: { ref: "prompt:run@1" | "agent:run@1" | "company:newssummary:website@1" | "company:newssummary:domain@1" | "company:techstack:builtwith@1" | "company:techstack:builtwith@2" | "company:websiteurl:email@1" | "company:domain:workemail@1" | "company:funding:leadmagic@1" | "company:funding:waterfall@1" | "people:workemail:waterfall@1" | "person:workemail:waterfall@1" | "people:email:iswork@1" | "email:iswork@1" | "people:name:split@1" | "person:name:split@1" | "person:name:join@1" | "people:email:validate:zerobounce@2" | "email:validate:zerobounce@1" | "company:overview@1" | "company:overview@2" | "company:overview@3" | "json:extract:multi@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "email:draft:gmail@1" | "message:send:slack@1" | "message:send-direct:slack@1" | "template:fill@1" | "contact:create:resend@1" | "lead:enroll:lemlist@1" | "contact:match:hubspot@1" | "company:match:hubspot@1" | "deal:match:hubspot@1" | "object:update:hubspot@1" | "object:associations:hubspot@1" | "activity:log:hubspot@1" | "person:match:salesforce@1" | "account:match:salesforce@1" | "opportunity:match:salesforce@1" | "record:lookup:salesforce@1" | "record:update:salesforce@1" | "record:assert:salesforce@1" | "activities:find:salesforce@1" | "activity:log:salesforce@1" | "person:match:attio@1" | "company:match:attio@1" | "deal:match:attio@1" | "record:match:attio@1" | "record:lookup:attio@1" | "record:update:attio@1" | "activities:find:attio@1" | "lead:enroll:amplemarket@1" | "people:match:role:waterfall@1" | "role:waterfall@1" | "roles:waterfall@1" | "company:identity@2" | "company:identity@3" | "company:identity:crustdata@1" | "people:phone:profile:waterfall@1" | "person:mobile:profileurl:waterfall@1" | "people:personalemail:profile:waterfall@1" | "person:personalemail:profileurl:waterfall@1" | "people:profile:waterfall@1" | "person:profile:waterfall@1" | "person:profile:waterfall@2" | "people:profileurl:email:waterfall@1" | "person:profileurl:email:waterfall@1" | "person:profileurl:name@1" | "person:email:validate:millionverifier@1" | "person:mobile:workemail:waterfall@1" | "fields:merge@1" | "field:slugify@1" | "field:domainify@1" | "field:timestamp@1" | "formula:run@1" | "signals:personprofilematch@1" | "website:scrape:firecrawl@1" | "website:extract:parallel@1" | "website:markdown:parallel@1" | "row:append:sheet@1" | "row:expandappend:sheet@1" | "row:roundrobin:sheet@1" | "bucket:claim@1" | "stream:enroll@1" | "stream:unenroll@1" | "bucket:count@1" | "bucket:check@1" | "bucket:countif@1" | "rows:find:sheet@1" | "rows:delete:sheet@1" | "rows:find:postgres@1" | "rows:find:databricks@1" | "company:lookalikes:companyenrich@2" | "person:posts:content:crustdata@1" | "profile:posts:x@1" | "post:create:x@1" | "ads:linkedin:waterfall@1" | "ads:google:waterfall@1" | "ads:meta:waterfall@1" | "company:match:crustdata@1" | "company:match:crustdata@2" | "company:match:amplemarket@1" | "company:jobs:amplemarket@1" | "people:profile:workemail:crustdata@1" | "person:profile:workemail:crustdata@1" | "people:workemail:profileurl:waterfall@1" | "person:workemail:profileurl:waterfall@1" | "people:identity:email:waterfall@1" | "person:identity:email:waterfall@1" | "person:identity:email:waterfall@2" | "person:devprofileurl:profileurl:waterfall@1" | "http:request@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "input" | null; config_hash: string | null; }; resolved_by: { ref: "prompt:run@1" | "agent:run@1" | "company:newssummary:website@1" | "company:newssummary:domain@1" | "company:techstack:builtwith@1" | "company:techstack:builtwith@2" | "company:websiteurl:email@1" | "company:domain:workemail@1" | "company:funding:leadmagic@1" | "company:funding:waterfall@1" | "people:workemail:waterfall@1" | "person:workemail:waterfall@1" | "people:email:iswork@1" | "email:iswork@1" | "people:name:split@1" | "person:name:split@1" | "person:name:join@1" | "people:email:validate:zerobounce@2" | "email:validate:zerobounce@1" | "company:overview@1" | "company:overview@2" | "company:overview@3" | "json:extract:multi@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "email:draft:gmail@1" | "message:send:slack@1" | "message:send-direct:slack@1" | "template:fill@1" | "contact:create:resend@1" | "lead:enroll:lemlist@1" | "contact:match:hubspot@1" | "company:match:hubspot@1" | "deal:match:hubspot@1" | "object:update:hubspot@1" | "object:associations:hubspot@1" | "activity:log:hubspot@1" | "person:match:salesforce@1" | "account:match:salesforce@1" | "opportunity:match:salesforce@1" | "record:lookup:salesforce@1" | "record:update:salesforce@1" | "record:assert:salesforce@1" | "activities:find:salesforce@1" | "activity:log:salesforce@1" | "person:match:attio@1" | "company:match:attio@1" | "deal:match:attio@1" | "record:match:attio@1" | "record:lookup:attio@1" | "record:update:attio@1" | "activities:find:attio@1" | "lead:enroll:amplemarket@1" | "people:match:role:waterfall@1" | "role:waterfall@1" | "roles:waterfall@1" | "company:identity@2" | "company:identity@3" | "company:identity:crustdata@1" | "people:phone:profile:waterfall@1" | "person:mobile:profileurl:waterfall@1" | "people:personalemail:profile:waterfall@1" | "person:personalemail:profileurl:waterfall@1" | "people:profile:waterfall@1" | "person:profile:waterfall@1" | "person:profile:waterfall@2" | "people:profileurl:email:waterfall@1" | "person:profileurl:email:waterfall@1" | "person:profileurl:name@1" | "person:email:validate:millionverifier@1" | "person:mobile:workemail:waterfall@1" | "fields:merge@1" | "field:slugify@1" | "field:domainify@1" | "field:timestamp@1" | "formula:run@1" | "signals:personprofilematch@1" | "website:scrape:firecrawl@1" | "website:extract:parallel@1" | "website:markdown:parallel@1" | "row:append:sheet@1" | "row:expandappend:sheet@1" | "row:roundrobin:sheet@1" | "bucket:claim@1" | "stream:enroll@1" | "stream:unenroll@1" | "bucket:count@1" | "bucket:check@1" | "bucket:countif@1" | "rows:find:sheet@1" | "rows:delete:sheet@1" | "rows:find:postgres@1" | "rows:find:databricks@1" | "company:lookalikes:companyenrich@2" | "person:posts:content:crustdata@1" | "profile:posts:x@1" | "post:create:x@1" | "ads:linkedin:waterfall@1" | "ads:google:waterfall@1" | "ads:meta:waterfall@1" | "company:match:crustdata@1" | "company:match:crustdata@2" | "company:match:amplemarket@1" | "company:jobs:amplemarket@1" | "people:profile:workemail:crustdata@1" | "person:profile:workemail:crustdata@1" | "people:workemail:profileurl:waterfall@1" | "person:workemail:profileurl:waterfall@1" | "people:identity:email:waterfall@1" | "person:identity:email:waterfall@1" | "person:identity:email:waterfall@2" | "person:devprofileurl:profileurl:waterfall@1" | "http:request@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "input" | "system" | null; environment: "production" | "sandbox" | null; config_hash: string | null; input_hash: string | null; } | null; widgets?: { display_value?: { type?: "static"; label?: string; marks?: ("bold" | "italic" | "underline" | "strikethrough")[]; }; entity_logo?: { type?: "static"; image_url: string; entity: string; }; external_link?: { type?: "static"; url: string; }; location_indicator?: { type?: "static"; emoji: string; }; avatar?: { type?: "static"; image_url: string; name: string; }; waterfall?: { type?: "static"; attempted_providers: { provider: "pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom"; }[]; available_providers: ("pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom")[]; successful_provider?: "pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom"; }; icon?: { type?: "static"; key: "linkedin" | "job" | "seniority_c_suite" | "seniority_leadership" | "seniority_manager" | "seniority_senior_ic" | "seniority_ic" | "seniority_frontline" | "seniority_junior" | "seniority_unknown"; }; action_summary?: { type?: "static"; result_status: "completed" | "failed"; }; sources?: { type?: "static"; list: { source: string; description?: string; url: string; }[]; }; confidence?: { type?: "static"; numeric: number; }; emoji?: { type?: "static"; value: string; }; }; format: "json_object" | "json_list" | "json_list_string" | "url" | "website_url" | "profile_url" | "email" | "datetime" | "currency" | "date" | "phone" | "markdown" | "long_text" | "text" | "int" | "decimal" | "address_line_1" | "zip_code" | "percent" | "domain" | null; }; }; }; }; status: "completed" | "failed" | "pending" | "processing" | "canceled"; credits?: components["schemas"]["RunCreditsSchema"]; }>; waitUntilComplete: (runId: string | Promise, options?: { /** * Callback invoked on each poll with the current status */ onPoll?: (_response: PipesResponse) => unknown; /** * AbortSignal to cancel the polling operation */ signal?: AbortSignal; /** * Cancel the run server-side (best-effort) when the signal aborts. * @default the instance `cancelOnAbort` (true) */ cancelOnAbort?: boolean; }) => Promise; /** * Process a large payload by batching the input array through a rolling * pool: the next batch is submitted whenever a concurrency slot is free * AND the capacity estimate says it would still be admitted at * `priorityFloor` or better (see the X-P1/P2/P3-Capacity headers). * @param payload - The pipe request payload with a large input array * @param options - Batching options * @returns Array of completed batch responses */ pipeInBatches: (payload: PipesRequest, { stopOnError, priorityFloor, cancelOnAbort, ...options }?: BatchOptions) => Promise; }; searches: { /** * Create and immediately wait for completion (convenience method) */ search: (payload: SearchRequest, options?: { onPoll?: (_response: SearchResponse) => unknown; signal?: AbortSignal; cancelOnAbort?: boolean; }) => Promise; /** * Create a searches task but don't wait for it. * Use this if you want fire and forget. */ create: (payload: SearchRequest, options?: { signal?: AbortSignal; }) => Promise; /** * Check the status of a search task manually. */ check: (runId: string, options?: { signal?: AbortSignal; }) => Promise<{ id: string; status: "completed" | "failed" | "pending" | "processing" | "canceled"; search_id: "companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "research:agent@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1"; errors: { code: string; message: string; path?: string; }[]; results: { [key: string]: { value: string | number | boolean | null | { [key: string]: unknown; } | unknown[]; status: "completed" | "failed" | "pending" | "queued" | "processing" | "no_result" | "skipped"; type?: "string" | "number" | "boolean" | "json" | "unknown"; format?: "json_object" | "json_list" | "json_list_string" | "url" | "website_url" | "profile_url" | "email" | "datetime" | "currency" | "date" | "phone" | "markdown" | "long_text" | "text" | "int" | "decimal" | "address_line_1" | "zip_code" | "percent" | "domain" | null; resolved_by?: { ref: "prompt:run@1" | "agent:run@1" | "company:newssummary:website@1" | "company:newssummary:domain@1" | "company:techstack:builtwith@1" | "company:techstack:builtwith@2" | "company:websiteurl:email@1" | "company:domain:workemail@1" | "company:funding:leadmagic@1" | "company:funding:waterfall@1" | "people:workemail:waterfall@1" | "person:workemail:waterfall@1" | "people:email:iswork@1" | "email:iswork@1" | "people:name:split@1" | "person:name:split@1" | "person:name:join@1" | "people:email:validate:zerobounce@2" | "email:validate:zerobounce@1" | "company:overview@1" | "company:overview@2" | "company:overview@3" | "json:extract:multi@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "email:draft:gmail@1" | "message:send:slack@1" | "message:send-direct:slack@1" | "template:fill@1" | "contact:create:resend@1" | "lead:enroll:lemlist@1" | "contact:match:hubspot@1" | "company:match:hubspot@1" | "deal:match:hubspot@1" | "object:update:hubspot@1" | "object:associations:hubspot@1" | "activity:log:hubspot@1" | "person:match:salesforce@1" | "account:match:salesforce@1" | "opportunity:match:salesforce@1" | "record:lookup:salesforce@1" | "record:update:salesforce@1" | "record:assert:salesforce@1" | "activities:find:salesforce@1" | "activity:log:salesforce@1" | "person:match:attio@1" | "company:match:attio@1" | "deal:match:attio@1" | "record:match:attio@1" | "record:lookup:attio@1" | "record:update:attio@1" | "activities:find:attio@1" | "lead:enroll:amplemarket@1" | "people:match:role:waterfall@1" | "role:waterfall@1" | "roles:waterfall@1" | "company:identity@2" | "company:identity@3" | "company:identity:crustdata@1" | "people:phone:profile:waterfall@1" | "person:mobile:profileurl:waterfall@1" | "people:personalemail:profile:waterfall@1" | "person:personalemail:profileurl:waterfall@1" | "people:profile:waterfall@1" | "person:profile:waterfall@1" | "person:profile:waterfall@2" | "people:profileurl:email:waterfall@1" | "person:profileurl:email:waterfall@1" | "person:profileurl:name@1" | "person:email:validate:millionverifier@1" | "person:mobile:workemail:waterfall@1" | "fields:merge@1" | "field:slugify@1" | "field:domainify@1" | "field:timestamp@1" | "formula:run@1" | "signals:personprofilematch@1" | "website:scrape:firecrawl@1" | "website:extract:parallel@1" | "website:markdown:parallel@1" | "row:append:sheet@1" | "row:expandappend:sheet@1" | "row:roundrobin:sheet@1" | "bucket:claim@1" | "stream:enroll@1" | "stream:unenroll@1" | "bucket:count@1" | "bucket:check@1" | "bucket:countif@1" | "rows:find:sheet@1" | "rows:delete:sheet@1" | "rows:find:postgres@1" | "rows:find:databricks@1" | "company:lookalikes:companyenrich@2" | "person:posts:content:crustdata@1" | "profile:posts:x@1" | "post:create:x@1" | "ads:linkedin:waterfall@1" | "ads:google:waterfall@1" | "ads:meta:waterfall@1" | "company:match:crustdata@1" | "company:match:crustdata@2" | "company:match:amplemarket@1" | "company:jobs:amplemarket@1" | "people:profile:workemail:crustdata@1" | "person:profile:workemail:crustdata@1" | "people:workemail:profileurl:waterfall@1" | "person:workemail:profileurl:waterfall@1" | "people:identity:email:waterfall@1" | "person:identity:email:waterfall@1" | "person:identity:email:waterfall@2" | "person:devprofileurl:profileurl:waterfall@1" | "http:request@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "input" | "system" | null; environment: "production" | "sandbox" | null; config_hash: string | null; input_hash: string | null; } | null; widgets?: { display_value?: { type?: "static"; label?: string; marks?: ("bold" | "italic" | "underline" | "strikethrough")[]; }; entity_logo?: { type?: "static"; image_url: string; entity: string; }; external_link?: { type?: "static"; url: string; }; location_indicator?: { type?: "static"; emoji: string; }; avatar?: { type?: "static"; image_url: string; name: string; }; waterfall?: { type?: "static"; attempted_providers: { provider: "pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom"; }[]; available_providers: ("pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom")[]; successful_provider?: "pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom"; }; icon?: { type?: "static"; key: "linkedin" | "job" | "seniority_c_suite" | "seniority_leadership" | "seniority_manager" | "seniority_senior_ic" | "seniority_ic" | "seniority_frontline" | "seniority_junior" | "seniority_unknown"; }; action_summary?: { type?: "static"; result_status: "completed" | "failed"; }; sources?: { type?: "static"; list: { source: string; description?: string; url: string; }[]; }; confidence?: { type?: "static"; numeric: number; }; emoji?: { type?: "static"; value: string; }; }; } | null; }[]; organization_id: string; next_page: components["schemas"]["SearchPayloadSchema"]; pagination_type: "cursor" | "page_number" | null; total_pages: number | null; field_definitions?: { [key: string]: { type: "string" | "number" | "boolean" | "json" | "unknown"; label?: string | null; format?: "json_object" | "json_list" | "json_list_string" | "url" | "website_url" | "profile_url" | "email" | "datetime" | "currency" | "date" | "phone" | "markdown" | "long_text" | "text" | "int" | "decimal" | "address_line_1" | "zip_code" | "percent" | "domain" | null; json_metadata?: { example_value?: unknown; schema?: unknown; } | null; order?: number | null; hidden?: boolean | null; }; }; credits?: components["schemas"]["RunCreditsSchema"]; }>; /** * Cancel a still-pending search run. It returns to your organization's * capacity immediately. Runs that are already processing or finished * throw a {@link Pipe0ServerError} with `status: 409`. */ cancel: (runId: string, options?: { signal?: AbortSignal; }) => Promise<{ id: string; status: "completed" | "failed" | "pending" | "processing" | "canceled"; search_id: "companies:profiles:crustdata@1" | "companies:profiles:crustdata@2" | "companies:profiles:crustdata@3" | "companies:profiles:amplemarket@1" | "companies:profiles:amplemarket@2" | "jobs:crustdata@1" | "people:profiles:crustdata@1" | "people:profiles:crustdata@2" | "people:profiles:crustdata@3" | "people:profiles:amplemarket@1" | "people:profiles:amplemarket@2" | "companies:entitysearch:parallel@1" | "people:entitysearch:parallel@1" | "research:agent@1" | "people:eventguests:luma@1" | "people:channelmembers:slack@1" | "events:googlecalendar@1" | "sheet:rows@1" | "bucket:entries@1" | "query:postgres@1" | "query:databricks@1" | "posts:content:crustdata@1" | "posts:x@1" | "people:followers:x@1" | "people:followers:self:x@1" | "contacts:hubspot@1" | "companies:hubspot@1" | "deals:hubspot@1" | "owners:hubspot@1" | "contacts:salesforce@1" | "leads:salesforce@1" | "accounts:salesforce@1" | "opportunities:salesforce@1" | "users:salesforce@1" | "query:salesforce@1" | "people:attio@1" | "companies:attio@1" | "deals:attio@1" | "records:attio@1" | "entries:attio@1" | "query:attio@1" | "users:attio@1"; errors: { code: string; message: string; path?: string; }[]; results: { [key: string]: { value: string | number | boolean | null | { [key: string]: unknown; } | unknown[]; status: "completed" | "failed" | "pending" | "queued" | "processing" | "no_result" | "skipped"; type?: "string" | "number" | "boolean" | "json" | "unknown"; format?: "json_object" | "json_list" | "json_list_string" | "url" | "website_url" | "profile_url" | "email" | "datetime" | "currency" | "date" | "phone" | "markdown" | "long_text" | "text" | "int" | "decimal" | "address_line_1" | "zip_code" | "percent" | "domain" | null; resolved_by?: { ref: "prompt:run@1" | "agent:run@1" | "company:newssummary:website@1" | "company:newssummary:domain@1" | "company:techstack:builtwith@1" | "company:techstack:builtwith@2" | "company:websiteurl:email@1" | "company:domain:workemail@1" | "company:funding:leadmagic@1" | "company:funding:waterfall@1" | "people:workemail:waterfall@1" | "person:workemail:waterfall@1" | "people:email:iswork@1" | "email:iswork@1" | "people:name:split@1" | "person:name:split@1" | "person:name:join@1" | "people:email:validate:zerobounce@2" | "email:validate:zerobounce@1" | "company:overview@1" | "company:overview@2" | "company:overview@3" | "json:extract:multi@1" | "email:write@1" | "message:write@1" | "email:send:resend@1" | "email:send:gmail@1" | "email:draft:gmail@1" | "message:send:slack@1" | "message:send-direct:slack@1" | "template:fill@1" | "contact:create:resend@1" | "lead:enroll:lemlist@1" | "contact:match:hubspot@1" | "company:match:hubspot@1" | "deal:match:hubspot@1" | "object:update:hubspot@1" | "object:associations:hubspot@1" | "activity:log:hubspot@1" | "person:match:salesforce@1" | "account:match:salesforce@1" | "opportunity:match:salesforce@1" | "record:lookup:salesforce@1" | "record:update:salesforce@1" | "record:assert:salesforce@1" | "activities:find:salesforce@1" | "activity:log:salesforce@1" | "person:match:attio@1" | "company:match:attio@1" | "deal:match:attio@1" | "record:match:attio@1" | "record:lookup:attio@1" | "record:update:attio@1" | "activities:find:attio@1" | "lead:enroll:amplemarket@1" | "people:match:role:waterfall@1" | "role:waterfall@1" | "roles:waterfall@1" | "company:identity@2" | "company:identity@3" | "company:identity:crustdata@1" | "people:phone:profile:waterfall@1" | "person:mobile:profileurl:waterfall@1" | "people:personalemail:profile:waterfall@1" | "person:personalemail:profileurl:waterfall@1" | "people:profile:waterfall@1" | "person:profile:waterfall@1" | "person:profile:waterfall@2" | "people:profileurl:email:waterfall@1" | "person:profileurl:email:waterfall@1" | "person:profileurl:name@1" | "person:email:validate:millionverifier@1" | "person:mobile:workemail:waterfall@1" | "fields:merge@1" | "field:slugify@1" | "field:domainify@1" | "field:timestamp@1" | "formula:run@1" | "signals:personprofilematch@1" | "website:scrape:firecrawl@1" | "website:extract:parallel@1" | "website:markdown:parallel@1" | "row:append:sheet@1" | "row:expandappend:sheet@1" | "row:roundrobin:sheet@1" | "bucket:claim@1" | "stream:enroll@1" | "stream:unenroll@1" | "bucket:count@1" | "bucket:check@1" | "bucket:countif@1" | "rows:find:sheet@1" | "rows:delete:sheet@1" | "rows:find:postgres@1" | "rows:find:databricks@1" | "company:lookalikes:companyenrich@2" | "person:posts:content:crustdata@1" | "profile:posts:x@1" | "post:create:x@1" | "ads:linkedin:waterfall@1" | "ads:google:waterfall@1" | "ads:meta:waterfall@1" | "company:match:crustdata@1" | "company:match:crustdata@2" | "company:match:amplemarket@1" | "company:jobs:amplemarket@1" | "people:profile:workemail:crustdata@1" | "person:profile:workemail:crustdata@1" | "people:workemail:profileurl:waterfall@1" | "person:workemail:profileurl:waterfall@1" | "people:identity:email:waterfall@1" | "person:identity:email:waterfall@1" | "person:identity:email:waterfall@2" | "person:devprofileurl:profileurl:waterfall@1" | "http:request@1" | "company:identity@1" | "people:professionalprofile:waterfall@1" | "people:professionalprofileurl:name@1" | "people:professionalprofileurl:email:waterfall@1" | "input" | "system" | null; environment: "production" | "sandbox" | null; config_hash: string | null; input_hash: string | null; } | null; widgets?: { display_value?: { type?: "static"; label?: string; marks?: ("bold" | "italic" | "underline" | "strikethrough")[]; }; entity_logo?: { type?: "static"; image_url: string; entity: string; }; external_link?: { type?: "static"; url: string; }; location_indicator?: { type?: "static"; emoji: string; }; avatar?: { type?: "static"; image_url: string; name: string; }; waterfall?: { type?: "static"; attempted_providers: { provider: "pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom"; }[]; available_providers: ("pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom")[]; successful_provider?: "pipe0" | "findymail" | "crustdata" | "hunter" | "zerobounce" | "millionverifier" | "googlemaps" | "gemini" | "anthropic" | "leadmagic" | "mixrank" | "builtwith" | "perplexity" | "serper" | "icypeas" | "prospeo" | "clado" | "resend" | "slack" | "gmail" | "googlecalendar" | "firecrawl" | "exa" | "openai" | "companyenrich" | "logodev" | "amplemarket" | "parallel" | "surfe" | "wiza" | "aviato" | "forager" | "luma" | "postgres" | "databricks" | "lemlist" | "hubspot" | "salesforce" | "attio" | "x" | "hackernews" | "calcom"; }; icon?: { type?: "static"; key: "linkedin" | "job" | "seniority_c_suite" | "seniority_leadership" | "seniority_manager" | "seniority_senior_ic" | "seniority_ic" | "seniority_frontline" | "seniority_junior" | "seniority_unknown"; }; action_summary?: { type?: "static"; result_status: "completed" | "failed"; }; sources?: { type?: "static"; list: { source: string; description?: string; url: string; }[]; }; confidence?: { type?: "static"; numeric: number; }; emoji?: { type?: "static"; value: string; }; }; } | null; }[]; organization_id: string; next_page: components["schemas"]["SearchPayloadSchema"]; pagination_type: "cursor" | "page_number" | null; total_pages: number | null; field_definitions?: { [key: string]: { type: "string" | "number" | "boolean" | "json" | "unknown"; label?: string | null; format?: "json_object" | "json_list" | "json_list_string" | "url" | "website_url" | "profile_url" | "email" | "datetime" | "currency" | "date" | "phone" | "markdown" | "long_text" | "text" | "int" | "decimal" | "address_line_1" | "zip_code" | "percent" | "domain" | null; json_metadata?: { example_value?: unknown; schema?: unknown; } | null; order?: number | null; hidden?: boolean | null; }; }; credits?: components["schemas"]["RunCreditsSchema"]; }>; /** * Poll until the search completes or fails. */ waitUntilComplete: (runId: string | Promise, options?: { onPoll?: (_response: SearchResponse) => unknown; signal?: AbortSignal; /** * Cancel the run server-side (best-effort) when the signal aborts. * @default the instance `cancelOnAbort` (true) */ cancelOnAbort?: boolean; }) => Promise; /** * Run several searches concurrently, auto-paginate each, and return one merged * (optionally deduped) result set. Pagination is detected from each response's * `next_page` token — which is itself a ready-to-send payload — so cursor- and * page-number-based searches are handled transparently. * * @example * const { results } = await pipe0.searches.searchAll({ * config: { environment: "production" }, * dedupeBy: ["company_domain"], * maxPages: 3, * searches: [ * { search: { search_id: "companies:profiles:crustdata@2", config: { filters } } }, * { search: { search_id: "companies:profiles:amplemarket@2", config: { filters } } }, * ], * }); */ searchAll: ({ searches, config, dedupeBy, maxPages, normalize, maxConcurrency, signal, stopOnError, cancelOnAbort }: SearchAllOptions) => Promise; }; sheets: { effects: { /** * Start an effects run on a sheet and return as soon as the server has * accepted it — the effects themselves keep running server-side, so the * returned run is normally still `processing`. This is the fire-and-forget * entry point; poll with `check` / `waitUntilComplete` only if you care * about the outcome. * * @example * await pipe0.sheets.effects.run(sheetId, { * config: { run_added_rows: true }, * effects: [ * { * effect_id: "rows:add@1", * connector: null, * config: { input: [{ email: "ada@example.com" }], allow_field_creation: false }, * }, * ], * }); */ run: (sheetId: string, payload: SheetEffectsRequest) => Promise; /** * Check the status of an effects run manually. */ check: (sheetId: string, runId: string, options?: { signal?: AbortSignal; }) => Promise; /** * Poll until the effects run concludes (`completed` / `skipped`), fails, * or is canceled. */ waitUntilComplete: (sheetId: string, runId: string | Promise, options?: { onPoll?: (_response: SheetEffectsResponse) => unknown; signal?: AbortSignal; }) => Promise; /** * Run the effects and wait for the run to conclude (convenience method). */ runUntilComplete: (sheetId: string, payload: SheetEffectsRequest, options?: { onPoll?: (_response: SheetEffectsResponse) => unknown; signal?: AbortSignal; }) => Promise; }; }; private sleep; } //#endregion export { BatchOptions, Pipe0, Pipe0AbortError, Pipe0BatchError, Pipe0CanceledError, Pipe0Options, Pipe0RateLimitError, Pipe0ServerError, Pipe0TaskError, Pipe0TimeoutError, PipesRequest, PipesResponse, SearchAllItem, SearchAllOptions, SearchAllResult, SearchRequest, SearchResponse, SearchesRequest, SearchesResponse, SheetEffectsRequest, SheetEffectsResponse }; //# sourceMappingURL=pipe0.d.mts.map