@@ -4,23 +4,6 @@ package gitpod.experimental.v1;
4
4
5
5
option go_package = "github.com/gitpod-io/gitpod/public-api/experimental/v1" ;
6
6
7
- service TeamService {
8
-
9
- // CreateTeam creates a new Team.
10
- rpc CreateTeam (CreateTeamRequest ) returns (CreateTeamResponse ) {};
11
-
12
- }
13
-
14
- message CreateTeamRequest {
15
- // name is the team name
16
- string name = 1 ;
17
- }
18
-
19
-
20
- message CreateTeamResponse {
21
- Team team = 1 ;
22
- }
23
-
24
7
message Team {
25
8
// id is a UUID of the Team
26
9
string id = 1 ;
@@ -33,6 +16,9 @@ message Team {
33
16
34
17
// members are the team members of this Team
35
18
repeated TeamMember members = 4 ;
19
+
20
+ // team_invitation is the team invitation.
21
+ TeamInvitation team_invitation = 5 ;
36
22
}
37
23
38
24
message TeamMember {
@@ -54,3 +40,88 @@ enum TeamRole {
54
40
// TEAM_ROLE_MEMBER is a regular member of a team.
55
41
TEAM_ROLE_MEMBER = 2 ;
56
42
}
43
+
44
+ message TeamInvitation {
45
+ // id is the invitation ID.
46
+ string id = 1 ;
47
+ }
48
+
49
+ service TeamsService {
50
+
51
+ // CreateTeam creates a new Team.
52
+ rpc CreateTeam (CreateTeamRequest ) returns (CreateTeamResponse ) {};
53
+
54
+ // ListTeams lists the caller has access to.
55
+ rpc ListTeams (ListTeamsRequest ) returns (ListTeamsResponse ) {};
56
+
57
+ // JoinTeam makes the caller a TeamMember of the Team.
58
+ rpc JoinTeam (JoinTeamRequest ) returns (JoinTeamResponse ) {};
59
+
60
+ // ResetTeamInvitation resets the invitation_id for a Team.
61
+ rpc ResetTeamInvitation (ResetTeamInvitationRequest ) returns (ResetTeamInvitationResponse ) {};
62
+
63
+ // UpdateTeamMember updates team membership properties.
64
+ rpc UpdateTeamMember (UpdateTeamMemberRequest ) returns (UpdateTeamMemberResponse ) {};
65
+
66
+ // DeleteTeamMember removes a TeamMember from the Team.
67
+ rpc DeleteTeamMember (DeleteTeamMemberRequest ) returns (DeleteTeamMemberResponse ) {};
68
+ }
69
+
70
+ message CreateTeamRequest {
71
+ // name is the team name
72
+ string name = 1 ;
73
+ }
74
+
75
+ message CreateTeamResponse {
76
+ Team team = 1 ;
77
+ }
78
+
79
+ message ListTeamsRequest {
80
+ // TODO: pagination options
81
+ }
82
+
83
+ message ListTeamsResponse {
84
+ repeated Team teams = 1 ;
85
+ }
86
+
87
+ message JoinTeamRequest {
88
+ // invitation_id is the invitation ID for a Team
89
+ string invitation_id = 1 ;
90
+ }
91
+
92
+ message JoinTeamResponse {
93
+ // team is the team the user has just joined
94
+ Team team = 1 ;
95
+ }
96
+
97
+ message ResetTeamInvitationRequest {
98
+ string team_id = 1 ;
99
+ }
100
+
101
+ message ResetTeamInvitationResponse {
102
+ // team_invitation is the new invitation for the team.
103
+ TeamInvitation team_invitation = 1 ;
104
+ }
105
+
106
+ message UpdateTeamMemberRequest {
107
+ // team_id is the ID of the team in which the role is to be updated
108
+ string team_id = 1 ;
109
+
110
+ // team_member is the team member being updated.
111
+ TeamMember team_member = 2 ;
112
+
113
+ }
114
+
115
+ message UpdateTeamMemberResponse {
116
+ TeamMember team_member = 2 ;
117
+ }
118
+
119
+ message DeleteTeamMemberRequest {
120
+ // team_id is the ID of the team in which a member should be deleted.
121
+ string team_id = 1 ;
122
+
123
+ // team_member_id is the ID of the TeamMember that should be deleted from the team.
124
+ string team_member_id = 2 ;
125
+ }
126
+
127
+ message DeleteTeamMemberResponse {}
0 commit comments