Add reviewed AI drafts and durable staff-approved Gmail delivery
This commit is contained in:
@@ -9,6 +9,8 @@ public abstract class TenantDocument : ITenantDocument
|
||||
}
|
||||
public class Hotel : TenantDocument
|
||||
{
|
||||
public bool AiDraftsEnabled { get; set; }
|
||||
public bool StaffSendingEnabled { get; set; }
|
||||
public string Name { get; set; } = "";
|
||||
public string Timezone { get; set; } = "Europe/London";
|
||||
public string Signature { get; set; } = "Warm regards,\nThe reservations team";
|
||||
@@ -34,6 +36,11 @@ public class KnowledgeEntry : TenantDocument
|
||||
}
|
||||
public class Conversation : TenantDocument
|
||||
{
|
||||
public string ReplyAddress { get; set; } = "";
|
||||
public string RfcMessageId { get; set; } = "";
|
||||
public string[] DraftSources { get; set; } = [];
|
||||
public string DraftReviewNote { get; set; } = "";
|
||||
public Delivery? Delivery { get; set; }
|
||||
public string MailboxId { get; set; } = "";
|
||||
public string ProviderMessageId { get; set; } = "";
|
||||
public string ProviderThreadId { get; set; } = "";
|
||||
@@ -49,6 +56,7 @@ public class Conversation : TenantDocument
|
||||
}
|
||||
public class Mailbox : TenantDocument
|
||||
{
|
||||
public bool CanSend { get; set; }
|
||||
public string Email { get; set; } = "";
|
||||
public string ProtectedRefreshToken { get; set; } = "";
|
||||
public string Status { get; set; } = "Connected";
|
||||
@@ -80,3 +88,18 @@ public record SettingsInput(string Name, string Timezone, string Signature, long
|
||||
public record DraftInput(string Draft, long Version);
|
||||
public record StatusInput(string Status, long Version);
|
||||
public record KnowledgeInput(string Title, string Category, string Answer, string Keywords, bool Approved, long Version);
|
||||
public record VersionInput(long Version);
|
||||
public record SendInput(long Version, string Recipient);
|
||||
public record ReplyControlsInput(long Version, bool AiDraftsEnabled, bool StaffSendingEnabled);
|
||||
public class Delivery
|
||||
{
|
||||
public string Id { get; set; } = Guid.NewGuid().ToString("N");
|
||||
public string State { get; set; } = "Pending";
|
||||
public string Recipient { get; set; } = "";
|
||||
public string Body { get; set; } = "";
|
||||
public string ApprovedBy { get; set; } = "";
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
public string ProviderId { get; set; } = "";
|
||||
public string Detail { get; set; } = "Awaiting delivery worker";
|
||||
public string MessageId => "<" + Id + "@guestops.invalid>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user