Skip to content

Commit e0dddc3

Browse files
committed
[public-api] Define TeamService.CreateTeam protos
1 parent 7a5f156 commit e0dddc3

File tree

6 files changed

+986
-0
lines changed

6 files changed

+986
-0
lines changed
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
syntax = "proto3";
2+
3+
package gitpod.experimental.v1;
4+
5+
option go_package = "github.com/gitpod-io/gitpod/public-api/experimental/v1";
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+
message Team {
25+
// id is a UUID of the Team
26+
string id = 1;
27+
28+
// name is the name of the Team
29+
string name = 2;
30+
31+
// slug is the short version of the Team name
32+
string slug = 3;
33+
34+
// members are the team members of this Team
35+
repeated TeamMember members = 4;
36+
}
37+
38+
message TeamMember {
39+
// user_id is the identifier of the user
40+
string user_id = 1;
41+
42+
// role is the role this member is assigned
43+
TeamRole role = 2;
44+
}
45+
46+
enum TeamRole {
47+
// TEAM_ROLE_UNKNOWN is the unkwnon state.
48+
TEAM_ROLE_UNSPECIFIED = 0;
49+
50+
// TEAM_ROLE_OWNER is the owner of the team.
51+
// A team can have multiple owners, but there must always be at least one owner.
52+
TEAM_ROLE_OWNER = 1;
53+
54+
// TEAM_ROLE_MEMBER is a regular member of a team.
55+
TEAM_ROLE_MEMBER = 2;
56+
}

0 commit comments

Comments
 (0)