protobuf-platform 1.2.504 → 1.2.507

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.
@@ -27,6 +27,8 @@ service Tournament {
27
27
  rpc getOnlineTournamentInfo(GetOnlineTournamentInfoRequest) returns (OnlineTournamentInfoResponse);
28
28
  rpc attachUserToTournament(UserTournamentRequest) returns (TournamentStatusResponse);
29
29
  rpc resolveAutoTournamentForGameSession(ResolveAutoTournamentForGameSessionRequest) returns (ResolveAutoTournamentForGameSessionResponse);
30
+ // Lightweight batch read for CMS Custom Widget enrichment.
31
+ rpc getTournamentSnapshotsByIds(GetTournamentSnapshotsByIdsRequest) returns (TournamentSnapshotItemsResponse);
30
32
  }
31
33
  //Technical
32
34
  message PingRequest { string ping = 1; }
@@ -129,6 +131,29 @@ message TournamentStatusItemsResponse {
129
131
  optional int32 total_pages = 2;
130
132
  optional int32 total_items = 3;
131
133
  }
134
+ message GetTournamentSnapshotsByIdsRequest {
135
+ repeated int32 ids = 1;
136
+ }
137
+ message TournamentSnapshotItem {
138
+ int32 id = 1;
139
+ optional string title = 2;
140
+ optional string slug = 3;
141
+ optional string description = 4;
142
+ optional string image = 5;
143
+ optional string image_cdn = 6;
144
+ optional string image_small = 7;
145
+ optional string image_small_cdn = 8;
146
+ optional string status = 9;
147
+ optional int32 status_id = 10;
148
+ optional bool is_active = 11;
149
+ optional string started_at = 12;
150
+ optional string finished_at = 13;
151
+ optional int32 current_members_count = 14;
152
+ optional int32 max_members_count = 15;
153
+ }
154
+ message TournamentSnapshotItemsResponse {
155
+ repeated TournamentSnapshotItem items = 1;
156
+ }
132
157
  message ActivationRuleItem {
133
158
  optional int32 id = 1;
134
159
  optional int32 tournament_id = 2;
@@ -70,6 +70,17 @@ function deserialize_tournament_GetTournamentRequest(buffer_arg) {
70
70
  return tournament_pb.GetTournamentRequest.deserializeBinary(new Uint8Array(buffer_arg));
71
71
  }
72
72
 
73
+ function serialize_tournament_GetTournamentSnapshotsByIdsRequest(arg) {
74
+ if (!(arg instanceof tournament_pb.GetTournamentSnapshotsByIdsRequest)) {
75
+ throw new Error('Expected argument of type tournament.GetTournamentSnapshotsByIdsRequest');
76
+ }
77
+ return Buffer.from(arg.serializeBinary());
78
+ }
79
+
80
+ function deserialize_tournament_GetTournamentSnapshotsByIdsRequest(buffer_arg) {
81
+ return tournament_pb.GetTournamentSnapshotsByIdsRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
+ }
83
+
73
84
  function serialize_tournament_ItemsBunchRequest(arg) {
74
85
  if (!(arg instanceof tournament_pb.ItemsBunchRequest)) {
75
86
  throw new Error('Expected argument of type tournament.ItemsBunchRequest');
@@ -246,6 +257,17 @@ function deserialize_tournament_TournamentScoringRuleRequest(buffer_arg) {
246
257
  return tournament_pb.TournamentScoringRuleRequest.deserializeBinary(new Uint8Array(buffer_arg));
247
258
  }
248
259
 
260
+ function serialize_tournament_TournamentSnapshotItemsResponse(arg) {
261
+ if (!(arg instanceof tournament_pb.TournamentSnapshotItemsResponse)) {
262
+ throw new Error('Expected argument of type tournament.TournamentSnapshotItemsResponse');
263
+ }
264
+ return Buffer.from(arg.serializeBinary());
265
+ }
266
+
267
+ function deserialize_tournament_TournamentSnapshotItemsResponse(buffer_arg) {
268
+ return tournament_pb.TournamentSnapshotItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
269
+ }
270
+
249
271
  function serialize_tournament_TournamentStatusItemsResponse(arg) {
250
272
  if (!(arg instanceof tournament_pb.TournamentStatusItemsResponse)) {
251
273
  throw new Error('Expected argument of type tournament.TournamentStatusItemsResponse');
@@ -547,6 +569,18 @@ readListTournamentStatuses: {
547
569
  responseSerialize: serialize_tournament_ResolveAutoTournamentForGameSessionResponse,
548
570
  responseDeserialize: deserialize_tournament_ResolveAutoTournamentForGameSessionResponse,
549
571
  },
572
+ // Lightweight batch read for CMS Custom Widget enrichment.
573
+ getTournamentSnapshotsByIds: {
574
+ path: '/tournament.Tournament/getTournamentSnapshotsByIds',
575
+ requestStream: false,
576
+ responseStream: false,
577
+ requestType: tournament_pb.GetTournamentSnapshotsByIdsRequest,
578
+ responseType: tournament_pb.TournamentSnapshotItemsResponse,
579
+ requestSerialize: serialize_tournament_GetTournamentSnapshotsByIdsRequest,
580
+ requestDeserialize: deserialize_tournament_GetTournamentSnapshotsByIdsRequest,
581
+ responseSerialize: serialize_tournament_TournamentSnapshotItemsResponse,
582
+ responseDeserialize: deserialize_tournament_TournamentSnapshotItemsResponse,
583
+ },
550
584
  };
551
585
 
552
586
  exports.TournamentClient = grpc.makeGenericClientConstructor(TournamentService, 'Tournament');