import { Dispatcher } from "undici"; import { ApiSettings } from "./apiSettings.js"; import { BaseProductParameters } from "../index.js"; import { BaseSearchParameters, BaseAnnotationParameters, BaseRagDocumentUploadParameters } from "../clientOptions/index.js"; import { JobResponse } from "../parsing/index.js"; import { InputSource, LocalInputSource } from "../../input/index.js"; import { BaseProduct } from "../product/baseProduct.js"; import { BaseSearch } from "../search/baseSearch.js"; /** * Mindee V2 API handler. */ export declare class MindeeApiV2 { #private; settings: ApiSettings; constructor(dispatcher?: Dispatcher, apiKey?: string); /** * Send a file to the asynchronous processing queue for inference processing. * @param product Product to enqueue. * @param inputSource Local or remote file as an input. * @param params {ExtractionParameters} parameters relating to the enqueueing options. */ reqPostProductEnqueue(product: typeof BaseProduct, inputSource: InputSource, params: BaseProductParameters): Promise; /** * Get the status of an inference that was previously enqueued. * Throws an error if the server's response contains an error. * @param jobId The Job ID as returned by the enqueue request. * @returns a `Promise` containing the job response. */ reqGetJobById(jobId: string): Promise; /** * Get the status of an inference that was previously enqueued. * Throws an error if the server's response contains an error. * @param pollingUrl The polling URL as returned by a Job's pollingUrl property. * @returns a `Promise` containing the job response. */ reqGetJobByUrl(pollingUrl: string): Promise; /** * Get the result of an inference that was previously enqueued. * Throws an error if the server's response contains an error. * @param product * @param inferenceId The inference ID for the result. * @returns a `Promise` containing the parsed result. */ reqGetResultById

(product: P, inferenceId: string): Promise>; /** * Get the result of an inference that was previously enqueued. * Throws an error if the server's response contains an error. * @param product * @param url The URL as returned by a Job's resultUrl property. * @returns a `Promise` containing the parsed result. */ reqGetResultByUrl

(product: P, url: string): Promise>; /** * Retrieves a list of resources with the given criteria. * @param search Search definition class to use. * @param parameters Search parameters. * @returns a `Promise` containing the search response. */ reqGetSearch(search: S, parameters: BaseSearchParameters): Promise>; /** * Get a document's info and annotations from the RAG database. * @param product the product definition to use. * @param documentId the document id to get. * @returns a `Promise` containing an annotation response. */ reqGetRagAnnotation

(product: P, documentId: string): Promise>; /** * Add a document to the RAG database. * @param product the product definition to use. * @param parameters the parameters to use. * @param inputSource the file to upload. * @returns a `Promise` containing an annotation response. */ reqPostRagDocument

(product: P, parameters: BaseRagDocumentUploadParameters, inputSource: LocalInputSource): Promise>; /** * Update a document's annotations in the RAG database. * @param product the product definition to use. * @param parameters the parameters to use. * @returns a `Promise` containing an annotation response. */ reqPatchRagAnnotation

(product: P, parameters: BaseAnnotationParameters): Promise>; /** * Deletes a document from the RAG database. * @param product the product definition to use. * @param documentId the document's ID. * @returns true if the document was deleted successfully, false otherwise. */ reqDeleteRagDocument

(product: P, documentId: string): Promise; }