The best way to control Claude Code, Codex and more from any computer or phone

main
ts 47 lines 1.24 KB
Raw
1 import type * as lexr from "@distilled.cloud/aws/lex-runtime-v2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { BotAlias } from "./BotAlias.ts";
5
6 /**
7 * The `DeleteSession` request with the binding-injected `botId` and
8 * `botAliasId` removed.
9 */
10 export interface DeleteSessionRequest extends Omit<
11 lexr.DeleteSessionRequest,
12 "botId" | "botAliasId"
13 > {}
14
15 /**
16 * Runtime binding for `lex:DeleteSession` — end a conversation with an
17 * Amazon Lex V2 bot alias, discarding its session state so the next user
18 * input starts a fresh conversation.
19 *
20 * ### Managing Sessions
21 * **Example:** Reset a User's Conversation
22 * ```typescript
23 * // init
24 * const deleteSession = yield* AWS.LexV2.DeleteSession(alias);
25 *
26 * // runtime
27 * yield* deleteSession({
28 * localeId: "en_US",
29 * sessionId: "user-123",
30 * });
31 * ```
32 *
33 * @binding
34 */
35 export interface DeleteSession extends Binding.Service<
36 DeleteSession,
37 "AWS.LexV2.DeleteSession",
38 (
39 alias: BotAlias,
40 ) => Effect.Effect<
41 (
42 request: DeleteSessionRequest,
43 ) => Effect.Effect<lexr.DeleteSessionResponse, lexr.DeleteSessionError>
44 >
45 > {}
46
47 export const DeleteSession = Binding.Service<DeleteSession>("AWS.LexV2.DeleteSession");