| 1 | import type * as textract from "@distilled.cloud/aws/textract"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `textract:GetExpenseAnalysis` — read the status and |
| 7 | * results of an asynchronous expense-analysis job started with |
| 8 | * `StartExpenseAnalysis`. |
| 9 | * |
| 10 | * ### Asynchronous Expense Analysis |
| 11 | * **Example:** Poll an Expense Analysis Job |
| 12 | * ```typescript |
| 13 | * // init |
| 14 | * const getExpenseAnalysis = yield* AWS.Textract.GetExpenseAnalysis(); |
| 15 | * |
| 16 | * // runtime |
| 17 | * const result = yield* getExpenseAnalysis({ JobId: jobId }); |
| 18 | * const documents = result.ExpenseDocuments; |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface GetExpenseAnalysis extends Binding.Service< |
| 24 | GetExpenseAnalysis, |
| 25 | "AWS.Textract.GetExpenseAnalysis", |
| 26 | () => Effect.Effect< |
| 27 | ( |
| 28 | request: textract.GetExpenseAnalysisRequest, |
| 29 | ) => Effect.Effect< |
| 30 | textract.GetExpenseAnalysisResponse, |
| 31 | textract.GetExpenseAnalysisError |
| 32 | > |
| 33 | > |
| 34 | > {} |
| 35 | export const GetExpenseAnalysis = Binding.Service<GetExpenseAnalysis>( |
| 36 | "AWS.Textract.GetExpenseAnalysis", |
| 37 | ); |