Skip to content

Commit

Permalink
feat: Separate ListWorkspaces into FetchInvitedWorkspaces and FetchOw…
Browse files Browse the repository at this point in the history
…nedWorkspaces
  • Loading branch information
frelodev committed Dec 8, 2024
1 parent 5c9b5ee commit 51f6bb1
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions proto/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ service Session {
rpc CreateWorkspace (WorkspaceRequest) returns (common.Empty);
// Delete a workspace.
rpc DeleteWorkspace (WorkspaceRequest) returns (common.Empty);
// List all available workspaces.
rpc ListWorkspaces (common.Empty) returns (WorkspaceList);
// List all workspaces the user has been invited to.
rpc FetchInvitedWorkspaces (common.Empty) returns (WorkspacesInvitedList);
//List all workspaces the user owns
rpc FetchOwnedWorkspaces (common.Empty) returns (WorkspacesOwnedList);
// Handle a workspace invite request.
rpc InviteToWorkspace (InviteRequest) returns (common.Empty);
}
Expand All @@ -25,11 +27,15 @@ message WorkspaceRequest {
}

// A message representing a list of workspaces.
message WorkspaceList {
message WorkspacesInvitedList {
// A vector of workspaces the user is invited to.
repeated string invited = 1;
}

// A message representing a list of workspaces.
message WorkspacesOwnedList {
// A vector of workspaces owned by the user.
repeated string owned = 1;
// A vector of workspaces the user is invited to.
repeated string invited = 2;
}

// A message representing an invitation to a workspace.
Expand Down

0 comments on commit 51f6bb1

Please sign in to comment.