{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ragjur-ai/json-schema/ragjur-ai-alerta-input-schema.json",
  "title": "AlertaInput",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ragjur-ai-openapi.json#/components/schemas/AlertaInput",
  "type": "object",
  "required": [
    "tipo",
    "fonte"
  ],
  "properties": {
    "tipo": {
      "type": "string",
      "enum": [
        "taxa_queda",
        "taxa_alta",
        "nova_decisao",
        "mudanca_entendimento"
      ]
    },
    "fonte": {
      "type": "string"
    },
    "busca": {
      "type": "string"
    },
    "turma": {
      "type": "string"
    },
    "threshold": {
      "type": "number",
      "description": "Obrigatório para `taxa_queda`/`taxa_alta` (pontos percentuais)"
    },
    "webhook_url": {
      "type": "string",
      "format": "uri",
      "description": "HTTPS público (hosts privados rejeitados)"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "descricao": {
      "type": "string"
    }
  }
}