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