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
| 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 GetExecutionHistoryRequest extends sfn.GetExecutionHistoryInput {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `states:GetExecutionHistory`. |
| 10 | * |
| 11 | * Bind this operation to a {@link StateMachine} inside a function runtime |
| 12 | * to page through an execution's event history (state transitions, task |
| 13 | * results, failures). IAM access is scoped to executions of the bound |
| 14 | * state machine. Not supported by `EXPRESS` state machines. |
| 15 | * ### Polling Executions |
| 16 | * **Example:** Inspect why an execution failed |
| 17 | * ```typescript |
| 18 | * const getExecutionHistory = |
| 19 | * yield* StepFunctions.GetExecutionHistory(machine); |
| 20 | * |
| 21 | * const { events } = yield* getExecutionHistory({ |
| 22 | * executionArn, |
| 23 | * reverseOrder: true, |
| 24 | * maxResults: 10, |
| 25 | * }); |
| 26 | * // events[0].type === "ExecutionFailed" carries the error details |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface GetExecutionHistory extends Binding.Service< |
| 32 | GetExecutionHistory, |
| 33 | "AWS.StepFunctions.GetExecutionHistory", |
| 34 | ( |
| 35 | stateMachine: StateMachine, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request: GetExecutionHistoryRequest, |
| 39 | ) => Effect.Effect<sfn.GetExecutionHistoryOutput, sfn.GetExecutionHistoryError> |
| 40 | > |
| 41 | > {} |
| 42 | export const GetExecutionHistory = Binding.Service<GetExecutionHistory>( |
| 43 | "AWS.StepFunctions.GetExecutionHistory", |
| 44 | ); |