Project import generated by Copybara.
GitOrigin-RevId: d9e9e3fb4e31372ec1fb43b178994ca78fa8fe70
diff --git a/api/v3/api_proto/frontend.proto b/api/v3/api_proto/frontend.proto
new file mode 100644
index 0000000..b6e8564
--- /dev/null
+++ b/api/v3/api_proto/frontend.proto
@@ -0,0 +1,85 @@
+// Copyright 2020 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.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "api/v3/api_proto/project_objects.proto";
+
+// ***DO NOT CALL rpcs IN THIS SERVICE.***
+// This service is for Monorail's frontend only.
+
+service Frontend {
+ // status: DO NOT USE
+ // Returns all project specific configurations needed for the SPA client.
+ //
+ // Raises:
+ // INVALID_ARGUMENT if the project resource name provided is invalid.
+ // NOT_FOUND if the parent project is not found.
+ // PERMISSION_DENIED if user is not allowed to view this project.
+ rpc GatherProjectEnvironment (GatherProjectEnvironmentRequest) returns (GatherProjectEnvironmentResponse) {};
+
+ // status: DO NOT USE
+ // Returns all of a given user's project memberships.
+ //
+ // Raises:
+ // NOT_FOUND if the user is not found.
+ // INVALID_ARGUMENT if the user resource name provided is invalid.
+ rpc GatherProjectMembershipsForUser (GatherProjectMembershipsForUserRequest)
+ returns (GatherProjectMembershipsForUserResponse) {}
+}
+
+
+// Request message for GatherProjectEnvironment
+// Next available tag: 2
+message GatherProjectEnvironmentRequest {
+ // The name of the project these config environments belong to.
+ string parent = 1 [
+ (google.api.resource_reference) = {type: "api.crbug.com/Project"},
+ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Response message for GatherProjectEnvironment
+// Next available tag: 9
+message GatherProjectEnvironmentResponse {
+ // Project definitions such as display_name and summary.
+ Project project = 1;
+ // Configurations of this project such as default search term,
+ // default templates for members and non members.
+ ProjectConfig project_config = 2;
+ // List of statuses that belong to this project.
+ repeated StatusDef statuses = 3;
+ // List of well known labels that belong to this project.
+ repeated LabelDef well_known_labels = 4;
+ // List of components that belong to this project.
+ repeated ComponentDef components = 5;
+ // List of custom fields that belong to this project.
+ repeated FieldDef fields = 6;
+ // List of approval fields that belong to this project.
+ repeated ApprovalDef approval_fields = 7;
+ // Saved search queries that admins defined for this project.
+ repeated ProjectSavedQuery saved_queries = 8;
+}
+
+// The request message for Frontend.GatherProjectMembershipsForUser.
+// Next available tag: 2
+message GatherProjectMembershipsForUserRequest {
+ // The name of the user to request.
+ string user = 1 [
+ (google.api.resource_reference) = {type: "api.crbug.com/User"}];
+}
+
+// The response message for Frontend.GatherProjectMembershipsForUser.
+// Next available tag: 2
+message GatherProjectMembershipsForUserResponse {
+ // The projects that the user is a member of.
+ repeated ProjectMember project_memberships = 1;
+}
\ No newline at end of file