{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/toolaby-app/json-schema/toolaby-app-analytics-table-schema.json",
  "title": "AnalyticsTable",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/toolaby-app-openapi.json#/components/schemas/AnalyticsTable",
  "type": "object",
  "properties": {
    "part": {
      "type": "string"
    },
    "range": {
      "$ref": "#/$defs/AnalyticsRange"
    },
    "channel": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "app",
        "web",
        null
      ],
      "description": "The channel asked for, or `null` for both together."
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {}
      }
    }
  },
  "required": [
    "part",
    "range",
    "channel",
    "data"
  ],
  "$defs": {
    "AnalyticsRange": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "days": {
          "type": "integer"
        },
        "clamped": {
          "type": "boolean",
          "description": "Asked for further back than the plan sees, and given its furthest."
        }
      },
      "required": [
        "id",
        "from",
        "to",
        "days",
        "clamped"
      ]
    }
  }
}