1import type * as ssm from "@distilled.cloud/aws/ssm-contacts";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { ContactChannel } from "./ContactChannel.ts";
5
6/**
7 * Runtime binding for `ssm-contacts:SendActivationCode`.
8 *
9 * Send (or re-send) the activation code to the bound contact channel's
10 * address. The channel owner passes the code to `ActivateContactChannel`
11 * to confirm the channel. The channel's ARN is injected as
12 * `ContactChannelId`.
13 * Provide the implementation with
14 * `Effect.provide(AWS.SSMContacts.SendActivationCodeHttp)`.
15 * ### Activating Contact Channels
16 * **Example:** Send the Activation Code
17 * ```typescript
18 * const sendActivationCode = yield* AWS.SSMContacts.SendActivationCode(email);
19 *
20 * // runtime — e.g. behind a "resend code" button
21 * yield* sendActivationCode();
22 * ```
23 *
24 * @binding
25 */
26export interface SendActivationCode extends Binding.Service<
27 SendActivationCode,
28 "AWS.SSMContacts.SendActivationCode",
29 (
30 channel: ContactChannel,
31 ) => Effect.Effect<
32 () => Effect.Effect<
33 ssm.SendActivationCodeResult,
34 ssm.SendActivationCodeError
35 >
36 >
37> {}
38export const SendActivationCode = Binding.Service<SendActivationCode>(
39 "AWS.SSMContacts.SendActivationCode",
40);