| 1 | import type * as kendra from "@distilled.cloud/aws/kendra"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Index } from "./SearchIndex.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `ClearQuerySuggestions` operation (IAM action |
| 8 | * `kendra:ClearQuerySuggestions`), scoped to one {@link Index}. |
| 9 | * |
| 10 | * Clears existing query suggestions for the index. Suggestions rebuild |
| 11 | * from new query traffic (which can take up to 24 hours). |
| 12 | * Provide the implementation with |
| 13 | * `Effect.provide(AWS.Kendra.ClearQuerySuggestionsHttp)`. |
| 14 | * |
| 15 | * ### Query Suggestions |
| 16 | * **Example:** Reset Suggestions |
| 17 | * ```typescript |
| 18 | * const clearSuggestions = yield* AWS.Kendra.ClearQuerySuggestions(index); |
| 19 | * |
| 20 | * yield* clearSuggestions(); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface ClearQuerySuggestions extends Binding.Service< |
| 26 | ClearQuerySuggestions, |
| 27 | "AWS.Kendra.ClearQuerySuggestions", |
| 28 | ( |
| 29 | index: Index, |
| 30 | ) => Effect.Effect< |
| 31 | () => Effect.Effect< |
| 32 | kendra.ClearQuerySuggestionsResponse, |
| 33 | kendra.ClearQuerySuggestionsError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const ClearQuerySuggestions = Binding.Service<ClearQuerySuggestions>( |
| 38 | "AWS.Kendra.ClearQuerySuggestions", |
| 39 | ); |