volleyballsimtypes 0.0.53 → 0.0.55

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.
@@ -5,7 +5,7 @@ export interface APITeam {
5
5
  roster: APIPlayer[];
6
6
  name: string;
7
7
  shortName: string;
8
- coach: APICoach;
9
- country: Country;
8
+ coach?: APICoach;
9
+ country?: Country;
10
10
  league?: string;
11
11
  }
@@ -31,8 +31,8 @@ function transformToAPIObject(team) {
31
31
  id: team.team_id,
32
32
  name: team.name,
33
33
  shortName: team.short_name,
34
- country: (0, _1.transformToCountry)(team.country),
35
- coach: (0, _1.transformToAPICoach)(team.coach),
34
+ country: team.country != null ? (0, _1.transformToCountry)(team.country) : undefined,
35
+ coach: team.coach != null ? (0, _1.transformToAPICoach)(team.coach) : undefined,
36
36
  roster: team.Players != null ? team.Players.map(_1.transformToAPIPlayer) : []
37
37
  };
38
38
  }
@@ -19,7 +19,7 @@ function transformToObject(model) {
19
19
  return new service_1.Tournament({
20
20
  id: model.tournament_id,
21
21
  iteration: model.iteration,
22
- matches: model.TournamentMatches.map(_1.transformToTournamentMatch),
22
+ matches: model.TournamentMatches != null ? model.TournamentMatches.map(_1.transformToTournamentMatch) : [],
23
23
  teams: model.tournamentTeams != null ? model.tournamentTeams.map(_1.transformToTeam) : [],
24
24
  champion: model.champion_Team != null ? (0, _1.transformToTeam)(model.champion_Team) : undefined
25
25
  });
@@ -30,8 +30,8 @@ function transformToAPIObject(model) {
30
30
  id: model.tournament_id,
31
31
  iteration: model.iteration,
32
32
  champion: model.champion != null ? (0, _1.transformToAPITeam)(model.champion_Team) : undefined,
33
- matches: model.TournamentMatches.map(_1.transformToAPITournamentMatch),
34
- teams: model.tournamentTeams.map(_1.transformToAPITeam)
33
+ matches: model.TournamentMatches != null ? model.TournamentMatches.map(_1.transformToAPITournamentMatch) : [],
34
+ teams: model.tournamentTeams != null ? model.tournamentTeams.map(_1.transformToAPITeam) : []
35
35
  };
36
36
  }
37
37
  exports.transformToAPITournament = transformToAPIObject;
@@ -5,7 +5,7 @@ export interface APITeam {
5
5
  roster: APIPlayer[];
6
6
  name: string;
7
7
  shortName: string;
8
- coach: APICoach;
9
- country: Country;
8
+ coach?: APICoach;
9
+ country?: Country;
10
10
  league?: string;
11
11
  }
@@ -26,8 +26,8 @@ function transformToAPIObject(team) {
26
26
  id: team.team_id,
27
27
  name: team.name,
28
28
  shortName: team.short_name,
29
- country: transformToCountry(team.country),
30
- coach: transformToAPICoach(team.coach),
29
+ country: team.country != null ? transformToCountry(team.country) : undefined,
30
+ coach: team.coach != null ? transformToAPICoach(team.coach) : undefined,
31
31
  roster: team.Players != null ? team.Players.map(transformToAPIPlayer) : []
32
32
  };
33
33
  }
@@ -15,7 +15,7 @@ function transformToObject(model) {
15
15
  return new Tournament({
16
16
  id: model.tournament_id,
17
17
  iteration: model.iteration,
18
- matches: model.TournamentMatches.map(transformToTournamentMatch),
18
+ matches: model.TournamentMatches != null ? model.TournamentMatches.map(transformToTournamentMatch) : [],
19
19
  teams: model.tournamentTeams != null ? model.tournamentTeams.map(transformToTeam) : [],
20
20
  champion: model.champion_Team != null ? transformToTeam(model.champion_Team) : undefined
21
21
  });
@@ -25,8 +25,8 @@ function transformToAPIObject(model) {
25
25
  id: model.tournament_id,
26
26
  iteration: model.iteration,
27
27
  champion: model.champion != null ? transformToAPITeam(model.champion_Team) : undefined,
28
- matches: model.TournamentMatches.map(transformToAPITournamentMatch),
29
- teams: model.tournamentTeams.map(transformToAPITeam)
28
+ matches: model.TournamentMatches != null ? model.TournamentMatches.map(transformToAPITournamentMatch) : [],
29
+ teams: model.tournamentTeams != null ? model.tournamentTeams.map(transformToAPITeam) : []
30
30
  };
31
31
  }
32
32
  export { transformToObject as transformToTournament, transformToAPIObject as transformToAPITournament, transformToAttributes as transformFromTournament };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",