OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 // Sync protocol datatype extension for push notifications.. |
| 6 |
| 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change |
| 8 // any fields in this file. |
| 9 |
| 10 syntax = "proto2"; |
| 11 |
| 12 option optimize_for = LITE_RUNTIME; |
| 13 option retain_unknown_fields = true; |
| 14 |
| 15 package sync_pb; |
| 16 |
| 17 import "server_render.proto"; |
| 18 |
| 19 // This message allows clients to identify a notification they have created. |
| 20 // IMPORTANT: Everything in this message may be sent to the client in clear text |
| 21 // - do not expose any user ids, internal product names, credit card numbers, |
| 22 // etc... anywhere in the message. |
| 23 message SyncedNotificationIdentifier { |
| 24 // The application that the notification is a part of. |
| 25 // |
| 26 // IMPORTANT: This string may be sent to the client in clear text - do not |
| 27 // expose any user ids, internal product names, credit card numbers, etc... |
| 28 optional string app_id = 1; |
| 29 |
| 30 // Notifications with the same coalescing key (isolated to the same app_id) |
| 31 // will be grouped together when fetched. |
| 32 // |
| 33 // IMPORTANT: This string may be sent to the client in clear text - do not |
| 34 // expose any user ids, internal product names, credit card numbers, etc... |
| 35 optional string coalescing_key = 2; |
| 36 } |
| 37 |
| 38 message SyncedNotification { |
| 39 // The unique identifier of the notification. |
| 40 optional SyncedNotificationIdentifier id = 1; |
| 41 |
| 42 // A secondary type that is isolated within the same app_id. |
| 43 // |
| 44 // NOTE: For ASBE support purposes this must be in the format [A-Za-z_]+. |
| 45 // |
| 46 // IMPORTANT: This string may be sent to the client in clear text - do not |
| 47 // expose any user ids, internal product names, credit card numbers, etc... |
| 48 optional string type = 2; |
| 49 |
| 50 // Whatever string the client entered during creation. If no external_id is |
| 51 // specified, the notification can no longer be identified individually for |
| 52 // fetching/deleting, etc... |
| 53 // |
| 54 // IMPORTANT: This string may be sent to the client in clear text - do not |
| 55 // expose any user ids, internal product names, credit card numbers, etc... |
| 56 optional string external_id = 3; |
| 57 } |
| 58 |
| 59 message CoalescedSyncedNotification { |
| 60 // The identifier used to identify individual coalesced notifications. |
| 61 optional SyncedNotificationIdentifier id = 1; |
| 62 |
| 63 // All the notifications that are grouped together. |
| 64 repeated SyncedNotification notification = 2; |
| 65 |
| 66 // Data that is used directly by endpoints to render notifications in the case |
| 67 // where no "native" app can handle the notification. |
| 68 optional SyncedNotificationRenderInfo render_info = 3; |
| 69 |
| 70 // Read state will be per coalesced notification. |
| 71 enum ReadState { |
| 72 UNREAD = 1; |
| 73 READ = 2; |
| 74 DISMISSED = 3; |
| 75 } |
| 76 optional ReadState read_state = 4; |
| 77 |
| 78 // The time when the LATEST notification of the coalesced notification is |
| 79 // created (in milliseconds since the epoch). |
| 80 optional uint64 creation_time_msec = 5; |
| 81 } |
OLD | NEW |