{
    "name": "Отчёты",
    "description": "Составной пример SDK для отдельной тестовой среды: HTTPS, зависимость, файлы, база, страница, кнопки и расписание.",
    "version": "1.0.0",
    "permissions": {
        "telegram.read": {},
        "bot.read": {},
        "bot.send": {},
        "db.read": {},
        "db.write": {},
        "config.read": {},
        "interface.read": {},
        "interface.write": {},
        "files.read": {},
        "files.write": {},
        "tasks.create": {},
        "logs.write": {},
        "requests.manage": {},
        "web.request": {
            "domains": [
                "postman-echo.com"
            ]
        },
        "modules.call": {
            "modules": [
                "0123456789abcdef0123456789abcdef"
            ]
        }
    },
    "dependencies": [
        "0123456789abcdef0123456789abcdef"
    ],
    "changes": "Первый пример.",
    "source": true,
    "interface": {
        "commands": [
            {
                "id": "report",
                "alias": "report",
                "access": "owner",
                "source": "both"
            }
        ],
        "handlers": [],
        "callbacks": [
            {
                "id": "pressed",
                "fields": {
                    "text": {
                        "type": "string",
                        "min": 1,
                        "max": 800,
                        "required": true
                    }
                },
                "access": "owner",
                "confirm": false
            }
        ],
        "actions": [
            {
                "id": "cancel",
                "fields": {},
                "access": "owner",
                "confirm": false
            },
            {
                "id": "collect",
                "fields": {
                    "text": {
                        "type": "string",
                        "min": 1,
                        "max": 800,
                        "required": true
                    }
                },
                "access": "owner",
                "confirm": false
            },
            {
                "id": "schedule",
                "fields": {
                    "text": {
                        "type": "string",
                        "min": 1,
                        "max": 800,
                        "required": true
                    }
                },
                "access": "owner",
                "confirm": false
            }
        ],
        "functions": [],
        "signals": [],
        "tasks": [
            {
                "id": "tick",
                "fields": {
                    "text": {
                        "type": "string",
                        "min": 1,
                        "max": 800,
                        "required": true
                    }
                }
            }
        ],
        "requests": [
            {
                "id": "receive",
                "fields": {
                    "text": {
                        "type": "string",
                        "min": 1,
                        "max": 800,
                        "required": true
                    }
                }
            }
        ],
        "config": {
            "history": {
                "type": "integer",
                "min": 1,
                "max": 100,
                "default": 10
            }
        },
        "pages": [
            {
                "id": "main",
                "title": {
                    "ru": "Отчёты",
                    "en": "Reports"
                },
                "elements": [
                    {
                        "id": "status",
                        "type": "text",
                        "label": "Status"
                    },
                    {
                        "id": "count",
                        "type": "metric",
                        "label": "Reports"
                    },
                    {
                        "id": "history",
                        "type": "table",
                        "label": "History",
                        "columns": [
                            "number",
                            "bytes",
                            "sha256"
                        ]
                    },
                    {
                        "id": "collect",
                        "type": "form",
                        "label": "Create report",
                        "action": "collect"
                    },
                    {
                        "id": "schedule",
                        "type": "form",
                        "label": "Schedule report",
                        "action": "schedule"
                    },
                    {
                        "id": "cancel",
                        "type": "button",
                        "label": "Cancel schedule",
                        "action": "cancel"
                    }
                ]
            }
        ]
    }
}
