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": "SELECT m.id,m.person_id,p.user_id,COALESCE(p.display_name,'WhatsApp participant') AS \"name!\",\n            m.body,m.reply_to,m.source_at,m.ingested_at,m.revised_at,m.deleted_at,m.kind,m.rich,m.mentions,m.forwarded,m.view_once\n            FROM external_chat_message m JOIN external_chat_person p ON p.id = m.person_id\n            WHERE m.chat_id = $1 AND m.message_id IS NOT NULL\n              AND ($2::uuid IS NULL OR (m.source_at,m.id) < (SELECT source_at,id FROM external_chat_message WHERE id = $2 AND chat_id = $1 AND message_id IS NOT NULL))\n              AND ($4::uuid IS NULL OR m.id = $4)\n            ORDER BY m.source_at DESC,m.id DESC LIMIT $3",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "person_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 2,
        "name": "user_id",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "name!",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "body",
        "type_info": "Text"
      },
      {
        "ordinal": 5,
        "name": "reply_to",
        "type_info": "Uuid"
      },
      {
        "ordinal": 6,
        "name": "source_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 7,
        "name": "ingested_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 8,
        "name": "revised_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 9,
        "name": "deleted_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 10,
        "name": "kind",
        "type_info": "Text"
      },
      {
        "ordinal": 11,
        "name": "rich",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 12,
        "name": "mentions",
        "type_info": "TextArray"
      },
      {
        "ordinal": 13,
        "name": "forwarded",
        "type_info": "Bool"
      },
      {
        "ordinal": 14,
        "name": "view_once",
        "type_info": "Bool"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Uuid",
        "Int8",
        "Uuid"
      ]
    },
    "nullable": [
      false,
      false,
      true,
      null,
      false,
      true,
      false,
      false,
      true,
      true,
      false,
      true,
      false,
      false,
      false
    ]
  },
  "hash": "035fe2a061ac76943164a8d577be44f62adf3708358c79be2fb3f2985eabebc9"
}