1import * as kendra from "@distilled.cloud/aws/kendra";
2import * as Layer from "effect/Layer";
3import { toWireDays } from "../../Util/Duration.ts";
4import type { UpdateQuerySuggestionsConfigRequest } from "./UpdateQuerySuggestionsConfig.ts";
5import { makeKendraIndexHttpBinding } from "./BindingHttp.ts";
6import { UpdateQuerySuggestionsConfig } from "./UpdateQuerySuggestionsConfig.ts";
7
8export const UpdateQuerySuggestionsConfigHttp = Layer.effect(
9 UpdateQuerySuggestionsConfig,
10 makeKendraIndexHttpBinding({
11 tag: "AWS.Kendra.UpdateQuerySuggestionsConfig",
12 operation: kendra.updateQuerySuggestionsConfig,
13 actions: ["kendra:UpdateQuerySuggestionsConfig"],
14 prepare: ({
15 queryLogLookBackWindow,
16 ...rest
17 }: UpdateQuerySuggestionsConfigRequest = {}) => ({
18 ...rest,
19 QueryLogLookBackWindowInDays: toWireDays(queryLogLookBackWindow),
20 }),
21 }),
22);