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        SELECT access_level::text\n        FROM entity_access\n        WHERE source_id = ANY(ARRAY(\n            SELECT cp.channel_id::text FROM comms_channel_participants cp\n                WHERE cp.user_id = $1 AND cp.left_at IS NULL\n            UNION ALL\n            SELECT t.team_id::text FROM team_user t\n                WHERE t.user_id = $1\n            UNION ALL\n            SELECT $1\n        ))\n        AND entity_id = $2\n        AND entity_type = 'chat'\n        ORDER BY\n            CASE access_level::text\n                WHEN 'owner' THEN 4\n                WHEN 'edit' THEN 3\n                WHEN 'comment' THEN 2\n                WHEN 'view' THEN 1\n                ELSE 0\n            END DESC\n        LIMIT 1\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "access_level",
        "type_info": "Text"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "Uuid"
      ]
    },
    "nullable": [
      null
    ]
  },
  "hash": "8fc112d6aeef9c2a223351d2b80947769f26aafbebb3a1b0c759f5246fcca507"
}