@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 39 lines 1.16 KB
Raw
1 import type * as sfn from "@distilled.cloud/aws/sfn";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { StateMachine } from "./StateMachine.ts";
5
6 export interface StopExecutionRequest extends sfn.StopExecutionInput {}
7
8 /**
9 * Runtime binding for `states:StopExecution`.
10 *
11 * Bind this operation to a {@link StateMachine} inside a function runtime to
12 * cancel that machine's running executions. Not supported by `EXPRESS`
13 * workflows.
14 * ### Stopping Executions
15 * **Example:** Cancel a running execution
16 * ```typescript
17 * const stopExecution = yield* StepFunctions.StopExecution(machine);
18 *
19 * yield* stopExecution({
20 * executionArn,
21 * error: "OrderCancelled",
22 * cause: "user requested cancellation",
23 * });
24 * ```
25 *
26 * @binding
27 */
28 export interface StopExecution extends Binding.Service<
29 StopExecution,
30 "AWS.StepFunctions.StopExecution",
31 (
32 stateMachine: StateMachine,
33 ) => Effect.Effect<
34 (
35 request: StopExecutionRequest,
36 ) => Effect.Effect<sfn.StopExecutionOutput, sfn.StopExecutionError>
37 >
38 > {}
39 export const StopExecution = Binding.Service<StopExecution>("AWS.StepFunctions.StopExecution");