Skip to content

Commit e84bd1f

Browse files
easyCZroboquat
authored andcommitted
[public-api] Define TeamService.CreateTeam protos
1 parent 8accb14 commit e84bd1f

File tree

6 files changed

+1116
-0
lines changed

6 files changed

+1116
-0
lines changed
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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+
message Team {
8+
// id is a UUID of the Team
9+
string id = 1;
10+
11+
// name is the name of the Team
12+
string name = 2;
13+
14+
// slug is the short version of the Team name
15+
string slug = 3;
16+
17+
// members are the team members of this Team
18+
repeated TeamMember members = 4;
19+
20+
// team_invitation is the team invitation.
21+
TeamInvitation team_invitation = 5;
22+
}
23+
24+
message TeamMember {
25+
// user_id is the identifier of the user
26+
string user_id = 1;
27+
28+
// role is the role this member is assigned
29+
TeamRole role = 2;
30+
}
31+
32+
enum TeamRole {
33+
// TEAM_ROLE_UNKNOWN is the unkwnon state.
34+
TEAM_ROLE_UNSPECIFIED = 0;
35+
36+
// TEAM_ROLE_OWNER is the owner of the team.
37+
// A team can have multiple owners, but there must always be at least one owner.
38+
TEAM_ROLE_OWNER = 1;
39+
40+
// TEAM_ROLE_MEMBER is a regular member of a team.
41+
TEAM_ROLE_MEMBER = 2;
42+
}
43+
44+
message TeamInvitation {
45+
// id is the invitation ID.
46+
string id = 1;
47+
}
48+
49+
service TeamsService {
50+
// CreateTeam creates a new Team.
51+
rpc CreateTeam(CreateTeamRequest) returns (CreateTeamResponse) {};
52+
}
53+
54+
message CreateTeamRequest {
55+
// name is the team name
56+
string name = 1;
57+
}
58+
59+
message CreateTeamResponse {
60+
Team team = 1;
61+
}

0 commit comments

Comments
 (0)