@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 38 lines 1.35 KB
Raw
1 import type * as transfer from "@distilled.cloud/aws/transfer";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Server } from "./Server.ts";
5
6 /**
7 * Runtime binding for `transfer:DescribeServer`.
8 *
9 * Reads the bound {@link Server}'s live configuration and state — the
10 * `ServerId` is injected from the binding. Useful for checking whether the
11 * server is `ONLINE`/`OFFLINE` before a {@link StartServer}/{@link StopServer}
12 * call or surfacing endpoint details to an admin portal. Provide the
13 * implementation with `Effect.provide(AWS.Transfer.DescribeServerHttp)`.
14 * ### Observing the Server
15 * **Example:** Read the Server State
16 * ```typescript
17 * // init — bind the operation to the server
18 * const describeServer = yield* AWS.Transfer.DescribeServer(server);
19 *
20 * // runtime
21 * const { Server } = yield* describeServer();
22 * yield* Effect.log(`server is ${Server.State}`);
23 * ```
24 *
25 * @binding
26 */
27 export interface DescribeServer extends Binding.Service<
28 DescribeServer,
29 "AWS.Transfer.DescribeServer",
30 (
31 server: Server,
32 ) => Effect.Effect<
33 (
34 request?: Omit<transfer.DescribeServerRequest, "ServerId">,
35 ) => Effect.Effect<transfer.DescribeServerResponse, transfer.DescribeServerError>
36 >
37 > {}
38 export const DescribeServer = Binding.Service<DescribeServer>("AWS.Transfer.DescribeServer");