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 * Runtime binding for `social-messaging:DeleteWhatsAppMessageMedia`.
8 *
9 * Deletes a media file previously uploaded to WhatsApp from the given phone
10 * number.
11 *
12 * The caller addresses one of the bound account's phone numbers per
13 * request; phone-number ARNs are provisioned by Meta under the WABA, so
14 * the deploy-time half grants `social-messaging:DeleteWhatsAppMessageMedia` on `*`.
15 * Provide the implementation with
16 * `Effect.provide(AWS.SocialMessaging.DeleteWhatsAppMessageMediaHttp)`.
17 * ### Managing Message Media
18 * **Example:** Delete Uploaded Media
19 * ```typescript
20 * // init — bind the operation to the linked WABA
21 * const deleteMedia = yield* AWS.SocialMessaging.DeleteWhatsAppMessageMedia(account);
22 *
23 * // runtime
24 * const { success } = yield* deleteMedia({
25 * mediaId: "media-id-to-delete",
26 * originationPhoneNumberId: "phone-number-id-0123456789abcdef",
27 * });
28 * ```
29 *
30 * @binding
31 */
32export interface DeleteWhatsAppMessageMedia extends Binding.Service<
33 DeleteWhatsAppMessageMedia,
34 "AWS.SocialMessaging.DeleteWhatsAppMessageMedia",
35 (
36 account: LinkedWhatsAppBusinessAccount,
37 ) => Effect.Effect<
38 (
39 request: socialmessaging.DeleteWhatsAppMessageMediaInput,
40 ) => Effect.Effect<
41 socialmessaging.DeleteWhatsAppMessageMediaOutput,
42 socialmessaging.DeleteWhatsAppMessageMediaError
43 >
44 >
45> {}
46export const DeleteWhatsAppMessageMedia =
47 Binding.Service<DeleteWhatsAppMessageMedia>(
48 "AWS.SocialMessaging.DeleteWhatsAppMessageMedia",
49 );