{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coinrebate-vip/json-schema/coinrebate-vip-ai-stats-response-schema.json",
  "title": "AiStatsResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coinrebate-vip-openapi.json#/components/schemas/AiStatsResponse",
  "type": "object",
  "required": [
    "updated_at",
    "listings",
    "tool_calls",
    "all_channel_calls",
    "verified_ai_visits"
  ],
  "properties": {
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "listings": {
      "type": "object",
      "required": [
        "mcp_registry",
        "npm"
      ],
      "properties": {
        "mcp_registry": {
          "$ref": "#/$defs/McpRegistryListing"
        },
        "npm": {
          "$ref": "#/$defs/NpmListing"
        }
      }
    },
    "tool_calls": {
      "$ref": "#/$defs/CountBreakdown"
    },
    "all_channel_calls": {
      "$ref": "#/$defs/CountBreakdown"
    },
    "verified_ai_visits": {
      "type": "object",
      "required": [
        "window_days",
        "bots",
        "unverifiable_note",
        "observed_bots"
      ],
      "properties": {
        "window_days": {
          "type": "integer"
        },
        "bots": {
          "$ref": "#/$defs/NullableVisitList"
        },
        "unverifiable_note": {
          "type": "string"
        },
        "observed_bots": {
          "$ref": "#/$defs/NullableVisitList"
        }
      }
    },
    "daily": {
      "type": [
        "object",
        "null"
      ],
      "description": "Added 2026-11-04. One point per calendar day from since to through (today's date in UTC+08:00); counts[i] belongs to days[i]. Tool calls use UTC days: a started day without calls is 0, a day that has not started yet is null. Bot requests use UTC+08:00 days and the same bots and states as verified_ai_visits; a day without a record is null (no data, not zero). All tool-call days add up to tool_calls.total; the 30 bot days ending on through add up to the visits in verified_ai_visits.bots (verified) and observed_bots (observed). A series is null when its telemetry cannot be read; daily is null when nothing could be aggregated.",
      "required": [
        "since",
        "through",
        "days",
        "tool_calls",
        "verified_bot_requests",
        "observed_bot_requests"
      ],
      "properties": {
        "since": {
          "type": "string",
          "format": "date"
        },
        "through": {
          "type": "string",
          "format": "date"
        },
        "days": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "date"
          }
        },
        "tool_calls": {
          "$ref": "#/$defs/DailyCountSeries"
        },
        "verified_bot_requests": {
          "$ref": "#/$defs/DailyCountSeries"
        },
        "observed_bot_requests": {
          "$ref": "#/$defs/DailyCountSeries"
        }
      }
    }
  },
  "$defs": {
    "CountBreakdown": {
      "type": "object",
      "required": [
        "since",
        "total"
      ],
      "properties": {
        "since": {
          "type": [
            "string",
            "null"
          ]
        },
        "total": {
          "type": [
            "integer",
            "null"
          ]
        },
        "by_tool": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": "integer"
          }
        },
        "by_channel": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": "integer"
          }
        }
      }
    },
    "DailyCountSeries": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "day_boundary",
        "counts"
      ],
      "properties": {
        "day_boundary": {
          "type": "string",
          "enum": [
            "UTC",
            "UTC+08:00"
          ]
        },
        "counts": {
          "type": "array",
          "items": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      }
    },
    "McpRegistryListing": {
      "type": "object",
      "required": [
        "name",
        "version",
        "checked_at",
        "is_latest",
        "url"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        },
        "checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "is_latest": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "NpmListing": {
      "type": "object",
      "required": [
        "package",
        "version",
        "checked_at",
        "url"
      ],
      "properties": {
        "package": {
          "type": "string"
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        },
        "checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "NullableVisitList": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "required": [
          "bot",
          "visits"
        ],
        "properties": {
          "bot": {
            "type": "string"
          },
          "visits": {
            "type": "integer"
          }
        }
      }
    }
  }
}