From 88358006996ceb3ba824a94f99bb1cd59b265cb9 Mon Sep 17 00:00:00 2001 From: Evgenii Kozlov Date: Wed, 2 Apr 2025 09:17:17 +0200 Subject: [PATCH] DROID-3513 Protocol | Enhancement | MW 0.40.3 (#2226) --- gradle/libs.versions.toml | 2 +- protocol/src/main/proto/commands.proto | 29 ++++++++++++++++++++++++++ protocol/src/main/proto/events.proto | 7 +++++++ protocol/src/main/proto/models.proto | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ead7b46749..45d6e19b46 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -middlewareVersion = "v0.40.1" +middlewareVersion = "v0.40.3" kotlinVersion = '2.0.21' kspVersion = "2.0.21-1.0.25" diff --git a/protocol/src/main/proto/commands.proto b/protocol/src/main/proto/commands.proto index fcc745647f..98775d7a78 100644 --- a/protocol/src/main/proto/commands.proto +++ b/protocol/src/main/proto/commands.proto @@ -2908,6 +2908,35 @@ message Rpc { } + message Export { + message Request { + string spaceId = 10; + // ids of documents for export, when empty - will export all available docs + string objectId = 2; + // export format + anytype.model.Export.Format format = 3; + } + + message Response { + Error error = 1; + string result = 2; + ResponseEvent event = 3; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + // ... + } + } + } + + } + message Import { message Request { option (no_auth) = true; diff --git a/protocol/src/main/proto/events.proto b/protocol/src/main/proto/events.proto index 11c4f524ae..900f12cdea 100644 --- a/protocol/src/main/proto/events.proto +++ b/protocol/src/main/proto/events.proto @@ -108,6 +108,7 @@ message Event { Membership.Update membershipUpdate = 117; Space.SyncStatus.Update spaceSyncStatusUpdate = 119; + Space.AutoWidgetAdded spaceAutoWidgetAdded = 122; P2PStatus.Update p2pStatusUpdate = 120; @@ -1154,6 +1155,12 @@ message Event { IncompatibleVersion = 2; NetworkError = 3; } + + message AutoWidgetAdded { + string targetId = 1; + string targetName = 2; // pluralName (if exists) for types, fallback to name. Special cases for "bin" and "favorites" + string widgetBlockId = 3; + } } message P2PStatus { message Update { diff --git a/protocol/src/main/proto/models.proto b/protocol/src/main/proto/models.proto index 38577c2bf1..407078ed87 100644 --- a/protocol/src/main/proto/models.proto +++ b/protocol/src/main/proto/models.proto @@ -593,6 +593,7 @@ message Block { Layout layout = 1; int32 limit = 2; string viewId = 3; + bool autoAdded = 4; enum Layout { Link = 0;