{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carboncuretechnologies/json-schema/carboncuretechnologies-krill-config-schema.json",
  "title": "KrillConfig",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carboncuretechnologies-krill-api-openapi.yml#/components/schemas/KrillConfig",
  "type": "object",
  "properties": {
    "tabId": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "permission": {
      "type": [
        "string",
        "null"
      ]
    },
    "getEndpoint": {
      "type": [
        "string",
        "null"
      ]
    },
    "postEndpoint": {
      "type": [
        "string",
        "null"
      ]
    },
    "canAddRows": {
      "type": "boolean"
    },
    "needsUnitsToggle": {
      "type": "boolean"
    },
    "columns": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/KrillColumn"
      }
    },
    "filters": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/KrillFilter"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "KrillColumn": {
      "type": "object",
      "properties": {
        "columnId": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "$ref": "#/$defs/KrillType"
        },
        "dropdownValues": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "minValue": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "maxValue": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "isInclusive": {
          "type": "boolean"
        },
        "units": {
          "$ref": "#/$defs/UnitSystem"
        },
        "isHidden": {
          "type": "boolean"
        },
        "isLocked": {
          "type": "boolean",
          "description": "Locked columns may not be edited in the frontend."
        },
        "isRequired": {
          "type": "boolean"
        },
        "disableColumnFilter": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "KrillFilter": {
      "type": "object",
      "properties": {
        "filterId": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "$ref": "#/$defs/KrillType"
        },
        "isRequired": {
          "type": "boolean"
        },
        "defaultValue": {
          "type": [
            "string",
            "null"
          ]
        },
        "dropdownValues": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "KrillType": {
      "enum": [
        "String",
        "Int",
        "Float",
        "Date",
        "Bool",
        "Percentage"
      ],
      "type": "string"
    },
    "UnitSystem": {
      "enum": [
        "Metric",
        "Imperial"
      ],
      "type": "string"
    }
  }
}