The best way to control Claude Code, Codex and more from any computer or phone

main
ts 41 lines 1.47 KB
Raw
1 import type * as mm from "@distilled.cloud/aws/mailmanager";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import 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 */
28 export 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<mm.CreateAddressListImportJobResponse, mm.CreateAddressListImportJobError>
37 >
38 > {}
39 export const CreateAddressListImportJob = Binding.Service<CreateAddressListImportJob>(
40 "AWS.MailManager.CreateAddressListImportJob",
41 );