moons-ta-client 1.3.2 → 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.
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +2 -2
- package/dist/custom-event-emitter.js +1 -1
- package/dist/index.d.ts +866 -8
- package/dist/index.esm.js +6656 -4198
- package/dist/models/models.d.ts +216 -2
- package/dist/models/models.js +412 -3
- package/dist/models/pushes.d.ts +40 -0
- package/dist/models/pushes.js +82 -1
- package/dist/models/requests.d.ts +382 -0
- package/dist/models/requests.js +834 -1
- package/dist/models/responses.d.ts +217 -0
- package/dist/models/responses.js +469 -1
- package/dist/scraper.js +3 -4
- package/dist/tournament-assistant-client.d.ts +11 -2
- package/dist/tournament-assistant-client.js +109 -0
- package/package.json +4 -10
package/dist/models/models.js
CHANGED
|
@@ -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:
|
|
403
|
+
* @generated from protobuf enum value: ReplaySubmitted = 8192;
|
|
404
404
|
*/
|
|
405
|
-
Webhook_Trigger[Webhook_Trigger["
|
|
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() {
|
|
@@ -1532,6 +1560,339 @@ class Webhook$Type extends MessageType {
|
|
|
1532
1560
|
*/
|
|
1533
1561
|
export const Webhook = new Webhook$Type();
|
|
1534
1562
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1563
|
+
class EndpointAccess$Type extends MessageType {
|
|
1564
|
+
constructor() {
|
|
1565
|
+
super("proto.models.EndpointAccess", [
|
|
1566
|
+
{ no: 1, name: "endpoint_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1567
|
+
{ no: 2, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1568
|
+
{ no: 3, name: "route", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1569
|
+
{ no: 4, name: "supports_websocket", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1570
|
+
{ no: 5, name: "supports_rest", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1571
|
+
{ no: 6, name: "supports_player", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1572
|
+
{ no: 7, name: "websocket_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1573
|
+
{ no: 8, name: "rest_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1574
|
+
{ no: 9, name: "player_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1575
|
+
{ no: 10, name: "is_core", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1576
|
+
]);
|
|
1577
|
+
}
|
|
1578
|
+
create(value) {
|
|
1579
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
1580
|
+
message.endpointId = "";
|
|
1581
|
+
message.displayName = "";
|
|
1582
|
+
message.route = "";
|
|
1583
|
+
message.supportsWebsocket = false;
|
|
1584
|
+
message.supportsRest = false;
|
|
1585
|
+
message.supportsPlayer = false;
|
|
1586
|
+
message.websocketEnabled = false;
|
|
1587
|
+
message.restEnabled = false;
|
|
1588
|
+
message.playerEnabled = false;
|
|
1589
|
+
message.isCore = false;
|
|
1590
|
+
if (value !== undefined)
|
|
1591
|
+
reflectionMergePartial(this, message, value);
|
|
1592
|
+
return message;
|
|
1593
|
+
}
|
|
1594
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1595
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1596
|
+
while (reader.pos < end) {
|
|
1597
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1598
|
+
switch (fieldNo) {
|
|
1599
|
+
case /* string endpoint_id */ 1:
|
|
1600
|
+
message.endpointId = reader.string();
|
|
1601
|
+
break;
|
|
1602
|
+
case /* string display_name */ 2:
|
|
1603
|
+
message.displayName = reader.string();
|
|
1604
|
+
break;
|
|
1605
|
+
case /* string route */ 3:
|
|
1606
|
+
message.route = reader.string();
|
|
1607
|
+
break;
|
|
1608
|
+
case /* bool supports_websocket */ 4:
|
|
1609
|
+
message.supportsWebsocket = reader.bool();
|
|
1610
|
+
break;
|
|
1611
|
+
case /* bool supports_rest */ 5:
|
|
1612
|
+
message.supportsRest = reader.bool();
|
|
1613
|
+
break;
|
|
1614
|
+
case /* bool supports_player */ 6:
|
|
1615
|
+
message.supportsPlayer = reader.bool();
|
|
1616
|
+
break;
|
|
1617
|
+
case /* bool websocket_enabled */ 7:
|
|
1618
|
+
message.websocketEnabled = reader.bool();
|
|
1619
|
+
break;
|
|
1620
|
+
case /* bool rest_enabled */ 8:
|
|
1621
|
+
message.restEnabled = reader.bool();
|
|
1622
|
+
break;
|
|
1623
|
+
case /* bool player_enabled */ 9:
|
|
1624
|
+
message.playerEnabled = reader.bool();
|
|
1625
|
+
break;
|
|
1626
|
+
case /* bool is_core */ 10:
|
|
1627
|
+
message.isCore = reader.bool();
|
|
1628
|
+
break;
|
|
1629
|
+
default:
|
|
1630
|
+
let u = options.readUnknownField;
|
|
1631
|
+
if (u === "throw")
|
|
1632
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1633
|
+
let d = reader.skip(wireType);
|
|
1634
|
+
if (u !== false)
|
|
1635
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
return message;
|
|
1639
|
+
}
|
|
1640
|
+
internalBinaryWrite(message, writer, options) {
|
|
1641
|
+
/* string endpoint_id = 1; */
|
|
1642
|
+
if (message.endpointId !== "")
|
|
1643
|
+
writer.tag(1, WireType.LengthDelimited).string(message.endpointId);
|
|
1644
|
+
/* string display_name = 2; */
|
|
1645
|
+
if (message.displayName !== "")
|
|
1646
|
+
writer.tag(2, WireType.LengthDelimited).string(message.displayName);
|
|
1647
|
+
/* string route = 3; */
|
|
1648
|
+
if (message.route !== "")
|
|
1649
|
+
writer.tag(3, WireType.LengthDelimited).string(message.route);
|
|
1650
|
+
/* bool supports_websocket = 4; */
|
|
1651
|
+
if (message.supportsWebsocket !== false)
|
|
1652
|
+
writer.tag(4, WireType.Varint).bool(message.supportsWebsocket);
|
|
1653
|
+
/* bool supports_rest = 5; */
|
|
1654
|
+
if (message.supportsRest !== false)
|
|
1655
|
+
writer.tag(5, WireType.Varint).bool(message.supportsRest);
|
|
1656
|
+
/* bool supports_player = 6; */
|
|
1657
|
+
if (message.supportsPlayer !== false)
|
|
1658
|
+
writer.tag(6, WireType.Varint).bool(message.supportsPlayer);
|
|
1659
|
+
/* bool websocket_enabled = 7; */
|
|
1660
|
+
if (message.websocketEnabled !== false)
|
|
1661
|
+
writer.tag(7, WireType.Varint).bool(message.websocketEnabled);
|
|
1662
|
+
/* bool rest_enabled = 8; */
|
|
1663
|
+
if (message.restEnabled !== false)
|
|
1664
|
+
writer.tag(8, WireType.Varint).bool(message.restEnabled);
|
|
1665
|
+
/* bool player_enabled = 9; */
|
|
1666
|
+
if (message.playerEnabled !== false)
|
|
1667
|
+
writer.tag(9, WireType.Varint).bool(message.playerEnabled);
|
|
1668
|
+
/* bool is_core = 10; */
|
|
1669
|
+
if (message.isCore !== false)
|
|
1670
|
+
writer.tag(10, WireType.Varint).bool(message.isCore);
|
|
1671
|
+
let u = options.writeUnknownFields;
|
|
1672
|
+
if (u !== false)
|
|
1673
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1674
|
+
return writer;
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
/**
|
|
1678
|
+
* @generated MessageType for protobuf message proto.models.EndpointAccess
|
|
1679
|
+
*/
|
|
1680
|
+
export const EndpointAccess = new EndpointAccess$Type();
|
|
1681
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1682
|
+
class GlobalConfiguration$Type extends MessageType {
|
|
1683
|
+
constructor() {
|
|
1684
|
+
super("proto.models.GlobalConfiguration", [
|
|
1685
|
+
{ no: 1, name: "full_access_discord_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
1686
|
+
{ no: 2, name: "endpoint_manager_discord_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
1687
|
+
{ no: 3, name: "endpoints", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EndpointAccess }
|
|
1688
|
+
]);
|
|
1689
|
+
}
|
|
1690
|
+
create(value) {
|
|
1691
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
1692
|
+
message.fullAccessDiscordIds = [];
|
|
1693
|
+
message.endpointManagerDiscordIds = [];
|
|
1694
|
+
message.endpoints = [];
|
|
1695
|
+
if (value !== undefined)
|
|
1696
|
+
reflectionMergePartial(this, message, value);
|
|
1697
|
+
return message;
|
|
1698
|
+
}
|
|
1699
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1700
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1701
|
+
while (reader.pos < end) {
|
|
1702
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1703
|
+
switch (fieldNo) {
|
|
1704
|
+
case /* repeated string full_access_discord_ids */ 1:
|
|
1705
|
+
message.fullAccessDiscordIds.push(reader.string());
|
|
1706
|
+
break;
|
|
1707
|
+
case /* repeated string endpoint_manager_discord_ids */ 2:
|
|
1708
|
+
message.endpointManagerDiscordIds.push(reader.string());
|
|
1709
|
+
break;
|
|
1710
|
+
case /* repeated proto.models.EndpointAccess endpoints */ 3:
|
|
1711
|
+
message.endpoints.push(EndpointAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
1712
|
+
break;
|
|
1713
|
+
default:
|
|
1714
|
+
let u = options.readUnknownField;
|
|
1715
|
+
if (u === "throw")
|
|
1716
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1717
|
+
let d = reader.skip(wireType);
|
|
1718
|
+
if (u !== false)
|
|
1719
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
return message;
|
|
1723
|
+
}
|
|
1724
|
+
internalBinaryWrite(message, writer, options) {
|
|
1725
|
+
/* repeated string full_access_discord_ids = 1; */
|
|
1726
|
+
for (let i = 0; i < message.fullAccessDiscordIds.length; i++)
|
|
1727
|
+
writer.tag(1, WireType.LengthDelimited).string(message.fullAccessDiscordIds[i]);
|
|
1728
|
+
/* repeated string endpoint_manager_discord_ids = 2; */
|
|
1729
|
+
for (let i = 0; i < message.endpointManagerDiscordIds.length; i++)
|
|
1730
|
+
writer.tag(2, WireType.LengthDelimited).string(message.endpointManagerDiscordIds[i]);
|
|
1731
|
+
/* repeated proto.models.EndpointAccess endpoints = 3; */
|
|
1732
|
+
for (let i = 0; i < message.endpoints.length; i++)
|
|
1733
|
+
EndpointAccess.internalBinaryWrite(message.endpoints[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1734
|
+
let u = options.writeUnknownFields;
|
|
1735
|
+
if (u !== false)
|
|
1736
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1737
|
+
return writer;
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* @generated MessageType for protobuf message proto.models.GlobalConfiguration
|
|
1742
|
+
*/
|
|
1743
|
+
export const GlobalConfiguration = new GlobalConfiguration$Type();
|
|
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
|
|
1535
1896
|
class Tournament$Type extends MessageType {
|
|
1536
1897
|
constructor() {
|
|
1537
1898
|
super("proto.models.Tournament", [
|
|
@@ -1634,7 +1995,13 @@ class Tournament_TournamentSettings$Type extends MessageType {
|
|
|
1634
1995
|
{ no: 12, name: "roles", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Role },
|
|
1635
1996
|
{ no: 13, name: "my_permissions", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
1636
1997
|
{ no: 14, name: "enable_replay_streaming", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1637
|
-
{ no: 15, name: "allow_mock_clients", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1998
|
+
{ no: 15, name: "allow_mock_clients", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1999
|
+
{ no: 16, name: "is_bk_tournament", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
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*/ }
|
|
1638
2005
|
]);
|
|
1639
2006
|
}
|
|
1640
2007
|
create(value) {
|
|
@@ -1654,6 +2021,12 @@ class Tournament_TournamentSettings$Type extends MessageType {
|
|
|
1654
2021
|
message.myPermissions = [];
|
|
1655
2022
|
message.enableReplayStreaming = false;
|
|
1656
2023
|
message.allowMockClients = false;
|
|
2024
|
+
message.isBkTournament = false;
|
|
2025
|
+
message.beatKhanaTournamentGuid = "";
|
|
2026
|
+
message.enableReplayRecording = false;
|
|
2027
|
+
message.replayRetention = 0;
|
|
2028
|
+
message.updatedAt = 0n;
|
|
2029
|
+
message.autoHideAt = 0n;
|
|
1657
2030
|
if (value !== undefined)
|
|
1658
2031
|
reflectionMergePartial(this, message, value);
|
|
1659
2032
|
return message;
|
|
@@ -1708,6 +2081,24 @@ class Tournament_TournamentSettings$Type extends MessageType {
|
|
|
1708
2081
|
case /* bool allow_mock_clients */ 15:
|
|
1709
2082
|
message.allowMockClients = reader.bool();
|
|
1710
2083
|
break;
|
|
2084
|
+
case /* bool is_bk_tournament */ 16:
|
|
2085
|
+
message.isBkTournament = reader.bool();
|
|
2086
|
+
break;
|
|
2087
|
+
case /* string beat_khana_tournament_guid */ 17:
|
|
2088
|
+
message.beatKhanaTournamentGuid = reader.string();
|
|
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;
|
|
1711
2102
|
default:
|
|
1712
2103
|
let u = options.readUnknownField;
|
|
1713
2104
|
if (u === "throw")
|
|
@@ -1765,6 +2156,24 @@ class Tournament_TournamentSettings$Type extends MessageType {
|
|
|
1765
2156
|
/* bool allow_mock_clients = 15; */
|
|
1766
2157
|
if (message.allowMockClients !== false)
|
|
1767
2158
|
writer.tag(15, WireType.Varint).bool(message.allowMockClients);
|
|
2159
|
+
/* bool is_bk_tournament = 16; */
|
|
2160
|
+
if (message.isBkTournament !== false)
|
|
2161
|
+
writer.tag(16, WireType.Varint).bool(message.isBkTournament);
|
|
2162
|
+
/* string beat_khana_tournament_guid = 17; */
|
|
2163
|
+
if (message.beatKhanaTournamentGuid !== "")
|
|
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);
|
|
1768
2177
|
let u = options.writeUnknownFields;
|
|
1769
2178
|
if (u !== false)
|
|
1770
2179
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
package/dist/models/pushes.d.ts
CHANGED
|
@@ -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 {};
|
package/dist/models/pushes.js
CHANGED
|
@@ -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();
|