import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import * as Extend from "../../../index"; export declare namespace ProcessorRunClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class ProcessorRunClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options: ProcessorRunClient.Options); /** * List runs of a Processor. A ProcessorRun represents a single execution of a processor against a file. * * @param {Extend.ProcessorRunListRequest} request * @param {ProcessorRunClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * * @example * await client.processorRun.list({ * nextPageToken: "xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ=" * }) */ list(request?: Extend.ProcessorRunListRequest, requestOptions?: ProcessorRunClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Run processors (extraction, classification, splitting, etc.) on a given document. * * **Synchronous vs Asynchronous Processing:** * - **Asynchronous (default)**: Returns immediately with `PROCESSING` status. Use webhooks or polling to get results. * - **Synchronous**: Set `sync: true` to wait for completion and get final results in the response (5-minute timeout). * * **For asynchronous processing:** * - You can [configure webhooks](https://docs.extend.ai/2026-02-09/product/webhooks/configuration) to receive notifications when a processor run is complete or failed. * - Or you can [poll the get endpoint](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/legacy/get-processor-run) for updates on the status of the processor run. * * @param {Extend.ProcessorRunCreateRequest} request * @param {ProcessorRunClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.TooManyRequestsError} * * @example * await client.processorRun.create({ * processorId: "processor_id_here" * }) */ create(request: Extend.ProcessorRunCreateRequest, requestOptions?: ProcessorRunClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieve details about a specific processor run, including its status, outputs, and any edits made during review. * * A common use case for this endpoint is to poll for the status and final output of an async processor run when using the [Run Processor](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/legacy/create-processor-run) endpoint. For instance, if you do not want to not configure webhooks to receive the output via completion/failure events. * * @param {string} id - The unique identifier for this processor run. * * Example: `"exr_Xj8mK2pL9nR4vT7qY5wZ"` * @param {Extend.ProcessorRunGetRequest} request * @param {ProcessorRunClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.NotFoundError} * * @example * await client.processorRun.get("processor_run_id_here") */ get(id: string, request?: Extend.ProcessorRunGetRequest, requestOptions?: ProcessorRunClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Delete a processor run and all associated data from Extend. This operation is permanent and cannot be undone. * * This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers. * * @param {string} id - The ID of the processor run to delete. * * Example: `"exr_Xj8mK2pL9nR4vT7qY5wZ"` * @param {Extend.ProcessorRunDeleteRequest} request * @param {ProcessorRunClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.NotFoundError} * @throws {@link Extend.InternalServerError} * * @example * await client.processorRun.delete("processor_run_id_here") */ delete(id: string, request?: Extend.ProcessorRunDeleteRequest, requestOptions?: ProcessorRunClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Cancel a running processor run by its ID. This endpoint allows you to stop a processor run that is currently in progress. * * Note: Only processor runs with a status of `"PROCESSING"` can be cancelled. Processor runs that have already completed, failed, or been cancelled cannot be cancelled again. * * @param {string} id - The unique identifier for the processor run to cancel. * * Example: `"exr_Xj8mK2pL9nR4vT7qY5wZ"` * @param {Extend.ProcessorRunCancelRequest} request * @param {ProcessorRunClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.NotFoundError} * * @example * await client.processorRun.cancel("processor_run_id_here") */ cancel(id: string, request?: Extend.ProcessorRunCancelRequest, requestOptions?: ProcessorRunClient.RequestOptions): core.HttpResponsePromise; private __cancel; }