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