protobuf-platform 1.0.298 → 1.1.0

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/game/game.proto CHANGED
@@ -44,6 +44,7 @@ service Game {
44
44
  rpc searchGamesByCollections(SearchGamesIntoCollectionsRequest) returns (GameItemsResponse);
45
45
  rpc searchGamesByTags(SearchGamesIntoTagsRequest) returns (GameItemsResponse);
46
46
  rpc searchGamesByProviders(SearchGamesIntoProvidersRequest) returns (GameItemsResponse);
47
+ rpc searchGamesByCategories(SearchGamesIntoCategoriesRequest) returns (GameItemsResponse);
47
48
  rpc initGameSession(InitGameSessionRequest) returns (InitGameSessionResponse);
48
49
  rpc initDemoGameSession(InitDemoGameSessionRequest) returns (InitGameSessionResponse);
49
50
  rpc getCollectionsByGeo(GameRelationsRequest) returns (GameRelationsResponse);
@@ -435,6 +436,14 @@ message SearchGamesIntoProvidersRequest {
435
436
  optional bool is_mobile = 5;
436
437
  optional bool admin_side = 6;
437
438
  }
439
+ message SearchGamesIntoCategoriesRequest {
440
+ repeated string category_slugs = 1;
441
+ optional string geo = 2;
442
+ optional int32 limit = 3;
443
+ optional int32 offset = 4;
444
+ optional bool is_mobile = 5;
445
+ optional bool admin_side = 6;
446
+ }
438
447
  message GamesPriorityRequest {
439
448
  int32 id = 1;
440
449
  string game_priorities = 2;
@@ -675,6 +675,17 @@ function deserialize_game_ScopeResponse(buffer_arg) {
675
675
  return game_pb.ScopeResponse.deserializeBinary(new Uint8Array(buffer_arg));
676
676
  }
677
677
 
678
+ function serialize_game_SearchGamesIntoCategoriesRequest(arg) {
679
+ if (!(arg instanceof game_pb.SearchGamesIntoCategoriesRequest)) {
680
+ throw new Error('Expected argument of type game.SearchGamesIntoCategoriesRequest');
681
+ }
682
+ return Buffer.from(arg.serializeBinary());
683
+ }
684
+
685
+ function deserialize_game_SearchGamesIntoCategoriesRequest(buffer_arg) {
686
+ return game_pb.SearchGamesIntoCategoriesRequest.deserializeBinary(new Uint8Array(buffer_arg));
687
+ }
688
+
678
689
  function serialize_game_SearchGamesIntoCollectionsRequest(arg) {
679
690
  if (!(arg instanceof game_pb.SearchGamesIntoCollectionsRequest)) {
680
691
  throw new Error('Expected argument of type game.SearchGamesIntoCollectionsRequest');
@@ -1243,6 +1254,17 @@ parseGames: {
1243
1254
  responseSerialize: serialize_game_GameItemsResponse,
1244
1255
  responseDeserialize: deserialize_game_GameItemsResponse,
1245
1256
  },
1257
+ searchGamesByCategories: {
1258
+ path: '/game.Game/searchGamesByCategories',
1259
+ requestStream: false,
1260
+ responseStream: false,
1261
+ requestType: game_pb.SearchGamesIntoCategoriesRequest,
1262
+ responseType: game_pb.GameItemsResponse,
1263
+ requestSerialize: serialize_game_SearchGamesIntoCategoriesRequest,
1264
+ requestDeserialize: deserialize_game_SearchGamesIntoCategoriesRequest,
1265
+ responseSerialize: serialize_game_GameItemsResponse,
1266
+ responseDeserialize: deserialize_game_GameItemsResponse,
1267
+ },
1246
1268
  initGameSession: {
1247
1269
  path: '/game.Game/initGameSession',
1248
1270
  requestStream: false,
package/game/game_pb.js CHANGED
@@ -100,6 +100,7 @@ goog.exportSymbol('proto.game.SEOInstanceRequest', null, global);
100
100
  goog.exportSymbol('proto.game.SEOInstanceResponse', null, global);
101
101
  goog.exportSymbol('proto.game.ScopeRequest', null, global);
102
102
  goog.exportSymbol('proto.game.ScopeResponse', null, global);
103
+ goog.exportSymbol('proto.game.SearchGamesIntoCategoriesRequest', null, global);
103
104
  goog.exportSymbol('proto.game.SearchGamesIntoCollectionsRequest', null, global);
104
105
  goog.exportSymbol('proto.game.SearchGamesIntoProvidersRequest', null, global);
105
106
  goog.exportSymbol('proto.game.SearchGamesIntoTagsRequest', null, global);
@@ -1359,6 +1360,27 @@ if (goog.DEBUG && !COMPILED) {
1359
1360
  */
1360
1361
  proto.game.SearchGamesIntoProvidersRequest.displayName = 'proto.game.SearchGamesIntoProvidersRequest';
1361
1362
  }
1363
+ /**
1364
+ * Generated by JsPbCodeGenerator.
1365
+ * @param {Array=} opt_data Optional initial data array, typically from a
1366
+ * server response, or constructed directly in Javascript. The array is used
1367
+ * in place and becomes part of the constructed object. It is not cloned.
1368
+ * If no data is provided, the constructed object will be empty, but still
1369
+ * valid.
1370
+ * @extends {jspb.Message}
1371
+ * @constructor
1372
+ */
1373
+ proto.game.SearchGamesIntoCategoriesRequest = function(opt_data) {
1374
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.game.SearchGamesIntoCategoriesRequest.repeatedFields_, null);
1375
+ };
1376
+ goog.inherits(proto.game.SearchGamesIntoCategoriesRequest, jspb.Message);
1377
+ if (goog.DEBUG && !COMPILED) {
1378
+ /**
1379
+ * @public
1380
+ * @override
1381
+ */
1382
+ proto.game.SearchGamesIntoCategoriesRequest.displayName = 'proto.game.SearchGamesIntoCategoriesRequest';
1383
+ }
1362
1384
  /**
1363
1385
  * Generated by JsPbCodeGenerator.
1364
1386
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -18140,6 +18162,402 @@ proto.game.SearchGamesIntoProvidersRequest.prototype.hasAdminSide = function() {
18140
18162
 
18141
18163
 
18142
18164
 
18165
+ /**
18166
+ * List of repeated fields within this message type.
18167
+ * @private {!Array<number>}
18168
+ * @const
18169
+ */
18170
+ proto.game.SearchGamesIntoCategoriesRequest.repeatedFields_ = [1];
18171
+
18172
+
18173
+
18174
+ if (jspb.Message.GENERATE_TO_OBJECT) {
18175
+ /**
18176
+ * Creates an object representation of this proto.
18177
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
18178
+ * Optional fields that are not set will be set to undefined.
18179
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
18180
+ * For the list of reserved names please see:
18181
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
18182
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
18183
+ * JSPB instance for transitional soy proto support:
18184
+ * http://goto/soy-param-migration
18185
+ * @return {!Object}
18186
+ */
18187
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.toObject = function(opt_includeInstance) {
18188
+ return proto.game.SearchGamesIntoCategoriesRequest.toObject(opt_includeInstance, this);
18189
+ };
18190
+
18191
+
18192
+ /**
18193
+ * Static version of the {@see toObject} method.
18194
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
18195
+ * the JSPB instance for transitional soy proto support:
18196
+ * http://goto/soy-param-migration
18197
+ * @param {!proto.game.SearchGamesIntoCategoriesRequest} msg The msg instance to transform.
18198
+ * @return {!Object}
18199
+ * @suppress {unusedLocalVariables} f is only used for nested messages
18200
+ */
18201
+ proto.game.SearchGamesIntoCategoriesRequest.toObject = function(includeInstance, msg) {
18202
+ var f, obj = {
18203
+ categorySlugsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
18204
+ geo: jspb.Message.getFieldWithDefault(msg, 2, ""),
18205
+ limit: jspb.Message.getFieldWithDefault(msg, 3, 0),
18206
+ offset: jspb.Message.getFieldWithDefault(msg, 4, 0),
18207
+ isMobile: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
18208
+ adminSide: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
18209
+ };
18210
+
18211
+ if (includeInstance) {
18212
+ obj.$jspbMessageInstance = msg;
18213
+ }
18214
+ return obj;
18215
+ };
18216
+ }
18217
+
18218
+
18219
+ /**
18220
+ * Deserializes binary data (in protobuf wire format).
18221
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
18222
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest}
18223
+ */
18224
+ proto.game.SearchGamesIntoCategoriesRequest.deserializeBinary = function(bytes) {
18225
+ var reader = new jspb.BinaryReader(bytes);
18226
+ var msg = new proto.game.SearchGamesIntoCategoriesRequest;
18227
+ return proto.game.SearchGamesIntoCategoriesRequest.deserializeBinaryFromReader(msg, reader);
18228
+ };
18229
+
18230
+
18231
+ /**
18232
+ * Deserializes binary data (in protobuf wire format) from the
18233
+ * given reader into the given message object.
18234
+ * @param {!proto.game.SearchGamesIntoCategoriesRequest} msg The message object to deserialize into.
18235
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
18236
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest}
18237
+ */
18238
+ proto.game.SearchGamesIntoCategoriesRequest.deserializeBinaryFromReader = function(msg, reader) {
18239
+ while (reader.nextField()) {
18240
+ if (reader.isEndGroup()) {
18241
+ break;
18242
+ }
18243
+ var field = reader.getFieldNumber();
18244
+ switch (field) {
18245
+ case 1:
18246
+ var value = /** @type {string} */ (reader.readString());
18247
+ msg.addCategorySlugs(value);
18248
+ break;
18249
+ case 2:
18250
+ var value = /** @type {string} */ (reader.readString());
18251
+ msg.setGeo(value);
18252
+ break;
18253
+ case 3:
18254
+ var value = /** @type {number} */ (reader.readInt32());
18255
+ msg.setLimit(value);
18256
+ break;
18257
+ case 4:
18258
+ var value = /** @type {number} */ (reader.readInt32());
18259
+ msg.setOffset(value);
18260
+ break;
18261
+ case 5:
18262
+ var value = /** @type {boolean} */ (reader.readBool());
18263
+ msg.setIsMobile(value);
18264
+ break;
18265
+ case 6:
18266
+ var value = /** @type {boolean} */ (reader.readBool());
18267
+ msg.setAdminSide(value);
18268
+ break;
18269
+ default:
18270
+ reader.skipField();
18271
+ break;
18272
+ }
18273
+ }
18274
+ return msg;
18275
+ };
18276
+
18277
+
18278
+ /**
18279
+ * Serializes the message to binary data (in protobuf wire format).
18280
+ * @return {!Uint8Array}
18281
+ */
18282
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.serializeBinary = function() {
18283
+ var writer = new jspb.BinaryWriter();
18284
+ proto.game.SearchGamesIntoCategoriesRequest.serializeBinaryToWriter(this, writer);
18285
+ return writer.getResultBuffer();
18286
+ };
18287
+
18288
+
18289
+ /**
18290
+ * Serializes the given message to binary data (in protobuf wire
18291
+ * format), writing to the given BinaryWriter.
18292
+ * @param {!proto.game.SearchGamesIntoCategoriesRequest} message
18293
+ * @param {!jspb.BinaryWriter} writer
18294
+ * @suppress {unusedLocalVariables} f is only used for nested messages
18295
+ */
18296
+ proto.game.SearchGamesIntoCategoriesRequest.serializeBinaryToWriter = function(message, writer) {
18297
+ var f = undefined;
18298
+ f = message.getCategorySlugsList();
18299
+ if (f.length > 0) {
18300
+ writer.writeRepeatedString(
18301
+ 1,
18302
+ f
18303
+ );
18304
+ }
18305
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
18306
+ if (f != null) {
18307
+ writer.writeString(
18308
+ 2,
18309
+ f
18310
+ );
18311
+ }
18312
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
18313
+ if (f != null) {
18314
+ writer.writeInt32(
18315
+ 3,
18316
+ f
18317
+ );
18318
+ }
18319
+ f = /** @type {number} */ (jspb.Message.getField(message, 4));
18320
+ if (f != null) {
18321
+ writer.writeInt32(
18322
+ 4,
18323
+ f
18324
+ );
18325
+ }
18326
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 5));
18327
+ if (f != null) {
18328
+ writer.writeBool(
18329
+ 5,
18330
+ f
18331
+ );
18332
+ }
18333
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 6));
18334
+ if (f != null) {
18335
+ writer.writeBool(
18336
+ 6,
18337
+ f
18338
+ );
18339
+ }
18340
+ };
18341
+
18342
+
18343
+ /**
18344
+ * repeated string category_slugs = 1;
18345
+ * @return {!Array<string>}
18346
+ */
18347
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.getCategorySlugsList = function() {
18348
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
18349
+ };
18350
+
18351
+
18352
+ /**
18353
+ * @param {!Array<string>} value
18354
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18355
+ */
18356
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.setCategorySlugsList = function(value) {
18357
+ return jspb.Message.setField(this, 1, value || []);
18358
+ };
18359
+
18360
+
18361
+ /**
18362
+ * @param {string} value
18363
+ * @param {number=} opt_index
18364
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18365
+ */
18366
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.addCategorySlugs = function(value, opt_index) {
18367
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
18368
+ };
18369
+
18370
+
18371
+ /**
18372
+ * Clears the list making it empty but non-null.
18373
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18374
+ */
18375
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.clearCategorySlugsList = function() {
18376
+ return this.setCategorySlugsList([]);
18377
+ };
18378
+
18379
+
18380
+ /**
18381
+ * optional string geo = 2;
18382
+ * @return {string}
18383
+ */
18384
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.getGeo = function() {
18385
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
18386
+ };
18387
+
18388
+
18389
+ /**
18390
+ * @param {string} value
18391
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18392
+ */
18393
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.setGeo = function(value) {
18394
+ return jspb.Message.setField(this, 2, value);
18395
+ };
18396
+
18397
+
18398
+ /**
18399
+ * Clears the field making it undefined.
18400
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18401
+ */
18402
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.clearGeo = function() {
18403
+ return jspb.Message.setField(this, 2, undefined);
18404
+ };
18405
+
18406
+
18407
+ /**
18408
+ * Returns whether this field is set.
18409
+ * @return {boolean}
18410
+ */
18411
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.hasGeo = function() {
18412
+ return jspb.Message.getField(this, 2) != null;
18413
+ };
18414
+
18415
+
18416
+ /**
18417
+ * optional int32 limit = 3;
18418
+ * @return {number}
18419
+ */
18420
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.getLimit = function() {
18421
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
18422
+ };
18423
+
18424
+
18425
+ /**
18426
+ * @param {number} value
18427
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18428
+ */
18429
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.setLimit = function(value) {
18430
+ return jspb.Message.setField(this, 3, value);
18431
+ };
18432
+
18433
+
18434
+ /**
18435
+ * Clears the field making it undefined.
18436
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18437
+ */
18438
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.clearLimit = function() {
18439
+ return jspb.Message.setField(this, 3, undefined);
18440
+ };
18441
+
18442
+
18443
+ /**
18444
+ * Returns whether this field is set.
18445
+ * @return {boolean}
18446
+ */
18447
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.hasLimit = function() {
18448
+ return jspb.Message.getField(this, 3) != null;
18449
+ };
18450
+
18451
+
18452
+ /**
18453
+ * optional int32 offset = 4;
18454
+ * @return {number}
18455
+ */
18456
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.getOffset = function() {
18457
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
18458
+ };
18459
+
18460
+
18461
+ /**
18462
+ * @param {number} value
18463
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18464
+ */
18465
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.setOffset = function(value) {
18466
+ return jspb.Message.setField(this, 4, value);
18467
+ };
18468
+
18469
+
18470
+ /**
18471
+ * Clears the field making it undefined.
18472
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18473
+ */
18474
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.clearOffset = function() {
18475
+ return jspb.Message.setField(this, 4, undefined);
18476
+ };
18477
+
18478
+
18479
+ /**
18480
+ * Returns whether this field is set.
18481
+ * @return {boolean}
18482
+ */
18483
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.hasOffset = function() {
18484
+ return jspb.Message.getField(this, 4) != null;
18485
+ };
18486
+
18487
+
18488
+ /**
18489
+ * optional bool is_mobile = 5;
18490
+ * @return {boolean}
18491
+ */
18492
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.getIsMobile = function() {
18493
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
18494
+ };
18495
+
18496
+
18497
+ /**
18498
+ * @param {boolean} value
18499
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18500
+ */
18501
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.setIsMobile = function(value) {
18502
+ return jspb.Message.setField(this, 5, value);
18503
+ };
18504
+
18505
+
18506
+ /**
18507
+ * Clears the field making it undefined.
18508
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18509
+ */
18510
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.clearIsMobile = function() {
18511
+ return jspb.Message.setField(this, 5, undefined);
18512
+ };
18513
+
18514
+
18515
+ /**
18516
+ * Returns whether this field is set.
18517
+ * @return {boolean}
18518
+ */
18519
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.hasIsMobile = function() {
18520
+ return jspb.Message.getField(this, 5) != null;
18521
+ };
18522
+
18523
+
18524
+ /**
18525
+ * optional bool admin_side = 6;
18526
+ * @return {boolean}
18527
+ */
18528
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.getAdminSide = function() {
18529
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
18530
+ };
18531
+
18532
+
18533
+ /**
18534
+ * @param {boolean} value
18535
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18536
+ */
18537
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.setAdminSide = function(value) {
18538
+ return jspb.Message.setField(this, 6, value);
18539
+ };
18540
+
18541
+
18542
+ /**
18543
+ * Clears the field making it undefined.
18544
+ * @return {!proto.game.SearchGamesIntoCategoriesRequest} returns this
18545
+ */
18546
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.clearAdminSide = function() {
18547
+ return jspb.Message.setField(this, 6, undefined);
18548
+ };
18549
+
18550
+
18551
+ /**
18552
+ * Returns whether this field is set.
18553
+ * @return {boolean}
18554
+ */
18555
+ proto.game.SearchGamesIntoCategoriesRequest.prototype.hasAdminSide = function() {
18556
+ return jspb.Message.getField(this, 6) != null;
18557
+ };
18558
+
18559
+
18560
+
18143
18561
 
18144
18562
 
18145
18563
  if (jspb.Message.GENERATE_TO_OBJECT) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.298",
3
+ "version": "1.1.0",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,6 +11,9 @@ service Tournament {
11
11
  rpc updateSingleTournament(stream TournamentRequest) returns (TournamentResponse);
12
12
  rpc deleteSingleTournament(GetTournamentRequest) returns (TournamentStatusResponse);
13
13
  rpc readListTournaments(PaginationRequest) returns (TournamentItemsResponse);
14
+ rpc setTournamentActivationRule(TournamentActivationRuleRequest) returns (TournamentStatusResponse);
15
+ rpc setTournamentScoringRule(TournamentScoringRuleRequest) returns (TournamentStatusResponse);
16
+ rpc setTournamentRewards(TournamentRewardsRequest) returns (TournamentStatusResponse);
14
17
  //Tournament Statuses
15
18
  rpc readListTournamentStatuses(PaginationRequest) returns (TournamentStatusItemsResponse);
16
19
  }
@@ -81,4 +84,45 @@ message TournamentStatusItemsResponse {
81
84
  optional int32 total_pages = 2;
82
85
  optional int32 total_items = 3;
83
86
  }
84
-
87
+ message ActivationRuleItem {
88
+ optional int32 id = 1;
89
+ optional int32 tournament_id = 2;
90
+ optional string currency = 3;
91
+ optional int32 deposit_min_sum = 4;
92
+ optional int32 bets_min_count = 5;
93
+ optional int32 user_category_id = 6;
94
+ optional int32 email_confirmed = 7;
95
+ optional int32 phone_confirmed = 8;
96
+ optional int32 kyc_confirmed = 9;
97
+ optional int32 ranking_points = 10;
98
+ optional int32 loyalty_points = 11;
99
+ optional int32 coins = 12;
100
+ }
101
+ message TournamentActivationRuleRequest {
102
+ repeated ActivationRuleItem items = 1;
103
+ }
104
+ message ScoringRule {
105
+ optional int32 id = 1;
106
+ optional int32 tournament_id = 2;
107
+ optional string metric = 3;
108
+ optional float multiplier = 4;
109
+ optional float min_value = 5;
110
+ optional float max_value = 6;
111
+ optional float weight = 7;
112
+ optional int32 is_active = 8;
113
+ }
114
+ message TournamentScoringRuleRequest {
115
+ repeated ScoringRule items = 1;
116
+ }
117
+ message RewardItem {
118
+ optional int32 id = 1;
119
+ optional int32 tournament_id = 2;
120
+ optional int32 place = 3;
121
+ optional int32 loyalty_points = 4;
122
+ optional int32 ranking_points = 5;
123
+ optional int32 coins = 6;
124
+ optional int32 bonus_id = 7;
125
+ }
126
+ message TournamentRewardsRequest {
127
+ repeated RewardItem items = 1;
128
+ }
@@ -70,6 +70,17 @@ function deserialize_tournament_PongResponse(buffer_arg) {
70
70
  return tournament_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
71
71
  }
72
72
 
73
+ function serialize_tournament_TournamentActivationRuleRequest(arg) {
74
+ if (!(arg instanceof tournament_pb.TournamentActivationRuleRequest)) {
75
+ throw new Error('Expected argument of type tournament.TournamentActivationRuleRequest');
76
+ }
77
+ return Buffer.from(arg.serializeBinary());
78
+ }
79
+
80
+ function deserialize_tournament_TournamentActivationRuleRequest(buffer_arg) {
81
+ return tournament_pb.TournamentActivationRuleRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
+ }
83
+
73
84
  function serialize_tournament_TournamentItemsResponse(arg) {
74
85
  if (!(arg instanceof tournament_pb.TournamentItemsResponse)) {
75
86
  throw new Error('Expected argument of type tournament.TournamentItemsResponse');
@@ -103,6 +114,28 @@ function deserialize_tournament_TournamentResponse(buffer_arg) {
103
114
  return tournament_pb.TournamentResponse.deserializeBinary(new Uint8Array(buffer_arg));
104
115
  }
105
116
 
117
+ function serialize_tournament_TournamentRewardsRequest(arg) {
118
+ if (!(arg instanceof tournament_pb.TournamentRewardsRequest)) {
119
+ throw new Error('Expected argument of type tournament.TournamentRewardsRequest');
120
+ }
121
+ return Buffer.from(arg.serializeBinary());
122
+ }
123
+
124
+ function deserialize_tournament_TournamentRewardsRequest(buffer_arg) {
125
+ return tournament_pb.TournamentRewardsRequest.deserializeBinary(new Uint8Array(buffer_arg));
126
+ }
127
+
128
+ function serialize_tournament_TournamentScoringRuleRequest(arg) {
129
+ if (!(arg instanceof tournament_pb.TournamentScoringRuleRequest)) {
130
+ throw new Error('Expected argument of type tournament.TournamentScoringRuleRequest');
131
+ }
132
+ return Buffer.from(arg.serializeBinary());
133
+ }
134
+
135
+ function deserialize_tournament_TournamentScoringRuleRequest(buffer_arg) {
136
+ return tournament_pb.TournamentScoringRuleRequest.deserializeBinary(new Uint8Array(buffer_arg));
137
+ }
138
+
106
139
  function serialize_tournament_TournamentStatusItemsResponse(arg) {
107
140
  if (!(arg instanceof tournament_pb.TournamentStatusItemsResponse)) {
108
141
  throw new Error('Expected argument of type tournament.TournamentStatusItemsResponse');
@@ -205,6 +238,39 @@ createSingleTournament: {
205
238
  responseSerialize: serialize_tournament_TournamentItemsResponse,
206
239
  responseDeserialize: deserialize_tournament_TournamentItemsResponse,
207
240
  },
241
+ setTournamentActivationRule: {
242
+ path: '/tournament.Tournament/setTournamentActivationRule',
243
+ requestStream: false,
244
+ responseStream: false,
245
+ requestType: tournament_pb.TournamentActivationRuleRequest,
246
+ responseType: tournament_pb.TournamentStatusResponse,
247
+ requestSerialize: serialize_tournament_TournamentActivationRuleRequest,
248
+ requestDeserialize: deserialize_tournament_TournamentActivationRuleRequest,
249
+ responseSerialize: serialize_tournament_TournamentStatusResponse,
250
+ responseDeserialize: deserialize_tournament_TournamentStatusResponse,
251
+ },
252
+ setTournamentScoringRule: {
253
+ path: '/tournament.Tournament/setTournamentScoringRule',
254
+ requestStream: false,
255
+ responseStream: false,
256
+ requestType: tournament_pb.TournamentScoringRuleRequest,
257
+ responseType: tournament_pb.TournamentStatusResponse,
258
+ requestSerialize: serialize_tournament_TournamentScoringRuleRequest,
259
+ requestDeserialize: deserialize_tournament_TournamentScoringRuleRequest,
260
+ responseSerialize: serialize_tournament_TournamentStatusResponse,
261
+ responseDeserialize: deserialize_tournament_TournamentStatusResponse,
262
+ },
263
+ setTournamentRewards: {
264
+ path: '/tournament.Tournament/setTournamentRewards',
265
+ requestStream: false,
266
+ responseStream: false,
267
+ requestType: tournament_pb.TournamentRewardsRequest,
268
+ responseType: tournament_pb.TournamentStatusResponse,
269
+ requestSerialize: serialize_tournament_TournamentRewardsRequest,
270
+ requestDeserialize: deserialize_tournament_TournamentRewardsRequest,
271
+ responseSerialize: serialize_tournament_TournamentStatusResponse,
272
+ responseDeserialize: deserialize_tournament_TournamentStatusResponse,
273
+ },
208
274
  // Tournament Statuses
209
275
  readListTournamentStatuses: {
210
276
  path: '/tournament.Tournament/readListTournamentStatuses',