{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rctp.dev/schemas/webhook-event.schema.json",
  "title": "Webhook event",
  "description": "Body of a UCP signed webhook from the gateway to an operator (binding 9). Webhook-Id is event_id.",
  "type": "object",
  "properties": {
    "event_id": {
      "$ref": "common.schema.json#/$defs/EventId"
    },
    "type": {
      "type": "string",
      "enum": [
        "approval.decided",
        "offer.updated",
        "deal.event"
      ]
    },
    "created_at": {
      "$ref": "common.schema.json#/$defs/Timestamp"
    },
    "data": {
      "type": "object"
    }
  },
  "additionalProperties": false,
  "required": [
    "event_id",
    "type",
    "created_at",
    "data"
  ]
}
