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:StartDocumentTextDetection` — start an
7 * asynchronous OCR job for a (possibly multi-page) document stored in S3.
8 * Poll the returned `JobId` with `GetDocumentTextDetection`. The caller
9 * needs `s3:GetObject` on the input bucket.
10 *
11 * ### Asynchronous Text Detection
12 * **Example:** Start a Text Detection Job
13 * ```typescript
14 * // init
15 * const startDocumentTextDetection =
16 * yield* AWS.Textract.StartDocumentTextDetection();
17 *
18 * // runtime
19 * const { JobId } = yield* startDocumentTextDetection({
20 * DocumentLocation: { S3Object: { Bucket: bucketName, Name: "doc.pdf" } },
21 * });
22 * ```
23 *
24 * @binding
25 */
26export interface StartDocumentTextDetection extends Binding.Service<
27 StartDocumentTextDetection,
28 "AWS.Textract.StartDocumentTextDetection",
29 () => Effect.Effect<
30 (
31 request: textract.StartDocumentTextDetectionRequest,
32 ) => Effect.Effect<
33 textract.StartDocumentTextDetectionResponse,
34 textract.StartDocumentTextDetectionError
35 >
36 >
37> {}
38export const StartDocumentTextDetection =
39 Binding.Service<StartDocumentTextDetection>(
40 "AWS.Textract.StartDocumentTextDetection",
41 );