volleyballsimtypes 0.0.32 → 0.0.34

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.
@@ -11,11 +11,11 @@ import type { SeasonTeamsId, SeasonTeamsModel } from './season-teams';
11
11
  import { LeagueAttributes, LeagueId, LeagueModel } from './league';
12
12
  export interface TeamAttributes {
13
13
  team_id: string;
14
- coach_id: string;
15
- league_id: string;
16
14
  name: string;
17
15
  short_name: string;
18
- country_id: string;
16
+ coach_id?: string;
17
+ league_id?: string;
18
+ country_id?: string;
19
19
  coach?: CoachAttributes;
20
20
  league?: LeagueAttributes;
21
21
  Players?: PlayerModel[];
@@ -32,6 +32,7 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
32
32
  country_id: string;
33
33
  coach: CoachModel;
34
34
  league: LeagueModel;
35
+ Players: PlayerModel[];
35
36
  getCoach: Sequelize.BelongsToGetAssociationMixin<CoachModel>;
36
37
  setCoach: Sequelize.BelongsToSetAssociationMixin<CoachModel, CoachId>;
37
38
  createCoach: Sequelize.BelongsToCreateAssociationMixin<CoachModel>;
@@ -64,7 +65,6 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
64
65
  hasAway_team_Match: Sequelize.HasManyHasAssociationMixin<MatchModel, MatchId>;
65
66
  hasAway_team_Matches: Sequelize.HasManyHasAssociationsMixin<MatchModel, MatchId>;
66
67
  countAway_team_Matches: Sequelize.HasManyCountAssociationsMixin;
67
- Players: PlayerModel[];
68
68
  getPlayers: Sequelize.HasManyGetAssociationsMixin<PlayerModel>;
69
69
  setPlayers: Sequelize.HasManySetAssociationsMixin<PlayerModel, PlayerId>;
70
70
  addPlayer: Sequelize.HasManyAddAssociationMixin<PlayerModel, PlayerId>;
@@ -16,7 +16,8 @@ function transformToAttributes(player, teamId) {
16
16
  first_name: player.name.first,
17
17
  last_name: player.name.last,
18
18
  traits: player.traits.map(trait_1.transformFromTrait),
19
- roles: player.roles.map(role_1.transformFromRole)
19
+ roles: player.roles.map(role_1.transformFromRole),
20
+ PerformanceStat: (0, performance_stats_1.transformFromPerformanceStats)(player)
20
21
  };
21
22
  }
22
23
  exports.transformFromPlayer = transformToAttributes;
@@ -10,7 +10,9 @@ function transformToAttributes(season, leagueId) {
10
10
  season_id: season.id,
11
11
  iteration: season.iteration,
12
12
  league_id: leagueId,
13
- champion: season.champion != null ? season.champion.id : undefined
13
+ champion: season.champion != null ? season.champion.id : undefined,
14
+ seasonTeams: season.teams.map(team_1.transformFromTeam),
15
+ seasonMatches: season.matches.map(match_1.transformFromMatch)
14
16
  };
15
17
  }
16
18
  exports.transformFromSeason = transformToAttributes;
@@ -10,9 +10,10 @@ function transformToAttributes(team) {
10
10
  team_id: team.id,
11
11
  name: team.name,
12
12
  short_name: team.shortName,
13
- coach_id: team.coach.id,
14
- country_id: team.country.id,
15
- league_id: team.league.id
13
+ coach_id: team.coach != null ? team.coach.id : undefined,
14
+ country_id: team.country != null ? team.country.id : undefined,
15
+ league_id: team.league != null ? team.league.id : undefined,
16
+ coach: (0, coach_1.transformFromCoach)(team.coach)
16
17
  };
17
18
  }
18
19
  exports.transformFromTeam = transformToAttributes;
@@ -11,11 +11,11 @@ import type { SeasonTeamsId, SeasonTeamsModel } from './season-teams';
11
11
  import { LeagueAttributes, LeagueId, LeagueModel } from './league';
12
12
  export interface TeamAttributes {
13
13
  team_id: string;
14
- coach_id: string;
15
- league_id: string;
16
14
  name: string;
17
15
  short_name: string;
18
- country_id: string;
16
+ coach_id?: string;
17
+ league_id?: string;
18
+ country_id?: string;
19
19
  coach?: CoachAttributes;
20
20
  league?: LeagueAttributes;
21
21
  Players?: PlayerModel[];
@@ -32,6 +32,7 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
32
32
  country_id: string;
33
33
  coach: CoachModel;
34
34
  league: LeagueModel;
35
+ Players: PlayerModel[];
35
36
  getCoach: Sequelize.BelongsToGetAssociationMixin<CoachModel>;
36
37
  setCoach: Sequelize.BelongsToSetAssociationMixin<CoachModel, CoachId>;
37
38
  createCoach: Sequelize.BelongsToCreateAssociationMixin<CoachModel>;
@@ -64,7 +65,6 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
64
65
  hasAway_team_Match: Sequelize.HasManyHasAssociationMixin<MatchModel, MatchId>;
65
66
  hasAway_team_Matches: Sequelize.HasManyHasAssociationsMixin<MatchModel, MatchId>;
66
67
  countAway_team_Matches: Sequelize.HasManyCountAssociationsMixin;
67
- Players: PlayerModel[];
68
68
  getPlayers: Sequelize.HasManyGetAssociationsMixin<PlayerModel>;
69
69
  setPlayers: Sequelize.HasManySetAssociationsMixin<PlayerModel, PlayerId>;
70
70
  addPlayer: Sequelize.HasManyAddAssociationMixin<PlayerModel, PlayerId>;
@@ -1,7 +1,7 @@
1
1
  import { GeneralStat, Player } from '../../service';
2
2
  import { transformFromTrait, transformToAPITrait, transformToTrait } from './trait';
3
3
  import { transformFromRole, transformToRole } from './role';
4
- import { transformToPerformanceStats } from './performance-stats';
4
+ import { transformFromPerformanceStats, transformToPerformanceStats } from './performance-stats';
5
5
  import { transformToCountry } from './country';
6
6
  import { transformToAPIMatchSetStats } from './match-set-stats';
7
7
  function transformToAttributes(player, teamId) {
@@ -13,7 +13,8 @@ function transformToAttributes(player, teamId) {
13
13
  first_name: player.name.first,
14
14
  last_name: player.name.last,
15
15
  traits: player.traits.map(transformFromTrait),
16
- roles: player.roles.map(transformFromRole)
16
+ roles: player.roles.map(transformFromRole),
17
+ PerformanceStat: transformFromPerformanceStats(player)
17
18
  };
18
19
  }
19
20
  function transformToObject(model) {
@@ -1,13 +1,15 @@
1
- import { transformToAPITeam, transformToTeam } from './team';
1
+ import { transformFromTeam, transformToAPITeam, transformToTeam } from './team';
2
2
  import { Season } from '../../service';
3
- import { transformToAPIMatch, transformToMatch } from './match';
3
+ import { transformFromMatch, transformToAPIMatch, transformToMatch } from './match';
4
4
  import { transformToLeague } from './league';
5
5
  function transformToAttributes(season, leagueId) {
6
6
  return {
7
7
  season_id: season.id,
8
8
  iteration: season.iteration,
9
9
  league_id: leagueId,
10
- champion: season.champion != null ? season.champion.id : undefined
10
+ champion: season.champion != null ? season.champion.id : undefined,
11
+ seasonTeams: season.teams.map(transformFromTeam),
12
+ seasonMatches: season.matches.map(transformFromMatch)
11
13
  };
12
14
  }
13
15
  function transformToObject(model) {
@@ -1,15 +1,16 @@
1
1
  import { Team } from '../../service';
2
2
  import { transformToCountry } from './country';
3
- import { transformToAPICoach, transformToCoach } from './coach';
3
+ import { transformFromCoach, transformToAPICoach, transformToCoach } from './coach';
4
4
  import { transformToAPIPlayer, transformToPlayer } from './player';
5
5
  function transformToAttributes(team) {
6
6
  return {
7
7
  team_id: team.id,
8
8
  name: team.name,
9
9
  short_name: team.shortName,
10
- coach_id: team.coach.id,
11
- country_id: team.country.id,
12
- league_id: team.league.id
10
+ coach_id: team.coach != null ? team.coach.id : undefined,
11
+ country_id: team.country != null ? team.country.id : undefined,
12
+ league_id: team.league != null ? team.league.id : undefined,
13
+ coach: transformFromCoach(team.coach)
13
14
  };
14
15
  }
15
16
  function transformToObject(team) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",