Add Google mailbox lifecycle controls and guarded sync recovery

This commit is contained in:
wolf-demon
2026-09-16 15:18:22 +01:00
parent 7fcf51c900
commit bc7cbc1492
20 changed files with 314 additions and 33 deletions
+10
View File
@@ -71,6 +71,13 @@ public class Conversation : TenantDocument
}
public class Mailbox : TenantDocument
{
public long Version {get;set;}
public string ConnectionEpoch {get;set;}="";
public DateTime? ConnectionChangedAt {get;set;}
public DateTime? LastAttemptAt {get;set;}
public DateTime? NextAttemptAt {get;set;}
public int FailureCount {get;set;}
public string SyncErrorCode {get;set;}="";
public bool CanSend { get; set; }
public string Email { get; set; } = "";
public string ProtectedRefreshToken { get; set; } = "";
@@ -83,6 +90,8 @@ public class Mailbox : TenantDocument
}
public class OAuthRequest : TenantDocument
{
public DateTime StartedAt {get;set;}=DateTime.UtcNow;
public string ExpectedEmail {get;set;}="";
public string UserId { get; set; } = "";
public DateTime ExpiresAt { get; set; }
}
@@ -108,6 +117,7 @@ public record SendInput(long Version, string Recipient);
public record ReplyControlsInput(long Version, bool AiDraftsEnabled, bool StaffSendingEnabled);
public class Delivery
{
public string MailboxEpoch {get;set;}="";
public bool Automatic {get;set;}
public string AutoRuleId {get;set;}="";
public long AutoRuleVersion {get;set;}