@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 50 lines 1.79 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 * Request for {@link ActivateEmailContact} — the bound contact's ARN is
8 * injected automatically. The activation `code` is the one AWS emailed to
9 * the contact's address (a one-time token — pass it as
10 * `Redacted.make(code)` to keep it out of logs).
11 */
12 export interface ActivateEmailContactRequest extends Omit<
13 contacts.ActivateEmailContactRequest,
14 "arn"
15 > {}
16
17 /**
18 * Runtime binding for `notifications-contacts:ActivateEmailContact`.
19 *
20 * Activate the bound email contact with the activation code the address
21 * owner received (see {@link SendActivationCode}) — e.g. from a
22 * confirmation form in your app. Provide the implementation with
23 * `Effect.provide(AWS.NotificationsContacts.ActivateEmailContactHttp)`.
24 * ### Activating a Contact
25 * **Example:** Activate with a User-Supplied Code
26 * ```typescript
27 * // init — bind the operation to the contact
28 * const activate = yield* AWS.NotificationsContacts.ActivateEmailContact(contact);
29 *
30 * // runtime — the user pasted the code from the activation email
31 * yield* activate({ code: Redacted.make(userSuppliedCode) });
32 * ```
33 *
34 * @binding
35 */
36 export interface ActivateEmailContact extends Binding.Service<
37 ActivateEmailContact,
38 "AWS.NotificationsContacts.ActivateEmailContact",
39 (
40 contact: EmailContact,
41 ) => Effect.Effect<
42 (
43 request: ActivateEmailContactRequest,
44 ) => Effect.Effect<contacts.ActivateEmailContactResponse, contacts.ActivateEmailContactError>
45 >
46 > {}
47
48 export const ActivateEmailContact = Binding.Service<ActivateEmailContact>(
49 "AWS.NotificationsContacts.ActivateEmailContact",
50 );