diff --git a/web-app/app/lib/db-types.ts b/web-app/app/lib/db-types.ts index 87a93ef..0114864 100644 --- a/web-app/app/lib/db-types.ts +++ b/web-app/app/lib/db-types.ts @@ -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 */