{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getcheapgames-com/json-schema/getcheapgames-com-review-history-out-schema.json",
  "title": "ReviewHistoryOut",
  "description": "`GET /api/stores/{code}/reviews/history`: the store's rating over each\nperiod (`24h`, `30d`, `all`), and each period's chart, oldest first:\nhourly for `24h`, daily for `30d`, monthly for `all`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getcheapgames-com-reviews-api-openapi.yml#/components/schemas/ReviewHistoryOut",
  "properties": {
    "periods": {
      "additionalProperties": {
        "$ref": "#/$defs/ReviewSummaryOut"
      },
      "type": "object",
      "title": "Periods"
    },
    "series": {
      "additionalProperties": {
        "items": {
          "$ref": "#/$defs/ReviewBucketOut"
        },
        "type": "array"
      },
      "type": "object",
      "title": "Series"
    }
  },
  "type": "object",
  "required": [
    "periods",
    "series"
  ],
  "$defs": {
    "ReviewBucketOut": {
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time",
          "title": "Start"
        },
        "average": {
          "type": "number",
          "title": "Average"
        },
        "count": {
          "type": "integer",
          "title": "Count"
        }
      },
      "type": "object",
      "required": [
        "start",
        "average",
        "count"
      ],
      "title": "ReviewBucketOut",
      "description": "One bar of a store's chart: when its hour, day or month starts (UTC), its stars, how many."
    },
    "ReviewSummaryOut": {
      "properties": {
        "average": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Average"
        },
        "count": {
          "type": "integer",
          "title": "Count"
        },
        "distribution": {
          "items": {
            "type": "integer"
          },
          "type": "array",
          "title": "Distribution"
        }
      },
      "type": "object",
      "required": [
        "average",
        "count",
        "distribution"
      ],
      "title": "ReviewSummaryOut",
      "description": "The GCG rating of a product, over its visible reviews (`service.Summary`)."
    }
  }
}