The best way to control Claude Code, Codex and more from any computer or phone

main
ts 44 lines 1.68 KB
Raw
1 import type * as transfer from "@distilled.cloud/aws/transfer";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `transfer:SendWorkflowStepState`.
7 *
8 * Reports a custom workflow step's outcome back to Transfer Family. A
9 * managed workflow's custom step invokes a Lambda with the workflow id,
10 * execution id, and a callback token; the Lambda MUST call this operation
11 * with `SUCCESS` or `FAILURE` or the step hangs until its timeout. The
12 * action authorizes on the workflow's own ARN, which arrives at runtime
13 * inside the step event, so the grant is on `*`. Provide the
14 * implementation with
15 * `Effect.provide(AWS.Transfer.SendWorkflowStepStateHttp)`.
16 * ### Custom Workflow Steps
17 * **Example:** Complete a Custom Step
18 * ```typescript
19 * // init — account-level binding, no resource argument
20 * const sendWorkflowStepState = yield* AWS.Transfer.SendWorkflowStepState();
21 *
22 * // runtime — inside the Lambda invoked by the workflow's custom step
23 * yield* sendWorkflowStepState({
24 * WorkflowId: event.serviceMetadata.executionDetails.workflowId,
25 * ExecutionId: event.serviceMetadata.executionDetails.executionId,
26 * Token: event.token,
27 * Status: "SUCCESS",
28 * });
29 * ```
30 *
31 * @binding
32 */
33 export interface SendWorkflowStepState extends Binding.Service<
34 SendWorkflowStepState,
35 "AWS.Transfer.SendWorkflowStepState",
36 () => Effect.Effect<
37 (
38 request: transfer.SendWorkflowStepStateRequest,
39 ) => Effect.Effect<transfer.SendWorkflowStepStateResponse, transfer.SendWorkflowStepStateError>
40 >
41 > {}
42 export const SendWorkflowStepState = Binding.Service<SendWorkflowStepState>(
43 "AWS.Transfer.SendWorkflowStepState",
44 );