1import type * as mm from "@distilled.cloud/aws/mailmanager";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { AddressList } from "./AddressList.ts";
5
6/**
7 * Runtime binding for `ses:CreateAddressListImportJob`.
8 *
9 * Creates a bulk import job against the bound address list, returning
10 * the job id and a pre-signed URL to upload the address data (CSV or
11 * JSON). The address list id is injected from the binding. Provide the implementation with
12 * `Effect.provide(AWS.MailManager.CreateAddressListImportJobHttp)`.
13 * ### Bulk Importing Members
14 * **Example:** Create an Import Job
15 * ```typescript
16 * const createImportJob = yield* MailManager.CreateAddressListImportJob(blockList);
17 *
18 * // runtime
19 * const { JobId, PreSignedUrl } = yield* createImportJob({
20 * Name: "nightly-sync",
21 * ImportDataFormat: { ImportDataType: "CSV" },
22 * });
23 * // upload the CSV to PreSignedUrl, then start the job
24 * ```
25 *
26 * @binding
27 */
28export interface CreateAddressListImportJob extends Binding.Service<
29 CreateAddressListImportJob,
30 "AWS.MailManager.CreateAddressListImportJob",
31 (
32 list: AddressList,
33 ) => Effect.Effect<
34 (
35 request: Omit<mm.CreateAddressListImportJobRequest, "AddressListId">,
36 ) => Effect.Effect<
37 mm.CreateAddressListImportJobResponse,
38 mm.CreateAddressListImportJobError
39 >
40 >
41> {}
42export const CreateAddressListImportJob =
43 Binding.Service<CreateAddressListImportJob>(
44 "AWS.MailManager.CreateAddressListImportJob",
45 );