{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/steamgpt-net/json-schema/steamgpt-net-summary-schema.json",
  "title": "Summary",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/steamgpt-net-openapi.json#/components/schemas/Summary",
  "type": "object",
  "properties": {
    "result": {
      "type": "string",
      "enum": [
        "success"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "steamid64": {
          "type": "string"
        },
        "ids": {
          "$ref": "#/$defs/Ids"
        },
        "steam": {
          "$ref": "#/$defs/SteamPlayer"
        },
        "faceit": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": true
        },
        "faceit_bans": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "steam_bans": {
          "type": [
            "object",
            "null"
          ],
          "description": "GetPlayerBans object; absent when include excludes bans",
          "additionalProperties": true
        },
        "friends": {
          "$ref": "#/$defs/FriendsData"
        },
        "canonical": {
          "$ref": "#/$defs/Canonical"
        },
        "provenance": {
          "type": "object",
          "description": "keys follow include: faceit / steam_bans absent when their blocks are excluded",
          "properties": {
            "steam": {
              "$ref": "#/$defs/SourceProvenance"
            },
            "faceit": {
              "$ref": "#/$defs/SourceProvenance"
            },
            "steam_bans": {
              "$ref": "#/$defs/SourceProvenance"
            }
          }
        },
        "sources": {
          "type": "object",
          "description": "per-source status: ok (data present), empty (no such data), unavailable (source did not answer - absence is NOT a fact), excluded (not requested)",
          "properties": {
            "steam": {
              "type": "string",
              "enum": [
                "ok",
                "empty",
                "unavailable",
                "excluded"
              ]
            },
            "faceit": {
              "type": "string",
              "enum": [
                "ok",
                "empty",
                "unavailable",
                "excluded"
              ]
            },
            "friends": {
              "type": "string",
              "enum": [
                "ok",
                "empty",
                "unavailable",
                "excluded"
              ]
            },
            "bans": {
              "type": "string",
              "enum": [
                "ok",
                "empty",
                "unavailable",
                "excluded"
              ]
            }
          }
        },
        "partial": {
          "type": "boolean",
          "description": "true when at least one source is unavailable"
        }
      }
    }
  },
  "$defs": {
    "Canonical": {
      "type": "object",
      "description": "Stable resource identity: vanity and steamid64 URLs are the same resource",
      "properties": {
        "steamid64": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "FriendsData": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "description": "total known friends (may exceed shown list)"
        },
        "friends": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "string",
                "description": "detail=short: plain steamid64"
              },
              {
                "type": "object",
                "description": "detail=medium",
                "properties": {
                  "steamid64": {
                    "type": "string"
                  },
                  "personaname": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "description": "detail=full (default)",
                "properties": {
                  "steamid64": {
                    "type": "string"
                  },
                  "steam": {
                    "$ref": "#/$defs/SteamPlayer"
                  }
                }
              }
            ]
          }
        }
      }
    },
    "Ids": {
      "type": "object",
      "description": "All SteamID representations of the player",
      "properties": {
        "steamid64": {
          "type": "string"
        },
        "steamid": {
          "type": [
            "string",
            "null"
          ]
        },
        "steamid3": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "SourceProvenance": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "retrieved_at": {
          "type": [
            "integer",
            "null"
          ],
          "description": "unixtime of the cached snapshot"
        },
        "age_seconds": {
          "type": [
            "integer",
            "null"
          ],
          "description": "snapshot age at response time"
        },
        "fresh": {
          "type": "boolean",
          "description": "age within cache_ttl; false when unknown"
        },
        "cache_ttl": {
          "type": [
            "integer",
            "null"
          ],
          "description": "refresh policy in seconds"
        },
        "refreshed_with": {
          "type": "string",
          "description": "steam_bans only: bans refresh together with this source snapshot"
        }
      }
    },
    "SteamPlayer": {
      "type": [
        "object",
        "null"
      ],
      "description": "Raw Steam GetPlayerSummaries player object, unmodified field names",
      "properties": {
        "steamid": {
          "type": "string"
        },
        "personaname": {
          "type": "string"
        },
        "profileurl": {
          "type": "string"
        },
        "avatar": {
          "type": "string"
        },
        "avatarmedium": {
          "type": "string"
        },
        "avatarfull": {
          "type": "string"
        },
        "personastate": {
          "type": "integer",
          "description": "0 offline, 1 online, 2 busy, 3 away, 4 snooze, 5 looking to trade, 6 looking to play"
        },
        "communityvisibilitystate": {
          "type": "integer",
          "description": "3 = public"
        },
        "timecreated": {
          "type": "integer",
          "description": "unixtime"
        },
        "lastlogoff": {
          "type": "integer",
          "description": "unixtime"
        },
        "gameextrainfo": {
          "type": "string"
        },
        "loccountrycode": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }
  }
}