import { PluginContext, PluginDescriptor, ResolvedPlugin } from "emdash"; import { EmailDeliverEvent } from "emdash/plugin"; //#region src/plugins/cloudflare-email.d.ts /** * Cloudflare Email Provider Configuration */ interface CloudflareEmailConfig { /** * Name of the `send_email` binding in the wrangler config. * @default "EMAIL" */ binding?: string; /** * Sender address. Must belong to a domain onboarded for Cloudflare * Email Sending. Either a bare address or `{ email, name }`. */ from: string | { email: string; name?: string; }; /** * Optional Reply-To address — useful when the sender is a * no-reply style subdomain address. */ replyTo?: string; } /** * Build the email:deliver handler. * * Exported for testing — production code should use {@link cloudflareEmail}. * * @internal */ declare function createCloudflareEmailDeliver(config: CloudflareEmailConfig, loadEnv?: () => Promise>): (event: EmailDeliverEvent, ctx: PluginContext) => Promise; /** * Instantiate the Cloudflare Email Sending provider plugin. * * Called by the generated `virtual:emdash/plugins` module with the * `options` from the {@link cloudflareEmail} descriptor. Use * `cloudflareEmail()` in the astro config — this export exists so the * integration can bundle the plugin from a static entrypoint. */ declare function createPlugin(config: CloudflareEmailConfig): ResolvedPlugin; /** * Create a Cloudflare Email Sending provider plugin descriptor. * * Pass it to the emdash() integration's plugins array, activate it under * Admin → Extensions, then select it under Settings → Email. * * Returns a `PluginDescriptor` (not an in-process definition): the astro * integration requires every `plugins: []` entry to resolve to a bundlable * `entrypoint`, so the descriptor points at this module and the integration * imports {@link createPlugin} from it at build time (#1721). */ declare function cloudflareEmail(config: CloudflareEmailConfig): PluginDescriptor; //#endregion export { CloudflareEmailConfig, cloudflareEmail, cloudflareEmail as default, createCloudflareEmailDeliver, createPlugin };