{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-account-dashboard-schema.json",
  "title": "AccountDashboard",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-accounts-api-openapi.yml#/components/schemas/AccountDashboard",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "principal",
    "stats",
    "collections",
    "watchlists",
    "recentSaved",
    "recommendedActions",
    "agentActions",
    "policy"
  ],
  "properties": {
    "schemaVersion": {
      "const": "hugging-bay.account-dashboard.v1"
    },
    "generatedAt": {
      "type": "string"
    },
    "principal": {
      "$ref": "https://huggingbay.xyz/api/schemas#/$defs/Principal"
    },
    "stats": {
      "type": "object",
      "required": [
        "savedArtifacts",
        "hostedSavedArtifacts",
        "externalSavedArtifacts",
        "collections",
        "savedSearches",
        "alertWatchlists",
        "watchlistsWithNewMatches",
        "newMatches",
        "readerTokens",
        "activeReaderTokens"
      ],
      "properties": {
        "savedArtifacts": {
          "type": "number"
        },
        "hostedSavedArtifacts": {
          "type": "number"
        },
        "externalSavedArtifacts": {
          "type": "number"
        },
        "collections": {
          "type": "number"
        },
        "savedSearches": {
          "type": "number"
        },
        "alertWatchlists": {
          "type": "number"
        },
        "watchlistsWithNewMatches": {
          "type": "number"
        },
        "newMatches": {
          "type": "number"
        },
        "readerTokens": {
          "type": "number"
        },
        "activeReaderTokens": {
          "type": "number"
        },
        "verifiedReviewRuns": {
          "type": "number"
        },
        "reviewEvidenceItems": {
          "type": "number"
        }
      },
      "additionalProperties": true
    },
    "collections": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "count",
          "hosted",
          "external",
          "recent"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "count": {
            "type": "number"
          },
          "hosted": {
            "type": "number"
          },
          "external": {
            "type": "number"
          },
          "licenses": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "types": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "recent": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "compareUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      }
    },
    "watchlists": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "recentSaved": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "recommendedActions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "agentActions": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "policy": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}