| 1 | import type * as socialmessaging from "@distilled.cloud/aws/socialmessaging"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { LinkedWhatsAppBusinessAccount } from "./LinkedWhatsAppBusinessAccount.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Request for {@link DeleteWhatsAppFlow}. The linked WABA `id` is injected by |
| 8 | * the binding from the bound {@link LinkedWhatsAppBusinessAccount}. |
| 9 | */ |
| 10 | export interface DeleteWhatsAppFlowRequest extends Omit< |
| 11 | socialmessaging.DeleteWhatsAppFlowInput, |
| 12 | "id" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for `social-messaging:DeleteWhatsAppFlow`. |
| 17 | * |
| 18 | * Deletes a DRAFT WhatsApp Flow from the bound account. Published flows |
| 19 | * must be deprecated instead. |
| 20 | * |
| 21 | * The deploy-time half grants `social-messaging:DeleteWhatsAppFlow` 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.DeleteWhatsAppFlowHttp)`. |
| 26 | * ### Managing WhatsApp Flows |
| 27 | * **Example:** Delete a Flow |
| 28 | * ```typescript |
| 29 | * // init — bind the operation to the linked WABA |
| 30 | * const deleteFlow = yield* AWS.SocialMessaging.DeleteWhatsAppFlow(account); |
| 31 | * |
| 32 | * // runtime |
| 33 | * yield* deleteFlow({ flowId: "1234567890" }); |
| 34 | * ``` |
| 35 | * |
| 36 | * @binding |
| 37 | */ |
| 38 | export interface DeleteWhatsAppFlow extends Binding.Service< |
| 39 | DeleteWhatsAppFlow, |
| 40 | "AWS.SocialMessaging.DeleteWhatsAppFlow", |
| 41 | ( |
| 42 | account: LinkedWhatsAppBusinessAccount, |
| 43 | ) => Effect.Effect< |
| 44 | ( |
| 45 | request: DeleteWhatsAppFlowRequest, |
| 46 | ) => Effect.Effect< |
| 47 | socialmessaging.DeleteWhatsAppFlowOutput, |
| 48 | socialmessaging.DeleteWhatsAppFlowError |
| 49 | > |
| 50 | > |
| 51 | > {} |
| 52 | export const DeleteWhatsAppFlow = Binding.Service<DeleteWhatsAppFlow>( |
| 53 | "AWS.SocialMessaging.DeleteWhatsAppFlow", |
| 54 | ); |