{
    "name": "Заметки",
    "description": "Одна личная заметка до 800 символов. Команда !note текст или /note текст сохраняет её, команда без текста показывает сохранённое. На странице модуля можно изменить и удалить заметку. Доступ только овнерам. Интернет, чужие данные и файлы не используются.",
    "version": "1.0.1",
    "permissions": {
        "telegram.read": {},
        "telegram.send": {},
        "bot.read": {},
        "bot.send": {},
        "db.read": {},
        "db.write": {},
        "config.read": {},
        "interface.write": {}
    },
    "dependencies": [],
    "changes": "Публичный выпуск: команда note, сохранение заметки, настройка заголовка и редактирование на сайте.",
    "source": true,
    "interface": {
        "commands": [
            {
                "id": "note",
                "alias": "note",
                "access": "owner",
                "source": "both"
            }
        ],
        "handlers": [
            {
                "id": "changed",
                "source": "telegram",
                "event": "config",
                "access": "public"
            }
        ],
        "actions": [
            {
                "id": "clear",
                "fields": {},
                "access": "owner",
                "confirm": true
            },
            {
                "id": "save",
                "fields": {
                    "text": {
                        "type": "string",
                        "label": {
                            "ru": "Текст заметки",
                            "en": "Note text"
                        },
                        "min": 1,
                        "max": 800,
                        "required": true
                    }
                },
                "access": "owner",
                "confirm": false
            }
        ],
        "config": {
            "heading": {
                "type": "string",
                "label": {
                    "ru": "Заголовок заметки",
                    "en": "Note heading"
                },
                "default": "Note",
                "min": 1,
                "max": 40,
                "required": true
            }
        },
        "pages": [
            {
                "id": "main",
                "title": {
                    "ru": "Заметка",
                    "en": "Note"
                },
                "elements": [
                    {
                        "id": "heading",
                        "type": "text"
                    },
                    {
                        "id": "note",
                        "type": "text",
                        "label": {
                            "ru": "Текст заметки",
                            "en": "Note text"
                        }
                    },
                    {
                        "id": "save",
                        "type": "form",
                        "action": "save",
                        "label": {
                            "ru": "Сохранить заметку",
                            "en": "Save note"
                        }
                    },
                    {
                        "id": "clear",
                        "type": "button",
                        "action": "clear",
                        "label": {
                            "ru": "Удалить заметку",
                            "en": "Delete note"
                        }
                    }
                ]
            }
        ]
    }
}
