export { type A as AttachmentDataOptions, type a as AttachmentOptions, type B as BatchBase, type b as BatchRenderer, D as DraftMailMessage, type F as FeatureCheckMode, M as Mail, type c as MailGlobalConfig, d as MailMessage, type e as MailOptions, type P as Personalization, type S as SendBatchOptions, type f as SendableMessage, g as createMail, h as detectMimeType, i as generateContentId, r as readFileAsBuffer } from "./packem_shared/mail.d-2u-30lWz.js"; export type { M as Middleware, S as SendFunction } from "./packem_shared/types.d-Chhzb-48.js"; export { type a as Provider, type P as ProviderFactory, d as defineProvider } from "./packem_shared/provider.d-BLLbEuQ8.js"; export type { T as TemplateRenderer } from "./packem_shared/types.d-I-KeZ5w2.js"; export type { A as Attachment, B as BaseConfig, C as CalendarEventOptions, c as EmailAddress, e as EmailHeaders, E as EmailOptions, a as EmailResult, d as EmailTag, F as FeatureFlags, I as ImmutableHeaders, M as MaybePromise, P as Priority, b as Receipt, R as Result } from "./packem_shared/types.d-CyiC9uRC.js"; export { default as parseEml } from "./utils/parse-eml.js"; export { type OkResult, isErr, isOk, mapOk, tryAsync, unwrap, unwrapOr } from "./utils/result.js"; export { type FeatureSupportResult, type FeatureViolation, default as checkFeatureSupport } from "./utils/validation/check-feature-support.js"; import 'ical-generator'; import 'node:buffer'; import "./packem_shared/types.d-A1Eea-p_.js"; interface ErrorProperties { cause?: unknown; hint?: ErrorHint; location?: ErrorLocation; message?: string; name: string; stack?: string; title?: string; } interface ErrorLocation { column?: number; file?: string; line?: number; } /** * A message that explains to the user how they can fix the error. * @example * ```ts * const error = new VisulimaError({ * hint: "Try running `npm install` to install missing dependencies.", * location: { * file: "src/index.ts", * line: 1, * column: 1, * }, * message: "Cannot find module 'react'", * name: "ModuleNotFoundError", * }); * ``` * * For more complex hints, you can pass an array of strings or a single string in markdown format. */ type ErrorHint = string[] | string; declare class VisulimaError extends Error { loc: ErrorLocation | undefined; title: string | undefined; /** * A message that explains to the user how they can fix the error. */ hint: ErrorHint | undefined; type: string; constructor({ cause, hint, location, message, name, stack, title }: ErrorProperties); setLocation(location: ErrorLocation): void; setName(name: string): void; setMessage(message: string): void; setHint(hint: ErrorHint): void; } /** * Base error class for email package operations. * @param component The component name where the error occurred. * @param message The error message describing what went wrong. * @param options Optional error options including cause, code, and hint. */ declare class EmailError extends VisulimaError { readonly component: string; readonly code?: string; /** * True when repeating the same request would fail the same way, so a queue worker should * dead-letter the job instead of retrying it. */ readonly permanent: boolean; constructor(component: string, message: string, options?: { cause?: Error | unknown; code?: string; hint?: string | string[]; permanent?: boolean; }); } /** * Error for missing required options * @param component The component name where the error occurred * @param name The name(s) of the missing required option(s) */ declare class RequiredOptionError extends EmailError { constructor(component: string, name: string | string[]); } export { EmailError, RequiredOptionError };