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