diff --git a/changes.proto b/changes.proto index e0ad0df..ed25ff7 100644 --- a/changes.proto +++ b/changes.proto @@ -7,6 +7,7 @@ import "google/protobuf/timestamp.proto"; import "bookmarks.proto"; import "items.proto"; import "snapshots.proto"; +import "account.proto"; // ______ // ,'" "-._ @@ -231,6 +232,9 @@ message UpdatePlannedChangesRequest { // the changing items repeated MappedItemDiff changingItems = 2; + + // Overrides the stored blast radius config for this change + optional account.BlastRadiusConfig blastRadiusConfigOverride = 3; } message ListAppChangesSummaryRequest { diff --git a/config.proto b/config.proto index 8559362..1bd4da1 100644 --- a/config.proto +++ b/config.proto @@ -5,8 +5,15 @@ option go_package = "github.com/overmindtech/sdp-go;sdp"; // a simple key-value store to store the config for the CLI service ConfigService { + // GetConfig provides raw access to the underlying stored data. [experimental] rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) {} + // SetConfig provides raw access to the underlying stored data. [experimental] rpc SetConfig(SetConfigRequest) returns (SetConfigResponse) {} + + // Get the account config for the user's account + rpc GetAccountConfig(GetAccountConfigRequest) returns (GetAccountConfigResponse); + // Update the account config for the user's account + rpc UpdateAccountConfig(UpdateAccountConfigRequest) returns (UpdateAccountConfigResponse); } message GetConfigRequest { @@ -22,3 +29,37 @@ message SetConfigRequest { } message SetConfigResponse { } + + +// The config that is used when calculating the blast radius for a change, this +// does not affect manually requested blast radii vie the "Explore" view or the +// API +message BlastRadiusConfig { + // The maximum number of items that can be returned in a single blast radius + // request. Once a request has hit this limit, all currently running + // requests will be cancelled and the blast radius returned as-is + int32 maxItems = 1; + + // How deeply to link when calculating the blast radius for a change + int32 linkDepth = 2; +} + +message AccountConfig { + // The blast radius config for this account + BlastRadiusConfig blastRadius = 1; +} + +message GetAccountConfigRequest {} + +message GetAccountConfigResponse { + AccountConfig config = 1; +} + +// Updates the account config for the user's account. +message UpdateAccountConfigRequest { + AccountConfig config = 1; +} + +message UpdateAccountConfigResponse { + AccountConfig config = 1; +}