- Create packages/emails/ with EmailClient interface abstraction - Wrap Postmark ServerClient in adapter for clean typing - Add createLoggingEmailClient for dev mode (logs to console) - Split email templates into individual files with full test coverage - Update api-server to use new package via context injection - Remove EMAIL_DEV_MODE - now uses POSTMARK_API_KEY presence - Delete apps/api-server/src/utils/email.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
27 lines
688 B
TypeScript
27 lines
688 B
TypeScript
// Client factories
|
|
export { createPostmarkClient } from "./client.js";
|
|
export { createLoggingEmailClient } from "./logging-client.js";
|
|
|
|
// Core types
|
|
export type { EmailClient, EmailResult } from "./types.js";
|
|
|
|
// Base send function
|
|
export { sendEmail } from "./send.js";
|
|
export type { SendEmailParams } from "./send.js";
|
|
|
|
// Email-specific send functions
|
|
export {
|
|
sendLoginConfirmationEmail,
|
|
sendOrgInviteEmail,
|
|
sendPasswordResetEmail,
|
|
sendVerificationEmail,
|
|
} from "./emails/index.js";
|
|
|
|
// Email param types
|
|
export type {
|
|
SendLoginConfirmationEmailParams,
|
|
SendOrgInviteEmailParams,
|
|
SendPasswordResetEmailParams,
|
|
SendVerificationEmailParams,
|
|
} from "./emails/index.js";
|