config.proto 4.4 KB

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