protobuf-platform 1.0.196 → 1.0.197

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.
@@ -15,6 +15,7 @@ service Notification {
15
15
  rpc sendNotificationToUsers(SendNotificationRequest) returns (NotificationStatusResponse);
16
16
  rpc getNotificationForParticularUser(PaginationRequest) returns (UserNotificationItemsResponse);
17
17
  rpc getNotificationsCountForUser(NotificationSearchRequest) returns (UserNotificationsCountResponse);
18
+ rpc markUserNotification(NotificationSearchRequest) returns (NotificationStatusResponse);
18
19
  }
19
20
 
20
21
  message PingRequest { string ping = 1; }
@@ -29,6 +30,7 @@ message NotificationSearchRequest {
29
30
  optional int32 notification_id = 1;
30
31
  optional int32 user_id = 2;
31
32
  optional string notification_title = 3;
33
+ repeated int32 notification_ids = 4;
32
34
  }
33
35
  message UserSearchRequest {
34
36
  int32 user_id = 1;
@@ -272,6 +272,17 @@ sendNotificationToUsers: {
272
272
  responseSerialize: serialize_notification_UserNotificationsCountResponse,
273
273
  responseDeserialize: deserialize_notification_UserNotificationsCountResponse,
274
274
  },
275
+ markUserNotification: {
276
+ path: '/notification.Notification/markUserNotification',
277
+ requestStream: false,
278
+ responseStream: false,
279
+ requestType: notification_pb.NotificationSearchRequest,
280
+ responseType: notification_pb.NotificationStatusResponse,
281
+ requestSerialize: serialize_notification_NotificationSearchRequest,
282
+ requestDeserialize: deserialize_notification_NotificationSearchRequest,
283
+ responseSerialize: serialize_notification_NotificationStatusResponse,
284
+ responseDeserialize: deserialize_notification_NotificationStatusResponse,
285
+ },
275
286
  };
276
287
 
277
288
  exports.NotificationClient = grpc.makeGenericClientConstructor(NotificationService);
@@ -112,7 +112,7 @@ if (goog.DEBUG && !COMPILED) {
112
112
  * @constructor
113
113
  */
114
114
  proto.notification.NotificationSearchRequest = function(opt_data) {
115
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
115
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.notification.NotificationSearchRequest.repeatedFields_, null);
116
116
  };
117
117
  goog.inherits(proto.notification.NotificationSearchRequest, jspb.Message);
118
118
  if (goog.DEBUG && !COMPILED) {
@@ -918,6 +918,13 @@ proto.notification.PaginationRequest.prototype.hasUserSearchParams = function()
918
918
 
919
919
 
920
920
 
921
+ /**
922
+ * List of repeated fields within this message type.
923
+ * @private {!Array<number>}
924
+ * @const
925
+ */
926
+ proto.notification.NotificationSearchRequest.repeatedFields_ = [4];
927
+
921
928
 
922
929
 
923
930
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -951,7 +958,8 @@ proto.notification.NotificationSearchRequest.toObject = function(includeInstance
951
958
  var f, obj = {
952
959
  notificationId: jspb.Message.getFieldWithDefault(msg, 1, 0),
953
960
  userId: jspb.Message.getFieldWithDefault(msg, 2, 0),
954
- notificationTitle: jspb.Message.getFieldWithDefault(msg, 3, "")
961
+ notificationTitle: jspb.Message.getFieldWithDefault(msg, 3, ""),
962
+ notificationIdsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f
955
963
  };
956
964
 
957
965
  if (includeInstance) {
@@ -1000,6 +1008,12 @@ proto.notification.NotificationSearchRequest.deserializeBinaryFromReader = funct
1000
1008
  var value = /** @type {string} */ (reader.readString());
1001
1009
  msg.setNotificationTitle(value);
1002
1010
  break;
1011
+ case 4:
1012
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
1013
+ for (var i = 0; i < values.length; i++) {
1014
+ msg.addNotificationIds(values[i]);
1015
+ }
1016
+ break;
1003
1017
  default:
1004
1018
  reader.skipField();
1005
1019
  break;
@@ -1050,6 +1064,13 @@ proto.notification.NotificationSearchRequest.serializeBinaryToWriter = function(
1050
1064
  f
1051
1065
  );
1052
1066
  }
1067
+ f = message.getNotificationIdsList();
1068
+ if (f.length > 0) {
1069
+ writer.writePackedInt32(
1070
+ 4,
1071
+ f
1072
+ );
1073
+ }
1053
1074
  };
1054
1075
 
1055
1076
 
@@ -1161,6 +1182,43 @@ proto.notification.NotificationSearchRequest.prototype.hasNotificationTitle = fu
1161
1182
  };
1162
1183
 
1163
1184
 
1185
+ /**
1186
+ * repeated int32 notification_ids = 4;
1187
+ * @return {!Array<number>}
1188
+ */
1189
+ proto.notification.NotificationSearchRequest.prototype.getNotificationIdsList = function() {
1190
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 4));
1191
+ };
1192
+
1193
+
1194
+ /**
1195
+ * @param {!Array<number>} value
1196
+ * @return {!proto.notification.NotificationSearchRequest} returns this
1197
+ */
1198
+ proto.notification.NotificationSearchRequest.prototype.setNotificationIdsList = function(value) {
1199
+ return jspb.Message.setField(this, 4, value || []);
1200
+ };
1201
+
1202
+
1203
+ /**
1204
+ * @param {number} value
1205
+ * @param {number=} opt_index
1206
+ * @return {!proto.notification.NotificationSearchRequest} returns this
1207
+ */
1208
+ proto.notification.NotificationSearchRequest.prototype.addNotificationIds = function(value, opt_index) {
1209
+ return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
1210
+ };
1211
+
1212
+
1213
+ /**
1214
+ * Clears the list making it empty but non-null.
1215
+ * @return {!proto.notification.NotificationSearchRequest} returns this
1216
+ */
1217
+ proto.notification.NotificationSearchRequest.prototype.clearNotificationIdsList = function() {
1218
+ return this.setNotificationIdsList([]);
1219
+ };
1220
+
1221
+
1164
1222
 
1165
1223
 
1166
1224
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.196",
3
+ "version": "1.0.197",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {