{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://orgrelay.ai/schemas/connector-event.json",
  "title": "OrgRelay 业务系统事件 / Connector event",
  "description": "POST 到 OrgRelay 显示的事件推送地址。请求头 X-OrgRelay-Signature: t=<unix秒>,v1=<hex(HMAC-SHA256(密钥, t + '.' + 原始请求体))>。OrgRelay 返回 2xx 才算送达；其他状态码或超时（10 秒）请按 1、5、30 分钟、2、6 小时重试，最多 6 次，事件 id 保持不变（OrgRelay 按 id 去重）。",
  "type": "object",
  "required": ["id", "type", "occurred_at"],
  "properties": {
    "id": { "type": "string", "maxLength": 120, "description": "事件唯一编号，重试时不变" },
    "type": { "type": "string", "pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_.]*$", "examples": ["orders.created", "inventory.low_stock", "tickets.created", "finance.payment_received"] },
    "occurred_at": { "type": "string", "format": "date-time" },
    "summary": { "type": "string", "maxLength": 300, "description": "给人看的一句话，会原样推送给老板，不要放敏感信息" },
    "data": { "type": "object", "description": "事件数据，最大 20KB；建议放编号，详情让 OrgRelay 再调用工具查" }
  }
}
