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
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n c.\"id\" as \"chat_id\",\n m.id as \"message_id\",\n c.\"userId\" as \"user_id\",\n m.\"createdAt\" as \"created_at\",\n m.\"updatedAt\" as \"updated_at\"\n FROM\n \"ChatMessage\" m\n JOIN\n \"Chat\" c on c.\"id\" = m.\"chatId\"\n WHERE\n c.\"userId\" = ANY($1)\n AND (\n $3::bool IS NULL\n OR ($3 AND c.\"deletedAt\" IS NOT NULL)\n OR (NOT $3 AND c.\"deletedAt\" IS NULL)\n )\n AND ($4::timestamptz IS NULL OR m.\"updatedAt\" >= $4)\n AND ($5::timestamptz IS NULL OR m.\"updatedAt\" < $5)\n AND (\n $6::timestamptz IS NULL\n OR (m.\"updatedAt\", m.id) > ($6, $7::text)\n )\n ORDER BY m.\"updatedAt\" ASC, m.id ASC\n LIMIT $2\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "chat_id",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "message_id",
"type_info": "Text"
},
{
"ordinal": 2,
"name": "user_id",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "created_at",
"type_info": "Timestamp"
},
{
"ordinal": 4,
"name": "updated_at",
"type_info": "Timestamp"
}
],
"parameters": {
"Left": [
"TextArray",
"Int8",
"Bool",
"Timestamptz",
"Timestamptz",
"Timestamptz",
"Text"
]
},
"nullable": [
false,
false,
false,
false,
false
]
},
"hash": "5929a15919ba9b705c47c77ccc0ac1d7893590a8513c5d2019793598704f64fb"
}