{
  "name": "watch_invoices",
  "label": "Watch Invoices",
  "description": "Triggers when invoice events occur in Zync (created, sent, or paid).",
  "type": "instant",
  "connection": { "$ref": "#/connection" },
  "parameters": [
    {
      "name": "event",
      "label": "Invoice Event",
      "type": "select",
      "required": true,
      "options": [
        { "value": "invoice.created", "label": "New Invoice Created" },
        { "value": "invoice.sent", "label": "Invoice Sent" },
        { "value": "invoice.paid", "label": "Invoice Paid" }
      ]
    }
  ],
  "interface": {
    "output": [
      { "name": "id", "label": "Invoice ID", "type": "text" },
      { "name": "invoice_number", "label": "Invoice Number", "type": "text" },
      { "name": "proforma_number", "label": "Proforma Number", "type": "text" },
      { "name": "status", "label": "Status", "type": "text" },
      { "name": "customer_id", "label": "Customer ID", "type": "text" },
      { "name": "currency", "label": "Currency", "type": "text" },
      { "name": "total", "label": "Total", "type": "text" },
      { "name": "paid_at", "label": "Paid At", "type": "date" },
      { "name": "created_at", "label": "Created At", "type": "date" }
    ]
  }
}
