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.7 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n        UPDATE email_scheduled_messages\n        SET processing = true, updated_at = NOW()\n        WHERE link_id = $1 AND message_id = $2\n          AND NOT sent AND NOT processing AND send_time <= NOW()\n          AND delivery_claim_id IS NULL AND delivery_started_at IS NULL AND delivery_status = 'ready'\n          AND NOT EXISTS(SELECT 1 FROM email_attachments_drafts WHERE draft_id=$2 AND upload_pending)\n          AND NOT EXISTS(SELECT 1 FROM email_draft_transfers WHERE (destination_id=$2 AND state NOT IN ('ready','retained','preparing')) OR (source_id=$2 AND state<>'preparing'))\n        RETURNING link_id, message_id, send_time, sent, processing, actor_id, agent_correlation_id\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "link_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 1,
        "name": "message_id",
        "type_info": "Uuid"
      },
      {
        "ordinal": 2,
        "name": "send_time",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 3,
        "name": "sent",
        "type_info": "Bool"
      },
      {
        "ordinal": 4,
        "name": "processing",
        "type_info": "Bool"
      },
      {
        "ordinal": 5,
        "name": "actor_id",
        "type_info": "Text"
      },
      {
        "ordinal": 6,
        "name": "agent_correlation_id",
        "type_info": "Uuid"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Uuid"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      true,
      true
    ]
  },
  "hash": "97cc3af696916fb83a09c5504f35f15a794dc767fc355dcdfc34f55b2564da48"
}