@mtgame/core 0.0.3 → 0.0.5

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.
Files changed (61) hide show
  1. package/api/feedback-api.d.ts +9 -0
  2. package/api/file-api.d.ts +13 -0
  3. package/api/league-news-api.d.ts +13 -0
  4. package/api/public-api.d.ts +6 -0
  5. package/api/team-api.d.ts +66 -0
  6. package/api/team-event-api.d.ts +16 -0
  7. package/api/user-api.d.ts +51 -0
  8. package/bundles/mtgame-core.umd.js +1798 -536
  9. package/bundles/mtgame-core.umd.js.map +1 -1
  10. package/bundles/mtgame-core.umd.min.js +2 -2
  11. package/bundles/mtgame-core.umd.min.js.map +1 -1
  12. package/esm2015/api/feedback-api.js +32 -0
  13. package/esm2015/api/file-api.js +46 -0
  14. package/esm2015/api/league-news-api.js +59 -0
  15. package/esm2015/api/public-api.js +7 -1
  16. package/esm2015/api/team-api.js +394 -0
  17. package/esm2015/api/team-event-api.js +81 -0
  18. package/esm2015/api/user-api.js +284 -0
  19. package/esm2015/models/basketball-game-config.js +6 -3
  20. package/esm2015/models/feedback.js +32 -0
  21. package/esm2015/models/league-news.js +39 -0
  22. package/esm2015/models/public-api.js +7 -1
  23. package/esm2015/models/team-access.js +45 -0
  24. package/esm2015/models/team-permission.js +38 -0
  25. package/esm2015/models/tournament-event.js +11 -4
  26. package/esm2015/models/tournament.js +9 -1
  27. package/esm2015/models/user-access.js +25 -0
  28. package/esm2015/models/user-permission.js +38 -0
  29. package/esm5/api/feedback-api.js +35 -0
  30. package/esm5/api/file-api.js +64 -0
  31. package/esm5/api/league-news-api.js +68 -0
  32. package/esm5/api/public-api.js +7 -1
  33. package/esm5/api/team-api.js +486 -0
  34. package/esm5/api/team-event-api.js +96 -0
  35. package/esm5/api/user-api.js +350 -0
  36. package/esm5/models/basketball-game-config.js +6 -3
  37. package/esm5/models/feedback.js +35 -0
  38. package/esm5/models/league-news.js +44 -0
  39. package/esm5/models/public-api.js +7 -1
  40. package/esm5/models/team-access.js +50 -0
  41. package/esm5/models/team-permission.js +43 -0
  42. package/esm5/models/tournament-event.js +11 -4
  43. package/esm5/models/tournament.js +9 -1
  44. package/esm5/models/user-access.js +30 -0
  45. package/esm5/models/user-permission.js +43 -0
  46. package/fesm2015/mtgame-core.js +1207 -188
  47. package/fesm2015/mtgame-core.js.map +1 -1
  48. package/fesm5/mtgame-core.js +1787 -537
  49. package/fesm5/mtgame-core.js.map +1 -1
  50. package/models/basketball-game-config.d.ts +3 -1
  51. package/models/feedback.d.ts +9 -0
  52. package/models/league-news.d.ts +16 -0
  53. package/models/public-api.d.ts +6 -0
  54. package/models/team-access.d.ts +27 -0
  55. package/models/team-permission.d.ts +15 -0
  56. package/models/tournament-event.d.ts +5 -2
  57. package/models/tournament.d.ts +6 -0
  58. package/models/user-access.d.ts +10 -0
  59. package/models/user-permission.d.ts +16 -0
  60. package/mtgame-core.metadata.json +1 -1
  61. package/package.json +1 -1
@@ -625,6 +625,11 @@ var BasketballStatisticTypes;
625
625
  BasketballStatisticTypes[BasketballStatisticTypes["light"] = 2] = "light";
626
626
  BasketballStatisticTypes[BasketballStatisticTypes["extended"] = 3] = "extended";
627
627
  })(BasketballStatisticTypes || (BasketballStatisticTypes = {}));
628
+ var GameTimeTypes;
629
+ (function (GameTimeTypes) {
630
+ GameTimeTypes[GameTimeTypes["clean"] = 1] = "clean";
631
+ GameTimeTypes[GameTimeTypes["dirty"] = 2] = "dirty";
632
+ })(GameTimeTypes || (GameTimeTypes = {}));
628
633
  let TournamentSettings = class TournamentSettings extends BaseModel {
629
634
  static toFront(data) { }
630
635
  static toBack(data) { }
@@ -662,11 +667,14 @@ TournamentSettings = __decorate([
662
667
  recruitment_is_open: 'recruitmentIsOpen',
663
668
  transfer_is_open: 'transferIsOpen',
664
669
  basketball_statistic_type: 'basketballStatisticType',
670
+ shot_clock_enabled: 'shotClockEnabled',
671
+ game_time_type: 'gameTimeType',
665
672
  },
666
673
  relation: {
667
674
  type: enumField(TournamentTypes),
668
675
  gender: enumField(TournamentGender),
669
676
  basketballStatisticType: enumField(BasketballStatisticTypes),
677
+ gameTimeType: enumField(GameTimeTypes),
670
678
  }
671
679
  })
672
680
  ], TournamentSettings);
@@ -782,10 +790,13 @@ BasketballGameConfig = __decorate([
782
790
  overtime_timeout_count: 'overtimeTimeoutCount',
783
791
  timeout_time: 'timeoutTime',
784
792
  statistic_type: 'statisticType',
793
+ shot_clock_enabled: 'shotClockEnabled',
794
+ game_time_type: 'gameTimeType',
785
795
  },
786
796
  relation: {
787
797
  overtimeType: enumField(OvertimeTypes),
788
- statisticType: enumField(BasketballStatisticTypes)
798
+ statisticType: enumField(BasketballStatisticTypes),
799
+ gameTimeType: enumField(GameTimeTypes),
789
800
  }
790
801
  })
791
802
  ], BasketballGameConfig);
@@ -1640,10 +1651,131 @@ BasketballGameApi = __decorate([
1640
1651
  Injectable({ providedIn: 'root' })
1641
1652
  ], BasketballGameApi);
1642
1653
 
1654
+ let Feedback = class Feedback {
1655
+ static toFront(data) {
1656
+ return null;
1657
+ }
1658
+ static toBack(value) {
1659
+ return null;
1660
+ }
1661
+ };
1662
+ __decorate([
1663
+ ToFrontHook
1664
+ ], Feedback, "toFront", null);
1665
+ __decorate([
1666
+ ToBackHook
1667
+ ], Feedback, "toBack", null);
1668
+ Feedback = __decorate([
1669
+ ModelInstance({
1670
+ mappingFields: {
1671
+ id: 'id',
1672
+ theme: 'theme',
1673
+ message: 'message',
1674
+ files: 'files',
1675
+ },
1676
+ relation: {
1677
+ files: File
1678
+ }
1679
+ })
1680
+ ], Feedback);
1681
+
1682
+ let FeedbackApi = class FeedbackApi {
1683
+ constructor(httpClient, configService) {
1684
+ this.httpClient = httpClient;
1685
+ this.configService = configService;
1686
+ }
1687
+ sendFeedback(data) {
1688
+ return __awaiter(this, void 0, void 0, function* () {
1689
+ return this.httpClient.post(`${this.configService.get('apiUrl')}/api/v1/feedback/`, Feedback.toBack(data))
1690
+ .pipe(map(response => Feedback.toFront(response)))
1691
+ .toPromise();
1692
+ });
1693
+ }
1694
+ };
1695
+ FeedbackApi.ctorParameters = () => [
1696
+ { type: HttpClient },
1697
+ { type: ConfigService }
1698
+ ];
1699
+ FeedbackApi.ɵprov = ɵɵdefineInjectable({ factory: function FeedbackApi_Factory() { return new FeedbackApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: FeedbackApi, providedIn: "root" });
1700
+ FeedbackApi = __decorate([
1701
+ Injectable({ providedIn: 'root' })
1702
+ ], FeedbackApi);
1703
+
1704
+ let FileApi = class FileApi {
1705
+ constructor(httpClient, configService) {
1706
+ this.httpClient = httpClient;
1707
+ this.configService = configService;
1708
+ }
1709
+ upload(fileData, filename) {
1710
+ return __awaiter(this, void 0, void 0, function* () {
1711
+ const formData = new FormData();
1712
+ formData.append('file', fileData, filename);
1713
+ return this.httpClient
1714
+ .post(`${this.configService.get('apiUrl')}/api/v1/file/`, formData)
1715
+ .pipe(map(data => File.toFront(data)))
1716
+ .toPromise();
1717
+ });
1718
+ }
1719
+ createZipArchive(files) {
1720
+ return __awaiter(this, void 0, void 0, function* () {
1721
+ const formData = new FormData();
1722
+ for (const file of files) {
1723
+ formData.append('files', file.file, file.filename);
1724
+ }
1725
+ return this.httpClient
1726
+ .post(`${this.configService.get('apiUrl')}/api/v1/file/zip_archive/`, formData, { responseType: 'blob' })
1727
+ .toPromise();
1728
+ });
1729
+ }
1730
+ };
1731
+ FileApi.ctorParameters = () => [
1732
+ { type: HttpClient },
1733
+ { type: ConfigService }
1734
+ ];
1735
+ FileApi.ɵprov = ɵɵdefineInjectable({ factory: function FileApi_Factory() { return new FileApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: FileApi, providedIn: "root" });
1736
+ FileApi = __decorate([
1737
+ Injectable({ providedIn: 'root' })
1738
+ ], FileApi);
1739
+
1740
+ let LeagueNews = class LeagueNews extends BaseModel {
1741
+ static toFront(data) {
1742
+ return undefined;
1743
+ }
1744
+ static toBack(data) { }
1745
+ };
1746
+ __decorate([
1747
+ ToFrontHook
1748
+ ], LeagueNews, "toFront", null);
1749
+ __decorate([
1750
+ ToBackHook
1751
+ ], LeagueNews, "toBack", null);
1752
+ LeagueNews = __decorate([
1753
+ ModelInstance({
1754
+ mappingFields: {
1755
+ id: 'id',
1756
+ title: 'title',
1757
+ datetime: 'datetime',
1758
+ preview_text: 'previewText',
1759
+ detail_text: 'detailText',
1760
+ picture: 'picture',
1761
+ cover: 'cover',
1762
+ is_main: 'isMain',
1763
+ tournaments: 'tournaments',
1764
+ },
1765
+ relation: {
1766
+ datetime: DateTimeField,
1767
+ picture: File,
1768
+ cover: File,
1769
+ tournaments: listField(Tournament)
1770
+ }
1771
+ })
1772
+ ], LeagueNews);
1773
+
1643
1774
  var TournamentEventTypes;
1644
1775
  (function (TournamentEventTypes) {
1645
1776
  TournamentEventTypes[TournamentEventTypes["game_closed"] = 1] = "game_closed";
1646
1777
  TournamentEventTypes[TournamentEventTypes["media_added"] = 2] = "media_added";
1778
+ TournamentEventTypes[TournamentEventTypes["news"] = 3] = "news";
1647
1779
  })(TournamentEventTypes || (TournamentEventTypes = {}));
1648
1780
  let TournamentEvent = class TournamentEvent extends BaseModel {
1649
1781
  static toFront(data) { }
@@ -1660,13 +1792,17 @@ TournamentEvent = __decorate([
1660
1792
  mappingFields: {
1661
1793
  id: 'id',
1662
1794
  game: 'game',
1663
- tournament: 'tournament',
1795
+ news: 'news',
1796
+ league: 'league',
1797
+ tournaments: 'tournaments',
1664
1798
  event: 'event',
1665
1799
  datetime: 'datetime'
1666
1800
  },
1667
1801
  relation: {
1668
1802
  game: Game,
1669
- tournament: Tournament,
1803
+ news: LeagueNews,
1804
+ league: League,
1805
+ tournaments: listField(Tournament),
1670
1806
  datetime: DateField,
1671
1807
  event: enumField(TournamentEventTypes)
1672
1808
  }
@@ -1721,6 +1857,55 @@ LeagueApi = __decorate([
1721
1857
  Injectable({ providedIn: 'root' })
1722
1858
  ], LeagueApi);
1723
1859
 
1860
+ let LeagueNewsApi = class LeagueNewsApi {
1861
+ constructor(httpClient, configService) {
1862
+ this.httpClient = httpClient;
1863
+ this.configService = configService;
1864
+ }
1865
+ getLeagueNewsList(leagueId) {
1866
+ return __awaiter(this, void 0, void 0, function* () {
1867
+ return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/news/`, { observe: 'response' })
1868
+ .pipe(map(response => ({
1869
+ total: +response.headers.get('X-Page-Count'),
1870
+ data: LeagueNews.toFront(response.body)
1871
+ })))
1872
+ .toPromise();
1873
+ });
1874
+ }
1875
+ getMainLeagueNews(leagueId) {
1876
+ return __awaiter(this, void 0, void 0, function* () {
1877
+ return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/news/?is_main=true`)
1878
+ .pipe(map(response => response && response.length > 0 ? LeagueNews.toFront(response[0]) : null))
1879
+ .toPromise();
1880
+ });
1881
+ }
1882
+ getNewsById(newsId) {
1883
+ return __awaiter(this, void 0, void 0, function* () {
1884
+ return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league_news/${newsId}/`)
1885
+ .pipe(map(response => LeagueNews.toFront(response)))
1886
+ .toPromise();
1887
+ });
1888
+ }
1889
+ getTournamentNewsList(tournamentId) {
1890
+ return __awaiter(this, void 0, void 0, function* () {
1891
+ return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament/${tournamentId}/news/`, { observe: 'response' })
1892
+ .pipe(map(response => ({
1893
+ total: +response.headers.get('X-Page-Count'),
1894
+ data: LeagueNews.toFront(response.body)
1895
+ })))
1896
+ .toPromise();
1897
+ });
1898
+ }
1899
+ };
1900
+ LeagueNewsApi.ctorParameters = () => [
1901
+ { type: HttpClient },
1902
+ { type: ConfigService }
1903
+ ];
1904
+ LeagueNewsApi.ɵprov = ɵɵdefineInjectable({ factory: function LeagueNewsApi_Factory() { return new LeagueNewsApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: LeagueNewsApi, providedIn: "root" });
1905
+ LeagueNewsApi = __decorate([
1906
+ Injectable({ providedIn: 'root' })
1907
+ ], LeagueNewsApi);
1908
+
1724
1909
  let MediaApi = class MediaApi {
1725
1910
  constructor(httpClient, configService) {
1726
1911
  this.httpClient = httpClient;
@@ -2425,259 +2610,797 @@ ReferenceApi = __decorate([
2425
2610
  Injectable({ providedIn: 'root' })
2426
2611
  ], ReferenceApi);
2427
2612
 
2428
- let TournamentNews = class TournamentNews extends BaseModel {
2613
+ let TeamInviteExternal = class TeamInviteExternal extends BaseModel {
2429
2614
  static toFront(data) { }
2430
2615
  static toBack(data) { }
2431
2616
  };
2432
2617
  __decorate([
2433
2618
  ToFrontHook
2434
- ], TournamentNews, "toFront", null);
2619
+ ], TeamInviteExternal, "toFront", null);
2435
2620
  __decorate([
2436
2621
  ToBackHook
2437
- ], TournamentNews, "toBack", null);
2438
- TournamentNews = __decorate([
2622
+ ], TeamInviteExternal, "toBack", null);
2623
+ TeamInviteExternal = __decorate([
2439
2624
  ModelInstance({
2440
2625
  mappingFields: {
2441
2626
  id: 'id',
2442
- title: 'title',
2443
- picture: 'picture',
2444
- text: 'text',
2445
- author: 'author',
2446
- created_at: 'createdAt',
2627
+ team_id: 'teamId',
2628
+ email: 'email',
2629
+ first_name: 'firstName',
2630
+ last_name: 'lastName',
2447
2631
  },
2448
- relation: {
2449
- picture: File,
2450
- author: User,
2451
- createdAt: DateTimeField,
2452
- }
2453
2632
  })
2454
- ], TournamentNews);
2633
+ ], TeamInviteExternal);
2455
2634
 
2456
- let GameTimelineStageItem = class GameTimelineStageItem {
2635
+ let VolleyballStatistic = class VolleyballStatistic extends BaseModel {
2457
2636
  static toFront(data) { }
2458
2637
  static toBack(data) { }
2459
2638
  };
2460
2639
  __decorate([
2461
2640
  ToFrontHook
2462
- ], GameTimelineStageItem, "toFront", null);
2641
+ ], VolleyballStatistic, "toFront", null);
2463
2642
  __decorate([
2464
2643
  ToBackHook
2465
- ], GameTimelineStageItem, "toBack", null);
2466
- GameTimelineStageItem = __decorate([
2644
+ ], VolleyballStatistic, "toBack", null);
2645
+ VolleyballStatistic = __decorate([
2467
2646
  ModelInstance({
2468
2647
  mappingFields: {
2469
- stage_id: 'stageId',
2470
- tours_count: 'toursCount',
2471
- playoff_stages_count: 'playoffStagesCount',
2648
+ team: 'team',
2649
+ team_user: 'teamUser',
2650
+ tournament_team_user: 'tournamentTeamUser',
2651
+ tournament_team: 'tournamentTeam',
2652
+ user: 'user',
2653
+ month: 'month',
2654
+ win_lose: 'winLose',
2655
+ games_count: 'gamesCount',
2656
+ won_games_count: 'wonGamesCount',
2657
+ serve_hits: 'serveHits',
2658
+ serve_faults: 'serveFaults',
2659
+ serve_aces: 'serveAces',
2660
+ serve_percent: 'servePercent',
2661
+ ace_percent: 'acePercent',
2662
+ stuff_blocks: 'stuffBlocks',
2663
+ block_faults: 'blockFaults',
2664
+ block_rebounds: 'blockRebounds',
2665
+ block_percent: 'blockPercent',
2666
+ attack_spikes: 'attackSpikes',
2667
+ attack_faults: 'attackFaults',
2668
+ attack_shots: 'attackShots',
2669
+ attack_percent: 'attackPercent',
2670
+ receives: 'receives',
2671
+ receive_faults: 'receiveFaults',
2672
+ excellent_receives: 'excellentReceives',
2673
+ receive_percent: 'receivePercent',
2674
+ serve_receives: 'serveReceives',
2675
+ serve_receive_faults: 'serveReceiveFaults',
2676
+ excellent_serve_receives: 'excellentServeReceives',
2677
+ serve_receive_percent: 'serveReceivePercent',
2678
+ points: 'points',
2679
+ faults: 'faults',
2680
+ newbie: 'newbie',
2681
+ },
2682
+ relation: {
2683
+ team: Team,
2684
+ teamUser: TeamUser,
2685
+ tournamentTeamUser: TournamentTeamUser,
2686
+ tournamentTeam: TournamentTeam,
2687
+ user: User,
2688
+ month: DateField,
2472
2689
  }
2473
2690
  })
2474
- ], GameTimelineStageItem);
2475
- let GameTimelineStages = class GameTimelineStages extends BaseModel {
2691
+ ], VolleyballStatistic);
2692
+
2693
+ var TeamPermissionTypes;
2694
+ (function (TeamPermissionTypes) {
2695
+ TeamPermissionTypes[TeamPermissionTypes["for_all"] = 1] = "for_all";
2696
+ TeamPermissionTypes[TeamPermissionTypes["for_users"] = 2] = "for_users";
2697
+ TeamPermissionTypes[TeamPermissionTypes["for_team"] = 3] = "for_team";
2698
+ })(TeamPermissionTypes || (TeamPermissionTypes = {}));
2699
+ let TeamPermission = class TeamPermission extends BaseModel {
2476
2700
  static toFront(data) { }
2477
2701
  static toBack(data) { }
2478
2702
  };
2479
2703
  __decorate([
2480
2704
  ToFrontHook
2481
- ], GameTimelineStages, "toFront", null);
2705
+ ], TeamPermission, "toFront", null);
2482
2706
  __decorate([
2483
2707
  ToBackHook
2484
- ], GameTimelineStages, "toBack", null);
2485
- GameTimelineStages = __decorate([
2708
+ ], TeamPermission, "toBack", null);
2709
+ TeamPermission = __decorate([
2486
2710
  ModelInstance({
2487
2711
  mappingFields: {
2488
- tours_count: 'toursCount',
2489
- playoff_stages_count: 'playoffStagesCount',
2490
- current_tour: 'currentTour',
2491
- current_playoff_stage: 'currentPlayoffStage',
2492
- stages: 'stages',
2493
- tournament_stage_id: 'tournamentStageId',
2712
+ players: 'players',
2713
+ games: 'games',
2714
+ statistic: 'statistic',
2715
+ polls: 'polls',
2716
+ events: 'events'
2494
2717
  },
2495
2718
  relation: {
2496
- stages: listField(GameTimelineStageItem)
2719
+ players: enumField(TeamPermissionTypes),
2720
+ games: enumField(TeamPermissionTypes),
2721
+ statistic: enumField(TeamPermissionTypes),
2722
+ polls: enumField(TeamPermissionTypes),
2723
+ events: enumField(TeamPermissionTypes)
2497
2724
  }
2498
2725
  })
2499
- ], GameTimelineStages);
2726
+ ], TeamPermission);
2500
2727
 
2501
- var TournamentStageStatuses;
2502
- (function (TournamentStageStatuses) {
2503
- TournamentStageStatuses[TournamentStageStatuses["open"] = 0] = "open";
2504
- TournamentStageStatuses[TournamentStageStatuses["in_progress"] = 1] = "in_progress";
2505
- TournamentStageStatuses[TournamentStageStatuses["closed"] = 2] = "closed";
2506
- })(TournamentStageStatuses || (TournamentStageStatuses = {}));
2507
- let TournamentStage = class TournamentStage extends BaseModel {
2728
+ let TeamAccess = class TeamAccess extends BaseModel {
2508
2729
  static toFront(data) { }
2509
2730
  static toBack(data) { }
2510
2731
  };
2511
2732
  __decorate([
2512
2733
  ToFrontHook
2513
- ], TournamentStage, "toFront", null);
2734
+ ], TeamAccess, "toFront", null);
2514
2735
  __decorate([
2515
2736
  ToBackHook
2516
- ], TournamentStage, "toBack", null);
2517
- TournamentStage = __decorate([
2737
+ ], TeamAccess, "toBack", null);
2738
+ TeamAccess = __decorate([
2518
2739
  ModelInstance({
2519
2740
  mappingFields: {
2520
- id: 'id',
2521
- name: 'name',
2522
- date: 'date',
2523
- tournament_id: 'tournamentId',
2524
- status: 'status',
2741
+ can_edit: 'canEdit',
2742
+ can_view_users: 'canViewUsers',
2743
+ can_manage_permission: 'canManagePermission',
2744
+ can_change_owner: 'canChangeOwner',
2745
+ can_delete: 'canDelete',
2746
+ can_manage_invites: 'canManageInvites',
2747
+ can_view_invites: 'canViewInvites',
2748
+ can_manage_polls: 'canManagePolls',
2749
+ can_view_polls: 'canViewPolls',
2750
+ can_answer_poll: 'canAnswerPoll',
2751
+ can_manage_games: 'canManageGames',
2752
+ can_view_games: 'canViewGames',
2753
+ can_view_statistic: 'canViewStatistic',
2754
+ can_promote_users: 'canPromoteUsers',
2755
+ can_edit_users: 'canEditUsers',
2756
+ can_delete_users: 'canDeleteUsers',
2757
+ can_view_events: 'canViewEvents',
2758
+ can_manage_events: 'canManageEvents',
2759
+ can_view_tournaments: 'canViewTournaments',
2760
+ can_manage_tournaments: 'canManageTournaments',
2761
+ role: 'role'
2525
2762
  },
2526
2763
  relation: {
2527
- date: DateField,
2528
- status: enumField(TournamentStageStatuses)
2764
+ role: enumField(TeamUserRole)
2529
2765
  }
2530
2766
  })
2531
- ], TournamentStage);
2767
+ ], TeamAccess);
2532
2768
 
2533
- function generateArray(length) {
2534
- if (length <= 0) {
2535
- return [];
2769
+ let TeamApi = class TeamApi {
2770
+ constructor(httpClient, configService) {
2771
+ this.httpClient = httpClient;
2772
+ this.configService = configService;
2536
2773
  }
2537
- return Array.apply(null, Array(length)).map((_, i) => i + 1);
2538
- }
2539
- function getArrayChunks(array, length) {
2540
- const chunks = [];
2541
- const chunkLength = Math.ceil(array.length / length);
2542
- if (chunkLength === 0) {
2543
- return [array];
2774
+ search(query, sportId) {
2775
+ return __awaiter(this, void 0, void 0, function* () {
2776
+ let params = (new HttpParams()).set('search', query);
2777
+ if (sportId) {
2778
+ params = params.set('sport', sportId.toString());
2779
+ }
2780
+ return this.httpClient
2781
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/`, { params })
2782
+ .pipe(map(data => Team.toFront(data)))
2783
+ .toPromise();
2784
+ });
2544
2785
  }
2545
- for (let i = 0; i < chunkLength; i++) {
2546
- chunks.push(array.slice(i * length, (i + 1) * length));
2786
+ create(team) {
2787
+ return __awaiter(this, void 0, void 0, function* () {
2788
+ return this.httpClient
2789
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/`, Team.toBack(team))
2790
+ .pipe(map(data => Team.toFront(data)))
2791
+ .toPromise();
2792
+ });
2547
2793
  }
2548
- return chunks;
2549
- }
2550
-
2551
- let PlayoffSettings = class PlayoffSettings extends BaseModel {
2552
- static toFront(data) { }
2553
- static toBack(data) { }
2554
- };
2555
- __decorate([
2556
- ToFrontHook
2557
- ], PlayoffSettings, "toFront", null);
2558
- __decorate([
2794
+ getById(teamId) {
2795
+ return __awaiter(this, void 0, void 0, function* () {
2796
+ return this.httpClient
2797
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/`)
2798
+ .pipe(map(data => Team.toFront(data)))
2799
+ .toPromise();
2800
+ });
2801
+ }
2802
+ getTeamAccess(teamId) {
2803
+ return __awaiter(this, void 0, void 0, function* () {
2804
+ return this.httpClient
2805
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/access/`)
2806
+ .pipe(map(data => TeamAccess.toFront(data)))
2807
+ .toPromise();
2808
+ });
2809
+ }
2810
+ update(teamId, values) {
2811
+ return __awaiter(this, void 0, void 0, function* () {
2812
+ return this.httpClient
2813
+ .patch(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/`, Team.toBack(values))
2814
+ .pipe(map(data => Team.toFront(data)))
2815
+ .toPromise();
2816
+ });
2817
+ }
2818
+ delete(team) {
2819
+ return __awaiter(this, void 0, void 0, function* () {
2820
+ return this.httpClient
2821
+ .delete(`${this.configService.get('apiUrl')}/api/v1/team/${team.id}/`)
2822
+ .toPromise();
2823
+ });
2824
+ }
2825
+ getPermission(teamId) {
2826
+ return __awaiter(this, void 0, void 0, function* () {
2827
+ return this.httpClient
2828
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/permission/`)
2829
+ .pipe(map(data => TeamPermission.toFront(data)))
2830
+ .toPromise();
2831
+ });
2832
+ }
2833
+ updatePermission(teamId, permission) {
2834
+ return __awaiter(this, void 0, void 0, function* () {
2835
+ return this.httpClient
2836
+ .patch(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/permission/`, TeamPermission.toBack(permission))
2837
+ .pipe(map(data => TeamPermission.toFront(data)))
2838
+ .toPromise();
2839
+ });
2840
+ }
2841
+ getUsers(teamId, tournamentId) {
2842
+ return __awaiter(this, void 0, void 0, function* () {
2843
+ let params = new HttpParams();
2844
+ if (tournamentId) {
2845
+ params = params.set('tournament_id', tournamentId.toString());
2846
+ }
2847
+ return this.httpClient
2848
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/users/`, { params })
2849
+ .pipe(map(data => TeamUser.toFront(data)))
2850
+ .toPromise();
2851
+ });
2852
+ }
2853
+ updateUserRole(teamId, teamUserId, role) {
2854
+ return __awaiter(this, void 0, void 0, function* () {
2855
+ return this.httpClient
2856
+ .patch(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/users/${teamUserId}/role/`, { role: TeamUserRole[role] })
2857
+ .pipe(map(data => TeamUser.toFront(data)))
2858
+ .toPromise();
2859
+ });
2860
+ }
2861
+ updateUserNumber(teamId, teamUserId, gameNumber) {
2862
+ return __awaiter(this, void 0, void 0, function* () {
2863
+ return this.httpClient
2864
+ .patch(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/users/${teamUserId}/number/`, { number: gameNumber.toString() })
2865
+ .pipe(map(data => TeamUser.toFront(data)))
2866
+ .toPromise();
2867
+ });
2868
+ }
2869
+ deleteUser(teamUser) {
2870
+ return __awaiter(this, void 0, void 0, function* () {
2871
+ return this.httpClient
2872
+ .delete(`${this.configService.get('apiUrl')}/api/v1/team/${teamUser.teamId}/users/${teamUser.id}/`)
2873
+ .toPromise();
2874
+ });
2875
+ }
2876
+ changeOwner(teamId, user) {
2877
+ return __awaiter(this, void 0, void 0, function* () {
2878
+ return this.httpClient
2879
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/owner/`, { id: user.id })
2880
+ .pipe(map(data => Team.toFront(data)))
2881
+ .toPromise();
2882
+ });
2883
+ }
2884
+ getInvites(teamId) {
2885
+ return __awaiter(this, void 0, void 0, function* () {
2886
+ return this.httpClient
2887
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/invites/`)
2888
+ .pipe(map(data => TeamInvite.toFront(data)))
2889
+ .toPromise();
2890
+ });
2891
+ }
2892
+ sendInvite(teamId, user) {
2893
+ return __awaiter(this, void 0, void 0, function* () {
2894
+ return this.httpClient
2895
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/invites/`, { user })
2896
+ .pipe(map(data => TeamInvite.toFront(data)))
2897
+ .toPromise();
2898
+ });
2899
+ }
2900
+ acceptInvite(invite) {
2901
+ return __awaiter(this, void 0, void 0, function* () {
2902
+ return this.httpClient
2903
+ .post(`${this.configService.get('apiUrl')}/api/v1/team_invite/${invite.id}/accept/`, {})
2904
+ .pipe(map(data => TeamInvite.toFront(data)))
2905
+ .toPromise();
2906
+ });
2907
+ }
2908
+ declineInvite(invite) {
2909
+ return __awaiter(this, void 0, void 0, function* () {
2910
+ return this.httpClient
2911
+ .post(`${this.configService.get('apiUrl')}/api/v1/team_invite/${invite.id}/decline/`, {})
2912
+ .pipe(map(data => TeamInvite.toFront(data)))
2913
+ .toPromise();
2914
+ });
2915
+ }
2916
+ resendInvite(invite) {
2917
+ return __awaiter(this, void 0, void 0, function* () {
2918
+ return this.httpClient
2919
+ .post(`${this.configService.get('apiUrl')}/api/v1/team_invite/${invite.id}/resend/`, {})
2920
+ .pipe(map(data => TeamInvite.toFront(data)))
2921
+ .toPromise();
2922
+ });
2923
+ }
2924
+ getInvitesExternal(teamId) {
2925
+ return __awaiter(this, void 0, void 0, function* () {
2926
+ return this.httpClient
2927
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/invites_external/`)
2928
+ .pipe(map(data => TeamInviteExternal.toFront(data)))
2929
+ .toPromise();
2930
+ });
2931
+ }
2932
+ sendInviteExternal(teamId, invite) {
2933
+ return __awaiter(this, void 0, void 0, function* () {
2934
+ return this.httpClient
2935
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/invites_external/`, TeamInviteExternal.toBack(invite))
2936
+ .pipe(map(data => TeamInviteExternal.toFront(data)))
2937
+ .toPromise();
2938
+ });
2939
+ }
2940
+ deleteInviteExternal(invite) {
2941
+ return __awaiter(this, void 0, void 0, function* () {
2942
+ return this.httpClient
2943
+ .delete(`${this.configService.get('apiUrl')}/api/v1/invites_external/${invite.id}/`)
2944
+ .toPromise();
2945
+ });
2946
+ }
2947
+ resendInviteExternal(invite) {
2948
+ return __awaiter(this, void 0, void 0, function* () {
2949
+ return this.httpClient
2950
+ .post(`${this.configService.get('apiUrl')}/api/v1/invites_external/${invite.id}/resend/`, {})
2951
+ .pipe(map(data => TeamInviteExternal.toFront(data)))
2952
+ .toPromise();
2953
+ });
2954
+ }
2955
+ getPolls(teamId, archive = false) {
2956
+ return __awaiter(this, void 0, void 0, function* () {
2957
+ return this.httpClient
2958
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/polls/${archive ? '?archive=1' : ''}`)
2959
+ .pipe(map(data => Poll.toFront(data)))
2960
+ .toPromise();
2961
+ });
2962
+ }
2963
+ createPoll(teamId, poll) {
2964
+ return __awaiter(this, void 0, void 0, function* () {
2965
+ return this.httpClient
2966
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/polls/`, Poll.toBack(poll))
2967
+ .pipe(map(data => Poll.toFront(data)))
2968
+ .toPromise();
2969
+ });
2970
+ }
2971
+ getUsersStatistic(teamId) {
2972
+ return __awaiter(this, void 0, void 0, function* () {
2973
+ return this.httpClient
2974
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/statistics/`)
2975
+ .pipe(map(data => BasketballStatistic.toFront(data)))
2976
+ .toPromise();
2977
+ });
2978
+ }
2979
+ getVolleyballStatistic(teamId) {
2980
+ return __awaiter(this, void 0, void 0, function* () {
2981
+ return this.httpClient
2982
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/volleyball_statistics/`)
2983
+ .pipe(map(data => VolleyballStatistic.toFront(data)))
2984
+ .toPromise();
2985
+ });
2986
+ }
2987
+ joinTeam(teamId) {
2988
+ return __awaiter(this, void 0, void 0, function* () {
2989
+ return this.httpClient
2990
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/join/`, {})
2991
+ .pipe(map(data => TeamInvite.toFront(data)))
2992
+ .toPromise();
2993
+ });
2994
+ }
2995
+ leaveTeam(teamId) {
2996
+ return __awaiter(this, void 0, void 0, function* () {
2997
+ return this.httpClient
2998
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/leave/`, {})
2999
+ .toPromise();
3000
+ });
3001
+ }
3002
+ getGames(teamId, archive = false) {
3003
+ return __awaiter(this, void 0, void 0, function* () {
3004
+ return this.httpClient
3005
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/games/${archive ? '?archive=1' : ''}`)
3006
+ .pipe(map(data => Game.toFront(data)))
3007
+ .toPromise();
3008
+ });
3009
+ }
3010
+ createGame(teamId, game) {
3011
+ return __awaiter(this, void 0, void 0, function* () {
3012
+ return this.httpClient
3013
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/games/`, Game.toBack(game))
3014
+ .pipe(map(data => Game.toFront(data)))
3015
+ .toPromise();
3016
+ });
3017
+ }
3018
+ getTeamEvents(teamId) {
3019
+ return __awaiter(this, void 0, void 0, function* () {
3020
+ return this.httpClient
3021
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/events/`)
3022
+ .pipe(map(data => TeamEvent.toFront(data)))
3023
+ .toPromise();
3024
+ });
3025
+ }
3026
+ createTeamEvent(teamId, teamEvent) {
3027
+ return __awaiter(this, void 0, void 0, function* () {
3028
+ return this.httpClient
3029
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/events/`, TeamEvent.toBack(teamEvent))
3030
+ .pipe(map(data => TeamEvent.toFront(data)))
3031
+ .toPromise();
3032
+ });
3033
+ }
3034
+ getTournaments(teamId) {
3035
+ return __awaiter(this, void 0, void 0, function* () {
3036
+ return this.httpClient
3037
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/tournaments/`)
3038
+ .pipe(map(data => Tournament.toFront(data)))
3039
+ .toPromise();
3040
+ });
3041
+ }
3042
+ getTournamentTeams(teamId) {
3043
+ return __awaiter(this, void 0, void 0, function* () {
3044
+ return this.httpClient
3045
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/tournament_teams/`)
3046
+ .pipe(map(data => TournamentTeam.toFront(data)))
3047
+ .toPromise();
3048
+ });
3049
+ }
3050
+ getTournamentInvites(teamId) {
3051
+ return __awaiter(this, void 0, void 0, function* () {
3052
+ return this.httpClient
3053
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/tournament_invites/`)
3054
+ .pipe(map(data => TournamentInvite.toFront(data)))
3055
+ .toPromise();
3056
+ });
3057
+ }
3058
+ getTournamentGames(teamId, tournamentId, page, size) {
3059
+ return __awaiter(this, void 0, void 0, function* () {
3060
+ let params = new HttpParams().set('page', page.toString());
3061
+ if (size) {
3062
+ params = params.set('size', size.toString());
3063
+ }
3064
+ return this.httpClient
3065
+ .get(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/tournaments/${tournamentId}/games/`, { params, observe: 'response' })
3066
+ .pipe(map((response) => {
3067
+ return {
3068
+ total: +response.headers.get('X-Page-Count'),
3069
+ data: Game.toFront(response.body)
3070
+ };
3071
+ }))
3072
+ .toPromise();
3073
+ });
3074
+ }
3075
+ acceptTournamentInvite(inviteId) {
3076
+ return __awaiter(this, void 0, void 0, function* () {
3077
+ return this.httpClient
3078
+ .post(`${this.configService.get('apiUrl')}/api/v1/tournament_invite/${inviteId}/accept/`, {})
3079
+ .pipe(map(data => TournamentInvite.toFront(data)))
3080
+ .toPromise();
3081
+ });
3082
+ }
3083
+ declineTournamentInvite(inviteId) {
3084
+ return __awaiter(this, void 0, void 0, function* () {
3085
+ return this.httpClient
3086
+ .post(`${this.configService.get('apiUrl')}/api/v1/tournament_invite/${inviteId}/decline/`, {})
3087
+ .pipe(map(data => TournamentInvite.toFront(data)))
3088
+ .toPromise();
3089
+ });
3090
+ }
3091
+ registerLazyUser(teamId, userData) {
3092
+ return __awaiter(this, void 0, void 0, function* () {
3093
+ return this.httpClient
3094
+ .post(`${this.configService.get('apiUrl')}/api/v1/team/${teamId}/lazy_user/`, { user: User.toBack(userData) })
3095
+ .pipe(map(data => TeamUser.toFront(data)))
3096
+ .toPromise();
3097
+ });
3098
+ }
3099
+ getLazyUser(teamUserId) {
3100
+ return __awaiter(this, void 0, void 0, function* () {
3101
+ return this.httpClient
3102
+ .get(`${this.configService.get('apiUrl')}/api/v1/lazy_user/${teamUserId}/`)
3103
+ .pipe(map(data => TeamUser.toFront(data)))
3104
+ .toPromise();
3105
+ });
3106
+ }
3107
+ updateLazyUser(teamUserId, userData) {
3108
+ return __awaiter(this, void 0, void 0, function* () {
3109
+ return this.httpClient
3110
+ .patch(`${this.configService.get('apiUrl')}/api/v1/lazy_user/${teamUserId}/`, { user: User.toBack(userData) })
3111
+ .pipe(map(data => TeamUser.toFront(data)))
3112
+ .toPromise();
3113
+ });
3114
+ }
3115
+ deleteLazyUser(teamUserId) {
3116
+ return __awaiter(this, void 0, void 0, function* () {
3117
+ return this.httpClient
3118
+ .delete(`${this.configService.get('apiUrl')}/api/v1/lazy_user/${teamUserId}/`)
3119
+ .toPromise();
3120
+ });
3121
+ }
3122
+ resendLazyUserEmail(teamUserId) {
3123
+ return __awaiter(this, void 0, void 0, function* () {
3124
+ return this.httpClient
3125
+ .post(`${this.configService.get('apiUrl')}/api/v1/lazy_user/${teamUserId}/resend_email/`, {})
3126
+ .toPromise();
3127
+ });
3128
+ }
3129
+ };
3130
+ TeamApi.ctorParameters = () => [
3131
+ { type: HttpClient },
3132
+ { type: ConfigService }
3133
+ ];
3134
+ TeamApi.ɵprov = ɵɵdefineInjectable({ factory: function TeamApi_Factory() { return new TeamApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: TeamApi, providedIn: "root" });
3135
+ TeamApi = __decorate([
3136
+ Injectable({ providedIn: 'root' })
3137
+ ], TeamApi);
3138
+
3139
+ let TeamEventApi = class TeamEventApi {
3140
+ constructor(httpClient, configService) {
3141
+ this.httpClient = httpClient;
3142
+ this.configService = configService;
3143
+ }
3144
+ getTeamEvent(teamEventId) {
3145
+ return __awaiter(this, void 0, void 0, function* () {
3146
+ return this.httpClient
3147
+ .get(`${this.configService.get('apiUrl')}/api/v1/team_event/${teamEventId}/`)
3148
+ .pipe(map(data => TeamEvent.toFront(data)))
3149
+ .toPromise();
3150
+ });
3151
+ }
3152
+ updateTeamEvent(teamEvent) {
3153
+ return __awaiter(this, void 0, void 0, function* () {
3154
+ return this.httpClient
3155
+ .patch(`${this.configService.get('apiUrl')}/api/v1/team_event/${teamEvent.id}/`, TeamEvent.toBack(teamEvent))
3156
+ .pipe(map(data => TeamEvent.toFront(data)))
3157
+ .toPromise();
3158
+ });
3159
+ }
3160
+ deleteTeamEvent(teamEventId) {
3161
+ return __awaiter(this, void 0, void 0, function* () {
3162
+ return this.httpClient
3163
+ .delete(`${this.configService.get('apiUrl')}/api/v1/team_event/${teamEventId}/`)
3164
+ .toPromise();
3165
+ });
3166
+ }
3167
+ getTeamEventInvites(teamEventId) {
3168
+ return __awaiter(this, void 0, void 0, function* () {
3169
+ return this.httpClient
3170
+ .get(`${this.configService.get('apiUrl')}/api/v1/team_event/${teamEventId}/invites/`)
3171
+ .pipe(map(data => TeamEventInvite.toFront(data)))
3172
+ .toPromise();
3173
+ });
3174
+ }
3175
+ createTeamEventInvite(teamEventId, teamUserId) {
3176
+ return __awaiter(this, void 0, void 0, function* () {
3177
+ return this.httpClient
3178
+ .post(`${this.configService.get('apiUrl')}/api/v1/team_event/${teamEventId}/invites/`, { team_user_id: teamUserId })
3179
+ .pipe(map(data => TeamEventInvite.toFront(data)))
3180
+ .toPromise();
3181
+ });
3182
+ }
3183
+ acceptTeamEventInvite(teamEventInvite) {
3184
+ return __awaiter(this, void 0, void 0, function* () {
3185
+ return this.httpClient
3186
+ .post(`${this.configService.get('apiUrl')}/api/v1/team_event_invite/${teamEventInvite.id}/accept/`, {})
3187
+ .pipe(map(data => TeamEventInvite.toFront(data)))
3188
+ .toPromise();
3189
+ });
3190
+ }
3191
+ declineTeamEventInvite(teamEventInvite) {
3192
+ return __awaiter(this, void 0, void 0, function* () {
3193
+ return this.httpClient
3194
+ .post(`${this.configService.get('apiUrl')}/api/v1/team_event_invite/${teamEventInvite.id}/decline/`, {})
3195
+ .pipe(map(data => TeamEventInvite.toFront(data)))
3196
+ .toPromise();
3197
+ });
3198
+ }
3199
+ };
3200
+ TeamEventApi.ctorParameters = () => [
3201
+ { type: HttpClient },
3202
+ { type: ConfigService }
3203
+ ];
3204
+ TeamEventApi.ɵprov = ɵɵdefineInjectable({ factory: function TeamEventApi_Factory() { return new TeamEventApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: TeamEventApi, providedIn: "root" });
3205
+ TeamEventApi = __decorate([
3206
+ Injectable({ providedIn: 'root' })
3207
+ ], TeamEventApi);
3208
+
3209
+ let TournamentNews = class TournamentNews extends BaseModel {
3210
+ static toFront(data) { }
3211
+ static toBack(data) { }
3212
+ };
3213
+ __decorate([
3214
+ ToFrontHook
3215
+ ], TournamentNews, "toFront", null);
3216
+ __decorate([
2559
3217
  ToBackHook
2560
- ], PlayoffSettings, "toBack", null);
2561
- PlayoffSettings = __decorate([
3218
+ ], TournamentNews, "toBack", null);
3219
+ TournamentNews = __decorate([
2562
3220
  ModelInstance({
2563
3221
  mappingFields: {
2564
- rounds: 'rounds',
2565
- final_rounds: 'finalRounds',
2566
- third_place_rounds: 'thirdPlaceRounds',
2567
- teams_count: 'teamsCount'
3222
+ id: 'id',
3223
+ title: 'title',
3224
+ picture: 'picture',
3225
+ text: 'text',
3226
+ author: 'author',
3227
+ created_at: 'createdAt',
3228
+ },
3229
+ relation: {
3230
+ picture: File,
3231
+ author: User,
3232
+ createdAt: DateTimeField,
2568
3233
  }
2569
3234
  })
2570
- ], PlayoffSettings);
2571
- let Playoff = class Playoff extends BaseModel {
2572
- constructor() {
2573
- super(...arguments);
2574
- this.stages = [];
2575
- }
3235
+ ], TournamentNews);
3236
+
3237
+ let GameTimelineStageItem = class GameTimelineStageItem {
2576
3238
  static toFront(data) { }
2577
3239
  static toBack(data) { }
2578
- get stagesCount() {
2579
- return Math.log(this.settings.teamsCount) / Math.log(2);
2580
- }
2581
- getPlayoffStages() {
2582
- if (this.stages.length === 0 && this.settings.teamsCount) {
2583
- const stagesCount = Math.log(this.settings.teamsCount) / Math.log(2);
2584
- this.stages = generateArray(stagesCount).map(stage => {
2585
- const playoffStage = this.settings.teamsCount / Math.pow(2, stage);
2586
- let title = '';
2587
- if (playoffStage === 1) {
2588
- title = 'Финал';
2589
- }
2590
- else {
2591
- title = `1 / ${playoffStage}`;
2592
- }
2593
- return {
2594
- value: stage,
2595
- title
2596
- };
2597
- });
3240
+ };
3241
+ __decorate([
3242
+ ToFrontHook
3243
+ ], GameTimelineStageItem, "toFront", null);
3244
+ __decorate([
3245
+ ToBackHook
3246
+ ], GameTimelineStageItem, "toBack", null);
3247
+ GameTimelineStageItem = __decorate([
3248
+ ModelInstance({
3249
+ mappingFields: {
3250
+ stage_id: 'stageId',
3251
+ tours_count: 'toursCount',
3252
+ playoff_stages_count: 'playoffStagesCount',
2598
3253
  }
2599
- return this.stages;
2600
- }
3254
+ })
3255
+ ], GameTimelineStageItem);
3256
+ let GameTimelineStages = class GameTimelineStages extends BaseModel {
3257
+ static toFront(data) { }
3258
+ static toBack(data) { }
2601
3259
  };
2602
3260
  __decorate([
2603
3261
  ToFrontHook
2604
- ], Playoff, "toFront", null);
3262
+ ], GameTimelineStages, "toFront", null);
2605
3263
  __decorate([
2606
3264
  ToBackHook
2607
- ], Playoff, "toBack", null);
2608
- Playoff = __decorate([
3265
+ ], GameTimelineStages, "toBack", null);
3266
+ GameTimelineStages = __decorate([
3267
+ ModelInstance({
3268
+ mappingFields: {
3269
+ tours_count: 'toursCount',
3270
+ playoff_stages_count: 'playoffStagesCount',
3271
+ current_tour: 'currentTour',
3272
+ current_playoff_stage: 'currentPlayoffStage',
3273
+ stages: 'stages',
3274
+ tournament_stage_id: 'tournamentStageId',
3275
+ },
3276
+ relation: {
3277
+ stages: listField(GameTimelineStageItem)
3278
+ }
3279
+ })
3280
+ ], GameTimelineStages);
3281
+
3282
+ var TournamentStageStatuses;
3283
+ (function (TournamentStageStatuses) {
3284
+ TournamentStageStatuses[TournamentStageStatuses["open"] = 0] = "open";
3285
+ TournamentStageStatuses[TournamentStageStatuses["in_progress"] = 1] = "in_progress";
3286
+ TournamentStageStatuses[TournamentStageStatuses["closed"] = 2] = "closed";
3287
+ })(TournamentStageStatuses || (TournamentStageStatuses = {}));
3288
+ let TournamentStage = class TournamentStage extends BaseModel {
3289
+ static toFront(data) { }
3290
+ static toBack(data) { }
3291
+ };
3292
+ __decorate([
3293
+ ToFrontHook
3294
+ ], TournamentStage, "toFront", null);
3295
+ __decorate([
3296
+ ToBackHook
3297
+ ], TournamentStage, "toBack", null);
3298
+ TournamentStage = __decorate([
2609
3299
  ModelInstance({
2610
3300
  mappingFields: {
2611
3301
  id: 'id',
2612
3302
  name: 'name',
2613
- settings: 'settings',
3303
+ date: 'date',
2614
3304
  tournament_id: 'tournamentId',
2615
- tournament_stage_id: 'tournamentStageId',
2616
- is_official: 'isOfficial'
3305
+ status: 'status',
2617
3306
  },
2618
3307
  relation: {
2619
- settings: PlayoffSettings
3308
+ date: DateField,
3309
+ status: enumField(TournamentStageStatuses)
2620
3310
  }
2621
3311
  })
2622
- ], Playoff);
3312
+ ], TournamentStage);
2623
3313
 
2624
- let VolleyballStatistic = class VolleyballStatistic extends BaseModel {
3314
+ function generateArray(length) {
3315
+ if (length <= 0) {
3316
+ return [];
3317
+ }
3318
+ return Array.apply(null, Array(length)).map((_, i) => i + 1);
3319
+ }
3320
+ function getArrayChunks(array, length) {
3321
+ const chunks = [];
3322
+ const chunkLength = Math.ceil(array.length / length);
3323
+ if (chunkLength === 0) {
3324
+ return [array];
3325
+ }
3326
+ for (let i = 0; i < chunkLength; i++) {
3327
+ chunks.push(array.slice(i * length, (i + 1) * length));
3328
+ }
3329
+ return chunks;
3330
+ }
3331
+
3332
+ let PlayoffSettings = class PlayoffSettings extends BaseModel {
2625
3333
  static toFront(data) { }
2626
3334
  static toBack(data) { }
2627
3335
  };
2628
3336
  __decorate([
2629
3337
  ToFrontHook
2630
- ], VolleyballStatistic, "toFront", null);
3338
+ ], PlayoffSettings, "toFront", null);
2631
3339
  __decorate([
2632
3340
  ToBackHook
2633
- ], VolleyballStatistic, "toBack", null);
2634
- VolleyballStatistic = __decorate([
3341
+ ], PlayoffSettings, "toBack", null);
3342
+ PlayoffSettings = __decorate([
2635
3343
  ModelInstance({
2636
3344
  mappingFields: {
2637
- team: 'team',
2638
- team_user: 'teamUser',
2639
- tournament_team_user: 'tournamentTeamUser',
2640
- tournament_team: 'tournamentTeam',
2641
- user: 'user',
2642
- month: 'month',
2643
- win_lose: 'winLose',
2644
- games_count: 'gamesCount',
2645
- won_games_count: 'wonGamesCount',
2646
- serve_hits: 'serveHits',
2647
- serve_faults: 'serveFaults',
2648
- serve_aces: 'serveAces',
2649
- serve_percent: 'servePercent',
2650
- ace_percent: 'acePercent',
2651
- stuff_blocks: 'stuffBlocks',
2652
- block_faults: 'blockFaults',
2653
- block_rebounds: 'blockRebounds',
2654
- block_percent: 'blockPercent',
2655
- attack_spikes: 'attackSpikes',
2656
- attack_faults: 'attackFaults',
2657
- attack_shots: 'attackShots',
2658
- attack_percent: 'attackPercent',
2659
- receives: 'receives',
2660
- receive_faults: 'receiveFaults',
2661
- excellent_receives: 'excellentReceives',
2662
- receive_percent: 'receivePercent',
2663
- serve_receives: 'serveReceives',
2664
- serve_receive_faults: 'serveReceiveFaults',
2665
- excellent_serve_receives: 'excellentServeReceives',
2666
- serve_receive_percent: 'serveReceivePercent',
2667
- points: 'points',
2668
- faults: 'faults',
2669
- newbie: 'newbie',
3345
+ rounds: 'rounds',
3346
+ final_rounds: 'finalRounds',
3347
+ third_place_rounds: 'thirdPlaceRounds',
3348
+ teams_count: 'teamsCount'
3349
+ }
3350
+ })
3351
+ ], PlayoffSettings);
3352
+ let Playoff = class Playoff extends BaseModel {
3353
+ constructor() {
3354
+ super(...arguments);
3355
+ this.stages = [];
3356
+ }
3357
+ static toFront(data) { }
3358
+ static toBack(data) { }
3359
+ get stagesCount() {
3360
+ return Math.log(this.settings.teamsCount) / Math.log(2);
3361
+ }
3362
+ getPlayoffStages() {
3363
+ if (this.stages.length === 0 && this.settings.teamsCount) {
3364
+ const stagesCount = Math.log(this.settings.teamsCount) / Math.log(2);
3365
+ this.stages = generateArray(stagesCount).map(stage => {
3366
+ const playoffStage = this.settings.teamsCount / Math.pow(2, stage);
3367
+ let title = '';
3368
+ if (playoffStage === 1) {
3369
+ title = 'Финал';
3370
+ }
3371
+ else {
3372
+ title = `1 / ${playoffStage}`;
3373
+ }
3374
+ return {
3375
+ value: stage,
3376
+ title
3377
+ };
3378
+ });
3379
+ }
3380
+ return this.stages;
3381
+ }
3382
+ };
3383
+ __decorate([
3384
+ ToFrontHook
3385
+ ], Playoff, "toFront", null);
3386
+ __decorate([
3387
+ ToBackHook
3388
+ ], Playoff, "toBack", null);
3389
+ Playoff = __decorate([
3390
+ ModelInstance({
3391
+ mappingFields: {
3392
+ id: 'id',
3393
+ name: 'name',
3394
+ settings: 'settings',
3395
+ tournament_id: 'tournamentId',
3396
+ tournament_stage_id: 'tournamentStageId',
3397
+ is_official: 'isOfficial'
2670
3398
  },
2671
3399
  relation: {
2672
- team: Team,
2673
- teamUser: TeamUser,
2674
- tournamentTeamUser: TournamentTeamUser,
2675
- tournamentTeam: TournamentTeam,
2676
- user: User,
2677
- month: DateField,
3400
+ settings: PlayoffSettings
2678
3401
  }
2679
3402
  })
2680
- ], VolleyballStatistic);
3403
+ ], Playoff);
2681
3404
 
2682
3405
  let TournamentStageTeam = class TournamentStageTeam extends BaseModel {
2683
3406
  get gamesWonPercent() {
@@ -3016,6 +3739,324 @@ TournamentStageApi = __decorate([
3016
3739
  Injectable({ providedIn: 'root' })
3017
3740
  ], TournamentStageApi);
3018
3741
 
3742
+ let UserAccess = class UserAccess extends BaseModel {
3743
+ static toFront(data) { }
3744
+ static toBack(data) { }
3745
+ };
3746
+ __decorate([
3747
+ ToFrontHook
3748
+ ], UserAccess, "toFront", null);
3749
+ __decorate([
3750
+ ToBackHook
3751
+ ], UserAccess, "toBack", null);
3752
+ UserAccess = __decorate([
3753
+ ModelInstance({
3754
+ mappingFields: {
3755
+ edit: 'edit',
3756
+ personal_data: 'personalData',
3757
+ teams: 'teams',
3758
+ statistic: 'statistic',
3759
+ games: 'games'
3760
+ }
3761
+ })
3762
+ ], UserAccess);
3763
+
3764
+ var UserPermissionTypes;
3765
+ (function (UserPermissionTypes) {
3766
+ UserPermissionTypes[UserPermissionTypes["denied"] = 1] = "denied";
3767
+ UserPermissionTypes[UserPermissionTypes["for_all"] = 2] = "for_all";
3768
+ UserPermissionTypes[UserPermissionTypes["for_users"] = 3] = "for_users";
3769
+ UserPermissionTypes[UserPermissionTypes["for_team"] = 4] = "for_team";
3770
+ })(UserPermissionTypes || (UserPermissionTypes = {}));
3771
+ let UserPermission = class UserPermission extends BaseModel {
3772
+ static toFront(data) { }
3773
+ static toBack(data) { }
3774
+ };
3775
+ __decorate([
3776
+ ToFrontHook
3777
+ ], UserPermission, "toFront", null);
3778
+ __decorate([
3779
+ ToBackHook
3780
+ ], UserPermission, "toBack", null);
3781
+ UserPermission = __decorate([
3782
+ ModelInstance({
3783
+ mappingFields: {
3784
+ id: 'id',
3785
+ personal_data: 'personalData',
3786
+ games: 'games',
3787
+ teams: 'teams',
3788
+ statistic: 'statistic'
3789
+ },
3790
+ relation: {
3791
+ personalData: enumField(UserPermissionTypes),
3792
+ games: enumField(UserPermissionTypes),
3793
+ teams: enumField(UserPermissionTypes),
3794
+ statistic: enumField(UserPermissionTypes)
3795
+ }
3796
+ })
3797
+ ], UserPermission);
3798
+
3799
+ let UserApi = class UserApi {
3800
+ constructor(httpClient, configService) {
3801
+ this.httpClient = httpClient;
3802
+ this.configService = configService;
3803
+ }
3804
+ getCurrentUser() {
3805
+ return __awaiter(this, void 0, void 0, function* () {
3806
+ return this.httpClient
3807
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/current/`)
3808
+ .pipe(map(data => User.toFront(data)))
3809
+ .toPromise();
3810
+ });
3811
+ }
3812
+ getUserById(userId) {
3813
+ return __awaiter(this, void 0, void 0, function* () {
3814
+ return this.httpClient
3815
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/`)
3816
+ .pipe(map(data => User.toFront(data)))
3817
+ .toPromise();
3818
+ });
3819
+ }
3820
+ getAccess(userId) {
3821
+ return __awaiter(this, void 0, void 0, function* () {
3822
+ return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/user/${userId || 'current'}/access/`)
3823
+ .pipe(map(data => UserAccess.toFront(data)))
3824
+ .toPromise();
3825
+ });
3826
+ }
3827
+ updateUser(userId, data) {
3828
+ return __awaiter(this, void 0, void 0, function* () {
3829
+ return this.httpClient
3830
+ .patch(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/`, User.toBack(data))
3831
+ .pipe(map(result => User.toFront(result)))
3832
+ .toPromise();
3833
+ });
3834
+ }
3835
+ updateUserPhoto(file, filename) {
3836
+ return __awaiter(this, void 0, void 0, function* () {
3837
+ const formData = new FormData();
3838
+ formData.append('file', file, filename);
3839
+ return this.httpClient
3840
+ .post(`${this.configService.get('apiUrl')}/api/v1/user/current/photo/`, formData)
3841
+ .pipe(map(data => File.toFront(data)))
3842
+ .toPromise();
3843
+ });
3844
+ }
3845
+ changePassword(userId, oldPassword, password, passwordConfirm) {
3846
+ return __awaiter(this, void 0, void 0, function* () {
3847
+ const payload = {
3848
+ old_password: oldPassword,
3849
+ password,
3850
+ password_confirm: passwordConfirm
3851
+ };
3852
+ return this.httpClient
3853
+ .post(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/change_password/`, payload)
3854
+ .toPromise();
3855
+ });
3856
+ }
3857
+ changeEmail(userId, email, password) {
3858
+ return __awaiter(this, void 0, void 0, function* () {
3859
+ const payload = { email, password };
3860
+ return this.httpClient
3861
+ .post(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/change_email/`, payload)
3862
+ .toPromise();
3863
+ });
3864
+ }
3865
+ changeEmailConfirm(userId, email, password, token) {
3866
+ return __awaiter(this, void 0, void 0, function* () {
3867
+ const payload = { email, password, token };
3868
+ return this.httpClient
3869
+ .post(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/change_email_confirm/`, payload)
3870
+ .toPromise();
3871
+ });
3872
+ }
3873
+ getUserProfile(userId) {
3874
+ return __awaiter(this, void 0, void 0, function* () {
3875
+ return this.httpClient
3876
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/profile/`)
3877
+ .pipe(map(data => UserProfile.toFront(data)))
3878
+ .toPromise();
3879
+ });
3880
+ }
3881
+ getBasketballProfile(userId) {
3882
+ return __awaiter(this, void 0, void 0, function* () {
3883
+ return this.httpClient
3884
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/basketball_profile/`)
3885
+ .pipe(map(data => BasketballProfile.toFront(data)))
3886
+ .toPromise();
3887
+ });
3888
+ }
3889
+ getVolleyballProfile(userId) {
3890
+ return __awaiter(this, void 0, void 0, function* () {
3891
+ return this.httpClient
3892
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/volleyball_profile/`)
3893
+ .pipe(map(data => VolleyballProfile.toFront(data)))
3894
+ .toPromise();
3895
+ });
3896
+ }
3897
+ updateUserProfile(userProfile) {
3898
+ return __awaiter(this, void 0, void 0, function* () {
3899
+ return this.httpClient
3900
+ .patch(`${this.configService.get('apiUrl')}/api/v1/user/${userProfile.userId}/profile/`, UserProfile.toBack(userProfile))
3901
+ .pipe(map(data => UserProfile.toFront(data)))
3902
+ .toPromise();
3903
+ });
3904
+ }
3905
+ updateUserBasketballProfile(basketballProfile) {
3906
+ return __awaiter(this, void 0, void 0, function* () {
3907
+ return this.httpClient
3908
+ .patch(`${this.configService.get('apiUrl')}/api/v1/user/${basketballProfile.userId}/basketball_profile/`, BasketballProfile.toBack(basketballProfile))
3909
+ .pipe(map(data => BasketballProfile.toFront(data)))
3910
+ .toPromise();
3911
+ });
3912
+ }
3913
+ updateUserVolleyballProfile(volleyballProfile) {
3914
+ return __awaiter(this, void 0, void 0, function* () {
3915
+ return this.httpClient
3916
+ .patch(`${this.configService.get('apiUrl')}/api/v1/user/${volleyballProfile.userId}/volleyball_profile/`, VolleyballProfile.toBack(volleyballProfile))
3917
+ .pipe(map(data => VolleyballProfile.toFront(data)))
3918
+ .toPromise();
3919
+ });
3920
+ }
3921
+ getUserPermissions(userId) {
3922
+ return __awaiter(this, void 0, void 0, function* () {
3923
+ return this.httpClient
3924
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId || 'current'}/permission/`)
3925
+ .pipe(map(data => UserPermission.toFront(data)))
3926
+ .toPromise();
3927
+ });
3928
+ }
3929
+ updateUserPermission(data) {
3930
+ return __awaiter(this, void 0, void 0, function* () {
3931
+ return this.httpClient
3932
+ .patch(`${this.configService.get('apiUrl')}/api/v1/user/current/permission/`, UserPermission.toBack(data))
3933
+ .pipe(map(result => UserPermission.toFront(result)))
3934
+ .toPromise();
3935
+ });
3936
+ }
3937
+ getTeams(userId) {
3938
+ return __awaiter(this, void 0, void 0, function* () {
3939
+ return this.httpClient
3940
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/teams/`)
3941
+ .pipe(map(data => Team.toFront(data)))
3942
+ .toPromise();
3943
+ });
3944
+ }
3945
+ getInvites() {
3946
+ return __awaiter(this, void 0, void 0, function* () {
3947
+ return this.httpClient
3948
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/current/invites/`)
3949
+ .pipe(map(data => TeamInvite.toFront(data)))
3950
+ .toPromise();
3951
+ });
3952
+ }
3953
+ acceptInvite(inviteId) {
3954
+ return __awaiter(this, void 0, void 0, function* () {
3955
+ return this.httpClient
3956
+ .post(`${this.configService.get('apiUrl')}/api/v1/user/current/invites/${inviteId}/accept/`, {})
3957
+ .pipe(map(data => TeamInvite.toFront(data)))
3958
+ .toPromise();
3959
+ });
3960
+ }
3961
+ declineInvite(inviteId) {
3962
+ return __awaiter(this, void 0, void 0, function* () {
3963
+ return this.httpClient
3964
+ .post(`${this.configService.get('apiUrl')}/api/v1/user/current/invites/${inviteId}/decline/`, {})
3965
+ .pipe(map(data => TeamInvite.toFront(data)))
3966
+ .toPromise();
3967
+ });
3968
+ }
3969
+ getStatistics(userId) {
3970
+ return __awaiter(this, void 0, void 0, function* () {
3971
+ return this.httpClient
3972
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/statistics/`)
3973
+ .pipe(map(data => BasketballStatistic.toFront(data)))
3974
+ .toPromise();
3975
+ });
3976
+ }
3977
+ getStreetballStatistics(userId) {
3978
+ return __awaiter(this, void 0, void 0, function* () {
3979
+ return this.httpClient
3980
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/streetball_statistics/`)
3981
+ .pipe(map(data => BasketballStatistic.toFront(data)))
3982
+ .toPromise();
3983
+ });
3984
+ }
3985
+ getVolleyballStatistic(userId) {
3986
+ return __awaiter(this, void 0, void 0, function* () {
3987
+ return this.httpClient
3988
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/volleyball_statistics/`)
3989
+ .pipe(map(data => VolleyballStatistic.toFront(data)))
3990
+ .toPromise();
3991
+ });
3992
+ }
3993
+ getGames(userId) {
3994
+ return __awaiter(this, void 0, void 0, function* () {
3995
+ return this.httpClient
3996
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/${userId}/games/`)
3997
+ .pipe(map(data => Game.toFront(data)))
3998
+ .toPromise();
3999
+ });
4000
+ }
4001
+ getGameInvites() {
4002
+ return __awaiter(this, void 0, void 0, function* () {
4003
+ return this.httpClient
4004
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/current/game_invites/`)
4005
+ .pipe(map(data => GameInvite.toFront(data)))
4006
+ .toPromise();
4007
+ });
4008
+ }
4009
+ acceptGameInvite(inviteId) {
4010
+ return __awaiter(this, void 0, void 0, function* () {
4011
+ return this.httpClient
4012
+ .post(`${this.configService.get('apiUrl')}/api/v1/user/current/game_invites/${inviteId}/accept/`, {})
4013
+ .pipe(map(data => GameInvite.toFront(data)))
4014
+ .toPromise();
4015
+ });
4016
+ }
4017
+ declineGameInvite(inviteId) {
4018
+ return __awaiter(this, void 0, void 0, function* () {
4019
+ return this.httpClient
4020
+ .post(`${this.configService.get('apiUrl')}/api/v1/user/current/game_invites/${inviteId}/decline/`, {})
4021
+ .pipe(map(data => GameInvite.toFront(data)))
4022
+ .toPromise();
4023
+ });
4024
+ }
4025
+ searchUsers(query) {
4026
+ return __awaiter(this, void 0, void 0, function* () {
4027
+ const params = (new HttpParams()).set('search', query);
4028
+ return this.httpClient
4029
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/`, { params })
4030
+ .pipe(map(data => User.toFront(data)))
4031
+ .toPromise();
4032
+ });
4033
+ }
4034
+ setWizardShowed(wizard) {
4035
+ return __awaiter(this, void 0, void 0, function* () {
4036
+ return this.httpClient
4037
+ .put(`${this.configService.get('apiUrl')}/api/v1/user/current/wizards/`, { wizard })
4038
+ .pipe(map(data => User.toFront(data)))
4039
+ .toPromise();
4040
+ });
4041
+ }
4042
+ getTeamEvents(userId) {
4043
+ return __awaiter(this, void 0, void 0, function* () {
4044
+ return this.httpClient
4045
+ .get(`${this.configService.get('apiUrl')}/api/v1/user/current/team_events/`)
4046
+ .pipe(map(data => TeamEvent.toFront(data)))
4047
+ .toPromise();
4048
+ });
4049
+ }
4050
+ };
4051
+ UserApi.ctorParameters = () => [
4052
+ { type: HttpClient },
4053
+ { type: ConfigService }
4054
+ ];
4055
+ UserApi.ɵprov = ɵɵdefineInjectable({ factory: function UserApi_Factory() { return new UserApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: UserApi, providedIn: "root" });
4056
+ UserApi = __decorate([
4057
+ Injectable({ providedIn: 'root' })
4058
+ ], UserApi);
4059
+
3019
4060
  let VolleyballGameTeamStatistic = class VolleyballGameTeamStatistic extends BaseModel {
3020
4061
  static toFront(data) { }
3021
4062
  static toBack(data) { }
@@ -3367,28 +4408,6 @@ const VolleyballGameLogTypeLocalization = {
3367
4408
  [VolleyballGameLogType.timeout]: 'Таймаут',
3368
4409
  };
3369
4410
 
3370
- let TeamInviteExternal = class TeamInviteExternal extends BaseModel {
3371
- static toFront(data) { }
3372
- static toBack(data) { }
3373
- };
3374
- __decorate([
3375
- ToFrontHook
3376
- ], TeamInviteExternal, "toFront", null);
3377
- __decorate([
3378
- ToBackHook
3379
- ], TeamInviteExternal, "toBack", null);
3380
- TeamInviteExternal = __decorate([
3381
- ModelInstance({
3382
- mappingFields: {
3383
- id: 'id',
3384
- team_id: 'teamId',
3385
- email: 'email',
3386
- first_name: 'firstName',
3387
- last_name: 'lastName',
3388
- },
3389
- })
3390
- ], TeamInviteExternal);
3391
-
3392
4411
  let CentrifugoService = class CentrifugoService {
3393
4412
  constructor(httpClient, configService) {
3394
4413
  this.httpClient = httpClient;
@@ -3744,5 +4763,5 @@ HttpCookieInterceptor = __decorate([
3744
4763
  * Generated bundle index. Do not edit.
3745
4764
  */
3746
4765
 
3747
- export { BaseModel, BaseService, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameTeamStatistic, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, CONFIG_DATA, CentrifugoService, City, ConfigService, DateField, DateTimeField, FAULT_LOG_TYPES, File, FileEngine, Game, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameStatuses, GameTimelineStageItem, GameTimelineStages, GameUser, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, HttpCookieInterceptor, League, LeagueApi, LeagueCourt, LocalStorageEngine, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, Poll, PollAnswer, PollStatuses, PollVariant, ReferenceApi, SCORE_LOG_TYPES, Sport, SportTypes, StorageEngine, StorageEngineField, Store, Team, TeamEvent, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamUser, TeamUserRole, TeamUserRoleLocalization, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamUser, TournamentTeamUserInvite, TournamentTeamWinner, TournamentTypes, UntilDestroy, User, UserGender, UserProfile, VolleyballGameApi, VolleyballGameConfig, VolleyballGameLog, VolleyballGameLogType, VolleyballGameLogTypeLocalization, VolleyballGameStatistic, VolleyballGameTeamStatistic, VolleyballGameTypes, VolleyballProfile, VolleyballStatistic, 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 };
4766
+ export { BaseModel, BaseService, 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, Game, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameStatuses, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, HttpCookieInterceptor, League, LeagueApi, LeagueCourt, LeagueNews, LeagueNewsApi, LocalStorageEngine, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, 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, 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, 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 };
3748
4767
  //# sourceMappingURL=mtgame-core.js.map