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
@@ -1,4 +1,4 @@
1
- import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, 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 } from './models';
2
- import { 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 './transformers';
1
+ import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, 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 } from './models';
2
+ import { 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 './transformers';
3
3
  import { initModels } from './init-models';
4
- export { initModels, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, 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, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToAPICoach, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
4
+ export { initModels, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, 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, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToAPICoach, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformToAPIBlock = exports.transformFromTrait = exports.transformFromTeam = exports.transformFromSubstitution = exports.transformFromSpike = exports.transformFromSet = exports.transformFromServe = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromRally = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromPerformanceStats = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformFromMatch = exports.transformFromLiberoReplacement = exports.transformFromLeague = exports.transformFromFormation = exports.transformFromEventType = exports.transformFromCourtTarget = exports.transformFromCourtPosition = exports.transformFromCountry = exports.transformFromCoach = exports.transformFromBlock = exports.TeamModel = exports.SubstitutionModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonTeamsModel = exports.SeasonModel = exports.ScoreModel = exports.ReceptionModel = exports.RallyPositionModel = exports.RallyModel = exports.PlayerModel = exports.PerformanceStatsModel = exports.MatchSetStatsModel = exports.MatchSetModel = exports.MatchModel = exports.LiberoReplacementModel = exports.LeagueModel = exports.EventModel = exports.CountryModel = exports.CoachModel = exports.BlockModel = exports.initModels = void 0;
4
- exports.transformToTrait = exports.transformToTeam = exports.transformToSubstitution = exports.transformToSpike = exports.transformToSet = exports.transformToServe = exports.transformToSeason = exports.transformToScore = exports.transformToRole = exports.transformToReception = exports.transformToRally = exports.transformToPlayerPosition = exports.transformToPlayer = exports.transformToPerformanceStats = exports.transformToMatchSetStats = exports.transformToMatchSet = exports.transformToMatch = exports.transformToAPICoach = exports.transformToLiberoReplacement = exports.transformToLeague = exports.transformToFormation = exports.transformToEventType = exports.transformToCourtTarget = exports.transformToCourtPosition = exports.transformToCountry = exports.transformToCoach = exports.transformToBlock = exports.transformToAPITrait = exports.transformToAPITeam = exports.transformToAPISubstitution = exports.transformToAPISpike = exports.transformToAPISet = exports.transformToAPIServe = exports.transformToAPISeason = exports.transformToAPIScore = exports.transformToAPIReception = exports.transformToAPIRally = exports.transformToAPIPlayer = exports.transformToAPIMatchSetStats = exports.transformToAPIMatchSet = exports.transformToAPIMatch = exports.transformToAPILiberoReplacement = void 0;
3
+ exports.transformFromTeam = exports.transformFromSubstitution = exports.transformFromSpike = exports.transformFromSet = exports.transformFromServe = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromRally = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromPerformanceStats = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformFromMatch = exports.transformFromLiberoReplacement = exports.transformFromLeague = exports.transformFromFormation = exports.transformFromEventType = exports.transformFromCourtTarget = exports.transformFromCourtPosition = exports.transformFromCountry = exports.transformFromCoach = exports.transformFromBlock = exports.TeamModel = exports.SubstitutionModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonTeamsModel = exports.SeasonModel = exports.ScoreModel = exports.ReceptionModel = exports.RallyPositionModel = exports.RallyModel = exports.PlayerModel = exports.PerformanceStatsModel = exports.MatchSetStatsModel = exports.MatchSetModel = exports.MatchModel = exports.LiberoReplacementModel = exports.LeagueModel = exports.EventModel = exports.CountryModel = exports.CoachModel = exports.BlockModel = exports.TournamentMatchModel = exports.TournamentModel = exports.initModels = void 0;
4
+ exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = exports.transformToTournament = exports.transformToAPITournament = exports.transformFromTournament = exports.transformToTrait = exports.transformToTeam = exports.transformToSubstitution = exports.transformToSpike = exports.transformToSet = exports.transformToServe = exports.transformToSeason = exports.transformToScore = exports.transformToRole = exports.transformToReception = exports.transformToRally = exports.transformToPlayerPosition = exports.transformToPlayer = exports.transformToPerformanceStats = exports.transformToMatchSetStats = exports.transformToMatchSet = exports.transformToMatch = exports.transformToAPICoach = exports.transformToLiberoReplacement = exports.transformToLeague = exports.transformToFormation = exports.transformToEventType = exports.transformToCourtTarget = exports.transformToCourtPosition = exports.transformToCountry = exports.transformToCoach = exports.transformToBlock = exports.transformToAPITrait = exports.transformToAPITeam = exports.transformToAPISubstitution = exports.transformToAPISpike = exports.transformToAPISet = exports.transformToAPIServe = exports.transformToAPISeason = exports.transformToAPIScore = exports.transformToAPIReception = exports.transformToAPIRally = exports.transformToAPIPlayer = exports.transformToAPIMatchSetStats = exports.transformToAPIMatchSet = exports.transformToAPIMatch = exports.transformToAPILiberoReplacement = exports.transformToAPIBlock = exports.transformFromTrait = void 0;
5
5
  const models_1 = require("./models");
6
6
  Object.defineProperty(exports, "BlockModel", { enumerable: true, get: function () { return models_1.BlockModel; } });
7
7
  Object.defineProperty(exports, "CoachModel", { enumerable: true, get: function () { return models_1.CoachModel; } });
@@ -25,6 +25,8 @@ Object.defineProperty(exports, "SetModel", { enumerable: true, get: function ()
25
25
  Object.defineProperty(exports, "SpikeModel", { enumerable: true, get: function () { return models_1.SpikeModel; } });
26
26
  Object.defineProperty(exports, "SubstitutionModel", { enumerable: true, get: function () { return models_1.SubstitutionModel; } });
27
27
  Object.defineProperty(exports, "TeamModel", { enumerable: true, get: function () { return models_1.TeamModel; } });
28
+ Object.defineProperty(exports, "TournamentMatchModel", { enumerable: true, get: function () { return models_1.TournamentMatchModel; } });
29
+ Object.defineProperty(exports, "TournamentModel", { enumerable: true, get: function () { return models_1.TournamentModel; } });
28
30
  const transformers_1 = require("./transformers");
29
31
  Object.defineProperty(exports, "transformFromBlock", { enumerable: true, get: function () { return transformers_1.transformFromBlock; } });
30
32
  Object.defineProperty(exports, "transformFromCoach", { enumerable: true, get: function () { return transformers_1.transformFromCoach; } });
@@ -51,6 +53,8 @@ Object.defineProperty(exports, "transformFromSet", { enumerable: true, get: func
51
53
  Object.defineProperty(exports, "transformFromSpike", { enumerable: true, get: function () { return transformers_1.transformFromSpike; } });
52
54
  Object.defineProperty(exports, "transformFromSubstitution", { enumerable: true, get: function () { return transformers_1.transformFromSubstitution; } });
53
55
  Object.defineProperty(exports, "transformFromTeam", { enumerable: true, get: function () { return transformers_1.transformFromTeam; } });
56
+ Object.defineProperty(exports, "transformFromTournament", { enumerable: true, get: function () { return transformers_1.transformFromTournament; } });
57
+ Object.defineProperty(exports, "transformFromTournamentMatch", { enumerable: true, get: function () { return transformers_1.transformFromTournamentMatch; } });
54
58
  Object.defineProperty(exports, "transformFromTrait", { enumerable: true, get: function () { return transformers_1.transformFromTrait; } });
55
59
  Object.defineProperty(exports, "transformToAPIBlock", { enumerable: true, get: function () { return transformers_1.transformToAPIBlock; } });
56
60
  Object.defineProperty(exports, "transformToAPICoach", { enumerable: true, get: function () { return transformers_1.transformToAPICoach; } });
@@ -68,6 +72,8 @@ Object.defineProperty(exports, "transformToAPISet", { enumerable: true, get: fun
68
72
  Object.defineProperty(exports, "transformToAPISpike", { enumerable: true, get: function () { return transformers_1.transformToAPISpike; } });
69
73
  Object.defineProperty(exports, "transformToAPISubstitution", { enumerable: true, get: function () { return transformers_1.transformToAPISubstitution; } });
70
74
  Object.defineProperty(exports, "transformToAPITeam", { enumerable: true, get: function () { return transformers_1.transformToAPITeam; } });
75
+ Object.defineProperty(exports, "transformToAPITournament", { enumerable: true, get: function () { return transformers_1.transformToAPITournament; } });
76
+ Object.defineProperty(exports, "transformToAPITournamentMatch", { enumerable: true, get: function () { return transformers_1.transformToAPITournamentMatch; } });
71
77
  Object.defineProperty(exports, "transformToAPITrait", { enumerable: true, get: function () { return transformers_1.transformToAPITrait; } });
72
78
  Object.defineProperty(exports, "transformToBlock", { enumerable: true, get: function () { return transformers_1.transformToBlock; } });
73
79
  Object.defineProperty(exports, "transformToCoach", { enumerable: true, get: function () { return transformers_1.transformToCoach; } });
@@ -94,6 +100,8 @@ Object.defineProperty(exports, "transformToSet", { enumerable: true, get: functi
94
100
  Object.defineProperty(exports, "transformToSpike", { enumerable: true, get: function () { return transformers_1.transformToSpike; } });
95
101
  Object.defineProperty(exports, "transformToSubstitution", { enumerable: true, get: function () { return transformers_1.transformToSubstitution; } });
96
102
  Object.defineProperty(exports, "transformToTeam", { enumerable: true, get: function () { return transformers_1.transformToTeam; } });
103
+ Object.defineProperty(exports, "transformToTournament", { enumerable: true, get: function () { return transformers_1.transformToTournament; } });
104
+ Object.defineProperty(exports, "transformToTournamentMatch", { enumerable: true, get: function () { return transformers_1.transformToTournamentMatch; } });
97
105
  Object.defineProperty(exports, "transformToTrait", { enumerable: true, get: function () { return transformers_1.transformToTrait; } });
98
106
  const init_models_1 = require("./init-models");
99
107
  Object.defineProperty(exports, "initModels", { enumerable: true, get: function () { return init_models_1.initModels; } });
@@ -1,5 +1,5 @@
1
1
  import type { Sequelize } from 'sequelize';
2
- import { BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel } from './models';
2
+ import { BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel } from './models';
3
3
  export declare function initModels(sequelize: Sequelize): {
4
4
  Block: typeof BlockModel;
5
5
  Coach: typeof CoachModel;
@@ -23,4 +23,6 @@ export declare function initModels(sequelize: Sequelize): {
23
23
  Spike: typeof SpikeModel;
24
24
  Substitution: typeof SubstitutionModel;
25
25
  Team: typeof TeamModel;
26
+ Tournament: typeof TournamentModel;
27
+ TournamentMatch: typeof TournamentMatchModel;
26
28
  };
@@ -25,6 +25,8 @@ function initModels(sequelize) {
25
25
  const Spike = models_1.SpikeModel.initModel(sequelize);
26
26
  const Substitution = models_1.SubstitutionModel.initModel(sequelize);
27
27
  const Team = models_1.TeamModel.initModel(sequelize);
28
+ const Tournament = models_1.TournamentModel.initModel(sequelize);
29
+ const TournamentMatch = models_1.TournamentMatchModel.initModel(sequelize);
28
30
  MatchSet.belongsToMany(Player, {
29
31
  as: 'player_id_Players',
30
32
  through: MatchSetStats,
@@ -155,6 +157,11 @@ function initModels(sequelize) {
155
157
  Season.hasMany(Match, { as: 'Matches', foreignKey: 'season_id' });
156
158
  Team.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
157
159
  League.hasMany(League, { as: 'Teams', foreignKey: 'league_id' });
160
+ Season.belongsTo(Team, { as: 'champion', foreignKey: 'champion' });
161
+ Team.hasMany(Season, { as: 'titles', foreignKey: 'champion' });
162
+ Tournament.hasMany(TournamentMatch, { as: 'Matches', foreignKey: 'tournament_id' });
163
+ TournamentMatch.belongsTo(Tournament, { as: 'tournament', foreignKey: 'tournament_id' });
164
+ TournamentMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
158
165
  return {
159
166
  Block,
160
167
  Coach,
@@ -177,7 +184,9 @@ function initModels(sequelize) {
177
184
  Set,
178
185
  Spike,
179
186
  Substitution,
180
- Team
187
+ Team,
188
+ Tournament,
189
+ TournamentMatch
181
190
  };
182
191
  }
183
192
  exports.initModels = initModels;
@@ -20,4 +20,6 @@ import { SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk } from './
20
20
  import { SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk } from './spike';
21
21
  import { SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk } from './substitution';
22
22
  import { TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk } from './team';
23
- export { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, 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, };
23
+ import { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk } from './tournament';
24
+ import { TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentStage } from './tournament-match';
25
+ export { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, 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, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TeamModel = exports.SubstitutionModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonTeamsModel = exports.SeasonModel = exports.ScoreModel = exports.ReceptionModel = exports.RallyPositionModel = exports.RallyModel = exports.PlayerModel = exports.PerformanceStatsModel = exports.MatchSetStatsModel = exports.MatchSetModel = exports.MatchModel = exports.LiberoReplacementModel = exports.LeagueModel = exports.EventModel = exports.CountryModel = exports.CoachModel = exports.BlockModel = void 0;
3
+ exports.TeamModel = exports.SubstitutionModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonTeamsModel = exports.SeasonModel = exports.ScoreModel = exports.ReceptionModel = exports.RallyPositionModel = exports.RallyModel = exports.PlayerModel = exports.PerformanceStatsModel = exports.MatchSetStatsModel = exports.MatchSetModel = exports.MatchModel = exports.LiberoReplacementModel = exports.LeagueModel = exports.EventModel = exports.CountryModel = exports.CoachModel = exports.BlockModel = exports.TournamentMatchModel = exports.TournamentModel = void 0;
4
4
  const block_1 = require("./block");
5
5
  Object.defineProperty(exports, "BlockModel", { enumerable: true, get: function () { return block_1.BlockModel; } });
6
6
  const coach_1 = require("./coach");
@@ -45,3 +45,7 @@ const substitution_1 = require("./substitution");
45
45
  Object.defineProperty(exports, "SubstitutionModel", { enumerable: true, get: function () { return substitution_1.SubstitutionModel; } });
46
46
  const team_1 = require("./team");
47
47
  Object.defineProperty(exports, "TeamModel", { enumerable: true, get: function () { return team_1.TeamModel; } });
48
+ const tournament_1 = require("./tournament");
49
+ Object.defineProperty(exports, "TournamentModel", { enumerable: true, get: function () { return tournament_1.TournamentModel; } });
50
+ const tournament_match_1 = require("./tournament-match");
51
+ Object.defineProperty(exports, "TournamentMatchModel", { enumerable: true, get: function () { return tournament_match_1.TournamentMatchModel; } });
@@ -6,16 +6,17 @@ export interface RallyPositionAttributes {
6
6
  player_id: string;
7
7
  rally_id: string;
8
8
  side: 'Home' | 'Away';
9
- court_position: 'NOT_IN_COURT' | 'LIBERO_ZONE' | 'LEFT_FRONT' | 'MIDDLE_FRONT' | 'RIGHT_FRONT' | 'LEFT_BACK' | 'MIDDLE_BACK' | 'RIGHT_BACK';
9
+ court_position: CourtPositionType;
10
10
  }
11
11
  export type RallyPositionPk = 'player_id' | 'rally_id';
12
+ export type CourtPositionType = 'NOT_IN_COURT' | 'LIBERO_ZONE' | 'LEFT_FRONT' | 'MIDDLE_FRONT' | 'RIGHT_FRONT' | 'LEFT_BACK' | 'MIDDLE_BACK' | 'RIGHT_BACK';
12
13
  export type RallyPositionId = RallyPositionModel[RallyPositionPk];
13
14
  export type RallyPositionCreationAttributes = RallyPositionAttributes;
14
15
  export declare class RallyPositionModel extends Model<RallyPositionAttributes, RallyPositionCreationAttributes> implements RallyPositionAttributes {
15
16
  player_id: string;
16
17
  rally_id: string;
17
18
  side: 'Home' | 'Away';
18
- court_position: 'NOT_IN_COURT' | 'LIBERO_ZONE' | 'LEFT_FRONT' | 'MIDDLE_FRONT' | 'RIGHT_FRONT' | 'LEFT_BACK' | 'MIDDLE_BACK' | 'RIGHT_BACK';
19
+ court_position: CourtPositionType;
19
20
  player: PlayerModel;
20
21
  getPlayer: Sequelize.BelongsToGetAssociationMixin<PlayerModel>;
21
22
  setPlayer: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>;
@@ -11,6 +11,7 @@ export interface SeasonAttributes {
11
11
  seasonTeams?: TeamAttributes[];
12
12
  Matches?: MatchAttributes[];
13
13
  league?: LeagueAttributes;
14
+ champion?: string;
14
15
  }
15
16
  export type SeasonPk = 'season_id';
16
17
  export type SeasonId = SeasonModel[SeasonPk];
@@ -56,5 +57,9 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
56
57
  hasTeam_id_Team: Sequelize.BelongsToManyHasAssociationMixin<TeamModel, TeamId>;
57
58
  hasseasonTeams: Sequelize.BelongsToManyHasAssociationsMixin<TeamModel, TeamId>;
58
59
  countseasonTeams: Sequelize.BelongsToManyCountAssociationsMixin;
60
+ Champion: TeamModel;
61
+ getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
62
+ setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
63
+ createChampion: Sequelize.BelongsToCreateAssociationMixin<TeamModel>;
59
64
  static initModel(sequelize: Sequelize.Sequelize): typeof SeasonModel;
60
65
  }
@@ -21,6 +21,14 @@ class SeasonModel extends sequelize_1.Model {
21
21
  model: 'League',
22
22
  key: 'league_id'
23
23
  }
24
+ },
25
+ champion: {
26
+ type: sequelize_1.DataTypes.UUID,
27
+ allowNull: true,
28
+ references: {
29
+ model: 'Team',
30
+ key: 'team_id'
31
+ }
24
32
  }
25
33
  }, {
26
34
  sequelize,
@@ -118,5 +118,16 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
118
118
  hasSeasonTeam: Sequelize.HasManyHasAssociationMixin<SeasonTeamsModel, SeasonTeamsId>;
119
119
  hasSeasonTeams: Sequelize.HasManyHasAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>;
120
120
  countSeasonTeams: Sequelize.HasManyCountAssociationsMixin;
121
+ titles: SeasonModel[];
122
+ getTitles: Sequelize.HasManyGetAssociationsMixin<SeasonModel>;
123
+ setTitles: Sequelize.HasManySetAssociationsMixin<SeasonModel, SeasonId>;
124
+ addTitle: Sequelize.HasManyAddAssociationMixin<SeasonModel, SeasonId>;
125
+ addTitles: Sequelize.HasManyAddAssociationsMixin<SeasonModel, SeasonId>;
126
+ createTitle: Sequelize.HasManyCreateAssociationMixin<SeasonModel>;
127
+ removeTitle: Sequelize.HasManyRemoveAssociationMixin<SeasonModel, SeasonId>;
128
+ removeTitles: Sequelize.HasManyRemoveAssociationsMixin<SeasonModel, SeasonId>;
129
+ hasTitle: Sequelize.HasManyHasAssociationMixin<SeasonModel, SeasonId>;
130
+ hasTitles: Sequelize.HasManyHasAssociationsMixin<SeasonModel, SeasonId>;
131
+ countTitles: Sequelize.HasManyCountAssociationsMixin;
121
132
  static initModel(sequelize: Sequelize.Sequelize): typeof TeamModel;
122
133
  }
@@ -0,0 +1,29 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model } from 'sequelize';
3
+ import type { TournamentId, TournamentModel } from './tournament';
4
+ import type { MatchId, MatchModel } from './match';
5
+ export interface TournamentMatchAttributes {
6
+ tournament_id: string;
7
+ match_id: string;
8
+ index: number;
9
+ stage: TournamentStage;
10
+ }
11
+ export type TournamentMatchPk = 'tournament_id' | 'match_id';
12
+ export type TournamentMatchId = TournamentMatchModel[TournamentMatchPk];
13
+ export type TournamentStage = 'ROUND_OF_8' | 'QUARTERFINALS' | 'SEMIFINALS' | 'FINAL';
14
+ export type TournamentMatchCreationAttributes = TournamentMatchAttributes;
15
+ export declare class TournamentMatchModel extends Model<TournamentMatchAttributes, TournamentMatchCreationAttributes> implements TournamentMatchAttributes {
16
+ tournament_id: string;
17
+ index: number;
18
+ match_id: string;
19
+ stage: TournamentStage;
20
+ tournament: TournamentModel;
21
+ getTournament: Sequelize.BelongsToGetAssociationMixin<TournamentModel>;
22
+ setTournament: Sequelize.BelongsToSetAssociationMixin<TournamentModel, TournamentId>;
23
+ createTournament: Sequelize.BelongsToCreateAssociationMixin<TournamentModel>;
24
+ match: MatchModel;
25
+ getMatch: Sequelize.BelongsToGetAssociationMixin<MatchModel>;
26
+ setMatch: Sequelize.BelongsToSetAssociationMixin<MatchModel, MatchId>;
27
+ createMatch: Sequelize.BelongsToCreateAssociationMixin<MatchModel>;
28
+ static initModel(sequelize: Sequelize.Sequelize): typeof TournamentMatchModel;
29
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TournamentMatchModel = void 0;
4
+ const sequelize_1 = require("sequelize");
5
+ class TournamentMatchModel extends sequelize_1.Model {
6
+ static initModel(sequelize) {
7
+ return TournamentMatchModel.init({
8
+ tournament_id: {
9
+ type: sequelize_1.DataTypes.UUID,
10
+ allowNull: false,
11
+ primaryKey: true
12
+ },
13
+ index: {
14
+ type: sequelize_1.DataTypes.INTEGER,
15
+ allowNull: false
16
+ },
17
+ match_id: {
18
+ type: sequelize_1.DataTypes.UUID,
19
+ allowNull: false,
20
+ references: {
21
+ model: 'Match',
22
+ key: 'match_id'
23
+ }
24
+ },
25
+ stage: {
26
+ type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.ENUM('ROUND_OF_8', 'QUARTERFINALS', 'SEMIFINALS', 'FINAL')),
27
+ allowNull: false
28
+ },
29
+ }, {
30
+ sequelize,
31
+ tableName: 'TournamentMatch',
32
+ schema: 'public',
33
+ timestamps: false,
34
+ indexes: [
35
+ {
36
+ name: 'TournamentMatch_pk',
37
+ unique: true,
38
+ fields: [
39
+ { name: 'tournament_id' },
40
+ { name: 'match_id' },
41
+ ]
42
+ }
43
+ ]
44
+ });
45
+ }
46
+ }
47
+ exports.TournamentMatchModel = TournamentMatchModel;
@@ -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,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TournamentModel = void 0;
4
+ const sequelize_1 = require("sequelize");
5
+ class TournamentModel extends sequelize_1.Model {
6
+ static initModel(sequelize) {
7
+ return TournamentModel.init({
8
+ tournament_id: {
9
+ type: sequelize_1.DataTypes.UUID,
10
+ allowNull: false,
11
+ primaryKey: true
12
+ },
13
+ iteration: {
14
+ type: sequelize_1.DataTypes.INTEGER,
15
+ allowNull: false
16
+ },
17
+ champion: {
18
+ type: sequelize_1.DataTypes.UUID,
19
+ allowNull: true,
20
+ references: {
21
+ model: 'Team',
22
+ key: 'team_id'
23
+ }
24
+ }
25
+ }, {
26
+ sequelize,
27
+ tableName: 'Tournament',
28
+ schema: 'public',
29
+ timestamps: false,
30
+ indexes: [
31
+ {
32
+ name: 'Tournament_pk',
33
+ unique: true,
34
+ fields: [
35
+ { name: 'tournament_id' }
36
+ ]
37
+ }
38
+ ]
39
+ });
40
+ }
41
+ }
42
+ exports.TournamentModel = TournamentModel;
@@ -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 };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformToFormation = exports.transformToEventType = exports.transformToCourtTarget = exports.transformToCourtPosition = exports.transformToCountry = exports.transformToCoach = exports.transformToBlock = exports.transformToAPITrait = exports.transformToAPITeam = exports.transformToAPISubstitution = exports.transformToAPISpike = exports.transformToAPISet = exports.transformToAPIServe = exports.transformToAPISeason = exports.transformToAPIScore = exports.transformToAPIReception = exports.transformToAPIRally = exports.transformToAPIPlayer = exports.transformToAPIMatchSetStats = exports.transformToAPIMatchSet = exports.transformToAPIMatch = exports.transformToAPILiberoReplacement = exports.transformToAPIBlock = exports.transformFromTrait = exports.transformFromTeam = exports.transformFromSubstitution = exports.transformFromSpike = exports.transformFromSet = exports.transformFromServe = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromRally = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromPerformanceStats = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformFromMatch = exports.transformFromLiberoReplacement = exports.transformFromLeague = exports.transformFromFormation = exports.transformFromEventType = exports.transformFromCourtTarget = exports.transformFromCourtPosition = exports.transformFromCountry = exports.transformFromCoach = exports.transformToAPICoach = exports.transformFromBlock = void 0;
4
- exports.transformToTrait = exports.transformToTeam = exports.transformToSubstitution = exports.transformToSpike = exports.transformToSet = exports.transformToServe = exports.transformToSeason = exports.transformToScore = exports.transformToRole = exports.transformToReception = exports.transformToRally = exports.transformToPlayerPosition = exports.transformToPlayer = exports.transformToPerformanceStats = exports.transformToMatchSetStats = exports.transformToMatchSet = exports.transformToMatch = exports.transformToLiberoReplacement = exports.transformToLeague = void 0;
3
+ exports.transformToBlock = exports.transformToAPITrait = exports.transformToAPITeam = exports.transformToAPISubstitution = exports.transformToAPISpike = exports.transformToAPISet = exports.transformToAPIServe = exports.transformToAPISeason = exports.transformToAPIScore = exports.transformToAPIReception = exports.transformToAPIRally = exports.transformToAPIPlayer = exports.transformToAPIMatchSetStats = exports.transformToAPIMatchSet = exports.transformToAPIMatch = exports.transformToAPILiberoReplacement = exports.transformToAPIBlock = exports.transformFromTrait = exports.transformFromTeam = exports.transformFromSubstitution = exports.transformFromSpike = exports.transformFromSet = exports.transformFromServe = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromRally = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromPerformanceStats = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformFromMatch = exports.transformFromLiberoReplacement = exports.transformFromLeague = exports.transformFromFormation = exports.transformFromEventType = exports.transformFromCourtTarget = exports.transformFromCourtPosition = exports.transformFromCountry = exports.transformFromCoach = exports.transformToAPICoach = exports.transformFromBlock = exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = exports.transformToTournament = exports.transformToAPITournament = exports.transformFromTournament = void 0;
4
+ exports.transformToTrait = exports.transformToTeam = exports.transformToSubstitution = exports.transformToSpike = exports.transformToSet = exports.transformToServe = exports.transformToSeason = exports.transformToScore = exports.transformToRole = exports.transformToReception = exports.transformToRally = exports.transformToPlayerPosition = exports.transformToPlayer = exports.transformToPerformanceStats = exports.transformToMatchSetStats = exports.transformToMatchSet = exports.transformToMatch = exports.transformToLiberoReplacement = exports.transformToLeague = exports.transformToFormation = exports.transformToEventType = exports.transformToCourtTarget = exports.transformToCourtPosition = exports.transformToCountry = exports.transformToCoach = void 0;
5
5
  const block_1 = require("./block");
6
6
  Object.defineProperty(exports, "transformFromBlock", { enumerable: true, get: function () { return block_1.transformFromBlock; } });
7
7
  Object.defineProperty(exports, "transformToAPIBlock", { enumerable: true, get: function () { return block_1.transformToAPIBlock; } });
@@ -32,6 +32,14 @@ const libero_replacement_1 = require("./libero-replacement");
32
32
  Object.defineProperty(exports, "transformFromLiberoReplacement", { enumerable: true, get: function () { return libero_replacement_1.transformFromLiberoReplacement; } });
33
33
  Object.defineProperty(exports, "transformToAPILiberoReplacement", { enumerable: true, get: function () { return libero_replacement_1.transformToAPILiberoReplacement; } });
34
34
  Object.defineProperty(exports, "transformToLiberoReplacement", { enumerable: true, get: function () { return libero_replacement_1.transformToLiberoReplacement; } });
35
+ const tournament_1 = require("./tournament");
36
+ Object.defineProperty(exports, "transformFromTournament", { enumerable: true, get: function () { return tournament_1.transformFromTournament; } });
37
+ Object.defineProperty(exports, "transformToAPITournament", { enumerable: true, get: function () { return tournament_1.transformToAPITournament; } });
38
+ Object.defineProperty(exports, "transformToTournament", { enumerable: true, get: function () { return tournament_1.transformToTournament; } });
39
+ const tournament_match_1 = require("./tournament-match");
40
+ Object.defineProperty(exports, "transformFromTournamentMatch", { enumerable: true, get: function () { return tournament_match_1.transformFromTournamentMatch; } });
41
+ Object.defineProperty(exports, "transformToAPITournamentMatch", { enumerable: true, get: function () { return tournament_match_1.transformToAPITournamentMatch; } });
42
+ Object.defineProperty(exports, "transformToTournamentMatch", { enumerable: true, get: function () { return tournament_match_1.transformToTournamentMatch; } });
35
43
  const match_1 = require("./match");
36
44
  Object.defineProperty(exports, "transformFromMatch", { enumerable: true, get: function () { return match_1.transformFromMatch; } });
37
45
  Object.defineProperty(exports, "transformToAPIMatch", { enumerable: true, get: function () { return match_1.transformToAPIMatch; } });
@@ -9,7 +9,8 @@ function transformToAttributes(season, leagueId) {
9
9
  return {
10
10
  season_id: season.id,
11
11
  iteration: season.iteration,
12
- league_id: leagueId
12
+ league_id: leagueId,
13
+ champion: season.champion != null ? season.champion.id : undefined
13
14
  };
14
15
  }
15
16
  exports.transformFromSeason = transformToAttributes;
@@ -19,6 +20,7 @@ function transformToObject(model) {
19
20
  matches: model.Matches != null ? model.Matches.map(match_1.transformToMatch) : [],
20
21
  iteration: model.iteration,
21
22
  teams: model.seasonTeams != null ? model.seasonTeams.map(team_1.transformToTeam) : [],
23
+ champion: model.Champion != null ? (0, team_1.transformToTeam)(model.Champion) : undefined
22
24
  });
23
25
  }
24
26
  exports.transformToSeason = transformToObject;
@@ -30,7 +32,8 @@ function transformToAPIObject(model) {
30
32
  iteration: model.iteration,
31
33
  teams: model.seasonTeams != null ? model.seasonTeams.map(team_1.transformToAPITeam) : [],
32
34
  league: (0, league_1.transformToLeague)(model.league),
33
- standings: season.standings
35
+ standings: season.standings,
36
+ champion: model.Champion != null ? (0, team_1.transformToAPITeam)(model.Champion) : undefined
34
37
  };
35
38
  }
36
39
  exports.transformToAPISeason = transformToAPIObject;
@@ -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,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformFromTournamentMatch = exports.transformToAPITournamentMatch = exports.transformToTournamentMatch = void 0;
4
+ const service_1 = require("../../service");
5
+ const match_1 = require("./match");
6
+ function transformToStage(stage) {
7
+ switch (stage) {
8
+ case service_1.Stage.ROUND_OF_8:
9
+ return 'ROUND_OF_8';
10
+ case service_1.Stage.QUARTERFINALS:
11
+ return 'QUARTERFINALS';
12
+ case service_1.Stage.SEMIFINALS:
13
+ return 'SEMIFINALS';
14
+ case service_1.Stage.FINAL:
15
+ return 'FINAL';
16
+ default:
17
+ throw new Error('UNKNOWN_ROLE');
18
+ }
19
+ }
20
+ function transformFromStage(s) {
21
+ return service_1.Stage[s];
22
+ }
23
+ function transformToAttributes(match, tournament) {
24
+ return {
25
+ tournament_id: tournament.id,
26
+ match_id: match.match.id,
27
+ index: match.index,
28
+ stage: transformToStage(match.stage)
29
+ };
30
+ }
31
+ exports.transformFromTournamentMatch = transformToAttributes;
32
+ function transformToObject(model) {
33
+ return new service_1.TournamentMatch({
34
+ stage: transformFromStage(model.stage),
35
+ match: (0, match_1.transformToMatch)(model.match),
36
+ index: model.index
37
+ });
38
+ }
39
+ exports.transformToTournamentMatch = transformToObject;
40
+ function transformToAPIObject(model) {
41
+ return {};
42
+ }
43
+ exports.transformToAPITournamentMatch = transformToAPIObject;
@@ -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,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformFromTournament = exports.transformToAPITournament = exports.transformToTournament = void 0;
4
+ const team_1 = require("./team");
5
+ const service_1 = require("../../service");
6
+ const tournament_match_1 = require("./tournament-match");
7
+ function transformToAttributes(tournament) {
8
+ return {
9
+ tournament_id: tournament.id,
10
+ iteration: tournament.iteration,
11
+ matches: tournament.matches != null ? tournament.matches : [],
12
+ champion: tournament.champion != null ? tournament.champion.id : undefined
13
+ };
14
+ }
15
+ exports.transformFromTournament = transformToAttributes;
16
+ function transformToObject(model) {
17
+ return new service_1.Tournament({
18
+ id: model.tournament_id,
19
+ iteration: model.iteration,
20
+ matches: model.Matches.map(tournament_match_1.transformToTournamentMatch),
21
+ champion: model.Champion != null ? (0, team_1.transformToTeam)(model.Champion) : undefined
22
+ });
23
+ }
24
+ exports.transformToTournament = transformToObject;
25
+ function transformToAPIObject(model) {
26
+ return {};
27
+ }
28
+ exports.transformToAPITournament = transformToAPIObject;