/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 92260edceeea
 */
import { betaLibrariesDocumentsDelete } from "../funcs/betaLibrariesDocumentsDelete.js";
import { betaLibrariesDocumentsExtractedTextSignedUrl } from "../funcs/betaLibrariesDocumentsExtractedTextSignedUrl.js";
import { betaLibrariesDocumentsGet } from "../funcs/betaLibrariesDocumentsGet.js";
import { betaLibrariesDocumentsGetSignedUrl } from "../funcs/betaLibrariesDocumentsGetSignedUrl.js";
import { betaLibrariesDocumentsLibrariesDocumentsUpdateV1 } from "../funcs/betaLibrariesDocumentsLibrariesDocumentsUpdateV1.js";
import { betaLibrariesDocumentsList } from "../funcs/betaLibrariesDocumentsList.js";
import { betaLibrariesDocumentsReprocess } from "../funcs/betaLibrariesDocumentsReprocess.js";
import { betaLibrariesDocumentsStatus } from "../funcs/betaLibrariesDocumentsStatus.js";
import { betaLibrariesDocumentsTextContent } from "../funcs/betaLibrariesDocumentsTextContent.js";
import { betaLibrariesDocumentsUpdate } from "../funcs/betaLibrariesDocumentsUpdate.js";
import { betaLibrariesDocumentsUpload } from "../funcs/betaLibrariesDocumentsUpload.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Documents extends ClientSDK {
    /**
     * List documents in a given library.
     *
     * @remarks
     * Given a library, lists the document that have been uploaded to that library.
     */
    async list(request, options) {
        return unwrapAsync(betaLibrariesDocumentsList(this, request, options));
    }
    /**
     * Upload a new document.
     *
     * @remarks
     * Given a library, upload a new document to that library. It is queued for processing, it status will change it has been processed. The processing has to be completed in order be discoverable for the library search
     */
    async upload(request, options) {
        return unwrapAsync(betaLibrariesDocumentsUpload(this, request, options));
    }
    /**
     * Retrieve the metadata of a specific document.
     *
     * @remarks
     * Given a library and a document in this library, you can retrieve the metadata of that document.
     */
    async get(request, options) {
        return unwrapAsync(betaLibrariesDocumentsGet(this, request, options));
    }
    /**
     * Update the metadata of a specific document.
     *
     * @remarks
     * Given a library and a document in that library, update the name and/or attributes of that document.
     */
    async update(request, options) {
        return unwrapAsync(betaLibrariesDocumentsUpdate(this, request, options));
    }
    /**
     * Update the metadata of a specific document.
     *
     * @remarks
     * Given a library and a document in that library, update the name of that document.
     *
     * @deprecated method: Use the PATCH method instead. This PUT endpoint will be removed in a future version..
     */
    async librariesDocumentsUpdateV1(request, options) {
        return unwrapAsync(betaLibrariesDocumentsLibrariesDocumentsUpdateV1(this, request, options));
    }
    /**
     * Delete a document.
     *
     * @remarks
     * Given a library and a document in that library, delete that document. The document will be deleted from the library and the search index.
     */
    async delete(request, options) {
        return unwrapAsync(betaLibrariesDocumentsDelete(this, request, options));
    }
    /**
     * Retrieve the text content of a specific document.
     *
     * @remarks
     * Given a library and a document in that library, you can retrieve the text content of that document if it exists. For documents like pdf, docx and pptx the text content results from our processing using Mistral OCR.
     */
    async textContent(request, options) {
        return unwrapAsync(betaLibrariesDocumentsTextContent(this, request, options));
    }
    /**
     * Retrieve the processing status of a specific document.
     *
     * @remarks
     * Given a library and a document in that library, retrieve the processing status of that document.
     */
    async status(request, options) {
        return unwrapAsync(betaLibrariesDocumentsStatus(this, request, options));
    }
    /**
     * Retrieve the signed URL of a specific document.
     *
     * @remarks
     * Given a library and a document in that library, retrieve the signed URL of a specific document.The url will expire after 30 minutes and can be accessed by anyone with the link.
     */
    async getSignedUrl(request, options) {
        return unwrapAsync(betaLibrariesDocumentsGetSignedUrl(this, request, options));
    }
    /**
     * Retrieve the signed URL of text extracted from a given document.
     *
     * @remarks
     * Given a library and a document in that library, retrieve the signed URL of text extracted. For documents that are sent to the OCR this returns the result of the OCR queries.
     */
    async extractedTextSignedUrl(request, options) {
        return unwrapAsync(betaLibrariesDocumentsExtractedTextSignedUrl(this, request, options));
    }
    /**
     * Reprocess a document.
     *
     * @remarks
     * Given a library and a document in that library, reprocess that document, it will be billed again.
     */
    async reprocess(request, options) {
        return unwrapAsync(betaLibrariesDocumentsReprocess(this, request, options));
    }
}
//# sourceMappingURL=documents.js.map