volleyballsimtypes 0.0.92 → 0.0.94

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.
@@ -3,5 +3,5 @@ import { TeamAttributes, TeamModel } from '../models';
3
3
  import { APITeam } from '../../api';
4
4
  declare function transformToAttributes(team: Team): TeamAttributes;
5
5
  declare function transformToObject(team: TeamModel): Team;
6
- declare function transformToAPIObject(team: TeamModel): APITeam;
6
+ declare function transformToAPIObject(model: TeamModel): APITeam;
7
7
  export { transformToObject as transformToTeam, transformToAPIObject as transformToAPITeam, transformToAttributes as transformFromTeam };
@@ -28,14 +28,15 @@ function transformToObject(team) {
28
28
  });
29
29
  }
30
30
  exports.transformToTeam = transformToObject;
31
- function transformToAPIObject(team) {
32
- return {
33
- id: team.team_id,
34
- name: team.name,
35
- shortName: team.short_name,
36
- country: team.country != null ? (0, _1.transformToCountry)(team.country) : undefined,
37
- coach: team.coach != null ? (0, _1.transformToAPICoach)(team.coach) : undefined,
38
- roster: team.PlayerTeams != null ? team.PlayerTeams.map(pt => (0, _1.transformToAPIPlayer)(pt.player)) : []
31
+ function transformToAPIObject(model) {
32
+ const team = {
33
+ id: model.team_id,
34
+ name: model.name,
35
+ shortName: model.short_name,
36
+ country: model.country != null ? (0, _1.transformToCountry)(model.country) : undefined,
37
+ coach: model.coach != null ? (0, _1.transformToAPICoach)(model.coach) : undefined,
38
+ roster: model.PlayerTeams != null ? model.PlayerTeams.map(pt => (0, _1.transformToAPIPlayer)(pt.player)) : []
39
39
  };
40
+ return team;
40
41
  }
41
42
  exports.transformToAPITeam = transformToAPIObject;
@@ -3,5 +3,5 @@ import { TeamAttributes, TeamModel } from '../models';
3
3
  import { APITeam } from '../../api';
4
4
  declare function transformToAttributes(team: Team): TeamAttributes;
5
5
  declare function transformToObject(team: TeamModel): Team;
6
- declare function transformToAPIObject(team: TeamModel): APITeam;
6
+ declare function transformToAPIObject(model: TeamModel): APITeam;
7
7
  export { transformToObject as transformToTeam, transformToAPIObject as transformToAPITeam, transformToAttributes as transformFromTeam };
@@ -23,14 +23,15 @@ function transformToObject(team) {
23
23
  rating: team.rating
24
24
  });
25
25
  }
26
- function transformToAPIObject(team) {
27
- return {
28
- id: team.team_id,
29
- name: team.name,
30
- shortName: team.short_name,
31
- country: team.country != null ? transformToCountry(team.country) : undefined,
32
- coach: team.coach != null ? transformToAPICoach(team.coach) : undefined,
33
- roster: team.PlayerTeams != null ? team.PlayerTeams.map(pt => transformToAPIPlayer(pt.player)) : []
26
+ function transformToAPIObject(model) {
27
+ const team = {
28
+ id: model.team_id,
29
+ name: model.name,
30
+ shortName: model.short_name,
31
+ country: model.country != null ? transformToCountry(model.country) : undefined,
32
+ coach: model.coach != null ? transformToAPICoach(model.coach) : undefined,
33
+ roster: model.PlayerTeams != null ? model.PlayerTeams.map(pt => transformToAPIPlayer(pt.player)) : []
34
34
  };
35
+ return team;
35
36
  }
36
37
  export { transformToObject as transformToTeam, transformToAPIObject as transformToAPITeam, transformToAttributes as transformFromTeam };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.92",
3
+ "version": "0.0.94",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",