feat(notification): add durable mail delivery state
This commit is contained in:
1 parent
391c8a6cec
commit
2db585fbff
41 files changed
+4903
-108
No files matched your search
@@ -30,6 +30,43 @@ type ConsumerProcessedEvent struct {
|
||||
ProcessedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type Delivery struct {
|
||||
ID pgtype.UUID
|
||||
SourceEventID pgtype.UUID
|
||||
RecipientUserID pgtype.UUID
|
||||
RecipientEmail string
|
||||
Kind string
|
||||
TemplateVersion string
|
||||
Subject string
|
||||
TextBody string
|
||||
HtmlBody string
|
||||
ContentSha256 []byte
|
||||
Provider string
|
||||
ProviderAccount string
|
||||
IdempotencyKey string
|
||||
Status string
|
||||
AttemptCount int32
|
||||
NextAttemptAt pgtype.Timestamptz
|
||||
LastAttemptAt pgtype.Timestamptz
|
||||
ProviderMessageID pgtype.Text
|
||||
Version int64
|
||||
CreatedAt pgtype.Timestamptz
|
||||
UpdatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type DeliveryAttempt struct {
|
||||
DeliveryID pgtype.UUID
|
||||
AttemptNumber int32
|
||||
AttemptedAt pgtype.Timestamptz
|
||||
Outcome string
|
||||
Rejection pgtype.Text
|
||||
ProviderCode pgtype.Text
|
||||
ProviderMessageID pgtype.Text
|
||||
RetryAfterNs int64
|
||||
StatusAfter string
|
||||
NextAttemptAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type EmailToken struct {
|
||||
ID pgtype.UUID
|
||||
UserID pgtype.UUID
|
||||
@@ -42,6 +79,16 @@ type EmailToken struct {
|
||||
InvalidatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type MailRequest struct {
|
||||
ID pgtype.UUID
|
||||
RecipientUserID pgtype.UUID
|
||||
Kind string
|
||||
Subject string
|
||||
Body string
|
||||
LinkPath string
|
||||
CreatedAt pgtype.Timestamptz
|
||||
}
|
||||
|
||||
type OutboxEvent struct {
|
||||
Position pgtype.Int8
|
||||
EventID pgtype.UUID
|
||||
|
||||
Reference in new issue
Block a user