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 DeprecateWhatsAppFlow}. The linked WABA `id` is injected by
8 * the binding from the bound {@link LinkedWhatsAppBusinessAccount}.
9 */
10export interface DeprecateWhatsAppFlowRequest extends Omit<
11 socialmessaging.DeprecateWhatsAppFlowInput,
12 "id"
13> {}
14
15/**
16 * Runtime binding for `social-messaging:DeprecateWhatsAppFlow`.
17 *
18 * Deprecates a published WhatsApp Flow on the bound account so it can no
19 * longer be sent to users.
20 *
21 * The deploy-time half grants `social-messaging:DeprecateWhatsAppFlow` 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.DeprecateWhatsAppFlowHttp)`.
26 * ### Managing WhatsApp Flows
27 * **Example:** Deprecate a Flow
28 * ```typescript
29 * // init — bind the operation to the linked WABA
30 * const deprecateFlow = yield* AWS.SocialMessaging.DeprecateWhatsAppFlow(account);
31 *
32 * // runtime
33 * yield* deprecateFlow({ flowId: "1234567890" });
34 * ```
35 *
36 * @binding
37 */
38export interface DeprecateWhatsAppFlow extends Binding.Service<
39 DeprecateWhatsAppFlow,
40 "AWS.SocialMessaging.DeprecateWhatsAppFlow",
41 (
42 account: LinkedWhatsAppBusinessAccount,
43 ) => Effect.Effect<
44 (
45 request: DeprecateWhatsAppFlowRequest,
46 ) => Effect.Effect<
47 socialmessaging.DeprecateWhatsAppFlowOutput,
48 socialmessaging.DeprecateWhatsAppFlowError
49 >
50 >
51> {}
52export const DeprecateWhatsAppFlow = Binding.Service<DeprecateWhatsAppFlow>(
53 "AWS.SocialMessaging.DeprecateWhatsAppFlow",
54);