blob: f94e3a4cd2c98ba0338b3fd593e2045ee06b994c [file] [log] [blame]
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +01001// Copyright 2020 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.v3;
8
Adrià Vilanova Martínezac4a6442022-05-15 19:05:13 +02009option go_package = "infra/monorailv2/api/v3/api_proto";
Copybara854996b2021-09-07 19:36:02 +000010
11import "google/api/field_behavior.proto";
12import "google/api/resource.proto";
13import "api/v3/api_proto/project_objects.proto";
14
15// ***DO NOT CALL rpcs IN THIS SERVICE.***
16// This service is for Monorail's frontend only.
17
18service Frontend {
19 // status: DO NOT USE
20 // Returns all project specific configurations needed for the SPA client.
21 //
22 // Raises:
23 // INVALID_ARGUMENT if the project resource name provided is invalid.
24 // NOT_FOUND if the parent project is not found.
25 // PERMISSION_DENIED if user is not allowed to view this project.
26 rpc GatherProjectEnvironment (GatherProjectEnvironmentRequest) returns (GatherProjectEnvironmentResponse) {};
27
28 // status: DO NOT USE
29 // Returns all of a given user's project memberships.
30 //
31 // Raises:
32 // NOT_FOUND if the user is not found.
33 // INVALID_ARGUMENT if the user resource name provided is invalid.
34 rpc GatherProjectMembershipsForUser (GatherProjectMembershipsForUserRequest)
35 returns (GatherProjectMembershipsForUserResponse) {}
36}
37
38
39// Request message for GatherProjectEnvironment
40// Next available tag: 2
41message GatherProjectEnvironmentRequest {
42 // The name of the project these config environments belong to.
43 string parent = 1 [
44 (google.api.resource_reference) = {type: "api.crbug.com/Project"},
45 (google.api.field_behavior) = REQUIRED ];
46}
47
48
49// Response message for GatherProjectEnvironment
50// Next available tag: 9
51message GatherProjectEnvironmentResponse {
52 // Project definitions such as display_name and summary.
53 Project project = 1;
54 // Configurations of this project such as default search term,
55 // default templates for members and non members.
56 ProjectConfig project_config = 2;
57 // List of statuses that belong to this project.
58 repeated StatusDef statuses = 3;
59 // List of well known labels that belong to this project.
60 repeated LabelDef well_known_labels = 4;
61 // List of components that belong to this project.
62 repeated ComponentDef components = 5;
63 // List of custom fields that belong to this project.
64 repeated FieldDef fields = 6;
65 // List of approval fields that belong to this project.
66 repeated ApprovalDef approval_fields = 7;
67 // Saved search queries that admins defined for this project.
68 repeated ProjectSavedQuery saved_queries = 8;
69}
70
71// The request message for Frontend.GatherProjectMembershipsForUser.
72// Next available tag: 2
73message GatherProjectMembershipsForUserRequest {
74 // The name of the user to request.
75 string user = 1 [
76 (google.api.resource_reference) = {type: "api.crbug.com/User"}];
77}
78
79// The response message for Frontend.GatherProjectMembershipsForUser.
80// Next available tag: 2
81message GatherProjectMembershipsForUserResponse {
82 // The projects that the user is a member of.
83 repeated ProjectMember project_memberships = 1;
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +010084}