protobuf-platform 1.2.28 → 1.2.30
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/config/config.proto +14 -0
- package/config/config_grpc_pb.js +34 -0
- package/config/config_pb.js +582 -0
- package/game/game.proto +18 -0
- package/game/game_grpc_pb.js +59 -2
- package/game/game_pb.js +616 -0
- package/package.json +1 -1
package/config/config.proto
CHANGED
@@ -16,6 +16,8 @@ service Config {
|
|
16
16
|
rpc getCurrencyRate(CurrencyRateRequest) returns (CurrencyRateResponse);
|
17
17
|
//OpenAI
|
18
18
|
rpc generateText(PromptRequest) returns (GeneratedTextResponse);
|
19
|
+
//Common data
|
20
|
+
rpc getCountries(CommonCountriesRequest) returns (CommonCountriesResponse);
|
19
21
|
}
|
20
22
|
|
21
23
|
message PingRequest { string ping = 1; }
|
@@ -85,4 +87,16 @@ message PromptRequest {
|
|
85
87
|
}
|
86
88
|
message GeneratedTextResponse {
|
87
89
|
string text = 1;
|
90
|
+
}
|
91
|
+
//Common
|
92
|
+
message CountryItem {
|
93
|
+
string code = 1;
|
94
|
+
string name = 2;
|
95
|
+
}
|
96
|
+
message CommonCountriesRequest {
|
97
|
+
optional int32 limit = 1;
|
98
|
+
optional int32 offset = 2;
|
99
|
+
}
|
100
|
+
message CommonCountriesResponse {
|
101
|
+
repeated CountryItem countries = 1;
|
88
102
|
}
|
package/config/config_grpc_pb.js
CHANGED
@@ -4,6 +4,28 @@
|
|
4
4
|
var grpc = require('@grpc/grpc-js');
|
5
5
|
var config_pb = require('./config_pb.js');
|
6
6
|
|
7
|
+
function serialize_config_CommonCountriesRequest(arg) {
|
8
|
+
if (!(arg instanceof config_pb.CommonCountriesRequest)) {
|
9
|
+
throw new Error('Expected argument of type config.CommonCountriesRequest');
|
10
|
+
}
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
12
|
+
}
|
13
|
+
|
14
|
+
function deserialize_config_CommonCountriesRequest(buffer_arg) {
|
15
|
+
return config_pb.CommonCountriesRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
16
|
+
}
|
17
|
+
|
18
|
+
function serialize_config_CommonCountriesResponse(arg) {
|
19
|
+
if (!(arg instanceof config_pb.CommonCountriesResponse)) {
|
20
|
+
throw new Error('Expected argument of type config.CommonCountriesResponse');
|
21
|
+
}
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
23
|
+
}
|
24
|
+
|
25
|
+
function deserialize_config_CommonCountriesResponse(buffer_arg) {
|
26
|
+
return config_pb.CommonCountriesResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
27
|
+
}
|
28
|
+
|
7
29
|
function serialize_config_ConfigDataResponse(arg) {
|
8
30
|
if (!(arg instanceof config_pb.ConfigDataResponse)) {
|
9
31
|
throw new Error('Expected argument of type config.ConfigDataResponse');
|
@@ -253,6 +275,18 @@ generateText: {
|
|
253
275
|
responseSerialize: serialize_config_GeneratedTextResponse,
|
254
276
|
responseDeserialize: deserialize_config_GeneratedTextResponse,
|
255
277
|
},
|
278
|
+
// Common data
|
279
|
+
getCountries: {
|
280
|
+
path: '/config.Config/getCountries',
|
281
|
+
requestStream: false,
|
282
|
+
responseStream: false,
|
283
|
+
requestType: config_pb.CommonCountriesRequest,
|
284
|
+
responseType: config_pb.CommonCountriesResponse,
|
285
|
+
requestSerialize: serialize_config_CommonCountriesRequest,
|
286
|
+
requestDeserialize: deserialize_config_CommonCountriesRequest,
|
287
|
+
responseSerialize: serialize_config_CommonCountriesResponse,
|
288
|
+
responseDeserialize: deserialize_config_CommonCountriesResponse,
|
289
|
+
},
|
256
290
|
};
|
257
291
|
|
258
292
|
exports.ConfigClient = grpc.makeGenericClientConstructor(ConfigService, 'Config');
|
package/config/config_pb.js
CHANGED
@@ -21,9 +21,12 @@ var global = (function() {
|
|
21
21
|
return Function('return this')();
|
22
22
|
}.call(null));
|
23
23
|
|
24
|
+
goog.exportSymbol('proto.config.CommonCountriesRequest', null, global);
|
25
|
+
goog.exportSymbol('proto.config.CommonCountriesResponse', null, global);
|
24
26
|
goog.exportSymbol('proto.config.ConfigDataResponse', null, global);
|
25
27
|
goog.exportSymbol('proto.config.ConfigRequest', null, global);
|
26
28
|
goog.exportSymbol('proto.config.ConfigStatusResponse', null, global);
|
29
|
+
goog.exportSymbol('proto.config.CountryItem', null, global);
|
27
30
|
goog.exportSymbol('proto.config.CurrencyRateRequest', null, global);
|
28
31
|
goog.exportSymbol('proto.config.CurrencyRateResponse', null, global);
|
29
32
|
goog.exportSymbol('proto.config.ErrorRequest', null, global);
|
@@ -329,6 +332,69 @@ if (goog.DEBUG && !COMPILED) {
|
|
329
332
|
*/
|
330
333
|
proto.config.GeneratedTextResponse.displayName = 'proto.config.GeneratedTextResponse';
|
331
334
|
}
|
335
|
+
/**
|
336
|
+
* Generated by JsPbCodeGenerator.
|
337
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
338
|
+
* server response, or constructed directly in Javascript. The array is used
|
339
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
340
|
+
* If no data is provided, the constructed object will be empty, but still
|
341
|
+
* valid.
|
342
|
+
* @extends {jspb.Message}
|
343
|
+
* @constructor
|
344
|
+
*/
|
345
|
+
proto.config.CountryItem = function(opt_data) {
|
346
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
347
|
+
};
|
348
|
+
goog.inherits(proto.config.CountryItem, jspb.Message);
|
349
|
+
if (goog.DEBUG && !COMPILED) {
|
350
|
+
/**
|
351
|
+
* @public
|
352
|
+
* @override
|
353
|
+
*/
|
354
|
+
proto.config.CountryItem.displayName = 'proto.config.CountryItem';
|
355
|
+
}
|
356
|
+
/**
|
357
|
+
* Generated by JsPbCodeGenerator.
|
358
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
359
|
+
* server response, or constructed directly in Javascript. The array is used
|
360
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
361
|
+
* If no data is provided, the constructed object will be empty, but still
|
362
|
+
* valid.
|
363
|
+
* @extends {jspb.Message}
|
364
|
+
* @constructor
|
365
|
+
*/
|
366
|
+
proto.config.CommonCountriesRequest = function(opt_data) {
|
367
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
368
|
+
};
|
369
|
+
goog.inherits(proto.config.CommonCountriesRequest, jspb.Message);
|
370
|
+
if (goog.DEBUG && !COMPILED) {
|
371
|
+
/**
|
372
|
+
* @public
|
373
|
+
* @override
|
374
|
+
*/
|
375
|
+
proto.config.CommonCountriesRequest.displayName = 'proto.config.CommonCountriesRequest';
|
376
|
+
}
|
377
|
+
/**
|
378
|
+
* Generated by JsPbCodeGenerator.
|
379
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
380
|
+
* server response, or constructed directly in Javascript. The array is used
|
381
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
382
|
+
* If no data is provided, the constructed object will be empty, but still
|
383
|
+
* valid.
|
384
|
+
* @extends {jspb.Message}
|
385
|
+
* @constructor
|
386
|
+
*/
|
387
|
+
proto.config.CommonCountriesResponse = function(opt_data) {
|
388
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.config.CommonCountriesResponse.repeatedFields_, null);
|
389
|
+
};
|
390
|
+
goog.inherits(proto.config.CommonCountriesResponse, jspb.Message);
|
391
|
+
if (goog.DEBUG && !COMPILED) {
|
392
|
+
/**
|
393
|
+
* @public
|
394
|
+
* @override
|
395
|
+
*/
|
396
|
+
proto.config.CommonCountriesResponse.displayName = 'proto.config.CommonCountriesResponse';
|
397
|
+
}
|
332
398
|
|
333
399
|
|
334
400
|
|
@@ -3132,4 +3198,520 @@ proto.config.GeneratedTextResponse.prototype.setText = function(value) {
|
|
3132
3198
|
};
|
3133
3199
|
|
3134
3200
|
|
3201
|
+
|
3202
|
+
|
3203
|
+
|
3204
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
3205
|
+
/**
|
3206
|
+
* Creates an object representation of this proto.
|
3207
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
3208
|
+
* Optional fields that are not set will be set to undefined.
|
3209
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
3210
|
+
* For the list of reserved names please see:
|
3211
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
3212
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
3213
|
+
* JSPB instance for transitional soy proto support:
|
3214
|
+
* http://goto/soy-param-migration
|
3215
|
+
* @return {!Object}
|
3216
|
+
*/
|
3217
|
+
proto.config.CountryItem.prototype.toObject = function(opt_includeInstance) {
|
3218
|
+
return proto.config.CountryItem.toObject(opt_includeInstance, this);
|
3219
|
+
};
|
3220
|
+
|
3221
|
+
|
3222
|
+
/**
|
3223
|
+
* Static version of the {@see toObject} method.
|
3224
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
3225
|
+
* the JSPB instance for transitional soy proto support:
|
3226
|
+
* http://goto/soy-param-migration
|
3227
|
+
* @param {!proto.config.CountryItem} msg The msg instance to transform.
|
3228
|
+
* @return {!Object}
|
3229
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
3230
|
+
*/
|
3231
|
+
proto.config.CountryItem.toObject = function(includeInstance, msg) {
|
3232
|
+
var f, obj = {
|
3233
|
+
code: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
3234
|
+
name: jspb.Message.getFieldWithDefault(msg, 2, "")
|
3235
|
+
};
|
3236
|
+
|
3237
|
+
if (includeInstance) {
|
3238
|
+
obj.$jspbMessageInstance = msg;
|
3239
|
+
}
|
3240
|
+
return obj;
|
3241
|
+
};
|
3242
|
+
}
|
3243
|
+
|
3244
|
+
|
3245
|
+
/**
|
3246
|
+
* Deserializes binary data (in protobuf wire format).
|
3247
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
3248
|
+
* @return {!proto.config.CountryItem}
|
3249
|
+
*/
|
3250
|
+
proto.config.CountryItem.deserializeBinary = function(bytes) {
|
3251
|
+
var reader = new jspb.BinaryReader(bytes);
|
3252
|
+
var msg = new proto.config.CountryItem;
|
3253
|
+
return proto.config.CountryItem.deserializeBinaryFromReader(msg, reader);
|
3254
|
+
};
|
3255
|
+
|
3256
|
+
|
3257
|
+
/**
|
3258
|
+
* Deserializes binary data (in protobuf wire format) from the
|
3259
|
+
* given reader into the given message object.
|
3260
|
+
* @param {!proto.config.CountryItem} msg The message object to deserialize into.
|
3261
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
3262
|
+
* @return {!proto.config.CountryItem}
|
3263
|
+
*/
|
3264
|
+
proto.config.CountryItem.deserializeBinaryFromReader = function(msg, reader) {
|
3265
|
+
while (reader.nextField()) {
|
3266
|
+
if (reader.isEndGroup()) {
|
3267
|
+
break;
|
3268
|
+
}
|
3269
|
+
var field = reader.getFieldNumber();
|
3270
|
+
switch (field) {
|
3271
|
+
case 1:
|
3272
|
+
var value = /** @type {string} */ (reader.readString());
|
3273
|
+
msg.setCode(value);
|
3274
|
+
break;
|
3275
|
+
case 2:
|
3276
|
+
var value = /** @type {string} */ (reader.readString());
|
3277
|
+
msg.setName(value);
|
3278
|
+
break;
|
3279
|
+
default:
|
3280
|
+
reader.skipField();
|
3281
|
+
break;
|
3282
|
+
}
|
3283
|
+
}
|
3284
|
+
return msg;
|
3285
|
+
};
|
3286
|
+
|
3287
|
+
|
3288
|
+
/**
|
3289
|
+
* Serializes the message to binary data (in protobuf wire format).
|
3290
|
+
* @return {!Uint8Array}
|
3291
|
+
*/
|
3292
|
+
proto.config.CountryItem.prototype.serializeBinary = function() {
|
3293
|
+
var writer = new jspb.BinaryWriter();
|
3294
|
+
proto.config.CountryItem.serializeBinaryToWriter(this, writer);
|
3295
|
+
return writer.getResultBuffer();
|
3296
|
+
};
|
3297
|
+
|
3298
|
+
|
3299
|
+
/**
|
3300
|
+
* Serializes the given message to binary data (in protobuf wire
|
3301
|
+
* format), writing to the given BinaryWriter.
|
3302
|
+
* @param {!proto.config.CountryItem} message
|
3303
|
+
* @param {!jspb.BinaryWriter} writer
|
3304
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
3305
|
+
*/
|
3306
|
+
proto.config.CountryItem.serializeBinaryToWriter = function(message, writer) {
|
3307
|
+
var f = undefined;
|
3308
|
+
f = message.getCode();
|
3309
|
+
if (f.length > 0) {
|
3310
|
+
writer.writeString(
|
3311
|
+
1,
|
3312
|
+
f
|
3313
|
+
);
|
3314
|
+
}
|
3315
|
+
f = message.getName();
|
3316
|
+
if (f.length > 0) {
|
3317
|
+
writer.writeString(
|
3318
|
+
2,
|
3319
|
+
f
|
3320
|
+
);
|
3321
|
+
}
|
3322
|
+
};
|
3323
|
+
|
3324
|
+
|
3325
|
+
/**
|
3326
|
+
* optional string code = 1;
|
3327
|
+
* @return {string}
|
3328
|
+
*/
|
3329
|
+
proto.config.CountryItem.prototype.getCode = function() {
|
3330
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
3331
|
+
};
|
3332
|
+
|
3333
|
+
|
3334
|
+
/**
|
3335
|
+
* @param {string} value
|
3336
|
+
* @return {!proto.config.CountryItem} returns this
|
3337
|
+
*/
|
3338
|
+
proto.config.CountryItem.prototype.setCode = function(value) {
|
3339
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
3340
|
+
};
|
3341
|
+
|
3342
|
+
|
3343
|
+
/**
|
3344
|
+
* optional string name = 2;
|
3345
|
+
* @return {string}
|
3346
|
+
*/
|
3347
|
+
proto.config.CountryItem.prototype.getName = function() {
|
3348
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
3349
|
+
};
|
3350
|
+
|
3351
|
+
|
3352
|
+
/**
|
3353
|
+
* @param {string} value
|
3354
|
+
* @return {!proto.config.CountryItem} returns this
|
3355
|
+
*/
|
3356
|
+
proto.config.CountryItem.prototype.setName = function(value) {
|
3357
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
3358
|
+
};
|
3359
|
+
|
3360
|
+
|
3361
|
+
|
3362
|
+
|
3363
|
+
|
3364
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
3365
|
+
/**
|
3366
|
+
* Creates an object representation of this proto.
|
3367
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
3368
|
+
* Optional fields that are not set will be set to undefined.
|
3369
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
3370
|
+
* For the list of reserved names please see:
|
3371
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
3372
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
3373
|
+
* JSPB instance for transitional soy proto support:
|
3374
|
+
* http://goto/soy-param-migration
|
3375
|
+
* @return {!Object}
|
3376
|
+
*/
|
3377
|
+
proto.config.CommonCountriesRequest.prototype.toObject = function(opt_includeInstance) {
|
3378
|
+
return proto.config.CommonCountriesRequest.toObject(opt_includeInstance, this);
|
3379
|
+
};
|
3380
|
+
|
3381
|
+
|
3382
|
+
/**
|
3383
|
+
* Static version of the {@see toObject} method.
|
3384
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
3385
|
+
* the JSPB instance for transitional soy proto support:
|
3386
|
+
* http://goto/soy-param-migration
|
3387
|
+
* @param {!proto.config.CommonCountriesRequest} msg The msg instance to transform.
|
3388
|
+
* @return {!Object}
|
3389
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
3390
|
+
*/
|
3391
|
+
proto.config.CommonCountriesRequest.toObject = function(includeInstance, msg) {
|
3392
|
+
var f, obj = {
|
3393
|
+
limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
3394
|
+
offset: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
3395
|
+
};
|
3396
|
+
|
3397
|
+
if (includeInstance) {
|
3398
|
+
obj.$jspbMessageInstance = msg;
|
3399
|
+
}
|
3400
|
+
return obj;
|
3401
|
+
};
|
3402
|
+
}
|
3403
|
+
|
3404
|
+
|
3405
|
+
/**
|
3406
|
+
* Deserializes binary data (in protobuf wire format).
|
3407
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
3408
|
+
* @return {!proto.config.CommonCountriesRequest}
|
3409
|
+
*/
|
3410
|
+
proto.config.CommonCountriesRequest.deserializeBinary = function(bytes) {
|
3411
|
+
var reader = new jspb.BinaryReader(bytes);
|
3412
|
+
var msg = new proto.config.CommonCountriesRequest;
|
3413
|
+
return proto.config.CommonCountriesRequest.deserializeBinaryFromReader(msg, reader);
|
3414
|
+
};
|
3415
|
+
|
3416
|
+
|
3417
|
+
/**
|
3418
|
+
* Deserializes binary data (in protobuf wire format) from the
|
3419
|
+
* given reader into the given message object.
|
3420
|
+
* @param {!proto.config.CommonCountriesRequest} msg The message object to deserialize into.
|
3421
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
3422
|
+
* @return {!proto.config.CommonCountriesRequest}
|
3423
|
+
*/
|
3424
|
+
proto.config.CommonCountriesRequest.deserializeBinaryFromReader = function(msg, reader) {
|
3425
|
+
while (reader.nextField()) {
|
3426
|
+
if (reader.isEndGroup()) {
|
3427
|
+
break;
|
3428
|
+
}
|
3429
|
+
var field = reader.getFieldNumber();
|
3430
|
+
switch (field) {
|
3431
|
+
case 1:
|
3432
|
+
var value = /** @type {number} */ (reader.readInt32());
|
3433
|
+
msg.setLimit(value);
|
3434
|
+
break;
|
3435
|
+
case 2:
|
3436
|
+
var value = /** @type {number} */ (reader.readInt32());
|
3437
|
+
msg.setOffset(value);
|
3438
|
+
break;
|
3439
|
+
default:
|
3440
|
+
reader.skipField();
|
3441
|
+
break;
|
3442
|
+
}
|
3443
|
+
}
|
3444
|
+
return msg;
|
3445
|
+
};
|
3446
|
+
|
3447
|
+
|
3448
|
+
/**
|
3449
|
+
* Serializes the message to binary data (in protobuf wire format).
|
3450
|
+
* @return {!Uint8Array}
|
3451
|
+
*/
|
3452
|
+
proto.config.CommonCountriesRequest.prototype.serializeBinary = function() {
|
3453
|
+
var writer = new jspb.BinaryWriter();
|
3454
|
+
proto.config.CommonCountriesRequest.serializeBinaryToWriter(this, writer);
|
3455
|
+
return writer.getResultBuffer();
|
3456
|
+
};
|
3457
|
+
|
3458
|
+
|
3459
|
+
/**
|
3460
|
+
* Serializes the given message to binary data (in protobuf wire
|
3461
|
+
* format), writing to the given BinaryWriter.
|
3462
|
+
* @param {!proto.config.CommonCountriesRequest} message
|
3463
|
+
* @param {!jspb.BinaryWriter} writer
|
3464
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
3465
|
+
*/
|
3466
|
+
proto.config.CommonCountriesRequest.serializeBinaryToWriter = function(message, writer) {
|
3467
|
+
var f = undefined;
|
3468
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 1));
|
3469
|
+
if (f != null) {
|
3470
|
+
writer.writeInt32(
|
3471
|
+
1,
|
3472
|
+
f
|
3473
|
+
);
|
3474
|
+
}
|
3475
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
3476
|
+
if (f != null) {
|
3477
|
+
writer.writeInt32(
|
3478
|
+
2,
|
3479
|
+
f
|
3480
|
+
);
|
3481
|
+
}
|
3482
|
+
};
|
3483
|
+
|
3484
|
+
|
3485
|
+
/**
|
3486
|
+
* optional int32 limit = 1;
|
3487
|
+
* @return {number}
|
3488
|
+
*/
|
3489
|
+
proto.config.CommonCountriesRequest.prototype.getLimit = function() {
|
3490
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
3491
|
+
};
|
3492
|
+
|
3493
|
+
|
3494
|
+
/**
|
3495
|
+
* @param {number} value
|
3496
|
+
* @return {!proto.config.CommonCountriesRequest} returns this
|
3497
|
+
*/
|
3498
|
+
proto.config.CommonCountriesRequest.prototype.setLimit = function(value) {
|
3499
|
+
return jspb.Message.setField(this, 1, value);
|
3500
|
+
};
|
3501
|
+
|
3502
|
+
|
3503
|
+
/**
|
3504
|
+
* Clears the field making it undefined.
|
3505
|
+
* @return {!proto.config.CommonCountriesRequest} returns this
|
3506
|
+
*/
|
3507
|
+
proto.config.CommonCountriesRequest.prototype.clearLimit = function() {
|
3508
|
+
return jspb.Message.setField(this, 1, undefined);
|
3509
|
+
};
|
3510
|
+
|
3511
|
+
|
3512
|
+
/**
|
3513
|
+
* Returns whether this field is set.
|
3514
|
+
* @return {boolean}
|
3515
|
+
*/
|
3516
|
+
proto.config.CommonCountriesRequest.prototype.hasLimit = function() {
|
3517
|
+
return jspb.Message.getField(this, 1) != null;
|
3518
|
+
};
|
3519
|
+
|
3520
|
+
|
3521
|
+
/**
|
3522
|
+
* optional int32 offset = 2;
|
3523
|
+
* @return {number}
|
3524
|
+
*/
|
3525
|
+
proto.config.CommonCountriesRequest.prototype.getOffset = function() {
|
3526
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
3527
|
+
};
|
3528
|
+
|
3529
|
+
|
3530
|
+
/**
|
3531
|
+
* @param {number} value
|
3532
|
+
* @return {!proto.config.CommonCountriesRequest} returns this
|
3533
|
+
*/
|
3534
|
+
proto.config.CommonCountriesRequest.prototype.setOffset = function(value) {
|
3535
|
+
return jspb.Message.setField(this, 2, value);
|
3536
|
+
};
|
3537
|
+
|
3538
|
+
|
3539
|
+
/**
|
3540
|
+
* Clears the field making it undefined.
|
3541
|
+
* @return {!proto.config.CommonCountriesRequest} returns this
|
3542
|
+
*/
|
3543
|
+
proto.config.CommonCountriesRequest.prototype.clearOffset = function() {
|
3544
|
+
return jspb.Message.setField(this, 2, undefined);
|
3545
|
+
};
|
3546
|
+
|
3547
|
+
|
3548
|
+
/**
|
3549
|
+
* Returns whether this field is set.
|
3550
|
+
* @return {boolean}
|
3551
|
+
*/
|
3552
|
+
proto.config.CommonCountriesRequest.prototype.hasOffset = function() {
|
3553
|
+
return jspb.Message.getField(this, 2) != null;
|
3554
|
+
};
|
3555
|
+
|
3556
|
+
|
3557
|
+
|
3558
|
+
/**
|
3559
|
+
* List of repeated fields within this message type.
|
3560
|
+
* @private {!Array<number>}
|
3561
|
+
* @const
|
3562
|
+
*/
|
3563
|
+
proto.config.CommonCountriesResponse.repeatedFields_ = [1];
|
3564
|
+
|
3565
|
+
|
3566
|
+
|
3567
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
3568
|
+
/**
|
3569
|
+
* Creates an object representation of this proto.
|
3570
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
3571
|
+
* Optional fields that are not set will be set to undefined.
|
3572
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
3573
|
+
* For the list of reserved names please see:
|
3574
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
3575
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
3576
|
+
* JSPB instance for transitional soy proto support:
|
3577
|
+
* http://goto/soy-param-migration
|
3578
|
+
* @return {!Object}
|
3579
|
+
*/
|
3580
|
+
proto.config.CommonCountriesResponse.prototype.toObject = function(opt_includeInstance) {
|
3581
|
+
return proto.config.CommonCountriesResponse.toObject(opt_includeInstance, this);
|
3582
|
+
};
|
3583
|
+
|
3584
|
+
|
3585
|
+
/**
|
3586
|
+
* Static version of the {@see toObject} method.
|
3587
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
3588
|
+
* the JSPB instance for transitional soy proto support:
|
3589
|
+
* http://goto/soy-param-migration
|
3590
|
+
* @param {!proto.config.CommonCountriesResponse} msg The msg instance to transform.
|
3591
|
+
* @return {!Object}
|
3592
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
3593
|
+
*/
|
3594
|
+
proto.config.CommonCountriesResponse.toObject = function(includeInstance, msg) {
|
3595
|
+
var f, obj = {
|
3596
|
+
countriesList: jspb.Message.toObjectList(msg.getCountriesList(),
|
3597
|
+
proto.config.CountryItem.toObject, includeInstance)
|
3598
|
+
};
|
3599
|
+
|
3600
|
+
if (includeInstance) {
|
3601
|
+
obj.$jspbMessageInstance = msg;
|
3602
|
+
}
|
3603
|
+
return obj;
|
3604
|
+
};
|
3605
|
+
}
|
3606
|
+
|
3607
|
+
|
3608
|
+
/**
|
3609
|
+
* Deserializes binary data (in protobuf wire format).
|
3610
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
3611
|
+
* @return {!proto.config.CommonCountriesResponse}
|
3612
|
+
*/
|
3613
|
+
proto.config.CommonCountriesResponse.deserializeBinary = function(bytes) {
|
3614
|
+
var reader = new jspb.BinaryReader(bytes);
|
3615
|
+
var msg = new proto.config.CommonCountriesResponse;
|
3616
|
+
return proto.config.CommonCountriesResponse.deserializeBinaryFromReader(msg, reader);
|
3617
|
+
};
|
3618
|
+
|
3619
|
+
|
3620
|
+
/**
|
3621
|
+
* Deserializes binary data (in protobuf wire format) from the
|
3622
|
+
* given reader into the given message object.
|
3623
|
+
* @param {!proto.config.CommonCountriesResponse} msg The message object to deserialize into.
|
3624
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
3625
|
+
* @return {!proto.config.CommonCountriesResponse}
|
3626
|
+
*/
|
3627
|
+
proto.config.CommonCountriesResponse.deserializeBinaryFromReader = function(msg, reader) {
|
3628
|
+
while (reader.nextField()) {
|
3629
|
+
if (reader.isEndGroup()) {
|
3630
|
+
break;
|
3631
|
+
}
|
3632
|
+
var field = reader.getFieldNumber();
|
3633
|
+
switch (field) {
|
3634
|
+
case 1:
|
3635
|
+
var value = new proto.config.CountryItem;
|
3636
|
+
reader.readMessage(value,proto.config.CountryItem.deserializeBinaryFromReader);
|
3637
|
+
msg.addCountries(value);
|
3638
|
+
break;
|
3639
|
+
default:
|
3640
|
+
reader.skipField();
|
3641
|
+
break;
|
3642
|
+
}
|
3643
|
+
}
|
3644
|
+
return msg;
|
3645
|
+
};
|
3646
|
+
|
3647
|
+
|
3648
|
+
/**
|
3649
|
+
* Serializes the message to binary data (in protobuf wire format).
|
3650
|
+
* @return {!Uint8Array}
|
3651
|
+
*/
|
3652
|
+
proto.config.CommonCountriesResponse.prototype.serializeBinary = function() {
|
3653
|
+
var writer = new jspb.BinaryWriter();
|
3654
|
+
proto.config.CommonCountriesResponse.serializeBinaryToWriter(this, writer);
|
3655
|
+
return writer.getResultBuffer();
|
3656
|
+
};
|
3657
|
+
|
3658
|
+
|
3659
|
+
/**
|
3660
|
+
* Serializes the given message to binary data (in protobuf wire
|
3661
|
+
* format), writing to the given BinaryWriter.
|
3662
|
+
* @param {!proto.config.CommonCountriesResponse} message
|
3663
|
+
* @param {!jspb.BinaryWriter} writer
|
3664
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
3665
|
+
*/
|
3666
|
+
proto.config.CommonCountriesResponse.serializeBinaryToWriter = function(message, writer) {
|
3667
|
+
var f = undefined;
|
3668
|
+
f = message.getCountriesList();
|
3669
|
+
if (f.length > 0) {
|
3670
|
+
writer.writeRepeatedMessage(
|
3671
|
+
1,
|
3672
|
+
f,
|
3673
|
+
proto.config.CountryItem.serializeBinaryToWriter
|
3674
|
+
);
|
3675
|
+
}
|
3676
|
+
};
|
3677
|
+
|
3678
|
+
|
3679
|
+
/**
|
3680
|
+
* repeated CountryItem countries = 1;
|
3681
|
+
* @return {!Array<!proto.config.CountryItem>}
|
3682
|
+
*/
|
3683
|
+
proto.config.CommonCountriesResponse.prototype.getCountriesList = function() {
|
3684
|
+
return /** @type{!Array<!proto.config.CountryItem>} */ (
|
3685
|
+
jspb.Message.getRepeatedWrapperField(this, proto.config.CountryItem, 1));
|
3686
|
+
};
|
3687
|
+
|
3688
|
+
|
3689
|
+
/**
|
3690
|
+
* @param {!Array<!proto.config.CountryItem>} value
|
3691
|
+
* @return {!proto.config.CommonCountriesResponse} returns this
|
3692
|
+
*/
|
3693
|
+
proto.config.CommonCountriesResponse.prototype.setCountriesList = function(value) {
|
3694
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
3695
|
+
};
|
3696
|
+
|
3697
|
+
|
3698
|
+
/**
|
3699
|
+
* @param {!proto.config.CountryItem=} opt_value
|
3700
|
+
* @param {number=} opt_index
|
3701
|
+
* @return {!proto.config.CountryItem}
|
3702
|
+
*/
|
3703
|
+
proto.config.CommonCountriesResponse.prototype.addCountries = function(opt_value, opt_index) {
|
3704
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.config.CountryItem, opt_index);
|
3705
|
+
};
|
3706
|
+
|
3707
|
+
|
3708
|
+
/**
|
3709
|
+
* Clears the list making it empty but non-null.
|
3710
|
+
* @return {!proto.config.CommonCountriesResponse} returns this
|
3711
|
+
*/
|
3712
|
+
proto.config.CommonCountriesResponse.prototype.clearCountriesList = function() {
|
3713
|
+
return this.setCountriesList([]);
|
3714
|
+
};
|
3715
|
+
|
3716
|
+
|
3135
3717
|
goog.object.extend(exports, proto.config);
|
package/game/game.proto
CHANGED
@@ -3,8 +3,12 @@ syntax = "proto3";
|
|
3
3
|
package game;
|
4
4
|
|
5
5
|
service Game {
|
6
|
+
//Tech
|
6
7
|
rpc checkConnection(PingRequest) returns (PongResponse);
|
8
|
+
//Common
|
7
9
|
rpc getMediaResource(GetFileRequest) returns (stream File);
|
10
|
+
rpc setGeoRestrictions(GeoRestrictionRequest) returns (GeoRestrictionStatusResponse);
|
11
|
+
rpc getGeoRestrictions(GeoRestrictionRequest) returns (GeoRestrictionResponse);
|
8
12
|
//Categories
|
9
13
|
rpc createSingleCategory(stream CategoryRequest) returns (CategoryResponse);
|
10
14
|
rpc readSingleCategory(GetCategoryRequest) returns (CategoryResponse);
|
@@ -692,4 +696,18 @@ message SegmentedUserRequest {
|
|
692
696
|
}
|
693
697
|
message SegmentedUserResponse {
|
694
698
|
repeated int32 user_ids = 1;
|
699
|
+
}
|
700
|
+
//Restrictions
|
701
|
+
//GEO
|
702
|
+
message GeoRestrictionRequest {
|
703
|
+
int32 instance_id = 1;
|
704
|
+
string instance_type = 2;
|
705
|
+
optional string mode = 3;
|
706
|
+
repeated string geo = 4;
|
707
|
+
}
|
708
|
+
message GeoRestrictionStatusResponse {
|
709
|
+
string status = 1;
|
710
|
+
}
|
711
|
+
message GeoRestrictionResponse {
|
712
|
+
repeated string geo = 1;
|
695
713
|
}
|