protobuf-platform 1.0.186 → 1.0.187

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.186",
3
+ "version": "1.0.187",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -100,6 +100,7 @@ message UserDataResponse {
100
100
  optional string risk_status = 20;
101
101
  optional string category = 21;
102
102
  optional string created = 22;
103
+ optional UserLoyaltyItem loyalty = 23;
103
104
  }
104
105
  message UsersResponse {
105
106
  repeated UserDataResponse items = 1;
@@ -118,6 +119,16 @@ message RolePermissionRequest {
118
119
  message RolePermissionStatusResponse {
119
120
  string status = 1;
120
121
  }
122
+ //Loyalty
123
+ message UserLoyaltyItem {
124
+ optional int32 loyalty_id = 1;
125
+ optional int32 loyalty_level = 2;
126
+ optional string title = 3;
127
+ optional string description = 4;
128
+ optional int32 current_points = 5;
129
+ optional int32 points_to_complete = 6;
130
+ optional string image = 7;
131
+ }
121
132
  //Roles
122
133
  message Role {
123
134
  int32 id = 1;
package/user/user_pb.js CHANGED
@@ -40,6 +40,7 @@ goog.exportSymbol('proto.user.SegmentSearchParams', null, global);
40
40
  goog.exportSymbol('proto.user.SegmentStatusResponse', null, global);
41
41
  goog.exportSymbol('proto.user.UserDataRequest', null, global);
42
42
  goog.exportSymbol('proto.user.UserDataResponse', null, global);
43
+ goog.exportSymbol('proto.user.UserLoyaltyItem', null, global);
43
44
  goog.exportSymbol('proto.user.UserSearchParams', null, global);
44
45
  goog.exportSymbol('proto.user.UsersResponse', null, global);
45
46
  /**
@@ -315,6 +316,27 @@ if (goog.DEBUG && !COMPILED) {
315
316
  */
316
317
  proto.user.RolePermissionStatusResponse.displayName = 'proto.user.RolePermissionStatusResponse';
317
318
  }
319
+ /**
320
+ * Generated by JsPbCodeGenerator.
321
+ * @param {Array=} opt_data Optional initial data array, typically from a
322
+ * server response, or constructed directly in Javascript. The array is used
323
+ * in place and becomes part of the constructed object. It is not cloned.
324
+ * If no data is provided, the constructed object will be empty, but still
325
+ * valid.
326
+ * @extends {jspb.Message}
327
+ * @constructor
328
+ */
329
+ proto.user.UserLoyaltyItem = function(opt_data) {
330
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
331
+ };
332
+ goog.inherits(proto.user.UserLoyaltyItem, jspb.Message);
333
+ if (goog.DEBUG && !COMPILED) {
334
+ /**
335
+ * @public
336
+ * @override
337
+ */
338
+ proto.user.UserLoyaltyItem.displayName = 'proto.user.UserLoyaltyItem';
339
+ }
318
340
  /**
319
341
  * Generated by JsPbCodeGenerator.
320
342
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -2821,7 +2843,8 @@ proto.user.UserDataResponse.toObject = function(includeInstance, msg) {
2821
2843
  timezone: jspb.Message.getFieldWithDefault(msg, 19, ""),
2822
2844
  riskStatus: jspb.Message.getFieldWithDefault(msg, 20, ""),
2823
2845
  category: jspb.Message.getFieldWithDefault(msg, 21, ""),
2824
- created: jspb.Message.getFieldWithDefault(msg, 22, "")
2846
+ created: jspb.Message.getFieldWithDefault(msg, 22, ""),
2847
+ loyalty: (f = msg.getLoyalty()) && proto.user.UserLoyaltyItem.toObject(includeInstance, f)
2825
2848
  };
2826
2849
 
2827
2850
  if (includeInstance) {
@@ -2946,6 +2969,11 @@ proto.user.UserDataResponse.deserializeBinaryFromReader = function(msg, reader)
2946
2969
  var value = /** @type {string} */ (reader.readString());
2947
2970
  msg.setCreated(value);
2948
2971
  break;
2972
+ case 23:
2973
+ var value = new proto.user.UserLoyaltyItem;
2974
+ reader.readMessage(value,proto.user.UserLoyaltyItem.deserializeBinaryFromReader);
2975
+ msg.setLoyalty(value);
2976
+ break;
2949
2977
  default:
2950
2978
  reader.skipField();
2951
2979
  break;
@@ -3129,6 +3157,14 @@ proto.user.UserDataResponse.serializeBinaryToWriter = function(message, writer)
3129
3157
  f
3130
3158
  );
3131
3159
  }
3160
+ f = message.getLoyalty();
3161
+ if (f != null) {
3162
+ writer.writeMessage(
3163
+ 23,
3164
+ f,
3165
+ proto.user.UserLoyaltyItem.serializeBinaryToWriter
3166
+ );
3167
+ }
3132
3168
  };
3133
3169
 
3134
3170
 
@@ -3888,6 +3924,43 @@ proto.user.UserDataResponse.prototype.hasCreated = function() {
3888
3924
  };
3889
3925
 
3890
3926
 
3927
+ /**
3928
+ * optional UserLoyaltyItem loyalty = 23;
3929
+ * @return {?proto.user.UserLoyaltyItem}
3930
+ */
3931
+ proto.user.UserDataResponse.prototype.getLoyalty = function() {
3932
+ return /** @type{?proto.user.UserLoyaltyItem} */ (
3933
+ jspb.Message.getWrapperField(this, proto.user.UserLoyaltyItem, 23));
3934
+ };
3935
+
3936
+
3937
+ /**
3938
+ * @param {?proto.user.UserLoyaltyItem|undefined} value
3939
+ * @return {!proto.user.UserDataResponse} returns this
3940
+ */
3941
+ proto.user.UserDataResponse.prototype.setLoyalty = function(value) {
3942
+ return jspb.Message.setWrapperField(this, 23, value);
3943
+ };
3944
+
3945
+
3946
+ /**
3947
+ * Clears the message field making it undefined.
3948
+ * @return {!proto.user.UserDataResponse} returns this
3949
+ */
3950
+ proto.user.UserDataResponse.prototype.clearLoyalty = function() {
3951
+ return this.setLoyalty(undefined);
3952
+ };
3953
+
3954
+
3955
+ /**
3956
+ * Returns whether this field is set.
3957
+ * @return {boolean}
3958
+ */
3959
+ proto.user.UserDataResponse.prototype.hasLoyalty = function() {
3960
+ return jspb.Message.getField(this, 23) != null;
3961
+ };
3962
+
3963
+
3891
3964
 
3892
3965
  /**
3893
3966
  * List of repeated fields within this message type.
@@ -4593,6 +4666,442 @@ proto.user.RolePermissionStatusResponse.prototype.setStatus = function(value) {
4593
4666
 
4594
4667
 
4595
4668
 
4669
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4670
+ /**
4671
+ * Creates an object representation of this proto.
4672
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4673
+ * Optional fields that are not set will be set to undefined.
4674
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4675
+ * For the list of reserved names please see:
4676
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4677
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4678
+ * JSPB instance for transitional soy proto support:
4679
+ * http://goto/soy-param-migration
4680
+ * @return {!Object}
4681
+ */
4682
+ proto.user.UserLoyaltyItem.prototype.toObject = function(opt_includeInstance) {
4683
+ return proto.user.UserLoyaltyItem.toObject(opt_includeInstance, this);
4684
+ };
4685
+
4686
+
4687
+ /**
4688
+ * Static version of the {@see toObject} method.
4689
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4690
+ * the JSPB instance for transitional soy proto support:
4691
+ * http://goto/soy-param-migration
4692
+ * @param {!proto.user.UserLoyaltyItem} msg The msg instance to transform.
4693
+ * @return {!Object}
4694
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4695
+ */
4696
+ proto.user.UserLoyaltyItem.toObject = function(includeInstance, msg) {
4697
+ var f, obj = {
4698
+ loyaltyId: jspb.Message.getFieldWithDefault(msg, 1, 0),
4699
+ loyaltyLevel: jspb.Message.getFieldWithDefault(msg, 2, 0),
4700
+ title: jspb.Message.getFieldWithDefault(msg, 3, ""),
4701
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
4702
+ currentPoints: jspb.Message.getFieldWithDefault(msg, 5, 0),
4703
+ pointsToComplete: jspb.Message.getFieldWithDefault(msg, 6, 0),
4704
+ image: jspb.Message.getFieldWithDefault(msg, 7, "")
4705
+ };
4706
+
4707
+ if (includeInstance) {
4708
+ obj.$jspbMessageInstance = msg;
4709
+ }
4710
+ return obj;
4711
+ };
4712
+ }
4713
+
4714
+
4715
+ /**
4716
+ * Deserializes binary data (in protobuf wire format).
4717
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4718
+ * @return {!proto.user.UserLoyaltyItem}
4719
+ */
4720
+ proto.user.UserLoyaltyItem.deserializeBinary = function(bytes) {
4721
+ var reader = new jspb.BinaryReader(bytes);
4722
+ var msg = new proto.user.UserLoyaltyItem;
4723
+ return proto.user.UserLoyaltyItem.deserializeBinaryFromReader(msg, reader);
4724
+ };
4725
+
4726
+
4727
+ /**
4728
+ * Deserializes binary data (in protobuf wire format) from the
4729
+ * given reader into the given message object.
4730
+ * @param {!proto.user.UserLoyaltyItem} msg The message object to deserialize into.
4731
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4732
+ * @return {!proto.user.UserLoyaltyItem}
4733
+ */
4734
+ proto.user.UserLoyaltyItem.deserializeBinaryFromReader = function(msg, reader) {
4735
+ while (reader.nextField()) {
4736
+ if (reader.isEndGroup()) {
4737
+ break;
4738
+ }
4739
+ var field = reader.getFieldNumber();
4740
+ switch (field) {
4741
+ case 1:
4742
+ var value = /** @type {number} */ (reader.readInt32());
4743
+ msg.setLoyaltyId(value);
4744
+ break;
4745
+ case 2:
4746
+ var value = /** @type {number} */ (reader.readInt32());
4747
+ msg.setLoyaltyLevel(value);
4748
+ break;
4749
+ case 3:
4750
+ var value = /** @type {string} */ (reader.readString());
4751
+ msg.setTitle(value);
4752
+ break;
4753
+ case 4:
4754
+ var value = /** @type {string} */ (reader.readString());
4755
+ msg.setDescription(value);
4756
+ break;
4757
+ case 5:
4758
+ var value = /** @type {number} */ (reader.readInt32());
4759
+ msg.setCurrentPoints(value);
4760
+ break;
4761
+ case 6:
4762
+ var value = /** @type {number} */ (reader.readInt32());
4763
+ msg.setPointsToComplete(value);
4764
+ break;
4765
+ case 7:
4766
+ var value = /** @type {string} */ (reader.readString());
4767
+ msg.setImage(value);
4768
+ break;
4769
+ default:
4770
+ reader.skipField();
4771
+ break;
4772
+ }
4773
+ }
4774
+ return msg;
4775
+ };
4776
+
4777
+
4778
+ /**
4779
+ * Serializes the message to binary data (in protobuf wire format).
4780
+ * @return {!Uint8Array}
4781
+ */
4782
+ proto.user.UserLoyaltyItem.prototype.serializeBinary = function() {
4783
+ var writer = new jspb.BinaryWriter();
4784
+ proto.user.UserLoyaltyItem.serializeBinaryToWriter(this, writer);
4785
+ return writer.getResultBuffer();
4786
+ };
4787
+
4788
+
4789
+ /**
4790
+ * Serializes the given message to binary data (in protobuf wire
4791
+ * format), writing to the given BinaryWriter.
4792
+ * @param {!proto.user.UserLoyaltyItem} message
4793
+ * @param {!jspb.BinaryWriter} writer
4794
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4795
+ */
4796
+ proto.user.UserLoyaltyItem.serializeBinaryToWriter = function(message, writer) {
4797
+ var f = undefined;
4798
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
4799
+ if (f != null) {
4800
+ writer.writeInt32(
4801
+ 1,
4802
+ f
4803
+ );
4804
+ }
4805
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
4806
+ if (f != null) {
4807
+ writer.writeInt32(
4808
+ 2,
4809
+ f
4810
+ );
4811
+ }
4812
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
4813
+ if (f != null) {
4814
+ writer.writeString(
4815
+ 3,
4816
+ f
4817
+ );
4818
+ }
4819
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
4820
+ if (f != null) {
4821
+ writer.writeString(
4822
+ 4,
4823
+ f
4824
+ );
4825
+ }
4826
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
4827
+ if (f != null) {
4828
+ writer.writeInt32(
4829
+ 5,
4830
+ f
4831
+ );
4832
+ }
4833
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
4834
+ if (f != null) {
4835
+ writer.writeInt32(
4836
+ 6,
4837
+ f
4838
+ );
4839
+ }
4840
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
4841
+ if (f != null) {
4842
+ writer.writeString(
4843
+ 7,
4844
+ f
4845
+ );
4846
+ }
4847
+ };
4848
+
4849
+
4850
+ /**
4851
+ * optional int32 loyalty_id = 1;
4852
+ * @return {number}
4853
+ */
4854
+ proto.user.UserLoyaltyItem.prototype.getLoyaltyId = function() {
4855
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4856
+ };
4857
+
4858
+
4859
+ /**
4860
+ * @param {number} value
4861
+ * @return {!proto.user.UserLoyaltyItem} returns this
4862
+ */
4863
+ proto.user.UserLoyaltyItem.prototype.setLoyaltyId = function(value) {
4864
+ return jspb.Message.setField(this, 1, value);
4865
+ };
4866
+
4867
+
4868
+ /**
4869
+ * Clears the field making it undefined.
4870
+ * @return {!proto.user.UserLoyaltyItem} returns this
4871
+ */
4872
+ proto.user.UserLoyaltyItem.prototype.clearLoyaltyId = function() {
4873
+ return jspb.Message.setField(this, 1, undefined);
4874
+ };
4875
+
4876
+
4877
+ /**
4878
+ * Returns whether this field is set.
4879
+ * @return {boolean}
4880
+ */
4881
+ proto.user.UserLoyaltyItem.prototype.hasLoyaltyId = function() {
4882
+ return jspb.Message.getField(this, 1) != null;
4883
+ };
4884
+
4885
+
4886
+ /**
4887
+ * optional int32 loyalty_level = 2;
4888
+ * @return {number}
4889
+ */
4890
+ proto.user.UserLoyaltyItem.prototype.getLoyaltyLevel = function() {
4891
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4892
+ };
4893
+
4894
+
4895
+ /**
4896
+ * @param {number} value
4897
+ * @return {!proto.user.UserLoyaltyItem} returns this
4898
+ */
4899
+ proto.user.UserLoyaltyItem.prototype.setLoyaltyLevel = function(value) {
4900
+ return jspb.Message.setField(this, 2, value);
4901
+ };
4902
+
4903
+
4904
+ /**
4905
+ * Clears the field making it undefined.
4906
+ * @return {!proto.user.UserLoyaltyItem} returns this
4907
+ */
4908
+ proto.user.UserLoyaltyItem.prototype.clearLoyaltyLevel = function() {
4909
+ return jspb.Message.setField(this, 2, undefined);
4910
+ };
4911
+
4912
+
4913
+ /**
4914
+ * Returns whether this field is set.
4915
+ * @return {boolean}
4916
+ */
4917
+ proto.user.UserLoyaltyItem.prototype.hasLoyaltyLevel = function() {
4918
+ return jspb.Message.getField(this, 2) != null;
4919
+ };
4920
+
4921
+
4922
+ /**
4923
+ * optional string title = 3;
4924
+ * @return {string}
4925
+ */
4926
+ proto.user.UserLoyaltyItem.prototype.getTitle = function() {
4927
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
4928
+ };
4929
+
4930
+
4931
+ /**
4932
+ * @param {string} value
4933
+ * @return {!proto.user.UserLoyaltyItem} returns this
4934
+ */
4935
+ proto.user.UserLoyaltyItem.prototype.setTitle = function(value) {
4936
+ return jspb.Message.setField(this, 3, value);
4937
+ };
4938
+
4939
+
4940
+ /**
4941
+ * Clears the field making it undefined.
4942
+ * @return {!proto.user.UserLoyaltyItem} returns this
4943
+ */
4944
+ proto.user.UserLoyaltyItem.prototype.clearTitle = function() {
4945
+ return jspb.Message.setField(this, 3, undefined);
4946
+ };
4947
+
4948
+
4949
+ /**
4950
+ * Returns whether this field is set.
4951
+ * @return {boolean}
4952
+ */
4953
+ proto.user.UserLoyaltyItem.prototype.hasTitle = function() {
4954
+ return jspb.Message.getField(this, 3) != null;
4955
+ };
4956
+
4957
+
4958
+ /**
4959
+ * optional string description = 4;
4960
+ * @return {string}
4961
+ */
4962
+ proto.user.UserLoyaltyItem.prototype.getDescription = function() {
4963
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
4964
+ };
4965
+
4966
+
4967
+ /**
4968
+ * @param {string} value
4969
+ * @return {!proto.user.UserLoyaltyItem} returns this
4970
+ */
4971
+ proto.user.UserLoyaltyItem.prototype.setDescription = function(value) {
4972
+ return jspb.Message.setField(this, 4, value);
4973
+ };
4974
+
4975
+
4976
+ /**
4977
+ * Clears the field making it undefined.
4978
+ * @return {!proto.user.UserLoyaltyItem} returns this
4979
+ */
4980
+ proto.user.UserLoyaltyItem.prototype.clearDescription = function() {
4981
+ return jspb.Message.setField(this, 4, undefined);
4982
+ };
4983
+
4984
+
4985
+ /**
4986
+ * Returns whether this field is set.
4987
+ * @return {boolean}
4988
+ */
4989
+ proto.user.UserLoyaltyItem.prototype.hasDescription = function() {
4990
+ return jspb.Message.getField(this, 4) != null;
4991
+ };
4992
+
4993
+
4994
+ /**
4995
+ * optional int32 current_points = 5;
4996
+ * @return {number}
4997
+ */
4998
+ proto.user.UserLoyaltyItem.prototype.getCurrentPoints = function() {
4999
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
5000
+ };
5001
+
5002
+
5003
+ /**
5004
+ * @param {number} value
5005
+ * @return {!proto.user.UserLoyaltyItem} returns this
5006
+ */
5007
+ proto.user.UserLoyaltyItem.prototype.setCurrentPoints = function(value) {
5008
+ return jspb.Message.setField(this, 5, value);
5009
+ };
5010
+
5011
+
5012
+ /**
5013
+ * Clears the field making it undefined.
5014
+ * @return {!proto.user.UserLoyaltyItem} returns this
5015
+ */
5016
+ proto.user.UserLoyaltyItem.prototype.clearCurrentPoints = function() {
5017
+ return jspb.Message.setField(this, 5, undefined);
5018
+ };
5019
+
5020
+
5021
+ /**
5022
+ * Returns whether this field is set.
5023
+ * @return {boolean}
5024
+ */
5025
+ proto.user.UserLoyaltyItem.prototype.hasCurrentPoints = function() {
5026
+ return jspb.Message.getField(this, 5) != null;
5027
+ };
5028
+
5029
+
5030
+ /**
5031
+ * optional int32 points_to_complete = 6;
5032
+ * @return {number}
5033
+ */
5034
+ proto.user.UserLoyaltyItem.prototype.getPointsToComplete = function() {
5035
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
5036
+ };
5037
+
5038
+
5039
+ /**
5040
+ * @param {number} value
5041
+ * @return {!proto.user.UserLoyaltyItem} returns this
5042
+ */
5043
+ proto.user.UserLoyaltyItem.prototype.setPointsToComplete = function(value) {
5044
+ return jspb.Message.setField(this, 6, value);
5045
+ };
5046
+
5047
+
5048
+ /**
5049
+ * Clears the field making it undefined.
5050
+ * @return {!proto.user.UserLoyaltyItem} returns this
5051
+ */
5052
+ proto.user.UserLoyaltyItem.prototype.clearPointsToComplete = function() {
5053
+ return jspb.Message.setField(this, 6, undefined);
5054
+ };
5055
+
5056
+
5057
+ /**
5058
+ * Returns whether this field is set.
5059
+ * @return {boolean}
5060
+ */
5061
+ proto.user.UserLoyaltyItem.prototype.hasPointsToComplete = function() {
5062
+ return jspb.Message.getField(this, 6) != null;
5063
+ };
5064
+
5065
+
5066
+ /**
5067
+ * optional string image = 7;
5068
+ * @return {string}
5069
+ */
5070
+ proto.user.UserLoyaltyItem.prototype.getImage = function() {
5071
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
5072
+ };
5073
+
5074
+
5075
+ /**
5076
+ * @param {string} value
5077
+ * @return {!proto.user.UserLoyaltyItem} returns this
5078
+ */
5079
+ proto.user.UserLoyaltyItem.prototype.setImage = function(value) {
5080
+ return jspb.Message.setField(this, 7, value);
5081
+ };
5082
+
5083
+
5084
+ /**
5085
+ * Clears the field making it undefined.
5086
+ * @return {!proto.user.UserLoyaltyItem} returns this
5087
+ */
5088
+ proto.user.UserLoyaltyItem.prototype.clearImage = function() {
5089
+ return jspb.Message.setField(this, 7, undefined);
5090
+ };
5091
+
5092
+
5093
+ /**
5094
+ * Returns whether this field is set.
5095
+ * @return {boolean}
5096
+ */
5097
+ proto.user.UserLoyaltyItem.prototype.hasImage = function() {
5098
+ return jspb.Message.getField(this, 7) != null;
5099
+ };
5100
+
5101
+
5102
+
5103
+
5104
+
4596
5105
  if (jspb.Message.GENERATE_TO_OBJECT) {
4597
5106
  /**
4598
5107
  * Creates an object representation of this proto.