{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/onclarity-com/json-schema/onclarity-com-tickets-request-schema.json",
  "title": "TicketsRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/onclarity-com-anomalies-api-openapi.yml#/components/schemas/TicketsRequest",
  "properties": {
    "filters": {
      "items": {
        "$ref": "#/$defs/QueryFilter"
      },
      "type": "array",
      "title": "Filters"
    },
    "limit": {
      "type": "integer",
      "title": "Limit"
    },
    "offset": {
      "type": "integer",
      "title": "Offset"
    },
    "sorted_by": {
      "items": {
        "$ref": "#/$defs/QuerySort"
      },
      "type": "array",
      "title": "Sorted By"
    }
  },
  "type": "object",
  "required": [
    "filters",
    "limit",
    "offset",
    "sorted_by"
  ],
  "$defs": {
    "QueryFilter": {
      "properties": {
        "type": {
          "anyOf": [
            {
              "type": "string",
              "const": "exists"
            },
            {
              "type": "string",
              "const": "list"
            },
            {
              "type": "string",
              "const": "nested"
            },
            {
              "type": "string",
              "const": "range"
            },
            {
              "type": "string",
              "const": "text"
            }
          ],
          "title": "Type"
        },
        "key": {
          "type": "string",
          "title": "Key"
        },
        "values": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            {
              "items": {
                "additionalProperties": true,
                "type": "object"
              },
              "type": "array"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Values"
        },
        "min": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Min"
        },
        "max": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max"
        },
        "operator": {
          "anyOf": [
            {
              "type": "string",
              "const": "eq"
            },
            {
              "type": "string",
              "const": "neq"
            },
            {
              "type": "string",
              "const": "contains"
            }
          ],
          "title": "Operator",
          "default": "eq"
        },
        "generated": {
          "type": "boolean",
          "title": "Generated",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "type",
        "key"
      ],
      "title": "QueryFilter"
    },
    "QuerySort": {
      "properties": {
        "key": {
          "type": "string",
          "title": "Key"
        },
        "order": {
          "anyOf": [
            {
              "type": "string",
              "const": "asc"
            },
            {
              "type": "string",
              "const": "desc"
            }
          ],
          "title": "Order",
          "default": "asc"
        }
      },
      "type": "object",
      "required": [
        "key"
      ],
      "title": "QuerySort"
    }
  }
}