{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-public-traffic-schema.json",
  "title": "PublicTraffic",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-catalog-api-openapi.yml#/components/schemas/PublicTraffic",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "available",
    "totals",
    "windows",
    "privacy"
  ],
  "properties": {
    "schemaVersion": {
      "const": "hugging-bay.public-traffic.v1"
    },
    "generatedAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Oldest available exact-window evidence timestamp; null when no exact window is available. Per-window asOf and persistedAt distinguish evidence time from persistence time."
    },
    "baseUrl": {
      "type": "string"
    },
    "webUrl": {
      "type": "string"
    },
    "apiUrl": {
      "type": "string"
    },
    "available": {
      "type": "boolean"
    },
    "degraded": {
      "type": "boolean"
    },
    "source": {
      "type": "string",
      "enum": [
        "first-party-rollup",
        "stale-first-party-rollup",
        "fallback"
      ]
    },
    "reason": {
      "type": "string"
    },
    "persistence": {
      "type": "string"
    },
    "instrumentation": {
      "type": "object",
      "additionalProperties": true
    },
    "totals": {
      "type": "object",
      "required": [
        "window",
        "pageviews",
        "uniqueVisitors",
        "downloads",
        "mirrorRequests",
        "productActions",
        "agentOrCrawler"
      ],
      "additionalProperties": true
    },
    "windows": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "links": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "privacy": {
      "type": "object",
      "required": [
        "rawIpsExposed",
        "rawVisitorKeysExposed",
        "rawUserAgentsExposed",
        "rawReferrersExposed"
      ],
      "properties": {
        "rawIpsExposed": {
          "const": false
        },
        "rawVisitorKeysExposed": {
          "const": false
        },
        "rawUserAgentsExposed": {
          "const": false
        },
        "rawReferrersExposed": {
          "const": false
        },
        "referrersSuppressed": {
          "const": true
        }
      },
      "additionalProperties": true
    },
    "agentUse": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}