Skip to content

[public-api] Define experimental TeamsService.CreateTeam protos #14151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions components/public-api/gitpod/experimental/v1/teams.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
syntax = "proto3";

package gitpod.experimental.v1;

option go_package = "github.com/gitpod-io/gitpod/public-api/experimental/v1";

message Team {
// id is a UUID of the Team
string id = 1;

// name is the name of the Team
string name = 2;

// slug is the short version of the Team name
string slug = 3;

// members are the team members of this Team
repeated TeamMember members = 4;

// team_invitation is the team invitation.
TeamInvitation team_invitation = 5;
}

message TeamMember {
// user_id is the identifier of the user
string user_id = 1;

// role is the role this member is assigned
TeamRole role = 2;
}

enum TeamRole {
// TEAM_ROLE_UNKNOWN is the unkwnon state.
TEAM_ROLE_UNSPECIFIED = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


// TEAM_ROLE_OWNER is the owner of the team.
// A team can have multiple owners, but there must always be at least one owner.
TEAM_ROLE_OWNER = 1;

// TEAM_ROLE_MEMBER is a regular member of a team.
TEAM_ROLE_MEMBER = 2;
}

message TeamInvitation {
// id is the invitation ID.
string id = 1;
}

service TeamsService {
// CreateTeam creates a new Team.
rpc CreateTeam(CreateTeamRequest) returns (CreateTeamResponse) {};
}

message CreateTeamRequest {
// name is the team name
string name = 1;
}

message CreateTeamResponse {
Team team = 1;
}
Loading