1import * as lexr from "@distilled.cloud/aws/lex-runtime-v2";
2import * as Layer from "effect/Layer";
3import { makeLexAliasHttpBinding } from "./BindingHttp.ts";
4import { GetSession, type GetSessionRequest } from "./GetSession.ts";
5
6/**
7 * HTTP implementation of {@link GetSession} — calls the `lex-runtime-v2`
8 * `GetSession` operation with the Lambda role's credentials and grants the
9 * host `lex:GetSession` on the alias.
10 */
11export const GetSessionHttp = Layer.effect(
12 GetSession,
13 makeLexAliasHttpBinding<
14 GetSessionRequest,
15 lexr.GetSessionResponse,
16 lexr.GetSessionError
17 >({
18 capability: "GetSession",
19 iamActions: ["lex:GetSession"],
20 operation: lexr.getSession,
21 }),
22);