@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 53 lines 1.65 KB
Raw
1 import type * as acm from "@distilled.cloud/aws/acm";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Certificate } from "./Certificate.ts";
5
6 /**
7 * The resend request without the injected `CertificateArn`.
8 */
9 export interface ResendValidationEmailRequest extends Omit<
10 acm.ResendValidationEmailRequest,
11 "CertificateArn"
12 > {}
13
14 /**
15 * Runtime binding for `acm:ResendValidationEmail`.
16 *
17 * Bind this operation to a {@link Certificate} requested with
18 * `validationMethod: "EMAIL"` to get a callable that re-sends the domain
19 * ownership validation email — e.g. behind a "resend email" button in an
20 * onboarding flow. Calling it on a DNS-validated certificate fails with the
21 * typed `InvalidStateException`. Provide the implementation with
22 * `Effect.provide(AWS.ACM.ResendValidationEmailHttp)`.
23 * ### Validating Certificates
24 * **Example:** Re-send the Validation Email
25 * ```typescript
26 * // init — bind the operation to the certificate
27 * const resendValidationEmail =
28 * yield* AWS.ACM.ResendValidationEmail(certificate);
29 *
30 * // runtime
31 * yield* resendValidationEmail({
32 * Domain: "www.example.com",
33 * ValidationDomain: "example.com",
34 * });
35 * ```
36 *
37 * @binding
38 */
39 export interface ResendValidationEmail extends Binding.Service<
40 ResendValidationEmail,
41 "AWS.ACM.ResendValidationEmail",
42 (
43 certificate: Certificate,
44 ) => Effect.Effect<
45 (
46 request: ResendValidationEmailRequest,
47 ) => Effect.Effect<acm.ResendValidationEmailResponse, acm.ResendValidationEmailError>
48 >
49 > {}
50
51 export const ResendValidationEmail = Binding.Service<ResendValidationEmail>(
52 "AWS.ACM.ResendValidationEmail",
53 );