Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.1 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n                    INSERT INTO crm_contacts\n                        (team_id, company_id, email, name, first_interaction, last_interaction)\n                    VALUES ($1, NULL, $2, $3, $4, $5)\n                    ON CONFLICT (team_id, LOWER(email)) WHERE company_id IS NULL DO UPDATE\n                        SET name = COALESCE(crm_contacts.name, EXCLUDED.name),\n                            updated_at = now(),\n                            first_interaction = LEAST(crm_contacts.first_interaction, EXCLUDED.first_interaction),\n                            last_interaction = GREATEST(crm_contacts.last_interaction, EXCLUDED.last_interaction)\n                    RETURNING id\n                    ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Text",
        "Text",
        "Timestamptz",
        "Timestamptz"
      ]
    },
    "nullable": [
      false
    ]
  },
  "hash": "4bbb515802f09c65205ae9e14dba1b65aca76ae11b7f7875f9d342bdbd5145d8"
}