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.

4.0 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n        SELECT\n            m.id, m.provider_id, m.global_id, m.link_id, m.thread_id, m.provider_thread_id, m.provider_history_id,\n            m.replying_to_id, m.internal_date_ts, m.snippet, m.size_estimate, m.subject, m.from_name,\n            m.from_contact_id, m.sent_at, m.has_attachments, m.is_read, m.is_starred, m.is_sent, m.is_draft,\n            NULL::TEXT as body_text,\n            NULL::TEXT as body_html_sanitized,\n            NULL::TEXT as body_macro,\n            m.headers_jsonb, m.created_at, m.updated_at\n        FROM email_messages m\n        WHERE m.link_id = $1\n          AND m.is_draft = true\n          AND jsonb_path_exists(\n              m.headers_jsonb,\n              '$[*] ? (@.\"Macro-In-Reply-To\" == $macro_uuid)'::jsonpath,\n              jsonb_build_object('macro_uuid', $2::text)\n          )\n        ORDER BY m.created_at DESC\n        LIMIT 1\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "provider_id",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "global_id",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "link_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 4,
        "name": "thread_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 5,
        "name": "provider_thread_id",
        "type_info": "Text"
      },
      {
        "ordinal": 6,
        "name": "provider_history_id",
        "type_info": "Text"
      },
      {
        "ordinal": 7,
        "name": "replying_to_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 8,
        "name": "internal_date_ts",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 9,
        "name": "snippet",
        "type_info": "Text"
      },
      {
        "ordinal": 10,
        "name": "size_estimate",
        "type_info": "Int8"
      },
      {
        "ordinal": 11,
        "name": "subject",
        "type_info": "Text"
      },
      {
        "ordinal": 12,
        "name": "from_name",
        "type_info": "Varchar"
      },
      {
        "ordinal": 13,
        "name": "from_contact_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 14,
        "name": "sent_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 15,
        "name": "has_attachments",
        "type_info": "Bool"
      },
      {
        "ordinal": 16,
        "name": "is_read",
        "type_info": "Bool"
      },
      {
        "ordinal": 17,
        "name": "is_starred",
        "type_info": "Bool"
      },
      {
        "ordinal": 18,
        "name": "is_sent",
        "type_info": "Bool"
      },
      {
        "ordinal": 19,
        "name": "is_draft",
        "type_info": "Bool"
      },
      {
        "ordinal": 20,
        "name": "body_text",
        "type_info": "Text"
      },
      {
        "ordinal": 21,
        "name": "body_html_sanitized",
        "type_info": "Text"
      },
      {
        "ordinal": 22,
        "name": "body_macro",
        "type_info": "Text"
      },
      {
        "ordinal": 23,
        "name": "headers_jsonb",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 24,
        "name": "created_at",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 25,
        "name": "updated_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Text"
      ]
    },
    "nullable": [
      false,
      true,
      true,
      false,
      false,
      true,
      true,
      true,
      true,
      true,
      true,
      true,
      true,
      true,
      true,
      false,
      false,
      false,
      false,
      false,
      null,
      null,
      null,
      true,
      false,
      false
    ]
  },
  "hash": "ff0ad36a3e9b991dfd04335db13c6bec2f121b2afb9c5c1fa39c2d804cb71286"
}