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.0 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT\n                ct.id,\n                ct.company_id,\n                ct.email,\n                ct.name,\n                ct.hidden,\n                ct.first_interaction,\n                ct.last_interaction,\n                ct.created_at,\n                ct.updated_at\n            FROM crm_contacts ct\n            LEFT JOIN crm_companies co ON co.id = ct.company_id\n            WHERE ct.team_id = $1\n              AND ($4 OR (ct.hidden = FALSE AND co.hidden IS NOT TRUE))\n              AND (\n                  STRPOS(LOWER(ct.email), LOWER($2)) > 0\n                  OR STRPOS(LOWER(COALESCE(ct.name, '')), LOWER($2)) > 0\n              )\n            ORDER BY ct.last_interaction DESC, ct.id DESC\n            LIMIT $3\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "company_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 2,
        "name": "email",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "name",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "hidden",
        "type_info": "Bool"
      },
      {
        "ordinal": 5,
        "name": "first_interaction",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 6,
        "name": "last_interaction",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 7,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 8,
        "name": "updated_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Text",
        "Int8",
        "Bool"
      ]
    },
    "nullable": [
      false,
      true,
      true,
      true,
      false,
      false,
      false,
      false,
      false
    ]
  },
  "hash": "19379f959ab665ad334c3d33338c6b4c384bb1c1d51461b1f99e523fbadc37b9"
}