{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rallyprop-ai/json-schema/rallyprop-ai-opportunity-event-list-schema.json",
  "title": "OpportunityEventList",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/rallyprop-ai-openapi-openapi.json#/components/schemas/OpportunityEventList",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data",
    "meta",
    "links"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OpportunityEvent"
      }
    },
    "meta": {
      "$ref": "#/$defs/PageMeta"
    },
    "links": {
      "$ref": "#/$defs/PageLinks"
    }
  },
  "$defs": {
    "OpportunityEvent": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "opportunity_id",
        "type",
        "severity",
        "summary",
        "changed_fields",
        "changes",
        "detected_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "opportunity_id": {
          "type": "string",
          "format": "uuid"
        },
        "type": {
          "type": "string",
          "description": "Known values: opportunity_added, opportunity_removed, status_changed, date_changed, funding_changed, description_changed, qanda_updated, attachments_changed, field_updated. An unrecognized stored type is returned as unknown."
        },
        "severity": {
          "type": "string",
          "description": "Known values: noise, cosmetic, informational, material, critical, unknown."
        },
        "summary": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "changed_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "changes": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "field",
              "previous",
              "current"
            ],
            "properties": {
              "field": {
                "type": "string"
              },
              "previous": {},
              "current": {}
            }
          }
        },
        "detected_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "PageLinks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "self",
        "next"
      ],
      "properties": {
        "self": {
          "type": "string"
        },
        "next": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "PageMeta": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "request_id",
        "count",
        "has_more",
        "next_cursor"
      ],
      "properties": {
        "request_id": {
          "type": "string"
        },
        "count": {
          "type": "integer",
          "minimum": 0
        },
        "has_more": {
          "type": "boolean"
        },
        "next_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}