protobuf-platform 1.1.8 → 1.1.10

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@ service Tournament {
17
17
  rpc setTournamentContent(TournamentContentRequest) returns (TournamentStatusResponse);
18
18
  //Tournament Statuses
19
19
  rpc readListTournamentStatuses(PaginationRequest) returns (TournamentStatusItemsResponse);
20
- rpc getTournamentsForUser(PaginationRequest) returns (TournamentStatusItemsResponse);
20
+ rpc getTournamentsForUser(PaginationRequest) returns (UserTournamentItemsResponse);
21
21
  }
22
22
  //Technical
23
23
  message PingRequest { string ping = 1; }
@@ -40,14 +40,16 @@ message TournamentItem {
40
40
  optional int32 is_active = 4;
41
41
  optional int32 current_members_count = 5;
42
42
  optional int32 max_members_count = 6;
43
- optional string started_at = 7;
44
- optional string finished_at = 8;
45
- optional string status = 9;
46
- optional string image = 10;
47
- repeated ActivationRuleItem rules = 11;
48
- repeated ScoringRule scores = 12;
49
- repeated RewardItem rewards = 13;
50
- repeated ContentItem contents = 14;
43
+ optional int32 bots_count = 7;
44
+ optional string started_at = 8;
45
+ optional string finished_at = 9;
46
+ optional string status = 10;
47
+ optional int32 status_id = 11;
48
+ optional string image = 12;
49
+ repeated ActivationRuleItem rules = 13;
50
+ repeated ScoringRule scores = 14;
51
+ repeated RewardItem rewards = 15;
52
+ repeated ContentItem contents = 16;
51
53
  }
52
54
  message TournamentRequest {
53
55
  oneof request {
@@ -148,3 +150,23 @@ message TournamentContentRequest {
148
150
  string locale = 2;
149
151
  string content = 3;
150
152
  }
153
+ //User
154
+ message UserTournamentItem {
155
+ optional int32 id = 1;
156
+ optional string title = 2;
157
+ optional string description = 3;
158
+ optional int32 current_members_count = 4;
159
+ optional int32 max_members_count = 5;
160
+ optional string started_at = 6;
161
+ optional string finished_at = 7;
162
+ optional string status = 8;
163
+ optional string image = 9;
164
+ repeated ActivationRuleItem rules = 10;
165
+ repeated RewardItem rewards = 11;
166
+ optional string content = 12;
167
+ }
168
+ message UserTournamentItemsResponse {
169
+ repeated UserTournamentItem items = 1;
170
+ optional int32 total_pages = 2;
171
+ optional int32 total_items = 3;
172
+ }
@@ -169,6 +169,17 @@ function deserialize_tournament_TournamentStatusResponse(buffer_arg) {
169
169
  return tournament_pb.TournamentStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
170
170
  }
171
171
 
172
+ function serialize_tournament_UserTournamentItemsResponse(arg) {
173
+ if (!(arg instanceof tournament_pb.UserTournamentItemsResponse)) {
174
+ throw new Error('Expected argument of type tournament.UserTournamentItemsResponse');
175
+ }
176
+ return Buffer.from(arg.serializeBinary());
177
+ }
178
+
179
+ function deserialize_tournament_UserTournamentItemsResponse(buffer_arg) {
180
+ return tournament_pb.UserTournamentItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
181
+ }
182
+
172
183
 
173
184
  var TournamentService = exports.TournamentService = {
174
185
  checkConnection: {
@@ -310,11 +321,11 @@ readListTournamentStatuses: {
310
321
  requestStream: false,
311
322
  responseStream: false,
312
323
  requestType: tournament_pb.PaginationRequest,
313
- responseType: tournament_pb.TournamentStatusItemsResponse,
324
+ responseType: tournament_pb.UserTournamentItemsResponse,
314
325
  requestSerialize: serialize_tournament_PaginationRequest,
315
326
  requestDeserialize: deserialize_tournament_PaginationRequest,
316
- responseSerialize: serialize_tournament_TournamentStatusItemsResponse,
317
- responseDeserialize: deserialize_tournament_TournamentStatusItemsResponse,
327
+ responseSerialize: serialize_tournament_UserTournamentItemsResponse,
328
+ responseDeserialize: deserialize_tournament_UserTournamentItemsResponse,
318
329
  },
319
330
  };
320
331