@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 43 lines 1.58 KB
Raw
1 import type * as schemas from "@distilled.cloud/aws/schemas";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Schema } from "./Schema.ts";
5
6 /**
7 * Runtime binding for `schemas:DescribeCodeBinding`.
8 *
9 * Reads the code-binding generation status for the bound {@link Schema} in a
10 * target language — poll it after {@link PutCodeBinding} until the status is
11 * `CREATE_COMPLETE`. The registry and schema names are injected from the
12 * binding. Provide the implementation with
13 * `Effect.provide(AWS.Schemas.DescribeCodeBindingHttp)`.
14 * ### Code Bindings
15 * **Example:** Poll Generation Status
16 * ```typescript
17 * // init — bind the operation to the schema
18 * const describeCodeBinding = yield* AWS.Schemas.DescribeCodeBinding(schema);
19 *
20 * // runtime
21 * const { Status } = yield* describeCodeBinding({ Language: "Python36" });
22 * if (Status === "CREATE_COMPLETE") {
23 * // the package is ready to download via GetCodeBindingSource
24 * }
25 * ```
26 *
27 * @binding
28 */
29 export interface DescribeCodeBinding extends Binding.Service<
30 DescribeCodeBinding,
31 "AWS.Schemas.DescribeCodeBinding",
32 (schema: Schema) => Effect.Effect<
33 (request: {
34 /** The target language: `Java8`, `Python36`, `TypeScript3`, or `Go1`. */
35 Language: string;
36 /** The version of the schema. Defaults to the latest. */
37 SchemaVersion?: string;
38 }) => Effect.Effect<schemas.DescribeCodeBindingResponse, schemas.DescribeCodeBindingError>
39 >
40 > {}
41 export const DescribeCodeBinding = Binding.Service<DescribeCodeBinding>(
42 "AWS.Schemas.DescribeCodeBinding",
43 );