blob: 56248dd0e42787b95283f995a84099271e3827ec [file] [log] [blame]
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +01001// Copyright 2018 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
7
8package monorail;
9
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020010option go_package = "infra/monorailv2/api/api_proto;monorail";
11
Copybara854996b2021-09-07 19:36:02 +000012import "api/api_proto/common.proto";
13import "api/api_proto/project_objects.proto";
14
15
16service Projects {
17 rpc ListProjects (ListProjectsRequest) returns (ListProjectsResponse) {}
18 rpc ListProjectTemplates (ListProjectTemplatesRequest) returns (ListProjectTemplatesResponse) {}
19 rpc GetConfig (GetConfigRequest) returns (Config) {}
20 rpc GetPresentationConfig (GetPresentationConfigRequest) returns (PresentationConfig) {}
21 rpc GetCustomPermissions (GetCustomPermissionsRequest) returns (GetCustomPermissionsResponse) {}
22 rpc GetVisibleMembers (GetVisibleMembersRequest) returns (GetVisibleMembersResponse) {}
23 rpc GetLabelOptions (GetLabelOptionsRequest) returns (GetLabelOptionsResponse) {}
24 rpc ListStatuses (ListStatusesRequest) returns (ListStatusesResponse) {}
25 rpc ListComponents (ListComponentsRequest) returns (ListComponentsResponse) {}
26 rpc ListFields (ListFieldsRequest) returns (ListFieldsResponse) {}
27 rpc GetProjectStarCount (GetProjectStarCountRequest) returns (GetProjectStarCountResponse) {}
28 rpc StarProject (StarProjectRequest) returns (StarProjectResponse) {}
29 rpc CheckProjectName (CheckProjectNameRequest) returns (CheckProjectNameResponse) {}
30 rpc CheckComponentName (CheckComponentNameRequest) returns (CheckComponentNameResponse) {}
31 rpc CheckFieldName (CheckFieldNameRequest) returns (CheckFieldNameResponse) {}
32}
33
34
35// Next available tag: 3
36message ListProjectsRequest {
37 int32 page_size = 1;
38 string page_token = 2;
39}
40
41
42// Next available tag: 3
43message ListProjectsResponse {
44 repeated Project projects = 1;
45 string next_page_token = 2;
46}
47
48
49// Next available tag: 3
50message ListProjectTemplatesRequest {
51 string project_name = 2;
52}
53
54
55// Next available tag: 2
56message ListProjectTemplatesResponse {
57 repeated TemplateDef templates = 1;
58}
59
60
61// Next available tag: 3
62message GetConfigRequest {
63 string project_name = 2;
64}
65
66// Next available tag: 3
67message GetPresentationConfigRequest {
68 string project_name = 2;
69}
70
71
72// Next available tag: 3
73message GetCustomPermissionsRequest {
74 string project_name = 2;
75}
76
77
78// Next available tag: 2
79message GetCustomPermissionsResponse {
80 repeated string permissions = 1;
81}
82
83
84// Next available tag: 3
85message GetVisibleMembersRequest {
86 string project_name = 2;
87}
88
89
90// Next available tag: 3
91message GetVisibleMembersResponse {
92 repeated UserRef user_refs = 1;
93 repeated UserRef group_refs = 2;
94}
95
96
97// Next available tag: 3
98message GetLabelOptionsRequest {
99 string project_name = 2;
100}
101
102
103// Next available tag: 3
104message GetLabelOptionsResponse {
105 repeated LabelDef label_options = 1;
106 repeated string exclusive_label_prefixes = 2;
107}
108
109
110// Next available tag: 3
111message ListStatusesRequest {
112 string project_name = 2;
113}
114
115
116// Next available tag: 4
117message ListStatusesResponse {
118 repeated StatusDef status_defs = 1;
119 repeated StatusRef statuses_offer_merge = 2;
120 bool restrict_to_known = 3;
121}
122
123
124// Next available tag: 4
125message ListComponentsRequest {
126 string project_name = 2;
127 bool include_admin_info = 3;
128}
129
130
131// Next available tag: 2
132message ListComponentsResponse {
133 repeated ComponentDef component_defs = 1;
134}
135
136
137// Next available tag: 5
138message ListFieldsRequest {
139 string project_name = 2;
140 bool include_admin_info = 3;
141 bool include_user_choices = 4;
142}
143
144
145// Next available tag: 2
146message ListFieldsResponse {
147 repeated FieldDef field_defs = 1;
148}
149
150
151// Next available tag: 3
152message GetProjectStarCountRequest {
153 string project_name = 2;
154}
155
156
157// Next available tag: 2
158message GetProjectStarCountResponse {
159 uint32 star_count = 1;
160}
161
162
163// Next available tag: 3
164message StarProjectRequest {
165 string project_name = 2;
166 bool starred = 3;
167}
168
169
170// Next available tag: 2
171message StarProjectResponse {
172 uint32 star_count = 1;
173}
174
175
176// Next available tag: 3
177message CheckProjectNameRequest {
178 string project_name = 2;
179}
180
181
182// Next available tag: 1
183message CheckProjectNameResponse {
184 string error = 1;
185}
186
187
188// Next available tag: 5
189message CheckComponentNameRequest {
190 string project_name = 2;
191 string parent_path = 3;
192 string component_name = 4;
193}
194
195
196// Next available tag: 2
197message CheckComponentNameResponse {
198 string error = 1;
199}
200
201
202// Next available tag: 4
203message CheckFieldNameRequest {
204 string project_name = 2;
205 string field_name = 3;
206}
207
208
209// Next available tag: 2
210message CheckFieldNameResponse {
211 string error = 1;
212}