import { P as ProviderFactory } from "../../packem_shared/provider.d-BLLbEuQ8.js"; export type { a as Provider } from "../../packem_shared/provider.d-BLLbEuQ8.js"; import { D as DkimOptions } from "../../packem_shared/types.d-A1Eea-p_.js"; import { B as BaseConfig, E as EmailOptions } from "../../packem_shared/types.d-CyiC9uRC.js"; import 'node:buffer'; /** * Cloudflare Email Workers configuration. * * Cloudflare's send binding lives in the Workers runtime, so you wire it up yourself and pass a thin * `send` function — keeping this provider runtime-agnostic and testable. */ interface CloudflareEmailConfig extends BaseConfig { /** * DKIM signing, applied to the serialized MIME message just before it is handed to * {@link CloudflareEmailConfig.send}. * * Canonicalization defaults to `relaxed/relaxed` here rather than the `simple/simple` of * {@link DkimOptions}, since relaying hops re-wrap whitespace. `privateKey` must be key * content — the Workers runtime has no filesystem, so `file://` paths do not resolve. */ dkim?: DkimOptions; /** * Sends a raw RFC 822 message via your Worker's Email binding. * @param from The envelope-from address. * @param to The single recipient address. * @param raw The full RFC 822 (EML) message. * @example * ```ts * send: async (from, to, raw) => { * const { EmailMessage } = await import("cloudflare:email"); * await env.SEND_EMAIL.send(new EmailMessage(from, to, raw)); * } * ``` */ send: (from: string, to: string, raw: string) => Promise; } /** * Cloudflare Email-specific options. */ interface CloudflareEmailOptions extends EmailOptions { /** * Sign this message with DKIM when {@link CloudflareEmailConfig.dkim} is configured. * @default true */ useDkim?: boolean; } /** * Cloudflare Email Workers provider — sends a raw RFC 822 message through a Worker's Email send * binding (supplied via {@link CloudflareEmailConfig.send}). Single-recipient only, per the binding. */ declare const cloudflareEmailProvider: ProviderFactory; export { type CloudflareEmailConfig, type CloudflareEmailOptions, type ProviderFactory, cloudflareEmailProvider };