protobuf-platform 1.0.293 → 1.0.295

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.
@@ -11,6 +11,9 @@ service Cashback {
11
11
  rpc updateSingleCashback(stream CashbackRequest) returns (CashbackResponse);
12
12
  rpc deleteSingleCashback(GetCashbackRequest) returns (CashbackStatusResponse);
13
13
  rpc readListCashbacks(PaginationRequest) returns (CashbackItemsResponse);
14
+ rpc setCashbackConfig(CashbackConfigRequest) returns (CashbackConfigItem);
15
+ //User
16
+ rpc getCashbackForUserByType(CashbackUserRequest) returns (CashbackResponse);
14
17
  }
15
18
  //Technical
16
19
  message PingRequest { string ping = 1; }
@@ -35,6 +38,7 @@ message CashbackItem {
35
38
  optional int32 level = 7;
36
39
  optional string type = 8;
37
40
  optional string checking_at = 9;
41
+ repeated CashbackConfigItem config = 10;
38
42
  }
39
43
  message CashbackRequest {
40
44
  oneof request {
@@ -67,4 +71,24 @@ message CashbackItemsResponse {
67
71
  message CashbackStatusResponse {
68
72
  string status = 1;
69
73
  }
74
+ message CashbackConfigRequest {
75
+ int32 cashback_id = 1;
76
+ string currency = 2;
77
+ optional float min = 3;
78
+ optional float max = 4;
79
+ optional float percentage = 5;
80
+ }
81
+
82
+ message CashbackConfigItem {
83
+ optional int32 cashback_id = 1;
84
+ optional string currency = 2;
85
+ optional float min = 3;
86
+ optional float max = 4;
87
+ optional float percentage = 5;
88
+ }
89
+ //User
90
+ message CashbackUserRequest {
91
+ int32 user_id = 1;
92
+ optional string cashback_type = 2;
93
+ }
70
94
 
@@ -4,6 +4,28 @@
4
4
  var grpc = require('@grpc/grpc-js');
5
5
  var cashback_pb = require('./cashback_pb.js');
6
6
 
7
+ function serialize_cashback_CashbackConfigItem(arg) {
8
+ if (!(arg instanceof cashback_pb.CashbackConfigItem)) {
9
+ throw new Error('Expected argument of type cashback.CashbackConfigItem');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_cashback_CashbackConfigItem(buffer_arg) {
15
+ return cashback_pb.CashbackConfigItem.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_cashback_CashbackConfigRequest(arg) {
19
+ if (!(arg instanceof cashback_pb.CashbackConfigRequest)) {
20
+ throw new Error('Expected argument of type cashback.CashbackConfigRequest');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_cashback_CashbackConfigRequest(buffer_arg) {
26
+ return cashback_pb.CashbackConfigRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
7
29
  function serialize_cashback_CashbackItemsResponse(arg) {
8
30
  if (!(arg instanceof cashback_pb.CashbackItemsResponse)) {
9
31
  throw new Error('Expected argument of type cashback.CashbackItemsResponse');
@@ -48,6 +70,17 @@ function deserialize_cashback_CashbackStatusResponse(buffer_arg) {
48
70
  return cashback_pb.CashbackStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
49
71
  }
50
72
 
73
+ function serialize_cashback_CashbackUserRequest(arg) {
74
+ if (!(arg instanceof cashback_pb.CashbackUserRequest)) {
75
+ throw new Error('Expected argument of type cashback.CashbackUserRequest');
76
+ }
77
+ return Buffer.from(arg.serializeBinary());
78
+ }
79
+
80
+ function deserialize_cashback_CashbackUserRequest(buffer_arg) {
81
+ return cashback_pb.CashbackUserRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
+ }
83
+
51
84
  function serialize_cashback_File(arg) {
52
85
  if (!(arg instanceof cashback_pb.File)) {
53
86
  throw new Error('Expected argument of type cashback.File');
@@ -194,6 +227,29 @@ createSingleCashback: {
194
227
  responseSerialize: serialize_cashback_CashbackItemsResponse,
195
228
  responseDeserialize: deserialize_cashback_CashbackItemsResponse,
196
229
  },
230
+ setCashbackConfig: {
231
+ path: '/cashback.Cashback/setCashbackConfig',
232
+ requestStream: false,
233
+ responseStream: false,
234
+ requestType: cashback_pb.CashbackConfigRequest,
235
+ responseType: cashback_pb.CashbackConfigItem,
236
+ requestSerialize: serialize_cashback_CashbackConfigRequest,
237
+ requestDeserialize: deserialize_cashback_CashbackConfigRequest,
238
+ responseSerialize: serialize_cashback_CashbackConfigItem,
239
+ responseDeserialize: deserialize_cashback_CashbackConfigItem,
240
+ },
241
+ // User
242
+ getCashbackForUserByType: {
243
+ path: '/cashback.Cashback/getCashbackForUserByType',
244
+ requestStream: false,
245
+ responseStream: false,
246
+ requestType: cashback_pb.CashbackUserRequest,
247
+ responseType: cashback_pb.CashbackResponse,
248
+ requestSerialize: serialize_cashback_CashbackUserRequest,
249
+ requestDeserialize: deserialize_cashback_CashbackUserRequest,
250
+ responseSerialize: serialize_cashback_CashbackResponse,
251
+ responseDeserialize: deserialize_cashback_CashbackResponse,
252
+ },
197
253
  };
198
254
 
199
255
  exports.CashbackClient = grpc.makeGenericClientConstructor(CashbackService);
@@ -21,6 +21,8 @@ var global = (function() {
21
21
  return Function('return this')();
22
22
  }.call(null));
23
23
 
24
+ goog.exportSymbol('proto.cashback.CashbackConfigItem', null, global);
25
+ goog.exportSymbol('proto.cashback.CashbackConfigRequest', null, global);
24
26
  goog.exportSymbol('proto.cashback.CashbackItem', null, global);
25
27
  goog.exportSymbol('proto.cashback.CashbackItemRequest', null, global);
26
28
  goog.exportSymbol('proto.cashback.CashbackItemsResponse', null, global);
@@ -28,6 +30,7 @@ goog.exportSymbol('proto.cashback.CashbackRequest', null, global);
28
30
  goog.exportSymbol('proto.cashback.CashbackRequest.RequestCase', null, global);
29
31
  goog.exportSymbol('proto.cashback.CashbackResponse', null, global);
30
32
  goog.exportSymbol('proto.cashback.CashbackStatusResponse', null, global);
33
+ goog.exportSymbol('proto.cashback.CashbackUserRequest', null, global);
31
34
  goog.exportSymbol('proto.cashback.File', null, global);
32
35
  goog.exportSymbol('proto.cashback.GetCashbackRequest', null, global);
33
36
  goog.exportSymbol('proto.cashback.GetFileRequest', null, global);
@@ -172,7 +175,7 @@ if (goog.DEBUG && !COMPILED) {
172
175
  * @constructor
173
176
  */
174
177
  proto.cashback.CashbackItem = function(opt_data) {
175
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
178
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.cashback.CashbackItem.repeatedFields_, null);
176
179
  };
177
180
  goog.inherits(proto.cashback.CashbackItem, jspb.Message);
178
181
  if (goog.DEBUG && !COMPILED) {
@@ -308,6 +311,69 @@ if (goog.DEBUG && !COMPILED) {
308
311
  */
309
312
  proto.cashback.CashbackStatusResponse.displayName = 'proto.cashback.CashbackStatusResponse';
310
313
  }
314
+ /**
315
+ * Generated by JsPbCodeGenerator.
316
+ * @param {Array=} opt_data Optional initial data array, typically from a
317
+ * server response, or constructed directly in Javascript. The array is used
318
+ * in place and becomes part of the constructed object. It is not cloned.
319
+ * If no data is provided, the constructed object will be empty, but still
320
+ * valid.
321
+ * @extends {jspb.Message}
322
+ * @constructor
323
+ */
324
+ proto.cashback.CashbackConfigRequest = function(opt_data) {
325
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
326
+ };
327
+ goog.inherits(proto.cashback.CashbackConfigRequest, jspb.Message);
328
+ if (goog.DEBUG && !COMPILED) {
329
+ /**
330
+ * @public
331
+ * @override
332
+ */
333
+ proto.cashback.CashbackConfigRequest.displayName = 'proto.cashback.CashbackConfigRequest';
334
+ }
335
+ /**
336
+ * Generated by JsPbCodeGenerator.
337
+ * @param {Array=} opt_data Optional initial data array, typically from a
338
+ * server response, or constructed directly in Javascript. The array is used
339
+ * in place and becomes part of the constructed object. It is not cloned.
340
+ * If no data is provided, the constructed object will be empty, but still
341
+ * valid.
342
+ * @extends {jspb.Message}
343
+ * @constructor
344
+ */
345
+ proto.cashback.CashbackConfigItem = function(opt_data) {
346
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
347
+ };
348
+ goog.inherits(proto.cashback.CashbackConfigItem, jspb.Message);
349
+ if (goog.DEBUG && !COMPILED) {
350
+ /**
351
+ * @public
352
+ * @override
353
+ */
354
+ proto.cashback.CashbackConfigItem.displayName = 'proto.cashback.CashbackConfigItem';
355
+ }
356
+ /**
357
+ * Generated by JsPbCodeGenerator.
358
+ * @param {Array=} opt_data Optional initial data array, typically from a
359
+ * server response, or constructed directly in Javascript. The array is used
360
+ * in place and becomes part of the constructed object. It is not cloned.
361
+ * If no data is provided, the constructed object will be empty, but still
362
+ * valid.
363
+ * @extends {jspb.Message}
364
+ * @constructor
365
+ */
366
+ proto.cashback.CashbackUserRequest = function(opt_data) {
367
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
368
+ };
369
+ goog.inherits(proto.cashback.CashbackUserRequest, jspb.Message);
370
+ if (goog.DEBUG && !COMPILED) {
371
+ /**
372
+ * @public
373
+ * @override
374
+ */
375
+ proto.cashback.CashbackUserRequest.displayName = 'proto.cashback.CashbackUserRequest';
376
+ }
311
377
 
312
378
 
313
379
 
@@ -1434,6 +1500,13 @@ proto.cashback.UserSearchRequest.prototype.hasCurrency = function() {
1434
1500
 
1435
1501
 
1436
1502
 
1503
+ /**
1504
+ * List of repeated fields within this message type.
1505
+ * @private {!Array<number>}
1506
+ * @const
1507
+ */
1508
+ proto.cashback.CashbackItem.repeatedFields_ = [10];
1509
+
1437
1510
 
1438
1511
 
1439
1512
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -1472,7 +1545,9 @@ proto.cashback.CashbackItem.toObject = function(includeInstance, msg) {
1472
1545
  image: jspb.Message.getFieldWithDefault(msg, 6, ""),
1473
1546
  level: jspb.Message.getFieldWithDefault(msg, 7, 0),
1474
1547
  type: jspb.Message.getFieldWithDefault(msg, 8, ""),
1475
- checkingAt: jspb.Message.getFieldWithDefault(msg, 9, "")
1548
+ checkingAt: jspb.Message.getFieldWithDefault(msg, 9, ""),
1549
+ configList: jspb.Message.toObjectList(msg.getConfigList(),
1550
+ proto.cashback.CashbackConfigItem.toObject, includeInstance)
1476
1551
  };
1477
1552
 
1478
1553
  if (includeInstance) {
@@ -1541,6 +1616,11 @@ proto.cashback.CashbackItem.deserializeBinaryFromReader = function(msg, reader)
1541
1616
  var value = /** @type {string} */ (reader.readString());
1542
1617
  msg.setCheckingAt(value);
1543
1618
  break;
1619
+ case 10:
1620
+ var value = new proto.cashback.CashbackConfigItem;
1621
+ reader.readMessage(value,proto.cashback.CashbackConfigItem.deserializeBinaryFromReader);
1622
+ msg.addConfig(value);
1623
+ break;
1544
1624
  default:
1545
1625
  reader.skipField();
1546
1626
  break;
@@ -1626,6 +1706,14 @@ proto.cashback.CashbackItem.serializeBinaryToWriter = function(message, writer)
1626
1706
  f
1627
1707
  );
1628
1708
  }
1709
+ f = message.getConfigList();
1710
+ if (f.length > 0) {
1711
+ writer.writeRepeatedMessage(
1712
+ 10,
1713
+ f,
1714
+ proto.cashback.CashbackConfigItem.serializeBinaryToWriter
1715
+ );
1716
+ }
1629
1717
  };
1630
1718
 
1631
1719
 
@@ -1917,6 +2005,44 @@ proto.cashback.CashbackItem.prototype.hasCheckingAt = function() {
1917
2005
  };
1918
2006
 
1919
2007
 
2008
+ /**
2009
+ * repeated CashbackConfigItem config = 10;
2010
+ * @return {!Array<!proto.cashback.CashbackConfigItem>}
2011
+ */
2012
+ proto.cashback.CashbackItem.prototype.getConfigList = function() {
2013
+ return /** @type{!Array<!proto.cashback.CashbackConfigItem>} */ (
2014
+ jspb.Message.getRepeatedWrapperField(this, proto.cashback.CashbackConfigItem, 10));
2015
+ };
2016
+
2017
+
2018
+ /**
2019
+ * @param {!Array<!proto.cashback.CashbackConfigItem>} value
2020
+ * @return {!proto.cashback.CashbackItem} returns this
2021
+ */
2022
+ proto.cashback.CashbackItem.prototype.setConfigList = function(value) {
2023
+ return jspb.Message.setRepeatedWrapperField(this, 10, value);
2024
+ };
2025
+
2026
+
2027
+ /**
2028
+ * @param {!proto.cashback.CashbackConfigItem=} opt_value
2029
+ * @param {number=} opt_index
2030
+ * @return {!proto.cashback.CashbackConfigItem}
2031
+ */
2032
+ proto.cashback.CashbackItem.prototype.addConfig = function(opt_value, opt_index) {
2033
+ return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.cashback.CashbackConfigItem, opt_index);
2034
+ };
2035
+
2036
+
2037
+ /**
2038
+ * Clears the list making it empty but non-null.
2039
+ * @return {!proto.cashback.CashbackItem} returns this
2040
+ */
2041
+ proto.cashback.CashbackItem.prototype.clearConfigList = function() {
2042
+ return this.setConfigList([]);
2043
+ };
2044
+
2045
+
1920
2046
 
1921
2047
  /**
1922
2048
  * Oneof group definitions for this message. Each group defines the field
@@ -3296,4 +3422,826 @@ proto.cashback.CashbackStatusResponse.prototype.setStatus = function(value) {
3296
3422
  };
3297
3423
 
3298
3424
 
3425
+
3426
+
3427
+
3428
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3429
+ /**
3430
+ * Creates an object representation of this proto.
3431
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3432
+ * Optional fields that are not set will be set to undefined.
3433
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3434
+ * For the list of reserved names please see:
3435
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3436
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3437
+ * JSPB instance for transitional soy proto support:
3438
+ * http://goto/soy-param-migration
3439
+ * @return {!Object}
3440
+ */
3441
+ proto.cashback.CashbackConfigRequest.prototype.toObject = function(opt_includeInstance) {
3442
+ return proto.cashback.CashbackConfigRequest.toObject(opt_includeInstance, this);
3443
+ };
3444
+
3445
+
3446
+ /**
3447
+ * Static version of the {@see toObject} method.
3448
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3449
+ * the JSPB instance for transitional soy proto support:
3450
+ * http://goto/soy-param-migration
3451
+ * @param {!proto.cashback.CashbackConfigRequest} msg The msg instance to transform.
3452
+ * @return {!Object}
3453
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3454
+ */
3455
+ proto.cashback.CashbackConfigRequest.toObject = function(includeInstance, msg) {
3456
+ var f, obj = {
3457
+ cashbackId: jspb.Message.getFieldWithDefault(msg, 1, 0),
3458
+ currency: jspb.Message.getFieldWithDefault(msg, 2, ""),
3459
+ min: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
3460
+ max: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
3461
+ percentage: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0)
3462
+ };
3463
+
3464
+ if (includeInstance) {
3465
+ obj.$jspbMessageInstance = msg;
3466
+ }
3467
+ return obj;
3468
+ };
3469
+ }
3470
+
3471
+
3472
+ /**
3473
+ * Deserializes binary data (in protobuf wire format).
3474
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3475
+ * @return {!proto.cashback.CashbackConfigRequest}
3476
+ */
3477
+ proto.cashback.CashbackConfigRequest.deserializeBinary = function(bytes) {
3478
+ var reader = new jspb.BinaryReader(bytes);
3479
+ var msg = new proto.cashback.CashbackConfigRequest;
3480
+ return proto.cashback.CashbackConfigRequest.deserializeBinaryFromReader(msg, reader);
3481
+ };
3482
+
3483
+
3484
+ /**
3485
+ * Deserializes binary data (in protobuf wire format) from the
3486
+ * given reader into the given message object.
3487
+ * @param {!proto.cashback.CashbackConfigRequest} msg The message object to deserialize into.
3488
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3489
+ * @return {!proto.cashback.CashbackConfigRequest}
3490
+ */
3491
+ proto.cashback.CashbackConfigRequest.deserializeBinaryFromReader = function(msg, reader) {
3492
+ while (reader.nextField()) {
3493
+ if (reader.isEndGroup()) {
3494
+ break;
3495
+ }
3496
+ var field = reader.getFieldNumber();
3497
+ switch (field) {
3498
+ case 1:
3499
+ var value = /** @type {number} */ (reader.readInt32());
3500
+ msg.setCashbackId(value);
3501
+ break;
3502
+ case 2:
3503
+ var value = /** @type {string} */ (reader.readString());
3504
+ msg.setCurrency(value);
3505
+ break;
3506
+ case 3:
3507
+ var value = /** @type {number} */ (reader.readFloat());
3508
+ msg.setMin(value);
3509
+ break;
3510
+ case 4:
3511
+ var value = /** @type {number} */ (reader.readFloat());
3512
+ msg.setMax(value);
3513
+ break;
3514
+ case 5:
3515
+ var value = /** @type {number} */ (reader.readFloat());
3516
+ msg.setPercentage(value);
3517
+ break;
3518
+ default:
3519
+ reader.skipField();
3520
+ break;
3521
+ }
3522
+ }
3523
+ return msg;
3524
+ };
3525
+
3526
+
3527
+ /**
3528
+ * Serializes the message to binary data (in protobuf wire format).
3529
+ * @return {!Uint8Array}
3530
+ */
3531
+ proto.cashback.CashbackConfigRequest.prototype.serializeBinary = function() {
3532
+ var writer = new jspb.BinaryWriter();
3533
+ proto.cashback.CashbackConfigRequest.serializeBinaryToWriter(this, writer);
3534
+ return writer.getResultBuffer();
3535
+ };
3536
+
3537
+
3538
+ /**
3539
+ * Serializes the given message to binary data (in protobuf wire
3540
+ * format), writing to the given BinaryWriter.
3541
+ * @param {!proto.cashback.CashbackConfigRequest} message
3542
+ * @param {!jspb.BinaryWriter} writer
3543
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3544
+ */
3545
+ proto.cashback.CashbackConfigRequest.serializeBinaryToWriter = function(message, writer) {
3546
+ var f = undefined;
3547
+ f = message.getCashbackId();
3548
+ if (f !== 0) {
3549
+ writer.writeInt32(
3550
+ 1,
3551
+ f
3552
+ );
3553
+ }
3554
+ f = message.getCurrency();
3555
+ if (f.length > 0) {
3556
+ writer.writeString(
3557
+ 2,
3558
+ f
3559
+ );
3560
+ }
3561
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
3562
+ if (f != null) {
3563
+ writer.writeFloat(
3564
+ 3,
3565
+ f
3566
+ );
3567
+ }
3568
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
3569
+ if (f != null) {
3570
+ writer.writeFloat(
3571
+ 4,
3572
+ f
3573
+ );
3574
+ }
3575
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
3576
+ if (f != null) {
3577
+ writer.writeFloat(
3578
+ 5,
3579
+ f
3580
+ );
3581
+ }
3582
+ };
3583
+
3584
+
3585
+ /**
3586
+ * optional int32 cashback_id = 1;
3587
+ * @return {number}
3588
+ */
3589
+ proto.cashback.CashbackConfigRequest.prototype.getCashbackId = function() {
3590
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3591
+ };
3592
+
3593
+
3594
+ /**
3595
+ * @param {number} value
3596
+ * @return {!proto.cashback.CashbackConfigRequest} returns this
3597
+ */
3598
+ proto.cashback.CashbackConfigRequest.prototype.setCashbackId = function(value) {
3599
+ return jspb.Message.setProto3IntField(this, 1, value);
3600
+ };
3601
+
3602
+
3603
+ /**
3604
+ * optional string currency = 2;
3605
+ * @return {string}
3606
+ */
3607
+ proto.cashback.CashbackConfigRequest.prototype.getCurrency = function() {
3608
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3609
+ };
3610
+
3611
+
3612
+ /**
3613
+ * @param {string} value
3614
+ * @return {!proto.cashback.CashbackConfigRequest} returns this
3615
+ */
3616
+ proto.cashback.CashbackConfigRequest.prototype.setCurrency = function(value) {
3617
+ return jspb.Message.setProto3StringField(this, 2, value);
3618
+ };
3619
+
3620
+
3621
+ /**
3622
+ * optional float min = 3;
3623
+ * @return {number}
3624
+ */
3625
+ proto.cashback.CashbackConfigRequest.prototype.getMin = function() {
3626
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
3627
+ };
3628
+
3629
+
3630
+ /**
3631
+ * @param {number} value
3632
+ * @return {!proto.cashback.CashbackConfigRequest} returns this
3633
+ */
3634
+ proto.cashback.CashbackConfigRequest.prototype.setMin = function(value) {
3635
+ return jspb.Message.setField(this, 3, value);
3636
+ };
3637
+
3638
+
3639
+ /**
3640
+ * Clears the field making it undefined.
3641
+ * @return {!proto.cashback.CashbackConfigRequest} returns this
3642
+ */
3643
+ proto.cashback.CashbackConfigRequest.prototype.clearMin = function() {
3644
+ return jspb.Message.setField(this, 3, undefined);
3645
+ };
3646
+
3647
+
3648
+ /**
3649
+ * Returns whether this field is set.
3650
+ * @return {boolean}
3651
+ */
3652
+ proto.cashback.CashbackConfigRequest.prototype.hasMin = function() {
3653
+ return jspb.Message.getField(this, 3) != null;
3654
+ };
3655
+
3656
+
3657
+ /**
3658
+ * optional float max = 4;
3659
+ * @return {number}
3660
+ */
3661
+ proto.cashback.CashbackConfigRequest.prototype.getMax = function() {
3662
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
3663
+ };
3664
+
3665
+
3666
+ /**
3667
+ * @param {number} value
3668
+ * @return {!proto.cashback.CashbackConfigRequest} returns this
3669
+ */
3670
+ proto.cashback.CashbackConfigRequest.prototype.setMax = function(value) {
3671
+ return jspb.Message.setField(this, 4, value);
3672
+ };
3673
+
3674
+
3675
+ /**
3676
+ * Clears the field making it undefined.
3677
+ * @return {!proto.cashback.CashbackConfigRequest} returns this
3678
+ */
3679
+ proto.cashback.CashbackConfigRequest.prototype.clearMax = function() {
3680
+ return jspb.Message.setField(this, 4, undefined);
3681
+ };
3682
+
3683
+
3684
+ /**
3685
+ * Returns whether this field is set.
3686
+ * @return {boolean}
3687
+ */
3688
+ proto.cashback.CashbackConfigRequest.prototype.hasMax = function() {
3689
+ return jspb.Message.getField(this, 4) != null;
3690
+ };
3691
+
3692
+
3693
+ /**
3694
+ * optional float percentage = 5;
3695
+ * @return {number}
3696
+ */
3697
+ proto.cashback.CashbackConfigRequest.prototype.getPercentage = function() {
3698
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
3699
+ };
3700
+
3701
+
3702
+ /**
3703
+ * @param {number} value
3704
+ * @return {!proto.cashback.CashbackConfigRequest} returns this
3705
+ */
3706
+ proto.cashback.CashbackConfigRequest.prototype.setPercentage = function(value) {
3707
+ return jspb.Message.setField(this, 5, value);
3708
+ };
3709
+
3710
+
3711
+ /**
3712
+ * Clears the field making it undefined.
3713
+ * @return {!proto.cashback.CashbackConfigRequest} returns this
3714
+ */
3715
+ proto.cashback.CashbackConfigRequest.prototype.clearPercentage = function() {
3716
+ return jspb.Message.setField(this, 5, undefined);
3717
+ };
3718
+
3719
+
3720
+ /**
3721
+ * Returns whether this field is set.
3722
+ * @return {boolean}
3723
+ */
3724
+ proto.cashback.CashbackConfigRequest.prototype.hasPercentage = function() {
3725
+ return jspb.Message.getField(this, 5) != null;
3726
+ };
3727
+
3728
+
3729
+
3730
+
3731
+
3732
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3733
+ /**
3734
+ * Creates an object representation of this proto.
3735
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3736
+ * Optional fields that are not set will be set to undefined.
3737
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3738
+ * For the list of reserved names please see:
3739
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3740
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3741
+ * JSPB instance for transitional soy proto support:
3742
+ * http://goto/soy-param-migration
3743
+ * @return {!Object}
3744
+ */
3745
+ proto.cashback.CashbackConfigItem.prototype.toObject = function(opt_includeInstance) {
3746
+ return proto.cashback.CashbackConfigItem.toObject(opt_includeInstance, this);
3747
+ };
3748
+
3749
+
3750
+ /**
3751
+ * Static version of the {@see toObject} method.
3752
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3753
+ * the JSPB instance for transitional soy proto support:
3754
+ * http://goto/soy-param-migration
3755
+ * @param {!proto.cashback.CashbackConfigItem} msg The msg instance to transform.
3756
+ * @return {!Object}
3757
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3758
+ */
3759
+ proto.cashback.CashbackConfigItem.toObject = function(includeInstance, msg) {
3760
+ var f, obj = {
3761
+ cashbackId: jspb.Message.getFieldWithDefault(msg, 1, 0),
3762
+ currency: jspb.Message.getFieldWithDefault(msg, 2, ""),
3763
+ min: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
3764
+ max: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
3765
+ percentage: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0)
3766
+ };
3767
+
3768
+ if (includeInstance) {
3769
+ obj.$jspbMessageInstance = msg;
3770
+ }
3771
+ return obj;
3772
+ };
3773
+ }
3774
+
3775
+
3776
+ /**
3777
+ * Deserializes binary data (in protobuf wire format).
3778
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3779
+ * @return {!proto.cashback.CashbackConfigItem}
3780
+ */
3781
+ proto.cashback.CashbackConfigItem.deserializeBinary = function(bytes) {
3782
+ var reader = new jspb.BinaryReader(bytes);
3783
+ var msg = new proto.cashback.CashbackConfigItem;
3784
+ return proto.cashback.CashbackConfigItem.deserializeBinaryFromReader(msg, reader);
3785
+ };
3786
+
3787
+
3788
+ /**
3789
+ * Deserializes binary data (in protobuf wire format) from the
3790
+ * given reader into the given message object.
3791
+ * @param {!proto.cashback.CashbackConfigItem} msg The message object to deserialize into.
3792
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3793
+ * @return {!proto.cashback.CashbackConfigItem}
3794
+ */
3795
+ proto.cashback.CashbackConfigItem.deserializeBinaryFromReader = function(msg, reader) {
3796
+ while (reader.nextField()) {
3797
+ if (reader.isEndGroup()) {
3798
+ break;
3799
+ }
3800
+ var field = reader.getFieldNumber();
3801
+ switch (field) {
3802
+ case 1:
3803
+ var value = /** @type {number} */ (reader.readInt32());
3804
+ msg.setCashbackId(value);
3805
+ break;
3806
+ case 2:
3807
+ var value = /** @type {string} */ (reader.readString());
3808
+ msg.setCurrency(value);
3809
+ break;
3810
+ case 3:
3811
+ var value = /** @type {number} */ (reader.readFloat());
3812
+ msg.setMin(value);
3813
+ break;
3814
+ case 4:
3815
+ var value = /** @type {number} */ (reader.readFloat());
3816
+ msg.setMax(value);
3817
+ break;
3818
+ case 5:
3819
+ var value = /** @type {number} */ (reader.readFloat());
3820
+ msg.setPercentage(value);
3821
+ break;
3822
+ default:
3823
+ reader.skipField();
3824
+ break;
3825
+ }
3826
+ }
3827
+ return msg;
3828
+ };
3829
+
3830
+
3831
+ /**
3832
+ * Serializes the message to binary data (in protobuf wire format).
3833
+ * @return {!Uint8Array}
3834
+ */
3835
+ proto.cashback.CashbackConfigItem.prototype.serializeBinary = function() {
3836
+ var writer = new jspb.BinaryWriter();
3837
+ proto.cashback.CashbackConfigItem.serializeBinaryToWriter(this, writer);
3838
+ return writer.getResultBuffer();
3839
+ };
3840
+
3841
+
3842
+ /**
3843
+ * Serializes the given message to binary data (in protobuf wire
3844
+ * format), writing to the given BinaryWriter.
3845
+ * @param {!proto.cashback.CashbackConfigItem} message
3846
+ * @param {!jspb.BinaryWriter} writer
3847
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3848
+ */
3849
+ proto.cashback.CashbackConfigItem.serializeBinaryToWriter = function(message, writer) {
3850
+ var f = undefined;
3851
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
3852
+ if (f != null) {
3853
+ writer.writeInt32(
3854
+ 1,
3855
+ f
3856
+ );
3857
+ }
3858
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
3859
+ if (f != null) {
3860
+ writer.writeString(
3861
+ 2,
3862
+ f
3863
+ );
3864
+ }
3865
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
3866
+ if (f != null) {
3867
+ writer.writeFloat(
3868
+ 3,
3869
+ f
3870
+ );
3871
+ }
3872
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
3873
+ if (f != null) {
3874
+ writer.writeFloat(
3875
+ 4,
3876
+ f
3877
+ );
3878
+ }
3879
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
3880
+ if (f != null) {
3881
+ writer.writeFloat(
3882
+ 5,
3883
+ f
3884
+ );
3885
+ }
3886
+ };
3887
+
3888
+
3889
+ /**
3890
+ * optional int32 cashback_id = 1;
3891
+ * @return {number}
3892
+ */
3893
+ proto.cashback.CashbackConfigItem.prototype.getCashbackId = function() {
3894
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3895
+ };
3896
+
3897
+
3898
+ /**
3899
+ * @param {number} value
3900
+ * @return {!proto.cashback.CashbackConfigItem} returns this
3901
+ */
3902
+ proto.cashback.CashbackConfigItem.prototype.setCashbackId = function(value) {
3903
+ return jspb.Message.setField(this, 1, value);
3904
+ };
3905
+
3906
+
3907
+ /**
3908
+ * Clears the field making it undefined.
3909
+ * @return {!proto.cashback.CashbackConfigItem} returns this
3910
+ */
3911
+ proto.cashback.CashbackConfigItem.prototype.clearCashbackId = function() {
3912
+ return jspb.Message.setField(this, 1, undefined);
3913
+ };
3914
+
3915
+
3916
+ /**
3917
+ * Returns whether this field is set.
3918
+ * @return {boolean}
3919
+ */
3920
+ proto.cashback.CashbackConfigItem.prototype.hasCashbackId = function() {
3921
+ return jspb.Message.getField(this, 1) != null;
3922
+ };
3923
+
3924
+
3925
+ /**
3926
+ * optional string currency = 2;
3927
+ * @return {string}
3928
+ */
3929
+ proto.cashback.CashbackConfigItem.prototype.getCurrency = function() {
3930
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3931
+ };
3932
+
3933
+
3934
+ /**
3935
+ * @param {string} value
3936
+ * @return {!proto.cashback.CashbackConfigItem} returns this
3937
+ */
3938
+ proto.cashback.CashbackConfigItem.prototype.setCurrency = function(value) {
3939
+ return jspb.Message.setField(this, 2, value);
3940
+ };
3941
+
3942
+
3943
+ /**
3944
+ * Clears the field making it undefined.
3945
+ * @return {!proto.cashback.CashbackConfigItem} returns this
3946
+ */
3947
+ proto.cashback.CashbackConfigItem.prototype.clearCurrency = function() {
3948
+ return jspb.Message.setField(this, 2, undefined);
3949
+ };
3950
+
3951
+
3952
+ /**
3953
+ * Returns whether this field is set.
3954
+ * @return {boolean}
3955
+ */
3956
+ proto.cashback.CashbackConfigItem.prototype.hasCurrency = function() {
3957
+ return jspb.Message.getField(this, 2) != null;
3958
+ };
3959
+
3960
+
3961
+ /**
3962
+ * optional float min = 3;
3963
+ * @return {number}
3964
+ */
3965
+ proto.cashback.CashbackConfigItem.prototype.getMin = function() {
3966
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
3967
+ };
3968
+
3969
+
3970
+ /**
3971
+ * @param {number} value
3972
+ * @return {!proto.cashback.CashbackConfigItem} returns this
3973
+ */
3974
+ proto.cashback.CashbackConfigItem.prototype.setMin = function(value) {
3975
+ return jspb.Message.setField(this, 3, value);
3976
+ };
3977
+
3978
+
3979
+ /**
3980
+ * Clears the field making it undefined.
3981
+ * @return {!proto.cashback.CashbackConfigItem} returns this
3982
+ */
3983
+ proto.cashback.CashbackConfigItem.prototype.clearMin = function() {
3984
+ return jspb.Message.setField(this, 3, undefined);
3985
+ };
3986
+
3987
+
3988
+ /**
3989
+ * Returns whether this field is set.
3990
+ * @return {boolean}
3991
+ */
3992
+ proto.cashback.CashbackConfigItem.prototype.hasMin = function() {
3993
+ return jspb.Message.getField(this, 3) != null;
3994
+ };
3995
+
3996
+
3997
+ /**
3998
+ * optional float max = 4;
3999
+ * @return {number}
4000
+ */
4001
+ proto.cashback.CashbackConfigItem.prototype.getMax = function() {
4002
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
4003
+ };
4004
+
4005
+
4006
+ /**
4007
+ * @param {number} value
4008
+ * @return {!proto.cashback.CashbackConfigItem} returns this
4009
+ */
4010
+ proto.cashback.CashbackConfigItem.prototype.setMax = function(value) {
4011
+ return jspb.Message.setField(this, 4, value);
4012
+ };
4013
+
4014
+
4015
+ /**
4016
+ * Clears the field making it undefined.
4017
+ * @return {!proto.cashback.CashbackConfigItem} returns this
4018
+ */
4019
+ proto.cashback.CashbackConfigItem.prototype.clearMax = function() {
4020
+ return jspb.Message.setField(this, 4, undefined);
4021
+ };
4022
+
4023
+
4024
+ /**
4025
+ * Returns whether this field is set.
4026
+ * @return {boolean}
4027
+ */
4028
+ proto.cashback.CashbackConfigItem.prototype.hasMax = function() {
4029
+ return jspb.Message.getField(this, 4) != null;
4030
+ };
4031
+
4032
+
4033
+ /**
4034
+ * optional float percentage = 5;
4035
+ * @return {number}
4036
+ */
4037
+ proto.cashback.CashbackConfigItem.prototype.getPercentage = function() {
4038
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
4039
+ };
4040
+
4041
+
4042
+ /**
4043
+ * @param {number} value
4044
+ * @return {!proto.cashback.CashbackConfigItem} returns this
4045
+ */
4046
+ proto.cashback.CashbackConfigItem.prototype.setPercentage = function(value) {
4047
+ return jspb.Message.setField(this, 5, value);
4048
+ };
4049
+
4050
+
4051
+ /**
4052
+ * Clears the field making it undefined.
4053
+ * @return {!proto.cashback.CashbackConfigItem} returns this
4054
+ */
4055
+ proto.cashback.CashbackConfigItem.prototype.clearPercentage = function() {
4056
+ return jspb.Message.setField(this, 5, undefined);
4057
+ };
4058
+
4059
+
4060
+ /**
4061
+ * Returns whether this field is set.
4062
+ * @return {boolean}
4063
+ */
4064
+ proto.cashback.CashbackConfigItem.prototype.hasPercentage = function() {
4065
+ return jspb.Message.getField(this, 5) != null;
4066
+ };
4067
+
4068
+
4069
+
4070
+
4071
+
4072
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4073
+ /**
4074
+ * Creates an object representation of this proto.
4075
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4076
+ * Optional fields that are not set will be set to undefined.
4077
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4078
+ * For the list of reserved names please see:
4079
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4080
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4081
+ * JSPB instance for transitional soy proto support:
4082
+ * http://goto/soy-param-migration
4083
+ * @return {!Object}
4084
+ */
4085
+ proto.cashback.CashbackUserRequest.prototype.toObject = function(opt_includeInstance) {
4086
+ return proto.cashback.CashbackUserRequest.toObject(opt_includeInstance, this);
4087
+ };
4088
+
4089
+
4090
+ /**
4091
+ * Static version of the {@see toObject} method.
4092
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4093
+ * the JSPB instance for transitional soy proto support:
4094
+ * http://goto/soy-param-migration
4095
+ * @param {!proto.cashback.CashbackUserRequest} msg The msg instance to transform.
4096
+ * @return {!Object}
4097
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4098
+ */
4099
+ proto.cashback.CashbackUserRequest.toObject = function(includeInstance, msg) {
4100
+ var f, obj = {
4101
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
4102
+ cashbackType: jspb.Message.getFieldWithDefault(msg, 2, "")
4103
+ };
4104
+
4105
+ if (includeInstance) {
4106
+ obj.$jspbMessageInstance = msg;
4107
+ }
4108
+ return obj;
4109
+ };
4110
+ }
4111
+
4112
+
4113
+ /**
4114
+ * Deserializes binary data (in protobuf wire format).
4115
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4116
+ * @return {!proto.cashback.CashbackUserRequest}
4117
+ */
4118
+ proto.cashback.CashbackUserRequest.deserializeBinary = function(bytes) {
4119
+ var reader = new jspb.BinaryReader(bytes);
4120
+ var msg = new proto.cashback.CashbackUserRequest;
4121
+ return proto.cashback.CashbackUserRequest.deserializeBinaryFromReader(msg, reader);
4122
+ };
4123
+
4124
+
4125
+ /**
4126
+ * Deserializes binary data (in protobuf wire format) from the
4127
+ * given reader into the given message object.
4128
+ * @param {!proto.cashback.CashbackUserRequest} msg The message object to deserialize into.
4129
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4130
+ * @return {!proto.cashback.CashbackUserRequest}
4131
+ */
4132
+ proto.cashback.CashbackUserRequest.deserializeBinaryFromReader = function(msg, reader) {
4133
+ while (reader.nextField()) {
4134
+ if (reader.isEndGroup()) {
4135
+ break;
4136
+ }
4137
+ var field = reader.getFieldNumber();
4138
+ switch (field) {
4139
+ case 1:
4140
+ var value = /** @type {number} */ (reader.readInt32());
4141
+ msg.setUserId(value);
4142
+ break;
4143
+ case 2:
4144
+ var value = /** @type {string} */ (reader.readString());
4145
+ msg.setCashbackType(value);
4146
+ break;
4147
+ default:
4148
+ reader.skipField();
4149
+ break;
4150
+ }
4151
+ }
4152
+ return msg;
4153
+ };
4154
+
4155
+
4156
+ /**
4157
+ * Serializes the message to binary data (in protobuf wire format).
4158
+ * @return {!Uint8Array}
4159
+ */
4160
+ proto.cashback.CashbackUserRequest.prototype.serializeBinary = function() {
4161
+ var writer = new jspb.BinaryWriter();
4162
+ proto.cashback.CashbackUserRequest.serializeBinaryToWriter(this, writer);
4163
+ return writer.getResultBuffer();
4164
+ };
4165
+
4166
+
4167
+ /**
4168
+ * Serializes the given message to binary data (in protobuf wire
4169
+ * format), writing to the given BinaryWriter.
4170
+ * @param {!proto.cashback.CashbackUserRequest} message
4171
+ * @param {!jspb.BinaryWriter} writer
4172
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4173
+ */
4174
+ proto.cashback.CashbackUserRequest.serializeBinaryToWriter = function(message, writer) {
4175
+ var f = undefined;
4176
+ f = message.getUserId();
4177
+ if (f !== 0) {
4178
+ writer.writeInt32(
4179
+ 1,
4180
+ f
4181
+ );
4182
+ }
4183
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
4184
+ if (f != null) {
4185
+ writer.writeString(
4186
+ 2,
4187
+ f
4188
+ );
4189
+ }
4190
+ };
4191
+
4192
+
4193
+ /**
4194
+ * optional int32 user_id = 1;
4195
+ * @return {number}
4196
+ */
4197
+ proto.cashback.CashbackUserRequest.prototype.getUserId = function() {
4198
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4199
+ };
4200
+
4201
+
4202
+ /**
4203
+ * @param {number} value
4204
+ * @return {!proto.cashback.CashbackUserRequest} returns this
4205
+ */
4206
+ proto.cashback.CashbackUserRequest.prototype.setUserId = function(value) {
4207
+ return jspb.Message.setProto3IntField(this, 1, value);
4208
+ };
4209
+
4210
+
4211
+ /**
4212
+ * optional string cashback_type = 2;
4213
+ * @return {string}
4214
+ */
4215
+ proto.cashback.CashbackUserRequest.prototype.getCashbackType = function() {
4216
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
4217
+ };
4218
+
4219
+
4220
+ /**
4221
+ * @param {string} value
4222
+ * @return {!proto.cashback.CashbackUserRequest} returns this
4223
+ */
4224
+ proto.cashback.CashbackUserRequest.prototype.setCashbackType = function(value) {
4225
+ return jspb.Message.setField(this, 2, value);
4226
+ };
4227
+
4228
+
4229
+ /**
4230
+ * Clears the field making it undefined.
4231
+ * @return {!proto.cashback.CashbackUserRequest} returns this
4232
+ */
4233
+ proto.cashback.CashbackUserRequest.prototype.clearCashbackType = function() {
4234
+ return jspb.Message.setField(this, 2, undefined);
4235
+ };
4236
+
4237
+
4238
+ /**
4239
+ * Returns whether this field is set.
4240
+ * @return {boolean}
4241
+ */
4242
+ proto.cashback.CashbackUserRequest.prototype.hasCashbackType = function() {
4243
+ return jspb.Message.getField(this, 2) != null;
4244
+ };
4245
+
4246
+
3299
4247
  goog.object.extend(exports, proto.cashback);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.293",
3
+ "version": "1.0.295",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {