Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(soup) Add labels to email soup objects (#452)
Evan Hutnik08532c10b99a
diff --git a/rust/cloud-storage/document_storage_service/src/api/swagger.rs b/rust/cloud-storage/document_storage_service/src/api/swagger.rsindex 1dde0d237a..74c03d9b01 100644--- a/rust/cloud-storage/document_storage_service/src/api/swagger.rs+++ b/rust/cloud-storage/document_storage_service/src/api/swagger.rs@@ -103,7 +103,8 @@ use models_soup::chat::SoupChat;use models_soup::document::SoupDocument;use models_soup::email_thread::{SoupAttachment, SoupContact, SoupEmailThreadPreview, SoupEmailThreadPreviewMetadata,- SoupEnrichedEmailThreadPreview, SoupMacroAttachment,+ SoupEnrichedEmailThreadPreview, SoupLabel, SoupLabelListVisibility, SoupLabelType,+ SoupMacroAttachment, SoupMessageListVisibility,};use models_soup::item::SoupItem;use models_soup::item::SoupItemType;@@ -289,6 +290,10 @@ use utoipa::OpenApi;SoupMacroAttachment,SoupContact,SoupEmailThreadPreviewMetadata,+ SoupLabel,+ SoupLabelListVisibility,+ SoupMessageListVisibility,+ SoupLabelType,PostSoupRequest,diff --git a/rust/cloud-storage/models_soup/src/email_thread.rs b/rust/cloud-storage/models_soup/src/email_thread.rsindex 8f6c062d4c..25b6c6d657 100644--- a/rust/cloud-storage/models_soup/src/email_thread.rs+++ b/rust/cloud-storage/models_soup/src/email_thread.rs@@ -33,6 +33,53 @@ pub struct SoupEmailThreadPreviewMetadata {pub generic_sender: bool,}+#[derive(Debug, Doppleganger, Serialize, Deserialize)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+#[cfg_attr(feature = "mock", derive(PartialEq, Eq))]+#[dg(backward = email::domain::models::Label)]+#[serde(rename_all = "camelCase")]+pub struct SoupLabel {+ pub id: Uuid,+ pub link_id: Uuid,+ pub provider_label_id: String,+ pub name: String,+ pub created_at: DateTime<Utc>,+ pub message_list_visibility: SoupMessageListVisibility,+ pub label_list_visibility: SoupLabelListVisibility,+ pub type_: SoupLabelType,+}++#[derive(Debug, Doppleganger, Serialize, Deserialize)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+#[cfg_attr(feature = "mock", derive(PartialEq, Eq))]+#[dg(backward = email::domain::models::MessageListVisibility)]+#[serde(rename_all = "camelCase")]+pub enum SoupMessageListVisibility {+ Show,+ Hide,+}++#[derive(Debug, Doppleganger, Serialize, Deserialize)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+#[cfg_attr(feature = "mock", derive(PartialEq, Eq))]+#[dg(backward = email::domain::models::LabelListVisibility)]+#[serde(rename_all = "camelCase")]+pub enum SoupLabelListVisibility {+ LabelShow,+ LabelShowIfUnread,+ LabelHide,+}++#[derive(Debug, Doppleganger, Serialize, Deserialize)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+#[cfg_attr(feature = "mock", derive(PartialEq, Eq))]+#[dg(backward = email::domain::models::LabelType)]+#[serde(rename_all = "camelCase")]+pub enum SoupLabelType {+ System,+ User,+}+#[derive(Debug, Doppleganger, Serialize, Deserialize)]#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]#[cfg_attr(feature = "mock", derive(PartialEq, Eq))]@@ -109,4 +156,5 @@ pub struct SoupEnrichedEmailThreadPreview {pub attachments_macro: Vec<SoupMacroAttachment>,pub participants: Vec<SoupContact>,pub metadata: SoupEmailThreadPreviewMetadata,+ pub labels: Vec<SoupLabel>,}