1import * as omics from "@distilled.cloud/aws/omics";
2import * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { AnnotationStore } from "./AnnotationStore.ts";
5
6export interface StartAnnotationImportJobRequest extends Omit<
7 omics.StartAnnotationImportRequest,
8 "destinationName"
9> {}
10
11/**
12 * Runtime binding for `omics:StartAnnotationImportJob`.
13 *
14 * Bind this operation to an `AnnotationStore` to get a callable that starts a
15 * job importing annotation files (TSV/VCF/GFF) into the store — the store name
16 * is injected automatically as `destinationName` and the action is granted on
17 * the bound resource (with `iam:PassRole` for the HealthOmics service role).
18 * Provide the implementation with
19 * `Effect.provide(AWS.Omics.StartAnnotationImportJobHttp)`.
20 * ### Annotation Imports
21 * **Example:** Bind StartAnnotationImportJob to an AnnotationStore
22 * ```typescript
23 * // init
24 * const startImport = yield* AWS.Omics.StartAnnotationImportJob(store);
25 * // runtime
26 * const result = yield* startImport({
27 * roleArn,
28 * items: [{ source: "s3://my-bucket/annotations.tsv" }],
29 * });
30 * ```
31 *
32 * @binding
33 */
34export interface StartAnnotationImportJob extends Binding.Service<
35 StartAnnotationImportJob,
36 "AWS.Omics.StartAnnotationImportJob",
37 (
38 store: AnnotationStore,
39 ) => Effect.Effect<
40 (
41 request: StartAnnotationImportJobRequest,
42 ) => Effect.Effect<
43 omics.StartAnnotationImportResponse,
44 omics.StartAnnotationImportJobError
45 >
46 >
47> {}
48
49export const StartAnnotationImportJob =
50 Binding.Service<StartAnnotationImportJob>(
51 "AWS.Omics.StartAnnotationImportJob",
52 );