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

main
ts 43 lines 1.5 KB
Raw
1 import type * as bcm from "@distilled.cloud/aws/bcm-data-exports";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Export } from "./Export.ts";
5
6 /**
7 * Request for {@link GetExecution} — the bound export's ARN is injected
8 * automatically.
9 */
10 export interface GetExecutionRequest extends Omit<bcm.GetExecutionRequest, "ExportArn"> {}
11
12 /**
13 * Runtime binding for `bcm-data-exports:GetExecution`.
14 *
15 * Bind this operation to an {@link Export} to read the status of one export
16 * execution (delivery run) — its status code, reason, and timestamps — from
17 * inside a function runtime. Useful for delivery monitors that alert when a
18 * refresh fails. Provide the implementation with
19 * `Effect.provide(AWS.BCMDataExports.GetExecutionHttp)`.
20 * ### Monitoring Executions
21 * **Example:** Check an Execution's Status
22 * ```typescript
23 * // init — bind the operation to the export
24 * const getExecution = yield* AWS.BCMDataExports.GetExecution(cur);
25 *
26 * // runtime
27 * const result = yield* getExecution({ ExecutionId: executionId });
28 * const status = result.ExecutionStatus?.StatusCode;
29 * ```
30 *
31 * @binding
32 */
33 export interface GetExecution extends Binding.Service<
34 GetExecution,
35 "AWS.BCMDataExports.GetExecution",
36 (
37 dataExport: Export,
38 ) => Effect.Effect<
39 (request: GetExecutionRequest) => Effect.Effect<bcm.GetExecutionResponse, bcm.GetExecutionError>
40 >
41 > {}
42
43 export const GetExecution = Binding.Service<GetExecution>("AWS.BCMDataExports.GetExecution");