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

main
ts 49 lines 1.7 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 StartWorkflowRun} runtime callable. The
8 * `WorkflowArn` is injected from the bound {@link Workflow}; the idempotency
9 * `ClientToken` is auto-generated when omitted.
10 */
11 export type StartWorkflowRunInput = Omit<mwaa.StartWorkflowRunRequest, "WorkflowArn">;
12
13 /**
14 * Runtime binding for `airflow-serverless:StartWorkflowRun`.
15 *
16 * Starts an on-demand run of the bound {@link Workflow} — the serverless
17 * equivalent of triggering a DAG. The workflow ARN is injected from the
18 * binding; the caller can override workflow parameters or pin a specific
19 * workflow version. Provide the implementation with
20 * `Effect.provide(AWS.MWAAServerless.StartWorkflowRunHttp)`.
21 * ### Running Workflows
22 * **Example:** Start An On-Demand Run
23 * ```typescript
24 * // init — bind the operation to the workflow
25 * const startWorkflowRun = yield* AWS.MWAAServerless.StartWorkflowRun(workflow);
26 *
27 * // runtime
28 * const run = yield* startWorkflowRun({
29 * OverrideParameters: { date: "2026-07-15" },
30 * });
31 * yield* Effect.log(`started run ${run.RunId} (${run.Status})`);
32 * ```
33 *
34 * @binding
35 */
36 export interface StartWorkflowRun extends Binding.Service<
37 StartWorkflowRun,
38 "AWS.MWAAServerless.StartWorkflowRun",
39 (
40 workflow: Workflow,
41 ) => Effect.Effect<
42 (
43 request?: StartWorkflowRunInput,
44 ) => Effect.Effect<mwaa.StartWorkflowRunResponse, mwaa.StartWorkflowRunError>
45 >
46 > {}
47 export const StartWorkflowRun = Binding.Service<StartWorkflowRun>(
48 "AWS.MWAAServerless.StartWorkflowRun",
49 );