blob: 574dccd8ba004d5812f831f25ea1ee9aeb6f7608 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file or at
4// https://developers.google.com/open-source/licenses/bsd
5
6syntax = "proto3";
7
8package monorail;
9
10import "api/api_proto/user_objects.proto";
11import "api/api_proto/common.proto";
12
13service Users {
14 rpc GetUser (GetUserRequest) returns (User) {}
15 rpc ListReferencedUsers (ListReferencedUsersRequest) returns (ListReferencedUsersResponse) {}
16 rpc GetMemberships (GetMembershipsRequest) returns (GetMembershipsResponse) {}
17 rpc GetSavedQueries (GetSavedQueriesRequest) returns (GetSavedQueriesResponse) {}
18 rpc GetUserStarCount (GetUserStarCountRequest) returns (GetUserStarCountResponse) {}
19 rpc StarUser (StarUserRequest) returns (StarUserResponse) {}
20 rpc GetUserPrefs (GetUserPrefsRequest) returns (GetUserPrefsResponse) {}
21 rpc SetUserPrefs (SetUserPrefsRequest) returns (SetUserPrefsResponse) {}
22 // TODO(jrobbins): Merge this into SetUserPrefs.
23 rpc SetExpandPermsPreference (SetExpandPermsPreferenceRequest) returns (SetExpandPermsPreferenceResponse) {}
24 rpc InviteLinkedParent (InviteLinkedParentRequest) returns (InviteLinkedParentResponse) {}
25 rpc AcceptLinkedChild (AcceptLinkedChildRequest) returns (AcceptLinkedChildResponse) {}
26 rpc UnlinkAccounts (UnlinkAccountsRequest) returns (UnlinkAccountsResponse) {}
27 rpc GetUsersProjects (GetUsersProjectsRequest) returns (GetUsersProjectsResponse) {}
28 rpc ExpungeUser (ExpungeUserRequest) returns (ExpungeUserResponse) {}
29}
30
31
32// Next available tag: 4
33message ListReferencedUsersRequest {
34 // emails is deprecated. Use user_refs instead.
35 repeated string emails = 2;
36 repeated UserRef user_refs = 3;
37}
38
39
40message ListReferencedUsersResponse {
41 repeated User users = 1;
42}
43
44
45// Next available tag: 3
46message GetUserRequest {
47 UserRef user_ref = 2;
48}
49
50
51// Next available tag: 3
52message GetMembershipsRequest {
53 UserRef user_ref = 2;
54}
55
56
57// Next available tag: 2
58message GetMembershipsResponse {
59 repeated UserRef group_refs = 1;
60}
61
62
63// Next available tag: 3
64message GetSavedQueriesRequest {
65 UserRef user_ref = 2;
66}
67
68
69// Next available tag: 2
70message GetSavedQueriesResponse {
71 repeated SavedQuery saved_queries = 1;
72}
73
74// Next available tag: 3
75message GetUserStarCountRequest {
76 UserRef user_ref = 2;
77}
78
79
80// Next available tag: 2
81message GetUserStarCountResponse {
82 uint32 star_count = 1;
83}
84
85
86// Next available tag: 4
87message StarUserRequest {
88 UserRef user_ref = 2;
89 bool starred = 3;
90}
91
92
93// Next available tag: 2
94message StarUserResponse {
95 uint32 star_count = 1;
96}
97
98
99// Next available tag: 3
100message SetExpandPermsPreferenceRequest {
101 bool expand_perms = 2;
102}
103
104
105// Next available tag: 1
106message SetExpandPermsPreferenceResponse {
107}
108
109
110// Next available tag: 3
111message GetUserPrefsRequest {
112 // Site admins may get prefs for specific users. Otherwise, it gets
113 // prefs for the signed-in user.
114 UserRef user_ref = 2;
115}
116
117
118// Next available tag: 2
119message GetUserPrefsResponse {
120 repeated UserPrefValue prefs = 1;
121}
122
123
124// Next available tag: 5
125message SetUserPrefsRequest {
126 // Site admins may set prefs for specific users. Otherwise, it sets
127 // prefs for the signed-in user.
128 UserRef user_ref = 2;
129 // The given prefs add to or overwrite current user prefs.
130 repeated UserPrefValue prefs = 3;
131}
132
133
134// Next available tag: 1
135message SetUserPrefsResponse {
136}
137
138
139// Next available tag: 3
140message InviteLinkedParentRequest {
141 string email = 2;
142}
143
144
145// Next available tag: 1
146message InviteLinkedParentResponse {
147}
148
149
150// Next available tag: 3
151message AcceptLinkedChildRequest {
152 string email = 2;
153}
154
155
156// Next available tag: 1
157message AcceptLinkedChildResponse {
158}
159
160
161// Next available tag: 4
162message UnlinkAccountsRequest {
163 UserRef parent = 2;
164 UserRef child = 3;
165}
166
167
168// Next available tag: 1
169message UnlinkAccountsResponse {
170}
171
172
173// Next available tag: 2
174message GetUsersProjectsRequest {
175 repeated UserRef user_refs = 1;
176}
177
178
179// Next available tag: 5
180message GetUsersProjectsResponse {
181 repeated UserProjects users_projects = 1;
182}
183
184
185// Next available tag: 2
186message ExpungeUserRequest {
187 string email = 1;
188}
189
190
191// Next available tag: 1
192message ExpungeUserResponse {
193}