{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/akeda-ru/json-schema/akeda-ru-assistant-digest-input-schema.json",
  "title": "AssistantDigestInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/akeda-ru-assistant-api-openapi.yml#/components/schemas/AssistantDigestInput",
  "type": "object",
  "required": [
    "name",
    "metric_ids",
    "period",
    "schedule_hour",
    "schedule_minute",
    "timezone",
    "weekdays_only",
    "locale",
    "enabled"
  ],
  "additionalProperties": false,
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "digest",
        "watch"
      ],
      "default": "digest",
      "description": "digest — сводка приходит по расписанию всегда; watch — сторож: приходит, только когда сработало правило владельца показателя (rules в каталоге показателей), и не повторяет ту же картину тревог"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "metric_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 6,
      "uniqueItems": true,
      "items": {
        "type": "string"
      },
      "description": "Коды показателей витрины; у сторожа — только показатели с правилами"
    },
    "company": {
      "$ref": "#/$defs/UUID"
    },
    "project": {
      "$ref": "#/$defs/UUID"
    },
    "period": {
      "type": "string",
      "enum": [
        "this_month",
        "previous_month",
        "last_30_days"
      ]
    },
    "schedule_hour": {
      "type": "integer",
      "minimum": 0,
      "maximum": 23
    },
    "schedule_minute": {
      "type": "integer",
      "minimum": 0,
      "maximum": 59
    },
    "timezone": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "weekdays_only": {
      "type": "boolean"
    },
    "locale": {
      "type": "string",
      "enum": [
        "ru-RU",
        "en-US"
      ]
    },
    "enabled": {
      "type": "boolean"
    }
  },
  "$defs": {
    "UUID": {
      "type": "string",
      "format": "uuid"
    }
  }
}