@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 46 lines 1.44 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 StartSyncExecutionRequest extends Omit<
7 sfn.StartSyncExecutionInput,
8 "stateMachineArn"
9 > {}
10
11 /**
12 * Runtime binding for `states:StartSyncExecution`.
13 *
14 * Bind this operation to an `EXPRESS` {@link StateMachine} inside a function
15 * runtime to run the workflow synchronously — the call returns once the
16 * execution finishes, with its status and output. Not available for
17 * `STANDARD` workflows.
18 * ### Synchronous Execution
19 * **Example:** Run an EXPRESS workflow and read its output
20 * ```typescript
21 * const startSyncExecution = yield* StepFunctions.StartSyncExecution(machine);
22 *
23 * const result = yield* startSyncExecution({
24 * input: JSON.stringify({ value: 21 }),
25 * });
26 * if (result.status === "SUCCEEDED") {
27 * const output = JSON.parse(String(result.output));
28 * }
29 * ```
30 *
31 * @binding
32 */
33 export interface StartSyncExecution extends Binding.Service<
34 StartSyncExecution,
35 "AWS.StepFunctions.StartSyncExecution",
36 (
37 stateMachine: StateMachine,
38 ) => Effect.Effect<
39 (
40 request?: StartSyncExecutionRequest,
41 ) => Effect.Effect<sfn.StartSyncExecutionOutput, sfn.StartSyncExecutionError>
42 >
43 > {}
44 export const StartSyncExecution = Binding.Service<StartSyncExecution>(
45 "AWS.StepFunctions.StartSyncExecution",
46 );