protobuf-platform 1.0.84 → 1.0.86

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
@@ -4,7 +4,32 @@ package bet;
4
4
 
5
5
  service Bet {
6
6
  rpc checkConnection(PingRequest) returns (PongResponse);
7
+ //User bets info
8
+ rpc getBetsHistory(PaginationRequest) returns (BetsHistoryResponse);
7
9
  }
8
10
 
9
11
  message PingRequest { string ping = 1; }
10
12
  message PongResponse { string pong = 1; }
13
+ message PaginationRequest { int32 limit = 1; int32 offset = 2; optional UserSearchRequest user_search_params = 3; }
14
+ message UserSearchRequest {
15
+ optional string user_id = 1;
16
+ optional string balance_type = 2;
17
+ optional string currency = 3;
18
+ }
19
+ //User info
20
+ message UserBetItem {
21
+ string game_title = 1;
22
+ string action = 2;
23
+ string balance_type = 3;
24
+ float amount = 4;
25
+ optional string currency = 5;
26
+ optional string transaction_id = 6;
27
+ optional string session_id = 7;
28
+ optional string round_id = 8;
29
+ optional string created = 9;
30
+ }
31
+ message BetsHistoryResponse {
32
+ repeated UserBetItem items = 1;
33
+ optional int32 total_pages = 2;
34
+ optional int32 total_items = 3;
35
+ }
@@ -4,6 +4,28 @@
4
4
  var grpc = require('@grpc/grpc-js');
5
5
  var bet_pb = require('./bet_pb.js');
6
6
 
7
+ function serialize_bet_BetsHistoryResponse(arg) {
8
+ if (!(arg instanceof bet_pb.BetsHistoryResponse)) {
9
+ throw new Error('Expected argument of type bet.BetsHistoryResponse');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_bet_BetsHistoryResponse(buffer_arg) {
15
+ return bet_pb.BetsHistoryResponse.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_bet_PaginationRequest(arg) {
19
+ if (!(arg instanceof bet_pb.PaginationRequest)) {
20
+ throw new Error('Expected argument of type bet.PaginationRequest');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_bet_PaginationRequest(buffer_arg) {
26
+ return bet_pb.PaginationRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
7
29
  function serialize_bet_PingRequest(arg) {
8
30
  if (!(arg instanceof bet_pb.PingRequest)) {
9
31
  throw new Error('Expected argument of type bet.PingRequest');
@@ -39,6 +61,18 @@ var BetService = exports.BetService = {
39
61
  responseSerialize: serialize_bet_PongResponse,
40
62
  responseDeserialize: deserialize_bet_PongResponse,
41
63
  },
64
+ // User bets info
65
+ getBetsHistory: {
66
+ path: '/bet.Bet/getBetsHistory',
67
+ requestStream: false,
68
+ responseStream: false,
69
+ requestType: bet_pb.PaginationRequest,
70
+ responseType: bet_pb.BetsHistoryResponse,
71
+ requestSerialize: serialize_bet_PaginationRequest,
72
+ requestDeserialize: deserialize_bet_PaginationRequest,
73
+ responseSerialize: serialize_bet_BetsHistoryResponse,
74
+ responseDeserialize: deserialize_bet_BetsHistoryResponse,
75
+ },
42
76
  };
43
77
 
44
78
  exports.BetClient = grpc.makeGenericClientConstructor(BetService);