The best way to control Claude Code, Codex and more from any computer or phone
| 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:GetAdapter` — read the configuration |
| 8 | * (name, feature types, auto-update, tags) of the bound adapter at |
| 9 | * runtime. The grant is scoped to the adapter's ARN and the `AdapterId` |
| 10 | * is injected automatically. |
| 11 | * |
| 12 | * ### Managing Adapters |
| 13 | * **Example:** Read the Bound Adapter |
| 14 | * ```typescript |
| 15 | * // init |
| 16 | * const getAdapter = yield* AWS.Textract.GetAdapter(adapter); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const result = yield* getAdapter(); |
| 20 | * console.log(result.AdapterName, result.FeatureTypes); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface GetAdapter extends Binding.Service< |
| 26 | GetAdapter, |
| 27 | "AWS.Textract.GetAdapter", |
| 28 | <A extends Adapter>( |
| 29 | adapter: A, |
| 30 | ) => Effect.Effect<() => Effect.Effect<textract.GetAdapterResponse, textract.GetAdapterError>> |
| 31 | > {} |
| 32 | export const GetAdapter = Binding.Service<GetAdapter>("AWS.Textract.GetAdapter"); |