protobuf-platform 1.1.15 → 1.1.17

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.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,6 +20,7 @@ service Tournament {
20
20
  //Tournament Statuses
21
21
  rpc readListTournamentStatuses(PaginationRequest) returns (TournamentStatusItemsResponse);
22
22
  rpc getTournamentsForUser(PaginationRequest) returns (UserTournamentItemsResponse);
23
+ rpc getSingleTournamentForUser(UserTournamentRequest) returns (UserTournamentItem);
23
24
  }
24
25
  //Technical
25
26
  message PingRequest { string ping = 1; }
@@ -52,6 +53,7 @@ message TournamentItem {
52
53
  repeated ScoringRule scores = 14;
53
54
  repeated RewardItem rewards = 15;
54
55
  repeated ContentItem contents = 16;
56
+ optional string slug = 17;
55
57
  }
56
58
  message TournamentRequest {
57
59
  oneof request {
@@ -170,9 +172,16 @@ message UserTournamentItem {
170
172
  repeated ActivationRuleItem rules = 10;
171
173
  repeated RewardItem rewards = 11;
172
174
  optional string content = 12;
175
+ optional string slug = 13;
173
176
  }
174
177
  message UserTournamentItemsResponse {
175
178
  repeated UserTournamentItem items = 1;
176
179
  optional int32 total_pages = 2;
177
180
  optional int32 total_items = 3;
178
181
  }
182
+ message UserTournamentRequest {
183
+ string tournament_slug = 1;
184
+ optional string currency = 2;
185
+ optional string locale = 3;
186
+ optional int32 user_id = 4;
187
+ }
@@ -180,6 +180,17 @@ function deserialize_tournament_TournamentStatusResponse(buffer_arg) {
180
180
  return tournament_pb.TournamentStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
181
181
  }
182
182
 
183
+ function serialize_tournament_UserTournamentItem(arg) {
184
+ if (!(arg instanceof tournament_pb.UserTournamentItem)) {
185
+ throw new Error('Expected argument of type tournament.UserTournamentItem');
186
+ }
187
+ return Buffer.from(arg.serializeBinary());
188
+ }
189
+
190
+ function deserialize_tournament_UserTournamentItem(buffer_arg) {
191
+ return tournament_pb.UserTournamentItem.deserializeBinary(new Uint8Array(buffer_arg));
192
+ }
193
+
183
194
  function serialize_tournament_UserTournamentItemsResponse(arg) {
184
195
  if (!(arg instanceof tournament_pb.UserTournamentItemsResponse)) {
185
196
  throw new Error('Expected argument of type tournament.UserTournamentItemsResponse');
@@ -191,6 +202,17 @@ function deserialize_tournament_UserTournamentItemsResponse(buffer_arg) {
191
202
  return tournament_pb.UserTournamentItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
192
203
  }
193
204
 
205
+ function serialize_tournament_UserTournamentRequest(arg) {
206
+ if (!(arg instanceof tournament_pb.UserTournamentRequest)) {
207
+ throw new Error('Expected argument of type tournament.UserTournamentRequest');
208
+ }
209
+ return Buffer.from(arg.serializeBinary());
210
+ }
211
+
212
+ function deserialize_tournament_UserTournamentRequest(buffer_arg) {
213
+ return tournament_pb.UserTournamentRequest.deserializeBinary(new Uint8Array(buffer_arg));
214
+ }
215
+
194
216
 
195
217
  var TournamentService = exports.TournamentService = {
196
218
  checkConnection: {
@@ -360,6 +382,17 @@ readListTournamentStatuses: {
360
382
  responseSerialize: serialize_tournament_UserTournamentItemsResponse,
361
383
  responseDeserialize: deserialize_tournament_UserTournamentItemsResponse,
362
384
  },
385
+ getSingleTournamentForUser: {
386
+ path: '/tournament.Tournament/getSingleTournamentForUser',
387
+ requestStream: false,
388
+ responseStream: false,
389
+ requestType: tournament_pb.UserTournamentRequest,
390
+ responseType: tournament_pb.UserTournamentItem,
391
+ requestSerialize: serialize_tournament_UserTournamentRequest,
392
+ requestDeserialize: deserialize_tournament_UserTournamentRequest,
393
+ responseSerialize: serialize_tournament_UserTournamentItem,
394
+ responseDeserialize: deserialize_tournament_UserTournamentItem,
395
+ },
363
396
  };
364
397
 
365
398
  exports.TournamentClient = grpc.makeGenericClientConstructor(TournamentService);
@@ -48,6 +48,7 @@ goog.exportSymbol('proto.tournament.TournamentStatusResponse', null, global);
48
48
  goog.exportSymbol('proto.tournament.UserSearchRequest', null, global);
49
49
  goog.exportSymbol('proto.tournament.UserTournamentItem', null, global);
50
50
  goog.exportSymbol('proto.tournament.UserTournamentItemsResponse', null, global);
51
+ goog.exportSymbol('proto.tournament.UserTournamentRequest', null, global);
51
52
  /**
52
53
  * Generated by JsPbCodeGenerator.
53
54
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -594,6 +595,27 @@ if (goog.DEBUG && !COMPILED) {
594
595
  */
595
596
  proto.tournament.UserTournamentItemsResponse.displayName = 'proto.tournament.UserTournamentItemsResponse';
596
597
  }
598
+ /**
599
+ * Generated by JsPbCodeGenerator.
600
+ * @param {Array=} opt_data Optional initial data array, typically from a
601
+ * server response, or constructed directly in Javascript. The array is used
602
+ * in place and becomes part of the constructed object. It is not cloned.
603
+ * If no data is provided, the constructed object will be empty, but still
604
+ * valid.
605
+ * @extends {jspb.Message}
606
+ * @constructor
607
+ */
608
+ proto.tournament.UserTournamentRequest = function(opt_data) {
609
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
610
+ };
611
+ goog.inherits(proto.tournament.UserTournamentRequest, jspb.Message);
612
+ if (goog.DEBUG && !COMPILED) {
613
+ /**
614
+ * @public
615
+ * @override
616
+ */
617
+ proto.tournament.UserTournamentRequest.displayName = 'proto.tournament.UserTournamentRequest';
618
+ }
597
619
 
598
620
 
599
621
 
@@ -1825,7 +1847,8 @@ proto.tournament.TournamentItem.toObject = function(includeInstance, msg) {
1825
1847
  rewardsList: jspb.Message.toObjectList(msg.getRewardsList(),
1826
1848
  proto.tournament.RewardItem.toObject, includeInstance),
1827
1849
  contentsList: jspb.Message.toObjectList(msg.getContentsList(),
1828
- proto.tournament.ContentItem.toObject, includeInstance)
1850
+ proto.tournament.ContentItem.toObject, includeInstance),
1851
+ slug: jspb.Message.getFieldWithDefault(msg, 17, "")
1829
1852
  };
1830
1853
 
1831
1854
  if (includeInstance) {
@@ -1930,6 +1953,10 @@ proto.tournament.TournamentItem.deserializeBinaryFromReader = function(msg, read
1930
1953
  reader.readMessage(value,proto.tournament.ContentItem.deserializeBinaryFromReader);
1931
1954
  msg.addContents(value);
1932
1955
  break;
1956
+ case 17:
1957
+ var value = /** @type {string} */ (reader.readString());
1958
+ msg.setSlug(value);
1959
+ break;
1933
1960
  default:
1934
1961
  reader.skipField();
1935
1962
  break;
@@ -2075,6 +2102,13 @@ proto.tournament.TournamentItem.serializeBinaryToWriter = function(message, writ
2075
2102
  proto.tournament.ContentItem.serializeBinaryToWriter
2076
2103
  );
2077
2104
  }
2105
+ f = /** @type {string} */ (jspb.Message.getField(message, 17));
2106
+ if (f != null) {
2107
+ writer.writeString(
2108
+ 17,
2109
+ f
2110
+ );
2111
+ }
2078
2112
  };
2079
2113
 
2080
2114
 
@@ -2662,6 +2696,42 @@ proto.tournament.TournamentItem.prototype.clearContentsList = function() {
2662
2696
  };
2663
2697
 
2664
2698
 
2699
+ /**
2700
+ * optional string slug = 17;
2701
+ * @return {string}
2702
+ */
2703
+ proto.tournament.TournamentItem.prototype.getSlug = function() {
2704
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, ""));
2705
+ };
2706
+
2707
+
2708
+ /**
2709
+ * @param {string} value
2710
+ * @return {!proto.tournament.TournamentItem} returns this
2711
+ */
2712
+ proto.tournament.TournamentItem.prototype.setSlug = function(value) {
2713
+ return jspb.Message.setField(this, 17, value);
2714
+ };
2715
+
2716
+
2717
+ /**
2718
+ * Clears the field making it undefined.
2719
+ * @return {!proto.tournament.TournamentItem} returns this
2720
+ */
2721
+ proto.tournament.TournamentItem.prototype.clearSlug = function() {
2722
+ return jspb.Message.setField(this, 17, undefined);
2723
+ };
2724
+
2725
+
2726
+ /**
2727
+ * Returns whether this field is set.
2728
+ * @return {boolean}
2729
+ */
2730
+ proto.tournament.TournamentItem.prototype.hasSlug = function() {
2731
+ return jspb.Message.getField(this, 17) != null;
2732
+ };
2733
+
2734
+
2665
2735
 
2666
2736
  /**
2667
2737
  * Oneof group definitions for this message. Each group defines the field
@@ -7489,7 +7559,8 @@ proto.tournament.UserTournamentItem.toObject = function(includeInstance, msg) {
7489
7559
  proto.tournament.ActivationRuleItem.toObject, includeInstance),
7490
7560
  rewardsList: jspb.Message.toObjectList(msg.getRewardsList(),
7491
7561
  proto.tournament.RewardItem.toObject, includeInstance),
7492
- content: jspb.Message.getFieldWithDefault(msg, 12, "")
7562
+ content: jspb.Message.getFieldWithDefault(msg, 12, ""),
7563
+ slug: jspb.Message.getFieldWithDefault(msg, 13, "")
7493
7564
  };
7494
7565
 
7495
7566
  if (includeInstance) {
@@ -7576,6 +7647,10 @@ proto.tournament.UserTournamentItem.deserializeBinaryFromReader = function(msg,
7576
7647
  var value = /** @type {string} */ (reader.readString());
7577
7648
  msg.setContent(value);
7578
7649
  break;
7650
+ case 13:
7651
+ var value = /** @type {string} */ (reader.readString());
7652
+ msg.setSlug(value);
7653
+ break;
7579
7654
  default:
7580
7655
  reader.skipField();
7581
7656
  break;
@@ -7691,6 +7766,13 @@ proto.tournament.UserTournamentItem.serializeBinaryToWriter = function(message,
7691
7766
  f
7692
7767
  );
7693
7768
  }
7769
+ f = /** @type {string} */ (jspb.Message.getField(message, 13));
7770
+ if (f != null) {
7771
+ writer.writeString(
7772
+ 13,
7773
+ f
7774
+ );
7775
+ }
7694
7776
  };
7695
7777
 
7696
7778
 
@@ -8130,6 +8212,42 @@ proto.tournament.UserTournamentItem.prototype.hasContent = function() {
8130
8212
  };
8131
8213
 
8132
8214
 
8215
+ /**
8216
+ * optional string slug = 13;
8217
+ * @return {string}
8218
+ */
8219
+ proto.tournament.UserTournamentItem.prototype.getSlug = function() {
8220
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
8221
+ };
8222
+
8223
+
8224
+ /**
8225
+ * @param {string} value
8226
+ * @return {!proto.tournament.UserTournamentItem} returns this
8227
+ */
8228
+ proto.tournament.UserTournamentItem.prototype.setSlug = function(value) {
8229
+ return jspb.Message.setField(this, 13, value);
8230
+ };
8231
+
8232
+
8233
+ /**
8234
+ * Clears the field making it undefined.
8235
+ * @return {!proto.tournament.UserTournamentItem} returns this
8236
+ */
8237
+ proto.tournament.UserTournamentItem.prototype.clearSlug = function() {
8238
+ return jspb.Message.setField(this, 13, undefined);
8239
+ };
8240
+
8241
+
8242
+ /**
8243
+ * Returns whether this field is set.
8244
+ * @return {boolean}
8245
+ */
8246
+ proto.tournament.UserTournamentItem.prototype.hasSlug = function() {
8247
+ return jspb.Message.getField(this, 13) != null;
8248
+ };
8249
+
8250
+
8133
8251
 
8134
8252
  /**
8135
8253
  * List of repeated fields within this message type.
@@ -8386,4 +8504,278 @@ proto.tournament.UserTournamentItemsResponse.prototype.hasTotalItems = function(
8386
8504
  };
8387
8505
 
8388
8506
 
8507
+
8508
+
8509
+
8510
+ if (jspb.Message.GENERATE_TO_OBJECT) {
8511
+ /**
8512
+ * Creates an object representation of this proto.
8513
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
8514
+ * Optional fields that are not set will be set to undefined.
8515
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
8516
+ * For the list of reserved names please see:
8517
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
8518
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
8519
+ * JSPB instance for transitional soy proto support:
8520
+ * http://goto/soy-param-migration
8521
+ * @return {!Object}
8522
+ */
8523
+ proto.tournament.UserTournamentRequest.prototype.toObject = function(opt_includeInstance) {
8524
+ return proto.tournament.UserTournamentRequest.toObject(opt_includeInstance, this);
8525
+ };
8526
+
8527
+
8528
+ /**
8529
+ * Static version of the {@see toObject} method.
8530
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
8531
+ * the JSPB instance for transitional soy proto support:
8532
+ * http://goto/soy-param-migration
8533
+ * @param {!proto.tournament.UserTournamentRequest} msg The msg instance to transform.
8534
+ * @return {!Object}
8535
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8536
+ */
8537
+ proto.tournament.UserTournamentRequest.toObject = function(includeInstance, msg) {
8538
+ var f, obj = {
8539
+ tournamentSlug: jspb.Message.getFieldWithDefault(msg, 1, ""),
8540
+ currency: jspb.Message.getFieldWithDefault(msg, 2, ""),
8541
+ locale: jspb.Message.getFieldWithDefault(msg, 3, ""),
8542
+ userId: jspb.Message.getFieldWithDefault(msg, 4, 0)
8543
+ };
8544
+
8545
+ if (includeInstance) {
8546
+ obj.$jspbMessageInstance = msg;
8547
+ }
8548
+ return obj;
8549
+ };
8550
+ }
8551
+
8552
+
8553
+ /**
8554
+ * Deserializes binary data (in protobuf wire format).
8555
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
8556
+ * @return {!proto.tournament.UserTournamentRequest}
8557
+ */
8558
+ proto.tournament.UserTournamentRequest.deserializeBinary = function(bytes) {
8559
+ var reader = new jspb.BinaryReader(bytes);
8560
+ var msg = new proto.tournament.UserTournamentRequest;
8561
+ return proto.tournament.UserTournamentRequest.deserializeBinaryFromReader(msg, reader);
8562
+ };
8563
+
8564
+
8565
+ /**
8566
+ * Deserializes binary data (in protobuf wire format) from the
8567
+ * given reader into the given message object.
8568
+ * @param {!proto.tournament.UserTournamentRequest} msg The message object to deserialize into.
8569
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
8570
+ * @return {!proto.tournament.UserTournamentRequest}
8571
+ */
8572
+ proto.tournament.UserTournamentRequest.deserializeBinaryFromReader = function(msg, reader) {
8573
+ while (reader.nextField()) {
8574
+ if (reader.isEndGroup()) {
8575
+ break;
8576
+ }
8577
+ var field = reader.getFieldNumber();
8578
+ switch (field) {
8579
+ case 1:
8580
+ var value = /** @type {string} */ (reader.readString());
8581
+ msg.setTournamentSlug(value);
8582
+ break;
8583
+ case 2:
8584
+ var value = /** @type {string} */ (reader.readString());
8585
+ msg.setCurrency(value);
8586
+ break;
8587
+ case 3:
8588
+ var value = /** @type {string} */ (reader.readString());
8589
+ msg.setLocale(value);
8590
+ break;
8591
+ case 4:
8592
+ var value = /** @type {number} */ (reader.readInt32());
8593
+ msg.setUserId(value);
8594
+ break;
8595
+ default:
8596
+ reader.skipField();
8597
+ break;
8598
+ }
8599
+ }
8600
+ return msg;
8601
+ };
8602
+
8603
+
8604
+ /**
8605
+ * Serializes the message to binary data (in protobuf wire format).
8606
+ * @return {!Uint8Array}
8607
+ */
8608
+ proto.tournament.UserTournamentRequest.prototype.serializeBinary = function() {
8609
+ var writer = new jspb.BinaryWriter();
8610
+ proto.tournament.UserTournamentRequest.serializeBinaryToWriter(this, writer);
8611
+ return writer.getResultBuffer();
8612
+ };
8613
+
8614
+
8615
+ /**
8616
+ * Serializes the given message to binary data (in protobuf wire
8617
+ * format), writing to the given BinaryWriter.
8618
+ * @param {!proto.tournament.UserTournamentRequest} message
8619
+ * @param {!jspb.BinaryWriter} writer
8620
+ * @suppress {unusedLocalVariables} f is only used for nested messages
8621
+ */
8622
+ proto.tournament.UserTournamentRequest.serializeBinaryToWriter = function(message, writer) {
8623
+ var f = undefined;
8624
+ f = message.getTournamentSlug();
8625
+ if (f.length > 0) {
8626
+ writer.writeString(
8627
+ 1,
8628
+ f
8629
+ );
8630
+ }
8631
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
8632
+ if (f != null) {
8633
+ writer.writeString(
8634
+ 2,
8635
+ f
8636
+ );
8637
+ }
8638
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
8639
+ if (f != null) {
8640
+ writer.writeString(
8641
+ 3,
8642
+ f
8643
+ );
8644
+ }
8645
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
8646
+ if (f != null) {
8647
+ writer.writeInt32(
8648
+ 4,
8649
+ f
8650
+ );
8651
+ }
8652
+ };
8653
+
8654
+
8655
+ /**
8656
+ * optional string tournament_slug = 1;
8657
+ * @return {string}
8658
+ */
8659
+ proto.tournament.UserTournamentRequest.prototype.getTournamentSlug = function() {
8660
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
8661
+ };
8662
+
8663
+
8664
+ /**
8665
+ * @param {string} value
8666
+ * @return {!proto.tournament.UserTournamentRequest} returns this
8667
+ */
8668
+ proto.tournament.UserTournamentRequest.prototype.setTournamentSlug = function(value) {
8669
+ return jspb.Message.setProto3StringField(this, 1, value);
8670
+ };
8671
+
8672
+
8673
+ /**
8674
+ * optional string currency = 2;
8675
+ * @return {string}
8676
+ */
8677
+ proto.tournament.UserTournamentRequest.prototype.getCurrency = function() {
8678
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
8679
+ };
8680
+
8681
+
8682
+ /**
8683
+ * @param {string} value
8684
+ * @return {!proto.tournament.UserTournamentRequest} returns this
8685
+ */
8686
+ proto.tournament.UserTournamentRequest.prototype.setCurrency = function(value) {
8687
+ return jspb.Message.setField(this, 2, value);
8688
+ };
8689
+
8690
+
8691
+ /**
8692
+ * Clears the field making it undefined.
8693
+ * @return {!proto.tournament.UserTournamentRequest} returns this
8694
+ */
8695
+ proto.tournament.UserTournamentRequest.prototype.clearCurrency = function() {
8696
+ return jspb.Message.setField(this, 2, undefined);
8697
+ };
8698
+
8699
+
8700
+ /**
8701
+ * Returns whether this field is set.
8702
+ * @return {boolean}
8703
+ */
8704
+ proto.tournament.UserTournamentRequest.prototype.hasCurrency = function() {
8705
+ return jspb.Message.getField(this, 2) != null;
8706
+ };
8707
+
8708
+
8709
+ /**
8710
+ * optional string locale = 3;
8711
+ * @return {string}
8712
+ */
8713
+ proto.tournament.UserTournamentRequest.prototype.getLocale = function() {
8714
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
8715
+ };
8716
+
8717
+
8718
+ /**
8719
+ * @param {string} value
8720
+ * @return {!proto.tournament.UserTournamentRequest} returns this
8721
+ */
8722
+ proto.tournament.UserTournamentRequest.prototype.setLocale = function(value) {
8723
+ return jspb.Message.setField(this, 3, value);
8724
+ };
8725
+
8726
+
8727
+ /**
8728
+ * Clears the field making it undefined.
8729
+ * @return {!proto.tournament.UserTournamentRequest} returns this
8730
+ */
8731
+ proto.tournament.UserTournamentRequest.prototype.clearLocale = function() {
8732
+ return jspb.Message.setField(this, 3, undefined);
8733
+ };
8734
+
8735
+
8736
+ /**
8737
+ * Returns whether this field is set.
8738
+ * @return {boolean}
8739
+ */
8740
+ proto.tournament.UserTournamentRequest.prototype.hasLocale = function() {
8741
+ return jspb.Message.getField(this, 3) != null;
8742
+ };
8743
+
8744
+
8745
+ /**
8746
+ * optional int32 user_id = 4;
8747
+ * @return {number}
8748
+ */
8749
+ proto.tournament.UserTournamentRequest.prototype.getUserId = function() {
8750
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
8751
+ };
8752
+
8753
+
8754
+ /**
8755
+ * @param {number} value
8756
+ * @return {!proto.tournament.UserTournamentRequest} returns this
8757
+ */
8758
+ proto.tournament.UserTournamentRequest.prototype.setUserId = function(value) {
8759
+ return jspb.Message.setField(this, 4, value);
8760
+ };
8761
+
8762
+
8763
+ /**
8764
+ * Clears the field making it undefined.
8765
+ * @return {!proto.tournament.UserTournamentRequest} returns this
8766
+ */
8767
+ proto.tournament.UserTournamentRequest.prototype.clearUserId = function() {
8768
+ return jspb.Message.setField(this, 4, undefined);
8769
+ };
8770
+
8771
+
8772
+ /**
8773
+ * Returns whether this field is set.
8774
+ * @return {boolean}
8775
+ */
8776
+ proto.tournament.UserTournamentRequest.prototype.hasUserId = function() {
8777
+ return jspb.Message.getField(this, 4) != null;
8778
+ };
8779
+
8780
+
8389
8781
  goog.object.extend(exports, proto.tournament);
package/user/user.proto CHANGED
@@ -45,6 +45,8 @@ service User {
45
45
  //KYC
46
46
  rpc createSumSubApplicant(SumSubApplicantRequest) returns (SumSubResponse);
47
47
  rpc uploadSumSubDocument(stream SumSubDocumentRequest) returns (SumSubResponse);
48
+ //Tournaments
49
+ rpc getInfoForTournamentRules(UserDataRequest) returns (TournamentRulesInfoResponse);
48
50
  }
49
51
  //Technical
50
52
  message PingRequest { string ping = 1; }
@@ -367,4 +369,14 @@ message UserLimitsResponse {
367
369
  }
368
370
  message LimitStatusResponse {
369
371
  string status = 1;
372
+ }
373
+ //Tournament
374
+ message TournamentRulesInfoResponse {
375
+ optional int32 user_category_id = 1;
376
+ optional int32 email_confirmed = 2;
377
+ optional int32 phone_confirmed = 3;
378
+ optional int32 kyc_confirmed = 4;
379
+ optional int32 ranking_points = 5;
380
+ optional int32 loyalty_points = 6;
381
+ optional int32 coins = 7;
370
382
  }
@@ -334,6 +334,17 @@ function deserialize_user_SumSubResponse(buffer_arg) {
334
334
  return user_pb.SumSubResponse.deserializeBinary(new Uint8Array(buffer_arg));
335
335
  }
336
336
 
337
+ function serialize_user_TournamentRulesInfoResponse(arg) {
338
+ if (!(arg instanceof user_pb.TournamentRulesInfoResponse)) {
339
+ throw new Error('Expected argument of type user.TournamentRulesInfoResponse');
340
+ }
341
+ return Buffer.from(arg.serializeBinary());
342
+ }
343
+
344
+ function deserialize_user_TournamentRulesInfoResponse(buffer_arg) {
345
+ return user_pb.TournamentRulesInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));
346
+ }
347
+
337
348
  function serialize_user_UserDataRequest(arg) {
338
349
  if (!(arg instanceof user_pb.UserDataRequest)) {
339
350
  throw new Error('Expected argument of type user.UserDataRequest');
@@ -765,6 +776,18 @@ createSumSubApplicant: {
765
776
  responseSerialize: serialize_user_SumSubResponse,
766
777
  responseDeserialize: deserialize_user_SumSubResponse,
767
778
  },
779
+ // Tournaments
780
+ getInfoForTournamentRules: {
781
+ path: '/user.User/getInfoForTournamentRules',
782
+ requestStream: false,
783
+ responseStream: false,
784
+ requestType: user_pb.UserDataRequest,
785
+ responseType: user_pb.TournamentRulesInfoResponse,
786
+ requestSerialize: serialize_user_UserDataRequest,
787
+ requestDeserialize: deserialize_user_UserDataRequest,
788
+ responseSerialize: serialize_user_TournamentRulesInfoResponse,
789
+ responseDeserialize: deserialize_user_TournamentRulesInfoResponse,
790
+ },
768
791
  };
769
792
 
770
793
  exports.UserClient = grpc.makeGenericClientConstructor(UserService);
package/user/user_pb.js CHANGED
@@ -58,6 +58,7 @@ goog.exportSymbol('proto.user.SumSubDocumentItemRequest', null, global);
58
58
  goog.exportSymbol('proto.user.SumSubDocumentRequest', null, global);
59
59
  goog.exportSymbol('proto.user.SumSubDocumentRequest.RequestCase', null, global);
60
60
  goog.exportSymbol('proto.user.SumSubResponse', null, global);
61
+ goog.exportSymbol('proto.user.TournamentRulesInfoResponse', null, global);
61
62
  goog.exportSymbol('proto.user.UserDataRequest', null, global);
62
63
  goog.exportSymbol('proto.user.UserDataResponse', null, global);
63
64
  goog.exportSymbol('proto.user.UserLimitsRequest', null, global);
@@ -1034,6 +1035,27 @@ if (goog.DEBUG && !COMPILED) {
1034
1035
  */
1035
1036
  proto.user.LimitStatusResponse.displayName = 'proto.user.LimitStatusResponse';
1036
1037
  }
1038
+ /**
1039
+ * Generated by JsPbCodeGenerator.
1040
+ * @param {Array=} opt_data Optional initial data array, typically from a
1041
+ * server response, or constructed directly in Javascript. The array is used
1042
+ * in place and becomes part of the constructed object. It is not cloned.
1043
+ * If no data is provided, the constructed object will be empty, but still
1044
+ * valid.
1045
+ * @extends {jspb.Message}
1046
+ * @constructor
1047
+ */
1048
+ proto.user.TournamentRulesInfoResponse = function(opt_data) {
1049
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1050
+ };
1051
+ goog.inherits(proto.user.TournamentRulesInfoResponse, jspb.Message);
1052
+ if (goog.DEBUG && !COMPILED) {
1053
+ /**
1054
+ * @public
1055
+ * @override
1056
+ */
1057
+ proto.user.TournamentRulesInfoResponse.displayName = 'proto.user.TournamentRulesInfoResponse';
1058
+ }
1037
1059
 
1038
1060
 
1039
1061
 
@@ -15709,4 +15731,440 @@ proto.user.LimitStatusResponse.prototype.setStatus = function(value) {
15709
15731
  };
15710
15732
 
15711
15733
 
15734
+
15735
+
15736
+
15737
+ if (jspb.Message.GENERATE_TO_OBJECT) {
15738
+ /**
15739
+ * Creates an object representation of this proto.
15740
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
15741
+ * Optional fields that are not set will be set to undefined.
15742
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
15743
+ * For the list of reserved names please see:
15744
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
15745
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
15746
+ * JSPB instance for transitional soy proto support:
15747
+ * http://goto/soy-param-migration
15748
+ * @return {!Object}
15749
+ */
15750
+ proto.user.TournamentRulesInfoResponse.prototype.toObject = function(opt_includeInstance) {
15751
+ return proto.user.TournamentRulesInfoResponse.toObject(opt_includeInstance, this);
15752
+ };
15753
+
15754
+
15755
+ /**
15756
+ * Static version of the {@see toObject} method.
15757
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
15758
+ * the JSPB instance for transitional soy proto support:
15759
+ * http://goto/soy-param-migration
15760
+ * @param {!proto.user.TournamentRulesInfoResponse} msg The msg instance to transform.
15761
+ * @return {!Object}
15762
+ * @suppress {unusedLocalVariables} f is only used for nested messages
15763
+ */
15764
+ proto.user.TournamentRulesInfoResponse.toObject = function(includeInstance, msg) {
15765
+ var f, obj = {
15766
+ userCategoryId: jspb.Message.getFieldWithDefault(msg, 1, 0),
15767
+ emailConfirmed: jspb.Message.getFieldWithDefault(msg, 2, 0),
15768
+ phoneConfirmed: jspb.Message.getFieldWithDefault(msg, 3, 0),
15769
+ kycConfirmed: jspb.Message.getFieldWithDefault(msg, 4, 0),
15770
+ rankingPoints: jspb.Message.getFieldWithDefault(msg, 5, 0),
15771
+ loyaltyPoints: jspb.Message.getFieldWithDefault(msg, 6, 0),
15772
+ coins: jspb.Message.getFieldWithDefault(msg, 7, 0)
15773
+ };
15774
+
15775
+ if (includeInstance) {
15776
+ obj.$jspbMessageInstance = msg;
15777
+ }
15778
+ return obj;
15779
+ };
15780
+ }
15781
+
15782
+
15783
+ /**
15784
+ * Deserializes binary data (in protobuf wire format).
15785
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
15786
+ * @return {!proto.user.TournamentRulesInfoResponse}
15787
+ */
15788
+ proto.user.TournamentRulesInfoResponse.deserializeBinary = function(bytes) {
15789
+ var reader = new jspb.BinaryReader(bytes);
15790
+ var msg = new proto.user.TournamentRulesInfoResponse;
15791
+ return proto.user.TournamentRulesInfoResponse.deserializeBinaryFromReader(msg, reader);
15792
+ };
15793
+
15794
+
15795
+ /**
15796
+ * Deserializes binary data (in protobuf wire format) from the
15797
+ * given reader into the given message object.
15798
+ * @param {!proto.user.TournamentRulesInfoResponse} msg The message object to deserialize into.
15799
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
15800
+ * @return {!proto.user.TournamentRulesInfoResponse}
15801
+ */
15802
+ proto.user.TournamentRulesInfoResponse.deserializeBinaryFromReader = function(msg, reader) {
15803
+ while (reader.nextField()) {
15804
+ if (reader.isEndGroup()) {
15805
+ break;
15806
+ }
15807
+ var field = reader.getFieldNumber();
15808
+ switch (field) {
15809
+ case 1:
15810
+ var value = /** @type {number} */ (reader.readInt32());
15811
+ msg.setUserCategoryId(value);
15812
+ break;
15813
+ case 2:
15814
+ var value = /** @type {number} */ (reader.readInt32());
15815
+ msg.setEmailConfirmed(value);
15816
+ break;
15817
+ case 3:
15818
+ var value = /** @type {number} */ (reader.readInt32());
15819
+ msg.setPhoneConfirmed(value);
15820
+ break;
15821
+ case 4:
15822
+ var value = /** @type {number} */ (reader.readInt32());
15823
+ msg.setKycConfirmed(value);
15824
+ break;
15825
+ case 5:
15826
+ var value = /** @type {number} */ (reader.readInt32());
15827
+ msg.setRankingPoints(value);
15828
+ break;
15829
+ case 6:
15830
+ var value = /** @type {number} */ (reader.readInt32());
15831
+ msg.setLoyaltyPoints(value);
15832
+ break;
15833
+ case 7:
15834
+ var value = /** @type {number} */ (reader.readInt32());
15835
+ msg.setCoins(value);
15836
+ break;
15837
+ default:
15838
+ reader.skipField();
15839
+ break;
15840
+ }
15841
+ }
15842
+ return msg;
15843
+ };
15844
+
15845
+
15846
+ /**
15847
+ * Serializes the message to binary data (in protobuf wire format).
15848
+ * @return {!Uint8Array}
15849
+ */
15850
+ proto.user.TournamentRulesInfoResponse.prototype.serializeBinary = function() {
15851
+ var writer = new jspb.BinaryWriter();
15852
+ proto.user.TournamentRulesInfoResponse.serializeBinaryToWriter(this, writer);
15853
+ return writer.getResultBuffer();
15854
+ };
15855
+
15856
+
15857
+ /**
15858
+ * Serializes the given message to binary data (in protobuf wire
15859
+ * format), writing to the given BinaryWriter.
15860
+ * @param {!proto.user.TournamentRulesInfoResponse} message
15861
+ * @param {!jspb.BinaryWriter} writer
15862
+ * @suppress {unusedLocalVariables} f is only used for nested messages
15863
+ */
15864
+ proto.user.TournamentRulesInfoResponse.serializeBinaryToWriter = function(message, writer) {
15865
+ var f = undefined;
15866
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
15867
+ if (f != null) {
15868
+ writer.writeInt32(
15869
+ 1,
15870
+ f
15871
+ );
15872
+ }
15873
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
15874
+ if (f != null) {
15875
+ writer.writeInt32(
15876
+ 2,
15877
+ f
15878
+ );
15879
+ }
15880
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
15881
+ if (f != null) {
15882
+ writer.writeInt32(
15883
+ 3,
15884
+ f
15885
+ );
15886
+ }
15887
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
15888
+ if (f != null) {
15889
+ writer.writeInt32(
15890
+ 4,
15891
+ f
15892
+ );
15893
+ }
15894
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
15895
+ if (f != null) {
15896
+ writer.writeInt32(
15897
+ 5,
15898
+ f
15899
+ );
15900
+ }
15901
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
15902
+ if (f != null) {
15903
+ writer.writeInt32(
15904
+ 6,
15905
+ f
15906
+ );
15907
+ }
15908
+ f = /** @type {number} */ (jspb.Message.getField(message, 7));
15909
+ if (f != null) {
15910
+ writer.writeInt32(
15911
+ 7,
15912
+ f
15913
+ );
15914
+ }
15915
+ };
15916
+
15917
+
15918
+ /**
15919
+ * optional int32 user_category_id = 1;
15920
+ * @return {number}
15921
+ */
15922
+ proto.user.TournamentRulesInfoResponse.prototype.getUserCategoryId = function() {
15923
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
15924
+ };
15925
+
15926
+
15927
+ /**
15928
+ * @param {number} value
15929
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
15930
+ */
15931
+ proto.user.TournamentRulesInfoResponse.prototype.setUserCategoryId = function(value) {
15932
+ return jspb.Message.setField(this, 1, value);
15933
+ };
15934
+
15935
+
15936
+ /**
15937
+ * Clears the field making it undefined.
15938
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
15939
+ */
15940
+ proto.user.TournamentRulesInfoResponse.prototype.clearUserCategoryId = function() {
15941
+ return jspb.Message.setField(this, 1, undefined);
15942
+ };
15943
+
15944
+
15945
+ /**
15946
+ * Returns whether this field is set.
15947
+ * @return {boolean}
15948
+ */
15949
+ proto.user.TournamentRulesInfoResponse.prototype.hasUserCategoryId = function() {
15950
+ return jspb.Message.getField(this, 1) != null;
15951
+ };
15952
+
15953
+
15954
+ /**
15955
+ * optional int32 email_confirmed = 2;
15956
+ * @return {number}
15957
+ */
15958
+ proto.user.TournamentRulesInfoResponse.prototype.getEmailConfirmed = function() {
15959
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
15960
+ };
15961
+
15962
+
15963
+ /**
15964
+ * @param {number} value
15965
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
15966
+ */
15967
+ proto.user.TournamentRulesInfoResponse.prototype.setEmailConfirmed = function(value) {
15968
+ return jspb.Message.setField(this, 2, value);
15969
+ };
15970
+
15971
+
15972
+ /**
15973
+ * Clears the field making it undefined.
15974
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
15975
+ */
15976
+ proto.user.TournamentRulesInfoResponse.prototype.clearEmailConfirmed = function() {
15977
+ return jspb.Message.setField(this, 2, undefined);
15978
+ };
15979
+
15980
+
15981
+ /**
15982
+ * Returns whether this field is set.
15983
+ * @return {boolean}
15984
+ */
15985
+ proto.user.TournamentRulesInfoResponse.prototype.hasEmailConfirmed = function() {
15986
+ return jspb.Message.getField(this, 2) != null;
15987
+ };
15988
+
15989
+
15990
+ /**
15991
+ * optional int32 phone_confirmed = 3;
15992
+ * @return {number}
15993
+ */
15994
+ proto.user.TournamentRulesInfoResponse.prototype.getPhoneConfirmed = function() {
15995
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
15996
+ };
15997
+
15998
+
15999
+ /**
16000
+ * @param {number} value
16001
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16002
+ */
16003
+ proto.user.TournamentRulesInfoResponse.prototype.setPhoneConfirmed = function(value) {
16004
+ return jspb.Message.setField(this, 3, value);
16005
+ };
16006
+
16007
+
16008
+ /**
16009
+ * Clears the field making it undefined.
16010
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16011
+ */
16012
+ proto.user.TournamentRulesInfoResponse.prototype.clearPhoneConfirmed = function() {
16013
+ return jspb.Message.setField(this, 3, undefined);
16014
+ };
16015
+
16016
+
16017
+ /**
16018
+ * Returns whether this field is set.
16019
+ * @return {boolean}
16020
+ */
16021
+ proto.user.TournamentRulesInfoResponse.prototype.hasPhoneConfirmed = function() {
16022
+ return jspb.Message.getField(this, 3) != null;
16023
+ };
16024
+
16025
+
16026
+ /**
16027
+ * optional int32 kyc_confirmed = 4;
16028
+ * @return {number}
16029
+ */
16030
+ proto.user.TournamentRulesInfoResponse.prototype.getKycConfirmed = function() {
16031
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
16032
+ };
16033
+
16034
+
16035
+ /**
16036
+ * @param {number} value
16037
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16038
+ */
16039
+ proto.user.TournamentRulesInfoResponse.prototype.setKycConfirmed = function(value) {
16040
+ return jspb.Message.setField(this, 4, value);
16041
+ };
16042
+
16043
+
16044
+ /**
16045
+ * Clears the field making it undefined.
16046
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16047
+ */
16048
+ proto.user.TournamentRulesInfoResponse.prototype.clearKycConfirmed = function() {
16049
+ return jspb.Message.setField(this, 4, undefined);
16050
+ };
16051
+
16052
+
16053
+ /**
16054
+ * Returns whether this field is set.
16055
+ * @return {boolean}
16056
+ */
16057
+ proto.user.TournamentRulesInfoResponse.prototype.hasKycConfirmed = function() {
16058
+ return jspb.Message.getField(this, 4) != null;
16059
+ };
16060
+
16061
+
16062
+ /**
16063
+ * optional int32 ranking_points = 5;
16064
+ * @return {number}
16065
+ */
16066
+ proto.user.TournamentRulesInfoResponse.prototype.getRankingPoints = function() {
16067
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
16068
+ };
16069
+
16070
+
16071
+ /**
16072
+ * @param {number} value
16073
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16074
+ */
16075
+ proto.user.TournamentRulesInfoResponse.prototype.setRankingPoints = function(value) {
16076
+ return jspb.Message.setField(this, 5, value);
16077
+ };
16078
+
16079
+
16080
+ /**
16081
+ * Clears the field making it undefined.
16082
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16083
+ */
16084
+ proto.user.TournamentRulesInfoResponse.prototype.clearRankingPoints = function() {
16085
+ return jspb.Message.setField(this, 5, undefined);
16086
+ };
16087
+
16088
+
16089
+ /**
16090
+ * Returns whether this field is set.
16091
+ * @return {boolean}
16092
+ */
16093
+ proto.user.TournamentRulesInfoResponse.prototype.hasRankingPoints = function() {
16094
+ return jspb.Message.getField(this, 5) != null;
16095
+ };
16096
+
16097
+
16098
+ /**
16099
+ * optional int32 loyalty_points = 6;
16100
+ * @return {number}
16101
+ */
16102
+ proto.user.TournamentRulesInfoResponse.prototype.getLoyaltyPoints = function() {
16103
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
16104
+ };
16105
+
16106
+
16107
+ /**
16108
+ * @param {number} value
16109
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16110
+ */
16111
+ proto.user.TournamentRulesInfoResponse.prototype.setLoyaltyPoints = function(value) {
16112
+ return jspb.Message.setField(this, 6, value);
16113
+ };
16114
+
16115
+
16116
+ /**
16117
+ * Clears the field making it undefined.
16118
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16119
+ */
16120
+ proto.user.TournamentRulesInfoResponse.prototype.clearLoyaltyPoints = function() {
16121
+ return jspb.Message.setField(this, 6, undefined);
16122
+ };
16123
+
16124
+
16125
+ /**
16126
+ * Returns whether this field is set.
16127
+ * @return {boolean}
16128
+ */
16129
+ proto.user.TournamentRulesInfoResponse.prototype.hasLoyaltyPoints = function() {
16130
+ return jspb.Message.getField(this, 6) != null;
16131
+ };
16132
+
16133
+
16134
+ /**
16135
+ * optional int32 coins = 7;
16136
+ * @return {number}
16137
+ */
16138
+ proto.user.TournamentRulesInfoResponse.prototype.getCoins = function() {
16139
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
16140
+ };
16141
+
16142
+
16143
+ /**
16144
+ * @param {number} value
16145
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16146
+ */
16147
+ proto.user.TournamentRulesInfoResponse.prototype.setCoins = function(value) {
16148
+ return jspb.Message.setField(this, 7, value);
16149
+ };
16150
+
16151
+
16152
+ /**
16153
+ * Clears the field making it undefined.
16154
+ * @return {!proto.user.TournamentRulesInfoResponse} returns this
16155
+ */
16156
+ proto.user.TournamentRulesInfoResponse.prototype.clearCoins = function() {
16157
+ return jspb.Message.setField(this, 7, undefined);
16158
+ };
16159
+
16160
+
16161
+ /**
16162
+ * Returns whether this field is set.
16163
+ * @return {boolean}
16164
+ */
16165
+ proto.user.TournamentRulesInfoResponse.prototype.hasCoins = function() {
16166
+ return jspb.Message.getField(this, 7) != null;
16167
+ };
16168
+
16169
+
15712
16170
  goog.object.extend(exports, proto.user);