protobuf-platform 1.2.18 → 1.2.20

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/bet/bet.proto CHANGED
@@ -16,6 +16,7 @@ service Bet {
16
16
  rpc axiomCheckSession(AxiomCheckSessionRequest) returns (AxiomCheckSessionResponse);
17
17
  rpc axiomGetBets(AxiomGetBetsRequest) returns (AxiomBetsResponse);
18
18
  rpc axiomCreateBet(AxiomCreateBetRequest) returns (AxiomBetStatusResponse);
19
+ rpc axiomProcessBet(AxiomProcessBetRequest) returns (AxiomBetStatusResponse);
19
20
  }
20
21
 
21
22
  message PingRequest { string ping = 1; }
@@ -124,10 +125,12 @@ message AxiomCheckSessionRequest {
124
125
  message AxiomCheckSessionResponse {
125
126
  repeated string user_groups = 1;
126
127
  }
127
- message AxiomGetBetsRequest {}
128
- message AxiomBetsResponse {
128
+ message AxiomGetBetsRequest {
129
129
  repeated string bid = 1;
130
130
  }
131
+ message AxiomBetsResponse {
132
+ string bets = 1;
133
+ }
131
134
  message AxiomCreateBetRequest {
132
135
  float amount = 1;
133
136
  string currency = 2;
@@ -138,6 +141,12 @@ message AxiomCreateBetRequest {
138
141
  optional string freebet_transaction_id = 7;
139
142
  optional string bonus_type = 8;
140
143
  }
144
+ message AxiomProcessBetRequest {
145
+ float amount = 1;
146
+ string bid = 2;
147
+ int32 user_id = 3;
148
+ string hash = 4;
149
+ }
141
150
  message AxiomBetStatusResponse {
142
151
  string status = 1;
143
152
  }
@@ -92,6 +92,17 @@ function deserialize_bet_AxiomGetHashRequest(buffer_arg) {
92
92
  return bet_pb.AxiomGetHashRequest.deserializeBinary(new Uint8Array(buffer_arg));
93
93
  }
94
94
 
95
+ function serialize_bet_AxiomProcessBetRequest(arg) {
96
+ if (!(arg instanceof bet_pb.AxiomProcessBetRequest)) {
97
+ throw new Error('Expected argument of type bet.AxiomProcessBetRequest');
98
+ }
99
+ return Buffer.from(arg.serializeBinary());
100
+ }
101
+
102
+ function deserialize_bet_AxiomProcessBetRequest(buffer_arg) {
103
+ return bet_pb.AxiomProcessBetRequest.deserializeBinary(new Uint8Array(buffer_arg));
104
+ }
105
+
95
106
  function serialize_bet_BetsHistoryResponse(arg) {
96
107
  if (!(arg instanceof bet_pb.BetsHistoryResponse)) {
97
108
  throw new Error('Expected argument of type bet.BetsHistoryResponse');
@@ -275,6 +286,17 @@ axiomGetAuthHash: {
275
286
  responseSerialize: serialize_bet_AxiomBetStatusResponse,
276
287
  responseDeserialize: deserialize_bet_AxiomBetStatusResponse,
277
288
  },
289
+ axiomProcessBet: {
290
+ path: '/bet.Bet/axiomProcessBet',
291
+ requestStream: false,
292
+ responseStream: false,
293
+ requestType: bet_pb.AxiomProcessBetRequest,
294
+ responseType: bet_pb.AxiomBetStatusResponse,
295
+ requestSerialize: serialize_bet_AxiomProcessBetRequest,
296
+ requestDeserialize: deserialize_bet_AxiomProcessBetRequest,
297
+ responseSerialize: serialize_bet_AxiomBetStatusResponse,
298
+ responseDeserialize: deserialize_bet_AxiomBetStatusResponse,
299
+ },
278
300
  };
279
301
 
280
302
  exports.BetClient = grpc.makeGenericClientConstructor(BetService, 'Bet');
package/bet/bet_pb.js CHANGED
@@ -29,6 +29,7 @@ goog.exportSymbol('proto.bet.AxiomCheckSessionResponse', null, global);
29
29
  goog.exportSymbol('proto.bet.AxiomCreateBetRequest', null, global);
30
30
  goog.exportSymbol('proto.bet.AxiomGetBetsRequest', null, global);
31
31
  goog.exportSymbol('proto.bet.AxiomGetHashRequest', null, global);
32
+ goog.exportSymbol('proto.bet.AxiomProcessBetRequest', null, global);
32
33
  goog.exportSymbol('proto.bet.BetsHistoryResponse', null, global);
33
34
  goog.exportSymbol('proto.bet.DashboardGameInfo', null, global);
34
35
  goog.exportSymbol('proto.bet.DashboardRequest', null, global);
@@ -366,7 +367,7 @@ if (goog.DEBUG && !COMPILED) {
366
367
  * @constructor
367
368
  */
368
369
  proto.bet.AxiomGetBetsRequest = function(opt_data) {
369
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
370
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.bet.AxiomGetBetsRequest.repeatedFields_, null);
370
371
  };
371
372
  goog.inherits(proto.bet.AxiomGetBetsRequest, jspb.Message);
372
373
  if (goog.DEBUG && !COMPILED) {
@@ -387,7 +388,7 @@ if (goog.DEBUG && !COMPILED) {
387
388
  * @constructor
388
389
  */
389
390
  proto.bet.AxiomBetsResponse = function(opt_data) {
390
- jspb.Message.initialize(this, opt_data, 0, -1, proto.bet.AxiomBetsResponse.repeatedFields_, null);
391
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
391
392
  };
392
393
  goog.inherits(proto.bet.AxiomBetsResponse, jspb.Message);
393
394
  if (goog.DEBUG && !COMPILED) {
@@ -418,6 +419,27 @@ if (goog.DEBUG && !COMPILED) {
418
419
  */
419
420
  proto.bet.AxiomCreateBetRequest.displayName = 'proto.bet.AxiomCreateBetRequest';
420
421
  }
422
+ /**
423
+ * Generated by JsPbCodeGenerator.
424
+ * @param {Array=} opt_data Optional initial data array, typically from a
425
+ * server response, or constructed directly in Javascript. The array is used
426
+ * in place and becomes part of the constructed object. It is not cloned.
427
+ * If no data is provided, the constructed object will be empty, but still
428
+ * valid.
429
+ * @extends {jspb.Message}
430
+ * @constructor
431
+ */
432
+ proto.bet.AxiomProcessBetRequest = function(opt_data) {
433
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
434
+ };
435
+ goog.inherits(proto.bet.AxiomProcessBetRequest, jspb.Message);
436
+ if (goog.DEBUG && !COMPILED) {
437
+ /**
438
+ * @public
439
+ * @override
440
+ */
441
+ proto.bet.AxiomProcessBetRequest.displayName = 'proto.bet.AxiomProcessBetRequest';
442
+ }
421
443
  /**
422
444
  * Generated by JsPbCodeGenerator.
423
445
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -5462,6 +5484,13 @@ proto.bet.AxiomCheckSessionResponse.prototype.clearUserGroupsList = function() {
5462
5484
 
5463
5485
 
5464
5486
 
5487
+ /**
5488
+ * List of repeated fields within this message type.
5489
+ * @private {!Array<number>}
5490
+ * @const
5491
+ */
5492
+ proto.bet.AxiomGetBetsRequest.repeatedFields_ = [1];
5493
+
5465
5494
 
5466
5495
 
5467
5496
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -5493,7 +5522,7 @@ proto.bet.AxiomGetBetsRequest.prototype.toObject = function(opt_includeInstance)
5493
5522
  */
5494
5523
  proto.bet.AxiomGetBetsRequest.toObject = function(includeInstance, msg) {
5495
5524
  var f, obj = {
5496
-
5525
+ bidList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
5497
5526
  };
5498
5527
 
5499
5528
  if (includeInstance) {
@@ -5530,6 +5559,10 @@ proto.bet.AxiomGetBetsRequest.deserializeBinaryFromReader = function(msg, reader
5530
5559
  }
5531
5560
  var field = reader.getFieldNumber();
5532
5561
  switch (field) {
5562
+ case 1:
5563
+ var value = /** @type {string} */ (reader.readString());
5564
+ msg.addBid(value);
5565
+ break;
5533
5566
  default:
5534
5567
  reader.skipField();
5535
5568
  break;
@@ -5559,16 +5592,53 @@ proto.bet.AxiomGetBetsRequest.prototype.serializeBinary = function() {
5559
5592
  */
5560
5593
  proto.bet.AxiomGetBetsRequest.serializeBinaryToWriter = function(message, writer) {
5561
5594
  var f = undefined;
5595
+ f = message.getBidList();
5596
+ if (f.length > 0) {
5597
+ writer.writeRepeatedString(
5598
+ 1,
5599
+ f
5600
+ );
5601
+ }
5562
5602
  };
5563
5603
 
5564
5604
 
5605
+ /**
5606
+ * repeated string bid = 1;
5607
+ * @return {!Array<string>}
5608
+ */
5609
+ proto.bet.AxiomGetBetsRequest.prototype.getBidList = function() {
5610
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
5611
+ };
5612
+
5565
5613
 
5566
5614
  /**
5567
- * List of repeated fields within this message type.
5568
- * @private {!Array<number>}
5569
- * @const
5615
+ * @param {!Array<string>} value
5616
+ * @return {!proto.bet.AxiomGetBetsRequest} returns this
5570
5617
  */
5571
- proto.bet.AxiomBetsResponse.repeatedFields_ = [1];
5618
+ proto.bet.AxiomGetBetsRequest.prototype.setBidList = function(value) {
5619
+ return jspb.Message.setField(this, 1, value || []);
5620
+ };
5621
+
5622
+
5623
+ /**
5624
+ * @param {string} value
5625
+ * @param {number=} opt_index
5626
+ * @return {!proto.bet.AxiomGetBetsRequest} returns this
5627
+ */
5628
+ proto.bet.AxiomGetBetsRequest.prototype.addBid = function(value, opt_index) {
5629
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
5630
+ };
5631
+
5632
+
5633
+ /**
5634
+ * Clears the list making it empty but non-null.
5635
+ * @return {!proto.bet.AxiomGetBetsRequest} returns this
5636
+ */
5637
+ proto.bet.AxiomGetBetsRequest.prototype.clearBidList = function() {
5638
+ return this.setBidList([]);
5639
+ };
5640
+
5641
+
5572
5642
 
5573
5643
 
5574
5644
 
@@ -5601,7 +5671,7 @@ proto.bet.AxiomBetsResponse.prototype.toObject = function(opt_includeInstance) {
5601
5671
  */
5602
5672
  proto.bet.AxiomBetsResponse.toObject = function(includeInstance, msg) {
5603
5673
  var f, obj = {
5604
- bidList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
5674
+ bets: jspb.Message.getFieldWithDefault(msg, 1, "")
5605
5675
  };
5606
5676
 
5607
5677
  if (includeInstance) {
@@ -5640,7 +5710,7 @@ proto.bet.AxiomBetsResponse.deserializeBinaryFromReader = function(msg, reader)
5640
5710
  switch (field) {
5641
5711
  case 1:
5642
5712
  var value = /** @type {string} */ (reader.readString());
5643
- msg.addBid(value);
5713
+ msg.setBets(value);
5644
5714
  break;
5645
5715
  default:
5646
5716
  reader.skipField();
@@ -5671,9 +5741,9 @@ proto.bet.AxiomBetsResponse.prototype.serializeBinary = function() {
5671
5741
  */
5672
5742
  proto.bet.AxiomBetsResponse.serializeBinaryToWriter = function(message, writer) {
5673
5743
  var f = undefined;
5674
- f = message.getBidList();
5744
+ f = message.getBets();
5675
5745
  if (f.length > 0) {
5676
- writer.writeRepeatedString(
5746
+ writer.writeString(
5677
5747
  1,
5678
5748
  f
5679
5749
  );
@@ -5682,39 +5752,20 @@ proto.bet.AxiomBetsResponse.serializeBinaryToWriter = function(message, writer)
5682
5752
 
5683
5753
 
5684
5754
  /**
5685
- * repeated string bid = 1;
5686
- * @return {!Array<string>}
5687
- */
5688
- proto.bet.AxiomBetsResponse.prototype.getBidList = function() {
5689
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
5690
- };
5691
-
5692
-
5693
- /**
5694
- * @param {!Array<string>} value
5695
- * @return {!proto.bet.AxiomBetsResponse} returns this
5755
+ * optional string bets = 1;
5756
+ * @return {string}
5696
5757
  */
5697
- proto.bet.AxiomBetsResponse.prototype.setBidList = function(value) {
5698
- return jspb.Message.setField(this, 1, value || []);
5758
+ proto.bet.AxiomBetsResponse.prototype.getBets = function() {
5759
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
5699
5760
  };
5700
5761
 
5701
5762
 
5702
5763
  /**
5703
5764
  * @param {string} value
5704
- * @param {number=} opt_index
5705
- * @return {!proto.bet.AxiomBetsResponse} returns this
5706
- */
5707
- proto.bet.AxiomBetsResponse.prototype.addBid = function(value, opt_index) {
5708
- return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
5709
- };
5710
-
5711
-
5712
- /**
5713
- * Clears the list making it empty but non-null.
5714
5765
  * @return {!proto.bet.AxiomBetsResponse} returns this
5715
5766
  */
5716
- proto.bet.AxiomBetsResponse.prototype.clearBidList = function() {
5717
- return this.setBidList([]);
5767
+ proto.bet.AxiomBetsResponse.prototype.setBets = function(value) {
5768
+ return jspb.Message.setProto3StringField(this, 1, value);
5718
5769
  };
5719
5770
 
5720
5771
 
@@ -6097,6 +6148,226 @@ proto.bet.AxiomCreateBetRequest.prototype.hasBonusType = function() {
6097
6148
 
6098
6149
 
6099
6150
 
6151
+ if (jspb.Message.GENERATE_TO_OBJECT) {
6152
+ /**
6153
+ * Creates an object representation of this proto.
6154
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
6155
+ * Optional fields that are not set will be set to undefined.
6156
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
6157
+ * For the list of reserved names please see:
6158
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
6159
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
6160
+ * JSPB instance for transitional soy proto support:
6161
+ * http://goto/soy-param-migration
6162
+ * @return {!Object}
6163
+ */
6164
+ proto.bet.AxiomProcessBetRequest.prototype.toObject = function(opt_includeInstance) {
6165
+ return proto.bet.AxiomProcessBetRequest.toObject(opt_includeInstance, this);
6166
+ };
6167
+
6168
+
6169
+ /**
6170
+ * Static version of the {@see toObject} method.
6171
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
6172
+ * the JSPB instance for transitional soy proto support:
6173
+ * http://goto/soy-param-migration
6174
+ * @param {!proto.bet.AxiomProcessBetRequest} msg The msg instance to transform.
6175
+ * @return {!Object}
6176
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6177
+ */
6178
+ proto.bet.AxiomProcessBetRequest.toObject = function(includeInstance, msg) {
6179
+ var f, obj = {
6180
+ amount: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
6181
+ bid: jspb.Message.getFieldWithDefault(msg, 2, ""),
6182
+ userId: jspb.Message.getFieldWithDefault(msg, 3, 0),
6183
+ hash: jspb.Message.getFieldWithDefault(msg, 4, "")
6184
+ };
6185
+
6186
+ if (includeInstance) {
6187
+ obj.$jspbMessageInstance = msg;
6188
+ }
6189
+ return obj;
6190
+ };
6191
+ }
6192
+
6193
+
6194
+ /**
6195
+ * Deserializes binary data (in protobuf wire format).
6196
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
6197
+ * @return {!proto.bet.AxiomProcessBetRequest}
6198
+ */
6199
+ proto.bet.AxiomProcessBetRequest.deserializeBinary = function(bytes) {
6200
+ var reader = new jspb.BinaryReader(bytes);
6201
+ var msg = new proto.bet.AxiomProcessBetRequest;
6202
+ return proto.bet.AxiomProcessBetRequest.deserializeBinaryFromReader(msg, reader);
6203
+ };
6204
+
6205
+
6206
+ /**
6207
+ * Deserializes binary data (in protobuf wire format) from the
6208
+ * given reader into the given message object.
6209
+ * @param {!proto.bet.AxiomProcessBetRequest} msg The message object to deserialize into.
6210
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
6211
+ * @return {!proto.bet.AxiomProcessBetRequest}
6212
+ */
6213
+ proto.bet.AxiomProcessBetRequest.deserializeBinaryFromReader = function(msg, reader) {
6214
+ while (reader.nextField()) {
6215
+ if (reader.isEndGroup()) {
6216
+ break;
6217
+ }
6218
+ var field = reader.getFieldNumber();
6219
+ switch (field) {
6220
+ case 1:
6221
+ var value = /** @type {number} */ (reader.readFloat());
6222
+ msg.setAmount(value);
6223
+ break;
6224
+ case 2:
6225
+ var value = /** @type {string} */ (reader.readString());
6226
+ msg.setBid(value);
6227
+ break;
6228
+ case 3:
6229
+ var value = /** @type {number} */ (reader.readInt32());
6230
+ msg.setUserId(value);
6231
+ break;
6232
+ case 4:
6233
+ var value = /** @type {string} */ (reader.readString());
6234
+ msg.setHash(value);
6235
+ break;
6236
+ default:
6237
+ reader.skipField();
6238
+ break;
6239
+ }
6240
+ }
6241
+ return msg;
6242
+ };
6243
+
6244
+
6245
+ /**
6246
+ * Serializes the message to binary data (in protobuf wire format).
6247
+ * @return {!Uint8Array}
6248
+ */
6249
+ proto.bet.AxiomProcessBetRequest.prototype.serializeBinary = function() {
6250
+ var writer = new jspb.BinaryWriter();
6251
+ proto.bet.AxiomProcessBetRequest.serializeBinaryToWriter(this, writer);
6252
+ return writer.getResultBuffer();
6253
+ };
6254
+
6255
+
6256
+ /**
6257
+ * Serializes the given message to binary data (in protobuf wire
6258
+ * format), writing to the given BinaryWriter.
6259
+ * @param {!proto.bet.AxiomProcessBetRequest} message
6260
+ * @param {!jspb.BinaryWriter} writer
6261
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6262
+ */
6263
+ proto.bet.AxiomProcessBetRequest.serializeBinaryToWriter = function(message, writer) {
6264
+ var f = undefined;
6265
+ f = message.getAmount();
6266
+ if (f !== 0.0) {
6267
+ writer.writeFloat(
6268
+ 1,
6269
+ f
6270
+ );
6271
+ }
6272
+ f = message.getBid();
6273
+ if (f.length > 0) {
6274
+ writer.writeString(
6275
+ 2,
6276
+ f
6277
+ );
6278
+ }
6279
+ f = message.getUserId();
6280
+ if (f !== 0) {
6281
+ writer.writeInt32(
6282
+ 3,
6283
+ f
6284
+ );
6285
+ }
6286
+ f = message.getHash();
6287
+ if (f.length > 0) {
6288
+ writer.writeString(
6289
+ 4,
6290
+ f
6291
+ );
6292
+ }
6293
+ };
6294
+
6295
+
6296
+ /**
6297
+ * optional float amount = 1;
6298
+ * @return {number}
6299
+ */
6300
+ proto.bet.AxiomProcessBetRequest.prototype.getAmount = function() {
6301
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
6302
+ };
6303
+
6304
+
6305
+ /**
6306
+ * @param {number} value
6307
+ * @return {!proto.bet.AxiomProcessBetRequest} returns this
6308
+ */
6309
+ proto.bet.AxiomProcessBetRequest.prototype.setAmount = function(value) {
6310
+ return jspb.Message.setProto3FloatField(this, 1, value);
6311
+ };
6312
+
6313
+
6314
+ /**
6315
+ * optional string bid = 2;
6316
+ * @return {string}
6317
+ */
6318
+ proto.bet.AxiomProcessBetRequest.prototype.getBid = function() {
6319
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
6320
+ };
6321
+
6322
+
6323
+ /**
6324
+ * @param {string} value
6325
+ * @return {!proto.bet.AxiomProcessBetRequest} returns this
6326
+ */
6327
+ proto.bet.AxiomProcessBetRequest.prototype.setBid = function(value) {
6328
+ return jspb.Message.setProto3StringField(this, 2, value);
6329
+ };
6330
+
6331
+
6332
+ /**
6333
+ * optional int32 user_id = 3;
6334
+ * @return {number}
6335
+ */
6336
+ proto.bet.AxiomProcessBetRequest.prototype.getUserId = function() {
6337
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
6338
+ };
6339
+
6340
+
6341
+ /**
6342
+ * @param {number} value
6343
+ * @return {!proto.bet.AxiomProcessBetRequest} returns this
6344
+ */
6345
+ proto.bet.AxiomProcessBetRequest.prototype.setUserId = function(value) {
6346
+ return jspb.Message.setProto3IntField(this, 3, value);
6347
+ };
6348
+
6349
+
6350
+ /**
6351
+ * optional string hash = 4;
6352
+ * @return {string}
6353
+ */
6354
+ proto.bet.AxiomProcessBetRequest.prototype.getHash = function() {
6355
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
6356
+ };
6357
+
6358
+
6359
+ /**
6360
+ * @param {string} value
6361
+ * @return {!proto.bet.AxiomProcessBetRequest} returns this
6362
+ */
6363
+ proto.bet.AxiomProcessBetRequest.prototype.setHash = function(value) {
6364
+ return jspb.Message.setProto3StringField(this, 4, value);
6365
+ };
6366
+
6367
+
6368
+
6369
+
6370
+
6100
6371
  if (jspb.Message.GENERATE_TO_OBJECT) {
6101
6372
  /**
6102
6373
  * Creates an object representation of this proto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.18",
3
+ "version": "1.2.20",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {