1import type * as contacts from "@distilled.cloud/aws/notificationscontacts";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { EmailContact } from "./EmailContact.ts";
5
6/**
7 * Runtime binding for `notifications-contacts:GetEmailContact`.
8 *
9 * Read the bound email contact — most usefully its activation `status`,
10 * which flips from `inactive` to `active` once the address owner confirms
11 * the activation email. Provide the implementation with
12 * `Effect.provide(AWS.NotificationsContacts.GetEmailContactHttp)`.
13 * ### Checking Activation Status
14 * **Example:** Read the Contact's Status
15 * ```typescript
16 * // init — bind the operation to the contact
17 * const getContact = yield* AWS.NotificationsContacts.GetEmailContact(contact);
18 *
19 * // runtime
20 * const result = yield* getContact();
21 * const isActive = result.emailContact.status === "active";
22 * ```
23 *
24 * @binding
25 */
26export interface GetEmailContact extends Binding.Service<
27 GetEmailContact,
28 "AWS.NotificationsContacts.GetEmailContact",
29 (
30 contact: EmailContact,
31 ) => Effect.Effect<
32 () => Effect.Effect<
33 contacts.GetEmailContactResponse,
34 contacts.GetEmailContactError
35 >
36 >
37> {}
38
39export const GetEmailContact = Binding.Service<GetEmailContact>(
40 "AWS.NotificationsContacts.GetEmailContact",
41);