1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Messages containing configuration of Feedback Service 6 // that control classification and processing of submitted feedbacks. 7 8 syntax = "proto2"; 9 10 option optimize_for = LITE_RUNTIME; 11 12 package userfeedback; 13 14 // Product for which feedback can be sent: GMail, Writely etc. 15 message Product { 16 required int32 id = 1; 17 18 required string name = 2; 19 20 repeated string owner = 3; 21 }; 22 23 // Contains information needed to check whether particular 24 // feedback type applies to the page user is browsing and forward 25 // it's execution to a specific handler. It also carries information 26 // about the creator. 27 // TODO(morgwai): design new structure of Type with fields relevant 28 // for android, web, selenium grouped into submessages. 29 message FeedbackTypeData { 30 // index of feedback type as found in database 31 required int32 id = 1; 32 33 // Specifies whether this feedback type is currently enabled and 34 // feedback of this type can be submitted. 35 required bool enabled = 2; 36 37 // Problem name of this feedback type on Google Feedback pages. 38 required string problem_name = 3; 39 40 // Name of the product to which this feedback type belongs. 41 optional string product_name = 4; 42 43 // Tag 5 is used by some legacy data that is already in production db. 44 45 // matcher to execute against page 46 required MatcherData matcher = 6; 47 48 // Comma separated list of email addresses to which email notification 49 // is sent upon each new feedback of this type. 50 // No email is sent if this field is set to an empty string. 51 required string notification_email = 7; 52 53 // Do not use tag 8, 9, 10. They were used by a legacy field. 54 55 // Encapsulates different kind of feedback type. 56 enum Kind { 57 // Product feedback type. 58 PRODUCT = 1; 59 // Special feedback type (e.g. fixit). 60 SPECIAL = 2; 61 } 62 63 // Kind of feedback type. 64 optional Kind kind = 11 [default=PRODUCT]; 65 66 // Prefix to be added to summary of notification email sent for feedback of this 67 // type. 68 optional string summary_prefix = 12; 69 70 // String template with which "Additional Info" field in extension 71 // should be initially filled. 72 optional string template = 13; 73 74 // ID of the product this feedback type belongs to. 75 optional int32 product_id = 14; 76 77 // Tag that is used for marking feedback types that require non-ordinary handling. 78 // E.g: This field is equal: 79 // "unclassified" for Unclassified feedback, 80 // "android" for android feedback 81 // "selenium" for selenium feedback 82 optional string tag = 15; 83 84 // Problem description visible in feedback extension. 85 optional string problem_description = 16; 86 87 // Visibilities of feedback type. 88 enum Visibility { 89 // feedback type visible in external extension only 90 EXTERNAL = 1; 91 // feedback type visible in internal extension only 92 INTERNAL = 2; 93 } 94 95 // Specifies the visibility of this feedback type. 96 optional Visibility visibility = 17 [default=INTERNAL]; 97 98 // tag 18 was used by removed field 99 100 // Specifies Buganizer fields 101 // TODO(kaczmarek): enable once we migrated to new protos. 102 // optional BuganizerSettings buganizer_settings = 19; 103 104 // Channel via which notification about feedback should be send 105 enum NotifyChannel { 106 // Send email notification. 107 EMAIL = 1; 108 // File a bug in buganizer. 109 BUGANIZER = 2; 110 // File a bug in issue tracker. 111 ISSUE_TRACKER = 3; 112 } 113 114 // Specifies channel via which notification about feedback of this type should be sent. 115 optional NotifyChannel notify_channel = 20 [default=EMAIL]; 116 117 // Granularity of notifications. 118 enum NotificationGranularity { 119 // Send notification per each feedback. 120 FEEDBACK = 1; 121 // Send notification per clustered group of similar feedbacks. 122 CLUSTER = 2; 123 } 124 125 // Specifies granularity of notifications send for feedbacks of this type. 126 optional NotificationGranularity notification_granularity = 21 [default=FEEDBACK]; 127 128 // Threshold for number of feedbacks in a cluster at which notification is sent. 129 optional int32 clustering_threshold = 22 [default=5]; 130 }; 131 132 // Used to detect content relevant to particular type of feedback. 133 message MatcherData { 134 // XPATH expression to match against page. 135 required string content_matcher = 1; 136 137 // Regexp matching page URL. 138 required string url_matcher = 2; 139 140 // Approval by feedback admins 141 optional bool url_matcher_approved = 3 [default=true]; 142 }; 143