{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sbox-watch/json-schema/sbox-watch-dashboard-schema.json",
  "title": "Dashboard",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sbox-watch-openapi.json#/components/schemas/Dashboard",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "generatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "source": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "apiBase": {
          "type": "string"
        },
        "query": {
          "type": "string"
        },
        "appId": {
          "type": "integer",
          "minimum": 0
        },
        "available": {
          "type": "boolean"
        }
      },
      "required": []
    },
    "route": {
      "$ref": "#/$defs/DirectoryRoute"
    },
    "totals": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "packagesSeen": {
          "type": "number"
        },
        "totalFavorites": {
          "type": "number"
        },
        "totalUpvotes": {
          "type": "number"
        },
        "totalPlayersNow": {
          "type": "number"
        },
        "serversSeen": {
          "type": "number"
        },
        "playersOnline": {
          "type": "number"
        },
        "totalCapacity": {
          "type": "number"
        },
        "linkedGames": {
          "type": "number"
        }
      },
      "required": []
    },
    "change": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "ready": {
          "type": "boolean"
        },
        "fullWindow": {
          "type": "boolean"
        },
        "previousFullWindow": {
          "type": "boolean"
        },
        "trackingSince": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "windowHours": {
          "type": "number"
        }
      },
      "required": []
    },
    "summary": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "tone": {
            "type": "string"
          },
          "help": {
            "type": "string"
          },
          "historyLink": {
            "type": "boolean"
          },
          "delta": {
            "type": [
              "number",
              "null"
            ]
          },
          "deltaLabel": {
            "type": "string"
          },
          "deltaPreviousValue": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "label",
          "value"
        ]
      }
    },
    "activityHistory": {
      "anyOf": [
        {
          "$ref": "#/$defs/PlayerHistory"
        },
        {
          "type": "null"
        }
      ]
    },
    "sorts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "disabled": {
            "type": "boolean"
          }
        },
        "required": []
      }
    },
    "filters": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "label",
          "active"
        ]
      }
    },
    "activeFilters": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sort": {
      "type": "string"
    },
    "query": {
      "type": "string"
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    },
    "packages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DirectoryPackage"
      },
      "maxItems": 100
    },
    "servers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DirectoryServer"
      },
      "maxItems": 100
    },
    "serverScope": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "game": {
          "type": "string"
        },
        "map": {
          "type": "string"
        }
      },
      "required": []
    }
  },
  "required": [
    "generatedAt",
    "route",
    "totals",
    "summary",
    "pagination",
    "packages"
  ],
  "$defs": {
    "DirectoryPackage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "ident": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "org": {
          "type": "string"
        },
        "orgIdent": {
          "type": "string"
        },
        "packageIdent": {
          "type": "string"
        },
        "sboxIdent": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "thumb": {
          "type": "string"
        },
        "orgThumb": {
          "type": "string"
        },
        "videoThumb": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "versionChanges": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "game",
            "library",
            "map"
          ]
        },
        "weeklyPlaytimeBaselineAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "score": {
          "type": [
            "number",
            "null"
          ]
        },
        "playersNow": {
          "type": [
            "number",
            "null"
          ]
        },
        "playersPeak24h": {
          "type": [
            "number",
            "null"
          ]
        },
        "favorites": {
          "type": [
            "number",
            "null"
          ]
        },
        "upvotes": {
          "type": [
            "number",
            "null"
          ]
        },
        "downvotes": {
          "type": [
            "number",
            "null"
          ]
        },
        "fileSize": {
          "type": [
            "number",
            "null"
          ]
        },
        "totalUsers": {
          "type": [
            "number",
            "null"
          ]
        },
        "totalSessions": {
          "type": [
            "number",
            "null"
          ]
        },
        "totalSeconds": {
          "type": [
            "number",
            "null"
          ]
        },
        "weeklyPlaytimeSeconds": {
          "type": [
            "number",
            "null"
          ]
        },
        "versionFileCount": {
          "type": [
            "number",
            "null"
          ]
        },
        "rank": {
          "type": [
            "number",
            "null"
          ]
        },
        "created": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "updated": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "supportsVr": {
          "type": "boolean"
        },
        "supportsController": {
          "type": "boolean"
        },
        "serverStats": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "available": {
                  "type": "boolean"
                },
                "serversRunning": {
                  "type": "number"
                },
                "playersOnline": {
                  "type": "number"
                }
              },
              "required": []
            },
            {
              "type": "null"
            }
          ]
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "jams": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GameJam"
          }
        },
        "change24h": {
          "$ref": "#/$defs/Momentum"
        },
        "usage24h": {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "users": {
              "type": [
                "number",
                "null"
              ]
            },
            "previousUsers": {
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": []
        },
        "playFund": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "state": {
                  "enum": [
                    "enabled",
                    "disabled",
                    "unknown"
                  ]
                },
                "observedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              },
              "required": []
            },
            {
              "type": "null"
            }
          ]
        },
        "updateMarkers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageUpdate"
          }
        },
        "trophies": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "icon": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "tier": {
                "type": "string"
              },
              "unlockedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": []
          }
        }
      },
      "required": [
        "ident",
        "title",
        "kind"
      ]
    },
    "DirectoryRoute": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "kind": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "href": {
          "type": "string"
        },
        "navLabel": {
          "type": "string"
        },
        "pluralLabel": {
          "type": "string"
        },
        "singularLabel": {
          "type": "string"
        },
        "eyebrow": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "intro": {
          "type": "string"
        },
        "seoTitle": {
          "type": "string"
        },
        "seoDescription": {
          "type": "string"
        },
        "defaultSort": {
          "type": "string"
        },
        "fallbackSort": {
          "type": "string"
        },
        "searchPlaceholder": {
          "type": "string"
        },
        "supportsPlayers": {
          "type": "boolean"
        },
        "summaryPlayers": {
          "type": "boolean"
        },
        "sorts": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "required": [
        "kind",
        "href",
        "title"
      ]
    },
    "DirectoryServer": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "steamId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "mapRaw": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "gameIdent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "mapIdent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "gameTitle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "gamePath": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "gameThumb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "mapTitle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "mapPath": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "mapThumb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "players": {
          "type": [
            "number",
            "null"
          ]
        },
        "maxPlayers": {
          "type": [
            "number",
            "null"
          ]
        },
        "playersPeak24h": {
          "type": [
            "number",
            "null"
          ]
        },
        "rank": {
          "type": [
            "number",
            "null"
          ]
        },
        "steamAccountType": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "hidden": {
          "type": "boolean"
        },
        "online": {
          "type": "boolean"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "firstSeenAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "lastSeenAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "name",
        "players",
        "maxPlayers"
      ]
    },
    "GameJam": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "ident",
        "title",
        "url"
      ],
      "properties": {
        "ident": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "deadline": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "Momentum": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "favorites": {
          "type": "number"
        },
        "upvotes": {
          "type": "number"
        },
        "total": {
          "type": "number"
        }
      },
      "required": []
    },
    "PackageUpdate": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "createdAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "title": {
          "type": "string"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "summary": {
          "type": "string"
        },
        "changeCount": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": []
    },
    "Pagination": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "page": {
          "type": "integer",
          "minimum": 1
        },
        "pageSize": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "totalItems": {
          "type": "integer",
          "minimum": 0
        },
        "totalPages": {
          "type": "integer",
          "minimum": 0
        },
        "hasPrevious": {
          "type": "boolean"
        },
        "hasNext": {
          "type": "boolean"
        }
      },
      "required": [
        "page",
        "pageSize",
        "totalItems",
        "totalPages",
        "hasPrevious",
        "hasNext"
      ]
    },
    "PlayerHistory": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "activeRange": {
          "type": "string"
        },
        "metric": {
          "type": "string"
        },
        "ranges": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label"
            ]
          }
        },
        "series": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PlayerSeries"
          }
        }
      },
      "required": [
        "activeRange",
        "ranges",
        "series"
      ]
    },
    "PlayerPoint": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "capturedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "players": {
          "type": "number"
        },
        "current": {
          "type": "boolean"
        },
        "partial": {
          "type": "boolean"
        },
        "partialCoverage": {
          "type": "boolean",
          "description": "True for totals of recorded games when other games may be unrecorded."
        },
        "rangeStart": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "rangeEnd": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "aggregation": {
          "enum": [
            "snapshot",
            "average"
          ]
        }
      },
      "required": []
    },
    "PlayerSeries": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "durationMs": {
          "type": [
            "number",
            "null"
          ]
        },
        "bucketLabel": {
          "type": "string"
        },
        "trackedStart": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "trackedEnd": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "available": {
          "type": "boolean"
        },
        "points": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PlayerPoint"
          }
        }
      },
      "required": [
        "id",
        "label",
        "durationMs",
        "points"
      ]
    }
  }
}