{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tesseralytics-dev/json-schema/tesseralytics-dev-bundle-catalogue-response-schema.json",
  "title": "BundleCatalogueResponse",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/tesseralytics-dev-openapi-openapi.json#/components/schemas/BundleCatalogueResponse",
  "type": "object",
  "required": [
    "generated_at",
    "bundles"
  ],
  "properties": {
    "bundles": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BundleCatalogueEntry"
      }
    },
    "generated_at": {
      "type": "string",
      "description": "Manifest `generated_at` — every count below is derived from it."
    }
  },
  "$defs": {
    "BundleCatalogueEntry": {
      "type": "object",
      "required": [
        "bundle",
        "name",
        "price_cents",
        "currency",
        "datasets",
        "max_month",
        "partitions",
        "size_bytes",
        "months",
        "coverage"
      ],
      "properties": {
        "bundle": {
          "type": "string",
          "description": "Stable token: `majors` | `hip3` | `all`."
        },
        "coin_count": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Distinct coins with at least one partition in the sold months.\n`null` when the bundle is the whole universe.",
          "minimum": 0
        },
        "coverage": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DatasetCoverage"
          },
          "description": "Per-dataset coverage over the bundle's partitions — the §6.1 disclosure."
        },
        "currency": {
          "type": "string"
        },
        "datasets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Datasets carried (always the three customer-facing ones)."
        },
        "max_month": {
          "type": "string",
          "description": "Newest month the bundle sells, `YYYY-MM`."
        },
        "months": {
          "$ref": "#/$defs/MonthRange"
        },
        "name": {
          "type": "string"
        },
        "partitions": {
          "type": "integer",
          "description": "Partitions (asset × coin × month) in the bundle.",
          "minimum": 0
        },
        "price_cents": {
          "type": "integer",
          "format": "int64",
          "description": "Price in cents."
        },
        "size_bytes": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "DatasetCoverage": {
      "type": "object",
      "required": [
        "asset",
        "partitions",
        "under_floor",
        "worst"
      ],
      "properties": {
        "asset": {
          "type": "string"
        },
        "median_coverage": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Median of the manifest `coverage` values; `null` when none are present."
        },
        "min_coverage": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "partitions": {
          "type": "integer",
          "minimum": 0
        },
        "under_floor": {
          "type": "integer",
          "description": "Count of partitions whose `coverage` is below [`BUNDLE_COVERAGE_FLOOR`].",
          "minimum": 0
        },
        "worst": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LowCoveragePartition"
          },
          "description": "The worst `under_floor` partitions, ascending by coverage, capped at\n[`MAX_DISCLOSED_PARTITIONS`]. `under_floor` is the exact count, so the\ndisclosure is complete-by-count and representative-by-list."
        }
      }
    },
    "LowCoveragePartition": {
      "type": "object",
      "required": [
        "asset",
        "month",
        "coverage"
      ],
      "properties": {
        "asset": {
          "type": "string"
        },
        "coin": {
          "type": [
            "string",
            "null"
          ]
        },
        "coverage": {
          "type": "number",
          "format": "double"
        },
        "month": {
          "type": "string"
        }
      }
    },
    "MonthRange": {
      "type": "object",
      "properties": {
        "earliest": {
          "type": [
            "string",
            "null"
          ],
          "description": "Earliest partition month (`YYYY-MM`), if any."
        },
        "latest": {
          "type": [
            "string",
            "null"
          ],
          "description": "Latest partition month (`YYYY-MM`), if any."
        }
      }
    }
  }
}