Skip to content

Commit

Permalink
add rpcs, response and request
Browse files Browse the repository at this point in the history
  • Loading branch information
getinnocuous committed Oct 28, 2024
1 parent 05058cb commit 792cc53
Showing 1 changed file with 49 additions and 3 deletions.
52 changes: 49 additions & 3 deletions changes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ service ChangesService {
// Gets the full diff of everything that changed as part of this "change".
// This includes all items and also edges between them
rpc GetDiff(GetDiffRequest) returns (GetDiffResponse);

// List all the available repos for all changes
rpc ListChangeRepos(ListChangeReposRequest) returns (ListChangeReposResponse);
// List all the available authors for all changes
rpc ListChangeAuthors(ListChangeAuthorsRequest) returns (ListChangeAuthorsResponse);
// List all the available statuses for all changes
rpc ListChangeStatuses(ListChangeStatusesRequest) returns (ListChangeStatusesResponse);
}

message GetChangeTimelineRequest {
Expand Down Expand Up @@ -266,10 +273,10 @@ message GetAppSummariesResponse {

message ListHomeChangesRequest {
PaginationRequest pagination = 1;
ChangeFilters filters = 2;
ChangeFiltersRequest filters = 2;
}

message ChangeFilters {
message ChangeFiltersRequest {
repeated string tags = 1;
repeated string repos = 2;
repeated Risk.Severity risks = 3;
Expand All @@ -278,10 +285,49 @@ message ChangeFilters {
SortOrder sortOrder = 6;
}

message StringWithCount
string name = 1;
int32 count = 2;
}

message SeverityWithCount {
Risk.Severity severity = 1;
int32 count = 2;
}
message StatusWithCount {
ChangeStatus status = 1;
int32 count = 2;
}

message ChangeFiltersResponse {
repeated StringWithCount tags = 1;
repeated StringWithCount repos = 2;
repeated SeverityWithCount risks = 3;
repeated StringWithCount authors = 4;
repeated StatusWithCount statuses = 5;
SortOrder sortOrder = 6; // not sure is this needed in the response?
}

message ListHomeChangesResponse {
repeated ChangeSummary changes = 1;
PaginationResponse pagination = 2;
ChangeFilters filters = 3;
ChangeFiltersResponse filters = 3;
}


message ListChangeReposRequest {}
message ListChangeReposResponse {
repeated StringWithCount repos = 1;
}

message ListChangeAuthorsRequest {}
message ListChangeAuthorsResponse {
repeated StringWithCount authors = 1;
}

message ListChangeStatusesRequest {}
message ListChangeStatusesResponse {
repeated StatusWithCount statuses = 1;
}

message ListHomeAppsRequest {}
Expand Down

0 comments on commit 792cc53

Please sign in to comment.