1import type * as socialmessaging from "@distilled.cloud/aws/socialmessaging";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { LinkedWhatsAppBusinessAccount } from "./LinkedWhatsAppBusinessAccount.ts";
5
6/**
7 * Request for {@link ListWhatsAppFlowAssets}. The linked WABA `id` is injected by
8 * the binding from the bound {@link LinkedWhatsAppBusinessAccount}.
9 */
10export interface ListWhatsAppFlowAssetsRequest extends Omit<
11 socialmessaging.ListWhatsAppFlowAssetsInput,
12 "id"
13> {}
14
15/**
16 * Runtime binding for `social-messaging:ListWhatsAppFlowAssets`.
17 *
18 * Lists the assets (Flow JSON) of a WhatsApp Flow on the bound account,
19 * with download URLs.
20 *
21 * The deploy-time half grants `social-messaging:ListWhatsAppFlowAssets` 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.ListWhatsAppFlowAssetsHttp)`.
26 * ### Managing WhatsApp Flows
27 * **Example:** List a Flow's Assets
28 * ```typescript
29 * // init — bind the operation to the linked WABA
30 * const listFlowAssets = yield* AWS.SocialMessaging.ListWhatsAppFlowAssets(account);
31 *
32 * // runtime
33 * const { flowAssets } = yield* listFlowAssets({
34 * flowId: "1234567890",
35 * });
36 * ```
37 *
38 * @binding
39 */
40export interface ListWhatsAppFlowAssets extends Binding.Service<
41 ListWhatsAppFlowAssets,
42 "AWS.SocialMessaging.ListWhatsAppFlowAssets",
43 (
44 account: LinkedWhatsAppBusinessAccount,
45 ) => Effect.Effect<
46 (
47 request: ListWhatsAppFlowAssetsRequest,
48 ) => Effect.Effect<
49 socialmessaging.ListWhatsAppFlowAssetsOutput,
50 socialmessaging.ListWhatsAppFlowAssetsError
51 >
52 >
53> {}
54export const ListWhatsAppFlowAssets = Binding.Service<ListWhatsAppFlowAssets>(
55 "AWS.SocialMessaging.ListWhatsAppFlowAssets",
56);