/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Vectara from "../../../index"; export declare namespace Index { interface Options { environment?: core.Supplier; token?: core.Supplier; /** Override the x-api-key header */ apiKey?: core.Supplier; fetcher?: core.FetchFunction; } 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; /** Override the x-api-key header */ apiKey?: string | undefined; /** Additional headers to include in the request. */ headers?: Record; } } /** * Index and manage both core and structured documents to enable efficient search and retrieval */ export declare class Index { protected readonly _options: Index.Options; constructor(_options?: Index.Options); /** * Updates document identified by its unique `document_id` from a specific * corpus. The request body metadata is merged with the existing metadata, * adding or modifying only the specified fields. * * @param {Vectara.CorpusKey} corpusKey - The unique key identifying the corpus with the document to update. * @param {string} documentId - The document ID of the document to update. * This `document_id` must be percent encoded. * @param {Vectara.UpdateCorpusDocumentRequest} request * @param {Index.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vectara.ForbiddenError} * @throws {@link Vectara.NotFoundError} * @throws {@link Vectara.TooManyRequestsError} * * @example * await client.index.updateCorpusDocument("my-corpus", "document_id", { * body: {} * }) */ updateCorpusDocument(corpusKey: Vectara.CorpusKey, documentId: string, request: Vectara.UpdateCorpusDocumentRequest, requestOptions?: Index.RequestOptions): Promise; /** * Replaces metadata of a document identified by its unique `document_id` * from a specific corpus. * * @param {Vectara.CorpusKey} corpusKey - The unique key identifying the corpus with the document to update. * @param {string} documentId - The document ID of the document to update. * This `document_id` must be percent encoded. * @param {Vectara.ReplaceCorpusDocumentMetadataRequest} request * @param {Index.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vectara.ForbiddenError} * @throws {@link Vectara.NotFoundError} * @throws {@link Vectara.TooManyRequestsError} * * @example * await client.index.replaceCorpusDocumentMetadata("my-corpus", "document_id", { * body: {} * }) */ replaceCorpusDocumentMetadata(corpusKey: Vectara.CorpusKey, documentId: string, request: Vectara.ReplaceCorpusDocumentMetadataRequest, requestOptions?: Index.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }