1import type * as mwaa from "@distilled.cloud/aws/mwaa-serverless";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Workflow } from "./Workflow.ts";
5
6/**
7 * Request accepted by the {@link ListWorkflowRuns} runtime callable. The
8 * `WorkflowArn` is injected from the bound {@link Workflow}.
9 */
10export type ListWorkflowRunsInput = Omit<
11 mwaa.ListWorkflowRunsRequest,
12 "WorkflowArn"
13>;
14
15/**
16 * Runtime binding for `airflow-serverless:ListWorkflowRuns`.
17 *
18 * Lists runs of the bound {@link Workflow}, optionally filtered to a
19 * specific workflow version. Provide the implementation with
20 * `Effect.provide(AWS.MWAAServerless.ListWorkflowRunsHttp)`.
21 * ### Observing Runs
22 * **Example:** List Recent Runs
23 * ```typescript
24 * // init — bind the operation to the workflow
25 * const listWorkflowRuns = yield* AWS.MWAAServerless.ListWorkflowRuns(workflow);
26 *
27 * // runtime
28 * const { WorkflowRuns } = yield* listWorkflowRuns({ MaxResults: 10 });
29 * yield* Effect.log(`found ${WorkflowRuns?.length ?? 0} runs`);
30 * ```
31 *
32 * @binding
33 */
34export interface ListWorkflowRuns extends Binding.Service<
35 ListWorkflowRuns,
36 "AWS.MWAAServerless.ListWorkflowRuns",
37 (
38 workflow: Workflow,
39 ) => Effect.Effect<
40 (
41 request?: ListWorkflowRunsInput,
42 ) => Effect.Effect<
43 mwaa.ListWorkflowRunsResponse,
44 mwaa.ListWorkflowRunsError
45 >
46 >
47> {}
48export const ListWorkflowRuns = Binding.Service<ListWorkflowRuns>(
49 "AWS.MWAAServerless.ListWorkflowRuns",
50);