{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quant/json-schema/quant-event-subscription-schema.json",
  "title": "EventSubscription",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quant-tracker-event-api-openapi.yml#/components/schemas/EventSubscription",
  "type": "object",
  "required": [
    "id",
    "userId",
    "contractAddress",
    "eventName",
    "eventParams",
    "callbackUrl",
    "networkId",
    "successful",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "contractAddress": {
      "$ref": "#/$defs/EvmAddress"
    },
    "eventName": {
      "type": "string"
    },
    "eventParams": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "indexed": {
            "type": "boolean"
          }
        }
      }
    },
    "callbackUrl": {
      "type": "string",
      "format": "uri"
    },
    "networkId": {
      "type": "string"
    },
    "successful": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "EvmAddress": {
      "type": "string",
      "pattern": "^0x[a-fA-F0-9]{40}$"
    }
  }
}