volleyballsimtypes 0.0.66 → 0.0.68

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.
@@ -1,4 +1,4 @@
1
1
  import { MatchRatingAttributes } from '../models';
2
- import { Match, MatchRating } from '../../service';
3
- declare function transformToAttributes(match: Match, teamId: string, rating: MatchRating): MatchRatingAttributes;
2
+ import { MatchRating, MatchTeam } from '../../service';
3
+ declare function transformToAttributes(team: MatchTeam, rating: MatchRating): MatchRatingAttributes;
4
4
  export { transformToAttributes as transformFromMatchRating };
@@ -2,16 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformFromMatchRating = void 0;
4
4
  const service_1 = require("../../service");
5
- function transformToAttributes(match, teamId, rating) {
6
- const team = match.homeTeam.id === teamId ? service_1.MatchTeam.HOME :
7
- match.awayTeam.id === teamId ? service_1.MatchTeam.AWAY : undefined;
5
+ function transformToAttributes(team, rating) {
6
+ const teamId = team === service_1.MatchTeam.HOME ? rating.home.id : rating.away.id;
8
7
  if (team == null)
9
8
  throw new Error(`INVALID_TEAM: ${teamId}`);
10
9
  return {
11
- match_id: match.id,
10
+ match_id: rating.match.id,
12
11
  team_id: teamId,
13
12
  p: rating.getWinProbability(team),
14
- dR: rating.getRatingChange(team, match)
13
+ dR: rating.getRatingChange(team)
15
14
  };
16
15
  }
17
16
  exports.transformFromMatchRating = transformToAttributes;
@@ -1,6 +1,6 @@
1
1
  import { Block, BlockFailure as BlockFailureEnum, BlockType as BlockTypeEnum, Coach, Country, CourtPosition, CourtRow, CourtTarget as CourtTargetEnum, Draft, DraftPick, EventStat, EventType as EventTypeEnum, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, Iteration, League, LiberoReplacement, LiberoReplacementType as LiberoReplacementTypeEnum, Match, MatchRating, MatchSet, MatchSetState, MatchTeam, Name, PerformanceStats, Player, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure as ReceptionFailureEnum, ReceptionType as ReceptionTypeEnum, Role, Score, Season, Serve, ServeFailure as ServeFailureEnum, ServeType as ServeTypeEnum, Set, SetFailure as SetFailureEnum, SetStatistics, SetType as SetTypeEnum, shuffle, Spike, SpikeFailure as SpikeFailureEnum, SpikeType as SpikeTypeEnum, Stage, Standing, Stat, SubPriority, Substitution, Team, Tournament, TournamentMatch, Trait, validateUUID } from './service';
2
2
  import { APIBlock, APICoach, APIEvent, APIInPlayEvent, APILeague, APILiberoReplacement, APIMatch, APIMatchSet, APIPlayer, APIRally, APIReception, APIScore, APISeason, APIServe, APISet, APISetStatistics, APISpike, APISubstitution, APITeam, APITournament, APITournamentMatch, APITrait } from './api';
3
- import type { BlockCreationAttributes, BlockFailure, BlockId, BlockPk, BlockType, CoachCreationAttributes, CoachId, CoachPk, CountryCreationAttributes, CountryId, CountryPk, CourtPositionType, CourtTarget, DraftCreationAttributes, DraftId, DraftPickCreationAttributes, DraftPickId, DraftPickPk, DraftPk, EventCreationAttributes, EventId, EventPk, EventType, FormationType, IterationCreationAttributes, IterationId, IterationPk, LeagueCreationAttributes, LeagueId, LeaguePk, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType, MatchCreationAttributes, MatchId, MatchPk, MatchSetCreationAttributes, MatchSetId, MatchSetPk, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsPk, PlayerCreationAttributes, PlayerId, PlayerPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, RallyCreationAttributes, RallyId, RallyPk, RallyPositionCreationAttributes, RallyPositionId, RallyPositionPk, ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType, RoleType, ScoreCreationAttributes, ScoreId, ScorePk, SeasonCreationAttributes, SeasonId, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk, ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType, SetCreationAttributes, SetFailure, SetId, SetPk, SetType, Side, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType, SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk, TeamCreationAttributes, TeamId, TeamPk, TournamentCreationAttributes, TournamentId, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentPk, TournamentStage, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk, TraitType, UserCreationAttributes, UserId, UserOptionalAttributes, UserPk, UserRole } from './data';
4
- import { BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, DraftAttributes, DraftModel, DraftPickAttributes, DraftPickModel, EventAttributes, EventModel, FormationType as FormationOpts, initModels, IterationAttributes, IterationModel, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, PlayerTeamAttributes, PlayerTeamModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonMatchAttributes, SeasonMatchModel, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, TeamModel, TournamentAttributes, TournamentMatchAttributes, TournamentMatchModel, TournamentModel, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentTeamsModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromIteration, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILeague, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToIteration, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToStage, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, UserAttributes, UserModel } from './data';
5
- export { DraftModel, DraftAttributes, DraftPickModel, DraftPickAttributes, PlayerTeamAttributes, PlayerTeamModel, UserAttributes, UserModel, League, Standing, Season, Country, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, Block, EventTypeEnum, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockTypeEnum, LiberoReplacementTypeEnum, BlockFailureEnum, MatchSetState, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTargetEnum, formatNumber, generateModifier, getKeys, Draft, DraftPick, MatchTeam, Name, Player, RallyState, PlayerPosition, randomNumber, ReceptionTypeEnum, ServeFailureEnum, ServeTypeEnum, SetFailureEnum, SetStatistics, SetTypeEnum, ReceptionFailureEnum, SpikeFailureEnum, SpikeTypeEnum, Team, shuffle, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, transformToAPILeague, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, BlockAttributes, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CountryModel, ScoreModel, CoachModel, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, EventAttributes, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, PerformanceStatsAttributes, PerformanceStatsOptionalAttributes, PlayerAttributes, RallyAttributes, RallyPositionAttributes, ReceptionAttributes, ScoreAttributes, SeasonAttributes, SeasonTeamsAttributes, PlayerModel, SeasonTeamsModel, SeasonModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, TeamAttributes, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentAttributes, TournamentModel, TournamentMatchAttributes, TournamentMatchModel, SeasonMatchModel, SeasonMatchAttributes, IterationAttributes, IterationModel, Iteration, transformFromIteration, transformToIteration, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformFromSeasonMatch, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentMatch, Tournament, FormationOpts, TournamentOptionalAttributes, TournamentTeamsModel, TournamentTeamsAttributes, MatchRating };
6
- export type { DraftId, DraftPk, DraftCreationAttributes, DraftPickCreationAttributes, DraftPickId, DraftPickPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, UserCreationAttributes, UserOptionalAttributes, UserRole, UserId, UserPk, TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, IterationCreationAttributes, IterationId, IterationPk };
3
+ import type { BlockCreationAttributes, BlockFailure, BlockId, BlockPk, BlockType, CoachCreationAttributes, CoachId, CoachPk, CountryCreationAttributes, CountryId, CountryPk, CourtPositionType, CourtTarget, DraftCreationAttributes, DraftId, DraftPickCreationAttributes, DraftPickId, DraftPickPk, DraftPk, EventCreationAttributes, EventId, EventPk, EventType, FormationType, IterationCreationAttributes, IterationId, IterationPk, LeagueCreationAttributes, LeagueId, LeaguePk, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType, MatchCreationAttributes, MatchId, MatchPk, MatchSetCreationAttributes, MatchSetId, MatchSetPk, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsPk, PlayerCreationAttributes, PlayerId, PlayerPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, RallyCreationAttributes, RallyId, RallyPk, RallyPositionCreationAttributes, RallyPositionId, RallyPositionPk, ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType, RoleType, ScoreCreationAttributes, ScoreId, ScorePk, SeasonCreationAttributes, SeasonId, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk, ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType, SetCreationAttributes, SetFailure, SetId, SetPk, SetType, Side, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType, SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk, TeamCreationAttributes, TeamId, TeamPk, TournamentCreationAttributes, TournamentId, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentPk, TournamentStage, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk, TraitType, UserCreationAttributes, UserId, UserOptionalAttributes, UserPk, UserRole, MatchRatingCreationAttributes, MatchRatingId, MatchRatingPk } from './data';
4
+ import { BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, DraftAttributes, DraftModel, DraftPickAttributes, DraftPickModel, EventAttributes, EventModel, FormationType as FormationOpts, initModels, IterationAttributes, IterationModel, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, PlayerTeamAttributes, PlayerTeamModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonMatchAttributes, SeasonMatchModel, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, TeamModel, TournamentAttributes, TournamentMatchAttributes, TournamentMatchModel, TournamentModel, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentTeamsModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromIteration, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILeague, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToIteration, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToStage, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, UserAttributes, UserModel, MatchRatingAttributes, MatchRatingModel } from './data';
5
+ export { MatchRatingAttributes, MatchRatingModel, DraftModel, DraftAttributes, DraftPickModel, DraftPickAttributes, PlayerTeamAttributes, PlayerTeamModel, UserAttributes, UserModel, League, Standing, Season, Country, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, Block, EventTypeEnum, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockTypeEnum, LiberoReplacementTypeEnum, BlockFailureEnum, MatchSetState, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTargetEnum, formatNumber, generateModifier, getKeys, Draft, DraftPick, MatchTeam, Name, Player, RallyState, PlayerPosition, randomNumber, ReceptionTypeEnum, ServeFailureEnum, ServeTypeEnum, SetFailureEnum, SetStatistics, SetTypeEnum, ReceptionFailureEnum, SpikeFailureEnum, SpikeTypeEnum, Team, shuffle, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, transformToAPILeague, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, BlockAttributes, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CountryModel, ScoreModel, CoachModel, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, EventAttributes, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, PerformanceStatsAttributes, PerformanceStatsOptionalAttributes, PlayerAttributes, RallyAttributes, RallyPositionAttributes, ReceptionAttributes, ScoreAttributes, SeasonAttributes, SeasonTeamsAttributes, PlayerModel, SeasonTeamsModel, SeasonModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, TeamAttributes, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentAttributes, TournamentModel, TournamentMatchAttributes, TournamentMatchModel, SeasonMatchModel, SeasonMatchAttributes, IterationAttributes, IterationModel, Iteration, transformFromIteration, transformToIteration, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformFromSeasonMatch, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentMatch, Tournament, FormationOpts, TournamentOptionalAttributes, TournamentTeamsModel, TournamentTeamsAttributes, MatchRating };
6
+ export type { DraftId, DraftPk, DraftCreationAttributes, DraftPickCreationAttributes, DraftPickId, DraftPickPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, UserCreationAttributes, UserOptionalAttributes, UserRole, UserId, UserPk, TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, IterationCreationAttributes, IterationId, IterationPk, MatchRatingCreationAttributes, MatchRatingId, MatchRatingPk };
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SpikeFailureEnum = exports.ReceptionFailureEnum = exports.SetTypeEnum = exports.SetFailureEnum = exports.ServeTypeEnum = exports.ServeFailureEnum = exports.ReceptionTypeEnum = exports.randomNumber = exports.RallyState = exports.Player = exports.MatchTeam = exports.DraftPick = exports.Draft = exports.getKeys = exports.generateModifier = exports.formatNumber = exports.CourtTargetEnum = exports.CourtPosition = exports.CourtRow = exports.InPlayEvent = exports.Match = exports.MatchSetState = exports.BlockFailureEnum = exports.LiberoReplacementTypeEnum = exports.BlockTypeEnum = exports.Substitution = exports.Spike = exports.Set = exports.Serve = exports.Score = exports.Reception = exports.RallyEvent = exports.Rally = exports.MatchSet = exports.LiberoReplacement = exports.EventTypeEnum = exports.Block = exports.Formation = exports.PerformanceStats = exports.GeneralStat = exports.Role = exports.Coach = exports.Country = exports.Season = exports.Standing = exports.League = exports.UserModel = exports.PlayerTeamModel = exports.DraftPickModel = exports.DraftModel = void 0;
4
- exports.transformToBlock = exports.transformToAPIBlock = exports.transformFromBlock = exports.transformToIteration = exports.transformFromIteration = exports.Iteration = exports.IterationModel = exports.SeasonMatchModel = exports.TournamentMatchModel = exports.TournamentModel = exports.SubstitutionModel = exports.transformFromStage = exports.transformToStage = exports.TeamModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonModel = exports.SeasonTeamsModel = exports.PlayerModel = exports.transformToAPICoach = exports.MatchModel = exports.LeagueModel = exports.RallyPositionModel = exports.CoachModel = exports.ScoreModel = exports.CountryModel = exports.ReceptionModel = exports.MatchSetStatsModel = exports.LiberoReplacementModel = exports.PerformanceStatsModel = exports.MatchSetModel = exports.EventModel = exports.RallyModel = exports.BlockModel = exports.initModels = exports.APITrait = exports.transformToDraftPick = exports.transformFromDraftPick = exports.transformToDraft = exports.transformFromDraft = exports.transformFromPlayerTeam = exports.transformFromMatchRating = exports.transformToAPILeague = exports.validateUUID = exports.getRandomEnumValue = exports.Trait = exports.shuffle = exports.Team = exports.SpikeTypeEnum = void 0;
5
- exports.transformToCoach = exports.transformToLiberoReplacement = exports.transformToAPILiberoReplacement = exports.transformFromLiberoReplacement = exports.transformToAPITrait = exports.transformToAPITeam = exports.transformToAPISeason = exports.transformFromSeasonMatch = exports.transformToAPIRally = exports.transformToAPIPlayer = exports.transformToAPIMatchSetStats = exports.transformToAPIMatchSet = exports.transformToAPIMatch = exports.transformFromTrait = exports.transformFromTeam = exports.transformToSubstitution = exports.transformToAPISubstitution = exports.transformFromSubstitution = exports.transformToSpike = exports.transformToAPISpike = exports.transformFromSpike = exports.transformFromSet = exports.transformToServe = exports.transformToAPIServe = exports.transformFromServe = exports.transformFromEventType = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromPerformanceStats = exports.transformFromCourtTarget = exports.transformFromCourtPosition = exports.transformToPlayerPosition = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromLeague = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformToSet = exports.transformToAPISet = exports.transformFromMatch = exports.transformFromFormation = exports.transformToScore = exports.transformToAPIScore = exports.transformToReception = exports.transformToAPIReception = exports.transformFromRally = exports.transformFromCountry = exports.transformFromCoach = void 0;
6
- exports.MatchRating = exports.TournamentTeamsModel = exports.Tournament = exports.TournamentMatch = exports.Stage = exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = exports.transformToTournament = exports.transformToAPITournament = exports.transformFromTournament = exports.transformToRole = exports.transformToLeague = exports.transformToTrait = exports.transformToTeam = exports.transformToSeason = exports.transformToMatch = exports.transformToRally = exports.transformToPlayer = exports.transformToPerformanceStats = exports.transformToMatchSetStats = exports.transformToFormation = exports.transformToCourtTarget = exports.transformToCourtPosition = exports.transformToMatchSet = exports.transformToEventType = exports.transformToCountry = void 0;
3
+ exports.ReceptionFailureEnum = exports.SetTypeEnum = exports.SetFailureEnum = exports.ServeTypeEnum = exports.ServeFailureEnum = exports.ReceptionTypeEnum = exports.randomNumber = exports.RallyState = exports.Player = exports.MatchTeam = exports.DraftPick = exports.Draft = exports.getKeys = exports.generateModifier = exports.formatNumber = exports.CourtTargetEnum = exports.CourtPosition = exports.CourtRow = exports.InPlayEvent = exports.Match = exports.MatchSetState = exports.BlockFailureEnum = exports.LiberoReplacementTypeEnum = exports.BlockTypeEnum = exports.Substitution = exports.Spike = exports.Set = exports.Serve = exports.Score = exports.Reception = exports.RallyEvent = exports.Rally = exports.MatchSet = exports.LiberoReplacement = exports.EventTypeEnum = exports.Block = exports.Formation = exports.PerformanceStats = exports.GeneralStat = exports.Role = exports.Coach = exports.Country = exports.Season = exports.Standing = exports.League = exports.UserModel = exports.PlayerTeamModel = exports.DraftPickModel = exports.DraftModel = exports.MatchRatingModel = void 0;
4
+ exports.transformToAPIBlock = exports.transformFromBlock = exports.transformToIteration = exports.transformFromIteration = exports.Iteration = exports.IterationModel = exports.SeasonMatchModel = exports.TournamentMatchModel = exports.TournamentModel = exports.SubstitutionModel = exports.transformFromStage = exports.transformToStage = exports.TeamModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonModel = exports.SeasonTeamsModel = exports.PlayerModel = exports.transformToAPICoach = exports.MatchModel = exports.LeagueModel = exports.RallyPositionModel = exports.CoachModel = exports.ScoreModel = exports.CountryModel = exports.ReceptionModel = exports.MatchSetStatsModel = exports.LiberoReplacementModel = exports.PerformanceStatsModel = exports.MatchSetModel = exports.EventModel = exports.RallyModel = exports.BlockModel = exports.initModels = exports.APITrait = exports.transformToDraftPick = exports.transformFromDraftPick = exports.transformToDraft = exports.transformFromDraft = exports.transformFromPlayerTeam = exports.transformFromMatchRating = exports.transformToAPILeague = exports.validateUUID = exports.getRandomEnumValue = exports.Trait = exports.shuffle = exports.Team = exports.SpikeTypeEnum = exports.SpikeFailureEnum = void 0;
5
+ exports.transformToLiberoReplacement = exports.transformToAPILiberoReplacement = exports.transformFromLiberoReplacement = exports.transformToAPITrait = exports.transformToAPITeam = exports.transformToAPISeason = exports.transformFromSeasonMatch = exports.transformToAPIRally = exports.transformToAPIPlayer = exports.transformToAPIMatchSetStats = exports.transformToAPIMatchSet = exports.transformToAPIMatch = exports.transformFromTrait = exports.transformFromTeam = exports.transformToSubstitution = exports.transformToAPISubstitution = exports.transformFromSubstitution = exports.transformToSpike = exports.transformToAPISpike = exports.transformFromSpike = exports.transformFromSet = exports.transformToServe = exports.transformToAPIServe = exports.transformFromServe = exports.transformFromEventType = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromPerformanceStats = exports.transformFromCourtTarget = exports.transformFromCourtPosition = exports.transformToPlayerPosition = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromLeague = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformToSet = exports.transformToAPISet = exports.transformFromMatch = exports.transformFromFormation = exports.transformToScore = exports.transformToAPIScore = exports.transformToReception = exports.transformToAPIReception = exports.transformFromRally = exports.transformFromCountry = exports.transformFromCoach = exports.transformToBlock = void 0;
6
+ exports.MatchRating = exports.TournamentTeamsModel = exports.Tournament = exports.TournamentMatch = exports.Stage = exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = exports.transformToTournament = exports.transformToAPITournament = exports.transformFromTournament = exports.transformToRole = exports.transformToLeague = exports.transformToTrait = exports.transformToTeam = exports.transformToSeason = exports.transformToMatch = exports.transformToRally = exports.transformToPlayer = exports.transformToPerformanceStats = exports.transformToMatchSetStats = exports.transformToFormation = exports.transformToCourtTarget = exports.transformToCourtPosition = exports.transformToMatchSet = exports.transformToEventType = exports.transformToCountry = exports.transformToCoach = void 0;
7
7
  const service_1 = require("./service");
8
8
  Object.defineProperty(exports, "Block", { enumerable: true, get: function () { return service_1.Block; } });
9
9
  Object.defineProperty(exports, "BlockFailureEnum", { enumerable: true, get: function () { return service_1.BlockFailure; } });
@@ -184,3 +184,4 @@ Object.defineProperty(exports, "transformToDraft", { enumerable: true, get: func
184
184
  Object.defineProperty(exports, "transformFromDraftPick", { enumerable: true, get: function () { return data_1.transformFromDraftPick; } });
185
185
  Object.defineProperty(exports, "transformToDraftPick", { enumerable: true, get: function () { return data_1.transformToDraftPick; } });
186
186
  Object.defineProperty(exports, "UserModel", { enumerable: true, get: function () { return data_1.UserModel; } });
187
+ Object.defineProperty(exports, "MatchRatingModel", { enumerable: true, get: function () { return data_1.MatchRatingModel; } });
@@ -1,14 +1,17 @@
1
1
  import { Match, MatchTeam } from '.';
2
+ import { Team } from '../team';
2
3
  interface MatchRatingOpts {
3
- readonly homeRating: number;
4
- readonly awayRating: number;
4
+ readonly home: Team;
5
+ readonly away: Team;
6
+ readonly match: Match;
5
7
  }
6
8
  export declare class MatchRating {
7
9
  static K: number;
8
- readonly homeRating: number;
9
- readonly awayRating: number;
10
- constructor({ homeRating, awayRating }: MatchRatingOpts);
10
+ readonly home: Team;
11
+ readonly away: Team;
12
+ readonly match: Match;
13
+ constructor({ home, away, match }: MatchRatingOpts);
11
14
  getWinProbability(team: MatchTeam): number;
12
- getRatingChange(team: MatchTeam, match: Match): number;
15
+ getRatingChange(team: MatchTeam): number;
13
16
  }
14
17
  export {};
@@ -3,26 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MatchRating = void 0;
4
4
  const _1 = require(".");
5
5
  class MatchRating {
6
- constructor({ homeRating, awayRating }) {
7
- this.homeRating = homeRating;
8
- this.awayRating = awayRating;
6
+ constructor({ home, away, match }) {
7
+ this.home = home;
8
+ this.away = away;
9
+ this.match = match;
9
10
  }
10
11
  getWinProbability(team) {
11
12
  let rA;
12
13
  let rB;
13
14
  if (team === _1.MatchTeam.HOME) {
14
- rA = this.homeRating;
15
- rB = this.awayRating;
15
+ rA = this.home.rating;
16
+ rB = this.away.rating;
16
17
  }
17
18
  else {
18
- rA = this.awayRating;
19
- rB = this.homeRating;
19
+ rA = this.away.rating;
20
+ rB = this.home.rating;
20
21
  }
21
22
  return 1 / (1 + Math.pow(10, ((rB - rA) / 400)));
22
23
  }
23
- getRatingChange(team, match) {
24
- const t = match[team === _1.MatchTeam.HOME ? 'homeTeam' : 'awayTeam'];
25
- const score = match.getWinner().id === t.id ? 1 : 0;
24
+ getRatingChange(team) {
25
+ const t = this.match[team === _1.MatchTeam.HOME ? 'homeTeam' : 'awayTeam'];
26
+ const score = this.match.getWinner().id === t.id ? 1 : 0;
26
27
  return MatchRating.K * (score - this.getWinProbability(team));
27
28
  }
28
29
  }
@@ -1,4 +1,4 @@
1
1
  import { MatchRatingAttributes } from '../models';
2
- import { Match, MatchRating } from '../../service';
3
- declare function transformToAttributes(match: Match, teamId: string, rating: MatchRating): MatchRatingAttributes;
2
+ import { MatchRating, MatchTeam } from '../../service';
3
+ declare function transformToAttributes(team: MatchTeam, rating: MatchRating): MatchRatingAttributes;
4
4
  export { transformToAttributes as transformFromMatchRating };
@@ -1,14 +1,13 @@
1
1
  import { MatchTeam } from '../../service';
2
- function transformToAttributes(match, teamId, rating) {
3
- const team = match.homeTeam.id === teamId ? MatchTeam.HOME :
4
- match.awayTeam.id === teamId ? MatchTeam.AWAY : undefined;
2
+ function transformToAttributes(team, rating) {
3
+ const teamId = team === MatchTeam.HOME ? rating.home.id : rating.away.id;
5
4
  if (team == null)
6
5
  throw new Error(`INVALID_TEAM: ${teamId}`);
7
6
  return {
8
- match_id: match.id,
7
+ match_id: rating.match.id,
9
8
  team_id: teamId,
10
9
  p: rating.getWinProbability(team),
11
- dR: rating.getRatingChange(team, match)
10
+ dR: rating.getRatingChange(team)
12
11
  };
13
12
  }
14
13
  export { transformToAttributes as transformFromMatchRating };
@@ -1,6 +1,6 @@
1
1
  import { Block, BlockFailure as BlockFailureEnum, BlockType as BlockTypeEnum, Coach, Country, CourtPosition, CourtRow, CourtTarget as CourtTargetEnum, Draft, DraftPick, EventStat, EventType as EventTypeEnum, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, Iteration, League, LiberoReplacement, LiberoReplacementType as LiberoReplacementTypeEnum, Match, MatchRating, MatchSet, MatchSetState, MatchTeam, Name, PerformanceStats, Player, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure as ReceptionFailureEnum, ReceptionType as ReceptionTypeEnum, Role, Score, Season, Serve, ServeFailure as ServeFailureEnum, ServeType as ServeTypeEnum, Set, SetFailure as SetFailureEnum, SetStatistics, SetType as SetTypeEnum, shuffle, Spike, SpikeFailure as SpikeFailureEnum, SpikeType as SpikeTypeEnum, Stage, Standing, Stat, SubPriority, Substitution, Team, Tournament, TournamentMatch, Trait, validateUUID } from './service';
2
2
  import { APIBlock, APICoach, APIEvent, APIInPlayEvent, APILeague, APILiberoReplacement, APIMatch, APIMatchSet, APIPlayer, APIRally, APIReception, APIScore, APISeason, APIServe, APISet, APISetStatistics, APISpike, APISubstitution, APITeam, APITournament, APITournamentMatch, APITrait } from './api';
3
- import type { BlockCreationAttributes, BlockFailure, BlockId, BlockPk, BlockType, CoachCreationAttributes, CoachId, CoachPk, CountryCreationAttributes, CountryId, CountryPk, CourtPositionType, CourtTarget, DraftCreationAttributes, DraftId, DraftPickCreationAttributes, DraftPickId, DraftPickPk, DraftPk, EventCreationAttributes, EventId, EventPk, EventType, FormationType, IterationCreationAttributes, IterationId, IterationPk, LeagueCreationAttributes, LeagueId, LeaguePk, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType, MatchCreationAttributes, MatchId, MatchPk, MatchSetCreationAttributes, MatchSetId, MatchSetPk, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsPk, PlayerCreationAttributes, PlayerId, PlayerPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, RallyCreationAttributes, RallyId, RallyPk, RallyPositionCreationAttributes, RallyPositionId, RallyPositionPk, ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType, RoleType, ScoreCreationAttributes, ScoreId, ScorePk, SeasonCreationAttributes, SeasonId, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk, ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType, SetCreationAttributes, SetFailure, SetId, SetPk, SetType, Side, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType, SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk, TeamCreationAttributes, TeamId, TeamPk, TournamentCreationAttributes, TournamentId, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentPk, TournamentStage, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk, TraitType, UserCreationAttributes, UserId, UserOptionalAttributes, UserPk, UserRole } from './data';
4
- import { BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, DraftAttributes, DraftModel, DraftPickAttributes, DraftPickModel, EventAttributes, EventModel, FormationType as FormationOpts, initModels, IterationAttributes, IterationModel, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, PlayerTeamAttributes, PlayerTeamModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonMatchAttributes, SeasonMatchModel, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, TeamModel, TournamentAttributes, TournamentMatchAttributes, TournamentMatchModel, TournamentModel, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentTeamsModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromIteration, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILeague, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToIteration, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToStage, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, UserAttributes, UserModel } from './data';
5
- export { DraftModel, DraftAttributes, DraftPickModel, DraftPickAttributes, PlayerTeamAttributes, PlayerTeamModel, UserAttributes, UserModel, League, Standing, Season, Country, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, Block, EventTypeEnum, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockTypeEnum, LiberoReplacementTypeEnum, BlockFailureEnum, MatchSetState, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTargetEnum, formatNumber, generateModifier, getKeys, Draft, DraftPick, MatchTeam, Name, Player, RallyState, PlayerPosition, randomNumber, ReceptionTypeEnum, ServeFailureEnum, ServeTypeEnum, SetFailureEnum, SetStatistics, SetTypeEnum, ReceptionFailureEnum, SpikeFailureEnum, SpikeTypeEnum, Team, shuffle, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, transformToAPILeague, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, BlockAttributes, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CountryModel, ScoreModel, CoachModel, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, EventAttributes, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, PerformanceStatsAttributes, PerformanceStatsOptionalAttributes, PlayerAttributes, RallyAttributes, RallyPositionAttributes, ReceptionAttributes, ScoreAttributes, SeasonAttributes, SeasonTeamsAttributes, PlayerModel, SeasonTeamsModel, SeasonModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, TeamAttributes, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentAttributes, TournamentModel, TournamentMatchAttributes, TournamentMatchModel, SeasonMatchModel, SeasonMatchAttributes, IterationAttributes, IterationModel, Iteration, transformFromIteration, transformToIteration, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformFromSeasonMatch, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentMatch, Tournament, FormationOpts, TournamentOptionalAttributes, TournamentTeamsModel, TournamentTeamsAttributes, MatchRating };
6
- export type { DraftId, DraftPk, DraftCreationAttributes, DraftPickCreationAttributes, DraftPickId, DraftPickPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, UserCreationAttributes, UserOptionalAttributes, UserRole, UserId, UserPk, TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, IterationCreationAttributes, IterationId, IterationPk };
3
+ import type { BlockCreationAttributes, BlockFailure, BlockId, BlockPk, BlockType, CoachCreationAttributes, CoachId, CoachPk, CountryCreationAttributes, CountryId, CountryPk, CourtPositionType, CourtTarget, DraftCreationAttributes, DraftId, DraftPickCreationAttributes, DraftPickId, DraftPickPk, DraftPk, EventCreationAttributes, EventId, EventPk, EventType, FormationType, IterationCreationAttributes, IterationId, IterationPk, LeagueCreationAttributes, LeagueId, LeaguePk, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType, MatchCreationAttributes, MatchId, MatchPk, MatchSetCreationAttributes, MatchSetId, MatchSetPk, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsPk, PlayerCreationAttributes, PlayerId, PlayerPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, RallyCreationAttributes, RallyId, RallyPk, RallyPositionCreationAttributes, RallyPositionId, RallyPositionPk, ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType, RoleType, ScoreCreationAttributes, ScoreId, ScorePk, SeasonCreationAttributes, SeasonId, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk, ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType, SetCreationAttributes, SetFailure, SetId, SetPk, SetType, Side, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType, SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk, TeamCreationAttributes, TeamId, TeamPk, TournamentCreationAttributes, TournamentId, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentPk, TournamentStage, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk, TraitType, UserCreationAttributes, UserId, UserOptionalAttributes, UserPk, UserRole, MatchRatingCreationAttributes, MatchRatingId, MatchRatingPk } from './data';
4
+ import { BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, DraftAttributes, DraftModel, DraftPickAttributes, DraftPickModel, EventAttributes, EventModel, FormationType as FormationOpts, initModels, IterationAttributes, IterationModel, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, PlayerTeamAttributes, PlayerTeamModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonMatchAttributes, SeasonMatchModel, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, TeamModel, TournamentAttributes, TournamentMatchAttributes, TournamentMatchModel, TournamentModel, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentTeamsModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromIteration, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILeague, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToIteration, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToStage, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, UserAttributes, UserModel, MatchRatingAttributes, MatchRatingModel } from './data';
5
+ export { MatchRatingAttributes, MatchRatingModel, DraftModel, DraftAttributes, DraftPickModel, DraftPickAttributes, PlayerTeamAttributes, PlayerTeamModel, UserAttributes, UserModel, League, Standing, Season, Country, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, Block, EventTypeEnum, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockTypeEnum, LiberoReplacementTypeEnum, BlockFailureEnum, MatchSetState, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTargetEnum, formatNumber, generateModifier, getKeys, Draft, DraftPick, MatchTeam, Name, Player, RallyState, PlayerPosition, randomNumber, ReceptionTypeEnum, ServeFailureEnum, ServeTypeEnum, SetFailureEnum, SetStatistics, SetTypeEnum, ReceptionFailureEnum, SpikeFailureEnum, SpikeTypeEnum, Team, shuffle, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, transformToAPILeague, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, BlockAttributes, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CountryModel, ScoreModel, CoachModel, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, EventAttributes, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, PerformanceStatsAttributes, PerformanceStatsOptionalAttributes, PlayerAttributes, RallyAttributes, RallyPositionAttributes, ReceptionAttributes, ScoreAttributes, SeasonAttributes, SeasonTeamsAttributes, PlayerModel, SeasonTeamsModel, SeasonModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, TeamAttributes, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentAttributes, TournamentModel, TournamentMatchAttributes, TournamentMatchModel, SeasonMatchModel, SeasonMatchAttributes, IterationAttributes, IterationModel, Iteration, transformFromIteration, transformToIteration, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformFromSeasonMatch, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentMatch, Tournament, FormationOpts, TournamentOptionalAttributes, TournamentTeamsModel, TournamentTeamsAttributes, MatchRating };
6
+ export type { DraftId, DraftPk, DraftCreationAttributes, DraftPickCreationAttributes, DraftPickId, DraftPickPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, UserCreationAttributes, UserOptionalAttributes, UserRole, UserId, UserPk, TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, IterationCreationAttributes, IterationId, IterationPk, MatchRatingCreationAttributes, MatchRatingId, MatchRatingPk };
@@ -1,4 +1,4 @@
1
1
  import { Block, BlockFailure as BlockFailureEnum, BlockType as BlockTypeEnum, Coach, Country, CourtPosition, CourtRow, CourtTarget as CourtTargetEnum, Draft, DraftPick, EventType as EventTypeEnum, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, Iteration, League, LiberoReplacement, LiberoReplacementType as LiberoReplacementTypeEnum, Match, MatchRating, MatchSet, MatchSetState, MatchTeam, PerformanceStats, Player, Rally, RallyEvent, RallyState, randomNumber, Reception, ReceptionFailure as ReceptionFailureEnum, ReceptionType as ReceptionTypeEnum, Role, Score, Season, Serve, ServeFailure as ServeFailureEnum, ServeType as ServeTypeEnum, Set, SetFailure as SetFailureEnum, SetType as SetTypeEnum, shuffle, Spike, SpikeFailure as SpikeFailureEnum, SpikeType as SpikeTypeEnum, Stage, Standing, Substitution, Team, Tournament, TournamentMatch, Trait, validateUUID } from './service';
2
2
  import { APITrait } from './api';
3
- import { BlockModel, CoachModel, CountryModel, DraftModel, DraftPickModel, EventModel, initModels, IterationModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, PlayerTeamModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, TournamentTeamsModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromIteration, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILeague, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToIteration, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToStage, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, UserModel } from './data';
4
- export { DraftModel, DraftPickModel, PlayerTeamModel, UserModel, League, Standing, Season, Country, Coach, Role, GeneralStat, PerformanceStats, Formation, Block, EventTypeEnum, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockTypeEnum, LiberoReplacementTypeEnum, BlockFailureEnum, MatchSetState, Match, InPlayEvent, CourtRow, CourtPosition, CourtTargetEnum, formatNumber, generateModifier, getKeys, Draft, DraftPick, MatchTeam, Player, RallyState, randomNumber, ReceptionTypeEnum, ServeFailureEnum, ServeTypeEnum, SetFailureEnum, SetTypeEnum, ReceptionFailureEnum, SpikeFailureEnum, SpikeTypeEnum, Team, shuffle, Trait, getRandomEnumValue, validateUUID, transformToAPILeague, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, APITrait, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, CountryModel, ScoreModel, CoachModel, RallyPositionModel, LeagueModel, MatchModel, transformToAPICoach, PlayerModel, SeasonTeamsModel, SeasonModel, ServeModel, SetModel, SpikeModel, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentModel, TournamentMatchModel, SeasonMatchModel, IterationModel, Iteration, transformFromIteration, transformToIteration, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformFromSeasonMatch, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentMatch, Tournament, TournamentTeamsModel, MatchRating };
3
+ import { BlockModel, CoachModel, CountryModel, DraftModel, DraftPickModel, EventModel, initModels, IterationModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, PlayerTeamModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, TournamentTeamsModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromIteration, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILeague, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToIteration, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToStage, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, UserModel, MatchRatingModel } from './data';
4
+ export { MatchRatingModel, DraftModel, DraftPickModel, PlayerTeamModel, UserModel, League, Standing, Season, Country, Coach, Role, GeneralStat, PerformanceStats, Formation, Block, EventTypeEnum, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockTypeEnum, LiberoReplacementTypeEnum, BlockFailureEnum, MatchSetState, Match, InPlayEvent, CourtRow, CourtPosition, CourtTargetEnum, formatNumber, generateModifier, getKeys, Draft, DraftPick, MatchTeam, Player, RallyState, randomNumber, ReceptionTypeEnum, ServeFailureEnum, ServeTypeEnum, SetFailureEnum, SetTypeEnum, ReceptionFailureEnum, SpikeFailureEnum, SpikeTypeEnum, Team, shuffle, Trait, getRandomEnumValue, validateUUID, transformToAPILeague, transformFromMatchRating, transformFromPlayerTeam, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, APITrait, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, CountryModel, ScoreModel, CoachModel, RallyPositionModel, LeagueModel, MatchModel, transformToAPICoach, PlayerModel, SeasonTeamsModel, SeasonModel, ServeModel, SetModel, SpikeModel, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentModel, TournamentMatchModel, SeasonMatchModel, IterationModel, Iteration, transformFromIteration, transformToIteration, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformFromSeasonMatch, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentMatch, Tournament, TournamentTeamsModel, MatchRating };
@@ -1,14 +1,17 @@
1
1
  import { Match, MatchTeam } from '.';
2
+ import { Team } from '../team';
2
3
  interface MatchRatingOpts {
3
- readonly homeRating: number;
4
- readonly awayRating: number;
4
+ readonly home: Team;
5
+ readonly away: Team;
6
+ readonly match: Match;
5
7
  }
6
8
  export declare class MatchRating {
7
9
  static K: number;
8
- readonly homeRating: number;
9
- readonly awayRating: number;
10
- constructor({ homeRating, awayRating }: MatchRatingOpts);
10
+ readonly home: Team;
11
+ readonly away: Team;
12
+ readonly match: Match;
13
+ constructor({ home, away, match }: MatchRatingOpts);
11
14
  getWinProbability(team: MatchTeam): number;
12
- getRatingChange(team: MatchTeam, match: Match): number;
15
+ getRatingChange(team: MatchTeam): number;
13
16
  }
14
17
  export {};
@@ -1,25 +1,26 @@
1
1
  import { MatchTeam } from '.';
2
2
  export class MatchRating {
3
- constructor({ homeRating, awayRating }) {
4
- this.homeRating = homeRating;
5
- this.awayRating = awayRating;
3
+ constructor({ home, away, match }) {
4
+ this.home = home;
5
+ this.away = away;
6
+ this.match = match;
6
7
  }
7
8
  getWinProbability(team) {
8
9
  let rA;
9
10
  let rB;
10
11
  if (team === MatchTeam.HOME) {
11
- rA = this.homeRating;
12
- rB = this.awayRating;
12
+ rA = this.home.rating;
13
+ rB = this.away.rating;
13
14
  }
14
15
  else {
15
- rA = this.awayRating;
16
- rB = this.homeRating;
16
+ rA = this.away.rating;
17
+ rB = this.home.rating;
17
18
  }
18
19
  return 1 / (1 + Math.pow(10, ((rB - rA) / 400)));
19
20
  }
20
- getRatingChange(team, match) {
21
- const t = match[team === MatchTeam.HOME ? 'homeTeam' : 'awayTeam'];
22
- const score = match.getWinner().id === t.id ? 1 : 0;
21
+ getRatingChange(team) {
22
+ const t = this.match[team === MatchTeam.HOME ? 'homeTeam' : 'awayTeam'];
23
+ const score = this.match.getWinner().id === t.id ? 1 : 0;
23
24
  return MatchRating.K * (score - this.getWinProbability(team));
24
25
  }
25
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.66",
3
+ "version": "0.0.68",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",