{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/antismi-media/json-schema/antismi-media-historical-digest-request-schema.json",
  "title": "HistoricalDigestRequest",
  "description": "Запрос на исторический дайджест 'В этот день'",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/antismi-media-openapi.json#/components/schemas/HistoricalDigestRequest",
  "properties": {
    "telegram_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Telegram Id",
      "description": "Telegram ID пользователя"
    },
    "years_ago": {
      "items": {
        "type": "integer"
      },
      "type": "array",
      "title": "Years Ago",
      "description": "Список лет назад",
      "default": [
        1,
        5,
        10,
        15,
        20,
        25
      ]
    },
    "categories": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Categories",
      "description": "Список категорий"
    },
    "sentiment_filter": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sentiment Filter",
      "description": "Фильтр сентимента: all или positive",
      "default": "all"
    },
    "clustering_threshold": {
      "type": "number",
      "maximum": 0.5,
      "minimum": 0.1,
      "title": "Clustering Threshold",
      "description": "Порог кластеризации",
      "default": 0.25
    },
    "sources_filter": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sources Filter",
      "description": "Фильтр источников: all или allowed_only",
      "default": "all"
    },
    "media_types": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Media Types",
      "description": "Список типов медиа (Foreign, Independents, State, Neutral, Non-political)"
    },
    "exclude_media_types": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Exclude Media Types",
      "description": "Типы медиа для исключения из выборки"
    },
    "include_rss": {
      "type": "boolean",
      "title": "Include Rss",
      "description": "Показывать новости из RSS-источников (False — только Telegram-лента)",
      "default": true
    },
    "lang": {
      "type": "string",
      "enum": [
        "ru",
        "en"
      ],
      "title": "Lang",
      "description": "Язык метаданных: en → заголовки/резюме/понятия из *_en с fallback на русский (миграция 030)",
      "default": "ru"
    }
  },
  "type": "object"
}