/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 9a1b36425210
 */

import { betaRagSearchIndexesList } from "../funcs/betaRagSearchIndexesList.js";
import { betaRagSearchIndexesRegister } from "../funcs/betaRagSearchIndexesRegister.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as components from "../models/components/index.js";
import { unwrapAsync } from "../types/fp.js";

export class SearchIndexes extends ClientSDK {
  /**
   * Get Search Indexes
   */
  async list(
    options?: RequestOptions,
  ): Promise<Array<components.SearchIndexResponse>> {
    return unwrapAsync(betaRagSearchIndexesList(
      this,
      options,
    ));
  }

  /**
   * Register Search Index
   */
  async register(
    request: components.CreateSearchIndexInfoRequest,
    options?: RequestOptions,
  ): Promise<components.SearchIndexResponse> {
    return unwrapAsync(betaRagSearchIndexesRegister(
      this,
      request,
      options,
    ));
  }
}
