refactor: restructure EmailRequest and related types for improved clarity and maintainability
All checks were successful
🚀 Publish Release Package / publish (push) Successful in 22s

This commit is contained in:
2025-06-25 11:43:52 -04:00
parent 847fcfd0b8
commit d1af60afb2
2 changed files with 28 additions and 24 deletions

View File

@@ -7,30 +7,6 @@ import (
"time"
)
type EmailRequest struct {
Source string `json:"Source"`
Destination struct {
ToAddresses []string `json:"ToAddresses"`
CcAddresses []string `json:"CcAddresses"`
BccAddresses []string `json:"BccAddresses"`
} `json:"Destination"`
Message struct {
Body struct {
Html struct {
Data string `json:"Data"`
} `json:"Html,omitempty"`
Text struct {
Data string `json:"Data"`
} `json:"Text,omitempty"`
} `json:"Body"`
Subject struct {
Data string `json:"Data"`
} `json:"Subject"`
} `json:"Message"`
ScheduledTime time.Time `json:"ScheduledTime,omitempty"`
Catch bool `json:"Catch,omitempty"`
}
type EmailCreateResponse struct {
Id string `json:"id"`
CreatedAt time.Time `json:"created_at"`