The best way to control Claude Code, Codex and more from any computer or phone

main
ts 56 lines 1.9 KB
Raw
1 import type * as socialmessaging from "@distilled.cloud/aws/socialmessaging";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { LinkedWhatsAppBusinessAccount } from "./LinkedWhatsAppBusinessAccount.ts";
5
6 /**
7 * Request for {@link GetWhatsAppMessageTemplate}. The linked WABA `id` is injected by
8 * the binding from the bound {@link LinkedWhatsAppBusinessAccount}.
9 */
10 export interface GetWhatsAppMessageTemplateRequest extends Omit<
11 socialmessaging.GetWhatsAppMessageTemplateInput,
12 "id"
13 > {}
14
15 /**
16 * Runtime binding for `social-messaging:GetWhatsAppMessageTemplate`.
17 *
18 * Retrieves a WhatsApp message template's JSON definition from the bound
19 * account by its Meta template id.
20 *
21 * The deploy-time half grants `social-messaging:GetWhatsAppMessageTemplate` on the
22 * bound WABA's ARN and the runtime half injects the linked account id
23 * into every request.
24 * Provide the implementation with
25 * `Effect.provide(AWS.SocialMessaging.GetWhatsAppMessageTemplateHttp)`.
26 * ### Managing Message Templates
27 * **Example:** Read a Template
28 * ```typescript
29 * // init — bind the operation to the linked WABA
30 * const getTemplate = yield* AWS.SocialMessaging.GetWhatsAppMessageTemplate(account);
31 *
32 * // runtime
33 * const { template } = yield* getTemplate({
34 * metaTemplateId: "1234567890",
35 * });
36 * ```
37 *
38 * @binding
39 */
40 export interface GetWhatsAppMessageTemplate extends Binding.Service<
41 GetWhatsAppMessageTemplate,
42 "AWS.SocialMessaging.GetWhatsAppMessageTemplate",
43 (
44 account: LinkedWhatsAppBusinessAccount,
45 ) => Effect.Effect<
46 (
47 request: GetWhatsAppMessageTemplateRequest,
48 ) => Effect.Effect<
49 socialmessaging.GetWhatsAppMessageTemplateOutput,
50 socialmessaging.GetWhatsAppMessageTemplateError
51 >
52 >
53 > {}
54 export const GetWhatsAppMessageTemplate = Binding.Service<GetWhatsAppMessageTemplate>(
55 "AWS.SocialMessaging.GetWhatsAppMessageTemplate",
56 );