Skip to content

Commit

Permalink
protobuf update
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Nov 8, 2023
1 parent 013bcc9 commit a4b3995
Show file tree
Hide file tree
Showing 6 changed files with 854 additions and 280 deletions.
11 changes: 11 additions & 0 deletions components/public-api/gitpod/v1/sort.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = "proto3";

package gitpod.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";

enum SortOrder {
SORT_ORDER_UNSPECIFIED = 0;
SORT_ORDER_ASCENDING = 1;
SORT_ORDER_DESCENDING = 2;
}
38 changes: 35 additions & 3 deletions components/public-api/gitpod/v1/workspace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package gitpod.v1;

import "google/protobuf/timestamp.proto";
import "gitpod/v1/pagination.proto";
import "gitpod/v1/sort.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";

Expand All @@ -26,10 +27,32 @@ message ListWorkspacesRequest {
// pagination contains the pagination options for listing workspaces
PaginationRequest pagination = 1;

// organization_id
string organization_id = 2;
repeated WorkspaceSortRequest sorts = 2;

optional bool pinned = 3;
// scope of the workspaces
Scope scope = 3;

enum Scope {
SCOPE_UNSPECIFIED = 0;

// SCOPE_MY_WORKSPACES_IN_ORGANIZATION scopes workspaces that is owned by current user in the organization
SCOPE_MY_WORKSPACES_IN_ORGANIZATION = 1;

// SCOPE_ALL_WORKSPACES_IN_ORGANIZATION scopes all workspaces in the organization
SCOPE_ALL_WORKSPACES_IN_ORGANIZATION = 2;

// SCOPE_ALL_WORKSPACES_IN_INSTALLATION scopes all workspaces in the installation
SCOPE_ALL_WORKSPACES_IN_INSTALLATION = 3;
}

// organization_id is the ID of the organization that contains the workspaces
string organization_id = 4;

// pinned indicates whether to list only pinned workspaces
bool pinned = 5;

// search_term is a search term to filter workspaces by name
string search_term = 6;
}

message ListWorkspacesResponse {
Expand All @@ -40,6 +63,15 @@ message ListWorkspacesResponse {
PaginationResponse pagination = 2;
}

enum WorkspaceSortableFields {
WORKSPACE_SORTABLE_FIELDS_UNSPECIFIED = 0;
}

message WorkspaceSortRequest {
WorkspaceSortableFields fields = 1;
SortOrder order = 2;
}

// +resource get workspace
message Workspace {
string id = 1;
Expand Down
141 changes: 141 additions & 0 deletions components/public-api/go/v1/sort.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a4b3995

Please sign in to comment.