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