| 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 `DescribeQuerySuggestionsConfig` operation (IAM action |
| 8 | * `kendra:DescribeQuerySuggestionsConfig`), scoped to one {@link Index}. |
| 9 | * |
| 10 | * Reads the index's query-suggestions settings (mode, query-log look-back |
| 11 | * window, attribute-suggestions config, …). |
| 12 | * Provide the implementation with |
| 13 | * `Effect.provide(AWS.Kendra.DescribeQuerySuggestionsConfigHttp)`. |
| 14 | * |
| 15 | * ### Query Suggestions |
| 16 | * **Example:** Read Suggestions Settings |
| 17 | * ```typescript |
| 18 | * const suggestionsConfig = |
| 19 | * yield* AWS.Kendra.DescribeQuerySuggestionsConfig(index); |
| 20 | * |
| 21 | * const config = yield* suggestionsConfig(); |
| 22 | * console.log(config.Mode, config.Status); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeQuerySuggestionsConfig extends Binding.Service< |
| 28 | DescribeQuerySuggestionsConfig, |
| 29 | "AWS.Kendra.DescribeQuerySuggestionsConfig", |
| 30 | ( |
| 31 | index: Index, |
| 32 | ) => Effect.Effect< |
| 33 | () => Effect.Effect< |
| 34 | kendra.DescribeQuerySuggestionsConfigResponse, |
| 35 | kendra.DescribeQuerySuggestionsConfigError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const DescribeQuerySuggestionsConfig = |
| 40 | Binding.Service<DescribeQuerySuggestionsConfig>( |
| 41 | "AWS.Kendra.DescribeQuerySuggestionsConfig", |
| 42 | ); |