The best way to control Claude Code, Codex and more from any computer or phone

main
ts 52 lines 1.8 KB
Raw
1 import type * as appflow from "@distilled.cloud/aws/appflow";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Flow } from "./Flow.ts";
5
6 export interface DescribeFlowExecutionRecordsRequest extends Omit<
7 appflow.DescribeFlowExecutionRecordsRequest,
8 "flowName"
9 > {}
10
11 /**
12 * Runtime binding for `appflow:DescribeFlowExecutionRecords`.
13 *
14 * Bind this operation to a {@link Flow} in the function's init phase to get a
15 * callable that pages through the flow's run history — each record carries
16 * the `executionId`, status, timing, and record counts of one run. The flow
17 * name is injected automatically and `appflow:DescribeFlowExecutionRecords`
18 * is granted on the flow. Provide the implementation with
19 * `Effect.provide(AWS.AppFlow.DescribeFlowExecutionRecordsHttp)`.
20 * ### Monitoring Flow Runs
21 * **Example:** Check the Status of the Latest Run
22 * ```typescript
23 * // init — bind the operation to the flow
24 * const describeFlowExecutionRecords =
25 * yield* AWS.AppFlow.DescribeFlowExecutionRecords(flow);
26 *
27 * // runtime — read the most recent run
28 * const records = yield* describeFlowExecutionRecords({ maxResults: 1 });
29 * const latest = records.flowExecutions?.[0];
30 * // latest?.executionStatus === "Successful"
31 * ```
32 *
33 * @binding
34 */
35 export interface DescribeFlowExecutionRecords extends Binding.Service<
36 DescribeFlowExecutionRecords,
37 "AWS.AppFlow.DescribeFlowExecutionRecords",
38 (
39 flow: Flow,
40 ) => Effect.Effect<
41 (
42 request?: DescribeFlowExecutionRecordsRequest,
43 ) => Effect.Effect<
44 appflow.DescribeFlowExecutionRecordsResponse,
45 appflow.DescribeFlowExecutionRecordsError
46 >
47 >
48 > {}
49
50 export const DescribeFlowExecutionRecords = Binding.Service<DescribeFlowExecutionRecords>(
51 "AWS.AppFlow.DescribeFlowExecutionRecords",
52 );