{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sbox-watch/json-schema/sbox-watch-activity-history-schema.json",
  "title": "ActivityHistory",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sbox-watch-openapi.json#/components/schemas/ActivityHistory",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "version": {
      "const": 1
    },
    "generation": {
      "type": [
        "string",
        "number"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "game",
        "server"
      ]
    },
    "game": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "range": {
      "type": "string",
      "enum": [
        "24h",
        "7d",
        "30d",
        "1y",
        "all"
      ]
    },
    "durationMs": {
      "type": [
        "number",
        "null"
      ]
    },
    "bucketed": {
      "type": "boolean"
    },
    "available": {
      "type": "boolean"
    },
    "partialCoverage": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0
      },
      "maxItems": 200,
      "description": "Timestamps of points that total recorded games with incomplete coverage; omitted for complete observations. Missing games are unknown, not zero."
    },
    "points": {
      "type": "array",
      "items": {
        "type": "array",
        "minItems": 7,
        "maxItems": 7,
        "items": false,
        "description": "[Unix milliseconds, players (possibly fractional average), current flag, interval start milliseconds (null for snapshots), interval end milliseconds (null for snapshots), aggregation flag (0 snapshot / 1 average), partial flag]. Boolean flags are encoded as 0 or 1.",
        "prefixItems": [
          {
            "type": "integer",
            "minimum": 0
          },
          {
            "type": "number"
          },
          {
            "enum": [
              0,
              1
            ]
          },
          {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          {
            "enum": [
              0,
              1
            ]
          },
          {
            "enum": [
              0,
              1
            ]
          }
        ]
      }
    }
  },
  "required": [
    "version",
    "generation",
    "kind",
    "range",
    "available",
    "points"
  ]
}