{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mammoth-io/json-schema/mammoth-io-highlight-entry-schema.json",
  "title": "HighlightEntry",
  "description": "Create Conditional format",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mammoth-io-conditional-format-api-openapi.yml#/components/schemas/HighlightEntry",
  "properties": {
    "cf_type": {
      "type": "string",
      "enum": [
        "RULE",
        "COLOR_SCALE"
      ]
    },
    "enabled": {
      "type": "boolean",
      "default": true
    },
    "payload": {
      "oneOf": [
        {
          "$ref": "#/$defs/apiv2_conditional_formatting_schema_ColumnSchema"
        },
        {
          "$ref": "#/$defs/ColorScaleColumnSchema"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "cf_type",
    "payload"
  ],
  "$defs": {
    "ColorScaleColumnSchema": {
      "properties": {
        "column": {
          "type": "string"
        },
        "scale": {
          "type": "string"
        },
        "colors_change_at": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "min": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "max": {
          "oneOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "CONDITION": {
          "oneOf": [
            {
              "$ref": "#/$defs/conditional_formatting_schema_ConditionSchema"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "column",
        "scale"
      ],
      "title": "ColorScaleColumnSchema"
    },
    "FormatSchema": {
      "properties": {
        "name": {
          "type": "string"
        },
        "color": {
          "type": "string",
          "enum": [
            "red",
            "amber",
            "green",
            "blue",
            "purple",
            "teal",
            "coral",
            "grey",
            "text-red",
            "text-amber",
            "text-green",
            "text-blue",
            "text-purple",
            "text-teal",
            "text-coral",
            "text-grey",
            "text-pink",
            "text-lime"
          ]
        },
        "applies_to": {
          "type": "string",
          "enum": [
            "row",
            "columns"
          ]
        },
        "column_ids": {
          "type": "string",
          "default": "[]"
        }
      },
      "type": "object",
      "required": [
        "applies_to",
        "color",
        "name"
      ],
      "title": "FormatSchema"
    },
    "apiv2_conditional_formatting_schema_ColumnSchema": {
      "properties": {
        "CONDITION": {
          "$ref": "#/$defs/conditional_formatting_schema_ConditionSchema"
        },
        "FORMAT": {
          "oneOf": [
            {
              "$ref": "#/$defs/FormatSchema"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "CONDITION"
      ],
      "title": "ColumnSchema"
    },
    "conditional_formatting_schema_ConditionSchema": {
      "properties": {
        "OR": {
          "oneOf": [
            {
              "items": {
                "type": "object"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ]
        },
        "AND": {
          "oneOf": [
            {
              "items": {
                "type": "object"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [],
      "title": "ConditionSchema"
    }
  }
}