@mtgame/core 0.2.68 → 0.2.69

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.
@@ -1099,6 +1099,10 @@ var WaterpoloStatisticTypes;
1099
1099
  WaterpoloStatisticTypes[WaterpoloStatisticTypes["standard"] = 1] = "standard";
1100
1100
  WaterpoloStatisticTypes[WaterpoloStatisticTypes["light"] = 2] = "light";
1101
1101
  })(WaterpoloStatisticTypes || (WaterpoloStatisticTypes = {}));
1102
+ var WrestballStatisticTypes;
1103
+ (function (WrestballStatisticTypes) {
1104
+ WrestballStatisticTypes[WrestballStatisticTypes["standard"] = 1] = "standard";
1105
+ })(WrestballStatisticTypes || (WrestballStatisticTypes = {}));
1102
1106
  var GameTimeTypes;
1103
1107
  (function (GameTimeTypes) {
1104
1108
  GameTimeTypes[GameTimeTypes["clean"] = 1] = "clean";
@@ -5746,6 +5750,120 @@ TournamentRound = __decorate([
5746
5750
  })
5747
5751
  ], TournamentRound);
5748
5752
 
5753
+ let WrestballStatistic = class WrestballStatistic extends BaseModel {
5754
+ get totalFouls() {
5755
+ return Math.floor(10 * ((this.personalFouls || 0))) / 10;
5756
+ }
5757
+ get gameMinutes() {
5758
+ return Math.floor(this.gameTime / 60);
5759
+ }
5760
+ get tournamentTeamPoints() {
5761
+ return this.tournamentTeam && this.tournamentTeam.points;
5762
+ }
5763
+ get onePointsPercent() {
5764
+ if (!this.onePointsMade || !this.onePointAttempts) {
5765
+ return 0;
5766
+ }
5767
+ return Math.round(1000 * this.onePointsMade / this.onePointAttempts) / 10;
5768
+ }
5769
+ get twoPointsPercent() {
5770
+ if (!this.twoPointsMade || !this.twoPointAttempts) {
5771
+ return 0;
5772
+ }
5773
+ return Math.round(1000 * this.twoPointsMade / this.twoPointAttempts) / 10;
5774
+ }
5775
+ get threePointsPercent() {
5776
+ if (!this.threePointsMade || !this.threePointAttempts) {
5777
+ return 0;
5778
+ }
5779
+ return Math.round(1000 * this.threePointsMade / this.threePointAttempts) / 10;
5780
+ }
5781
+ get freeThrowsPercent() {
5782
+ if (!this.freeThrowsMade || !this.freeThrowAttempts) {
5783
+ return 0;
5784
+ }
5785
+ return Math.round(1000 * this.freeThrowsMade / this.freeThrowAttempts) / 10;
5786
+ }
5787
+ get totalRebounds() {
5788
+ return Math.floor(10 * ((this.offensiveRebounds || 0) + (this.defensiveRebounds || 0))) / 10;
5789
+ }
5790
+ static toFront(data) { }
5791
+ static toBack(data) { }
5792
+ };
5793
+ __decorate([
5794
+ ToFrontHook
5795
+ ], WrestballStatistic, "toFront", null);
5796
+ __decorate([
5797
+ ToBackHook
5798
+ ], WrestballStatistic, "toBack", null);
5799
+ WrestballStatistic = __decorate([
5800
+ ModelInstance({
5801
+ mappingFields: {
5802
+ league_player: 'leaguePlayer',
5803
+ tournament_team_user: 'tournamentTeamUser',
5804
+ team: 'team',
5805
+ team_user: 'teamUser',
5806
+ user: 'user',
5807
+ tournament_team: 'tournamentTeam',
5808
+ month: 'month',
5809
+ win_lose: 'winLose',
5810
+ games_count: 'gamesCount',
5811
+ won_games_count: 'wonGamesCount',
5812
+ team_score_sum: 'teamScoreSum',
5813
+ team_missed_sum: 'teamMissedSum',
5814
+ tournament_points: 'tournamentPoints',
5815
+ points: 'points',
5816
+ two_points_made: 'twoPointsMade',
5817
+ three_points_made: 'threePointsMade',
5818
+ free_throws_made: 'freeThrowsMade',
5819
+ one_points_made: 'onePointsMade',
5820
+ two_point_attempts: 'twoPointAttempts',
5821
+ three_point_attempts: 'threePointAttempts',
5822
+ free_throw_attempts: 'freeThrowAttempts',
5823
+ one_point_attempts: 'onePointAttempts',
5824
+ two_point_percent: 'twoPointPercent',
5825
+ three_point_percent: 'threePointPercent',
5826
+ free_throw_percent: 'freeThrowPercent',
5827
+ one_point_percent: 'onePointPercent',
5828
+ assists: 'assists',
5829
+ blocks: 'blocks',
5830
+ rebounds: 'rebounds',
5831
+ offensive_rebounds: 'offensiveRebounds',
5832
+ defensive_rebounds: 'defensiveRebounds',
5833
+ steals: 'steals',
5834
+ turnovers: 'turnovers',
5835
+ personal_fouls: 'personalFouls',
5836
+ drawn_fouls: 'drawnFouls',
5837
+ wrestler_scrums_won: 'wrestlerScrumsWon',
5838
+ wrestler_scrums_lost: 'wrestlerScrumsLost',
5839
+ wrestler_scrums_tie: 'wrestlerScrumsTie',
5840
+ wrestler_scrum_points: 'wrestlerScrumPoints',
5841
+ scrums_won: 'scrumsWon',
5842
+ scrums_lost: 'scrumsLost',
5843
+ scrums_tie: 'scrumsTie',
5844
+ scrum_points: 'scrumPoints',
5845
+ yellow_cards: 'yellowCards',
5846
+ red_cards: 'redCards',
5847
+ wrestler_scrums: 'wrestlerScrums',
5848
+ wrestler_scrums_won_percent: 'wrestlerScrumsWonPercent',
5849
+ scrums: 'scrums',
5850
+ scrums_won_percent: 'scrumsWonPercent',
5851
+ game_time: 'gameTime',
5852
+ newbie: 'newbie',
5853
+ rank: 'rank',
5854
+ },
5855
+ relation: {
5856
+ leaguePlayer: LeaguePlayer,
5857
+ tournamentTeamUser: TournamentTeamUser,
5858
+ team: Team,
5859
+ teamUser: TeamUser,
5860
+ user: User,
5861
+ tournamentTeam: TournamentTeam,
5862
+ month: DateField
5863
+ }
5864
+ })
5865
+ ], WrestballStatistic);
5866
+
5749
5867
  class TournamentApi {
5750
5868
  constructor(httpClient, configService) {
5751
5869
  this.httpClient = httpClient;
@@ -6074,6 +6192,16 @@ class TournamentApi {
6074
6192
  }))).toPromise();
6075
6193
  });
6076
6194
  }
6195
+ getWrestballStatistic(filters) {
6196
+ return __awaiter(this, void 0, void 0, function* () {
6197
+ let params = new HttpParams();
6198
+ params = applyStatisticFilters(filters, params);
6199
+ return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/wrestball_statistic/`, { params, observe: 'response' }).pipe(map(result => ({
6200
+ total: +result.headers.get('X-Page-Count'),
6201
+ data: WrestballStatistic.toFront(result.body)
6202
+ }))).toPromise();
6203
+ });
6204
+ }
6077
6205
  getTournamentTeamUsers(tournamentTeamId, includes = []) {
6078
6206
  return __awaiter(this, void 0, void 0, function* () {
6079
6207
  let params = new HttpParams();
@@ -11177,5 +11305,5 @@ HttpCookieInterceptor.ctorParameters = () => [
11177
11305
  * Generated bundle index. Do not edit.
11178
11306
  */
11179
11307
 
11180
- export { Achievement, AchievementTypes, BannerLocation, BaseModel, BaseService, BasketballCourtSides, BasketballCourtZones, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameSubLogTypesLocalization, BasketballGameTeamStatistic, BasketballPenaltyTypes, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, BasketballSubLogTypes, 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, GameBaseApi, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameBill, GameBillStatusLocalization, GameBillStatuses, GameFootballPosition, GameFootballPositionLocalization, GameHandballPosition, GameHandballPositionLocalization, GameHockeyPosition, GameHockeyPositionLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameRugbyPosition, GameRugbyPositionLocalization, GameStatuses, GameTeamAdditionalData, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameUserDisqualification, GameUserLimitationTypes, GameUserLimitations, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, GameWaterpoloPosition, GameWaterpoloPositionLocalization, GameWaterpoloPositionShortRuLocalization, HandballGameApi, HandballGameConfig, HandballGameLog, HandballGameLogTypeLocalization, HandballGameLogTypes, HandballGameStatistic, HandballGameTeamStatistic, HandballProfile, HandballStatistic, HockeyAdvantageTypes, HockeyGameApi, HockeyGameConfig, HockeyGameLog, HockeyGameLogTypeLocalization, HockeyGameLogTypes, HockeyGameStatistic, HockeyGameTeamStatistic, HockeyPenaltyTypes, HockeyProfile, HockeyStatistic, HockeyWorkHand, HockeyWorkHandLocalization, HttpCookieInterceptor, League, LeagueApi, LeagueBanner, LeagueCourt, LeagueDocument, LeagueFieldBase, LeagueFieldBaseValue, LeagueFieldTypes, LeagueNews, LeagueNewsApi, LeagueNewsType, LeaguePartner, LeaguePlayer, LeaguePlayerApi, LeaguePlayerField, LeaguePlayerFieldValue, LeaguePlaylist, LeagueTeamField, LocalStorageEngine, MODEL_MAPPING_FIELDS_KEY, MODEL_RELATION_KEY, MODEL_TO_BACK_KEY, MODEL_TO_FRONT_KEY, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OrganizationBill, OrganizationBillStatusLocalization, OrganizationBillStatuses, OrganizationStatistic, OrganizationStatuses, OrganizationStatusesLocalization, OrganizationTariff, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, PlayoffTypes, Poll, PollAnswer, PollStatuses, PollVariant, PublicTeamApi, PublicUserApi, Qualification, QualificationLocalization, RUGBY_GAME_LOG_TYPE_POINTS, RUGBY_TEAM_LOG_TYPES, ReferenceApi, RoundTeamGame, RugbyFoulGameStage, RugbyFoulGameStageLocalization, RugbyFoulSanctionLocalization, RugbyFoulSanctions, RugbyFoulType, RugbyGameApi, RugbyGameConfig, RugbyGameLog, RugbyGameLogTypeLocalization, RugbyGameLogTypes, RugbyGameStatistic, RugbyGameTeamStatistic, RugbyProfile, RugbyStatistic, RugbyStatisticTypes, SCORE_LOG_TYPES, Sport, SportTypes, StageTeamGame, StorageEngine, StorageEngineField, Store, Team, TeamAccess, TeamAchievement, TeamAdditionalData, TeamApi, TeamEvent, TeamEventApi, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamPermission, TeamPermissionTypes, TeamUser, TeamUserRole, TeamUserRoleLocalization, TeamsAndUsers, TimerTypes, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentDivision, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoin1x1Data, TournamentJoin1x1Status, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentRound, TournamentRoundApi, TournamentRoundSettings, TournamentRoundTeam, TournamentRoundTypes, TournamentSeason, TournamentSeasonApi, TournamentSeasonStatuses, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamFieldValue, TournamentTeamShort, 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, WaterpoloAdvantageTypes, WaterpoloGameApi, WaterpoloGameConfig, WaterpoloGameLog, WaterpoloGameLogTypeLocalization, WaterpoloGameLogTypes, WaterpoloGameStatistic, WaterpoloGameTeamStatistic, WaterpoloProfile, WaterpoloStatistic, WaterpoloStatisticTypes, WaterpoloWorkHand, WaterpoloWorkHandLocalization, WorkHand, WorkHandLocalization, addItemInArray, addItemsInArray, applyGameMediaFilters, applyGamesFilters, applyStatisticFilters, applyStatisticLeadersFilters, changeFavicons, componentDestroyed, deleteItemFromArray, enumField, fileSizeValidator, generateArray, getArrayChunks, getCookie, getEnumOptions, getIconsData, handleError, isTouchDevice, listField, markFormGroupTouched, minLengthArrayValidator, parseDate, patchItemInArray, penaltyTypeField, updateItemInArray, updateItemsInArray, validateDate, validateEmail, validatePhone, validateUrl };
11308
+ export { Achievement, AchievementTypes, BannerLocation, BaseModel, BaseService, BasketballCourtSides, BasketballCourtZones, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameSubLogTypesLocalization, BasketballGameTeamStatistic, BasketballPenaltyTypes, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, BasketballSubLogTypes, 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, GameBaseApi, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameBill, GameBillStatusLocalization, GameBillStatuses, GameFootballPosition, GameFootballPositionLocalization, GameHandballPosition, GameHandballPositionLocalization, GameHockeyPosition, GameHockeyPositionLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameRugbyPosition, GameRugbyPositionLocalization, GameStatuses, GameTeamAdditionalData, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameUserDisqualification, GameUserLimitationTypes, GameUserLimitations, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, GameWaterpoloPosition, GameWaterpoloPositionLocalization, GameWaterpoloPositionShortRuLocalization, HandballGameApi, HandballGameConfig, HandballGameLog, HandballGameLogTypeLocalization, HandballGameLogTypes, HandballGameStatistic, HandballGameTeamStatistic, HandballProfile, HandballStatistic, HockeyAdvantageTypes, HockeyGameApi, HockeyGameConfig, HockeyGameLog, HockeyGameLogTypeLocalization, HockeyGameLogTypes, HockeyGameStatistic, HockeyGameTeamStatistic, HockeyPenaltyTypes, HockeyProfile, HockeyStatistic, HockeyWorkHand, HockeyWorkHandLocalization, HttpCookieInterceptor, League, LeagueApi, LeagueBanner, LeagueCourt, LeagueDocument, LeagueFieldBase, LeagueFieldBaseValue, LeagueFieldTypes, LeagueNews, LeagueNewsApi, LeagueNewsType, LeaguePartner, LeaguePlayer, LeaguePlayerApi, LeaguePlayerField, LeaguePlayerFieldValue, LeaguePlaylist, LeagueTeamField, LocalStorageEngine, MODEL_MAPPING_FIELDS_KEY, MODEL_RELATION_KEY, MODEL_TO_BACK_KEY, MODEL_TO_FRONT_KEY, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OrganizationBill, OrganizationBillStatusLocalization, OrganizationBillStatuses, OrganizationStatistic, OrganizationStatuses, OrganizationStatusesLocalization, OrganizationTariff, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, PlayoffTypes, Poll, PollAnswer, PollStatuses, PollVariant, PublicTeamApi, PublicUserApi, Qualification, QualificationLocalization, RUGBY_GAME_LOG_TYPE_POINTS, RUGBY_TEAM_LOG_TYPES, ReferenceApi, RoundTeamGame, RugbyFoulGameStage, RugbyFoulGameStageLocalization, RugbyFoulSanctionLocalization, RugbyFoulSanctions, RugbyFoulType, RugbyGameApi, RugbyGameConfig, RugbyGameLog, RugbyGameLogTypeLocalization, RugbyGameLogTypes, RugbyGameStatistic, RugbyGameTeamStatistic, RugbyProfile, RugbyStatistic, RugbyStatisticTypes, SCORE_LOG_TYPES, Sport, SportTypes, StageTeamGame, StorageEngine, StorageEngineField, Store, Team, TeamAccess, TeamAchievement, TeamAdditionalData, TeamApi, TeamEvent, TeamEventApi, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamPermission, TeamPermissionTypes, TeamUser, TeamUserRole, TeamUserRoleLocalization, TeamsAndUsers, TimerTypes, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentDivision, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoin1x1Data, TournamentJoin1x1Status, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentRound, TournamentRoundApi, TournamentRoundSettings, TournamentRoundTeam, TournamentRoundTypes, TournamentSeason, TournamentSeasonApi, TournamentSeasonStatuses, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamFieldValue, TournamentTeamShort, 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, WaterpoloAdvantageTypes, WaterpoloGameApi, WaterpoloGameConfig, WaterpoloGameLog, WaterpoloGameLogTypeLocalization, WaterpoloGameLogTypes, WaterpoloGameStatistic, WaterpoloGameTeamStatistic, WaterpoloProfile, WaterpoloStatistic, WaterpoloStatisticTypes, WaterpoloWorkHand, WaterpoloWorkHandLocalization, WorkHand, WorkHandLocalization, WrestballStatisticTypes, addItemInArray, addItemsInArray, applyGameMediaFilters, applyGamesFilters, applyStatisticFilters, applyStatisticLeadersFilters, changeFavicons, componentDestroyed, deleteItemFromArray, enumField, fileSizeValidator, generateArray, getArrayChunks, getCookie, getEnumOptions, getIconsData, handleError, isTouchDevice, listField, markFormGroupTouched, minLengthArrayValidator, parseDate, patchItemInArray, penaltyTypeField, updateItemInArray, updateItemsInArray, validateDate, validateEmail, validatePhone, validateUrl };
11181
11309
  //# sourceMappingURL=mtgame-core.js.map