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

main
ts 39 lines 1.19 KB
Raw
1 import type * as textract from "@distilled.cloud/aws/textract";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Adapter } from "./Adapter.ts";
5
6 /**
7 * Runtime binding for `textract:GetAdapterVersion` — read the training
8 * status, dataset configuration, and evaluation metrics of a version of
9 * the bound adapter.
10 *
11 * ### Managing Adapters
12 * **Example:** Poll Adapter Version Training
13 * ```typescript
14 * // init
15 * const getAdapterVersion = yield* AWS.Textract.GetAdapterVersion(adapter);
16 *
17 * // runtime
18 * const result = yield* getAdapterVersion({ AdapterVersion: "1" });
19 * if (result.Status === "ACTIVE") {
20 * // ready for AnalyzeDocument AdaptersConfig
21 * }
22 * ```
23 *
24 * @binding
25 */
26 export interface GetAdapterVersion extends Binding.Service<
27 GetAdapterVersion,
28 "AWS.Textract.GetAdapterVersion",
29 <A extends Adapter>(
30 adapter: A,
31 ) => Effect.Effect<
32 (
33 request: Omit<textract.GetAdapterVersionRequest, "AdapterId">,
34 ) => Effect.Effect<textract.GetAdapterVersionResponse, textract.GetAdapterVersionError>
35 >
36 > {}
37 export const GetAdapterVersion = Binding.Service<GetAdapterVersion>(
38 "AWS.Textract.GetAdapterVersion",
39 );