moons-ta-client 1.3.3 → 1.4.0

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.
@@ -754,9 +754,13 @@ export declare enum Webhook_Trigger {
754
754
  */
755
755
  SongFinished = 4096,
756
756
  /**
757
- * @generated from protobuf enum value: All = 8191;
757
+ * @generated from protobuf enum value: ReplaySubmitted = 8192;
758
758
  */
759
- All = 8191
759
+ ReplaySubmitted = 8192,
760
+ /**
761
+ * @generated from protobuf enum value: All = 16383;
762
+ */
763
+ All = 16383
760
764
  }
761
765
  /**
762
766
  * @generated from protobuf message proto.models.EndpointAccess
@@ -820,6 +824,73 @@ export interface GlobalConfiguration {
820
824
  */
821
825
  endpoints: EndpointAccess[];
822
826
  }
827
+ /**
828
+ * A .tarf replay a player submitted to the server
829
+ *
830
+ * @generated from protobuf message proto.models.ReplayRecording
831
+ */
832
+ export interface ReplayRecording {
833
+ /**
834
+ * @generated from protobuf field: string guid = 1
835
+ */
836
+ guid: string;
837
+ /**
838
+ * @generated from protobuf field: string tournament_id = 2
839
+ */
840
+ tournamentId: string;
841
+ /**
842
+ * @generated from protobuf field: string match_id = 3
843
+ */
844
+ matchId: string;
845
+ /**
846
+ * @generated from protobuf field: string file_name = 4
847
+ */
848
+ fileName: string;
849
+ /**
850
+ * @generated from protobuf field: string platform_id = 5
851
+ */
852
+ platformId: string;
853
+ /**
854
+ * @generated from protobuf field: string player_name = 6
855
+ */
856
+ playerName: string;
857
+ /**
858
+ * @generated from protobuf field: string map_hash = 7
859
+ */
860
+ mapHash: string;
861
+ /**
862
+ * @generated from protobuf field: string characteristic = 8
863
+ */
864
+ characteristic: string;
865
+ /**
866
+ * @generated from protobuf field: int32 difficulty = 9
867
+ */
868
+ difficulty: number;
869
+ /**
870
+ * Unix times in milliseconds
871
+ *
872
+ * @generated from protobuf field: int64 recorded_at = 10
873
+ */
874
+ recordedAt: bigint;
875
+ /**
876
+ * @generated from protobuf field: int64 submitted_at = 11
877
+ */
878
+ submittedAt: bigint;
879
+ /**
880
+ * @generated from protobuf field: int64 expires_at = 12
881
+ */
882
+ expiresAt: bigint;
883
+ /**
884
+ * @generated from protobuf field: int64 size = 13
885
+ */
886
+ size: bigint;
887
+ /**
888
+ * Empty when the replay was not stored, for example when replay storage is unavailable
889
+ *
890
+ * @generated from protobuf field: string download_url = 14
891
+ */
892
+ downloadUrl: string;
893
+ }
823
894
  /**
824
895
  * @generated from protobuf message proto.models.Tournament
825
896
  */
@@ -921,6 +992,26 @@ export interface Tournament_TournamentSettings {
921
992
  * @generated from protobuf field: string beat_khana_tournament_guid = 17
922
993
  */
923
994
  beatKhanaTournamentGuid: string;
995
+ /**
996
+ * @generated from protobuf field: bool enable_replay_recording = 18
997
+ */
998
+ enableReplayRecording: boolean;
999
+ /**
1000
+ * @generated from protobuf field: proto.models.ReplayRetention replay_retention = 19
1001
+ */
1002
+ replayRetention: ReplayRetention;
1003
+ /**
1004
+ * Unix time in milliseconds of the last change to the tournament
1005
+ *
1006
+ * @generated from protobuf field: int64 updated_at = 20
1007
+ */
1008
+ updatedAt: bigint;
1009
+ /**
1010
+ * Unix time in milliseconds when a visible tournament gets hidden for being inactive, 0 when it is already hidden
1011
+ *
1012
+ * @generated from protobuf field: int64 auto_hide_at = 21
1013
+ */
1014
+ autoHideAt: bigint;
924
1015
  }
925
1016
  /**
926
1017
  * @generated from protobuf message proto.models.Tournament.TournamentSettings.Pool
@@ -1136,6 +1227,29 @@ export interface ScoreTrackerHand {
1136
1227
  */
1137
1228
  avgCut: number[];
1138
1229
  }
1230
+ /**
1231
+ * How long a recorded replay is kept before it expires
1232
+ *
1233
+ * @generated from protobuf enum proto.models.ReplayRetention
1234
+ */
1235
+ export declare enum ReplayRetention {
1236
+ /**
1237
+ * @generated from protobuf enum value: ThirtyDays = 0;
1238
+ */
1239
+ ThirtyDays = 0,
1240
+ /**
1241
+ * @generated from protobuf enum value: NinetyDays = 1;
1242
+ */
1243
+ NinetyDays = 1,
1244
+ /**
1245
+ * @generated from protobuf enum value: OneYear = 2;
1246
+ */
1247
+ OneYear = 2,
1248
+ /**
1249
+ * @generated from protobuf enum value: ThreeYears = 3;
1250
+ */
1251
+ ThreeYears = 3
1252
+ }
1139
1253
  declare class Characteristic$Type extends MessageType<Characteristic> {
1140
1254
  constructor();
1141
1255
  create(value?: PartialMessage<Characteristic>): Characteristic;
@@ -1296,6 +1410,16 @@ declare class GlobalConfiguration$Type extends MessageType<GlobalConfiguration>
1296
1410
  * @generated MessageType for protobuf message proto.models.GlobalConfiguration
1297
1411
  */
1298
1412
  export declare const GlobalConfiguration: GlobalConfiguration$Type;
1413
+ declare class ReplayRecording$Type extends MessageType<ReplayRecording> {
1414
+ constructor();
1415
+ create(value?: PartialMessage<ReplayRecording>): ReplayRecording;
1416
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReplayRecording): ReplayRecording;
1417
+ internalBinaryWrite(message: ReplayRecording, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
1418
+ }
1419
+ /**
1420
+ * @generated MessageType for protobuf message proto.models.ReplayRecording
1421
+ */
1422
+ export declare const ReplayRecording: ReplayRecording$Type;
1299
1423
  declare class Tournament$Type extends MessageType<Tournament> {
1300
1424
  constructor();
1301
1425
  create(value?: PartialMessage<Tournament>): Tournament;
@@ -400,10 +400,38 @@ export var Webhook_Trigger;
400
400
  */
401
401
  Webhook_Trigger[Webhook_Trigger["SongFinished"] = 4096] = "SongFinished";
402
402
  /**
403
- * @generated from protobuf enum value: All = 8191;
403
+ * @generated from protobuf enum value: ReplaySubmitted = 8192;
404
404
  */
405
- Webhook_Trigger[Webhook_Trigger["All"] = 8191] = "All";
405
+ Webhook_Trigger[Webhook_Trigger["ReplaySubmitted"] = 8192] = "ReplaySubmitted";
406
+ /**
407
+ * @generated from protobuf enum value: All = 16383;
408
+ */
409
+ Webhook_Trigger[Webhook_Trigger["All"] = 16383] = "All";
406
410
  })(Webhook_Trigger = Webhook_Trigger || (Webhook_Trigger = {}));
411
+ /**
412
+ * How long a recorded replay is kept before it expires
413
+ *
414
+ * @generated from protobuf enum proto.models.ReplayRetention
415
+ */
416
+ export var ReplayRetention;
417
+ (function (ReplayRetention) {
418
+ /**
419
+ * @generated from protobuf enum value: ThirtyDays = 0;
420
+ */
421
+ ReplayRetention[ReplayRetention["ThirtyDays"] = 0] = "ThirtyDays";
422
+ /**
423
+ * @generated from protobuf enum value: NinetyDays = 1;
424
+ */
425
+ ReplayRetention[ReplayRetention["NinetyDays"] = 1] = "NinetyDays";
426
+ /**
427
+ * @generated from protobuf enum value: OneYear = 2;
428
+ */
429
+ ReplayRetention[ReplayRetention["OneYear"] = 2] = "OneYear";
430
+ /**
431
+ * @generated from protobuf enum value: ThreeYears = 3;
432
+ */
433
+ ReplayRetention[ReplayRetention["ThreeYears"] = 3] = "ThreeYears";
434
+ })(ReplayRetention = ReplayRetention || (ReplayRetention = {}));
407
435
  // @generated message type with reflection information, may provide speed optimized methods
408
436
  class Characteristic$Type extends MessageType {
409
437
  constructor() {
@@ -1714,6 +1742,157 @@ class GlobalConfiguration$Type extends MessageType {
1714
1742
  */
1715
1743
  export const GlobalConfiguration = new GlobalConfiguration$Type();
1716
1744
  // @generated message type with reflection information, may provide speed optimized methods
1745
+ class ReplayRecording$Type extends MessageType {
1746
+ constructor() {
1747
+ super("proto.models.ReplayRecording", [
1748
+ { no: 1, name: "guid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1749
+ { no: 2, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1750
+ { no: 3, name: "match_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1751
+ { no: 4, name: "file_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1752
+ { no: 5, name: "platform_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1753
+ { no: 6, name: "player_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1754
+ { no: 7, name: "map_hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1755
+ { no: 8, name: "characteristic", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1756
+ { no: 9, name: "difficulty", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1757
+ { no: 10, name: "recorded_at", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
1758
+ { no: 11, name: "submitted_at", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
1759
+ { no: 12, name: "expires_at", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
1760
+ { no: 13, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
1761
+ { no: 14, name: "download_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1762
+ ]);
1763
+ }
1764
+ create(value) {
1765
+ const message = globalThis.Object.create((this.messagePrototype));
1766
+ message.guid = "";
1767
+ message.tournamentId = "";
1768
+ message.matchId = "";
1769
+ message.fileName = "";
1770
+ message.platformId = "";
1771
+ message.playerName = "";
1772
+ message.mapHash = "";
1773
+ message.characteristic = "";
1774
+ message.difficulty = 0;
1775
+ message.recordedAt = 0n;
1776
+ message.submittedAt = 0n;
1777
+ message.expiresAt = 0n;
1778
+ message.size = 0n;
1779
+ message.downloadUrl = "";
1780
+ if (value !== undefined)
1781
+ reflectionMergePartial(this, message, value);
1782
+ return message;
1783
+ }
1784
+ internalBinaryRead(reader, length, options, target) {
1785
+ let message = target ?? this.create(), end = reader.pos + length;
1786
+ while (reader.pos < end) {
1787
+ let [fieldNo, wireType] = reader.tag();
1788
+ switch (fieldNo) {
1789
+ case /* string guid */ 1:
1790
+ message.guid = reader.string();
1791
+ break;
1792
+ case /* string tournament_id */ 2:
1793
+ message.tournamentId = reader.string();
1794
+ break;
1795
+ case /* string match_id */ 3:
1796
+ message.matchId = reader.string();
1797
+ break;
1798
+ case /* string file_name */ 4:
1799
+ message.fileName = reader.string();
1800
+ break;
1801
+ case /* string platform_id */ 5:
1802
+ message.platformId = reader.string();
1803
+ break;
1804
+ case /* string player_name */ 6:
1805
+ message.playerName = reader.string();
1806
+ break;
1807
+ case /* string map_hash */ 7:
1808
+ message.mapHash = reader.string();
1809
+ break;
1810
+ case /* string characteristic */ 8:
1811
+ message.characteristic = reader.string();
1812
+ break;
1813
+ case /* int32 difficulty */ 9:
1814
+ message.difficulty = reader.int32();
1815
+ break;
1816
+ case /* int64 recorded_at */ 10:
1817
+ message.recordedAt = reader.int64().toBigInt();
1818
+ break;
1819
+ case /* int64 submitted_at */ 11:
1820
+ message.submittedAt = reader.int64().toBigInt();
1821
+ break;
1822
+ case /* int64 expires_at */ 12:
1823
+ message.expiresAt = reader.int64().toBigInt();
1824
+ break;
1825
+ case /* int64 size */ 13:
1826
+ message.size = reader.int64().toBigInt();
1827
+ break;
1828
+ case /* string download_url */ 14:
1829
+ message.downloadUrl = reader.string();
1830
+ break;
1831
+ default:
1832
+ let u = options.readUnknownField;
1833
+ if (u === "throw")
1834
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1835
+ let d = reader.skip(wireType);
1836
+ if (u !== false)
1837
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1838
+ }
1839
+ }
1840
+ return message;
1841
+ }
1842
+ internalBinaryWrite(message, writer, options) {
1843
+ /* string guid = 1; */
1844
+ if (message.guid !== "")
1845
+ writer.tag(1, WireType.LengthDelimited).string(message.guid);
1846
+ /* string tournament_id = 2; */
1847
+ if (message.tournamentId !== "")
1848
+ writer.tag(2, WireType.LengthDelimited).string(message.tournamentId);
1849
+ /* string match_id = 3; */
1850
+ if (message.matchId !== "")
1851
+ writer.tag(3, WireType.LengthDelimited).string(message.matchId);
1852
+ /* string file_name = 4; */
1853
+ if (message.fileName !== "")
1854
+ writer.tag(4, WireType.LengthDelimited).string(message.fileName);
1855
+ /* string platform_id = 5; */
1856
+ if (message.platformId !== "")
1857
+ writer.tag(5, WireType.LengthDelimited).string(message.platformId);
1858
+ /* string player_name = 6; */
1859
+ if (message.playerName !== "")
1860
+ writer.tag(6, WireType.LengthDelimited).string(message.playerName);
1861
+ /* string map_hash = 7; */
1862
+ if (message.mapHash !== "")
1863
+ writer.tag(7, WireType.LengthDelimited).string(message.mapHash);
1864
+ /* string characteristic = 8; */
1865
+ if (message.characteristic !== "")
1866
+ writer.tag(8, WireType.LengthDelimited).string(message.characteristic);
1867
+ /* int32 difficulty = 9; */
1868
+ if (message.difficulty !== 0)
1869
+ writer.tag(9, WireType.Varint).int32(message.difficulty);
1870
+ /* int64 recorded_at = 10; */
1871
+ if (message.recordedAt !== 0n)
1872
+ writer.tag(10, WireType.Varint).int64(message.recordedAt);
1873
+ /* int64 submitted_at = 11; */
1874
+ if (message.submittedAt !== 0n)
1875
+ writer.tag(11, WireType.Varint).int64(message.submittedAt);
1876
+ /* int64 expires_at = 12; */
1877
+ if (message.expiresAt !== 0n)
1878
+ writer.tag(12, WireType.Varint).int64(message.expiresAt);
1879
+ /* int64 size = 13; */
1880
+ if (message.size !== 0n)
1881
+ writer.tag(13, WireType.Varint).int64(message.size);
1882
+ /* string download_url = 14; */
1883
+ if (message.downloadUrl !== "")
1884
+ writer.tag(14, WireType.LengthDelimited).string(message.downloadUrl);
1885
+ let u = options.writeUnknownFields;
1886
+ if (u !== false)
1887
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1888
+ return writer;
1889
+ }
1890
+ }
1891
+ /**
1892
+ * @generated MessageType for protobuf message proto.models.ReplayRecording
1893
+ */
1894
+ export const ReplayRecording = new ReplayRecording$Type();
1895
+ // @generated message type with reflection information, may provide speed optimized methods
1717
1896
  class Tournament$Type extends MessageType {
1718
1897
  constructor() {
1719
1898
  super("proto.models.Tournament", [
@@ -1818,7 +1997,11 @@ class Tournament_TournamentSettings$Type extends MessageType {
1818
1997
  { no: 14, name: "enable_replay_streaming", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
1819
1998
  { no: 15, name: "allow_mock_clients", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
1820
1999
  { no: 16, name: "is_bk_tournament", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
1821
- { no: 17, name: "beat_khana_tournament_guid", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
2000
+ { no: 17, name: "beat_khana_tournament_guid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
2001
+ { no: 18, name: "enable_replay_recording", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
2002
+ { no: 19, name: "replay_retention", kind: "enum", T: () => ["proto.models.ReplayRetention", ReplayRetention] },
2003
+ { no: 20, name: "updated_at", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
2004
+ { no: 21, name: "auto_hide_at", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
1822
2005
  ]);
1823
2006
  }
1824
2007
  create(value) {
@@ -1840,6 +2023,10 @@ class Tournament_TournamentSettings$Type extends MessageType {
1840
2023
  message.allowMockClients = false;
1841
2024
  message.isBkTournament = false;
1842
2025
  message.beatKhanaTournamentGuid = "";
2026
+ message.enableReplayRecording = false;
2027
+ message.replayRetention = 0;
2028
+ message.updatedAt = 0n;
2029
+ message.autoHideAt = 0n;
1843
2030
  if (value !== undefined)
1844
2031
  reflectionMergePartial(this, message, value);
1845
2032
  return message;
@@ -1900,6 +2087,18 @@ class Tournament_TournamentSettings$Type extends MessageType {
1900
2087
  case /* string beat_khana_tournament_guid */ 17:
1901
2088
  message.beatKhanaTournamentGuid = reader.string();
1902
2089
  break;
2090
+ case /* bool enable_replay_recording */ 18:
2091
+ message.enableReplayRecording = reader.bool();
2092
+ break;
2093
+ case /* proto.models.ReplayRetention replay_retention */ 19:
2094
+ message.replayRetention = reader.int32();
2095
+ break;
2096
+ case /* int64 updated_at */ 20:
2097
+ message.updatedAt = reader.int64().toBigInt();
2098
+ break;
2099
+ case /* int64 auto_hide_at */ 21:
2100
+ message.autoHideAt = reader.int64().toBigInt();
2101
+ break;
1903
2102
  default:
1904
2103
  let u = options.readUnknownField;
1905
2104
  if (u === "throw")
@@ -1963,6 +2162,18 @@ class Tournament_TournamentSettings$Type extends MessageType {
1963
2162
  /* string beat_khana_tournament_guid = 17; */
1964
2163
  if (message.beatKhanaTournamentGuid !== "")
1965
2164
  writer.tag(17, WireType.LengthDelimited).string(message.beatKhanaTournamentGuid);
2165
+ /* bool enable_replay_recording = 18; */
2166
+ if (message.enableReplayRecording !== false)
2167
+ writer.tag(18, WireType.Varint).bool(message.enableReplayRecording);
2168
+ /* proto.models.ReplayRetention replay_retention = 19; */
2169
+ if (message.replayRetention !== 0)
2170
+ writer.tag(19, WireType.Varint).int32(message.replayRetention);
2171
+ /* int64 updated_at = 20; */
2172
+ if (message.updatedAt !== 0n)
2173
+ writer.tag(20, WireType.Varint).int64(message.updatedAt);
2174
+ /* int64 auto_hide_at = 21; */
2175
+ if (message.autoHideAt !== 0n)
2176
+ writer.tag(21, WireType.Varint).int64(message.autoHideAt);
1966
2177
  let u = options.writeUnknownFields;
1967
2178
  if (u !== false)
1968
2179
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -4,6 +4,7 @@ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
4
  import type { IBinaryReader } from "@protobuf-ts/runtime";
5
5
  import type { PartialMessage } from "@protobuf-ts/runtime";
6
6
  import { MessageType } from "@protobuf-ts/runtime";
7
+ import { ReplayRecording } from './models.js';
7
8
  import { LeaderboardEntry } from './models.js';
8
9
  import { GameplayParameters } from './models.js';
9
10
  import { QualifierEvent } from './models.js';
@@ -37,6 +38,12 @@ export interface Push {
37
38
  * @generated from protobuf field: proto.packets.Push.QualifierScoreSubmitted qualifier_score_submtited = 3
38
39
  */
39
40
  qualifierScoreSubmtited: Push_QualifierScoreSubmitted;
41
+ } | {
42
+ oneofKind: "replaySubmitted";
43
+ /**
44
+ * @generated from protobuf field: proto.packets.Push.ReplaySubmitted replay_submitted = 4
45
+ */
46
+ replaySubmitted: Push_ReplaySubmitted;
40
47
  } | {
41
48
  oneofKind: undefined;
42
49
  };
@@ -132,6 +139,29 @@ export interface Push_QualifierScoreSubmitted {
132
139
  */
133
140
  qualifierScore?: LeaderboardEntry;
134
141
  }
142
+ /**
143
+ * Sent when a player submits a replay. When the server could not store it the replay itself is in data, so listeners still get it once
144
+ *
145
+ * @generated from protobuf message proto.packets.Push.ReplaySubmitted
146
+ */
147
+ export interface Push_ReplaySubmitted {
148
+ /**
149
+ * @generated from protobuf field: string tournament_id = 1
150
+ */
151
+ tournamentId: string;
152
+ /**
153
+ * @generated from protobuf field: proto.models.ReplayRecording replay = 2
154
+ */
155
+ replay?: ReplayRecording;
156
+ /**
157
+ * @generated from protobuf field: bool stored = 3
158
+ */
159
+ stored: boolean;
160
+ /**
161
+ * @generated from protobuf field: bytes data = 4
162
+ */
163
+ data: Uint8Array;
164
+ }
135
165
  declare class Push$Type extends MessageType<Push> {
136
166
  constructor();
137
167
  create(value?: PartialMessage<Push>): Push;
@@ -162,4 +192,14 @@ declare class Push_QualifierScoreSubmitted$Type extends MessageType<Push_Qualifi
162
192
  * @generated MessageType for protobuf message proto.packets.Push.QualifierScoreSubmitted
163
193
  */
164
194
  export declare const Push_QualifierScoreSubmitted: Push_QualifierScoreSubmitted$Type;
195
+ declare class Push_ReplaySubmitted$Type extends MessageType<Push_ReplaySubmitted> {
196
+ constructor();
197
+ create(value?: PartialMessage<Push_ReplaySubmitted>): Push_ReplaySubmitted;
198
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Push_ReplaySubmitted): Push_ReplaySubmitted;
199
+ internalBinaryWrite(message: Push_ReplaySubmitted, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
200
+ }
201
+ /**
202
+ * @generated MessageType for protobuf message proto.packets.Push.ReplaySubmitted
203
+ */
204
+ export declare const Push_ReplaySubmitted: Push_ReplaySubmitted$Type;
165
205
  export {};
@@ -2,6 +2,7 @@ import { WireType } from "@protobuf-ts/runtime";
2
2
  import { UnknownFieldHandler } from "@protobuf-ts/runtime";
3
3
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
4
4
  import { MessageType } from "@protobuf-ts/runtime";
5
+ import { ReplayRecording } from './models.js';
5
6
  import { LeaderboardEntry } from './models.js';
6
7
  import { GameplayParameters } from './models.js';
7
8
  import { QualifierEvent } from './models.js';
@@ -32,7 +33,8 @@ class Push$Type extends MessageType {
32
33
  super("proto.packets.Push", [
33
34
  { no: 1, name: "realtime_score", kind: "message", oneof: "data", T: () => RealtimeScore },
34
35
  { no: 2, name: "song_finished", kind: "message", oneof: "data", T: () => Push_SongFinished },
35
- { no: 3, name: "qualifier_score_submtited", kind: "message", oneof: "data", T: () => Push_QualifierScoreSubmitted }
36
+ { no: 3, name: "qualifier_score_submtited", kind: "message", oneof: "data", T: () => Push_QualifierScoreSubmitted },
37
+ { no: 4, name: "replay_submitted", kind: "message", oneof: "data", T: () => Push_ReplaySubmitted }
36
38
  ]);
37
39
  }
38
40
  create(value) {
@@ -65,6 +67,12 @@ class Push$Type extends MessageType {
65
67
  qualifierScoreSubmtited: Push_QualifierScoreSubmitted.internalBinaryRead(reader, reader.uint32(), options, message.data.qualifierScoreSubmtited)
66
68
  };
67
69
  break;
70
+ case /* proto.packets.Push.ReplaySubmitted replay_submitted */ 4:
71
+ message.data = {
72
+ oneofKind: "replaySubmitted",
73
+ replaySubmitted: Push_ReplaySubmitted.internalBinaryRead(reader, reader.uint32(), options, message.data.replaySubmitted)
74
+ };
75
+ break;
68
76
  default:
69
77
  let u = options.readUnknownField;
70
78
  if (u === "throw")
@@ -86,6 +94,9 @@ class Push$Type extends MessageType {
86
94
  /* proto.packets.Push.QualifierScoreSubmitted qualifier_score_submtited = 3; */
87
95
  if (message.data.oneofKind === "qualifierScoreSubmtited")
88
96
  Push_QualifierScoreSubmitted.internalBinaryWrite(message.data.qualifierScoreSubmtited, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
97
+ /* proto.packets.Push.ReplaySubmitted replay_submitted = 4; */
98
+ if (message.data.oneofKind === "replaySubmitted")
99
+ Push_ReplaySubmitted.internalBinaryWrite(message.data.replaySubmitted, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
89
100
  let u = options.writeUnknownFields;
90
101
  if (u !== false)
91
102
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -297,3 +308,73 @@ class Push_QualifierScoreSubmitted$Type extends MessageType {
297
308
  * @generated MessageType for protobuf message proto.packets.Push.QualifierScoreSubmitted
298
309
  */
299
310
  export const Push_QualifierScoreSubmitted = new Push_QualifierScoreSubmitted$Type();
311
+ // @generated message type with reflection information, may provide speed optimized methods
312
+ class Push_ReplaySubmitted$Type extends MessageType {
313
+ constructor() {
314
+ super("proto.packets.Push.ReplaySubmitted", [
315
+ { no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
316
+ { no: 2, name: "replay", kind: "message", T: () => ReplayRecording },
317
+ { no: 3, name: "stored", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
318
+ { no: 4, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
319
+ ]);
320
+ }
321
+ create(value) {
322
+ const message = globalThis.Object.create((this.messagePrototype));
323
+ message.tournamentId = "";
324
+ message.stored = false;
325
+ message.data = new Uint8Array(0);
326
+ if (value !== undefined)
327
+ reflectionMergePartial(this, message, value);
328
+ return message;
329
+ }
330
+ internalBinaryRead(reader, length, options, target) {
331
+ let message = target ?? this.create(), end = reader.pos + length;
332
+ while (reader.pos < end) {
333
+ let [fieldNo, wireType] = reader.tag();
334
+ switch (fieldNo) {
335
+ case /* string tournament_id */ 1:
336
+ message.tournamentId = reader.string();
337
+ break;
338
+ case /* proto.models.ReplayRecording replay */ 2:
339
+ message.replay = ReplayRecording.internalBinaryRead(reader, reader.uint32(), options, message.replay);
340
+ break;
341
+ case /* bool stored */ 3:
342
+ message.stored = reader.bool();
343
+ break;
344
+ case /* bytes data */ 4:
345
+ message.data = reader.bytes();
346
+ break;
347
+ default:
348
+ let u = options.readUnknownField;
349
+ if (u === "throw")
350
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
351
+ let d = reader.skip(wireType);
352
+ if (u !== false)
353
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
354
+ }
355
+ }
356
+ return message;
357
+ }
358
+ internalBinaryWrite(message, writer, options) {
359
+ /* string tournament_id = 1; */
360
+ if (message.tournamentId !== "")
361
+ writer.tag(1, WireType.LengthDelimited).string(message.tournamentId);
362
+ /* proto.models.ReplayRecording replay = 2; */
363
+ if (message.replay)
364
+ ReplayRecording.internalBinaryWrite(message.replay, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
365
+ /* bool stored = 3; */
366
+ if (message.stored !== false)
367
+ writer.tag(3, WireType.Varint).bool(message.stored);
368
+ /* bytes data = 4; */
369
+ if (message.data.length)
370
+ writer.tag(4, WireType.LengthDelimited).bytes(message.data);
371
+ let u = options.writeUnknownFields;
372
+ if (u !== false)
373
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
374
+ return writer;
375
+ }
376
+ }
377
+ /**
378
+ * @generated MessageType for protobuf message proto.packets.Push.ReplaySubmitted
379
+ */
380
+ export const Push_ReplaySubmitted = new Push_ReplaySubmitted$Type();