feat: add email status tracking for tenant emails
Add EmailStatus enum and tracking fields to BillingLocation to support email delivery monitoring (bounces, complaints, unsubscribes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { unsubscribe } from "diagnostics_channel";
|
||||
|
||||
export interface FileAttachment {
|
||||
fileName: string;
|
||||
@@ -35,6 +36,23 @@ export interface UserSettings {
|
||||
ownerRevolutProfileName?: string | null;
|
||||
};
|
||||
|
||||
enum EmailStatus {
|
||||
/** Email is not yet verified - recipient has not yet confirmed their email address */
|
||||
Unverified = "unverified",
|
||||
/** Email is verified and is in good standing: emails are being successfully delivered */
|
||||
Verified = "verified",
|
||||
/** Emails sent to this address have hard bounced - no further attempts of delivery will be made */
|
||||
HardBounced = "hard-bounced",
|
||||
/** Emails sent to this address have soft bounced less than the maximum allowed count - further attempts of delivery may be made */
|
||||
SoftBounced = "soft-bounced",
|
||||
/** Emails sent to this address have soft bounced more than the maximum allowed count - no further attempts of delivery will be made */
|
||||
SoftBounceMaxCountReached = "soft-bounce-max-count-reached",
|
||||
/** Recepient has complained about receiving emails - no further emails will be sent */
|
||||
Complaint = "complaint",
|
||||
/** Recepient has unsubscribed from receiving emails via link - no further emails will be sent */
|
||||
Unsubscribed = "unsubscribed"
|
||||
}
|
||||
|
||||
/** bill object in the form returned by MongoDB */
|
||||
export interface BillingLocation {
|
||||
_id: string;
|
||||
@@ -67,6 +85,10 @@ export interface BillingLocation {
|
||||
autoBillFwd?: boolean | null;
|
||||
/** (optional) tenant email */
|
||||
tenantEmail?: string | null;
|
||||
/** (optional) tenant email status */
|
||||
tenantEmailStatus?: EmailStatus | null;
|
||||
/** (optional) tenant email soft bounce count (gets reset on successful delivery) */
|
||||
tenantEmailSoftBounceCount?: number | null;
|
||||
/** (optional) bill forwarding strategy */
|
||||
billFwdStrategy?: "when-payed" | "when-attached" | null;
|
||||
/** (optional) whether to automatically send rent notification */
|
||||
|
||||
Reference in New Issue
Block a user