/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as FernAI from "../../../index.js"; export declare namespace Document { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token?: core.Supplier; /** Additional headers to include in requests. */ headers?: Record | undefined>; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; } } export declare class Document { protected readonly _options: Document.Options; constructor(_options?: Document.Options); /** * @param {string} domain * @param {FernAI.CreateDocumentRequest} request * @param {Document.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.document.createDocument("domain", { * document: "document" * }) */ createDocument(domain: string, request: FernAI.CreateDocumentRequest, requestOptions?: Document.RequestOptions): core.HttpResponsePromise; private __createDocument; /** * @param {string} domain * @param {FernAI.CreateDocumentRequest[]} request * @param {Document.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.document.batchCreateDocument("domain", [{ * document: "document" * }]) */ batchCreateDocument(domain: string, request: FernAI.CreateDocumentRequest[], requestOptions?: Document.RequestOptions): core.HttpResponsePromise; private __batchCreateDocument; /** * @param {string} domain * @param {string} documentId * @param {Document.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.document.getDocumentById("domain", "document_id") */ getDocumentById(domain: string, documentId: string, requestOptions?: Document.RequestOptions): core.HttpResponsePromise; private __getDocumentById; /** * @param {string} domain * @param {string} documentId * @param {FernAI.UpdateDocumentRequest} request * @param {Document.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.document.updateDocument("domain", "document_id") */ updateDocument(domain: string, documentId: string, request?: FernAI.UpdateDocumentRequest, requestOptions?: Document.RequestOptions): core.HttpResponsePromise; private __updateDocument; /** * @param {string} domain * @param {FernAI.DeleteDocumentRequest} request * @param {Document.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.document.deleteDocumentById("domain", { * document_id: "document_id" * }) */ deleteDocumentById(domain: string, request: FernAI.DeleteDocumentRequest, requestOptions?: Document.RequestOptions): core.HttpResponsePromise; private __deleteDocumentById; /** * @param {string} domain * @param {FernAI.DeleteDocumentRequest[]} request * @param {Document.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.document.batchDeleteDocument("domain", [{ * document_id: "document_id" * }]) */ batchDeleteDocument(domain: string, request: FernAI.DeleteDocumentRequest[], requestOptions?: Document.RequestOptions): core.HttpResponsePromise; private __batchDeleteDocument; /** * @param {string} domain * @param {FernAI.GetDocumentsRequest} request * @param {Document.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.document.getDocuments("domain", { * page: 1, * limit: 1 * }) */ getDocuments(domain: string, request?: FernAI.GetDocumentsRequest, requestOptions?: Document.RequestOptions): core.HttpResponsePromise; private __getDocuments; /** * @param {string} domain * @param {Document.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link FernAI.UnprocessableEntityError} * * @example * await client.document.deleteAllDocuments("domain") */ deleteAllDocuments(domain: string, requestOptions?: Document.RequestOptions): core.HttpResponsePromise; private __deleteAllDocuments; protected _getAuthorizationHeader(): Promise; }