protobuf-platform 1.0.110 → 1.0.112

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.110",
3
+ "version": "1.0.112",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -20,6 +20,8 @@ service User {
20
20
  rpc updateSingleSegment(SegmentRequest) returns (SegmentResponse);
21
21
  rpc deleteSingleSegment(GetSegmentRequest) returns (SegmentStatusResponse);
22
22
  rpc readListSegments(PaginationRequest) returns (SegmentItemsResponse);
23
+ rpc addUsersIntoSegments(GetSegmentRequest) returns (SegmentStatusResponse);
24
+ rpc removeUsersFromSegments(GetSegmentRequest) returns (SegmentStatusResponse);
23
25
  }
24
26
 
25
27
  message PingRequest { string ping = 1; }
@@ -122,6 +124,7 @@ message SegmentRequest {
122
124
  }
123
125
  message GetSegmentRequest {
124
126
  int32 id = 1;
127
+ repeated int32 user_ids = 2;
125
128
  }
126
129
  message SegmentResponse {
127
130
  optional int32 id = 1;
@@ -362,6 +362,28 @@ createSingleSegment: {
362
362
  responseSerialize: serialize_user_SegmentItemsResponse,
363
363
  responseDeserialize: deserialize_user_SegmentItemsResponse,
364
364
  },
365
+ addUsersIntoSegments: {
366
+ path: '/user.User/addUsersIntoSegments',
367
+ requestStream: false,
368
+ responseStream: false,
369
+ requestType: user_pb.GetSegmentRequest,
370
+ responseType: user_pb.SegmentStatusResponse,
371
+ requestSerialize: serialize_user_GetSegmentRequest,
372
+ requestDeserialize: deserialize_user_GetSegmentRequest,
373
+ responseSerialize: serialize_user_SegmentStatusResponse,
374
+ responseDeserialize: deserialize_user_SegmentStatusResponse,
375
+ },
376
+ removeUsersFromSegments: {
377
+ path: '/user.User/removeUsersFromSegments',
378
+ requestStream: false,
379
+ responseStream: false,
380
+ requestType: user_pb.GetSegmentRequest,
381
+ responseType: user_pb.SegmentStatusResponse,
382
+ requestSerialize: serialize_user_GetSegmentRequest,
383
+ requestDeserialize: deserialize_user_GetSegmentRequest,
384
+ responseSerialize: serialize_user_SegmentStatusResponse,
385
+ responseDeserialize: deserialize_user_SegmentStatusResponse,
386
+ },
365
387
  };
366
388
 
367
389
  exports.UserClient = grpc.makeGenericClientConstructor(UserService);
package/user/user_pb.js CHANGED
@@ -388,7 +388,7 @@ if (goog.DEBUG && !COMPILED) {
388
388
  * @constructor
389
389
  */
390
390
  proto.user.GetSegmentRequest = function(opt_data) {
391
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
391
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.user.GetSegmentRequest.repeatedFields_, null);
392
392
  };
393
393
  goog.inherits(proto.user.GetSegmentRequest, jspb.Message);
394
394
  if (goog.DEBUG && !COMPILED) {
@@ -4932,6 +4932,13 @@ proto.user.SegmentRequest.prototype.hasIsActive = function() {
4932
4932
 
4933
4933
 
4934
4934
 
4935
+ /**
4936
+ * List of repeated fields within this message type.
4937
+ * @private {!Array<number>}
4938
+ * @const
4939
+ */
4940
+ proto.user.GetSegmentRequest.repeatedFields_ = [2];
4941
+
4935
4942
 
4936
4943
 
4937
4944
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -4963,7 +4970,8 @@ proto.user.GetSegmentRequest.prototype.toObject = function(opt_includeInstance)
4963
4970
  */
4964
4971
  proto.user.GetSegmentRequest.toObject = function(includeInstance, msg) {
4965
4972
  var f, obj = {
4966
- id: jspb.Message.getFieldWithDefault(msg, 1, 0)
4973
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
4974
+ userIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
4967
4975
  };
4968
4976
 
4969
4977
  if (includeInstance) {
@@ -5004,6 +5012,12 @@ proto.user.GetSegmentRequest.deserializeBinaryFromReader = function(msg, reader)
5004
5012
  var value = /** @type {number} */ (reader.readInt32());
5005
5013
  msg.setId(value);
5006
5014
  break;
5015
+ case 2:
5016
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
5017
+ for (var i = 0; i < values.length; i++) {
5018
+ msg.addUserIds(values[i]);
5019
+ }
5020
+ break;
5007
5021
  default:
5008
5022
  reader.skipField();
5009
5023
  break;
@@ -5040,6 +5054,13 @@ proto.user.GetSegmentRequest.serializeBinaryToWriter = function(message, writer)
5040
5054
  f
5041
5055
  );
5042
5056
  }
5057
+ f = message.getUserIdsList();
5058
+ if (f.length > 0) {
5059
+ writer.writePackedInt32(
5060
+ 2,
5061
+ f
5062
+ );
5063
+ }
5043
5064
  };
5044
5065
 
5045
5066
 
@@ -5061,6 +5082,43 @@ proto.user.GetSegmentRequest.prototype.setId = function(value) {
5061
5082
  };
5062
5083
 
5063
5084
 
5085
+ /**
5086
+ * repeated int32 user_ids = 2;
5087
+ * @return {!Array<number>}
5088
+ */
5089
+ proto.user.GetSegmentRequest.prototype.getUserIdsList = function() {
5090
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
5091
+ };
5092
+
5093
+
5094
+ /**
5095
+ * @param {!Array<number>} value
5096
+ * @return {!proto.user.GetSegmentRequest} returns this
5097
+ */
5098
+ proto.user.GetSegmentRequest.prototype.setUserIdsList = function(value) {
5099
+ return jspb.Message.setField(this, 2, value || []);
5100
+ };
5101
+
5102
+
5103
+ /**
5104
+ * @param {number} value
5105
+ * @param {number=} opt_index
5106
+ * @return {!proto.user.GetSegmentRequest} returns this
5107
+ */
5108
+ proto.user.GetSegmentRequest.prototype.addUserIds = function(value, opt_index) {
5109
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
5110
+ };
5111
+
5112
+
5113
+ /**
5114
+ * Clears the list making it empty but non-null.
5115
+ * @return {!proto.user.GetSegmentRequest} returns this
5116
+ */
5117
+ proto.user.GetSegmentRequest.prototype.clearUserIdsList = function() {
5118
+ return this.setUserIdsList([]);
5119
+ };
5120
+
5121
+
5064
5122
 
5065
5123
 
5066
5124