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.8 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "SELECT b.id, b.provider, b.remote_id, b.kind, b.user_id, b.state, b.adopted_at\n        FROM external_chat b JOIN whatsapp_chat_membership m ON m.chat_id = b.id\n        WHERE b.provider = 'whatsapp' AND b.remote_id = $1 AND b.state = 'active'\n          AND m.account_id = $2 AND m.generation = $3 AND m.consent_ended_at IS NULL\n          AND m.remote_member AND m.reconciled\n          AND CASE WHEN $7 THEN b.user_id = $5 ELSE\n            $4 >= date_trunc('second', b.adopted_at) - make_interval(secs => $6)\n            AND $4 >= date_trunc('second', m.consent_at) - make_interval(secs => $6) END\n          AND external_chat_can_view(b.id, $5)\n        ORDER BY b.id LIMIT 100",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "provider",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "remote_id",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "kind",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "user_id",
        "type_info": "Text"
      },
      {
        "ordinal": 5,
        "name": "state",
        "type_info": "Text"
      },
      {
        "ordinal": 6,
        "name": "adopted_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "Uuid",
        "Int8",
        "Timestamptz",
        "Text",
        "Float8",
        "Bool"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      false,
      false
    ]
  },
  "hash": "13d25620a06a990020bac0d210a8fd9155b909519f178e85c7d8ad4befa46ae9"
}