{
  "id": "tools",
  "slot": "main",
  "version": "0.1.0",
  "name": "Счётчик",
  "description": "Команда, кнопка и страница с общим счётчиком.",
  "declared": {
    "telegram.read": {},
    "telegram.send": {},
    "bot.read": {},
    "bot.send": {},
    "db.read": {},
    "db.write": {},
    "config.read": {},
    "interface.read": {},
    "interface.write": {}
  },
  "dependencies": [],
  "changes": [
    "Первый пример."
  ],
  "interface": {
    "commands": [
      {
        "id": "counter",
        "alias": "counter",
        "access": "trusted",
        "source": "both"
      }
    ],
    "handlers": [
      {
        "id": "changed",
        "source": "telegram",
        "event": "config",
        "access": "public"
      }
    ],
    "callbacks": [
      {
        "id": "increment",
        "fields": {
          "amount": {
            "type": "integer",
            "min": 1,
            "max": 100,
            "default": 1
          }
        },
        "access": "trusted",
        "confirm": false
      }
    ],
    "actions": [
      {
        "id": "reset",
        "fields": {
          "value": {
            "type": "integer",
            "min": 0,
            "max": 1000,
            "default": 0
          }
        },
        "access": "trusted",
        "confirm": true
      }
    ],
    "config": {
      "step": {
        "type": "integer",
        "label": {
          "ru": "Шаг",
          "en": "Step"
        },
        "min": 1,
        "max": 100,
        "default": 1
      }
    },
    "pages": [
      {
        "id": "main",
        "title": {
          "ru": "Счётчик",
          "en": "Counter"
        },
        "elements": [
          {
            "id": "count",
            "type": "metric",
            "label": {
              "ru": "Значение",
              "en": "Value"
            }
          },
          {
            "id": "reset",
            "type": "form",
            "action": "reset",
            "label": {
              "ru": "Задать значение",
              "en": "Set value"
            }
          }
        ]
      }
    ]
  }
}
