@@ -8,24 +8,24 @@ import "common.proto";
8
8
service Session {
9
9
// Attach to a session and receive events.
10
10
rpc Attach (common .Empty ) returns (stream SessionEvent );
11
- // Handle a workspace access request and return a workspace token for it.
12
- rpc GetWorkspaceToken (WorkspaceRequest ) returns (common .Token );
13
- // Quit a workspace.
14
- rpc QuitWorkspace (WorkspaceRequest ) returns (common .Empty );
11
+ // Handle a workspace access request and return a workspace token for it given it's UUID .
12
+ rpc GetWorkspaceToken (common . Identifier ) returns (common .Token );
13
+ // Quit a workspace given it's UUID .
14
+ rpc QuitWorkspace (common . Identifier ) returns (common .Empty );
15
15
// Create a workspace.
16
16
rpc CreateWorkspace (OwnedWorkspaceRequest ) returns (common .WorkspaceInfo );
17
- // Delete a workspace.
18
- rpc DeleteWorkspace (OwnedWorkspaceRequest ) returns (common .Empty );
17
+ // Delete a workspace given it's UUID .
18
+ rpc DeleteWorkspace (common . Identifier ) returns (common .Empty );
19
19
// List all workspaces the user has been invited to.
20
20
rpc FetchInvitedWorkspaces (common .Empty ) returns (WorkspacesInvitedList );
21
21
// List all workspaces the user owns.
22
22
rpc FetchOwnedWorkspaces (common .Empty ) returns (WorkspacesOwnedList );
23
23
// Handle a workspace invite request.
24
24
rpc InviteToWorkspace (InviteRequest ) returns (common .Empty );
25
- // Accept a pending invite to a workspace.
26
- rpc AcceptInvite (WorkspaceRequest ) returns (common .Empty );
27
- // Reject a pending invite to a workspace.
28
- rpc RejectInvite (WorkspaceRequest ) returns (common .Empty );
25
+ // Accept a pending invite to a workspace given it's UUID .
26
+ rpc AcceptInvite (common . Identifier ) returns (common .Empty );
27
+ // Reject a pending invite to a workspace given it's UUID .
28
+ rpc RejectInvite (common . Identifier ) returns (common .Empty );
29
29
}
30
30
31
31
// A message representing a request for an owned workspace.
@@ -34,12 +34,6 @@ message OwnedWorkspaceRequest {
34
34
required string name = 1 ;
35
35
}
36
36
37
- // A message representing a request for a specific workspace.
38
- message WorkspaceRequest {
39
- // The workspace's identifier.
40
- required common.Identifier id = 1 ;
41
- }
42
-
43
37
// A message representing a list of workspaces.
44
38
message WorkspacesInvitedList {
45
39
// A vector of workspaces the user is invited to.
@@ -56,8 +50,8 @@ message WorkspacesOwnedList {
56
50
message InviteRequest {
57
51
// The user the invitation is for.
58
52
required string user = 1 ;
59
- // The workspace name the invitation is for.
60
- required string workspace = 2 ;
53
+ // The workspace's uuid the invitation is for.
54
+ required common.Identifier workspace = 2 ;
61
55
}
62
56
63
57
// A message representing a session event.
0 commit comments