go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/internal/bugs/monorail/api_proto/frontend.proto (about)

     1  // 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.
     4  
     5  syntax = "proto3";
     6  
     7  package monorail.v3;
     8  
     9  option go_package = "go.chromium.org/luci/analysis/internal/bugs/monorail/api_proto";
    10  
    11  import "google/api/field_behavior.proto";
    12  import "google/api/resource.proto";
    13  import "go.chromium.org/luci/analysis/internal/bugs/monorail/api_proto/project_objects.proto";
    14  
    15  // ***DO NOT CALL rpcs IN THIS SERVICE.***
    16  // This service is for Monorail's frontend only.
    17  
    18  service 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
    41  message 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
    51  message 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
    73  message 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
    81  message GatherProjectMembershipsForUserResponse {
    82    // The projects that the user is a member of.
    83    repeated ProjectMember project_memberships = 1;
    84  }