@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, 06:00 UTC

main
ts 34 lines 1.04 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:AnalyzeID` — synchronous extraction of
7 * identity-document fields (name, date of birth, document number, …) from
8 * images of passports, driver licenses, and other government IDs.
9 *
10 * ### Synchronous Analysis
11 * **Example:** Analyze an Identity Document
12 * ```typescript
13 * // init
14 * const analyzeID = yield* AWS.Textract.AnalyzeID();
15 *
16 * // runtime
17 * const result = yield* analyzeID({
18 * DocumentPages: [{ Bytes: licenseBytes }],
19 * });
20 * const fields = result.IdentityDocuments?.[0]?.IdentityDocumentFields;
21 * ```
22 *
23 * @binding
24 */
25 export interface AnalyzeID extends Binding.Service<
26 AnalyzeID,
27 "AWS.Textract.AnalyzeID",
28 () => Effect.Effect<
29 (
30 request: textract.AnalyzeIDRequest,
31 ) => Effect.Effect<textract.AnalyzeIDResponse, textract.AnalyzeIDError>
32 >
33 > {}
34 export const AnalyzeID = Binding.Service<AnalyzeID>("AWS.Textract.AnalyzeID");