/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Vellum from "../../../index"; export declare namespace DocumentIndexes { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-API-Version header */ apiVersion?: core.Supplier; } 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-Version header */ apiVersion?: Vellum.ApiVersionEnum | undefined; /** Additional headers to include in the request. */ headers?: Record; } } export declare class DocumentIndexes { protected readonly _options: DocumentIndexes.Options; constructor(_options: DocumentIndexes.Options); /** * Used to retrieve a list of Document Indexes. * * @param {Vellum.DocumentIndexesListRequest} request * @param {DocumentIndexes.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documentIndexes.list() */ list(request?: Vellum.DocumentIndexesListRequest, requestOptions?: DocumentIndexes.RequestOptions): core.HttpResponsePromise; private __list; /** * Creates a new document index. * * @param {Vellum.DocumentIndexCreateRequest} request * @param {DocumentIndexes.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documentIndexes.create({ * label: "x", * name: "x", * indexingConfig: { * vectorizer: { * config: {}, * modelName: "text-embedding-3-small" * } * } * }) */ create(request: Vellum.DocumentIndexCreateRequest, requestOptions?: DocumentIndexes.RequestOptions): core.HttpResponsePromise; private __create; /** * Used to retrieve a Document Index given its ID or name. * * @param {string} id - Either the Document Index's ID or its unique name * @param {Vellum.DocumentIndexesRetrieveRequest} request * @param {DocumentIndexes.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documentIndexes.retrieve("id") */ retrieve(id: string, request?: Vellum.DocumentIndexesRetrieveRequest, requestOptions?: DocumentIndexes.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Used to fully update a Document Index given its ID or name. * * @param {string} id - Either the Document Index's ID or its unique name * @param {Vellum.DocumentIndexUpdateRequest} request * @param {DocumentIndexes.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documentIndexes.update("id", { * label: "x" * }) */ update(id: string, request: Vellum.DocumentIndexUpdateRequest, requestOptions?: DocumentIndexes.RequestOptions): core.HttpResponsePromise; private __update; /** * Used to delete a Document Index given its ID or name. * * @param {string} id - Either the Document Index's ID or its unique name * @param {DocumentIndexes.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documentIndexes.destroy("id") */ destroy(id: string, requestOptions?: DocumentIndexes.RequestOptions): core.HttpResponsePromise; private __destroy; /** * Used to partial update a Document Index given its ID or name. * * @param {string} id - Either the Document Index's ID or its unique name * @param {Vellum.PatchedDocumentIndexUpdateRequest} request * @param {DocumentIndexes.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documentIndexes.partialUpdate("id") */ partialUpdate(id: string, request?: Vellum.PatchedDocumentIndexUpdateRequest, requestOptions?: DocumentIndexes.RequestOptions): core.HttpResponsePromise; private __partialUpdate; /** * Adds a previously uploaded Document to the specified Document Index. * * @param {string} documentId - Either the Vellum-generated ID or the originally supplied external_id that uniquely identifies the Document you'd like to add. * @param {string} id - Either the Vellum-generated ID or the originally specified name that uniquely identifies the Document Index to which you'd like to add the Document. * @param {DocumentIndexes.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documentIndexes.addDocument("document_id", "id") */ addDocument(documentId: string, id: string, requestOptions?: DocumentIndexes.RequestOptions): core.HttpResponsePromise; private __addDocument; /** * Removes a Document from a Document Index without deleting the Document itself. * * @param {string} documentId - Either the Vellum-generated ID or the originally supplied external_id that uniquely identifies the Document you'd like to remove. * @param {string} id - Either the Vellum-generated ID or the originally specified name that uniquely identifies the Document Index from which you'd like to remove a Document. * @param {DocumentIndexes.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.documentIndexes.removeDocument("document_id", "id") */ removeDocument(documentId: string, id: string, requestOptions?: DocumentIndexes.RequestOptions): core.HttpResponsePromise; private __removeDocument; protected _getCustomAuthorizationHeaders(): Promise<{ "X-API-KEY": string; }>; }