diff options
Diffstat (limited to 'sonar-ws/src/main/protobuf/ws-users.proto')
-rw-r--r-- | sonar-ws/src/main/protobuf/ws-users.proto | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/sonar-ws/src/main/protobuf/ws-users.proto b/sonar-ws/src/main/protobuf/ws-users.proto new file mode 100644 index 00000000000..474b2a870bf --- /dev/null +++ b/sonar-ws/src/main/protobuf/ws-users.proto @@ -0,0 +1,116 @@ +// SonarQube, open source software quality management tool. +// Copyright (C) 2008-2016 SonarSource +// mailto:contact AT sonarsource DOT com +// +// SonarQube is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// SonarQube is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +syntax = "proto2"; + +package sonarqube.ws.users; + +import "ws-commons.proto"; + +option java_package = "org.sonarqube.ws"; +option java_outer_classname = "Users"; +option optimize_for = SPEED; + +// WS api/users/search +message SearchWsResponse { + optional sonarqube.ws.commons.Paging paging = 1; + repeated User users = 2; + + message User { + optional string login = 1; + optional string name = 2; + optional bool active = 3; + optional string email = 4; + optional ScmAccounts scmAccounts = 5; + optional Groups groups = 6; + optional int32 tokensCount = 7; + optional bool local = 8; + optional string externalIdentity = 9; + optional string externalProvider = 10; + optional string avatar = 11; + } + + message Groups { + repeated string groups = 1; + } + + message ScmAccounts { + repeated string scmAccounts = 1; + } +} + +// WS api/users/identity_providers +message IdentityProvidersWsResponse { + repeated IdentityProvider identityProviders = 1; +} + +message IdentityProvider { + optional string key = 1; + optional string name = 2; + optional string iconPath = 3; + optional string backgroundColor = 4; +} + +message CreateWsResponse { + optional User user = 1; + + message User { + optional string login = 1; + optional string name = 2; + optional string email = 3; + repeated string scmAccounts = 4; + optional bool active = 5; + optional bool local = 6; + } +} + +// WS api/users/groups +message GroupsWsResponse { + optional sonarqube.ws.commons.Paging paging = 1; + repeated Group groups = 2; + + message Group { + optional int64 id = 1; + optional string name = 2; + optional string description = 3; + optional bool selected = 4; + optional bool default = 5; + } +} + +// WS api/users/current +message CurrentWsResponse { + optional bool isLoggedIn = 1; + optional string login = 2; + optional string name = 3; + optional string email = 4; + optional bool local = 5; + optional string externalIdentity = 6; + optional string externalProvider = 7; + repeated string scmAccounts = 8; + repeated string groups = 9; + optional Permissions permissions = 10; + optional bool showOnboardingTutorial = 11; + optional string avatar = 12; + + message Permissions { + repeated string global = 1; + } +} + + |