{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coldrig-dev/json-schema/coldrig-dev-webhook-summary-schema.json",
  "title": "WebhookSummary",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coldrig-dev-webhooks-api-openapi.yml#/components/schemas/WebhookSummary",
  "type": "object",
  "required": [
    "id",
    "url",
    "eventTypes",
    "active",
    "status",
    "disabledReason",
    "consecutiveFailures",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "eventTypes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WebhookEventType"
      }
    },
    "active": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "disabled"
      ]
    },
    "disabledReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "consecutiveFailures": {
      "type": "integer"
    },
    "createdAt": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    }
  },
  "$defs": {
    "WebhookEventType": {
      "type": "string",
      "enum": [
        "reply",
        "bounce",
        "soft_bounce",
        "complaint",
        "unsubscribe"
      ],
      "description": "reply = genuine reply; bounce = HARD (permanent) bounce; soft_bounce = transient bounce; complaint = spam complaint; unsubscribe = typed unsubscribe-link click."
    }
  }
}