sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Kendra/ ClearQuerySuggestions.ts

import type * as kendra from "@distilled.cloud/aws/kendra";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { Index } from "./SearchIndex.ts";

/**
 * Runtime binding for the `ClearQuerySuggestions` operation (IAM action
 * `kendra:ClearQuerySuggestions`), scoped to one {@link Index}.
 *
 * Clears existing query suggestions for the index. Suggestions rebuild
 * from new query traffic (which can take up to 24 hours).
 * Provide the implementation with
 * `Effect.provide(AWS.Kendra.ClearQuerySuggestionsHttp)`.
 *
 * ### Query Suggestions
 * **Example:** Reset Suggestions
 * ```typescript
 * const clearSuggestions = yield* AWS.Kendra.ClearQuerySuggestions(index);
 *
 * yield* clearSuggestions();
 * ```
 *
 * @binding
 */
export interface ClearQuerySuggestions extends Binding.Service<
  ClearQuerySuggestions,
  "AWS.Kendra.ClearQuerySuggestions",
  (
    index: Index,
  ) => Effect.Effect<
    () => Effect.Effect<kendra.ClearQuerySuggestionsResponse, kendra.ClearQuerySuggestionsError>
  >
> {}
export const ClearQuerySuggestions = Binding.Service<ClearQuerySuggestions>(
  "AWS.Kendra.ClearQuerySuggestions",
);