protobuf-platform 1.0.183 → 1.0.185

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,11 +6,11 @@ service Notification {
6
6
  rpc checkConnection(PingRequest) returns (PongResponse);
7
7
  rpc getMediaResource(GetFileRequest) returns (stream File);
8
8
  //Notifications
9
- //rpc createSingleNotification(stream LevelRequest) returns (LevelResponse);
10
- //rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
11
- //rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
12
- //rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
13
- //rpc readListLevels(PaginationRequest) returns (LevelItemsResponse);
9
+ rpc createSingleNotification(NotificationRequest) returns (NotificationResponse);
10
+ rpc readSingleNotification(GetNotificationRequest) returns (NotificationResponse);
11
+ rpc updateSingleNotification(NotificationRequest) returns (NotificationResponse);
12
+ rpc deleteSingleNotification(GetNotificationRequest) returns (NotificationStatusResponse);
13
+ rpc readListNotifications(PaginationRequest) returns (NotificationItemsResponse);
14
14
  rpc sendNotificationToUsers(SendNotificationRequest) returns (NotificationStatusResponse);
15
15
  rpc getNotificationForParticularUser(PaginationRequest) returns (UserNotificationItemsResponse);
16
16
  }
@@ -39,6 +39,16 @@ message File { bytes media = 1; }
39
39
  message GetFileRequest { string file_name = 1; string instance_type = 2; }
40
40
 
41
41
  //Notification
42
+ message NotificationRequest {
43
+ optional int32 id = 1;
44
+ optional string title = 2;
45
+ optional string content = 3;
46
+ optional string type = 4;
47
+ optional int32 is_active = 5;
48
+ }
49
+ message GetNotificationRequest {
50
+ int32 id = 1;
51
+ }
42
52
  message SendNotificationRequest {
43
53
  int32 notification_id = 1;
44
54
  repeated int32 user_ids = 2;
@@ -56,4 +66,20 @@ message UserNotificationItemsResponse {
56
66
  repeated UserNotificationItem items = 1;
57
67
  optional int32 total_pages = 2;
58
68
  optional int32 total_items = 3;
69
+ }
70
+ message NotificationItem {
71
+ int32 id = 1;
72
+ string title = 2;
73
+ string content = 3;
74
+ bool is_active = 4;
75
+ string type = 5;
76
+ optional string created = 6;
77
+ }
78
+ message NotificationResponse {
79
+ NotificationItem data = 1;
80
+ }
81
+ message NotificationItemsResponse {
82
+ repeated NotificationItem items = 1;
83
+ optional int32 total_pages = 2;
84
+ optional int32 total_items = 3;
59
85
  }
@@ -26,6 +26,50 @@ function deserialize_notification_GetFileRequest(buffer_arg) {
26
26
  return notification_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
27
  }
28
28
 
29
+ function serialize_notification_GetNotificationRequest(arg) {
30
+ if (!(arg instanceof notification_pb.GetNotificationRequest)) {
31
+ throw new Error('Expected argument of type notification.GetNotificationRequest');
32
+ }
33
+ return Buffer.from(arg.serializeBinary());
34
+ }
35
+
36
+ function deserialize_notification_GetNotificationRequest(buffer_arg) {
37
+ return notification_pb.GetNotificationRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
+ }
39
+
40
+ function serialize_notification_NotificationItemsResponse(arg) {
41
+ if (!(arg instanceof notification_pb.NotificationItemsResponse)) {
42
+ throw new Error('Expected argument of type notification.NotificationItemsResponse');
43
+ }
44
+ return Buffer.from(arg.serializeBinary());
45
+ }
46
+
47
+ function deserialize_notification_NotificationItemsResponse(buffer_arg) {
48
+ return notification_pb.NotificationItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
49
+ }
50
+
51
+ function serialize_notification_NotificationRequest(arg) {
52
+ if (!(arg instanceof notification_pb.NotificationRequest)) {
53
+ throw new Error('Expected argument of type notification.NotificationRequest');
54
+ }
55
+ return Buffer.from(arg.serializeBinary());
56
+ }
57
+
58
+ function deserialize_notification_NotificationRequest(buffer_arg) {
59
+ return notification_pb.NotificationRequest.deserializeBinary(new Uint8Array(buffer_arg));
60
+ }
61
+
62
+ function serialize_notification_NotificationResponse(arg) {
63
+ if (!(arg instanceof notification_pb.NotificationResponse)) {
64
+ throw new Error('Expected argument of type notification.NotificationResponse');
65
+ }
66
+ return Buffer.from(arg.serializeBinary());
67
+ }
68
+
69
+ function deserialize_notification_NotificationResponse(buffer_arg) {
70
+ return notification_pb.NotificationResponse.deserializeBinary(new Uint8Array(buffer_arg));
71
+ }
72
+
29
73
  function serialize_notification_NotificationStatusResponse(arg) {
30
74
  if (!(arg instanceof notification_pb.NotificationStatusResponse)) {
31
75
  throw new Error('Expected argument of type notification.NotificationStatusResponse');
@@ -117,12 +161,62 @@ var NotificationService = exports.NotificationService = {
117
161
  responseDeserialize: deserialize_notification_File,
118
162
  },
119
163
  // Notifications
120
- // rpc createSingleNotification(stream LevelRequest) returns (LevelResponse);
121
- // rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
122
- // rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
123
- // rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
124
- // rpc readListLevels(PaginationRequest) returns (LevelItemsResponse);
125
- sendNotificationToUsers: {
164
+ createSingleNotification: {
165
+ path: '/notification.Notification/createSingleNotification',
166
+ requestStream: false,
167
+ responseStream: false,
168
+ requestType: notification_pb.NotificationRequest,
169
+ responseType: notification_pb.NotificationResponse,
170
+ requestSerialize: serialize_notification_NotificationRequest,
171
+ requestDeserialize: deserialize_notification_NotificationRequest,
172
+ responseSerialize: serialize_notification_NotificationResponse,
173
+ responseDeserialize: deserialize_notification_NotificationResponse,
174
+ },
175
+ readSingleNotification: {
176
+ path: '/notification.Notification/readSingleNotification',
177
+ requestStream: false,
178
+ responseStream: false,
179
+ requestType: notification_pb.GetNotificationRequest,
180
+ responseType: notification_pb.NotificationResponse,
181
+ requestSerialize: serialize_notification_GetNotificationRequest,
182
+ requestDeserialize: deserialize_notification_GetNotificationRequest,
183
+ responseSerialize: serialize_notification_NotificationResponse,
184
+ responseDeserialize: deserialize_notification_NotificationResponse,
185
+ },
186
+ updateSingleNotification: {
187
+ path: '/notification.Notification/updateSingleNotification',
188
+ requestStream: false,
189
+ responseStream: false,
190
+ requestType: notification_pb.NotificationRequest,
191
+ responseType: notification_pb.NotificationResponse,
192
+ requestSerialize: serialize_notification_NotificationRequest,
193
+ requestDeserialize: deserialize_notification_NotificationRequest,
194
+ responseSerialize: serialize_notification_NotificationResponse,
195
+ responseDeserialize: deserialize_notification_NotificationResponse,
196
+ },
197
+ deleteSingleNotification: {
198
+ path: '/notification.Notification/deleteSingleNotification',
199
+ requestStream: false,
200
+ responseStream: false,
201
+ requestType: notification_pb.GetNotificationRequest,
202
+ responseType: notification_pb.NotificationStatusResponse,
203
+ requestSerialize: serialize_notification_GetNotificationRequest,
204
+ requestDeserialize: deserialize_notification_GetNotificationRequest,
205
+ responseSerialize: serialize_notification_NotificationStatusResponse,
206
+ responseDeserialize: deserialize_notification_NotificationStatusResponse,
207
+ },
208
+ readListNotifications: {
209
+ path: '/notification.Notification/readListNotifications',
210
+ requestStream: false,
211
+ responseStream: false,
212
+ requestType: notification_pb.PaginationRequest,
213
+ responseType: notification_pb.NotificationItemsResponse,
214
+ requestSerialize: serialize_notification_PaginationRequest,
215
+ requestDeserialize: deserialize_notification_PaginationRequest,
216
+ responseSerialize: serialize_notification_NotificationItemsResponse,
217
+ responseDeserialize: deserialize_notification_NotificationItemsResponse,
218
+ },
219
+ sendNotificationToUsers: {
126
220
  path: '/notification.Notification/sendNotificationToUsers',
127
221
  requestStream: false,
128
222
  responseStream: false,