@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 41 lines 1.35 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 RedriveExecutionRequest extends sfn.RedriveExecutionInput {}
7
8 /**
9 * Runtime binding for `states:RedriveExecution`.
10 *
11 * Restarts a failed, aborted, or timed-out `STANDARD` execution from its
12 * failure point, reusing the same input and execution ARN. IAM access is
13 * scoped to executions of the bound {@link StateMachine}. Executions that
14 * are still running (or succeeded) fail with the typed
15 * `ExecutionNotRedrivable` error.
16 * ### Redriving Executions
17 * **Example:** Redrive a failed execution
18 * ```typescript
19 * const redriveExecution = yield* StepFunctions.RedriveExecution(machine);
20 *
21 * yield* redriveExecution({ executionArn }).pipe(
22 * Effect.catchTag("ExecutionNotRedrivable", () => Effect.void),
23 * );
24 * ```
25 *
26 * @binding
27 */
28 export interface RedriveExecution extends Binding.Service<
29 RedriveExecution,
30 "AWS.StepFunctions.RedriveExecution",
31 (
32 stateMachine: StateMachine,
33 ) => Effect.Effect<
34 (
35 request: RedriveExecutionRequest,
36 ) => Effect.Effect<sfn.RedriveExecutionOutput, sfn.RedriveExecutionError>
37 >
38 > {}
39 export const RedriveExecution = Binding.Service<RedriveExecution>(
40 "AWS.StepFunctions.RedriveExecution",
41 );