protobuf-platform 1.2.648 → 1.2.649

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.
@@ -47,6 +47,7 @@ message LoyaltySearchRequest {
47
47
  optional int32 number_of_deposit = 8;
48
48
  optional int32 number_of_step = 9;
49
49
  optional string locale = 10;
50
+ optional string currency = 11;
50
51
  }
51
52
  message ItemsBunchRequest {
52
53
  repeated int32 ids = 1;
@@ -82,6 +83,10 @@ message LevelRewardTranslationItem {
82
83
  string locale = 1;
83
84
  string value = 2;
84
85
  }
86
+ message LevelRewardCashback {
87
+ optional float percentage = 1;
88
+ optional string currency = 2;
89
+ }
85
90
  message LevelRewardItem {
86
91
  optional int32 id = 1;
87
92
  string type = 2;
@@ -95,6 +100,7 @@ message LevelRewardItem {
95
100
  optional string image_cdn = 10;
96
101
  optional string amount = 11;
97
102
  optional bool is_available = 12;
103
+ optional LevelRewardCashback cashback = 13;
98
104
  }
99
105
  message LevelRewardRequest {
100
106
  string type = 1;
@@ -133,6 +139,7 @@ message GetLevelRequest {
133
139
  int32 id = 1;
134
140
  optional string locale = 2;
135
141
  optional bool admin_side = 3;
142
+ optional string currency = 4;
136
143
  }
137
144
  message LevelTranslationRequest {
138
145
  optional int32 loyalty_level_id = 1;
@@ -36,6 +36,7 @@ goog.exportSymbol('proto.loyalty.LevelItemsResponse', null, global);
36
36
  goog.exportSymbol('proto.loyalty.LevelRequest', null, global);
37
37
  goog.exportSymbol('proto.loyalty.LevelRequest.RequestCase', null, global);
38
38
  goog.exportSymbol('proto.loyalty.LevelResponse', null, global);
39
+ goog.exportSymbol('proto.loyalty.LevelRewardCashback', null, global);
39
40
  goog.exportSymbol('proto.loyalty.LevelRewardItem', null, global);
40
41
  goog.exportSymbol('proto.loyalty.LevelRewardRequest', null, global);
41
42
  goog.exportSymbol('proto.loyalty.LevelRewardTranslationItem', null, global);
@@ -247,6 +248,27 @@ if (goog.DEBUG && !COMPILED) {
247
248
  */
248
249
  proto.loyalty.LevelRewardTranslationItem.displayName = 'proto.loyalty.LevelRewardTranslationItem';
249
250
  }
251
+ /**
252
+ * Generated by JsPbCodeGenerator.
253
+ * @param {Array=} opt_data Optional initial data array, typically from a
254
+ * server response, or constructed directly in Javascript. The array is used
255
+ * in place and becomes part of the constructed object. It is not cloned.
256
+ * If no data is provided, the constructed object will be empty, but still
257
+ * valid.
258
+ * @extends {jspb.Message}
259
+ * @constructor
260
+ */
261
+ proto.loyalty.LevelRewardCashback = function(opt_data) {
262
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
263
+ };
264
+ goog.inherits(proto.loyalty.LevelRewardCashback, jspb.Message);
265
+ if (goog.DEBUG && !COMPILED) {
266
+ /**
267
+ * @public
268
+ * @override
269
+ */
270
+ proto.loyalty.LevelRewardCashback.displayName = 'proto.loyalty.LevelRewardCashback';
271
+ }
250
272
  /**
251
273
  * Generated by JsPbCodeGenerator.
252
274
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1477,7 +1499,8 @@ proto.loyalty.LoyaltySearchRequest.toObject = function(includeInstance, msg) {
1477
1499
  currenciesList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f,
1478
1500
  numberOfDeposit: jspb.Message.getFieldWithDefault(msg, 8, 0),
1479
1501
  numberOfStep: jspb.Message.getFieldWithDefault(msg, 9, 0),
1480
- locale: jspb.Message.getFieldWithDefault(msg, 10, "")
1502
+ locale: jspb.Message.getFieldWithDefault(msg, 10, ""),
1503
+ currency: jspb.Message.getFieldWithDefault(msg, 11, "")
1481
1504
  };
1482
1505
 
1483
1506
  if (includeInstance) {
@@ -1554,6 +1577,10 @@ proto.loyalty.LoyaltySearchRequest.deserializeBinaryFromReader = function(msg, r
1554
1577
  var value = /** @type {string} */ (reader.readString());
1555
1578
  msg.setLocale(value);
1556
1579
  break;
1580
+ case 11:
1581
+ var value = /** @type {string} */ (reader.readString());
1582
+ msg.setCurrency(value);
1583
+ break;
1557
1584
  default:
1558
1585
  reader.skipField();
1559
1586
  break;
@@ -1653,6 +1680,13 @@ proto.loyalty.LoyaltySearchRequest.serializeBinaryToWriter = function(message, w
1653
1680
  f
1654
1681
  );
1655
1682
  }
1683
+ f = /** @type {string} */ (jspb.Message.getField(message, 11));
1684
+ if (f != null) {
1685
+ writer.writeString(
1686
+ 11,
1687
+ f
1688
+ );
1689
+ }
1656
1690
  };
1657
1691
 
1658
1692
 
@@ -2018,6 +2052,42 @@ proto.loyalty.LoyaltySearchRequest.prototype.hasLocale = function() {
2018
2052
  };
2019
2053
 
2020
2054
 
2055
+ /**
2056
+ * optional string currency = 11;
2057
+ * @return {string}
2058
+ */
2059
+ proto.loyalty.LoyaltySearchRequest.prototype.getCurrency = function() {
2060
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
2061
+ };
2062
+
2063
+
2064
+ /**
2065
+ * @param {string} value
2066
+ * @return {!proto.loyalty.LoyaltySearchRequest} returns this
2067
+ */
2068
+ proto.loyalty.LoyaltySearchRequest.prototype.setCurrency = function(value) {
2069
+ return jspb.Message.setField(this, 11, value);
2070
+ };
2071
+
2072
+
2073
+ /**
2074
+ * Clears the field making it undefined.
2075
+ * @return {!proto.loyalty.LoyaltySearchRequest} returns this
2076
+ */
2077
+ proto.loyalty.LoyaltySearchRequest.prototype.clearCurrency = function() {
2078
+ return jspb.Message.setField(this, 11, undefined);
2079
+ };
2080
+
2081
+
2082
+ /**
2083
+ * Returns whether this field is set.
2084
+ * @return {boolean}
2085
+ */
2086
+ proto.loyalty.LoyaltySearchRequest.prototype.hasCurrency = function() {
2087
+ return jspb.Message.getField(this, 11) != null;
2088
+ };
2089
+
2090
+
2021
2091
 
2022
2092
  /**
2023
2093
  * List of repeated fields within this message type.
@@ -3680,6 +3750,202 @@ proto.loyalty.LevelRewardTranslationItem.prototype.setValue = function(value) {
3680
3750
 
3681
3751
 
3682
3752
 
3753
+
3754
+
3755
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3756
+ /**
3757
+ * Creates an object representation of this proto.
3758
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3759
+ * Optional fields that are not set will be set to undefined.
3760
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3761
+ * For the list of reserved names please see:
3762
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3763
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3764
+ * JSPB instance for transitional soy proto support:
3765
+ * http://goto/soy-param-migration
3766
+ * @return {!Object}
3767
+ */
3768
+ proto.loyalty.LevelRewardCashback.prototype.toObject = function(opt_includeInstance) {
3769
+ return proto.loyalty.LevelRewardCashback.toObject(opt_includeInstance, this);
3770
+ };
3771
+
3772
+
3773
+ /**
3774
+ * Static version of the {@see toObject} method.
3775
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3776
+ * the JSPB instance for transitional soy proto support:
3777
+ * http://goto/soy-param-migration
3778
+ * @param {!proto.loyalty.LevelRewardCashback} msg The msg instance to transform.
3779
+ * @return {!Object}
3780
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3781
+ */
3782
+ proto.loyalty.LevelRewardCashback.toObject = function(includeInstance, msg) {
3783
+ var f, obj = {
3784
+ percentage: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
3785
+ currency: jspb.Message.getFieldWithDefault(msg, 2, "")
3786
+ };
3787
+
3788
+ if (includeInstance) {
3789
+ obj.$jspbMessageInstance = msg;
3790
+ }
3791
+ return obj;
3792
+ };
3793
+ }
3794
+
3795
+
3796
+ /**
3797
+ * Deserializes binary data (in protobuf wire format).
3798
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3799
+ * @return {!proto.loyalty.LevelRewardCashback}
3800
+ */
3801
+ proto.loyalty.LevelRewardCashback.deserializeBinary = function(bytes) {
3802
+ var reader = new jspb.BinaryReader(bytes);
3803
+ var msg = new proto.loyalty.LevelRewardCashback;
3804
+ return proto.loyalty.LevelRewardCashback.deserializeBinaryFromReader(msg, reader);
3805
+ };
3806
+
3807
+
3808
+ /**
3809
+ * Deserializes binary data (in protobuf wire format) from the
3810
+ * given reader into the given message object.
3811
+ * @param {!proto.loyalty.LevelRewardCashback} msg The message object to deserialize into.
3812
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3813
+ * @return {!proto.loyalty.LevelRewardCashback}
3814
+ */
3815
+ proto.loyalty.LevelRewardCashback.deserializeBinaryFromReader = function(msg, reader) {
3816
+ while (reader.nextField()) {
3817
+ if (reader.isEndGroup()) {
3818
+ break;
3819
+ }
3820
+ var field = reader.getFieldNumber();
3821
+ switch (field) {
3822
+ case 1:
3823
+ var value = /** @type {number} */ (reader.readFloat());
3824
+ msg.setPercentage(value);
3825
+ break;
3826
+ case 2:
3827
+ var value = /** @type {string} */ (reader.readString());
3828
+ msg.setCurrency(value);
3829
+ break;
3830
+ default:
3831
+ reader.skipField();
3832
+ break;
3833
+ }
3834
+ }
3835
+ return msg;
3836
+ };
3837
+
3838
+
3839
+ /**
3840
+ * Serializes the message to binary data (in protobuf wire format).
3841
+ * @return {!Uint8Array}
3842
+ */
3843
+ proto.loyalty.LevelRewardCashback.prototype.serializeBinary = function() {
3844
+ var writer = new jspb.BinaryWriter();
3845
+ proto.loyalty.LevelRewardCashback.serializeBinaryToWriter(this, writer);
3846
+ return writer.getResultBuffer();
3847
+ };
3848
+
3849
+
3850
+ /**
3851
+ * Serializes the given message to binary data (in protobuf wire
3852
+ * format), writing to the given BinaryWriter.
3853
+ * @param {!proto.loyalty.LevelRewardCashback} message
3854
+ * @param {!jspb.BinaryWriter} writer
3855
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3856
+ */
3857
+ proto.loyalty.LevelRewardCashback.serializeBinaryToWriter = function(message, writer) {
3858
+ var f = undefined;
3859
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
3860
+ if (f != null) {
3861
+ writer.writeFloat(
3862
+ 1,
3863
+ f
3864
+ );
3865
+ }
3866
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
3867
+ if (f != null) {
3868
+ writer.writeString(
3869
+ 2,
3870
+ f
3871
+ );
3872
+ }
3873
+ };
3874
+
3875
+
3876
+ /**
3877
+ * optional float percentage = 1;
3878
+ * @return {number}
3879
+ */
3880
+ proto.loyalty.LevelRewardCashback.prototype.getPercentage = function() {
3881
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
3882
+ };
3883
+
3884
+
3885
+ /**
3886
+ * @param {number} value
3887
+ * @return {!proto.loyalty.LevelRewardCashback} returns this
3888
+ */
3889
+ proto.loyalty.LevelRewardCashback.prototype.setPercentage = function(value) {
3890
+ return jspb.Message.setField(this, 1, value);
3891
+ };
3892
+
3893
+
3894
+ /**
3895
+ * Clears the field making it undefined.
3896
+ * @return {!proto.loyalty.LevelRewardCashback} returns this
3897
+ */
3898
+ proto.loyalty.LevelRewardCashback.prototype.clearPercentage = function() {
3899
+ return jspb.Message.setField(this, 1, undefined);
3900
+ };
3901
+
3902
+
3903
+ /**
3904
+ * Returns whether this field is set.
3905
+ * @return {boolean}
3906
+ */
3907
+ proto.loyalty.LevelRewardCashback.prototype.hasPercentage = function() {
3908
+ return jspb.Message.getField(this, 1) != null;
3909
+ };
3910
+
3911
+
3912
+ /**
3913
+ * optional string currency = 2;
3914
+ * @return {string}
3915
+ */
3916
+ proto.loyalty.LevelRewardCashback.prototype.getCurrency = function() {
3917
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3918
+ };
3919
+
3920
+
3921
+ /**
3922
+ * @param {string} value
3923
+ * @return {!proto.loyalty.LevelRewardCashback} returns this
3924
+ */
3925
+ proto.loyalty.LevelRewardCashback.prototype.setCurrency = function(value) {
3926
+ return jspb.Message.setField(this, 2, value);
3927
+ };
3928
+
3929
+
3930
+ /**
3931
+ * Clears the field making it undefined.
3932
+ * @return {!proto.loyalty.LevelRewardCashback} returns this
3933
+ */
3934
+ proto.loyalty.LevelRewardCashback.prototype.clearCurrency = function() {
3935
+ return jspb.Message.setField(this, 2, undefined);
3936
+ };
3937
+
3938
+
3939
+ /**
3940
+ * Returns whether this field is set.
3941
+ * @return {boolean}
3942
+ */
3943
+ proto.loyalty.LevelRewardCashback.prototype.hasCurrency = function() {
3944
+ return jspb.Message.getField(this, 2) != null;
3945
+ };
3946
+
3947
+
3948
+
3683
3949
  /**
3684
3950
  * List of repeated fields within this message type.
3685
3951
  * @private {!Array<number>}
@@ -3730,7 +3996,8 @@ proto.loyalty.LevelRewardItem.toObject = function(includeInstance, msg) {
3730
3996
  image: jspb.Message.getFieldWithDefault(msg, 9, ""),
3731
3997
  imageCdn: jspb.Message.getFieldWithDefault(msg, 10, ""),
3732
3998
  amount: jspb.Message.getFieldWithDefault(msg, 11, ""),
3733
- isAvailable: jspb.Message.getBooleanFieldWithDefault(msg, 12, false)
3999
+ isAvailable: jspb.Message.getBooleanFieldWithDefault(msg, 12, false),
4000
+ cashback: (f = msg.getCashback()) && proto.loyalty.LevelRewardCashback.toObject(includeInstance, f)
3734
4001
  };
3735
4002
 
3736
4003
  if (includeInstance) {
@@ -3816,6 +4083,11 @@ proto.loyalty.LevelRewardItem.deserializeBinaryFromReader = function(msg, reader
3816
4083
  var value = /** @type {boolean} */ (reader.readBool());
3817
4084
  msg.setIsAvailable(value);
3818
4085
  break;
4086
+ case 13:
4087
+ var value = new proto.loyalty.LevelRewardCashback;
4088
+ reader.readMessage(value,proto.loyalty.LevelRewardCashback.deserializeBinaryFromReader);
4089
+ msg.setCashback(value);
4090
+ break;
3819
4091
  default:
3820
4092
  reader.skipField();
3821
4093
  break;
@@ -3930,6 +4202,14 @@ proto.loyalty.LevelRewardItem.serializeBinaryToWriter = function(message, writer
3930
4202
  f
3931
4203
  );
3932
4204
  }
4205
+ f = message.getCashback();
4206
+ if (f != null) {
4207
+ writer.writeMessage(
4208
+ 13,
4209
+ f,
4210
+ proto.loyalty.LevelRewardCashback.serializeBinaryToWriter
4211
+ );
4212
+ }
3933
4213
  };
3934
4214
 
3935
4215
 
@@ -4331,6 +4611,43 @@ proto.loyalty.LevelRewardItem.prototype.hasIsAvailable = function() {
4331
4611
  };
4332
4612
 
4333
4613
 
4614
+ /**
4615
+ * optional LevelRewardCashback cashback = 13;
4616
+ * @return {?proto.loyalty.LevelRewardCashback}
4617
+ */
4618
+ proto.loyalty.LevelRewardItem.prototype.getCashback = function() {
4619
+ return /** @type{?proto.loyalty.LevelRewardCashback} */ (
4620
+ jspb.Message.getWrapperField(this, proto.loyalty.LevelRewardCashback, 13));
4621
+ };
4622
+
4623
+
4624
+ /**
4625
+ * @param {?proto.loyalty.LevelRewardCashback|undefined} value
4626
+ * @return {!proto.loyalty.LevelRewardItem} returns this
4627
+ */
4628
+ proto.loyalty.LevelRewardItem.prototype.setCashback = function(value) {
4629
+ return jspb.Message.setWrapperField(this, 13, value);
4630
+ };
4631
+
4632
+
4633
+ /**
4634
+ * Clears the message field making it undefined.
4635
+ * @return {!proto.loyalty.LevelRewardItem} returns this
4636
+ */
4637
+ proto.loyalty.LevelRewardItem.prototype.clearCashback = function() {
4638
+ return this.setCashback(undefined);
4639
+ };
4640
+
4641
+
4642
+ /**
4643
+ * Returns whether this field is set.
4644
+ * @return {boolean}
4645
+ */
4646
+ proto.loyalty.LevelRewardItem.prototype.hasCashback = function() {
4647
+ return jspb.Message.getField(this, 13) != null;
4648
+ };
4649
+
4650
+
4334
4651
 
4335
4652
  /**
4336
4653
  * List of repeated fields within this message type.
@@ -5823,7 +6140,8 @@ proto.loyalty.GetLevelRequest.toObject = function(includeInstance, msg) {
5823
6140
  var f, obj = {
5824
6141
  id: jspb.Message.getFieldWithDefault(msg, 1, 0),
5825
6142
  locale: jspb.Message.getFieldWithDefault(msg, 2, ""),
5826
- adminSide: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
6143
+ adminSide: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
6144
+ currency: jspb.Message.getFieldWithDefault(msg, 4, "")
5827
6145
  };
5828
6146
 
5829
6147
  if (includeInstance) {
@@ -5872,6 +6190,10 @@ proto.loyalty.GetLevelRequest.deserializeBinaryFromReader = function(msg, reader
5872
6190
  var value = /** @type {boolean} */ (reader.readBool());
5873
6191
  msg.setAdminSide(value);
5874
6192
  break;
6193
+ case 4:
6194
+ var value = /** @type {string} */ (reader.readString());
6195
+ msg.setCurrency(value);
6196
+ break;
5875
6197
  default:
5876
6198
  reader.skipField();
5877
6199
  break;
@@ -5922,6 +6244,13 @@ proto.loyalty.GetLevelRequest.serializeBinaryToWriter = function(message, writer
5922
6244
  f
5923
6245
  );
5924
6246
  }
6247
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
6248
+ if (f != null) {
6249
+ writer.writeString(
6250
+ 4,
6251
+ f
6252
+ );
6253
+ }
5925
6254
  };
5926
6255
 
5927
6256
 
@@ -6015,6 +6344,42 @@ proto.loyalty.GetLevelRequest.prototype.hasAdminSide = function() {
6015
6344
  };
6016
6345
 
6017
6346
 
6347
+ /**
6348
+ * optional string currency = 4;
6349
+ * @return {string}
6350
+ */
6351
+ proto.loyalty.GetLevelRequest.prototype.getCurrency = function() {
6352
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
6353
+ };
6354
+
6355
+
6356
+ /**
6357
+ * @param {string} value
6358
+ * @return {!proto.loyalty.GetLevelRequest} returns this
6359
+ */
6360
+ proto.loyalty.GetLevelRequest.prototype.setCurrency = function(value) {
6361
+ return jspb.Message.setField(this, 4, value);
6362
+ };
6363
+
6364
+
6365
+ /**
6366
+ * Clears the field making it undefined.
6367
+ * @return {!proto.loyalty.GetLevelRequest} returns this
6368
+ */
6369
+ proto.loyalty.GetLevelRequest.prototype.clearCurrency = function() {
6370
+ return jspb.Message.setField(this, 4, undefined);
6371
+ };
6372
+
6373
+
6374
+ /**
6375
+ * Returns whether this field is set.
6376
+ * @return {boolean}
6377
+ */
6378
+ proto.loyalty.GetLevelRequest.prototype.hasCurrency = function() {
6379
+ return jspb.Message.getField(this, 4) != null;
6380
+ };
6381
+
6382
+
6018
6383
 
6019
6384
 
6020
6385
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.648",
3
+ "version": "1.2.649",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {