@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 51 lines 1.74 KB
Raw
1 import type * as smsvoice from "@distilled.cloud/aws/pinpoint-sms-voice-v2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { OptOutList } from "./OptOutList.ts";
5
6 /**
7 * The `OptOutListName` is injected by the binding from the bound opt-out
8 * list; the caller supplies the destination number to opt out.
9 */
10 export interface PutOptedOutNumberRequest extends Omit<
11 smsvoice.PutOptedOutNumberRequest,
12 "OptOutListName"
13 > {}
14
15 /**
16 * Runtime binding for `sms-voice:PutOptedOutNumber`.
17 *
18 * Adds a destination phone number to the bound opt-out list — further
19 * messages to it through numbers using this list are suppressed. Use it
20 * to honor opt-out requests arriving through channels other than the
21 * carrier keywords (support tickets, web forms). The deploy-time half
22 * grants `sms-voice:PutOptedOutNumber` on the list. Provide the
23 * implementation with
24 * `Effect.provide(AWS.PinpointSMSVoiceV2.PutOptedOutNumberHttp)`.
25 * ### Managing Opt-Outs
26 * **Example:** Opt a Number Out from a Lambda
27 * ```typescript
28 * // init
29 * const optOuts = yield* AWS.PinpointSMSVoiceV2.OptOutList("OptOuts");
30 * const putOptedOut = yield* AWS.PinpointSMSVoiceV2.PutOptedOutNumber(optOuts);
31 *
32 * // runtime
33 * yield* putOptedOut({ OptedOutNumber: "+12065550100" });
34 * ```
35 *
36 * @binding
37 */
38 export interface PutOptedOutNumber extends Binding.Service<
39 PutOptedOutNumber,
40 "AWS.PinpointSMSVoiceV2.PutOptedOutNumber",
41 (
42 optOutList: OptOutList,
43 ) => Effect.Effect<
44 (
45 request: PutOptedOutNumberRequest,
46 ) => Effect.Effect<smsvoice.PutOptedOutNumberResult, smsvoice.PutOptedOutNumberError>
47 >
48 > {}
49 export const PutOptedOutNumber = Binding.Service<PutOptedOutNumber>(
50 "AWS.PinpointSMSVoiceV2.PutOptedOutNumber",
51 );