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";
4import type { PhoneNumber } from "./PhoneNumber.ts";
5
6/**
7 * The `OriginationIdentity` is injected by the binding from the bound
8 * phone number; the caller may filter by keyword or page with `NextToken`.
9 */
10export interface DescribeKeywordsRequest extends Omit<
11 smsvoice.DescribeKeywordsRequest,
12 "OriginationIdentity"
13> {}
14
15/**
16 * Runtime binding for `sms-voice:DescribeKeywords`.
17 *
18 * Lists the keywords configured on the bound origination phone number
19 * (one page per call — pass `NextToken` from the previous response to
20 * continue). The deploy-time half grants `sms-voice:DescribeKeywords` on
21 * the number. Provide the implementation with
22 * `Effect.provide(AWS.PinpointSMSVoiceV2.DescribeKeywordsHttp)`.
23 * ### Managing Keywords
24 * **Example:** List the Number's Keywords
25 * ```typescript
26 * // init
27 * const describeKeywords =
28 * yield* AWS.PinpointSMSVoiceV2.DescribeKeywords(number);
29 *
30 * // runtime
31 * const { Keywords } = yield* describeKeywords({});
32 * const info = (Keywords ?? []).find((k) => k.Keyword === "INFO");
33 * ```
34 *
35 * @binding
36 */
37export interface DescribeKeywords extends Binding.Service<
38 DescribeKeywords,
39 "AWS.PinpointSMSVoiceV2.DescribeKeywords",
40 (
41 phoneNumber: PhoneNumber,
42 ) => Effect.Effect<
43 (
44 request: DescribeKeywordsRequest,
45 ) => Effect.Effect<
46 smsvoice.DescribeKeywordsResult,
47 smsvoice.DescribeKeywordsError
48 >
49 >
50> {}
51export const DescribeKeywords = Binding.Service<DescribeKeywords>(
52 "AWS.PinpointSMSVoiceV2.DescribeKeywords",
53);