protobuf-platform 1.2.580 → 1.2.583

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.
@@ -106,9 +106,14 @@ message NotificationRequest {
106
106
  message GetNotificationRequest {
107
107
  int32 id = 1;
108
108
  }
109
+ message NotificationRecipient {
110
+ int32 user_id = 1;
111
+ string public_id = 2;
112
+ }
109
113
  message SendNotificationRequest {
110
114
  int32 notification_id = 1;
111
115
  repeated int32 user_ids = 2;
116
+ repeated NotificationRecipient recipients = 3;
112
117
  }
113
118
  message DispatchManualNotificationRequest {
114
119
  int32 notification_id = 1;
@@ -45,6 +45,7 @@ goog.exportSymbol('proto.notification.MailTypesResponse', null, global);
45
45
  goog.exportSymbol('proto.notification.NotificationItem', null, global);
46
46
  goog.exportSymbol('proto.notification.NotificationItemRequest', null, global);
47
47
  goog.exportSymbol('proto.notification.NotificationItemsResponse', null, global);
48
+ goog.exportSymbol('proto.notification.NotificationRecipient', null, global);
48
49
  goog.exportSymbol('proto.notification.NotificationRequest', null, global);
49
50
  goog.exportSymbol('proto.notification.NotificationRequest.RequestCase', null, global);
50
51
  goog.exportSymbol('proto.notification.NotificationResponse', null, global);
@@ -297,6 +298,27 @@ if (goog.DEBUG && !COMPILED) {
297
298
  */
298
299
  proto.notification.GetNotificationRequest.displayName = 'proto.notification.GetNotificationRequest';
299
300
  }
301
+ /**
302
+ * Generated by JsPbCodeGenerator.
303
+ * @param {Array=} opt_data Optional initial data array, typically from a
304
+ * server response, or constructed directly in Javascript. The array is used
305
+ * in place and becomes part of the constructed object. It is not cloned.
306
+ * If no data is provided, the constructed object will be empty, but still
307
+ * valid.
308
+ * @extends {jspb.Message}
309
+ * @constructor
310
+ */
311
+ proto.notification.NotificationRecipient = function(opt_data) {
312
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
313
+ };
314
+ goog.inherits(proto.notification.NotificationRecipient, jspb.Message);
315
+ if (goog.DEBUG && !COMPILED) {
316
+ /**
317
+ * @public
318
+ * @override
319
+ */
320
+ proto.notification.NotificationRecipient.displayName = 'proto.notification.NotificationRecipient';
321
+ }
300
322
  /**
301
323
  * Generated by JsPbCodeGenerator.
302
324
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -4203,12 +4225,172 @@ proto.notification.GetNotificationRequest.prototype.setId = function(value) {
4203
4225
 
4204
4226
 
4205
4227
 
4228
+
4229
+
4230
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4231
+ /**
4232
+ * Creates an object representation of this proto.
4233
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4234
+ * Optional fields that are not set will be set to undefined.
4235
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4236
+ * For the list of reserved names please see:
4237
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4238
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4239
+ * JSPB instance for transitional soy proto support:
4240
+ * http://goto/soy-param-migration
4241
+ * @return {!Object}
4242
+ */
4243
+ proto.notification.NotificationRecipient.prototype.toObject = function(opt_includeInstance) {
4244
+ return proto.notification.NotificationRecipient.toObject(opt_includeInstance, this);
4245
+ };
4246
+
4247
+
4248
+ /**
4249
+ * Static version of the {@see toObject} method.
4250
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4251
+ * the JSPB instance for transitional soy proto support:
4252
+ * http://goto/soy-param-migration
4253
+ * @param {!proto.notification.NotificationRecipient} msg The msg instance to transform.
4254
+ * @return {!Object}
4255
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4256
+ */
4257
+ proto.notification.NotificationRecipient.toObject = function(includeInstance, msg) {
4258
+ var f, obj = {
4259
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
4260
+ publicId: jspb.Message.getFieldWithDefault(msg, 2, "")
4261
+ };
4262
+
4263
+ if (includeInstance) {
4264
+ obj.$jspbMessageInstance = msg;
4265
+ }
4266
+ return obj;
4267
+ };
4268
+ }
4269
+
4270
+
4271
+ /**
4272
+ * Deserializes binary data (in protobuf wire format).
4273
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4274
+ * @return {!proto.notification.NotificationRecipient}
4275
+ */
4276
+ proto.notification.NotificationRecipient.deserializeBinary = function(bytes) {
4277
+ var reader = new jspb.BinaryReader(bytes);
4278
+ var msg = new proto.notification.NotificationRecipient;
4279
+ return proto.notification.NotificationRecipient.deserializeBinaryFromReader(msg, reader);
4280
+ };
4281
+
4282
+
4283
+ /**
4284
+ * Deserializes binary data (in protobuf wire format) from the
4285
+ * given reader into the given message object.
4286
+ * @param {!proto.notification.NotificationRecipient} msg The message object to deserialize into.
4287
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4288
+ * @return {!proto.notification.NotificationRecipient}
4289
+ */
4290
+ proto.notification.NotificationRecipient.deserializeBinaryFromReader = function(msg, reader) {
4291
+ while (reader.nextField()) {
4292
+ if (reader.isEndGroup()) {
4293
+ break;
4294
+ }
4295
+ var field = reader.getFieldNumber();
4296
+ switch (field) {
4297
+ case 1:
4298
+ var value = /** @type {number} */ (reader.readInt32());
4299
+ msg.setUserId(value);
4300
+ break;
4301
+ case 2:
4302
+ var value = /** @type {string} */ (reader.readString());
4303
+ msg.setPublicId(value);
4304
+ break;
4305
+ default:
4306
+ reader.skipField();
4307
+ break;
4308
+ }
4309
+ }
4310
+ return msg;
4311
+ };
4312
+
4313
+
4314
+ /**
4315
+ * Serializes the message to binary data (in protobuf wire format).
4316
+ * @return {!Uint8Array}
4317
+ */
4318
+ proto.notification.NotificationRecipient.prototype.serializeBinary = function() {
4319
+ var writer = new jspb.BinaryWriter();
4320
+ proto.notification.NotificationRecipient.serializeBinaryToWriter(this, writer);
4321
+ return writer.getResultBuffer();
4322
+ };
4323
+
4324
+
4325
+ /**
4326
+ * Serializes the given message to binary data (in protobuf wire
4327
+ * format), writing to the given BinaryWriter.
4328
+ * @param {!proto.notification.NotificationRecipient} message
4329
+ * @param {!jspb.BinaryWriter} writer
4330
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4331
+ */
4332
+ proto.notification.NotificationRecipient.serializeBinaryToWriter = function(message, writer) {
4333
+ var f = undefined;
4334
+ f = message.getUserId();
4335
+ if (f !== 0) {
4336
+ writer.writeInt32(
4337
+ 1,
4338
+ f
4339
+ );
4340
+ }
4341
+ f = message.getPublicId();
4342
+ if (f.length > 0) {
4343
+ writer.writeString(
4344
+ 2,
4345
+ f
4346
+ );
4347
+ }
4348
+ };
4349
+
4350
+
4351
+ /**
4352
+ * optional int32 user_id = 1;
4353
+ * @return {number}
4354
+ */
4355
+ proto.notification.NotificationRecipient.prototype.getUserId = function() {
4356
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4357
+ };
4358
+
4359
+
4360
+ /**
4361
+ * @param {number} value
4362
+ * @return {!proto.notification.NotificationRecipient} returns this
4363
+ */
4364
+ proto.notification.NotificationRecipient.prototype.setUserId = function(value) {
4365
+ return jspb.Message.setProto3IntField(this, 1, value);
4366
+ };
4367
+
4368
+
4369
+ /**
4370
+ * optional string public_id = 2;
4371
+ * @return {string}
4372
+ */
4373
+ proto.notification.NotificationRecipient.prototype.getPublicId = function() {
4374
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
4375
+ };
4376
+
4377
+
4378
+ /**
4379
+ * @param {string} value
4380
+ * @return {!proto.notification.NotificationRecipient} returns this
4381
+ */
4382
+ proto.notification.NotificationRecipient.prototype.setPublicId = function(value) {
4383
+ return jspb.Message.setProto3StringField(this, 2, value);
4384
+ };
4385
+
4386
+
4387
+
4206
4388
  /**
4207
4389
  * List of repeated fields within this message type.
4208
4390
  * @private {!Array<number>}
4209
4391
  * @const
4210
4392
  */
4211
- proto.notification.SendNotificationRequest.repeatedFields_ = [2];
4393
+ proto.notification.SendNotificationRequest.repeatedFields_ = [2,3];
4212
4394
 
4213
4395
 
4214
4396
 
@@ -4242,7 +4424,9 @@ proto.notification.SendNotificationRequest.prototype.toObject = function(opt_inc
4242
4424
  proto.notification.SendNotificationRequest.toObject = function(includeInstance, msg) {
4243
4425
  var f, obj = {
4244
4426
  notificationId: jspb.Message.getFieldWithDefault(msg, 1, 0),
4245
- userIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
4427
+ userIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
4428
+ recipientsList: jspb.Message.toObjectList(msg.getRecipientsList(),
4429
+ proto.notification.NotificationRecipient.toObject, includeInstance)
4246
4430
  };
4247
4431
 
4248
4432
  if (includeInstance) {
@@ -4289,6 +4473,11 @@ proto.notification.SendNotificationRequest.deserializeBinaryFromReader = functio
4289
4473
  msg.addUserIds(values[i]);
4290
4474
  }
4291
4475
  break;
4476
+ case 3:
4477
+ var value = new proto.notification.NotificationRecipient;
4478
+ reader.readMessage(value,proto.notification.NotificationRecipient.deserializeBinaryFromReader);
4479
+ msg.addRecipients(value);
4480
+ break;
4292
4481
  default:
4293
4482
  reader.skipField();
4294
4483
  break;
@@ -4332,6 +4521,14 @@ proto.notification.SendNotificationRequest.serializeBinaryToWriter = function(me
4332
4521
  f
4333
4522
  );
4334
4523
  }
4524
+ f = message.getRecipientsList();
4525
+ if (f.length > 0) {
4526
+ writer.writeRepeatedMessage(
4527
+ 3,
4528
+ f,
4529
+ proto.notification.NotificationRecipient.serializeBinaryToWriter
4530
+ );
4531
+ }
4335
4532
  };
4336
4533
 
4337
4534
 
@@ -4390,6 +4587,44 @@ proto.notification.SendNotificationRequest.prototype.clearUserIdsList = function
4390
4587
  };
4391
4588
 
4392
4589
 
4590
+ /**
4591
+ * repeated NotificationRecipient recipients = 3;
4592
+ * @return {!Array<!proto.notification.NotificationRecipient>}
4593
+ */
4594
+ proto.notification.SendNotificationRequest.prototype.getRecipientsList = function() {
4595
+ return /** @type{!Array<!proto.notification.NotificationRecipient>} */ (
4596
+ jspb.Message.getRepeatedWrapperField(this, proto.notification.NotificationRecipient, 3));
4597
+ };
4598
+
4599
+
4600
+ /**
4601
+ * @param {!Array<!proto.notification.NotificationRecipient>} value
4602
+ * @return {!proto.notification.SendNotificationRequest} returns this
4603
+ */
4604
+ proto.notification.SendNotificationRequest.prototype.setRecipientsList = function(value) {
4605
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
4606
+ };
4607
+
4608
+
4609
+ /**
4610
+ * @param {!proto.notification.NotificationRecipient=} opt_value
4611
+ * @param {number=} opt_index
4612
+ * @return {!proto.notification.NotificationRecipient}
4613
+ */
4614
+ proto.notification.SendNotificationRequest.prototype.addRecipients = function(opt_value, opt_index) {
4615
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.notification.NotificationRecipient, opt_index);
4616
+ };
4617
+
4618
+
4619
+ /**
4620
+ * Clears the list making it empty but non-null.
4621
+ * @return {!proto.notification.SendNotificationRequest} returns this
4622
+ */
4623
+ proto.notification.SendNotificationRequest.prototype.clearRecipientsList = function() {
4624
+ return this.setRecipientsList([]);
4625
+ };
4626
+
4627
+
4393
4628
 
4394
4629
  /**
4395
4630
  * List of repeated fields within this message type.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.580",
3
+ "version": "1.2.583",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -74,6 +74,8 @@ service Payment {
74
74
  rpc readListCompensations(PaginationRequest) returns (CompensationItemsResponse);
75
75
  rpc createConfiscation(ConfiscationRequest) returns (FinancialOperationResponse);
76
76
  rpc readListConfiscations(PaginationRequest) returns (ConfiscationItemsResponse);
77
+ rpc createAdjustment(AdjustmentRequest) returns (FinancialOperationResponse);
78
+ rpc readListAdjustments(PaginationRequest) returns (AdjustmentItemsResponse);
77
79
  }
78
80
  //Technical
79
81
  message PingRequest { string ping = 1; }
@@ -89,6 +91,7 @@ message PaginationRequest {
89
91
  optional PaymentSearchRequest payment_search_params = 4;
90
92
  optional CompensationSearchRequest compensation_search_params = 5;
91
93
  optional ConfiscationSearchRequest confiscation_search_params = 6;
94
+ optional AdjustmentSearchRequest adjustment_search_params = 7;
92
95
  }
93
96
  message PaymentSearchRequest {
94
97
  optional int32 deposit_id = 1;
@@ -975,6 +978,9 @@ message CompensationRequest {
975
978
  string internal_comment = 9;
976
979
  string amount = 10;
977
980
  optional string promo_or_bonus_id = 11;
981
+ // bonus_id and user_bonus_id are mutually exclusive typed bonus references; promo_or_bonus_id is retained as a legacy backward-compatible field.
982
+ optional int32 user_bonus_id = 12;
983
+ optional int32 bonus_id = 13;
978
984
  }
979
985
  message CompensationSearchRequest {
980
986
  optional int32 operation_id = 1;
@@ -1010,12 +1016,63 @@ message CompensationItem {
1010
1016
  optional string player_email = 17;
1011
1017
  optional string operator_name = 18;
1012
1018
  optional string operator_email = 19;
1019
+ optional int32 user_bonus_id = 20;
1020
+ optional int32 bonus_id = 21;
1013
1021
  }
1014
1022
  message CompensationItemsResponse {
1015
1023
  repeated CompensationItem items = 1;
1016
1024
  optional int32 total_pages = 2;
1017
1025
  optional int32 total_items = 3;
1018
1026
  }
1027
+ // Player balance adjustment (BackOffice transactional correction)
1028
+ message AdjustmentRequest {
1029
+ int32 user_id = 1;
1030
+ int64 amount_minor = 2;
1031
+ optional string currency = 3;
1032
+ string wager_multiplier = 4;
1033
+ string reason = 5;
1034
+ string idempotency_id = 6;
1035
+ string transaction_code = 7;
1036
+ string internal_comment = 8;
1037
+ string amount = 9;
1038
+ }
1039
+ message AdjustmentSearchRequest {
1040
+ optional int32 operation_id = 1;
1041
+ repeated int32 user_ids = 2;
1042
+ optional string transaction_code = 3;
1043
+ repeated string operation_status_codes = 4;
1044
+ optional string created_from = 5;
1045
+ optional string created_to = 6;
1046
+ repeated string currency = 7;
1047
+ optional string player_nickname = 8;
1048
+ repeated int32 operator_ids = 9;
1049
+ optional int64 amount_minor_from = 10;
1050
+ optional int64 amount_minor_to = 11;
1051
+ }
1052
+ message AdjustmentItem {
1053
+ int32 operation_id = 1;
1054
+ string operation_public_id = 2;
1055
+ int32 user_id = 3;
1056
+ string transaction_code = 4;
1057
+ int64 amount_minor = 5;
1058
+ string currency = 6;
1059
+ int32 currency_scale = 7;
1060
+ string wager_multiplier = 8;
1061
+ string internal_comment = 9;
1062
+ int32 operator_id = 10;
1063
+ string status_code = 11;
1064
+ string created_at = 12;
1065
+ optional string completed_at = 13;
1066
+ optional string player_nickname = 14;
1067
+ optional string player_email = 15;
1068
+ optional string operator_name = 16;
1069
+ optional string operator_email = 17;
1070
+ }
1071
+ message AdjustmentItemsResponse {
1072
+ repeated AdjustmentItem items = 1;
1073
+ optional int32 total_pages = 2;
1074
+ optional int32 total_items = 3;
1075
+ }
1019
1076
  // confiscation_type values: fund_confiscation, other_debit, balance_transfer_debit
1020
1077
  message ConfiscationRequest {
1021
1078
  int32 user_id = 1;
@@ -4,6 +4,28 @@
4
4
  var grpc = require('@grpc/grpc-js');
5
5
  var payment_pb = require('./payment_pb.js');
6
6
 
7
+ function serialize_payment_AdjustmentItemsResponse(arg) {
8
+ if (!(arg instanceof payment_pb.AdjustmentItemsResponse)) {
9
+ throw new Error('Expected argument of type payment.AdjustmentItemsResponse');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_payment_AdjustmentItemsResponse(buffer_arg) {
15
+ return payment_pb.AdjustmentItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_payment_AdjustmentRequest(arg) {
19
+ if (!(arg instanceof payment_pb.AdjustmentRequest)) {
20
+ throw new Error('Expected argument of type payment.AdjustmentRequest');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_payment_AdjustmentRequest(buffer_arg) {
26
+ return payment_pb.AdjustmentRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
7
29
  function serialize_payment_AttemptDepositRequest(arg) {
8
30
  if (!(arg instanceof payment_pb.AttemptDepositRequest)) {
9
31
  throw new Error('Expected argument of type payment.AttemptDepositRequest');
@@ -1558,6 +1580,28 @@ createManualDeposit: {
1558
1580
  responseSerialize: serialize_payment_ConfiscationItemsResponse,
1559
1581
  responseDeserialize: deserialize_payment_ConfiscationItemsResponse,
1560
1582
  },
1583
+ createAdjustment: {
1584
+ path: '/payment.Payment/createAdjustment',
1585
+ requestStream: false,
1586
+ responseStream: false,
1587
+ requestType: payment_pb.AdjustmentRequest,
1588
+ responseType: payment_pb.FinancialOperationResponse,
1589
+ requestSerialize: serialize_payment_AdjustmentRequest,
1590
+ requestDeserialize: deserialize_payment_AdjustmentRequest,
1591
+ responseSerialize: serialize_payment_FinancialOperationResponse,
1592
+ responseDeserialize: deserialize_payment_FinancialOperationResponse,
1593
+ },
1594
+ readListAdjustments: {
1595
+ path: '/payment.Payment/readListAdjustments',
1596
+ requestStream: false,
1597
+ responseStream: false,
1598
+ requestType: payment_pb.PaginationRequest,
1599
+ responseType: payment_pb.AdjustmentItemsResponse,
1600
+ requestSerialize: serialize_payment_PaginationRequest,
1601
+ requestDeserialize: deserialize_payment_PaginationRequest,
1602
+ responseSerialize: serialize_payment_AdjustmentItemsResponse,
1603
+ responseDeserialize: deserialize_payment_AdjustmentItemsResponse,
1604
+ },
1561
1605
  };
1562
1606
 
1563
1607
  exports.PaymentClient = grpc.makeGenericClientConstructor(PaymentService, 'Payment');