@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 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:AnalyzeExpense` — synchronous analysis of
7 * invoices and receipts, extracting summary fields (vendor, total, dates)
8 * and line-item groups.
9 *
10 * ### Synchronous Analysis
11 * **Example:** Analyze an Invoice
12 * ```typescript
13 * // init
14 * const analyzeExpense = yield* AWS.Textract.AnalyzeExpense();
15 *
16 * // runtime
17 * const result = yield* analyzeExpense({
18 * Document: { Bytes: receiptBytes },
19 * });
20 * const fields = result.ExpenseDocuments?.[0]?.SummaryFields;
21 * ```
22 *
23 * @binding
24 */
25 export interface AnalyzeExpense extends Binding.Service<
26 AnalyzeExpense,
27 "AWS.Textract.AnalyzeExpense",
28 () => Effect.Effect<
29 (
30 request: textract.AnalyzeExpenseRequest,
31 ) => Effect.Effect<textract.AnalyzeExpenseResponse, textract.AnalyzeExpenseError>
32 >
33 > {}
34 export const AnalyzeExpense = Binding.Service<AnalyzeExpense>("AWS.Textract.AnalyzeExpense");