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

main
ts 45 lines 1.55 KB
Raw
1 import type * as emr from "@distilled.cloud/aws/emr-serverless";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Application } from "./Application.ts";
5
6 /**
7 * Request accepted by the {@link GetSessionEndpoint} runtime callable. The
8 * `applicationId` is injected from the bound {@link Application}.
9 */
10 export type GetSessionEndpointInput = Omit<emr.GetSessionEndpointRequest, "applicationId">;
11
12 /**
13 * Runtime binding for `emr-serverless:GetSessionEndpoint`.
14 *
15 * Resolves the connection endpoint and short-lived auth token for an
16 * interactive session on the bound {@link Application}. The `authToken` in
17 * the response is `Redacted` — unwrap it with `Redacted.value` only at the
18 * point of use. Provide the implementation with
19 * `Effect.provide(AWS.EMRServerless.GetSessionEndpointHttp)`.
20 * ### Interactive Sessions
21 * **Example:** Connect To A Session
22 * ```typescript
23 * // init
24 * const getSessionEndpoint = yield* AWS.EMRServerless.GetSessionEndpoint(app);
25 *
26 * // runtime
27 * const { endpoint, authToken } = yield* getSessionEndpoint({ sessionId });
28 * ```
29 *
30 * @binding
31 */
32 export interface GetSessionEndpoint extends Binding.Service<
33 GetSessionEndpoint,
34 "AWS.EMRServerless.GetSessionEndpoint",
35 (
36 application: Application,
37 ) => Effect.Effect<
38 (
39 request: GetSessionEndpointInput,
40 ) => Effect.Effect<emr.GetSessionEndpointResponse, emr.GetSessionEndpointError>
41 >
42 > {}
43 export const GetSessionEndpoint = Binding.Service<GetSessionEndpoint>(
44 "AWS.EMRServerless.GetSessionEndpoint",
45 );