From a1ee8ef10be5f1df1d603b5aecd1c14c5268b625 Mon Sep 17 00:00:00 2001 From: faumaray Date: Wed, 29 Jul 2026 00:33:26 +0300 Subject: [PATCH] API: add component update transactions --- include/echoion/api/config/ConfigTypes.hpp | 14 ++++++++++++-- include/echoion/api/rpc/RpcTypes.hpp | 8 ++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/echoion/api/config/ConfigTypes.hpp b/include/echoion/api/config/ConfigTypes.hpp index be7d6eb..dab5a92 100644 --- a/include/echoion/api/config/ConfigTypes.hpp +++ b/include/echoion/api/config/ConfigTypes.hpp @@ -217,6 +217,10 @@ namespace Echoion::Api }; struct UpdateSourceConfig { + // "direct" addresses one feed document. "component-layout" + // addresses a channel root containing catalog.json and component + // discovery documents. + std::string kind = "direct"; // Empty is only meaningful for the built-in "official" source and // resolves to the URL injected by the release build. std::string url; @@ -265,8 +269,14 @@ namespace Echoion::Api // Number of previous healthy versions retained in addition to // active. uint32_t retainHealthyVersions = 2; - std::map sources = { - {"official", UpdateSourceConfig{}}}; + std::map sources = {{ + "official", + UpdateSourceConfig{.kind = "component-layout", + .url = {}, + .publicKeys = {}, + .allowUnsigned = false, + .bearerTokenEnv = {}}, + }}; UpdateComponentConfig runtime; UpdateComponentConfig core; PluginUpdatesConfig plugins; diff --git a/include/echoion/api/rpc/RpcTypes.hpp b/include/echoion/api/rpc/RpcTypes.hpp index f0e98f2..820ba24 100644 --- a/include/echoion/api/rpc/RpcTypes.hpp +++ b/include/echoion/api/rpc/RpcTypes.hpp @@ -119,14 +119,18 @@ namespace Echoion::Api SendTeamSpeakChannelMessage, SendTeamSpeakServerMessage, - // Component updater (append-only; values 89-95). + // Component updater (append-only; values 89-99). GetUpdateStatus, GetUpdateConfig, SetUpdateConfig, CheckForUpdates, ApplyUpdate, RollbackUpdate, - ConfirmUnsignedUpdate + ConfirmUnsignedUpdate, + PreviewUpdateTransaction, + ApplyUpdateTransaction, + RollbackUpdateGeneration, + GetUpdateHistory }; struct RpcRequest {