{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/foresea-ink/json-schema/foresea-ink-analytics-summary-schema.json",
  "title": "AnalyticsSummary",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/foresea-ink-system-api-openapi.yml#/components/schemas/AnalyticsSummary",
  "properties": {
    "total_visits": {
      "type": "integer",
      "title": "Total Visits"
    },
    "unique_visitors": {
      "type": "integer",
      "title": "Unique Visitors"
    },
    "by_day": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "By Day"
    },
    "attribution": {
      "$ref": "#/$defs/AnalyticsAttributionSummary"
    },
    "visits_24h": {
      "type": "integer",
      "title": "Visits 24H",
      "default": 0
    }
  },
  "type": "object",
  "required": [
    "total_visits",
    "unique_visitors",
    "by_day",
    "attribution"
  ],
  "$defs": {
    "AnalyticsAttributionSummary": {
      "properties": {
        "window_days": {
          "type": "integer",
          "title": "Window Days",
          "default": 30
        },
        "authenticated_records": {
          "type": "integer",
          "title": "Authenticated Records",
          "default": 0
        },
        "anonymous_records": {
          "type": "integer",
          "title": "Anonymous Records",
          "default": 0
        },
        "authenticated_accounts": {
          "type": "integer",
          "title": "Authenticated Accounts",
          "default": 0
        },
        "total_registered_users": {
          "type": "integer",
          "title": "Total Registered Users",
          "default": 0
        }
      },
      "type": "object",
      "title": "AnalyticsAttributionSummary",
      "description": "Aggregate, privacy-preserving attribution for the last 30 days."
    }
  }
}