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