protobuf-platform 1.2.14 → 1.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -17,6 +17,7 @@ service User {
17
17
  rpc updateSingleUser(UserRequest) returns (UserDataResponse);
18
18
  rpc updateUserPassword(UserPasswordRequest) returns (UserStatusResponse);
19
19
  rpc setUserSelfExclusion(UserRequest) returns (UserStatusResponse);
20
+ rpc updateUserBalanceAfterAction(UserActionRequest) returns (UserStatusResponse);
20
21
  //Segments
21
22
  rpc createSingleSegment(SegmentRequest) returns (SegmentResponse);
22
23
  rpc readSingleSegment(GetSegmentRequest) returns (SegmentResponse);
@@ -222,6 +223,11 @@ message UsersResponse {
222
223
  message UserStatusResponse {
223
224
  string status = 1;
224
225
  }
226
+ message UserActionRequest {
227
+ int32 user_id = 1;
228
+ float action_amount = 2;
229
+ optional string balance_type = 3;
230
+ }
225
231
  //Permissions
226
232
  message RolePermissionRequest {
227
233
  string role = 1;
@@ -444,6 +444,17 @@ function deserialize_user_TournamentRulesInfoResponse(buffer_arg) {
444
444
  return user_pb.TournamentRulesInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));
445
445
  }
446
446
 
447
+ function serialize_user_UserActionRequest(arg) {
448
+ if (!(arg instanceof user_pb.UserActionRequest)) {
449
+ throw new Error('Expected argument of type user.UserActionRequest');
450
+ }
451
+ return Buffer.from(arg.serializeBinary());
452
+ }
453
+
454
+ function deserialize_user_UserActionRequest(buffer_arg) {
455
+ return user_pb.UserActionRequest.deserializeBinary(new Uint8Array(buffer_arg));
456
+ }
457
+
447
458
  function serialize_user_UserCookiesRequest(arg) {
448
459
  if (!(arg instanceof user_pb.UserCookiesRequest)) {
449
460
  throw new Error('Expected argument of type user.UserCookiesRequest');
@@ -680,6 +691,17 @@ readListUsers: {
680
691
  responseSerialize: serialize_user_UserStatusResponse,
681
692
  responseDeserialize: deserialize_user_UserStatusResponse,
682
693
  },
694
+ updateUserBalanceAfterAction: {
695
+ path: '/user.User/updateUserBalanceAfterAction',
696
+ requestStream: false,
697
+ responseStream: false,
698
+ requestType: user_pb.UserActionRequest,
699
+ responseType: user_pb.UserStatusResponse,
700
+ requestSerialize: serialize_user_UserActionRequest,
701
+ requestDeserialize: deserialize_user_UserActionRequest,
702
+ responseSerialize: serialize_user_UserStatusResponse,
703
+ responseDeserialize: deserialize_user_UserStatusResponse,
704
+ },
683
705
  // Segments
684
706
  createSingleSegment: {
685
707
  path: '/user.User/createSingleSegment',
package/user/user_pb.js CHANGED
@@ -78,6 +78,7 @@ goog.exportSymbol('proto.user.SumSubDocumentRequest', null, global);
78
78
  goog.exportSymbol('proto.user.SumSubDocumentRequest.RequestCase', null, global);
79
79
  goog.exportSymbol('proto.user.SumSubResponse', null, global);
80
80
  goog.exportSymbol('proto.user.TournamentRulesInfoResponse', null, global);
81
+ goog.exportSymbol('proto.user.UserActionRequest', null, global);
81
82
  goog.exportSymbol('proto.user.UserCookiesRequest', null, global);
82
83
  goog.exportSymbol('proto.user.UserDataRequest', null, global);
83
84
  goog.exportSymbol('proto.user.UserDataResponse', null, global);
@@ -427,6 +428,27 @@ if (goog.DEBUG && !COMPILED) {
427
428
  */
428
429
  proto.user.UserStatusResponse.displayName = 'proto.user.UserStatusResponse';
429
430
  }
431
+ /**
432
+ * Generated by JsPbCodeGenerator.
433
+ * @param {Array=} opt_data Optional initial data array, typically from a
434
+ * server response, or constructed directly in Javascript. The array is used
435
+ * in place and becomes part of the constructed object. It is not cloned.
436
+ * If no data is provided, the constructed object will be empty, but still
437
+ * valid.
438
+ * @extends {jspb.Message}
439
+ * @constructor
440
+ */
441
+ proto.user.UserActionRequest = function(opt_data) {
442
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
443
+ };
444
+ goog.inherits(proto.user.UserActionRequest, jspb.Message);
445
+ if (goog.DEBUG && !COMPILED) {
446
+ /**
447
+ * @public
448
+ * @override
449
+ */
450
+ proto.user.UserActionRequest.displayName = 'proto.user.UserActionRequest';
451
+ }
430
452
  /**
431
453
  * Generated by JsPbCodeGenerator.
432
454
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -9147,6 +9169,214 @@ proto.user.UserStatusResponse.prototype.setStatus = function(value) {
9147
9169
 
9148
9170
 
9149
9171
 
9172
+ if (jspb.Message.GENERATE_TO_OBJECT) {
9173
+ /**
9174
+ * Creates an object representation of this proto.
9175
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
9176
+ * Optional fields that are not set will be set to undefined.
9177
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
9178
+ * For the list of reserved names please see:
9179
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
9180
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
9181
+ * JSPB instance for transitional soy proto support:
9182
+ * http://goto/soy-param-migration
9183
+ * @return {!Object}
9184
+ */
9185
+ proto.user.UserActionRequest.prototype.toObject = function(opt_includeInstance) {
9186
+ return proto.user.UserActionRequest.toObject(opt_includeInstance, this);
9187
+ };
9188
+
9189
+
9190
+ /**
9191
+ * Static version of the {@see toObject} method.
9192
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
9193
+ * the JSPB instance for transitional soy proto support:
9194
+ * http://goto/soy-param-migration
9195
+ * @param {!proto.user.UserActionRequest} msg The msg instance to transform.
9196
+ * @return {!Object}
9197
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9198
+ */
9199
+ proto.user.UserActionRequest.toObject = function(includeInstance, msg) {
9200
+ var f, obj = {
9201
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
9202
+ actionAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
9203
+ balanceType: jspb.Message.getFieldWithDefault(msg, 3, "")
9204
+ };
9205
+
9206
+ if (includeInstance) {
9207
+ obj.$jspbMessageInstance = msg;
9208
+ }
9209
+ return obj;
9210
+ };
9211
+ }
9212
+
9213
+
9214
+ /**
9215
+ * Deserializes binary data (in protobuf wire format).
9216
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
9217
+ * @return {!proto.user.UserActionRequest}
9218
+ */
9219
+ proto.user.UserActionRequest.deserializeBinary = function(bytes) {
9220
+ var reader = new jspb.BinaryReader(bytes);
9221
+ var msg = new proto.user.UserActionRequest;
9222
+ return proto.user.UserActionRequest.deserializeBinaryFromReader(msg, reader);
9223
+ };
9224
+
9225
+
9226
+ /**
9227
+ * Deserializes binary data (in protobuf wire format) from the
9228
+ * given reader into the given message object.
9229
+ * @param {!proto.user.UserActionRequest} msg The message object to deserialize into.
9230
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
9231
+ * @return {!proto.user.UserActionRequest}
9232
+ */
9233
+ proto.user.UserActionRequest.deserializeBinaryFromReader = function(msg, reader) {
9234
+ while (reader.nextField()) {
9235
+ if (reader.isEndGroup()) {
9236
+ break;
9237
+ }
9238
+ var field = reader.getFieldNumber();
9239
+ switch (field) {
9240
+ case 1:
9241
+ var value = /** @type {number} */ (reader.readInt32());
9242
+ msg.setUserId(value);
9243
+ break;
9244
+ case 2:
9245
+ var value = /** @type {number} */ (reader.readFloat());
9246
+ msg.setActionAmount(value);
9247
+ break;
9248
+ case 3:
9249
+ var value = /** @type {string} */ (reader.readString());
9250
+ msg.setBalanceType(value);
9251
+ break;
9252
+ default:
9253
+ reader.skipField();
9254
+ break;
9255
+ }
9256
+ }
9257
+ return msg;
9258
+ };
9259
+
9260
+
9261
+ /**
9262
+ * Serializes the message to binary data (in protobuf wire format).
9263
+ * @return {!Uint8Array}
9264
+ */
9265
+ proto.user.UserActionRequest.prototype.serializeBinary = function() {
9266
+ var writer = new jspb.BinaryWriter();
9267
+ proto.user.UserActionRequest.serializeBinaryToWriter(this, writer);
9268
+ return writer.getResultBuffer();
9269
+ };
9270
+
9271
+
9272
+ /**
9273
+ * Serializes the given message to binary data (in protobuf wire
9274
+ * format), writing to the given BinaryWriter.
9275
+ * @param {!proto.user.UserActionRequest} message
9276
+ * @param {!jspb.BinaryWriter} writer
9277
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9278
+ */
9279
+ proto.user.UserActionRequest.serializeBinaryToWriter = function(message, writer) {
9280
+ var f = undefined;
9281
+ f = message.getUserId();
9282
+ if (f !== 0) {
9283
+ writer.writeInt32(
9284
+ 1,
9285
+ f
9286
+ );
9287
+ }
9288
+ f = message.getActionAmount();
9289
+ if (f !== 0.0) {
9290
+ writer.writeFloat(
9291
+ 2,
9292
+ f
9293
+ );
9294
+ }
9295
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
9296
+ if (f != null) {
9297
+ writer.writeString(
9298
+ 3,
9299
+ f
9300
+ );
9301
+ }
9302
+ };
9303
+
9304
+
9305
+ /**
9306
+ * optional int32 user_id = 1;
9307
+ * @return {number}
9308
+ */
9309
+ proto.user.UserActionRequest.prototype.getUserId = function() {
9310
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
9311
+ };
9312
+
9313
+
9314
+ /**
9315
+ * @param {number} value
9316
+ * @return {!proto.user.UserActionRequest} returns this
9317
+ */
9318
+ proto.user.UserActionRequest.prototype.setUserId = function(value) {
9319
+ return jspb.Message.setProto3IntField(this, 1, value);
9320
+ };
9321
+
9322
+
9323
+ /**
9324
+ * optional float action_amount = 2;
9325
+ * @return {number}
9326
+ */
9327
+ proto.user.UserActionRequest.prototype.getActionAmount = function() {
9328
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
9329
+ };
9330
+
9331
+
9332
+ /**
9333
+ * @param {number} value
9334
+ * @return {!proto.user.UserActionRequest} returns this
9335
+ */
9336
+ proto.user.UserActionRequest.prototype.setActionAmount = function(value) {
9337
+ return jspb.Message.setProto3FloatField(this, 2, value);
9338
+ };
9339
+
9340
+
9341
+ /**
9342
+ * optional string balance_type = 3;
9343
+ * @return {string}
9344
+ */
9345
+ proto.user.UserActionRequest.prototype.getBalanceType = function() {
9346
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
9347
+ };
9348
+
9349
+
9350
+ /**
9351
+ * @param {string} value
9352
+ * @return {!proto.user.UserActionRequest} returns this
9353
+ */
9354
+ proto.user.UserActionRequest.prototype.setBalanceType = function(value) {
9355
+ return jspb.Message.setField(this, 3, value);
9356
+ };
9357
+
9358
+
9359
+ /**
9360
+ * Clears the field making it undefined.
9361
+ * @return {!proto.user.UserActionRequest} returns this
9362
+ */
9363
+ proto.user.UserActionRequest.prototype.clearBalanceType = function() {
9364
+ return jspb.Message.setField(this, 3, undefined);
9365
+ };
9366
+
9367
+
9368
+ /**
9369
+ * Returns whether this field is set.
9370
+ * @return {boolean}
9371
+ */
9372
+ proto.user.UserActionRequest.prototype.hasBalanceType = function() {
9373
+ return jspb.Message.getField(this, 3) != null;
9374
+ };
9375
+
9376
+
9377
+
9378
+
9379
+
9150
9380
  if (jspb.Message.GENERATE_TO_OBJECT) {
9151
9381
  /**
9152
9382
  * Creates an object representation of this proto.