@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 40 lines 1.29 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: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 */
26 export 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 > {}
38 export const StartDocumentTextDetection = Binding.Service<StartDocumentTextDetection>(
39 "AWS.Textract.StartDocumentTextDetection",
40 );