@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, 06:00 UTC

main
ts 54 lines 1.98 KB
Raw
1 import type * as route53domains from "@distilled.cloud/aws/route-53-domains";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 export interface GetDomainDetailRequest extends route53domains.GetDomainDetailRequest {}
6
7 /**
8 * Runtime binding for `route53domains:GetDomainDetail` — return detailed
9 * information (nameservers, contacts, expiry, DNSSEC keys, status list)
10 * about a domain registered with the current AWS account.
11 *
12 * Route 53 Domains is a global registration API with no resource-level IAM:
13 * the binding takes no arguments and grants the function
14 * `route53domains:GetDomainDetail` on `*`. Calls are pinned to `us-east-1`,
15 * the only region that serves the Route 53 Domains API, regardless of where
16 * the function runs.
17 *
18 * Requesting detail for a domain that is not registered in the current
19 * account fails with a typed `DomainNotFound` error. Provide the
20 * implementation with
21 * `Effect.provide(AWS.Route53Domains.GetDomainDetailHttp)`.
22 *
23 * ### Reading Domain Details
24 * **Example:** Get the Nameservers of an Owned Domain
25 * ```typescript
26 * // init
27 * const getDomainDetail = yield* AWS.Route53Domains.GetDomainDetail();
28 *
29 * // runtime
30 * const detail = yield* getDomainDetail({ DomainName: "example.com" });
31 * const nameservers = (detail.Nameservers ?? []).map((ns) => ns.Name);
32 * ```
33 *
34 * **Example:** Handle a Domain That Is Not in the Account
35 * ```typescript
36 * const detail = yield* getDomainDetail({ DomainName: "example.com" }).pipe(
37 * Effect.catchTag("DomainNotFound", () => Effect.succeed(undefined)),
38 * );
39 * ```
40 *
41 * @binding
42 */
43 export interface GetDomainDetail extends Binding.Service<
44 GetDomainDetail,
45 "AWS.Route53Domains.GetDomainDetail",
46 () => Effect.Effect<
47 (
48 request: GetDomainDetailRequest,
49 ) => Effect.Effect<route53domains.GetDomainDetailResponse, route53domains.GetDomainDetailError>
50 >
51 > {}
52 export const GetDomainDetail = Binding.Service<GetDomainDetail>(
53 "AWS.Route53Domains.GetDomainDetail",
54 );