{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/run402-com/json-schema/run402-com-buzz-project-event-route-delivery-schema.json",
  "title": "BuzzProjectEventRouteDelivery",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/run402-com-buzz-control-plane-api-openapi.yml#/components/schemas/BuzzProjectEventRouteDelivery",
  "type": "object",
  "required": [
    "buzz_project_event_delivery_id",
    "kind",
    "status",
    "event_type",
    "project_id",
    "project_event_id",
    "occurred_at",
    "nostr_event_id",
    "projection_hash",
    "signing_generation",
    "attempt_count",
    "next_attempt_at",
    "last_error",
    "suppressed_reason",
    "created_at",
    "delivered_at",
    "terminal_at",
    "release_id",
    "thread_root_delivery_id",
    "thread_position",
    "signer"
  ],
  "properties": {
    "buzz_project_event_delivery_id": {
      "type": "string",
      "pattern": "^buzzped_[0-9a-f]{32}$"
    },
    "kind": {
      "type": "string",
      "enum": [
        "event",
        "test"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "retryable",
        "delivered",
        "suppressed",
        "dead_letter",
        "cancelled"
      ],
      "description": "dead_letter rows ARE the dead letters — there is no separate ledger. The stored signed envelope is never returned."
    },
    "event_type": {
      "type": "string"
    },
    "project_id": {
      "type": "string"
    },
    "project_event_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "null for kind test."
    },
    "occurred_at": {
      "type": "string",
      "format": "date-time"
    },
    "nostr_event_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "projection_hash": {
      "type": [
        "string",
        "null"
      ],
      "description": "SHA-256 of the exact community-facing projection content."
    },
    "signing_generation": {
      "type": [
        "integer",
        "null"
      ]
    },
    "attempt_count": {
      "type": "integer"
    },
    "next_attempt_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_error": {
      "type": [
        "string",
        "null"
      ]
    },
    "suppressed_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "delivered_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "terminal_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "release_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The release this delivery belongs to; deliveries thread by (route, release)."
    },
    "thread_root_delivery_id": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^buzzped_[0-9a-f]{32}$",
      "description": "Public id of the thread root delivery, for replies."
    },
    "thread_position": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "root",
        "reply",
        null
      ]
    },
    "signer": {
      "type": "string",
      "enum": [
        "installation_identity",
        "project_bot"
      ],
      "description": "Who signed the envelope: the installation identity, or the project's attested bot."
    }
  }
}