protobuf-platform 1.1.10 → 1.1.11
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
@@ -15,6 +15,8 @@ service Tournament {
|
|
15
15
|
rpc setTournamentScoringRule(TournamentScoringRuleRequest) returns (TournamentStatusResponse);
|
16
16
|
rpc setTournamentRewards(TournamentRewardsRequest) returns (TournamentStatusResponse);
|
17
17
|
rpc setTournamentContent(TournamentContentRequest) returns (TournamentStatusResponse);
|
18
|
+
rpc addGamesIntoTournament(TournamentGamesRequest) returns (TournamentStatusResponse);
|
19
|
+
rpc removeGamesFromTournament(TournamentGamesRequest) returns (TournamentStatusResponse);
|
18
20
|
//Tournament Statuses
|
19
21
|
rpc readListTournamentStatuses(PaginationRequest) returns (TournamentStatusItemsResponse);
|
20
22
|
rpc getTournamentsForUser(PaginationRequest) returns (UserTournamentItemsResponse);
|
@@ -150,6 +152,10 @@ message TournamentContentRequest {
|
|
150
152
|
string locale = 2;
|
151
153
|
string content = 3;
|
152
154
|
}
|
155
|
+
message TournamentGamesRequest {
|
156
|
+
int32 tournament_id = 1;
|
157
|
+
repeated int32 game_ids = 2;
|
158
|
+
}
|
153
159
|
//User
|
154
160
|
message UserTournamentItem {
|
155
161
|
optional int32 id = 1;
|
@@ -92,6 +92,17 @@ function deserialize_tournament_TournamentContentRequest(buffer_arg) {
|
|
92
92
|
return tournament_pb.TournamentContentRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
93
93
|
}
|
94
94
|
|
95
|
+
function serialize_tournament_TournamentGamesRequest(arg) {
|
96
|
+
if (!(arg instanceof tournament_pb.TournamentGamesRequest)) {
|
97
|
+
throw new Error('Expected argument of type tournament.TournamentGamesRequest');
|
98
|
+
}
|
99
|
+
return Buffer.from(arg.serializeBinary());
|
100
|
+
}
|
101
|
+
|
102
|
+
function deserialize_tournament_TournamentGamesRequest(buffer_arg) {
|
103
|
+
return tournament_pb.TournamentGamesRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
104
|
+
}
|
105
|
+
|
95
106
|
function serialize_tournament_TournamentItemsResponse(arg) {
|
96
107
|
if (!(arg instanceof tournament_pb.TournamentItemsResponse)) {
|
97
108
|
throw new Error('Expected argument of type tournament.TournamentItemsResponse');
|
@@ -304,6 +315,28 @@ createSingleTournament: {
|
|
304
315
|
responseSerialize: serialize_tournament_TournamentStatusResponse,
|
305
316
|
responseDeserialize: deserialize_tournament_TournamentStatusResponse,
|
306
317
|
},
|
318
|
+
addGamesIntoTournament: {
|
319
|
+
path: '/tournament.Tournament/addGamesIntoTournament',
|
320
|
+
requestStream: false,
|
321
|
+
responseStream: false,
|
322
|
+
requestType: tournament_pb.TournamentGamesRequest,
|
323
|
+
responseType: tournament_pb.TournamentStatusResponse,
|
324
|
+
requestSerialize: serialize_tournament_TournamentGamesRequest,
|
325
|
+
requestDeserialize: deserialize_tournament_TournamentGamesRequest,
|
326
|
+
responseSerialize: serialize_tournament_TournamentStatusResponse,
|
327
|
+
responseDeserialize: deserialize_tournament_TournamentStatusResponse,
|
328
|
+
},
|
329
|
+
removeGamesFromTournament: {
|
330
|
+
path: '/tournament.Tournament/removeGamesFromTournament',
|
331
|
+
requestStream: false,
|
332
|
+
responseStream: false,
|
333
|
+
requestType: tournament_pb.TournamentGamesRequest,
|
334
|
+
responseType: tournament_pb.TournamentStatusResponse,
|
335
|
+
requestSerialize: serialize_tournament_TournamentGamesRequest,
|
336
|
+
requestDeserialize: deserialize_tournament_TournamentGamesRequest,
|
337
|
+
responseSerialize: serialize_tournament_TournamentStatusResponse,
|
338
|
+
responseDeserialize: deserialize_tournament_TournamentStatusResponse,
|
339
|
+
},
|
307
340
|
// Tournament Statuses
|
308
341
|
readListTournamentStatuses: {
|
309
342
|
path: '/tournament.Tournament/readListTournamentStatuses',
|
@@ -33,6 +33,7 @@ goog.exportSymbol('proto.tournament.RewardItem', null, global);
|
|
33
33
|
goog.exportSymbol('proto.tournament.ScoringRule', null, global);
|
34
34
|
goog.exportSymbol('proto.tournament.TournamentActivationRuleRequest', null, global);
|
35
35
|
goog.exportSymbol('proto.tournament.TournamentContentRequest', null, global);
|
36
|
+
goog.exportSymbol('proto.tournament.TournamentGamesRequest', null, global);
|
36
37
|
goog.exportSymbol('proto.tournament.TournamentItem', null, global);
|
37
38
|
goog.exportSymbol('proto.tournament.TournamentItemRequest', null, global);
|
38
39
|
goog.exportSymbol('proto.tournament.TournamentItemsResponse', null, global);
|
@@ -530,6 +531,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
530
531
|
*/
|
531
532
|
proto.tournament.TournamentContentRequest.displayName = 'proto.tournament.TournamentContentRequest';
|
532
533
|
}
|
534
|
+
/**
|
535
|
+
* Generated by JsPbCodeGenerator.
|
536
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
537
|
+
* server response, or constructed directly in Javascript. The array is used
|
538
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
539
|
+
* If no data is provided, the constructed object will be empty, but still
|
540
|
+
* valid.
|
541
|
+
* @extends {jspb.Message}
|
542
|
+
* @constructor
|
543
|
+
*/
|
544
|
+
proto.tournament.TournamentGamesRequest = function(opt_data) {
|
545
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.tournament.TournamentGamesRequest.repeatedFields_, null);
|
546
|
+
};
|
547
|
+
goog.inherits(proto.tournament.TournamentGamesRequest, jspb.Message);
|
548
|
+
if (goog.DEBUG && !COMPILED) {
|
549
|
+
/**
|
550
|
+
* @public
|
551
|
+
* @override
|
552
|
+
*/
|
553
|
+
proto.tournament.TournamentGamesRequest.displayName = 'proto.tournament.TournamentGamesRequest';
|
554
|
+
}
|
533
555
|
/**
|
534
556
|
* Generated by JsPbCodeGenerator.
|
535
557
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
@@ -7228,6 +7250,194 @@ proto.tournament.TournamentContentRequest.prototype.setContent = function(value)
|
|
7228
7250
|
|
7229
7251
|
|
7230
7252
|
|
7253
|
+
/**
|
7254
|
+
* List of repeated fields within this message type.
|
7255
|
+
* @private {!Array<number>}
|
7256
|
+
* @const
|
7257
|
+
*/
|
7258
|
+
proto.tournament.TournamentGamesRequest.repeatedFields_ = [2];
|
7259
|
+
|
7260
|
+
|
7261
|
+
|
7262
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
7263
|
+
/**
|
7264
|
+
* Creates an object representation of this proto.
|
7265
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
7266
|
+
* Optional fields that are not set will be set to undefined.
|
7267
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
7268
|
+
* For the list of reserved names please see:
|
7269
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
7270
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
7271
|
+
* JSPB instance for transitional soy proto support:
|
7272
|
+
* http://goto/soy-param-migration
|
7273
|
+
* @return {!Object}
|
7274
|
+
*/
|
7275
|
+
proto.tournament.TournamentGamesRequest.prototype.toObject = function(opt_includeInstance) {
|
7276
|
+
return proto.tournament.TournamentGamesRequest.toObject(opt_includeInstance, this);
|
7277
|
+
};
|
7278
|
+
|
7279
|
+
|
7280
|
+
/**
|
7281
|
+
* Static version of the {@see toObject} method.
|
7282
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
7283
|
+
* the JSPB instance for transitional soy proto support:
|
7284
|
+
* http://goto/soy-param-migration
|
7285
|
+
* @param {!proto.tournament.TournamentGamesRequest} msg The msg instance to transform.
|
7286
|
+
* @return {!Object}
|
7287
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
7288
|
+
*/
|
7289
|
+
proto.tournament.TournamentGamesRequest.toObject = function(includeInstance, msg) {
|
7290
|
+
var f, obj = {
|
7291
|
+
tournamentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
7292
|
+
gameIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
|
7293
|
+
};
|
7294
|
+
|
7295
|
+
if (includeInstance) {
|
7296
|
+
obj.$jspbMessageInstance = msg;
|
7297
|
+
}
|
7298
|
+
return obj;
|
7299
|
+
};
|
7300
|
+
}
|
7301
|
+
|
7302
|
+
|
7303
|
+
/**
|
7304
|
+
* Deserializes binary data (in protobuf wire format).
|
7305
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
7306
|
+
* @return {!proto.tournament.TournamentGamesRequest}
|
7307
|
+
*/
|
7308
|
+
proto.tournament.TournamentGamesRequest.deserializeBinary = function(bytes) {
|
7309
|
+
var reader = new jspb.BinaryReader(bytes);
|
7310
|
+
var msg = new proto.tournament.TournamentGamesRequest;
|
7311
|
+
return proto.tournament.TournamentGamesRequest.deserializeBinaryFromReader(msg, reader);
|
7312
|
+
};
|
7313
|
+
|
7314
|
+
|
7315
|
+
/**
|
7316
|
+
* Deserializes binary data (in protobuf wire format) from the
|
7317
|
+
* given reader into the given message object.
|
7318
|
+
* @param {!proto.tournament.TournamentGamesRequest} msg The message object to deserialize into.
|
7319
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
7320
|
+
* @return {!proto.tournament.TournamentGamesRequest}
|
7321
|
+
*/
|
7322
|
+
proto.tournament.TournamentGamesRequest.deserializeBinaryFromReader = function(msg, reader) {
|
7323
|
+
while (reader.nextField()) {
|
7324
|
+
if (reader.isEndGroup()) {
|
7325
|
+
break;
|
7326
|
+
}
|
7327
|
+
var field = reader.getFieldNumber();
|
7328
|
+
switch (field) {
|
7329
|
+
case 1:
|
7330
|
+
var value = /** @type {number} */ (reader.readInt32());
|
7331
|
+
msg.setTournamentId(value);
|
7332
|
+
break;
|
7333
|
+
case 2:
|
7334
|
+
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
|
7335
|
+
for (var i = 0; i < values.length; i++) {
|
7336
|
+
msg.addGameIds(values[i]);
|
7337
|
+
}
|
7338
|
+
break;
|
7339
|
+
default:
|
7340
|
+
reader.skipField();
|
7341
|
+
break;
|
7342
|
+
}
|
7343
|
+
}
|
7344
|
+
return msg;
|
7345
|
+
};
|
7346
|
+
|
7347
|
+
|
7348
|
+
/**
|
7349
|
+
* Serializes the message to binary data (in protobuf wire format).
|
7350
|
+
* @return {!Uint8Array}
|
7351
|
+
*/
|
7352
|
+
proto.tournament.TournamentGamesRequest.prototype.serializeBinary = function() {
|
7353
|
+
var writer = new jspb.BinaryWriter();
|
7354
|
+
proto.tournament.TournamentGamesRequest.serializeBinaryToWriter(this, writer);
|
7355
|
+
return writer.getResultBuffer();
|
7356
|
+
};
|
7357
|
+
|
7358
|
+
|
7359
|
+
/**
|
7360
|
+
* Serializes the given message to binary data (in protobuf wire
|
7361
|
+
* format), writing to the given BinaryWriter.
|
7362
|
+
* @param {!proto.tournament.TournamentGamesRequest} message
|
7363
|
+
* @param {!jspb.BinaryWriter} writer
|
7364
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
7365
|
+
*/
|
7366
|
+
proto.tournament.TournamentGamesRequest.serializeBinaryToWriter = function(message, writer) {
|
7367
|
+
var f = undefined;
|
7368
|
+
f = message.getTournamentId();
|
7369
|
+
if (f !== 0) {
|
7370
|
+
writer.writeInt32(
|
7371
|
+
1,
|
7372
|
+
f
|
7373
|
+
);
|
7374
|
+
}
|
7375
|
+
f = message.getGameIdsList();
|
7376
|
+
if (f.length > 0) {
|
7377
|
+
writer.writePackedInt32(
|
7378
|
+
2,
|
7379
|
+
f
|
7380
|
+
);
|
7381
|
+
}
|
7382
|
+
};
|
7383
|
+
|
7384
|
+
|
7385
|
+
/**
|
7386
|
+
* optional int32 tournament_id = 1;
|
7387
|
+
* @return {number}
|
7388
|
+
*/
|
7389
|
+
proto.tournament.TournamentGamesRequest.prototype.getTournamentId = function() {
|
7390
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
7391
|
+
};
|
7392
|
+
|
7393
|
+
|
7394
|
+
/**
|
7395
|
+
* @param {number} value
|
7396
|
+
* @return {!proto.tournament.TournamentGamesRequest} returns this
|
7397
|
+
*/
|
7398
|
+
proto.tournament.TournamentGamesRequest.prototype.setTournamentId = function(value) {
|
7399
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
7400
|
+
};
|
7401
|
+
|
7402
|
+
|
7403
|
+
/**
|
7404
|
+
* repeated int32 game_ids = 2;
|
7405
|
+
* @return {!Array<number>}
|
7406
|
+
*/
|
7407
|
+
proto.tournament.TournamentGamesRequest.prototype.getGameIdsList = function() {
|
7408
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
|
7409
|
+
};
|
7410
|
+
|
7411
|
+
|
7412
|
+
/**
|
7413
|
+
* @param {!Array<number>} value
|
7414
|
+
* @return {!proto.tournament.TournamentGamesRequest} returns this
|
7415
|
+
*/
|
7416
|
+
proto.tournament.TournamentGamesRequest.prototype.setGameIdsList = function(value) {
|
7417
|
+
return jspb.Message.setField(this, 2, value || []);
|
7418
|
+
};
|
7419
|
+
|
7420
|
+
|
7421
|
+
/**
|
7422
|
+
* @param {number} value
|
7423
|
+
* @param {number=} opt_index
|
7424
|
+
* @return {!proto.tournament.TournamentGamesRequest} returns this
|
7425
|
+
*/
|
7426
|
+
proto.tournament.TournamentGamesRequest.prototype.addGameIds = function(value, opt_index) {
|
7427
|
+
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
|
7428
|
+
};
|
7429
|
+
|
7430
|
+
|
7431
|
+
/**
|
7432
|
+
* Clears the list making it empty but non-null.
|
7433
|
+
* @return {!proto.tournament.TournamentGamesRequest} returns this
|
7434
|
+
*/
|
7435
|
+
proto.tournament.TournamentGamesRequest.prototype.clearGameIdsList = function() {
|
7436
|
+
return this.setGameIdsList([]);
|
7437
|
+
};
|
7438
|
+
|
7439
|
+
|
7440
|
+
|
7231
7441
|
/**
|
7232
7442
|
* List of repeated fields within this message type.
|
7233
7443
|
* @private {!Array<number>}
|