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