@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.55 KB
Raw
1 import type * as mwaa from "@distilled.cloud/aws/mwaa-serverless";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Workflow } from "./Workflow.ts";
5
6 /**
7 * Request accepted by the {@link ListTaskInstances} runtime callable. The
8 * `WorkflowArn` is injected from the bound {@link Workflow}.
9 */
10 export type ListTaskInstancesInput = Omit<mwaa.ListTaskInstancesRequest, "WorkflowArn">;
11
12 /**
13 * Runtime binding for `airflow-serverless:ListTaskInstances`.
14 *
15 * Lists the task instances of a run of the bound {@link Workflow} with
16 * their statuses and durations. Provide the implementation with
17 * `Effect.provide(AWS.MWAAServerless.ListTaskInstancesHttp)`.
18 * ### Observing Tasks
19 * **Example:** List A Run's Task Instances
20 * ```typescript
21 * // init — bind the operation to the workflow
22 * const listTaskInstances = yield* AWS.MWAAServerless.ListTaskInstances(workflow);
23 *
24 * // runtime
25 * const { TaskInstances } = yield* listTaskInstances({ RunId: runId });
26 * for (const task of TaskInstances ?? []) {
27 * yield* Effect.log(`${task.TaskInstanceId}: ${task.Status}`);
28 * }
29 * ```
30 *
31 * @binding
32 */
33 export interface ListTaskInstances extends Binding.Service<
34 ListTaskInstances,
35 "AWS.MWAAServerless.ListTaskInstances",
36 (
37 workflow: Workflow,
38 ) => Effect.Effect<
39 (
40 request: ListTaskInstancesInput,
41 ) => Effect.Effect<mwaa.ListTaskInstancesResponse, mwaa.ListTaskInstancesError>
42 >
43 > {}
44 export const ListTaskInstances = Binding.Service<ListTaskInstances>(
45 "AWS.MWAAServerless.ListTaskInstances",
46 );