* @brief Register action CRUD commands. */
| 960 | * @brief Register action CRUD commands. |
| 961 | */ |
| 962 | void API::Handlers::ProjectHandler::registerActionCommands() |
| 963 | { |
| 964 | auto& registry = CommandRegistry::instance(); |
| 965 | const auto empty = emptySchema(); |
| 966 | |
| 967 | registry.registerCommand( |
| 968 | QStringLiteral("project.action.add"), |
| 969 | QStringLiteral("Create a new outgoing-action button shown on the toolbar. Actions " |
| 970 | "transmit a configurable payload (text or binary, with optional " |
| 971 | "EOL sequence) to the device on click, or repeat on a timer. After " |
| 972 | "creation, populate it with project.action.update {actionId, " |
| 973 | "title, txData, eolSequence, timerMode (0=Off, 1=AutoStart, " |
| 974 | "2=ToggleOnTrigger), timerIntervalMs, repeatCount, icon}. Common " |
| 975 | "uses: 'send AT command', 'request telemetry', 'reset device'."), |
| 976 | empty, |
| 977 | &actionAdd); |
| 978 | registry.registerCommand(QStringLiteral("project.action.delete"), |
| 979 | QStringLiteral("Delete an action by id (params: actionId)"), |
| 980 | makeSchema({ |
| 981 | {QStringLiteral("actionId"), |
| 982 | QStringLiteral("integer"), |
| 983 | QStringLiteral("Action id to delete")} |
| 984 | }), |
| 985 | &actionDelete); |
| 986 | registry.registerCommand(QStringLiteral("project.action.duplicate"), |
| 987 | QStringLiteral("Duplicate an action by id (params: actionId)"), |
| 988 | makeSchema({ |
| 989 | {QStringLiteral("actionId"), |
| 990 | QStringLiteral("integer"), |
| 991 | QStringLiteral("Action id to duplicate")} |
| 992 | }), |
| 993 | &actionDuplicate); |
| 994 | } |
| 995 | |
| 996 | /** |
| 997 | * @brief Register output-widget CRUD commands. |
nothing calls this directly
no test coverage detected