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

main
ts 40 lines 1.2 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
5 /**
6 * Runtime binding for `textract:GetDocumentTextDetection` — read the
7 * status and results of an asynchronous OCR job started with
8 * `StartDocumentTextDetection`.
9 *
10 * ### Asynchronous Text Detection
11 * **Example:** Poll a Text Detection Job
12 * ```typescript
13 * // init
14 * const getDocumentTextDetection =
15 * yield* AWS.Textract.GetDocumentTextDetection();
16 *
17 * // runtime
18 * const result = yield* getDocumentTextDetection({ JobId: jobId });
19 * const lines = (result.Blocks ?? [])
20 * .filter((b) => b.BlockType === "LINE")
21 * .map((b) => b.Text);
22 * ```
23 *
24 * @binding
25 */
26 export interface GetDocumentTextDetection extends Binding.Service<
27 GetDocumentTextDetection,
28 "AWS.Textract.GetDocumentTextDetection",
29 () => Effect.Effect<
30 (
31 request: textract.GetDocumentTextDetectionRequest,
32 ) => Effect.Effect<
33 textract.GetDocumentTextDetectionResponse,
34 textract.GetDocumentTextDetectionError
35 >
36 >
37 > {}
38 export const GetDocumentTextDetection = Binding.Service<GetDocumentTextDetection>(
39 "AWS.Textract.GetDocumentTextDetection",
40 );