blob: 574dccd8ba004d5812f831f25ea1ee9aeb6f7608 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
syntax = "proto3";
package monorail;
import "api/api_proto/user_objects.proto";
import "api/api_proto/common.proto";
service Users {
rpc GetUser (GetUserRequest) returns (User) {}
rpc ListReferencedUsers (ListReferencedUsersRequest) returns (ListReferencedUsersResponse) {}
rpc GetMemberships (GetMembershipsRequest) returns (GetMembershipsResponse) {}
rpc GetSavedQueries (GetSavedQueriesRequest) returns (GetSavedQueriesResponse) {}
rpc GetUserStarCount (GetUserStarCountRequest) returns (GetUserStarCountResponse) {}
rpc StarUser (StarUserRequest) returns (StarUserResponse) {}
rpc GetUserPrefs (GetUserPrefsRequest) returns (GetUserPrefsResponse) {}
rpc SetUserPrefs (SetUserPrefsRequest) returns (SetUserPrefsResponse) {}
// TODO(jrobbins): Merge this into SetUserPrefs.
rpc SetExpandPermsPreference (SetExpandPermsPreferenceRequest) returns (SetExpandPermsPreferenceResponse) {}
rpc InviteLinkedParent (InviteLinkedParentRequest) returns (InviteLinkedParentResponse) {}
rpc AcceptLinkedChild (AcceptLinkedChildRequest) returns (AcceptLinkedChildResponse) {}
rpc UnlinkAccounts (UnlinkAccountsRequest) returns (UnlinkAccountsResponse) {}
rpc GetUsersProjects (GetUsersProjectsRequest) returns (GetUsersProjectsResponse) {}
rpc ExpungeUser (ExpungeUserRequest) returns (ExpungeUserResponse) {}
}
// Next available tag: 4
message ListReferencedUsersRequest {
// emails is deprecated. Use user_refs instead.
repeated string emails = 2;
repeated UserRef user_refs = 3;
}
message ListReferencedUsersResponse {
repeated User users = 1;
}
// Next available tag: 3
message GetUserRequest {
UserRef user_ref = 2;
}
// Next available tag: 3
message GetMembershipsRequest {
UserRef user_ref = 2;
}
// Next available tag: 2
message GetMembershipsResponse {
repeated UserRef group_refs = 1;
}
// Next available tag: 3
message GetSavedQueriesRequest {
UserRef user_ref = 2;
}
// Next available tag: 2
message GetSavedQueriesResponse {
repeated SavedQuery saved_queries = 1;
}
// Next available tag: 3
message GetUserStarCountRequest {
UserRef user_ref = 2;
}
// Next available tag: 2
message GetUserStarCountResponse {
uint32 star_count = 1;
}
// Next available tag: 4
message StarUserRequest {
UserRef user_ref = 2;
bool starred = 3;
}
// Next available tag: 2
message StarUserResponse {
uint32 star_count = 1;
}
// Next available tag: 3
message SetExpandPermsPreferenceRequest {
bool expand_perms = 2;
}
// Next available tag: 1
message SetExpandPermsPreferenceResponse {
}
// Next available tag: 3
message GetUserPrefsRequest {
// Site admins may get prefs for specific users. Otherwise, it gets
// prefs for the signed-in user.
UserRef user_ref = 2;
}
// Next available tag: 2
message GetUserPrefsResponse {
repeated UserPrefValue prefs = 1;
}
// Next available tag: 5
message SetUserPrefsRequest {
// Site admins may set prefs for specific users. Otherwise, it sets
// prefs for the signed-in user.
UserRef user_ref = 2;
// The given prefs add to or overwrite current user prefs.
repeated UserPrefValue prefs = 3;
}
// Next available tag: 1
message SetUserPrefsResponse {
}
// Next available tag: 3
message InviteLinkedParentRequest {
string email = 2;
}
// Next available tag: 1
message InviteLinkedParentResponse {
}
// Next available tag: 3
message AcceptLinkedChildRequest {
string email = 2;
}
// Next available tag: 1
message AcceptLinkedChildResponse {
}
// Next available tag: 4
message UnlinkAccountsRequest {
UserRef parent = 2;
UserRef child = 3;
}
// Next available tag: 1
message UnlinkAccountsResponse {
}
// Next available tag: 2
message GetUsersProjectsRequest {
repeated UserRef user_refs = 1;
}
// Next available tag: 5
message GetUsersProjectsResponse {
repeated UserProjects users_projects = 1;
}
// Next available tag: 2
message ExpungeUserRequest {
string email = 1;
}
// Next available tag: 1
message ExpungeUserResponse {
}