| // Copyright 2018 The Chromium Authors. All rights reserved. |
| // Use of this source code is govered 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; |
| |
| import "google/protobuf/empty.proto"; |
| import "google/protobuf/wrappers.proto"; |
| import "api/api_proto/common.proto"; |
| import "api/api_proto/issue_objects.proto"; |
| |
| |
| service Issues { |
| rpc CreateIssue (CreateIssueRequest) returns (IssueResponse) {} |
| rpc GetIssue (GetIssueRequest) returns (IssueResponse) {} |
| rpc ListReferencedIssues(ListReferencedIssuesRequest) returns (ListReferencedIssuesResponse) {} |
| rpc UpdateIssue (UpdateIssueRequest) returns (IssueResponse) {} |
| rpc StarIssue (StarIssueRequest) returns (StarIssueResponse) {} |
| rpc IsIssueStarred (IsIssueStarredRequest) returns (IsIssueStarredResponse) {} |
| // There is no CreateComment method because comments are created by updates, |
| // which may have just comment content and no delta. |
| // There is no GetComment method, clients should use ListComments. |
| rpc ListComments (ListCommentsRequest) returns (ListCommentsResponse) {} |
| rpc ListActivities (ListActivitiesRequest) returns (ListActivitiesResponse) {} |
| rpc DeleteComment (DeleteCommentRequest) returns (google.protobuf.Empty) {} |
| rpc UpdateApproval (UpdateApprovalRequest) |
| returns (UpdateApprovalResponse) {} |
| rpc IssueSnapshot (IssueSnapshotRequest) returns (IssueSnapshotResponse) {} |
| } |
| |
| |
| // Next available tag: 3 |
| message AttachmentUpload { |
| string filename = 1; |
| bytes content = 2; |
| } |
| |
| |
| // Next available tag: 4 |
| message CreateIssueRequest { |
| RequestTrace trace = 1; |
| string project_name = 2; |
| Issue issue = 3; |
| } |
| |
| |
| // Next available tag: 3 |
| message GetIssueRequest { |
| RequestTrace trace = 1; |
| IssueRef issue_ref = 2; |
| } |
| |
| |
| // Next available tag: 2 |
| message IssueResponse { |
| Issue issue = 1; |
| } |
| |
| |
| // Next available tag: 3 |
| message ListReferencedIssuesRequest { |
| RequestTrace trace = 1; |
| repeated IssueRef issue_refs = 2; |
| } |
| |
| |
| // Next available tag: 2 |
| message ListReferencedIssuesResponse { |
| repeated IssueRef open_refs = 1; |
| repeated IssueRef closed_refs = 2; |
| } |
| |
| |
| // Next available tag: 8 |
| message UpdateIssueRequest { |
| RequestTrace trace = 1; |
| IssueRef issue_ref = 2; |
| bool send_email = 3; |
| IssueDelta delta = 4; |
| string comment_content = 5; |
| bool is_description = 6; |
| repeated AttachmentUpload uploads = 7; |
| } |
| |
| |
| // Next available tag: 4 |
| message StarIssueRequest { |
| RequestTrace trace = 1; |
| IssueRef issue_ref = 2; |
| bool starred = 3; // True to add a star, False to remove one. |
| } |
| |
| |
| // Next available tag: 2 |
| message StarIssueResponse { |
| uint32 star_count = 1; |
| } |
| |
| |
| // Next available tag: 3 |
| message IsIssueStarredRequest { |
| RequestTrace trace = 1; |
| IssueRef issue_ref = 2; |
| } |
| |
| |
| // Next available tag: 2 |
| message IsIssueStarredResponse { |
| bool is_starred = 1; |
| } |
| |
| |
| // Next available tag: 3 |
| message ListCommentsRequest { |
| RequestTrace trace = 1; |
| IssueRef issue_ref = 2; |
| } |
| |
| |
| // Next available tag: 2 |
| message ListCommentsResponse { |
| // Comments are in chronological order. The list of comments may |
| // include deleted, spam, and description comments. Spam and |
| // deleted comments will only have content supplied if the user is |
| // allowed to see it. |
| repeated Comment comments = 1; |
| } |
| |
| |
| // Next available tag: 5 |
| message ListActivitiesRequest { |
| // TODO(tyreej) description |
| RequestTrace trace = 1; |
| UserRef user_ref = 2; |
| fixed32 before = 3; |
| fixed32 after = 4; |
| } |
| |
| // Next available tag: 3 |
| message ListActivitiesResponse { |
| // TODO(tyreej) description |
| repeated Comment comments = 1; |
| repeated IssueSummary issue_summaries = 2; |
| } |
| |
| |
| // Next available tag: 5 |
| message DeleteCommentRequest { |
| RequestTrace trace = 1; |
| IssueRef issue_ref = 2; |
| int64 sequence_num = 3; |
| bool delete = 4; // True to delete, False to undelete. |
| } |
| |
| |
| // Next available tag: 18 |
| message IssueDelta { |
| // Note: We use StringValue instead of string so that we can |
| // check if delta.HasField('status'). Proto3 only allows that |
| // for nested messages and provides "boxed" values for this purpose. |
| // In JSON, a StringValue is represented as a simple string. |
| google.protobuf.StringValue status = 1; |
| UserRef owner_ref = 2; |
| repeated UserRef cc_refs_add = 3; |
| repeated UserRef cc_refs_remove = 4; |
| repeated ComponentRef comp_refs_add = 5; |
| repeated ComponentRef comp_refs_remove = 6; |
| repeated LabelRef label_refs_add = 7; |
| repeated LabelRef label_refs_remove = 8; |
| repeated FieldValue field_vals_add = 9; |
| repeated FieldValue field_vals_remove = 10; |
| repeated FieldRef fields_clear = 11; |
| repeated IssueRef blocked_on_refs_add = 12; |
| repeated IssueRef blocked_on_refs_remove = 13; |
| repeated IssueRef blocking_refs_add = 14; |
| repeated IssueRef blocking_refs_remove = 15; |
| IssueRef merged_into_ref = 16; |
| google.protobuf.StringValue summary = 17; |
| } |
| |
| |
| // Next available tag: 8 |
| message UpdateApprovalRequest { |
| RequestTrace trace = 1; |
| IssueRef issue_ref = 2; |
| FieldRef field_ref = 3; |
| ApprovalDelta approval_delta = 4; |
| string comment_content = 5; |
| bool send_email = 6; |
| bool is_description = 7; |
| } |
| |
| |
| // Next available tag: 7 |
| message ApprovalDelta { |
| ApprovalStatus status = 1; |
| repeated UserRef approver_refs_add = 2; |
| repeated UserRef approver_refs_remove = 3; |
| repeated FieldValue field_vals_add = 4; |
| repeated FieldValue field_vals_remove = 5; |
| repeated FieldRef fields_clear = 6; |
| } |
| |
| |
| // Next available tag: 2 |
| message UpdateApprovalResponse { |
| Approval approval = 1; |
| // TODO(jojwang): monorail:3895, add new_comment field. |
| } |
| |
| // Next available tag: 8 |
| message IssueSnapshotRequest { |
| RequestTrace trace = 1; |
| int32 timestamp = 2; |
| string query = 3; |
| int32 canned_query = 4; |
| string group_by = 5; |
| string label_prefix = 6; |
| string project_name = 7; |
| } |
| |
| // Next available tag: 3 |
| message IssueSnapshotCount { |
| string dimension = 1; |
| int32 count = 2; |
| } |
| |
| // Next available tag: 3 |
| message IssueSnapshotResponse { |
| repeated IssueSnapshotCount snapshot_count = 1; |
| repeated string unsupported_field = 2; |
| } |