{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dregs-com/json-schema/dregs-com-v1-page-v1-escalation-schema.json",
  "title": "V1PageV1Escalation",
  "description": "Paginated response wrapper",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dregs-com-openapi.json#/components/schemas/V1PageV1Escalation",
  "type": "object",
  "properties": {
    "pageNumber": {
      "type": "integer",
      "format": "int32",
      "description": "Current page number (0-based)"
    },
    "pageSize": {
      "type": "integer",
      "format": "int32",
      "description": "Number of items per page"
    },
    "totalPages": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of pages"
    },
    "totalElements": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of items across all pages"
    },
    "content": {
      "type": "array",
      "description": "List of items on this page",
      "items": {
        "$ref": "#/$defs/V1Escalation"
      }
    },
    "first": {
      "type": "boolean",
      "description": "Whether this is the first page"
    },
    "last": {
      "type": "boolean",
      "description": "Whether this is the last page"
    },
    "numberOfElements": {
      "type": "integer",
      "format": "int32",
      "description": "Number of items on this page"
    }
  },
  "$defs": {
    "BadgeSnapshot": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "GOOD",
            "BAD",
            "NEUTRAL"
          ]
        },
        "explanation": {
          "type": "string"
        }
      }
    },
    "RuleCondition": {
      "type": "object",
      "properties": {
        "condition": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "threshold": {
          "type": "integer",
          "format": "int32"
        },
        "badge": {
          "type": "string"
        },
        "seconds": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "ScoreSnapshot": {
      "type": "object",
      "properties": {
        "humanity": {
          "type": "integer",
          "format": "int32"
        },
        "authenticity": {
          "type": "integer",
          "format": "int32"
        },
        "uniqueness": {
          "type": "integer",
          "format": "int32"
        },
        "behavior": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "V1Escalation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "escalationRule": {
          "$ref": "#/$defs/V1Reference"
        },
        "identity": {
          "$ref": "#/$defs/V1Reference"
        },
        "identityName": {
          "type": "string"
        },
        "identityEmail": {
          "type": "string"
        },
        "identityUsername": {
          "type": "string"
        },
        "scoreSnapshot": {
          "$ref": "#/$defs/ScoreSnapshot"
        },
        "badgeSnapshot": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BadgeSnapshot"
          }
        },
        "conditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RuleCondition"
          }
        },
        "triggeredConditions": {
          "type": "array",
          "items": {
            "type": "boolean"
          }
        },
        "severity": {
          "type": "string",
          "enum": [
            "INFO",
            "WARNING",
            "CRITICAL"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "OPEN",
            "ACKNOWLEDGED",
            "CLOSED"
          ]
        },
        "openedAt": {
          "type": "string",
          "format": "date-time"
        },
        "acknowledgedBy": {
          "type": "integer",
          "format": "int64"
        },
        "acknowledgedAt": {
          "type": "string",
          "format": "date-time"
        },
        "closedBy": {
          "type": "integer",
          "format": "int64"
        },
        "closedAt": {
          "type": "string",
          "format": "date-time"
        },
        "channels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "ruleDeleted": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "V1Reference": {
      "type": "object",
      "description": "Reference to another entity with ID, label, and API path",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the entity"
        },
        "label": {
          "type": "string",
          "description": "Human-readable label or name"
        },
        "path": {
          "type": "string",
          "description": "API path to the entity resource"
        }
      }
    }
  }
}