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

main
ts 42 lines 1.45 KB
Raw
1 import type * as mwaa from "@distilled.cloud/aws/mwaa-serverless";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Workflow } from "./Workflow.ts";
5
6 /**
7 * Request accepted by the {@link GetWorkflowRun} runtime callable. The
8 * `WorkflowArn` is injected from the bound {@link Workflow}.
9 */
10 export type GetWorkflowRunInput = Omit<mwaa.GetWorkflowRunRequest, "WorkflowArn">;
11
12 /**
13 * Runtime binding for `airflow-serverless:GetWorkflowRun`.
14 *
15 * Reads the detail of a single run of the bound {@link Workflow} — its
16 * status, timings, error message, and task-instance ids. Provide the
17 * implementation with `Effect.provide(AWS.MWAAServerless.GetWorkflowRunHttp)`.
18 * ### Observing Runs
19 * **Example:** Read A Run's Status
20 * ```typescript
21 * // init — bind the operation to the workflow
22 * const getWorkflowRun = yield* AWS.MWAAServerless.GetWorkflowRun(workflow);
23 *
24 * // runtime
25 * const run = yield* getWorkflowRun({ RunId: runId });
26 * yield* Effect.log(`run ${run.RunId}: ${run.RunDetail?.RunState}`);
27 * ```
28 *
29 * @binding
30 */
31 export interface GetWorkflowRun extends Binding.Service<
32 GetWorkflowRun,
33 "AWS.MWAAServerless.GetWorkflowRun",
34 (
35 workflow: Workflow,
36 ) => Effect.Effect<
37 (
38 request: GetWorkflowRunInput,
39 ) => Effect.Effect<mwaa.GetWorkflowRunResponse, mwaa.GetWorkflowRunError>
40 >
41 > {}
42 export const GetWorkflowRun = Binding.Service<GetWorkflowRun>("AWS.MWAAServerless.GetWorkflowRun");