Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added API Endpoints for account config #224

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ service ManagementService {
rpc RevlinkWarmup(RevlinkWarmupRequest) returns (stream RevlinkWarmupResponse);

rpc GetTrialEnd(GetTrialEndRequest) returns (GetTrialEndResponse);

// 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);
}

enum SourceStatus {
Expand Down Expand Up @@ -322,3 +327,37 @@ message GetTrialEndRequest {}
message GetTrialEndResponse {
google.protobuf.Timestamp endsAt = 1;
}

// 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. All fields are optional
// and only ones that are supplied will actually be updated
message UpdateAccountConfigRequest {
optional BlastRadiusConfig blastRadius = 1;
}

message UpdateAccountConfigResponse {
AccountConfig config = 1;
}
4 changes: 4 additions & 0 deletions changes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "google/protobuf/timestamp.proto";
import "bookmarks.proto";
import "items.proto";
import "snapshots.proto";
import "account.proto";

// ______
// ,'" "-._
Expand Down Expand Up @@ -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 {
Expand Down
Loading