1import type * as smsvoice from "@distilled.cloud/aws/pinpoint-sms-voice-v2";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `sms-voice:CarrierLookup`.
7 *
8 * Looks up carrier metadata for a destination phone number — its E.164
9 * normalization, country, carrier name, and number type (`MOBILE`,
10 * `LANDLINE`, `VOIP`, …). Use it to validate destinations before
11 * sending. Account-level: lookups act on raw phone numbers, so the
12 * deploy-time grant is `sms-voice:CarrierLookup` on `*`. Each lookup
13 * incurs a small per-request fee. Provide the implementation with
14 * `Effect.provide(AWS.PinpointSMSVoiceV2.CarrierLookupHttp)`.
15 * ### Validating Destinations
16 * **Example:** Check a Number Before Sending
17 * ```typescript
18 * // init — bind the account-level operation
19 * const carrierLookup = yield* AWS.PinpointSMSVoiceV2.CarrierLookup();
20 *
21 * // runtime
22 * const info = yield* carrierLookup({ PhoneNumber: "+12065550100" });
23 * const isMobile = info.PhoneNumberType === "MOBILE";
24 * ```
25 *
26 * @binding
27 */
28export interface CarrierLookup extends Binding.Service<
29 CarrierLookup,
30 "AWS.PinpointSMSVoiceV2.CarrierLookup",
31 () => Effect.Effect<
32 (
33 request: smsvoice.CarrierLookupRequest,
34 ) => Effect.Effect<
35 smsvoice.CarrierLookupResult,
36 smsvoice.CarrierLookupError
37 >
38 >
39> {}
40export const CarrierLookup = Binding.Service<CarrierLookup>(
41 "AWS.PinpointSMSVoiceV2.CarrierLookup",
42);