@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 43 lines 1.4 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 StopWorkflowRun} runtime callable. The
8 * `WorkflowArn` is injected from the bound {@link Workflow}.
9 */
10 export type StopWorkflowRunInput = Omit<mwaa.StopWorkflowRunRequest, "WorkflowArn">;
11
12 /**
13 * Runtime binding for `airflow-serverless:StopWorkflowRun`.
14 *
15 * Stops an in-flight run of the bound {@link Workflow}. Provide the
16 * implementation with `Effect.provide(AWS.MWAAServerless.StopWorkflowRunHttp)`.
17 * ### Running Workflows
18 * **Example:** Stop A Run
19 * ```typescript
20 * // init — bind the operation to the workflow
21 * const stopWorkflowRun = yield* AWS.MWAAServerless.StopWorkflowRun(workflow);
22 *
23 * // runtime
24 * const stopped = yield* stopWorkflowRun({ RunId: runId });
25 * yield* Effect.log(`run ${stopped.RunId} -> ${stopped.Status}`);
26 * ```
27 *
28 * @binding
29 */
30 export interface StopWorkflowRun extends Binding.Service<
31 StopWorkflowRun,
32 "AWS.MWAAServerless.StopWorkflowRun",
33 (
34 workflow: Workflow,
35 ) => Effect.Effect<
36 (
37 request: StopWorkflowRunInput,
38 ) => Effect.Effect<mwaa.StopWorkflowRunResponse, mwaa.StopWorkflowRunError>
39 >
40 > {}
41 export const StopWorkflowRun = Binding.Service<StopWorkflowRun>(
42 "AWS.MWAAServerless.StopWorkflowRun",
43 );