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.

2.4 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n        SELECT\n            sp.id as id,\n            sp.\"linkShare\" as \"link_share?\",\n            sp.\"linkShareAccessLevel\" as \"link_share_access_level?: AccessLevel\",\n            sp.team_share_access_level as \"team_share_access_level?: AccessLevel\",\n            c.\"userId\" as owner,\n            COALESCE(\n                json_agg(json_build_object(\n                    'channel_id', csp.\"channel_id\",\n                    'access_level', csp.\"access_level\"\n                )) FILTER (WHERE csp.\"channel_id\" IS NOT NULL),\n                '[]'\n            ) as \"channel_share_permissions?\"\n        FROM\n            \"ChatPermission\" cp\n        JOIN \"SharePermission\" sp ON cp.\"sharePermissionId\" = sp.id\n        JOIN \"Chat\" c ON cp.\"chatId\" = c.id\n        LEFT JOIN \"ChannelSharePermission\" csp ON csp.\"share_permission_id\" = sp.id\n        WHERE\n            cp.\"chatId\" = $1\n        GROUP BY\n            sp.id, c.\"userId\"\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Text"
      },
      {
        "ordinal": 1,
        "name": "link_share?",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "link_share_access_level?: AccessLevel",
        "type_info": {
          "Custom": {
            "name": "\"AccessLevel\"",
            "kind": {
              "Enum": [
                "view",
                "comment",
                "edit",
                "owner"
              ]
            }
          }
        }
      },
      {
        "ordinal": 3,
        "name": "team_share_access_level?: AccessLevel",
        "type_info": {
          "Custom": {
            "name": "\"AccessLevel\"",
            "kind": {
              "Enum": [
                "view",
                "comment",
                "edit",
                "owner"
              ]
            }
          }
        }
      },
      {
        "ordinal": 4,
        "name": "owner",
        "type_info": "Text"
      },
      {
        "ordinal": 5,
        "name": "channel_share_permissions?",
        "type_info": "Json"
      }
    ],
    "parameters": {
      "Left": [
        "Text"
      ]
    },
    "nullable": [
      false,
      true,
      true,
      true,
      false,
      null
    ]
  },
  "hash": "49088955bcab31835d8fc01c61693aae1ffa798b3621e97aa5a2eb328a11c303"
}