volleyballsimtypes 0.0.19 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/cjs/src/data/index.d.ts +3 -3
  2. package/dist/cjs/src/data/index.js +10 -2
  3. package/dist/cjs/src/data/init-models.d.ts +3 -1
  4. package/dist/cjs/src/data/init-models.js +10 -1
  5. package/dist/cjs/src/data/models/index.d.ts +3 -1
  6. package/dist/cjs/src/data/models/index.js +5 -1
  7. package/dist/cjs/src/data/models/rally-position.d.ts +3 -2
  8. package/dist/cjs/src/data/models/season.d.ts +5 -0
  9. package/dist/cjs/src/data/models/season.js +8 -0
  10. package/dist/cjs/src/data/models/team.d.ts +11 -0
  11. package/dist/cjs/src/data/models/tournament-match.d.ts +29 -0
  12. package/dist/cjs/src/data/models/tournament-match.js +47 -0
  13. package/dist/cjs/src/data/models/tournament.d.ts +34 -0
  14. package/dist/cjs/src/data/models/tournament.js +42 -0
  15. package/dist/cjs/src/data/transformers/index.d.ts +3 -1
  16. package/dist/cjs/src/data/transformers/index.js +10 -2
  17. package/dist/cjs/src/data/transformers/season.js +5 -2
  18. package/dist/cjs/src/data/transformers/tournament-match.d.ts +7 -0
  19. package/dist/cjs/src/data/transformers/tournament-match.js +43 -0
  20. package/dist/cjs/src/data/transformers/tournament.d.ts +7 -0
  21. package/dist/cjs/src/data/transformers/tournament.js +28 -0
  22. package/dist/cjs/src/index.d.ts +4 -4
  23. package/dist/cjs/src/index.js +14 -2
  24. package/dist/cjs/src/routing/index.d.ts +3 -1
  25. package/dist/cjs/src/routing/league.d.ts +1 -0
  26. package/dist/cjs/src/routing/tournament.d.ts +4 -0
  27. package/dist/cjs/src/routing/tournament.js +2 -0
  28. package/dist/cjs/src/service/index.d.ts +2 -1
  29. package/dist/cjs/src/service/index.js +6 -1
  30. package/dist/cjs/src/service/league/season.d.ts +3 -2
  31. package/dist/cjs/src/service/league/season.js +2 -6
  32. package/dist/cjs/src/service/tournament/index.d.ts +3 -0
  33. package/dist/cjs/src/service/tournament/index.js +8 -0
  34. package/dist/cjs/src/service/tournament/tournament-match.d.ts +18 -0
  35. package/dist/cjs/src/service/tournament/tournament-match.js +20 -0
  36. package/dist/cjs/src/service/tournament/tournament.d.ts +15 -0
  37. package/dist/cjs/src/service/tournament/tournament.js +12 -0
  38. package/dist/esm/src/data/index.d.ts +3 -3
  39. package/dist/esm/src/data/index.js +3 -3
  40. package/dist/esm/src/data/init-models.d.ts +3 -1
  41. package/dist/esm/src/data/init-models.js +11 -2
  42. package/dist/esm/src/data/models/index.d.ts +3 -1
  43. package/dist/esm/src/data/models/index.js +3 -1
  44. package/dist/esm/src/data/models/rally-position.d.ts +3 -2
  45. package/dist/esm/src/data/models/season.d.ts +5 -0
  46. package/dist/esm/src/data/models/season.js +8 -0
  47. package/dist/esm/src/data/models/team.d.ts +11 -0
  48. package/dist/esm/src/data/models/tournament-match.d.ts +29 -0
  49. package/dist/esm/src/data/models/tournament-match.js +43 -0
  50. package/dist/esm/src/data/models/tournament.d.ts +34 -0
  51. package/dist/esm/src/data/models/tournament.js +38 -0
  52. package/dist/esm/src/data/transformers/index.d.ts +3 -1
  53. package/dist/esm/src/data/transformers/index.js +3 -1
  54. package/dist/esm/src/data/transformers/season.js +5 -2
  55. package/dist/esm/src/data/transformers/tournament-match.d.ts +7 -0
  56. package/dist/esm/src/data/transformers/tournament-match.js +38 -0
  57. package/dist/esm/src/data/transformers/tournament.d.ts +7 -0
  58. package/dist/esm/src/data/transformers/tournament.js +23 -0
  59. package/dist/esm/src/index.d.ts +4 -4
  60. package/dist/esm/src/index.js +3 -3
  61. package/dist/esm/src/routing/index.d.ts +3 -1
  62. package/dist/esm/src/routing/league.d.ts +1 -0
  63. package/dist/esm/src/routing/tournament.d.ts +4 -0
  64. package/dist/esm/src/routing/tournament.js +1 -0
  65. package/dist/esm/src/service/index.d.ts +2 -1
  66. package/dist/esm/src/service/index.js +2 -1
  67. package/dist/esm/src/service/league/season.d.ts +3 -2
  68. package/dist/esm/src/service/league/season.js +2 -6
  69. package/dist/esm/src/service/tournament/index.d.ts +3 -0
  70. package/dist/esm/src/service/tournament/index.js +3 -0
  71. package/dist/esm/src/service/tournament/tournament-match.d.ts +18 -0
  72. package/dist/esm/src/service/tournament/tournament-match.js +16 -0
  73. package/dist/esm/src/service/tournament/tournament.d.ts +15 -0
  74. package/dist/esm/src/service/tournament/tournament.js +8 -0
  75. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ import { DataTypes, Model } from 'sequelize';
2
+ export class TournamentMatchModel extends Model {
3
+ static initModel(sequelize) {
4
+ return TournamentMatchModel.init({
5
+ tournament_id: {
6
+ type: DataTypes.UUID,
7
+ allowNull: false,
8
+ primaryKey: true
9
+ },
10
+ index: {
11
+ type: DataTypes.INTEGER,
12
+ allowNull: false
13
+ },
14
+ match_id: {
15
+ type: DataTypes.UUID,
16
+ allowNull: false,
17
+ references: {
18
+ model: 'Match',
19
+ key: 'match_id'
20
+ }
21
+ },
22
+ stage: {
23
+ type: DataTypes.ARRAY(DataTypes.ENUM('ROUND_OF_8', 'QUARTERFINALS', 'SEMIFINALS', 'FINAL')),
24
+ allowNull: false
25
+ },
26
+ }, {
27
+ sequelize,
28
+ tableName: 'TournamentMatch',
29
+ schema: 'public',
30
+ timestamps: false,
31
+ indexes: [
32
+ {
33
+ name: 'TournamentMatch_pk',
34
+ unique: true,
35
+ fields: [
36
+ { name: 'tournament_id' },
37
+ { name: 'match_id' },
38
+ ]
39
+ }
40
+ ]
41
+ });
42
+ }
43
+ }
@@ -0,0 +1,34 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model } from 'sequelize';
3
+ import { TournamentMatch } from '../../service/tournament/tournament-match';
4
+ import { TournamentMatchId, TournamentMatchModel } from './tournament-match';
5
+ import { TeamId, TeamModel } from './team';
6
+ export interface TournamentAttributes {
7
+ tournament_id: string;
8
+ iteration: number;
9
+ matches?: TournamentMatch[];
10
+ champion?: string;
11
+ }
12
+ export type TournamentPk = 'tournament_id';
13
+ export type TournamentId = TournamentModel[TournamentPk];
14
+ export type TournamentCreationAttributes = TournamentAttributes;
15
+ export declare class TournamentModel extends Model<TournamentAttributes, TournamentCreationAttributes> implements TournamentAttributes {
16
+ tournament_id: string;
17
+ iteration: number;
18
+ Matches: TournamentMatchModel[];
19
+ getMatches: Sequelize.HasManyGetAssociationsMixin<TournamentMatchModel>;
20
+ setMatches: Sequelize.HasManySetAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
21
+ addMatch: Sequelize.HasManyAddAssociationMixin<TournamentMatchModel, TournamentMatchId>;
22
+ addMatches: Sequelize.HasManyAddAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
23
+ createMatch: Sequelize.HasManyCreateAssociationMixin<TournamentMatchModel>;
24
+ removeMatch: Sequelize.HasManyRemoveAssociationMixin<TournamentMatchModel, TournamentMatchId>;
25
+ removeMatches: Sequelize.HasManyRemoveAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
26
+ hasMatch: Sequelize.HasManyHasAssociationMixin<TournamentMatchModel, TournamentMatchId>;
27
+ hasMatches: Sequelize.HasManyHasAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
28
+ countMatches: Sequelize.HasManyCountAssociationsMixin;
29
+ Champion: TeamModel;
30
+ getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
31
+ setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
32
+ createChampion: Sequelize.BelongsToCreateAssociationMixin<TeamModel>;
33
+ static initModel(sequelize: Sequelize.Sequelize): typeof TournamentModel;
34
+ }
@@ -0,0 +1,38 @@
1
+ import { DataTypes, Model } from 'sequelize';
2
+ export class TournamentModel extends Model {
3
+ static initModel(sequelize) {
4
+ return TournamentModel.init({
5
+ tournament_id: {
6
+ type: DataTypes.UUID,
7
+ allowNull: false,
8
+ primaryKey: true
9
+ },
10
+ iteration: {
11
+ type: DataTypes.INTEGER,
12
+ allowNull: false
13
+ },
14
+ champion: {
15
+ type: DataTypes.UUID,
16
+ allowNull: true,
17
+ references: {
18
+ model: 'Team',
19
+ key: 'team_id'
20
+ }
21
+ }
22
+ }, {
23
+ sequelize,
24
+ tableName: 'Tournament',
25
+ schema: 'public',
26
+ timestamps: false,
27
+ indexes: [
28
+ {
29
+ name: 'Tournament_pk',
30
+ unique: true,
31
+ fields: [
32
+ { name: 'tournament_id' }
33
+ ]
34
+ }
35
+ ]
36
+ });
37
+ }
38
+ }
@@ -7,6 +7,8 @@ import { transformFromEventType, transformToEventType } from './event-type';
7
7
  import { transformFromFormation, transformToFormation } from './formation';
8
8
  import { transformFromLeague, transformToLeague } from './league';
9
9
  import { transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement } from './libero-replacement';
10
+ import { transformFromTournament, transformToAPITournament, transformToTournament } from './tournament';
11
+ import { transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch } from './tournament-match';
10
12
  import { transformFromMatch, transformToAPIMatch, transformToMatch } from './match';
11
13
  import { transformFromMatchSet, transformToAPIMatchSet, transformToMatchSet } from './match-set';
12
14
  import { transformFromMatchSetStats, transformToAPIMatchSetStats, transformToMatchSetStats } from './match-set-stats';
@@ -24,4 +26,4 @@ import { transformFromSpike, transformToAPISpike, transformToSpike } from './spi
24
26
  import { transformFromSubstitution, transformToAPISubstitution, transformToSubstitution } from './substitution';
25
27
  import { transformFromTeam, transformToAPITeam, transformToTeam } from './team';
26
28
  import { transformFromTrait, transformToAPITrait, transformToTrait } from './trait';
27
- export { transformFromBlock, transformToAPICoach, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
29
+ export { transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, transformFromBlock, transformToAPICoach, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
@@ -7,6 +7,8 @@ import { transformFromEventType, transformToEventType } from './event-type';
7
7
  import { transformFromFormation, transformToFormation } from './formation';
8
8
  import { transformFromLeague, transformToLeague, } from './league';
9
9
  import { transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement } from './libero-replacement';
10
+ import { transformFromTournament, transformToAPITournament, transformToTournament } from './tournament';
11
+ import { transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, } from './tournament-match';
10
12
  import { transformFromMatch, transformToAPIMatch, transformToMatch } from './match';
11
13
  import { transformFromMatchSet, transformToAPIMatchSet, transformToMatchSet } from './match-set';
12
14
  import { transformFromMatchSetStats, transformToAPIMatchSetStats, transformToMatchSetStats } from './match-set-stats';
@@ -24,4 +26,4 @@ import { transformFromSpike, transformToAPISpike, transformToSpike } from './spi
24
26
  import { transformFromSubstitution, transformToAPISubstitution, transformToSubstitution } from './substitution';
25
27
  import { transformFromTeam, transformToAPITeam, transformToTeam } from './team';
26
28
  import { transformFromTrait, transformToAPITrait, transformToTrait } from './trait';
27
- export { transformFromBlock, transformToAPICoach, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
29
+ export { transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, transformFromBlock, transformToAPICoach, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
@@ -6,7 +6,8 @@ function transformToAttributes(season, leagueId) {
6
6
  return {
7
7
  season_id: season.id,
8
8
  iteration: season.iteration,
9
- league_id: leagueId
9
+ league_id: leagueId,
10
+ champion: season.champion != null ? season.champion.id : undefined
10
11
  };
11
12
  }
12
13
  function transformToObject(model) {
@@ -15,6 +16,7 @@ function transformToObject(model) {
15
16
  matches: model.Matches != null ? model.Matches.map(transformToMatch) : [],
16
17
  iteration: model.iteration,
17
18
  teams: model.seasonTeams != null ? model.seasonTeams.map(transformToTeam) : [],
19
+ champion: model.Champion != null ? transformToTeam(model.Champion) : undefined
18
20
  });
19
21
  }
20
22
  function transformToAPIObject(model) {
@@ -25,7 +27,8 @@ function transformToAPIObject(model) {
25
27
  iteration: model.iteration,
26
28
  teams: model.seasonTeams != null ? model.seasonTeams.map(transformToAPITeam) : [],
27
29
  league: transformToLeague(model.league),
28
- standings: season.standings
30
+ standings: season.standings,
31
+ champion: model.Champion != null ? transformToAPITeam(model.Champion) : undefined
29
32
  };
30
33
  }
31
34
  export { transformToObject as transformToSeason, transformToAPIObject as transformToAPISeason, transformToAttributes as transformFromSeason };
@@ -0,0 +1,7 @@
1
+ import { TournamentMatchAttributes, TournamentMatchModel } from '../models';
2
+ import { Tournament, TournamentMatch } from '../../service';
3
+ import { APITournamentMatch } from '../../routing';
4
+ declare function transformToAttributes(match: TournamentMatch, tournament: Tournament): TournamentMatchAttributes;
5
+ declare function transformToObject(model: TournamentMatchModel): TournamentMatch;
6
+ declare function transformToAPIObject(model: TournamentMatchModel): APITournamentMatch;
7
+ export { transformToObject as transformToTournamentMatch, transformToAPIObject as transformToAPITournamentMatch, transformToAttributes as transformFromTournamentMatch };
@@ -0,0 +1,38 @@
1
+ import { Stage, TournamentMatch } from '../../service';
2
+ import { transformToMatch } from './match';
3
+ function transformToStage(stage) {
4
+ switch (stage) {
5
+ case Stage.ROUND_OF_8:
6
+ return 'ROUND_OF_8';
7
+ case Stage.QUARTERFINALS:
8
+ return 'QUARTERFINALS';
9
+ case Stage.SEMIFINALS:
10
+ return 'SEMIFINALS';
11
+ case Stage.FINAL:
12
+ return 'FINAL';
13
+ default:
14
+ throw new Error('UNKNOWN_ROLE');
15
+ }
16
+ }
17
+ function transformFromStage(s) {
18
+ return Stage[s];
19
+ }
20
+ function transformToAttributes(match, tournament) {
21
+ return {
22
+ tournament_id: tournament.id,
23
+ match_id: match.match.id,
24
+ index: match.index,
25
+ stage: transformToStage(match.stage)
26
+ };
27
+ }
28
+ function transformToObject(model) {
29
+ return new TournamentMatch({
30
+ stage: transformFromStage(model.stage),
31
+ match: transformToMatch(model.match),
32
+ index: model.index
33
+ });
34
+ }
35
+ function transformToAPIObject(model) {
36
+ return {};
37
+ }
38
+ export { transformToObject as transformToTournamentMatch, transformToAPIObject as transformToAPITournamentMatch, transformToAttributes as transformFromTournamentMatch };
@@ -0,0 +1,7 @@
1
+ import { TournamentAttributes, TournamentModel } from '../models';
2
+ import { Tournament } from '../../service';
3
+ import { APITournament } from '../../routing';
4
+ declare function transformToAttributes(tournament: Tournament): TournamentAttributes;
5
+ declare function transformToObject(model: TournamentModel): Tournament;
6
+ declare function transformToAPIObject(model: TournamentModel): APITournament;
7
+ export { transformToObject as transformToTournament, transformToAPIObject as transformToAPITournament, transformToAttributes as transformFromTournament };
@@ -0,0 +1,23 @@
1
+ import { transformToTeam } from './team';
2
+ import { Tournament } from '../../service';
3
+ import { transformToTournamentMatch } from './tournament-match';
4
+ function transformToAttributes(tournament) {
5
+ return {
6
+ tournament_id: tournament.id,
7
+ iteration: tournament.iteration,
8
+ matches: tournament.matches != null ? tournament.matches : [],
9
+ champion: tournament.champion != null ? tournament.champion.id : undefined
10
+ };
11
+ }
12
+ function transformToObject(model) {
13
+ return new Tournament({
14
+ id: model.tournament_id,
15
+ iteration: model.iteration,
16
+ matches: model.Matches.map(transformToTournamentMatch),
17
+ champion: model.Champion != null ? transformToTeam(model.Champion) : undefined
18
+ });
19
+ }
20
+ function transformToAPIObject(model) {
21
+ return {};
22
+ }
23
+ export { transformToObject as transformToTournament, transformToAPIObject as transformToAPITournament, transformToAttributes as transformFromTournament };
@@ -1,4 +1,4 @@
1
- import { Block, BlockFailure, BlockType, Coach, CoachOpts, Country, CountryOpts, CourtPosition, CourtRow, CourtTarget, EventStat, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, League, LeagueOpts, LiberoReplacement, LiberoReplacementOpts, LiberoReplacementType, Match, MatchSet, MatchSetOpts, MatchSetState, MatchTeam, Name, PerformanceStats, PerformanceStatsOpts, Player, PlayerOpts, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, SeasonOpts, Serve, ServeFailure, ServeType, Set, SetFailure, SetStatistics, SetType, shuffle, Spike, SpikeFailure, SpikeType, Standing, StandingOpts, Stat, SubPriority, Substitution, SubstitutionOpts, Team, TeamOpts, Trait, validateUUID } from './service';
2
- import { APIBlock, APICoach, APIEvent, APIInPlayEvent, APILeague, APILiberoReplacement, APIMatch, APIMatchSet, APIPlayer, APIRally, APIReception, APIScore, APISeason, APIServe, APISet, APISetStatistics, APISpike, APISubstitution, APITeam, APITrait } from './routing';
3
- import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, initModels, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, MatchAttributes, MatchCreationAttributes, MatchId, MatchModel, MatchPk, MatchSetAttributes, MatchSetCreationAttributes, MatchSetId, MatchSetModel, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsModel, MatchSetStatsOptionalAttributes, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerAttributes, PlayerCreationAttributes, PlayerId, PlayerModel, PlayerPk, RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, ReceptionModel, ReceptionPk, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk, SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk, SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TraitType, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait } from './data';
4
- export { League, Standing, LeagueOpts, CountryOpts, SeasonOpts, Season, StandingOpts, Country, CoachOpts, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, PerformanceStatsOpts, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, MatchSetOpts, LiberoReplacementOpts, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Name, PlayerOpts, Player, RallyState, PlayerPosition, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetStatistics, SetType, ReceptionFailure, SpikeFailure, SpikeType, SubstitutionOpts, Team, shuffle, TeamOpts, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APISetStatistics, initModels, BlockId, BlockModel, RallyModel, RallyId, EventId, EventModel, MatchSetId, MatchSetModel, PerformanceStatsModel, PerformanceStatsId, BlockAttributes, LiberoReplacementId, LiberoReplacementModel, BlockPk, MatchSetStatsId, MatchSetStatsModel, BlockCreationAttributes, ReceptionId, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CoachId, CountryId, CountryModel, CoachCreationAttributes, CoachPk, ScoreId, ScoreModel, CoachModel, RallyPositionId, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, CountryCreationAttributes, CountryPk, EventAttributes, EventPk, EventCreationAttributes, LeagueAttributes, LeagueId, LeagueCreationAttributes, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementPk, MatchAttributes, MatchId, MatchPk, MatchCreationAttributes, MatchModel, MatchSetAttributes, MatchSetCreationAttributes, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerCreationAttributes, PlayerAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyAttributes, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPk, RallyPositionPk, ReceptionCreationAttributes, ReceptionAttributes, ReceptionPk, ScoreCreationAttributes, ScoreAttributes, ScorePk, SeasonCreationAttributes, SeasonAttributes, SeasonId, SeasonTeamsAttributes, PlayerModel, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonModel, SeasonTeamsPk, ServeCreationAttributes, ServeAttributes, ServeId, ServeModel, SetAttributes, ServePk, SetId, SetModel, SetPk, SetCreationAttributes, SpikeCreationAttributes, SpikeAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionCreationAttributes, SubstitutionAttributes, TeamAttributes, TeamId, TeamModel, TeamPk, SubstitutionId, SubstitutionModel, TeamCreationAttributes, SubstitutionPk, RoleType, TraitType, 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, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole };
1
+ import { Block, BlockFailure, BlockType, Coach, CoachOpts, Country, CountryOpts, CourtPosition, CourtRow, CourtTarget, EventStat, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, League, LeagueOpts, LiberoReplacement, LiberoReplacementOpts, LiberoReplacementType, Match, MatchSet, MatchSetOpts, MatchSetState, MatchTeam, Name, PerformanceStats, PerformanceStatsOpts, Player, PlayerOpts, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, SeasonOpts, Serve, ServeFailure, ServeType, Set, SetFailure, SetStatistics, SetType, shuffle, Spike, SpikeFailure, SpikeType, Stage, Standing, StandingOpts, Stat, SubPriority, Substitution, SubstitutionOpts, Team, TeamOpts, Tournament, TournamentMatch, TournamentOpts, TournamentStageOpts, Trait, validateUUID } from './service';
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 './routing';
3
+ import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, initModels, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, MatchAttributes, MatchCreationAttributes, MatchId, MatchModel, MatchPk, MatchSetAttributes, MatchSetCreationAttributes, MatchSetId, MatchSetModel, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsModel, MatchSetStatsOptionalAttributes, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerAttributes, PlayerCreationAttributes, PlayerId, PlayerModel, PlayerPk, RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, ReceptionModel, ReceptionPk, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk, SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk, SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentModel, TournamentPk, TournamentStage, TraitType, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait } from './data';
4
+ export { League, Standing, LeagueOpts, CountryOpts, SeasonOpts, Season, StandingOpts, Country, CoachOpts, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, PerformanceStatsOpts, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, MatchSetOpts, LiberoReplacementOpts, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Name, PlayerOpts, Player, RallyState, PlayerPosition, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetStatistics, SetType, ReceptionFailure, SpikeFailure, SpikeType, SubstitutionOpts, Team, shuffle, TeamOpts, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockId, BlockModel, RallyModel, RallyId, EventId, EventModel, MatchSetId, MatchSetModel, PerformanceStatsModel, PerformanceStatsId, BlockAttributes, LiberoReplacementId, LiberoReplacementModel, BlockPk, MatchSetStatsId, MatchSetStatsModel, BlockCreationAttributes, ReceptionId, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CoachId, CountryId, CountryModel, CoachCreationAttributes, CoachPk, ScoreId, ScoreModel, CoachModel, RallyPositionId, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, CountryCreationAttributes, CountryPk, EventAttributes, EventPk, EventCreationAttributes, LeagueAttributes, LeagueId, LeagueCreationAttributes, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementPk, MatchAttributes, MatchId, MatchPk, MatchCreationAttributes, MatchModel, MatchSetAttributes, MatchSetCreationAttributes, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerCreationAttributes, PlayerAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyAttributes, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPk, RallyPositionPk, ReceptionCreationAttributes, ReceptionAttributes, ReceptionPk, ScoreCreationAttributes, ScoreAttributes, ScorePk, SeasonCreationAttributes, SeasonAttributes, SeasonId, SeasonTeamsAttributes, PlayerModel, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonModel, SeasonTeamsPk, ServeCreationAttributes, ServeAttributes, ServeId, ServeModel, SetAttributes, ServePk, SetId, SetModel, SetPk, SetCreationAttributes, SpikeCreationAttributes, SpikeAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionCreationAttributes, SubstitutionAttributes, TeamAttributes, TeamId, TeamModel, TeamPk, SubstitutionId, SubstitutionModel, TeamCreationAttributes, SubstitutionPk, RoleType, TraitType, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, 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, 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, TournamentStageOpts, TournamentMatch, Tournament, TournamentOpts, };
@@ -1,4 +1,4 @@
1
- import { Block, BlockFailure, BlockType, Coach, Country, CourtPosition, CourtRow, CourtTarget, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, League, LiberoReplacement, LiberoReplacementType, Match, MatchSet, MatchSetState, MatchTeam, PerformanceStats, Player, Rally, RallyEvent, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, Serve, ServeFailure, ServeType, Set, SetFailure, SetType, shuffle, Spike, SpikeFailure, SpikeType, Standing, Substitution, Team, Trait, validateUUID } from './service';
1
+ import { Block, BlockFailure, BlockType, Coach, Country, CourtPosition, CourtRow, CourtTarget, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, League, LiberoReplacement, LiberoReplacementType, Match, MatchSet, MatchSetState, MatchTeam, PerformanceStats, Player, Rally, RallyEvent, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, Serve, ServeFailure, ServeType, Set, SetFailure, SetType, shuffle, Spike, SpikeFailure, SpikeType, Stage, Standing, Substitution, Team, Tournament, TournamentMatch, Trait, validateUUID } from './service';
2
2
  import { APITrait } from './routing';
3
- import { BlockModel, CoachModel, CountryModel, EventModel, initModels, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait } from './data';
4
- export { League, Standing, Season, Country, Coach, Role, GeneralStat, PerformanceStats, Formation, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Player, RallyState, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetType, ReceptionFailure, SpikeFailure, SpikeType, Team, shuffle, Trait, getRandomEnumValue, validateUUID, APITrait, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, CountryModel, ScoreModel, CoachModel, RallyPositionModel, LeagueModel, MatchModel, transformToAPICoach, PlayerModel, SeasonTeamsModel, SeasonModel, ServeModel, SetModel, SpikeModel, TeamModel, SubstitutionModel, 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, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole };
3
+ import { BlockModel, CoachModel, CountryModel, EventModel, initModels, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait } from './data';
4
+ export { League, Standing, Season, Country, Coach, Role, GeneralStat, PerformanceStats, Formation, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Player, RallyState, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetType, ReceptionFailure, SpikeFailure, SpikeType, Team, shuffle, Trait, getRandomEnumValue, validateUUID, APITrait, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, CountryModel, ScoreModel, CoachModel, RallyPositionModel, LeagueModel, MatchModel, transformToAPICoach, PlayerModel, SeasonTeamsModel, SeasonModel, ServeModel, SetModel, SpikeModel, TeamModel, SubstitutionModel, TournamentModel, TournamentMatchModel, 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, 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, };
@@ -4,4 +4,6 @@ import { APIMatch, APIMatchSet, APIRally, APISetStatistics } from './match';
4
4
  import { APIPlayer, APITrait } from './player';
5
5
  import { APITeam } from './team';
6
6
  import { APICoach } from './coach';
7
- export { APICoach, APITeam, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APIMatchSet, APISetStatistics, APIInPlayEvent, APILeague, APIMatch, APIPlayer, APISeason, APIEvent, APILiberoReplacement, APIBlock, APITrait, APIRally };
7
+ import { APITournament } from './tournament';
8
+ import { APITournamentMatch } from './tournament';
9
+ export { APICoach, APITeam, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APIMatchSet, APISetStatistics, APIInPlayEvent, APILeague, APIMatch, APIPlayer, APISeason, APIEvent, APILiberoReplacement, APIBlock, APITrait, APIRally, APITournament, APITournamentMatch };
@@ -10,4 +10,5 @@ export interface APISeason {
10
10
  iteration: number;
11
11
  standings: Standing[];
12
12
  league: League;
13
+ champion?: APITeam;
13
14
  }
@@ -0,0 +1,4 @@
1
+ export interface APITournament {
2
+ }
3
+ export interface APITournamentMatch {
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -14,5 +14,6 @@ import { Spike, SpikeFailure, SpikeType } from './event/spike';
14
14
  import { Block, BlockFailure, BlockType } from './event/block';
15
15
  import { GeneralStat, Name, PerformanceStats, PerformanceStatsOpts, Player, PlayerOpts, Role, Stat, Trait } from './player';
16
16
  import { League, LeagueOpts, Season, SeasonOpts, Standing, StandingOpts } from './league';
17
+ import { Stage, Tournament, TournamentMatch, TournamentOpts, TournamentStageOpts } from './tournament';
17
18
  import { formatNumber, generateModifier, getKeys, getRandomEnumValue, randomNumber, shuffle, validateUUID } from './utils';
18
- export { Block, BlockFailure, BlockType, Coach, CoachOpts, Country, CountryOpts, CourtPosition, CourtRow, CourtTarget, EventStat, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, League, LeagueOpts, LiberoReplacement, LiberoReplacementOpts, LiberoReplacementType, Match, MatchSet, MatchSetOpts, MatchSetState, MatchTeam, Name, PerformanceStats, PerformanceStatsOpts, Player, PlayerOpts, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, SeasonOpts, Serve, ServeFailure, ServeType, Set, SetFailure, SetStatistics, SetType, shuffle, Spike, SpikeFailure, SpikeType, Standing, StandingOpts, Stat, SubPriority, Substitution, SubstitutionOpts, Team, TeamOpts, Trait, validateUUID };
19
+ export { Stage, TournamentStageOpts, TournamentMatch, Tournament, TournamentOpts, Block, BlockFailure, BlockType, Coach, CoachOpts, Country, CountryOpts, CourtPosition, CourtRow, CourtTarget, EventStat, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, League, LeagueOpts, LiberoReplacement, LiberoReplacementOpts, LiberoReplacementType, Match, MatchSet, MatchSetOpts, MatchSetState, MatchTeam, Name, PerformanceStats, PerformanceStatsOpts, Player, PlayerOpts, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, SeasonOpts, Serve, ServeFailure, ServeType, Set, SetFailure, SetStatistics, SetType, shuffle, Spike, SpikeFailure, SpikeType, Standing, StandingOpts, Stat, SubPriority, Substitution, SubstitutionOpts, Team, TeamOpts, Trait, validateUUID };
@@ -14,5 +14,6 @@ import { Spike, SpikeFailure, SpikeType, } from './event/spike';
14
14
  import { Block, BlockFailure, BlockType, } from './event/block';
15
15
  import { GeneralStat, PerformanceStats, Player, Role, Trait, } from './player';
16
16
  import { League, Season, Standing, } from './league';
17
+ import { Stage, Tournament, TournamentMatch } from './tournament';
17
18
  import { formatNumber, generateModifier, getKeys, getRandomEnumValue, randomNumber, shuffle, validateUUID, } from './utils';
18
- export { Block, BlockFailure, BlockType, Coach, Country, CourtPosition, CourtRow, CourtTarget, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, League, LiberoReplacement, LiberoReplacementType, Match, MatchSet, MatchSetState, MatchTeam, PerformanceStats, Player, Rally, RallyEvent, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, Serve, ServeFailure, ServeType, Set, SetFailure, SetType, shuffle, Spike, SpikeFailure, SpikeType, Standing, Substitution, Team, Trait, validateUUID };
19
+ export { Stage, TournamentMatch, Tournament, Block, BlockFailure, BlockType, Coach, Country, CourtPosition, CourtRow, CourtTarget, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, League, LiberoReplacement, LiberoReplacementType, Match, MatchSet, MatchSetState, MatchTeam, PerformanceStats, Player, Rally, RallyEvent, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, Serve, ServeFailure, ServeType, Set, SetFailure, SetType, shuffle, Spike, SpikeFailure, SpikeType, Standing, Substitution, Team, Trait, validateUUID };
@@ -6,6 +6,7 @@ export interface SeasonOpts {
6
6
  readonly teams: Team[];
7
7
  readonly matches: Match[];
8
8
  readonly iteration: number;
9
+ readonly champion?: Team;
9
10
  }
10
11
  export declare class Season {
11
12
  readonly id: string;
@@ -13,7 +14,7 @@ export declare class Season {
13
14
  readonly matches: Match[];
14
15
  readonly iteration: number;
15
16
  readonly standings: Standing[];
16
- constructor({ id, iteration, teams, matches }: SeasonOpts);
17
- get champion(): Team | undefined;
17
+ champion?: Team;
18
+ constructor({ id, iteration, teams, matches, champion }: SeasonOpts);
18
19
  calculateStandings(): Standing[];
19
20
  }
@@ -1,16 +1,12 @@
1
1
  import { Standing } from './standing';
2
2
  export class Season {
3
- constructor({ id, iteration, teams, matches }) {
3
+ constructor({ id, iteration, teams, matches, champion }) {
4
4
  this.id = id;
5
5
  this.teams = teams;
6
6
  this.matches = matches;
7
7
  this.iteration = iteration;
8
8
  this.standings = this.calculateStandings();
9
- }
10
- get champion() {
11
- if (this.matches.every(match => !match.isOver()))
12
- return undefined;
13
- return this.teams.find(team => team.id === this.standings[0].teamId);
9
+ this.champion = champion;
14
10
  }
15
11
  calculateStandings() {
16
12
  return this.teams.map(team => {
@@ -0,0 +1,3 @@
1
+ import { Tournament, TournamentOpts } from './tournament';
2
+ import { Stage, TournamentMatch, TournamentStageOpts } from './tournament-match';
3
+ export { TournamentOpts, TournamentStageOpts, TournamentMatch, Stage, Tournament };
@@ -0,0 +1,3 @@
1
+ import { Tournament } from './tournament';
2
+ import { Stage, TournamentMatch } from './tournament-match';
3
+ export { TournamentMatch, Stage, Tournament };
@@ -0,0 +1,18 @@
1
+ import { Match } from '../match';
2
+ export declare enum Stage {
3
+ ROUND_OF_8 = 8,
4
+ QUARTERFINALS = 4,
5
+ SEMIFINALS = 2,
6
+ FINAL = 1
7
+ }
8
+ export interface TournamentStageOpts {
9
+ readonly stage: Stage;
10
+ readonly match: Match;
11
+ readonly index: number;
12
+ }
13
+ export declare class TournamentMatch {
14
+ readonly stage: Stage;
15
+ readonly match: Match;
16
+ readonly index: number;
17
+ constructor({ stage, match, index }: TournamentStageOpts);
18
+ }
@@ -0,0 +1,16 @@
1
+ export var Stage;
2
+ (function (Stage) {
3
+ Stage[Stage["ROUND_OF_8"] = 8] = "ROUND_OF_8";
4
+ Stage[Stage["QUARTERFINALS"] = 4] = "QUARTERFINALS";
5
+ Stage[Stage["SEMIFINALS"] = 2] = "SEMIFINALS";
6
+ Stage[Stage["FINAL"] = 1] = "FINAL";
7
+ })(Stage || (Stage = {}));
8
+ export class TournamentMatch {
9
+ constructor({ stage, match, index }) {
10
+ if (index > stage || index < 0)
11
+ throw new Error('INDEX_OUT_OF_BOUNDS');
12
+ this.stage = stage;
13
+ this.match = match;
14
+ this.index = index;
15
+ }
16
+ }
@@ -0,0 +1,15 @@
1
+ import { TournamentMatch } from './tournament-match';
2
+ import { Team } from '../team';
3
+ export interface TournamentOpts {
4
+ readonly id: string;
5
+ readonly iteration: number;
6
+ readonly matches: TournamentMatch[];
7
+ readonly champion?: Team;
8
+ }
9
+ export declare class Tournament {
10
+ readonly id: string;
11
+ readonly iteration: number;
12
+ readonly matches: TournamentMatch[];
13
+ champion?: Team;
14
+ constructor({ id, iteration, matches, champion }: TournamentOpts);
15
+ }
@@ -0,0 +1,8 @@
1
+ export class Tournament {
2
+ constructor({ id, iteration, matches, champion }) {
3
+ this.id = id;
4
+ this.iteration = iteration;
5
+ this.matches = matches;
6
+ this.champion = champion;
7
+ }
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",