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