/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { indexesAsk } from "../funcs/indexesAsk.js"; import { indexesCreate } from "../funcs/indexesCreate.js"; import { indexesDelete } from "../funcs/indexesDelete.js"; import { indexesGet } from "../funcs/indexesGet.js"; import { indexesList } from "../funcs/indexesList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Indexes extends ClientSDK { /** * List indexes within a project * * @remarks * Retrieve a list of all created indexes. */ async list( options?: RequestOptions, ): Promise { return unwrapAsync(indexesList( this, options, )); } /** * Create an index * * @remarks * Create a new index to organize and store documents or items from integrations. */ async create( request: components.CreateIndexRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexesCreate( this, request, options, )); } /** * Delete an index * * @remarks * Delete a specific index by providing its unique identifier. */ async delete( request: operations.DeleteIndexRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexesDelete( this, request, options, )); } /** * Get an index * * @remarks * Get the details of an index by index name. */ async get( request: operations.GetIndexRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexesGet( this, request, options, )); } /** * Ask a question to an index * * @remarks * Ask a natural language question and get a synthesized answer from documents in the index */ async ask( request: operations.AskIndexRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexesAsk( this, request, options, )); } }