You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ws-users.proto 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. // SonarQube, open source software quality management tool.
  2. // Copyright (C) 2008-2016 SonarSource
  3. // mailto:contact AT sonarsource DOT com
  4. //
  5. // SonarQube is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU Lesser General Public
  7. // License as published by the Free Software Foundation; either
  8. // version 3 of the License, or (at your option) any later version.
  9. //
  10. // SonarQube is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with this program; if not, write to the Free Software Foundation,
  17. // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. syntax = "proto2";
  19. package sonarqube.ws.users;
  20. import "ws-commons.proto";
  21. option java_package = "org.sonarqube.ws";
  22. option java_outer_classname = "Users";
  23. option optimize_for = SPEED;
  24. // WS api/users/search
  25. message SearchWsResponse {
  26. optional sonarqube.ws.commons.Paging paging = 1;
  27. repeated User users = 2;
  28. message User {
  29. optional string login = 1;
  30. optional string name = 2;
  31. optional bool active = 3;
  32. optional string email = 4;
  33. optional ScmAccounts scmAccounts = 5;
  34. optional Groups groups = 6;
  35. optional int32 tokensCount = 7;
  36. optional bool local = 8;
  37. optional string externalIdentity = 9;
  38. optional string externalProvider = 10;
  39. optional string avatar = 11;
  40. }
  41. message Groups {
  42. repeated string groups = 1;
  43. }
  44. message ScmAccounts {
  45. repeated string scmAccounts = 1;
  46. }
  47. }
  48. // WS api/users/identity_providers
  49. message IdentityProvidersWsResponse {
  50. repeated IdentityProvider identityProviders = 1;
  51. }
  52. message IdentityProvider {
  53. optional string key = 1;
  54. optional string name = 2;
  55. optional string iconPath = 3;
  56. optional string backgroundColor = 4;
  57. optional string helpMessage = 5;
  58. }
  59. message CreateWsResponse {
  60. optional User user = 1;
  61. message User {
  62. optional string login = 1;
  63. optional string name = 2;
  64. optional string email = 3;
  65. repeated string scmAccounts = 4;
  66. optional bool active = 5;
  67. optional bool local = 6;
  68. }
  69. }
  70. // WS api/users/groups
  71. message GroupsWsResponse {
  72. optional sonarqube.ws.commons.Paging paging = 1;
  73. repeated Group groups = 2;
  74. message Group {
  75. optional int64 id = 1;
  76. optional string name = 2;
  77. optional string description = 3;
  78. optional bool selected = 4;
  79. optional bool default = 5;
  80. }
  81. }
  82. // WS api/users/current
  83. message CurrentWsResponse {
  84. optional bool isLoggedIn = 1;
  85. optional string login = 2;
  86. optional string name = 3;
  87. optional string email = 4;
  88. optional bool local = 5;
  89. optional string externalIdentity = 6;
  90. optional string externalProvider = 7;
  91. repeated string scmAccounts = 8;
  92. repeated string groups = 9;
  93. optional Permissions permissions = 10;
  94. optional bool showOnboardingTutorial = 11;
  95. optional string avatar = 12;
  96. optional Homepage homepage = 13;
  97. optional string personalOrganization = 14;
  98. message Permissions {
  99. repeated string global = 1;
  100. }
  101. enum HomepageType {
  102. PROJECT = 1;
  103. ORGANIZATION = 2;
  104. MY_PROJECTS = 3;
  105. MY_ISSUES = 4;
  106. PROJECTS = 5;
  107. ISSUES = 6;
  108. PORTFOLIO = 7;
  109. PORTFOLIOS = 8;
  110. APPLICATION = 9;
  111. }
  112. message Homepage {
  113. optional HomepageType type = 1;
  114. optional string component = 2;
  115. optional string organization = 3;
  116. optional string branch = 4;
  117. }
  118. }