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
use macro_user_id::user_id::MacroUserIdStr;
use super::*;
fn macro_user_id(value: &str) -> MacroUserIdStr<'static> {
MacroUserIdStr::try_from(value.to_string()).expect("valid macro user id")
}
#[tokio::test]
async fn no_op_team_analytics_accepts_all_event_variants() {
let analytics = NoOpTeamAnalytics;
let team_id = uuid::Uuid::from_u128(1);
let team_invite_id = uuid::Uuid::from_u128(2);
let events = [
TeamAnalyticsEvent::TeamCreated {
team_id,
owner_id: macro_user_id("macro|[email protected]"),
team_name: "Acme".to_string(),
},
TeamAnalyticsEvent::TeamInvited {
team_id,
team_invite_id,
inviter_id: macro_user_id("macro|[email protected]"),
team_name: Some("Acme".to_string()),
},
TeamAnalyticsEvent::TeamJoined {
team_id,
team_invite_id,
member_id: macro_user_id("macro|[email protected]"),
role: TeamRole::Member,
},
TeamAnalyticsEvent::TeamLeft {
team_id,
member_id: macro_user_id("macro|[email protected]"),
removed_by_id: macro_user_id("macro|[email protected]"),
role: TeamRole::Member,
},
];
for event in events {
analytics.track_team_event(event).await.unwrap();
}
}