@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 38 lines 1.3 KB
Raw
1 import type * as contacts from "@distilled.cloud/aws/notificationscontacts";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import 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 */
26 export interface GetEmailContact extends Binding.Service<
27 GetEmailContact,
28 "AWS.NotificationsContacts.GetEmailContact",
29 (
30 contact: EmailContact,
31 ) => Effect.Effect<
32 () => Effect.Effect<contacts.GetEmailContactResponse, contacts.GetEmailContactError>
33 >
34 > {}
35
36 export const GetEmailContact = Binding.Service<GetEmailContact>(
37 "AWS.NotificationsContacts.GetEmailContact",
38 );