import * as Effect from "effect/Effect"; import type { LinkedWhatsAppBusinessAccount } from "./LinkedWhatsAppBusinessAccount.ts"; /** * Shared scaffolding for AWS End User Messaging Social (WhatsApp) HTTP * bindings. * * NOT exported from `index.ts` — every thin `{Op}Http.ts` in this service * is a `Layer.effect(Cap, make…HttpBinding({ … }))` over one of the two * builders below. Everything except the operation and the IAM action list * is boilerplate: WABA-scoped bindings inject the bound linked account's * `id` (`waba-…`) into every request and grant `actions` on the WABA ARN; * phone-plane bindings pass the request through (the caller addresses a * phone number by its `phone-number-id-…`) and grant `actions` on `*`, * because the WABA's phone numbers are provisioned by Meta at onboarding * time and their ARNs are not derivable from the WABA ARN at bind time. */ /** * Build the impl Effect for an operation scoped to the bound * {@link LinkedWhatsAppBusinessAccount} (message templates, WhatsApp * Flows): the deploy-time half grants `actions` on the WABA ARN and the * runtime half injects the linked account id into every request as `id`. */ export declare const makeWabaScopedHttpBinding: (options: { /** Fully-qualified binding tag, e.g. `AWS.SocialMessaging.ListWhatsAppMessageTemplates`. */ tag: string; /** The distilled operation; `id` is injected from the linked account. */ operation: Effect.Effect<(input: I) => Effect.Effect, never, R>; /** IAM actions granted on the WABA ARN. */ actions: readonly string[]; }) => Effect.Effect<(account: LinkedWhatsAppBusinessAccount) => Effect.Effect<(request?: Omit | undefined) => Effect.Effect, never, never>, never, R>; /** * Build the impl Effect for a phone-number-plane operation * (`SendWhatsAppMessage`, message media): the caller addresses one of the * bound WABA's phone numbers per request (`originationPhoneNumberId` / * `id`), so the request passes through unchanged. The deploy-time half * grants `actions` on `*` — phone numbers are provisioned by Meta under * the WABA and their ARNs are not derivable from the WABA ARN. */ export declare const makeWabaPhonePlaneHttpBinding: (options: { /** Fully-qualified binding tag, e.g. `AWS.SocialMessaging.SendWhatsAppMessage`. */ tag: string; /** The distilled operation, invoked with the caller's request as-is. */ operation: Effect.Effect<(input: I) => Effect.Effect, never, R>; /** IAM actions granted on `*`. */ actions: readonly string[]; }) => Effect.Effect<(account: LinkedWhatsAppBusinessAccount) => Effect.Effect<(request: I) => Effect.Effect, never, never>, never, R>; //# sourceMappingURL=BindingHttp.d.ts.map