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.5 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                d.\"owner\" 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                \"DocumentPermission\" dp\n            JOIN \"SharePermission\" sp ON dp.\"sharePermissionId\" = sp.id\n            JOIN \"Document\" d ON dp.\"documentId\" = d.id\n            LEFT JOIN \"ChannelSharePermission\" csp ON csp.\"share_permission_id\" = sp.id\n            WHERE\n                dp.\"documentId\" = $1\n            GROUP BY\n                sp.id, d.\"owner\"\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": "a7832517d221d29aa99d08a22e78322e3df103c95a29a3809f65713ab99bb58b"
}