| 1 | import type * as deadline from "@distilled.cloud/aws/deadline"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Queue } from "./Queue.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `deadline:ListTasks`. |
| 8 | * |
| 9 | * Enumerates the tasks of a step in the bound {@link Queue} (paginated). |
| 10 | * The queue's `farmId`/`queueId` are injected from the binding. Provide |
| 11 | * the implementation with `Effect.provide(AWS.Deadline.ListTasksHttp)`. |
| 12 | * ### Monitoring Tasks |
| 13 | * **Example:** List A Step's Tasks |
| 14 | * ```typescript |
| 15 | * // init — bind the operation to the queue |
| 16 | * const listTasks = yield* AWS.Deadline.ListTasks(queue); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const { tasks } = yield* listTasks({ jobId, stepId }); |
| 20 | * ``` |
| 21 | * |
| 22 | * @binding |
| 23 | */ |
| 24 | export interface ListTasks extends Binding.Service< |
| 25 | ListTasks, |
| 26 | "AWS.Deadline.ListTasks", |
| 27 | ( |
| 28 | queue: Queue, |
| 29 | ) => Effect.Effect< |
| 30 | ( |
| 31 | request: Omit<deadline.ListTasksRequest, "farmId" | "queueId">, |
| 32 | ) => Effect.Effect<deadline.ListTasksResponse, deadline.ListTasksError> |
| 33 | > |
| 34 | > {} |
| 35 | export const ListTasks = Binding.Service<ListTasks>("AWS.Deadline.ListTasks"); |