diff --git a/changes.proto b/changes.proto index 6467bee..8cd1516 100644 --- a/changes.proto +++ b/changes.proto @@ -154,6 +154,9 @@ 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, authors and statuses that can be used to populate the dropdown filters + rpc PopulateChangeFilters(PopulateChangeFiltersRequest) returns (PopulateChangeFiltersResponse); } message GetChangeTimelineRequest { @@ -266,6 +269,16 @@ message GetAppSummariesResponse { message ListHomeChangesRequest { PaginationRequest pagination = 1; + ChangeFiltersRequest filters = 2; +} + +message ChangeFiltersRequest { + repeated string repos = 1; + map tags = 2; + repeated Risk.Severity risks = 3; + repeated string authors = 4; + repeated ChangeStatus statuses = 5; + SortOrder sortOrder = 6; } message ListHomeChangesResponse { @@ -273,6 +286,13 @@ message ListHomeChangesResponse { PaginationResponse pagination = 2; } +message PopulateChangeFiltersRequest {} +message PopulateChangeFiltersResponse { + repeated string repos = 1; + repeated string authors = 2; + repeated ChangeStatus statuses = 3; +} + message ListHomeAppsRequest {} message ListHomeAppsResponse { repeated AppSummary apps = 1; diff --git a/util.proto b/util.proto index b581af0..f0cf471 100644 --- a/util.proto +++ b/util.proto @@ -40,4 +40,11 @@ message PaginationResponse { // The total number of pages available. based on the totalItems and pageSize. // If there are no results this will be zero. int32 totalPages = 4; +} + +enum SortOrder { + ALPHABETICAL_ASCENDING = 0; // A-Z + ALPHABETICAL_DESCENDING = 1; // Z-A + DATE_ASCENDING = 2; // Oldest first + DATE_DESCENDING = 3; // Newest first } \ No newline at end of file