mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 08:13:23 +00:00
Fix type inconsistencies and missing null checks
- Update QueuedEmail interface to include `| null` for optional fields to match BaseEmailDocument - Add missing null checks for replyTo and from fields in sendEmail processing - Add proper email validation for replyTo and from fields (single email addresses) - Ensure type consistency across all email-related interfaces Fixes potential type conflicts between QueuedEmail and BaseEmailDocument, and ensures all nullable email fields are properly validated. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -75,23 +75,23 @@ export interface MailingTransportConfig {
|
||||
|
||||
export interface QueuedEmail {
|
||||
id: string
|
||||
template?: string
|
||||
template?: string | null
|
||||
to: string[]
|
||||
cc?: string[]
|
||||
bcc?: string[]
|
||||
from?: string
|
||||
replyTo?: string
|
||||
cc?: string[] | null
|
||||
bcc?: string[] | null
|
||||
from?: string | null
|
||||
replyTo?: string | null
|
||||
subject: string
|
||||
html: string
|
||||
text?: string
|
||||
variables?: Record<string, any>
|
||||
scheduledAt?: string
|
||||
sentAt?: string
|
||||
text?: string | null
|
||||
variables?: Record<string, any> | null
|
||||
scheduledAt?: string | null
|
||||
sentAt?: string | null
|
||||
status: 'pending' | 'processing' | 'sent' | 'failed'
|
||||
attempts: number
|
||||
lastAttemptAt?: string
|
||||
error?: string
|
||||
priority?: number
|
||||
lastAttemptAt?: string | null
|
||||
error?: string | null
|
||||
priority?: number | null
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user