import * as Extend from "./api/index"; import { BatchProcessorRunClient } from "./api/resources/batchProcessorRun/client/Client"; import { BatchRunsClient } from "./api/resources/batchRuns/client/Client"; import { ClassifiersClient } from "./api/resources/classifiers/client/Client"; import { ClassifierVersionsClient } from "./api/resources/classifierVersions/client/Client"; import { ClassifyRunsClient } from "./api/resources/classifyRuns/client/Client"; import { EditRunsClient } from "./api/resources/editRuns/client/Client"; import { EditSchemasClient } from "./api/resources/editSchemas/client/Client"; import { EditTemplatesClient } from "./api/resources/editTemplates/client/Client"; import { EvaluationSetItemsClient } from "./api/resources/evaluationSetItems/client/Client"; import { EvaluationSetRunsClient } from "./api/resources/evaluationSetRuns/client/Client"; import { EvaluationSetsClient } from "./api/resources/evaluationSets/client/Client"; import { ExtractorsClient } from "./api/resources/extractors/client/Client"; import { ExtractorVersionsClient } from "./api/resources/extractorVersions/client/Client"; import { ExtractRunsClient } from "./api/resources/extractRuns/client/Client"; import { FilesClient } from "./api/resources/files/client/Client"; import { ParseRunsClient } from "./api/resources/parseRuns/client/Client"; import { ProcessorClient } from "./api/resources/processor/client/Client"; import { ProcessorRunClient } from "./api/resources/processorRun/client/Client"; import { ProcessorVersionClient } from "./api/resources/processorVersion/client/Client"; import { SplitRunsClient } from "./api/resources/splitRuns/client/Client"; import { SplittersClient } from "./api/resources/splitters/client/Client"; import { SplitterVersionsClient } from "./api/resources/splitterVersions/client/Client"; import { WebhookEndpointsClient } from "./api/resources/webhookEndpoints/client/Client"; import { WebhookSubscriptionsClient } from "./api/resources/webhookSubscriptions/client/Client"; import { WorkflowRunsClient } from "./api/resources/workflowRuns/client/Client"; import { WorkflowsClient } from "./api/resources/workflows/client/Client"; import { WorkflowVersionsClient } from "./api/resources/workflowVersions/client/Client"; import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient"; import { type NormalizedClientOptionsWithAuth } from "./BaseClient"; import * as core from "./core"; export declare namespace ExtendClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class ExtendClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _files: FilesClient | undefined; protected _parseRuns: ParseRunsClient | undefined; protected _editRuns: EditRunsClient | undefined; protected _editTemplates: EditTemplatesClient | undefined; protected _editSchemas: EditSchemasClient | undefined; protected _extractRuns: ExtractRunsClient | undefined; protected _extractors: ExtractorsClient | undefined; protected _extractorVersions: ExtractorVersionsClient | undefined; protected _classifyRuns: ClassifyRunsClient | undefined; protected _classifiers: ClassifiersClient | undefined; protected _classifierVersions: ClassifierVersionsClient | undefined; protected _splitRuns: SplitRunsClient | undefined; protected _splitters: SplittersClient | undefined; protected _splitterVersions: SplitterVersionsClient | undefined; protected _workflows: WorkflowsClient | undefined; protected _workflowVersions: WorkflowVersionsClient | undefined; protected _workflowRuns: WorkflowRunsClient | undefined; protected _processorRun: ProcessorRunClient | undefined; protected _processor: ProcessorClient | undefined; protected _processorVersion: ProcessorVersionClient | undefined; protected _batchProcessorRun: BatchProcessorRunClient | undefined; protected _batchRuns: BatchRunsClient | undefined; protected _evaluationSets: EvaluationSetsClient | undefined; protected _evaluationSetItems: EvaluationSetItemsClient | undefined; protected _evaluationSetRuns: EvaluationSetRunsClient | undefined; protected _webhookEndpoints: WebhookEndpointsClient | undefined; protected _webhookSubscriptions: WebhookSubscriptionsClient | undefined; constructor(options: ExtendClient.Options); get files(): FilesClient; get parseRuns(): ParseRunsClient; get editRuns(): EditRunsClient; get editTemplates(): EditTemplatesClient; get editSchemas(): EditSchemasClient; get extractRuns(): ExtractRunsClient; get extractors(): ExtractorsClient; get extractorVersions(): ExtractorVersionsClient; get classifyRuns(): ClassifyRunsClient; get classifiers(): ClassifiersClient; get classifierVersions(): ClassifierVersionsClient; get splitRuns(): SplitRunsClient; get splitters(): SplittersClient; get splitterVersions(): SplitterVersionsClient; get workflows(): WorkflowsClient; get workflowVersions(): WorkflowVersionsClient; get workflowRuns(): WorkflowRunsClient; get processorRun(): ProcessorRunClient; get processor(): ProcessorClient; get processorVersion(): ProcessorVersionClient; get batchProcessorRun(): BatchProcessorRunClient; get batchRuns(): BatchRunsClient; get evaluationSets(): EvaluationSetsClient; get evaluationSetItems(): EvaluationSetItemsClient; get evaluationSetRuns(): EvaluationSetRunsClient; get webhookEndpoints(): WebhookEndpointsClient; get webhookSubscriptions(): WebhookSubscriptionsClient; /** * Parse a file synchronously, waiting for the result before returning. This endpoint has a **5-minute timeout** — if processing takes longer, the request will fail. * * **Note:** This endpoint is intended for onboarding and testing only. For production workloads, use `POST /parse_runs` with [polling or webhooks](https://docs.extend.ai/2026-02-09/developers/async-processing) instead, as it provides better reliability for large files and avoids timeout issues. * * The Parse endpoint allows you to convert documents into structured, machine-readable formats with fine-grained control over the parsing process. This endpoint is ideal for extracting cleaned document content to be used as context for downstream processing, e.g. RAG pipelines, custom ingestion pipelines, embeddings classification, etc. * * For more details, see the [Parse File guide](https://docs.extend.ai/2026-02-09/product/parsing/parse). * * @param {Extend.ParseRequest} request * @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.parse({ * file: { * url: "https://example.com/bank_statement.pdf", * name: "bank_statement.pdf" * } * }) */ parse(request: Extend.ParseRequest, requestOptions?: ExtendClient.RequestOptions): core.HttpResponsePromise; private __parse; /** * Edit a file synchronously, waiting for the result before returning. This endpoint has a **5-minute timeout** — if processing takes longer, the request will fail. * * **Note:** This endpoint is intended for onboarding and testing only. For production workloads, use `POST /edit_runs` with [polling or webhooks](https://docs.extend.ai/2026-02-09/developers/async-processing) instead, as it provides better reliability for large files and avoids timeout issues. * * The Edit endpoint allows you to detect and fill form fields in PDF documents. * * For more details, see the [Edit File guide](https://docs.extend.ai/2026-02-09/product/editing/edit). * * @param {Extend.EditRequest} request * @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.edit({ * file: { * url: "https://example.com/form.pdf" * }, * config: { * instructions: "Fill out the form with the provided data", * advancedOptions: { * flattenPdf: true * } * } * }) */ edit(request: Extend.EditRequest, requestOptions?: ExtendClient.RequestOptions): core.HttpResponsePromise; private __edit; /** * Extract structured data from a file synchronously, waiting for the result before returning. This endpoint has a **5-minute timeout** — if processing takes longer, the request will fail. * * **Note:** This endpoint is intended for onboarding and testing only. For production workloads, use `POST /extract_runs` with [polling or webhooks](https://docs.extend.ai/2026-02-09/developers/async-processing) instead, as it provides better reliability for large files and avoids timeout issues. * * The Extract endpoint allows you to extract structured data from files using an existing extractor or an inline configuration. * * For more details, see the [Extract File guide](https://docs.extend.ai/2026-02-09/product/extraction/quick-start-5-minutes). * * @param {Extend.ExtractRequest} request * @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.extract({ * config: { * schema: { * "type": "object", * "properties": { * "vendor_name": { * "type": "string", * "description": "The name of the vendor" * }, * "invoice_number": { * "type": "string", * "description": "The invoice number" * }, * "total_amount": { * "type": "number", * "description": "The total amount due" * } * } * } * }, * file: { * url: "https://example.com/invoice.pdf" * } * }) */ extract(request: Extend.ExtractRequest, requestOptions?: ExtendClient.RequestOptions): core.HttpResponsePromise; private __extract; /** * Classify a document synchronously, waiting for the result before returning. This endpoint has a **5-minute timeout** — if processing takes longer, the request will fail. * * **Note:** This endpoint is intended for onboarding and testing only. For production workloads, use `POST /classify_runs` with [polling or webhooks](https://docs.extend.ai/2026-02-09/developers/async-processing) instead, as it provides better reliability for large files and avoids timeout issues. * * The Classify endpoint allows you to classify documents using an existing classifier or an inline configuration. * * For more details, see the [Classify File guide](https://docs.extend.ai/2026-02-09/product/classification/configuring-a-classifier). * * @param {Extend.ClassifyRequest} request * @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.classify({ * config: { * classifications: [{ * id: "invoice", * type: "invoice", * description: "An invoice or bill for goods or services" * }, { * id: "receipt", * type: "receipt", * description: "A receipt confirming payment" * }, { * id: "other", * type: "other", * description: "Any other document type" * }] * }, * file: { * url: "https://example.com/document.pdf" * } * }) */ classify(request: Extend.ClassifyRequest, requestOptions?: ExtendClient.RequestOptions): core.HttpResponsePromise; private __classify; /** * Split a document synchronously, waiting for the result before returning. This endpoint has a **5-minute timeout** — if processing takes longer, the request will fail. * * **Note:** This endpoint is intended for onboarding and testing only. For production workloads, use `POST /split_runs` with [polling or webhooks](https://docs.extend.ai/2026-02-09/developers/async-processing) instead, as it provides better reliability for large files and avoids timeout issues. * * The Split endpoint allows you to split documents into multiple parts using an existing splitter or an inline configuration. * * For more details, see the [Split File guide](https://docs.extend.ai/2026-02-09/product/splitting/configuring-a-splitter). * * @param {Extend.SplitRequest} request * @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.split({ * config: { * splitClassifications: [{ * id: "invoice", * type: "invoice", * description: "An invoice or bill for goods or services", * identifierKey: "invoice number from the document header" * }, { * id: "receipt", * type: "receipt", * description: "A receipt confirming payment", * identifierKey: "receipt number" * }, { * id: "other", * type: "other", * description: "Any other document type" * }] * }, * file: { * url: "https://example.com/multi-document.pdf" * } * }) */ split(request: Extend.SplitRequest, requestOptions?: ExtendClient.RequestOptions): core.HttpResponsePromise; private __split; }