1import type * as textract from "@distilled.cloud/aws/textract";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import 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 */
26export 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<
35 textract.GetAdapterVersionResponse,
36 textract.GetAdapterVersionError
37 >
38 >
39> {}
40export const GetAdapterVersion = Binding.Service<GetAdapterVersion>(
41 "AWS.Textract.GetAdapterVersion",
42);