@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 41 lines 1.62 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:PutCodeBinding`.
8 *
9 * Kicks off code-binding generation for the bound {@link Schema} in a target
10 * language (`Java8`, `Python36`, `TypeScript3`, or `Go1`). Generation is
11 * asynchronous — poll {@link DescribeCodeBinding} until the status is
12 * `CREATE_COMPLETE`, then download the package with
13 * {@link GetCodeBindingSource}. The registry and schema names are injected
14 * from the binding. Provide the implementation with
15 * `Effect.provide(AWS.Schemas.PutCodeBindingHttp)`.
16 * ### Code Bindings
17 * **Example:** Generate Python Bindings
18 * ```typescript
19 * // init — bind the operation to the schema
20 * const putCodeBinding = yield* AWS.Schemas.PutCodeBinding(schema);
21 *
22 * // runtime
23 * const { Status } = yield* putCodeBinding({ Language: "Python36" });
24 * // Status is "CREATE_IN_PROGRESS" until generation finishes
25 * ```
26 *
27 * @binding
28 */
29 export interface PutCodeBinding extends Binding.Service<
30 PutCodeBinding,
31 "AWS.Schemas.PutCodeBinding",
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 to generate bindings for. Defaults to the latest. */
37 SchemaVersion?: string;
38 }) => Effect.Effect<schemas.PutCodeBindingResponse, schemas.PutCodeBindingError>
39 >
40 > {}
41 export const PutCodeBinding = Binding.Service<PutCodeBinding>("AWS.Schemas.PutCodeBinding");