From 51f6bb16e4f675bd7b4735eaae92a80e855fade0 Mon Sep 17 00:00:00 2001 From: frelodev Date: Sun, 8 Dec 2024 15:57:50 +0100 Subject: [PATCH] feat: Separate ListWorkspaces into FetchInvitedWorkspaces and FetchOwnedWorkspaces --- proto/session.proto | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/proto/session.proto b/proto/session.proto index 3385df2..7e3ff9d 100644 --- a/proto/session.proto +++ b/proto/session.proto @@ -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); } @@ -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.