import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import * as Extend from "../../../index"; export declare namespace ExtractorsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class ExtractorsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options: ExtractorsClient.Options); /** * List all extractors. * * Returns a summary of each extractor. Use `GET /extractors/{id}` to retrieve the full object including `draftVersion`. * * @param {Extend.ExtractorsListRequest} request * @param {ExtractorsClient.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.extractors.list({ * nextPageToken: "xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ=" * }) */ list(request?: Extend.ExtractorsListRequest, requestOptions?: ExtractorsClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Create a new extractor. * * You can optionally provide a `generate` object to automatically generate an extraction schema from sample documents using AI. `generate` is mutually exclusive with `config` and `cloneExtractorId`. * * @param {Extend.ExtractorsCreateRequest} request * @param {ExtractorsClient.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.extractors.create({ * name: "Invoice Extractor", * config: { * schema: { * "type": "object", * "properties": { * "vendor_name": { * "type": [ * "string", * "null" * ], * "description": "The name of the vendor" * }, * "invoice_number": { * "type": [ * "string", * "null" * ], * "description": "The invoice number" * }, * "total_amount": { * "type": [ * "number", * "null" * ], * "description": "The total amount due" * } * } * } * } * }) * * @example * await client.extractors.create({ * name: "Invoice Extractor", * generate: { * files: [{ * url: "https://example.com/sample-invoice.pdf" * }], * instructions: "US tax invoice with line items, vendor details, and total amount" * } * }) */ create(request: Extend.ExtractorsCreateRequest, requestOptions?: ExtractorsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Get details of an extractor. * * @param {string} id - The ID of the extractor to get. * * Example: `"ex_Xj8mK2pL9nR4vT7qY5wZ"` * @param {Extend.ExtractorsRetrieveRequest} request * @param {ExtractorsClient.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.extractors.retrieve("extractor_id_here") */ retrieve(id: string, request?: Extend.ExtractorsRetrieveRequest, requestOptions?: ExtractorsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Update an existing extractor. * * @param {string} id - The ID of the extractor to update. * * Example: `"ex_Xj8mK2pL9nR4vT7qY5wZ"` * @param {Extend.ExtractorsUpdateRequest} request * @param {ExtractorsClient.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.extractors.update("extractor_id_here", { * name: "Invoice Extractor v2" * }) */ update(id: string, request?: Extend.ExtractorsUpdateRequest, requestOptions?: ExtractorsClient.RequestOptions): core.HttpResponsePromise; private __update; }