@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 56 lines 1.97 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 ListWhatsAppTemplateLibrary}. The linked WABA `id` is injected by
8 * the binding from the bound {@link LinkedWhatsAppBusinessAccount}.
9 */
10 export interface ListWhatsAppTemplateLibraryRequest extends Omit<
11 socialmessaging.ListWhatsAppTemplateLibraryInput,
12 "id"
13 > {}
14
15 /**
16 * Runtime binding for `social-messaging:ListWhatsAppTemplateLibrary`.
17 *
18 * Lists the pre-approved templates available in Meta's template library,
19 * optionally filtered by category, topic, or industry.
20 *
21 * The deploy-time half grants `social-messaging:ListWhatsAppTemplateLibrary` 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.ListWhatsAppTemplateLibraryHttp)`.
26 * ### Managing Message Templates
27 * **Example:** Browse Meta's Template Library
28 * ```typescript
29 * // init — bind the operation to the linked WABA
30 * const browseLibrary = yield* AWS.SocialMessaging.ListWhatsAppTemplateLibrary(account);
31 *
32 * // runtime
33 * const { metaLibraryTemplates } = yield* browseLibrary({
34 * filters: { category: "UTILITY" },
35 * });
36 * ```
37 *
38 * @binding
39 */
40 export interface ListWhatsAppTemplateLibrary extends Binding.Service<
41 ListWhatsAppTemplateLibrary,
42 "AWS.SocialMessaging.ListWhatsAppTemplateLibrary",
43 (
44 account: LinkedWhatsAppBusinessAccount,
45 ) => Effect.Effect<
46 (
47 request?: ListWhatsAppTemplateLibraryRequest,
48 ) => Effect.Effect<
49 socialmessaging.ListWhatsAppTemplateLibraryOutput,
50 socialmessaging.ListWhatsAppTemplateLibraryError
51 >
52 >
53 > {}
54 export const ListWhatsAppTemplateLibrary = Binding.Service<ListWhatsAppTemplateLibrary>(
55 "AWS.SocialMessaging.ListWhatsAppTemplateLibrary",
56 );