@mtgame/core 0.0.55 → 0.0.56

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.
@@ -1560,255 +1560,6 @@ var Game = /** @class */ (function (_super) {
1560
1560
  return Game;
1561
1561
  }(BaseModel));
1562
1562
 
1563
- var TeamUserRole;
1564
- (function (TeamUserRole) {
1565
- TeamUserRole[TeamUserRole["member"] = 1] = "member";
1566
- TeamUserRole[TeamUserRole["moderator"] = 2] = "moderator";
1567
- TeamUserRole[TeamUserRole["admin"] = 3] = "admin";
1568
- })(TeamUserRole || (TeamUserRole = {}));
1569
- var TeamUser = /** @class */ (function (_super) {
1570
- __extends(TeamUser, _super);
1571
- function TeamUser() {
1572
- return _super !== null && _super.apply(this, arguments) || this;
1573
- }
1574
- TeamUser.toFront = function (data) { };
1575
- TeamUser.toBack = function (teamPlayer) { };
1576
- __decorate([
1577
- ToFrontHook
1578
- ], TeamUser, "toFront", null);
1579
- __decorate([
1580
- ToBackHook
1581
- ], TeamUser, "toBack", null);
1582
- TeamUser = __decorate([
1583
- ModelInstance({
1584
- mappingFields: {
1585
- id: 'id',
1586
- team_id: 'teamId',
1587
- user: 'user',
1588
- role: 'role',
1589
- number: 'number',
1590
- team: 'team',
1591
- },
1592
- relation: {
1593
- user: User,
1594
- team: Team,
1595
- role: enumField(TeamUserRole)
1596
- }
1597
- })
1598
- ], TeamUser);
1599
- return TeamUser;
1600
- }(BaseModel));
1601
-
1602
- var TournamentGroup = /** @class */ (function (_super) {
1603
- __extends(TournamentGroup, _super);
1604
- function TournamentGroup() {
1605
- return _super !== null && _super.apply(this, arguments) || this;
1606
- }
1607
- TournamentGroup.toFront = function (data) { };
1608
- TournamentGroup.toBack = function (data) { };
1609
- __decorate([
1610
- ToFrontHook
1611
- ], TournamentGroup, "toFront", null);
1612
- __decorate([
1613
- ToBackHook
1614
- ], TournamentGroup, "toBack", null);
1615
- TournamentGroup = __decorate([
1616
- ModelInstance({
1617
- mappingFields: {
1618
- id: 'id',
1619
- name: 'name',
1620
- tournament_stage_id: 'tournamentStageId'
1621
- }
1622
- })
1623
- ], TournamentGroup);
1624
- return TournamentGroup;
1625
- }(BaseModel));
1626
-
1627
- var TournamentTeam = /** @class */ (function (_super) {
1628
- __extends(TournamentTeam, _super);
1629
- function TournamentTeam() {
1630
- return _super !== null && _super.apply(this, arguments) || this;
1631
- }
1632
- Object.defineProperty(TournamentTeam.prototype, "gamesWonPercent", {
1633
- get: function () {
1634
- if (!this.gamesCount) {
1635
- return 0;
1636
- }
1637
- return Math.floor(1000 * this.wonGamesCount / this.gamesCount) / 10;
1638
- },
1639
- enumerable: true,
1640
- configurable: true
1641
- });
1642
- TournamentTeam.toFront = function (data) { };
1643
- TournamentTeam.toBack = function (data) { };
1644
- __decorate([
1645
- ToFrontHook
1646
- ], TournamentTeam, "toFront", null);
1647
- __decorate([
1648
- ToBackHook
1649
- ], TournamentTeam, "toBack", null);
1650
- TournamentTeam = __decorate([
1651
- ModelInstance({
1652
- mappingFields: {
1653
- id: 'id',
1654
- team_id: 'teamId',
1655
- tournament_id: 'tournamentId',
1656
- tournament: 'tournament',
1657
- team: 'team',
1658
- group: 'group',
1659
- final_standing: 'finalStanding',
1660
- games_count: 'gamesCount',
1661
- won_games_count: 'wonGamesCount',
1662
- draw_games_count: 'drawGamesCount',
1663
- last_games_count: 'lastGamesCount',
1664
- last_games_won: 'lastGamesWon',
1665
- score_sum: 'scoreSum',
1666
- missed_sum: 'missedSum',
1667
- score_points_sum: 'scorePointsSum',
1668
- missed_points_sum: 'missedPointsSum',
1669
- points: 'points',
1670
- users_count: 'usersCount',
1671
- games: 'games',
1672
- notifications_count: 'notificationsCount',
1673
- win_normal_time_games_count: 'winNormalTimeGamesCount',
1674
- lose_normal_time_games_count: 'loseNormalTimeGamesCount',
1675
- win_overtime_games_count: 'winOvertimeGamesCount',
1676
- lose_overtime_games_count: 'loseOvertimeGamesCount',
1677
- },
1678
- relation: {
1679
- tournament: Tournament,
1680
- team: Team,
1681
- group: TournamentGroup,
1682
- games: Game,
1683
- }
1684
- })
1685
- ], TournamentTeam);
1686
- return TournamentTeam;
1687
- }(BaseModel));
1688
-
1689
- var TournamentDisqualification = /** @class */ (function (_super) {
1690
- __extends(TournamentDisqualification, _super);
1691
- function TournamentDisqualification() {
1692
- return _super !== null && _super.apply(this, arguments) || this;
1693
- }
1694
- TournamentDisqualification.toFront = function (data) { };
1695
- TournamentDisqualification.toBack = function (data) { };
1696
- __decorate([
1697
- ToFrontHook
1698
- ], TournamentDisqualification, "toFront", null);
1699
- __decorate([
1700
- ToBackHook
1701
- ], TournamentDisqualification, "toBack", null);
1702
- TournamentDisqualification = __decorate([
1703
- ModelInstance({
1704
- mappingFields: {
1705
- id: 'id',
1706
- tournament_team_user_id: 'tournamentTeamUserId',
1707
- date_from: 'dateFrom',
1708
- date_to: 'dateTo',
1709
- matches_count: 'matchesCount',
1710
- },
1711
- relation: {
1712
- dateFrom: DateField,
1713
- dateTo: DateField,
1714
- }
1715
- })
1716
- ], TournamentDisqualification);
1717
- return TournamentDisqualification;
1718
- }(BaseModel));
1719
-
1720
- var TournamentTeamUser = /** @class */ (function (_super) {
1721
- __extends(TournamentTeamUser, _super);
1722
- function TournamentTeamUser() {
1723
- return _super !== null && _super.apply(this, arguments) || this;
1724
- }
1725
- Object.defineProperty(TournamentTeamUser.prototype, "fullName", {
1726
- get: function () {
1727
- return [this.lastName, this.firstName, this.middleName].filter(function (s) { return s; }).join(' ');
1728
- },
1729
- enumerable: true,
1730
- configurable: true
1731
- });
1732
- Object.defineProperty(TournamentTeamUser.prototype, "shortName", {
1733
- get: function () {
1734
- return [this.lastName, this.firstName].filter(function (s) { return s; }).join(' ');
1735
- },
1736
- enumerable: true,
1737
- configurable: true
1738
- });
1739
- Object.defineProperty(TournamentTeamUser.prototype, "initials", {
1740
- get: function () {
1741
- return [this.lastName, this.firstName].filter(function (s) { return s; }).map(function (s) { return s.substr(0, 1); }).join('');
1742
- },
1743
- enumerable: true,
1744
- configurable: true
1745
- });
1746
- TournamentTeamUser.toFront = function (data) { };
1747
- TournamentTeamUser.toBack = function (data) { };
1748
- __decorate([
1749
- ToFrontHook
1750
- ], TournamentTeamUser, "toFront", null);
1751
- __decorate([
1752
- ToBackHook
1753
- ], TournamentTeamUser, "toBack", null);
1754
- TournamentTeamUser = __decorate([
1755
- ModelInstance({
1756
- mappingFields: {
1757
- id: 'id',
1758
- tournament_team: 'tournamentTeam',
1759
- team_user: 'teamUser',
1760
- disqualified: 'disqualified',
1761
- first_name: 'firstName',
1762
- last_name: 'lastName',
1763
- middle_name: 'middleName',
1764
- photo: 'photo',
1765
- disqualification: 'disqualification',
1766
- has_changes: 'hasChanges',
1767
- rating: 'rating'
1768
- },
1769
- relation: {
1770
- tournamentTeam: TournamentTeam,
1771
- teamUser: TeamUser,
1772
- photo: File,
1773
- disqualification: TournamentDisqualification,
1774
- }
1775
- })
1776
- ], TournamentTeamUser);
1777
- return TournamentTeamUser;
1778
- }(BaseModel));
1779
-
1780
- var GameUser = /** @class */ (function (_super) {
1781
- __extends(GameUser, _super);
1782
- function GameUser() {
1783
- return _super !== null && _super.apply(this, arguments) || this;
1784
- }
1785
- GameUser.toFront = function (data) { };
1786
- GameUser.toBack = function (data) { };
1787
- __decorate([
1788
- ToFrontHook
1789
- ], GameUser, "toFront", null);
1790
- __decorate([
1791
- ToBackHook
1792
- ], GameUser, "toBack", null);
1793
- GameUser = __decorate([
1794
- ModelInstance({
1795
- mappingFields: {
1796
- id: 'id',
1797
- game_id: 'gameId',
1798
- team_user: 'teamUser',
1799
- tournament_team_user: 'tournamentTeamUser',
1800
- updated_at: 'updatedAt'
1801
- },
1802
- relation: {
1803
- teamUser: TeamUser,
1804
- tournamentTeamUser: TournamentTeamUser,
1805
- updatedAt: DateTimeField,
1806
- }
1807
- })
1808
- ], GameUser);
1809
- return GameUser;
1810
- }(BaseModel));
1811
-
1812
1563
  function updateItemInArray(data, item, force, checkFunction) {
1813
1564
  if (force === void 0) { force = false; }
1814
1565
  if (!Array.isArray(data)) {
@@ -1939,86 +1690,303 @@ var Store = /** @class */ (function () {
1939
1690
  try {
1940
1691
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1941
1692
  }
1942
- finally { if (e_1) throw e_1.error; }
1943
- }
1944
- };
1945
- Store.prototype.clearStorageData = function () {
1946
- if (this.engine) {
1947
- this.engine.clear();
1948
- }
1949
- };
1950
- Store.prototype.getEngine = function () {
1951
- return this.engine;
1952
- };
1953
- Store.prototype.getSubject = function (key) {
1954
- if (!this.data[key]) {
1955
- this.data[key] = new BehaviorSubject(this.engine ? this.engine.get(key) : undefined);
1956
- }
1957
- return this.data[key];
1958
- };
1959
- return Store;
1960
- }());
1693
+ finally { if (e_1) throw e_1.error; }
1694
+ }
1695
+ };
1696
+ Store.prototype.clearStorageData = function () {
1697
+ if (this.engine) {
1698
+ this.engine.clear();
1699
+ }
1700
+ };
1701
+ Store.prototype.getEngine = function () {
1702
+ return this.engine;
1703
+ };
1704
+ Store.prototype.getSubject = function (key) {
1705
+ if (!this.data[key]) {
1706
+ this.data[key] = new BehaviorSubject(this.engine ? this.engine.get(key) : undefined);
1707
+ }
1708
+ return this.data[key];
1709
+ };
1710
+ return Store;
1711
+ }());
1712
+
1713
+ var BaseService = /** @class */ (function () {
1714
+ function BaseService() {
1715
+ this.store = new Store();
1716
+ }
1717
+ BaseService.prototype.dispose = function () {
1718
+ this.store.dispose();
1719
+ };
1720
+ BaseService.ɵprov = ɵɵdefineInjectable({ factory: function BaseService_Factory() { return new BaseService(); }, token: BaseService, providedIn: "root" });
1721
+ BaseService = __decorate([
1722
+ Injectable({ providedIn: 'root' })
1723
+ ], BaseService);
1724
+ return BaseService;
1725
+ }());
1726
+
1727
+ var CONFIG_STORE_KEY = 'config';
1728
+ var CONFIG_DATA = 'mtg-core-config-data';
1729
+ var ConfigService = /** @class */ (function (_super) {
1730
+ __extends(ConfigService, _super);
1731
+ function ConfigService(configData) {
1732
+ var _this = _super.call(this) || this;
1733
+ _this.configData = configData;
1734
+ if (configData) {
1735
+ _this.initialize(configData);
1736
+ }
1737
+ return _this;
1738
+ }
1739
+ Object.defineProperty(ConfigService.prototype, "config$", {
1740
+ get: function () {
1741
+ return this.store.get(CONFIG_STORE_KEY);
1742
+ },
1743
+ enumerable: true,
1744
+ configurable: true
1745
+ });
1746
+ Object.defineProperty(ConfigService.prototype, "config", {
1747
+ get: function () {
1748
+ return this.store.value(CONFIG_STORE_KEY) || {};
1749
+ },
1750
+ enumerable: true,
1751
+ configurable: true
1752
+ });
1753
+ ConfigService.prototype.initialize = function (data) {
1754
+ this.store.save(CONFIG_STORE_KEY, data);
1755
+ };
1756
+ ConfigService.prototype.set = function (key, value) {
1757
+ var _a;
1758
+ this.store.save(CONFIG_STORE_KEY, __assign(__assign({}, this.config), (_a = {}, _a[key] = value, _a)));
1759
+ };
1760
+ ConfigService.prototype.get = function (key) {
1761
+ return this.store.value(CONFIG_STORE_KEY) && this.store.value(CONFIG_STORE_KEY)[key];
1762
+ };
1763
+ ConfigService.ctorParameters = function () { return [
1764
+ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [CONFIG_DATA,] }] }
1765
+ ]; };
1766
+ ConfigService.ɵprov = ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(ɵɵinject("mtg-core-config-data", 8)); }, token: ConfigService, providedIn: "root" });
1767
+ ConfigService = __decorate([
1768
+ Injectable({ providedIn: 'root' }),
1769
+ __param(0, Optional()), __param(0, Inject(CONFIG_DATA))
1770
+ ], ConfigService);
1771
+ return ConfigService;
1772
+ }(BaseService));
1773
+
1774
+ var TournamentGroup = /** @class */ (function (_super) {
1775
+ __extends(TournamentGroup, _super);
1776
+ function TournamentGroup() {
1777
+ return _super !== null && _super.apply(this, arguments) || this;
1778
+ }
1779
+ TournamentGroup.toFront = function (data) { };
1780
+ TournamentGroup.toBack = function (data) { };
1781
+ __decorate([
1782
+ ToFrontHook
1783
+ ], TournamentGroup, "toFront", null);
1784
+ __decorate([
1785
+ ToBackHook
1786
+ ], TournamentGroup, "toBack", null);
1787
+ TournamentGroup = __decorate([
1788
+ ModelInstance({
1789
+ mappingFields: {
1790
+ id: 'id',
1791
+ name: 'name',
1792
+ tournament_stage_id: 'tournamentStageId'
1793
+ }
1794
+ })
1795
+ ], TournamentGroup);
1796
+ return TournamentGroup;
1797
+ }(BaseModel));
1798
+
1799
+ var TournamentTeam = /** @class */ (function (_super) {
1800
+ __extends(TournamentTeam, _super);
1801
+ function TournamentTeam() {
1802
+ return _super !== null && _super.apply(this, arguments) || this;
1803
+ }
1804
+ Object.defineProperty(TournamentTeam.prototype, "gamesWonPercent", {
1805
+ get: function () {
1806
+ if (!this.gamesCount) {
1807
+ return 0;
1808
+ }
1809
+ return Math.floor(1000 * this.wonGamesCount / this.gamesCount) / 10;
1810
+ },
1811
+ enumerable: true,
1812
+ configurable: true
1813
+ });
1814
+ TournamentTeam.toFront = function (data) { };
1815
+ TournamentTeam.toBack = function (data) { };
1816
+ __decorate([
1817
+ ToFrontHook
1818
+ ], TournamentTeam, "toFront", null);
1819
+ __decorate([
1820
+ ToBackHook
1821
+ ], TournamentTeam, "toBack", null);
1822
+ TournamentTeam = __decorate([
1823
+ ModelInstance({
1824
+ mappingFields: {
1825
+ id: 'id',
1826
+ team_id: 'teamId',
1827
+ tournament_id: 'tournamentId',
1828
+ tournament: 'tournament',
1829
+ team: 'team',
1830
+ group: 'group',
1831
+ final_standing: 'finalStanding',
1832
+ games_count: 'gamesCount',
1833
+ won_games_count: 'wonGamesCount',
1834
+ draw_games_count: 'drawGamesCount',
1835
+ last_games_count: 'lastGamesCount',
1836
+ last_games_won: 'lastGamesWon',
1837
+ score_sum: 'scoreSum',
1838
+ missed_sum: 'missedSum',
1839
+ score_points_sum: 'scorePointsSum',
1840
+ missed_points_sum: 'missedPointsSum',
1841
+ points: 'points',
1842
+ users_count: 'usersCount',
1843
+ games: 'games',
1844
+ notifications_count: 'notificationsCount',
1845
+ win_normal_time_games_count: 'winNormalTimeGamesCount',
1846
+ lose_normal_time_games_count: 'loseNormalTimeGamesCount',
1847
+ win_overtime_games_count: 'winOvertimeGamesCount',
1848
+ lose_overtime_games_count: 'loseOvertimeGamesCount',
1849
+ },
1850
+ relation: {
1851
+ tournament: Tournament,
1852
+ team: Team,
1853
+ group: TournamentGroup,
1854
+ games: Game,
1855
+ }
1856
+ })
1857
+ ], TournamentTeam);
1858
+ return TournamentTeam;
1859
+ }(BaseModel));
1860
+
1861
+ var TeamUserRole;
1862
+ (function (TeamUserRole) {
1863
+ TeamUserRole[TeamUserRole["member"] = 1] = "member";
1864
+ TeamUserRole[TeamUserRole["moderator"] = 2] = "moderator";
1865
+ TeamUserRole[TeamUserRole["admin"] = 3] = "admin";
1866
+ })(TeamUserRole || (TeamUserRole = {}));
1867
+ var TeamUser = /** @class */ (function (_super) {
1868
+ __extends(TeamUser, _super);
1869
+ function TeamUser() {
1870
+ return _super !== null && _super.apply(this, arguments) || this;
1871
+ }
1872
+ TeamUser.toFront = function (data) { };
1873
+ TeamUser.toBack = function (teamPlayer) { };
1874
+ __decorate([
1875
+ ToFrontHook
1876
+ ], TeamUser, "toFront", null);
1877
+ __decorate([
1878
+ ToBackHook
1879
+ ], TeamUser, "toBack", null);
1880
+ TeamUser = __decorate([
1881
+ ModelInstance({
1882
+ mappingFields: {
1883
+ id: 'id',
1884
+ team_id: 'teamId',
1885
+ user: 'user',
1886
+ role: 'role',
1887
+ number: 'number',
1888
+ team: 'team',
1889
+ },
1890
+ relation: {
1891
+ user: User,
1892
+ team: Team,
1893
+ role: enumField(TeamUserRole)
1894
+ }
1895
+ })
1896
+ ], TeamUser);
1897
+ return TeamUser;
1898
+ }(BaseModel));
1961
1899
 
1962
- var BaseService = /** @class */ (function () {
1963
- function BaseService() {
1964
- this.store = new Store();
1900
+ var TournamentDisqualification = /** @class */ (function (_super) {
1901
+ __extends(TournamentDisqualification, _super);
1902
+ function TournamentDisqualification() {
1903
+ return _super !== null && _super.apply(this, arguments) || this;
1965
1904
  }
1966
- BaseService.prototype.dispose = function () {
1967
- this.store.dispose();
1968
- };
1969
- BaseService.ɵprov = ɵɵdefineInjectable({ factory: function BaseService_Factory() { return new BaseService(); }, token: BaseService, providedIn: "root" });
1970
- BaseService = __decorate([
1971
- Injectable({ providedIn: 'root' })
1972
- ], BaseService);
1973
- return BaseService;
1974
- }());
1905
+ TournamentDisqualification.toFront = function (data) { };
1906
+ TournamentDisqualification.toBack = function (data) { };
1907
+ __decorate([
1908
+ ToFrontHook
1909
+ ], TournamentDisqualification, "toFront", null);
1910
+ __decorate([
1911
+ ToBackHook
1912
+ ], TournamentDisqualification, "toBack", null);
1913
+ TournamentDisqualification = __decorate([
1914
+ ModelInstance({
1915
+ mappingFields: {
1916
+ id: 'id',
1917
+ tournament_team_user_id: 'tournamentTeamUserId',
1918
+ date_from: 'dateFrom',
1919
+ date_to: 'dateTo',
1920
+ matches_count: 'matchesCount',
1921
+ },
1922
+ relation: {
1923
+ dateFrom: DateField,
1924
+ dateTo: DateField,
1925
+ }
1926
+ })
1927
+ ], TournamentDisqualification);
1928
+ return TournamentDisqualification;
1929
+ }(BaseModel));
1975
1930
 
1976
- var CONFIG_STORE_KEY = 'config';
1977
- var CONFIG_DATA = 'mtg-core-config-data';
1978
- var ConfigService = /** @class */ (function (_super) {
1979
- __extends(ConfigService, _super);
1980
- function ConfigService(configData) {
1981
- var _this = _super.call(this) || this;
1982
- _this.configData = configData;
1983
- if (configData) {
1984
- _this.initialize(configData);
1985
- }
1986
- return _this;
1931
+ var TournamentTeamUser = /** @class */ (function (_super) {
1932
+ __extends(TournamentTeamUser, _super);
1933
+ function TournamentTeamUser() {
1934
+ return _super !== null && _super.apply(this, arguments) || this;
1987
1935
  }
1988
- Object.defineProperty(ConfigService.prototype, "config$", {
1936
+ Object.defineProperty(TournamentTeamUser.prototype, "fullName", {
1989
1937
  get: function () {
1990
- return this.store.get(CONFIG_STORE_KEY);
1938
+ return [this.lastName, this.firstName, this.middleName].filter(function (s) { return s; }).join(' ');
1991
1939
  },
1992
1940
  enumerable: true,
1993
1941
  configurable: true
1994
1942
  });
1995
- Object.defineProperty(ConfigService.prototype, "config", {
1943
+ Object.defineProperty(TournamentTeamUser.prototype, "shortName", {
1996
1944
  get: function () {
1997
- return this.store.value(CONFIG_STORE_KEY) || {};
1945
+ return [this.lastName, this.firstName].filter(function (s) { return s; }).join(' ');
1998
1946
  },
1999
1947
  enumerable: true,
2000
1948
  configurable: true
2001
1949
  });
2002
- ConfigService.prototype.initialize = function (data) {
2003
- this.store.save(CONFIG_STORE_KEY, data);
2004
- };
2005
- ConfigService.prototype.set = function (key, value) {
2006
- var _a;
2007
- this.store.save(CONFIG_STORE_KEY, __assign(__assign({}, this.config), (_a = {}, _a[key] = value, _a)));
2008
- };
2009
- ConfigService.prototype.get = function (key) {
2010
- return this.store.value(CONFIG_STORE_KEY) && this.store.value(CONFIG_STORE_KEY)[key];
2011
- };
2012
- ConfigService.ctorParameters = function () { return [
2013
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [CONFIG_DATA,] }] }
2014
- ]; };
2015
- ConfigService.ɵprov = ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(ɵɵinject("mtg-core-config-data", 8)); }, token: ConfigService, providedIn: "root" });
2016
- ConfigService = __decorate([
2017
- Injectable({ providedIn: 'root' }),
2018
- __param(0, Optional()), __param(0, Inject(CONFIG_DATA))
2019
- ], ConfigService);
2020
- return ConfigService;
2021
- }(BaseService));
1950
+ Object.defineProperty(TournamentTeamUser.prototype, "initials", {
1951
+ get: function () {
1952
+ return [this.lastName, this.firstName].filter(function (s) { return s; }).map(function (s) { return s.substr(0, 1); }).join('');
1953
+ },
1954
+ enumerable: true,
1955
+ configurable: true
1956
+ });
1957
+ TournamentTeamUser.toFront = function (data) { };
1958
+ TournamentTeamUser.toBack = function (data) { };
1959
+ __decorate([
1960
+ ToFrontHook
1961
+ ], TournamentTeamUser, "toFront", null);
1962
+ __decorate([
1963
+ ToBackHook
1964
+ ], TournamentTeamUser, "toBack", null);
1965
+ TournamentTeamUser = __decorate([
1966
+ ModelInstance({
1967
+ mappingFields: {
1968
+ id: 'id',
1969
+ tournament_team: 'tournamentTeam',
1970
+ team_user: 'teamUser',
1971
+ disqualified: 'disqualified',
1972
+ first_name: 'firstName',
1973
+ last_name: 'lastName',
1974
+ middle_name: 'middleName',
1975
+ photo: 'photo',
1976
+ disqualification: 'disqualification',
1977
+ has_changes: 'hasChanges',
1978
+ rating: 'rating'
1979
+ },
1980
+ relation: {
1981
+ tournamentTeam: TournamentTeam,
1982
+ teamUser: TeamUser,
1983
+ photo: File,
1984
+ disqualification: TournamentDisqualification,
1985
+ }
1986
+ })
1987
+ ], TournamentTeamUser);
1988
+ return TournamentTeamUser;
1989
+ }(BaseModel));
2022
1990
 
2023
1991
  var BaseStatistic = /** @class */ (function () {
2024
1992
  function BaseStatistic() {
@@ -2298,22 +2266,81 @@ var BasketballGameLog = /** @class */ (function (_super) {
2298
2266
  return BasketballGameLog;
2299
2267
  }(BaseModel));
2300
2268
 
2301
- var BasketballGameApi = /** @class */ (function () {
2302
- function BasketballGameApi(httpClient, configService) {
2269
+ var GameUser = /** @class */ (function (_super) {
2270
+ __extends(GameUser, _super);
2271
+ function GameUser() {
2272
+ return _super !== null && _super.apply(this, arguments) || this;
2273
+ }
2274
+ GameUser.toFront = function (data) { };
2275
+ GameUser.toBack = function (data) { };
2276
+ __decorate([
2277
+ ToFrontHook
2278
+ ], GameUser, "toFront", null);
2279
+ __decorate([
2280
+ ToBackHook
2281
+ ], GameUser, "toBack", null);
2282
+ GameUser = __decorate([
2283
+ ModelInstance({
2284
+ mappingFields: {
2285
+ id: 'id',
2286
+ game_id: 'gameId',
2287
+ team_user: 'teamUser',
2288
+ tournament_team_user: 'tournamentTeamUser',
2289
+ is_mvp: 'isMvp',
2290
+ updated_at: 'updatedAt'
2291
+ },
2292
+ relation: {
2293
+ teamUser: TeamUser,
2294
+ tournamentTeamUser: TournamentTeamUser,
2295
+ updatedAt: DateTimeField,
2296
+ }
2297
+ })
2298
+ ], GameUser);
2299
+ return GameUser;
2300
+ }(BaseModel));
2301
+
2302
+ var GameBaseApi = /** @class */ (function () {
2303
+ function GameBaseApi(httpClient, configService) {
2303
2304
  this.httpClient = httpClient;
2304
2305
  this.configService = configService;
2305
2306
  }
2306
- BasketballGameApi.prototype.getById = function (gameId) {
2307
+ GameBaseApi.prototype.getUsers = function (gameId) {
2307
2308
  return __awaiter(this, void 0, void 0, function () {
2308
2309
  return __generator(this, function (_a) {
2309
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_basketball_game/" + gameId + "/").pipe(map(function (result) { return Game.toFront(result); })).toPromise()];
2310
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_game/" + gameId + "/users/").pipe(map(function (result) { return GameUser.toFront(result); })).toPromise()];
2310
2311
  });
2311
2312
  });
2312
2313
  };
2313
- BasketballGameApi.prototype.getUsers = function (gameId) {
2314
+ GameBaseApi.prototype.getMvp = function (gameId) {
2314
2315
  return __awaiter(this, void 0, void 0, function () {
2315
2316
  return __generator(this, function (_a) {
2316
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_game/" + gameId + "/users/").pipe(map(function (result) { return GameUser.toFront(result); })).toPromise()];
2317
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_game/" + gameId + "/mvp/").pipe(map(function (result) { return GameUser.toFront(result); })).toPromise()];
2318
+ });
2319
+ });
2320
+ };
2321
+ GameBaseApi.ctorParameters = function () { return [
2322
+ { type: HttpClient },
2323
+ { type: ConfigService }
2324
+ ]; };
2325
+ GameBaseApi.ɵprov = ɵɵdefineInjectable({ factory: function GameBaseApi_Factory() { return new GameBaseApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: GameBaseApi, providedIn: "root" });
2326
+ GameBaseApi = __decorate([
2327
+ Injectable({ providedIn: 'root' })
2328
+ ], GameBaseApi);
2329
+ return GameBaseApi;
2330
+ }());
2331
+
2332
+ var BasketballGameApi = /** @class */ (function (_super) {
2333
+ __extends(BasketballGameApi, _super);
2334
+ function BasketballGameApi(httpClient, configService) {
2335
+ var _this = _super.call(this, httpClient, configService) || this;
2336
+ _this.httpClient = httpClient;
2337
+ _this.configService = configService;
2338
+ return _this;
2339
+ }
2340
+ BasketballGameApi.prototype.getById = function (gameId) {
2341
+ return __awaiter(this, void 0, void 0, function () {
2342
+ return __generator(this, function (_a) {
2343
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_basketball_game/" + gameId + "/").pipe(map(function (result) { return Game.toFront(result); })).toPromise()];
2317
2344
  });
2318
2345
  });
2319
2346
  };
@@ -2363,7 +2390,7 @@ var BasketballGameApi = /** @class */ (function () {
2363
2390
  Injectable({ providedIn: 'root' })
2364
2391
  ], BasketballGameApi);
2365
2392
  return BasketballGameApi;
2366
- }());
2393
+ }(GameBaseApi));
2367
2394
 
2368
2395
  var Feedback = /** @class */ (function () {
2369
2396
  function Feedback() {
@@ -2914,10 +2941,13 @@ var HockeyGameTeamStatistic = /** @class */ (function (_super) {
2914
2941
  return HockeyGameTeamStatistic;
2915
2942
  }(BaseModel));
2916
2943
 
2917
- var HockeyGameApi = /** @class */ (function () {
2944
+ var HockeyGameApi = /** @class */ (function (_super) {
2945
+ __extends(HockeyGameApi, _super);
2918
2946
  function HockeyGameApi(httpClient, configService) {
2919
- this.httpClient = httpClient;
2920
- this.configService = configService;
2947
+ var _this = _super.call(this, httpClient, configService) || this;
2948
+ _this.httpClient = httpClient;
2949
+ _this.configService = configService;
2950
+ return _this;
2921
2951
  }
2922
2952
  HockeyGameApi.prototype.getById = function (gameId) {
2923
2953
  return __awaiter(this, void 0, void 0, function () {
@@ -2926,13 +2956,6 @@ var HockeyGameApi = /** @class */ (function () {
2926
2956
  });
2927
2957
  });
2928
2958
  };
2929
- HockeyGameApi.prototype.getUsers = function (gameId) {
2930
- return __awaiter(this, void 0, void 0, function () {
2931
- return __generator(this, function (_a) {
2932
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_game/" + gameId + "/users/").pipe(map(function (result) { return GameUser.toFront(result); })).toPromise()];
2933
- });
2934
- });
2935
- };
2936
2959
  HockeyGameApi.prototype.getTeamStatistic = function (gameId) {
2937
2960
  return __awaiter(this, void 0, void 0, function () {
2938
2961
  return __generator(this, function (_a) {
@@ -2983,7 +3006,7 @@ var HockeyGameApi = /** @class */ (function () {
2983
3006
  Injectable({ providedIn: 'root' })
2984
3007
  ], HockeyGameApi);
2985
3008
  return HockeyGameApi;
2986
- }());
3009
+ }(GameBaseApi));
2987
3010
 
2988
3011
  var FootballGameLogTypes;
2989
3012
  (function (FootballGameLogTypes) {
@@ -3406,10 +3429,13 @@ var FootballGameTeamStatistic = /** @class */ (function (_super) {
3406
3429
  return FootballGameTeamStatistic;
3407
3430
  }(BaseModel));
3408
3431
 
3409
- var FootballGameApi = /** @class */ (function () {
3432
+ var FootballGameApi = /** @class */ (function (_super) {
3433
+ __extends(FootballGameApi, _super);
3410
3434
  function FootballGameApi(httpClient, configService) {
3411
- this.httpClient = httpClient;
3412
- this.configService = configService;
3435
+ var _this = _super.call(this, httpClient, configService) || this;
3436
+ _this.httpClient = httpClient;
3437
+ _this.configService = configService;
3438
+ return _this;
3413
3439
  }
3414
3440
  FootballGameApi.prototype.getById = function (gameId) {
3415
3441
  return __awaiter(this, void 0, void 0, function () {
@@ -3418,13 +3444,6 @@ var FootballGameApi = /** @class */ (function () {
3418
3444
  });
3419
3445
  });
3420
3446
  };
3421
- FootballGameApi.prototype.getUsers = function (gameId) {
3422
- return __awaiter(this, void 0, void 0, function () {
3423
- return __generator(this, function (_a) {
3424
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_game/" + gameId + "/users/").pipe(map(function (result) { return GameUser.toFront(result); })).toPromise()];
3425
- });
3426
- });
3427
- };
3428
3447
  FootballGameApi.prototype.getTeamStatistic = function (gameId) {
3429
3448
  return __awaiter(this, void 0, void 0, function () {
3430
3449
  return __generator(this, function (_a) {
@@ -3475,7 +3494,7 @@ var FootballGameApi = /** @class */ (function () {
3475
3494
  Injectable({ providedIn: 'root' })
3476
3495
  ], FootballGameApi);
3477
3496
  return FootballGameApi;
3478
- }());
3497
+ }(GameBaseApi));
3479
3498
 
3480
3499
  var LeagueNewsType;
3481
3500
  (function (LeagueNewsType) {
@@ -7035,10 +7054,13 @@ var VolleyballGameLog = /** @class */ (function (_super) {
7035
7054
  return VolleyballGameLog;
7036
7055
  }(BaseModel));
7037
7056
 
7038
- var VolleyballGameApi = /** @class */ (function () {
7057
+ var VolleyballGameApi = /** @class */ (function (_super) {
7058
+ __extends(VolleyballGameApi, _super);
7039
7059
  function VolleyballGameApi(httpClient, configService) {
7040
- this.httpClient = httpClient;
7041
- this.configService = configService;
7060
+ var _this = _super.call(this, httpClient, configService) || this;
7061
+ _this.httpClient = httpClient;
7062
+ _this.configService = configService;
7063
+ return _this;
7042
7064
  }
7043
7065
  VolleyballGameApi.prototype.getById = function (gameId) {
7044
7066
  return __awaiter(this, void 0, void 0, function () {
@@ -7047,13 +7069,6 @@ var VolleyballGameApi = /** @class */ (function () {
7047
7069
  });
7048
7070
  });
7049
7071
  };
7050
- VolleyballGameApi.prototype.getUsers = function (gameId) {
7051
- return __awaiter(this, void 0, void 0, function () {
7052
- return __generator(this, function (_a) {
7053
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_game/" + gameId + "/users/").pipe(map(function (result) { return GameUser.toFront(result); })).toPromise()];
7054
- });
7055
- });
7056
- };
7057
7072
  VolleyballGameApi.prototype.getTeamStatistic = function (gameId) {
7058
7073
  return __awaiter(this, void 0, void 0, function () {
7059
7074
  return __generator(this, function (_a) {
@@ -7084,7 +7099,7 @@ var VolleyballGameApi = /** @class */ (function () {
7084
7099
  Injectable({ providedIn: 'root' })
7085
7100
  ], VolleyballGameApi);
7086
7101
  return VolleyballGameApi;
7087
- }());
7102
+ }(GameBaseApi));
7088
7103
 
7089
7104
  var _a$1;
7090
7105
  var BasketballGameLogTypeLocalization = (_a$1 = {},
@@ -7718,5 +7733,5 @@ var HttpCookieInterceptor = /** @class */ (function () {
7718
7733
  * Generated bundle index. Do not edit.
7719
7734
  */
7720
7735
 
7721
- export { BannerLocation, BaseModel, BaseService, BaseStatistic, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameTeamStatistic, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, CONFIG_DATA, CentrifugoService, City, ConfigService, DateField, DateTimeField, FAULT_LOG_TYPES, Feedback, FeedbackApi, File, FileApi, FileEngine, FootballGameApi, FootballGameConfig, FootballGameLog, FootballGameLogTypeLocalization, FootballGameLogTypes, FootballGameStatistic, FootballGameTeamStatistic, FootballProfile, FootballStatistic, FootballWorkFoot, FootballWorkFootLocalization, Game, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameFootballPosition, GameFootballPositionLocalization, GameHockeyPosition, GameHockeyPositionLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameStatuses, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, HockeyAdvantageTypes, HockeyGameApi, HockeyGameConfig, HockeyGameLog, HockeyGameLogTypeLocalization, HockeyGameLogTypes, HockeyGameStatistic, HockeyGameTeamStatistic, HockeyPenaltyTypes, HockeyProfile, HockeyStatistic, HockeyWorkHand, HttpCookieInterceptor, League, LeagueApi, LeagueBanner, LeagueCourt, LeagueNews, LeagueNewsApi, LeagueNewsType, LeaguePartner, LeaguePlaylist, LocalStorageEngine, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, PlayoffTypes, Poll, PollAnswer, PollStatuses, PollVariant, ReferenceApi, SCORE_LOG_TYPES, Sport, SportTypes, StorageEngine, StorageEngineField, Store, Team, TeamAccess, TeamApi, TeamEvent, TeamEventApi, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamPermission, TeamPermissionTypes, TeamUser, TeamUserRole, TeamUserRoleLocalization, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentSeason, TournamentSeasonApi, TournamentSeasonStatuses, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamUser, TournamentTeamUserInvite, TournamentTeamWinner, TournamentTypes, UntilDestroy, User, UserAccess, UserApi, UserGender, UserPermission, UserPermissionTypes, UserProfile, VolleyballGameApi, VolleyballGameConfig, VolleyballGameLog, VolleyballGameLogType, VolleyballGameLogTypeLocalization, VolleyballGameStatistic, VolleyballGameTeamStatistic, VolleyballGameTypes, VolleyballProfile, VolleyballStatistic, VolleyballStatisticTypes, VolleyballWorkHand, VolleyballWorkHandLocalization, WorkHand, WorkHandLocalization, addItemInArray, changeFavicons, componentDestroyed, deleteItemFromArray, enumField, fileSizeValidator, generateArray, getArrayChunks, getCookie, getEnumOptions, getIconsData, handleError, isTouchDevice, listField, markFormGroupTouched, minLengthArrayValidator, patchItemInArray, updateItemInArray, updateItemsInArray, validateDate, validateEmail, validatePhone, validateUrl, penaltyTypeField as ɵa };
7736
+ export { BannerLocation, BaseModel, BaseService, BaseStatistic, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameTeamStatistic, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, CONFIG_DATA, CentrifugoService, City, ConfigService, DateField, DateTimeField, FAULT_LOG_TYPES, Feedback, FeedbackApi, File, FileApi, FileEngine, FootballGameApi, FootballGameConfig, FootballGameLog, FootballGameLogTypeLocalization, FootballGameLogTypes, FootballGameStatistic, FootballGameTeamStatistic, FootballProfile, FootballStatistic, FootballWorkFoot, FootballWorkFootLocalization, Game, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameFootballPosition, GameFootballPositionLocalization, GameHockeyPosition, GameHockeyPositionLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameStatuses, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, HockeyAdvantageTypes, HockeyGameApi, HockeyGameConfig, HockeyGameLog, HockeyGameLogTypeLocalization, HockeyGameLogTypes, HockeyGameStatistic, HockeyGameTeamStatistic, HockeyPenaltyTypes, HockeyProfile, HockeyStatistic, HockeyWorkHand, HttpCookieInterceptor, League, LeagueApi, LeagueBanner, LeagueCourt, LeagueNews, LeagueNewsApi, LeagueNewsType, LeaguePartner, LeaguePlaylist, LocalStorageEngine, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, PlayoffTypes, Poll, PollAnswer, PollStatuses, PollVariant, ReferenceApi, SCORE_LOG_TYPES, Sport, SportTypes, StorageEngine, StorageEngineField, Store, Team, TeamAccess, TeamApi, TeamEvent, TeamEventApi, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamPermission, TeamPermissionTypes, TeamUser, TeamUserRole, TeamUserRoleLocalization, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentSeason, TournamentSeasonApi, TournamentSeasonStatuses, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamUser, TournamentTeamUserInvite, TournamentTeamWinner, TournamentTypes, UntilDestroy, User, UserAccess, UserApi, UserGender, UserPermission, UserPermissionTypes, UserProfile, VolleyballGameApi, VolleyballGameConfig, VolleyballGameLog, VolleyballGameLogType, VolleyballGameLogTypeLocalization, VolleyballGameStatistic, VolleyballGameTeamStatistic, VolleyballGameTypes, VolleyballProfile, VolleyballStatistic, VolleyballStatisticTypes, VolleyballWorkHand, VolleyballWorkHandLocalization, WorkHand, WorkHandLocalization, addItemInArray, changeFavicons, componentDestroyed, deleteItemFromArray, enumField, fileSizeValidator, generateArray, getArrayChunks, getCookie, getEnumOptions, getIconsData, handleError, isTouchDevice, listField, markFormGroupTouched, minLengthArrayValidator, patchItemInArray, updateItemInArray, updateItemsInArray, validateDate, validateEmail, validatePhone, validateUrl, penaltyTypeField as ɵa, GameBaseApi as ɵb };
7722
7737
  //# sourceMappingURL=mtgame-core.js.map