| 1 | import * as omics from "@distilled.cloud/aws/omics"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Workflow } from "./Workflow.ts"; |
| 5 | |
| 6 | export interface StartRunRequest extends Omit< |
| 7 | omics.StartRunRequest, |
| 8 | "workflowId" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `omics:StartRun`. |
| 13 | * |
| 14 | * Bind this operation to a `Workflow` to get a callable that starts a run of the bound workflow — the |
| 15 | * store/workflow id is injected automatically and the action is granted on the |
| 16 | * bound resource. Provide the implementation with |
| 17 | * `Effect.provide(AWS.Omics.StartRunHttp)`. |
| 18 | * ### Runs |
| 19 | * **Example:** Bind StartRun to a Workflow |
| 20 | * ```typescript |
| 21 | * // init |
| 22 | * const startRun = yield* AWS.Omics.StartRun(workflow); |
| 23 | * // runtime |
| 24 | * const result = yield* startRun({}); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface StartRun extends Binding.Service< |
| 30 | StartRun, |
| 31 | "AWS.Omics.StartRun", |
| 32 | ( |
| 33 | workflow: Workflow, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request?: StartRunRequest, |
| 37 | ) => Effect.Effect<omics.StartRunResponse, omics.StartRunError> |
| 38 | > |
| 39 | > {} |
| 40 | |
| 41 | export const StartRun = Binding.Service<StartRun>("AWS.Omics.StartRun"); |