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: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 */
25export 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> {}
34export const AnalyzeID = Binding.Service<AnalyzeID>("AWS.Textract.AnalyzeID");