import { EnumerateAndSearchRequest, EnumerateRequest, VectorCreateRequest, VectorMetadata, VectorSearchRequest } from '../types'; import { VectorSearchResult } from '../types'; import SdkBase from './SdkBase'; import { SdkConfiguration } from './SdkConfiguration'; export declare class VectorSdk extends SdkBase { /** * Instantiate the SDK. * @param {SdkConfiguration} config - The SDK configuration. */ constructor(config: SdkConfiguration); /** * Read all vectors. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} */ readAll(cancellationToken?: AbortController): Promise; /** * Read a vector. * @param {string} guid - The GUID of the vector. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ read(guid: string, cancellationToken?: AbortController): Promise; /** * Read multiple vectors. * @param {string[]} vectorGuids - The GUIDs of the vectors. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The vectors. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ readMany(vectorGuids: string[], cancellationToken?: AbortController): Promise; /** * Vector exists. * @param {string} guid - The GUID of the vector. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ exists(guid: string, cancellationToken?: AbortController): Promise; /** * Create a vector. * @param {VectorCreateRequest} vector - The vector to create. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} */ create(vector: VectorCreateRequest, cancellationToken?: AbortController): Promise; /** * Create multiple vectors * @param {VectorCreateRequest[]} vectors - The vectors to create. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ createBulk(vectors: VectorCreateRequest[], cancellationToken?: AbortController): Promise; /** * Update a vector. * @param {VectorMetadata} vector - The vector to update. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} */ update(vector: VectorMetadata, cancellationToken?: AbortController): Promise; /** * Delete a vector. * @param {string} guid - The GUID of the vector. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} */ delete(guid: string, cancellationToken?: AbortController): Promise; /** * Delete multiple vectors * @param {string[]} guids - The GUIDs of the vectors to delete. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ deleteBulk(guids: string[], cancellationToken?: AbortController): Promise; /** * Search Vectors. * @param {VectorSearchRequest} searchReq - Information about the search request. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The search result. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ search(searchReq: VectorSearchRequest, cancellationToken?: AbortController): Promise; /** * Enumerate all vectors. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of vectors. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ enumerate(request?: EnumerateRequest, cancellationToken?: AbortController): Promise; /** * Enumerate and Search * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of vectors. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ enumerateAndSearch(request: EnumerateAndSearchRequest, cancellationToken?: AbortController): Promise; }