github.com/status-im/status-go@v1.1.0/protocol/protobuf/push_notifications.proto (about) 1 syntax = "proto3"; 2 3 option go_package = "./;protobuf"; 4 package protobuf; 5 6 import "chat_identity.proto"; 7 8 message PushNotificationRegistration { 9 enum TokenType { 10 UNKNOWN_TOKEN_TYPE = 0; 11 APN_TOKEN = 1; 12 FIREBASE_TOKEN = 2; 13 } 14 TokenType token_type = 1; 15 string device_token = 2; 16 string installation_id = 3; 17 string access_token = 4; 18 bool enabled = 5; 19 uint64 version = 6; 20 repeated bytes allowed_key_list = 7; 21 repeated bytes blocked_chat_list = 8; 22 bool unregister = 9; 23 bytes grant = 10; 24 bool allow_from_contacts_only = 11; 25 string apn_topic = 12; 26 bool block_mentions = 13; 27 repeated bytes allowed_mentions_chat_list = 14; 28 repeated bytes muted_chat_list = 15; 29 } 30 31 message PushNotificationRegistrationResponse { 32 bool success = 1; 33 ErrorType error = 2; 34 bytes request_id = 3; 35 36 enum ErrorType { 37 UNKNOWN_ERROR_TYPE = 0; 38 MALFORMED_MESSAGE = 1; 39 VERSION_MISMATCH = 2; 40 UNSUPPORTED_TOKEN_TYPE = 3; 41 INTERNAL_ERROR = 4; 42 } 43 } 44 45 message ContactCodeAdvertisement { 46 repeated PushNotificationQueryInfo push_notification_info = 1; 47 ChatIdentity chat_identity = 2; 48 } 49 50 message PushNotificationQuery { 51 repeated bytes public_keys = 1; 52 } 53 54 message PushNotificationQueryInfo { 55 string access_token = 1; 56 string installation_id = 2; 57 bytes public_key = 3; 58 repeated bytes allowed_key_list = 4; 59 bytes grant = 5; 60 uint64 version = 6; 61 bytes server_public_key = 7; 62 } 63 64 message PushNotificationQueryResponse { 65 repeated PushNotificationQueryInfo info = 1; 66 bytes message_id = 2; 67 bool success = 3; 68 } 69 70 message PushNotification { 71 string access_token = 1; 72 bytes chat_id = 2; 73 bytes public_key = 3; 74 string installation_id = 4; 75 bytes message = 5; 76 PushNotificationType type = 6; 77 enum PushNotificationType { 78 UNKNOWN_PUSH_NOTIFICATION_TYPE = 0; 79 MESSAGE = 1; 80 MENTION = 2; 81 REQUEST_TO_JOIN_COMMUNITY = 3; 82 } 83 bytes author = 7; 84 } 85 86 message PushNotificationRequest { 87 repeated PushNotification requests = 1; 88 bytes message_id = 2; 89 } 90 91 message PushNotificationReport { 92 bool success = 1; 93 ErrorType error = 2; 94 enum ErrorType { 95 UNKNOWN_ERROR_TYPE = 0; 96 WRONG_TOKEN = 1; 97 INTERNAL_ERROR = 2; 98 NOT_REGISTERED = 3; 99 } 100 bytes public_key = 3; 101 string installation_id = 4; 102 } 103 104 message PushNotificationResponse { 105 bytes message_id = 1; 106 repeated PushNotificationReport reports = 2; 107 }