protobuf-platform 1.2.578 → 1.2.580

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.
@@ -30,6 +30,7 @@ service Notification {
30
30
  rpc getMailTemplateTranslation(GetMailTemplateTranslationRequest) returns (MailTemplateTranslationResponse);
31
31
  //Users
32
32
  rpc sendNotificationToUsers(SendNotificationRequest) returns (NotificationStatusResponse);
33
+ rpc dispatchManualNotificationToSegments(DispatchManualNotificationRequest) returns (NotificationStatusResponse);
33
34
  rpc sendSms(SendSmsRequest) returns (SmsSendResponse);
34
35
  rpc getNotificationForParticularUser(PaginationRequest) returns (UserNotificationItemsResponse);
35
36
  rpc getNotificationsCountForUser(NotificationSearchRequest) returns (UserNotificationsCountResponse);
@@ -109,6 +110,10 @@ message SendNotificationRequest {
109
110
  int32 notification_id = 1;
110
111
  repeated int32 user_ids = 2;
111
112
  }
113
+ message DispatchManualNotificationRequest {
114
+ int32 notification_id = 1;
115
+ repeated int32 segment_ids = 2;
116
+ }
112
117
  message SendSmsRequest {
113
118
  string phone = 1;
114
119
  string message = 2;
@@ -26,6 +26,17 @@ function deserialize_notification_DeleteUserNotificationByIdRequest(buffer_arg)
26
26
  return notification_pb.DeleteUserNotificationByIdRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
27
  }
28
28
 
29
+ function serialize_notification_DispatchManualNotificationRequest(arg) {
30
+ if (!(arg instanceof notification_pb.DispatchManualNotificationRequest)) {
31
+ throw new Error('Expected argument of type notification.DispatchManualNotificationRequest');
32
+ }
33
+ return Buffer.from(arg.serializeBinary());
34
+ }
35
+
36
+ function deserialize_notification_DispatchManualNotificationRequest(buffer_arg) {
37
+ return notification_pb.DispatchManualNotificationRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
+ }
39
+
29
40
  function serialize_notification_File(arg) {
30
41
  if (!(arg instanceof notification_pb.File)) {
31
42
  throw new Error('Expected argument of type notification.File');
@@ -647,6 +658,17 @@ sendNotificationToUsers: {
647
658
  responseSerialize: serialize_notification_NotificationStatusResponse,
648
659
  responseDeserialize: deserialize_notification_NotificationStatusResponse,
649
660
  },
661
+ dispatchManualNotificationToSegments: {
662
+ path: '/notification.Notification/dispatchManualNotificationToSegments',
663
+ requestStream: false,
664
+ responseStream: false,
665
+ requestType: notification_pb.DispatchManualNotificationRequest,
666
+ responseType: notification_pb.NotificationStatusResponse,
667
+ requestSerialize: serialize_notification_DispatchManualNotificationRequest,
668
+ requestDeserialize: deserialize_notification_DispatchManualNotificationRequest,
669
+ responseSerialize: serialize_notification_NotificationStatusResponse,
670
+ responseDeserialize: deserialize_notification_NotificationStatusResponse,
671
+ },
650
672
  sendSms: {
651
673
  path: '/notification.Notification/sendSms',
652
674
  requestStream: false,
@@ -23,6 +23,7 @@ var global = (function() {
23
23
 
24
24
  goog.exportSymbol('proto.notification.DeleteAllUserNotificationsRequest', null, global);
25
25
  goog.exportSymbol('proto.notification.DeleteUserNotificationByIdRequest', null, global);
26
+ goog.exportSymbol('proto.notification.DispatchManualNotificationRequest', null, global);
26
27
  goog.exportSymbol('proto.notification.File', null, global);
27
28
  goog.exportSymbol('proto.notification.GetFileRequest', null, global);
28
29
  goog.exportSymbol('proto.notification.GetMailTemplateRequest', null, global);
@@ -317,6 +318,27 @@ if (goog.DEBUG && !COMPILED) {
317
318
  */
318
319
  proto.notification.SendNotificationRequest.displayName = 'proto.notification.SendNotificationRequest';
319
320
  }
321
+ /**
322
+ * Generated by JsPbCodeGenerator.
323
+ * @param {Array=} opt_data Optional initial data array, typically from a
324
+ * server response, or constructed directly in Javascript. The array is used
325
+ * in place and becomes part of the constructed object. It is not cloned.
326
+ * If no data is provided, the constructed object will be empty, but still
327
+ * valid.
328
+ * @extends {jspb.Message}
329
+ * @constructor
330
+ */
331
+ proto.notification.DispatchManualNotificationRequest = function(opt_data) {
332
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.notification.DispatchManualNotificationRequest.repeatedFields_, null);
333
+ };
334
+ goog.inherits(proto.notification.DispatchManualNotificationRequest, jspb.Message);
335
+ if (goog.DEBUG && !COMPILED) {
336
+ /**
337
+ * @public
338
+ * @override
339
+ */
340
+ proto.notification.DispatchManualNotificationRequest.displayName = 'proto.notification.DispatchManualNotificationRequest';
341
+ }
320
342
  /**
321
343
  * Generated by JsPbCodeGenerator.
322
344
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -4369,6 +4391,194 @@ proto.notification.SendNotificationRequest.prototype.clearUserIdsList = function
4369
4391
 
4370
4392
 
4371
4393
 
4394
+ /**
4395
+ * List of repeated fields within this message type.
4396
+ * @private {!Array<number>}
4397
+ * @const
4398
+ */
4399
+ proto.notification.DispatchManualNotificationRequest.repeatedFields_ = [2];
4400
+
4401
+
4402
+
4403
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4404
+ /**
4405
+ * Creates an object representation of this proto.
4406
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4407
+ * Optional fields that are not set will be set to undefined.
4408
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4409
+ * For the list of reserved names please see:
4410
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4411
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4412
+ * JSPB instance for transitional soy proto support:
4413
+ * http://goto/soy-param-migration
4414
+ * @return {!Object}
4415
+ */
4416
+ proto.notification.DispatchManualNotificationRequest.prototype.toObject = function(opt_includeInstance) {
4417
+ return proto.notification.DispatchManualNotificationRequest.toObject(opt_includeInstance, this);
4418
+ };
4419
+
4420
+
4421
+ /**
4422
+ * Static version of the {@see toObject} method.
4423
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4424
+ * the JSPB instance for transitional soy proto support:
4425
+ * http://goto/soy-param-migration
4426
+ * @param {!proto.notification.DispatchManualNotificationRequest} msg The msg instance to transform.
4427
+ * @return {!Object}
4428
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4429
+ */
4430
+ proto.notification.DispatchManualNotificationRequest.toObject = function(includeInstance, msg) {
4431
+ var f, obj = {
4432
+ notificationId: jspb.Message.getFieldWithDefault(msg, 1, 0),
4433
+ segmentIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
4434
+ };
4435
+
4436
+ if (includeInstance) {
4437
+ obj.$jspbMessageInstance = msg;
4438
+ }
4439
+ return obj;
4440
+ };
4441
+ }
4442
+
4443
+
4444
+ /**
4445
+ * Deserializes binary data (in protobuf wire format).
4446
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4447
+ * @return {!proto.notification.DispatchManualNotificationRequest}
4448
+ */
4449
+ proto.notification.DispatchManualNotificationRequest.deserializeBinary = function(bytes) {
4450
+ var reader = new jspb.BinaryReader(bytes);
4451
+ var msg = new proto.notification.DispatchManualNotificationRequest;
4452
+ return proto.notification.DispatchManualNotificationRequest.deserializeBinaryFromReader(msg, reader);
4453
+ };
4454
+
4455
+
4456
+ /**
4457
+ * Deserializes binary data (in protobuf wire format) from the
4458
+ * given reader into the given message object.
4459
+ * @param {!proto.notification.DispatchManualNotificationRequest} msg The message object to deserialize into.
4460
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4461
+ * @return {!proto.notification.DispatchManualNotificationRequest}
4462
+ */
4463
+ proto.notification.DispatchManualNotificationRequest.deserializeBinaryFromReader = function(msg, reader) {
4464
+ while (reader.nextField()) {
4465
+ if (reader.isEndGroup()) {
4466
+ break;
4467
+ }
4468
+ var field = reader.getFieldNumber();
4469
+ switch (field) {
4470
+ case 1:
4471
+ var value = /** @type {number} */ (reader.readInt32());
4472
+ msg.setNotificationId(value);
4473
+ break;
4474
+ case 2:
4475
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
4476
+ for (var i = 0; i < values.length; i++) {
4477
+ msg.addSegmentIds(values[i]);
4478
+ }
4479
+ break;
4480
+ default:
4481
+ reader.skipField();
4482
+ break;
4483
+ }
4484
+ }
4485
+ return msg;
4486
+ };
4487
+
4488
+
4489
+ /**
4490
+ * Serializes the message to binary data (in protobuf wire format).
4491
+ * @return {!Uint8Array}
4492
+ */
4493
+ proto.notification.DispatchManualNotificationRequest.prototype.serializeBinary = function() {
4494
+ var writer = new jspb.BinaryWriter();
4495
+ proto.notification.DispatchManualNotificationRequest.serializeBinaryToWriter(this, writer);
4496
+ return writer.getResultBuffer();
4497
+ };
4498
+
4499
+
4500
+ /**
4501
+ * Serializes the given message to binary data (in protobuf wire
4502
+ * format), writing to the given BinaryWriter.
4503
+ * @param {!proto.notification.DispatchManualNotificationRequest} message
4504
+ * @param {!jspb.BinaryWriter} writer
4505
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4506
+ */
4507
+ proto.notification.DispatchManualNotificationRequest.serializeBinaryToWriter = function(message, writer) {
4508
+ var f = undefined;
4509
+ f = message.getNotificationId();
4510
+ if (f !== 0) {
4511
+ writer.writeInt32(
4512
+ 1,
4513
+ f
4514
+ );
4515
+ }
4516
+ f = message.getSegmentIdsList();
4517
+ if (f.length > 0) {
4518
+ writer.writePackedInt32(
4519
+ 2,
4520
+ f
4521
+ );
4522
+ }
4523
+ };
4524
+
4525
+
4526
+ /**
4527
+ * optional int32 notification_id = 1;
4528
+ * @return {number}
4529
+ */
4530
+ proto.notification.DispatchManualNotificationRequest.prototype.getNotificationId = function() {
4531
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4532
+ };
4533
+
4534
+
4535
+ /**
4536
+ * @param {number} value
4537
+ * @return {!proto.notification.DispatchManualNotificationRequest} returns this
4538
+ */
4539
+ proto.notification.DispatchManualNotificationRequest.prototype.setNotificationId = function(value) {
4540
+ return jspb.Message.setProto3IntField(this, 1, value);
4541
+ };
4542
+
4543
+
4544
+ /**
4545
+ * repeated int32 segment_ids = 2;
4546
+ * @return {!Array<number>}
4547
+ */
4548
+ proto.notification.DispatchManualNotificationRequest.prototype.getSegmentIdsList = function() {
4549
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
4550
+ };
4551
+
4552
+
4553
+ /**
4554
+ * @param {!Array<number>} value
4555
+ * @return {!proto.notification.DispatchManualNotificationRequest} returns this
4556
+ */
4557
+ proto.notification.DispatchManualNotificationRequest.prototype.setSegmentIdsList = function(value) {
4558
+ return jspb.Message.setField(this, 2, value || []);
4559
+ };
4560
+
4561
+
4562
+ /**
4563
+ * @param {number} value
4564
+ * @param {number=} opt_index
4565
+ * @return {!proto.notification.DispatchManualNotificationRequest} returns this
4566
+ */
4567
+ proto.notification.DispatchManualNotificationRequest.prototype.addSegmentIds = function(value, opt_index) {
4568
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
4569
+ };
4570
+
4571
+
4572
+ /**
4573
+ * Clears the list making it empty but non-null.
4574
+ * @return {!proto.notification.DispatchManualNotificationRequest} returns this
4575
+ */
4576
+ proto.notification.DispatchManualNotificationRequest.prototype.clearSegmentIdsList = function() {
4577
+ return this.setSegmentIdsList([]);
4578
+ };
4579
+
4580
+
4581
+
4372
4582
 
4373
4583
 
4374
4584
  if (jspb.Message.GENERATE_TO_OBJECT) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.578",
3
+ "version": "1.2.580",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -947,6 +947,9 @@ message ManualDepositRequest {
947
947
  optional int64 payment_method_id = 8;
948
948
  optional string external_payment_id = 9;
949
949
  optional string external_transaction_id = 10;
950
+ // bonus_id and user_bonus_id are mutually exclusive optional bonus references for manual deposit.
951
+ optional int32 user_bonus_id = 11;
952
+ optional int32 bonus_id = 12;
950
953
  }
951
954
  message DepositReconciliationRequest {
952
955
  int32 deposit_id = 1;
@@ -40525,7 +40525,9 @@ proto.payment.ManualDepositRequest.toObject = function(includeInstance, msg) {
40525
40525
  amount: jspb.Message.getFieldWithDefault(msg, 7, ""),
40526
40526
  paymentMethodId: jspb.Message.getFieldWithDefault(msg, 8, 0),
40527
40527
  externalPaymentId: jspb.Message.getFieldWithDefault(msg, 9, ""),
40528
- externalTransactionId: jspb.Message.getFieldWithDefault(msg, 10, "")
40528
+ externalTransactionId: jspb.Message.getFieldWithDefault(msg, 10, ""),
40529
+ userBonusId: jspb.Message.getFieldWithDefault(msg, 11, 0),
40530
+ bonusId: jspb.Message.getFieldWithDefault(msg, 12, 0)
40529
40531
  };
40530
40532
 
40531
40533
  if (includeInstance) {
@@ -40602,6 +40604,14 @@ proto.payment.ManualDepositRequest.deserializeBinaryFromReader = function(msg, r
40602
40604
  var value = /** @type {string} */ (reader.readString());
40603
40605
  msg.setExternalTransactionId(value);
40604
40606
  break;
40607
+ case 11:
40608
+ var value = /** @type {number} */ (reader.readInt32());
40609
+ msg.setUserBonusId(value);
40610
+ break;
40611
+ case 12:
40612
+ var value = /** @type {number} */ (reader.readInt32());
40613
+ msg.setBonusId(value);
40614
+ break;
40605
40615
  default:
40606
40616
  reader.skipField();
40607
40617
  break;
@@ -40701,6 +40711,20 @@ proto.payment.ManualDepositRequest.serializeBinaryToWriter = function(message, w
40701
40711
  f
40702
40712
  );
40703
40713
  }
40714
+ f = /** @type {number} */ (jspb.Message.getField(message, 11));
40715
+ if (f != null) {
40716
+ writer.writeInt32(
40717
+ 11,
40718
+ f
40719
+ );
40720
+ }
40721
+ f = /** @type {number} */ (jspb.Message.getField(message, 12));
40722
+ if (f != null) {
40723
+ writer.writeInt32(
40724
+ 12,
40725
+ f
40726
+ );
40727
+ }
40704
40728
  };
40705
40729
 
40706
40730
 
@@ -40956,6 +40980,78 @@ proto.payment.ManualDepositRequest.prototype.hasExternalTransactionId = function
40956
40980
  };
40957
40981
 
40958
40982
 
40983
+ /**
40984
+ * optional int32 user_bonus_id = 11;
40985
+ * @return {number}
40986
+ */
40987
+ proto.payment.ManualDepositRequest.prototype.getUserBonusId = function() {
40988
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
40989
+ };
40990
+
40991
+
40992
+ /**
40993
+ * @param {number} value
40994
+ * @return {!proto.payment.ManualDepositRequest} returns this
40995
+ */
40996
+ proto.payment.ManualDepositRequest.prototype.setUserBonusId = function(value) {
40997
+ return jspb.Message.setField(this, 11, value);
40998
+ };
40999
+
41000
+
41001
+ /**
41002
+ * Clears the field making it undefined.
41003
+ * @return {!proto.payment.ManualDepositRequest} returns this
41004
+ */
41005
+ proto.payment.ManualDepositRequest.prototype.clearUserBonusId = function() {
41006
+ return jspb.Message.setField(this, 11, undefined);
41007
+ };
41008
+
41009
+
41010
+ /**
41011
+ * Returns whether this field is set.
41012
+ * @return {boolean}
41013
+ */
41014
+ proto.payment.ManualDepositRequest.prototype.hasUserBonusId = function() {
41015
+ return jspb.Message.getField(this, 11) != null;
41016
+ };
41017
+
41018
+
41019
+ /**
41020
+ * optional int32 bonus_id = 12;
41021
+ * @return {number}
41022
+ */
41023
+ proto.payment.ManualDepositRequest.prototype.getBonusId = function() {
41024
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
41025
+ };
41026
+
41027
+
41028
+ /**
41029
+ * @param {number} value
41030
+ * @return {!proto.payment.ManualDepositRequest} returns this
41031
+ */
41032
+ proto.payment.ManualDepositRequest.prototype.setBonusId = function(value) {
41033
+ return jspb.Message.setField(this, 12, value);
41034
+ };
41035
+
41036
+
41037
+ /**
41038
+ * Clears the field making it undefined.
41039
+ * @return {!proto.payment.ManualDepositRequest} returns this
41040
+ */
41041
+ proto.payment.ManualDepositRequest.prototype.clearBonusId = function() {
41042
+ return jspb.Message.setField(this, 12, undefined);
41043
+ };
41044
+
41045
+
41046
+ /**
41047
+ * Returns whether this field is set.
41048
+ * @return {boolean}
41049
+ */
41050
+ proto.payment.ManualDepositRequest.prototype.hasBonusId = function() {
41051
+ return jspb.Message.getField(this, 12) != null;
41052
+ };
41053
+
41054
+
40959
41055
 
40960
41056
 
40961
41057