volleyballsimtypes 0.0.55 → 0.0.57

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.
@@ -1,4 +1,4 @@
1
- import { Country, League, Standing } from '../service';
1
+ import { Country, Standing } from '../service';
2
2
  import { APIMatch, APITeam } from '.';
3
3
  export interface APILeague {
4
4
  readonly id: string;
@@ -11,6 +11,6 @@ export interface APISeason {
11
11
  matches: APIMatch[];
12
12
  iteration: number;
13
13
  standings: Standing[];
14
- league: League;
14
+ league: APILeague;
15
15
  champion?: APITeam;
16
16
  }
@@ -1,12 +1,12 @@
1
1
  import { EventStat, PlayerPosition } from '../service';
2
- import { APIEvent, APILeague, APITeam, APITournament } from '.';
2
+ import { APIEvent, APISeason, APITeam, APITournament } from '.';
3
3
  export interface APIMatch {
4
4
  readonly id: string;
5
5
  homeTeam: APITeam;
6
6
  awayTeam: APITeam;
7
7
  sets: APIMatchSet[];
8
8
  scheduledDate: Date;
9
- league?: APILeague;
9
+ season?: APISeason;
10
10
  tournament?: APITournament;
11
11
  }
12
12
  export interface APIMatchSet {
@@ -1,7 +1,7 @@
1
- import { LeagueModel, MatchAttributes, MatchModel, TournamentModel } from '../models';
1
+ import { MatchAttributes, MatchModel, SeasonModel, TournamentModel } from '../models';
2
2
  import { Match } from '../../service';
3
3
  import { APIMatch } from '../../api';
4
4
  declare function transformToAttributes(match: Match): MatchAttributes;
5
5
  declare function transformToObject(model: MatchModel): Match;
6
- declare function transformToAPIObject(match: MatchModel, league?: LeagueModel, tournament?: TournamentModel): APIMatch;
6
+ declare function transformToAPIObject(match: MatchModel, season?: SeasonModel, tournament?: TournamentModel): APIMatch;
7
7
  export { transformToObject as transformToMatch, transformToAPIObject as transformToAPIMatch, transformToAttributes as transformFromMatch };
@@ -27,7 +27,7 @@ function transformToObject(model) {
27
27
  });
28
28
  }
29
29
  exports.transformToMatch = transformToObject;
30
- function transformToAPIObject(match, league, tournament) {
30
+ function transformToAPIObject(match, season, tournament) {
31
31
  const sets = match.MatchSets == null || match.MatchSets.length < 1
32
32
  ? [] : match.MatchSets.map(_1.transformToAPIMatchSet)
33
33
  .sort((s1, s2) => s1.order - s2.order);
@@ -37,7 +37,7 @@ function transformToAPIObject(match, league, tournament) {
37
37
  awayTeam: (0, _1.transformToAPITeam)(match.awayTeam),
38
38
  scheduledDate: new Date(match.scheduled_date),
39
39
  sets,
40
- league: league != null ? (0, _1.transformToAPILeague)(league) : undefined,
40
+ season: season != null ? (0, _1.transformToAPISeason)(season) : undefined,
41
41
  tournament: tournament != null ? (0, _1.transformToAPITournament)(tournament) : undefined
42
42
  };
43
43
  }
@@ -31,7 +31,7 @@ exports.transformToSeason = transformToObject;
31
31
  function transformToAPIObject(model) {
32
32
  const season = transformToObject(model);
33
33
  const matches = model.SeasonMatches != null ?
34
- model.SeasonMatches.map(seasonMatch => (0, _1.transformToAPIMatch)(seasonMatch.match, model.league)) : [];
34
+ model.SeasonMatches.map(seasonMatch => (0, _1.transformToAPIMatch)(seasonMatch.match, model)) : [];
35
35
  return {
36
36
  id: model.season_id,
37
37
  matches: matches,
@@ -29,7 +29,7 @@ function transformToAPIObject(model) {
29
29
  return {
30
30
  id: model.tournament_id,
31
31
  iteration: model.iteration,
32
- champion: model.champion != null ? (0, _1.transformToAPITeam)(model.champion_Team) : undefined,
32
+ champion: model.champion_Team != null ? (0, _1.transformToAPITeam)(model.champion_Team) : undefined,
33
33
  matches: model.TournamentMatches != null ? model.TournamentMatches.map(_1.transformToAPITournamentMatch) : [],
34
34
  teams: model.tournamentTeams != null ? model.tournamentTeams.map(_1.transformToAPITeam) : []
35
35
  };
@@ -1,4 +1,4 @@
1
- import { Country, League, Standing } from '../service';
1
+ import { Country, Standing } from '../service';
2
2
  import { APIMatch, APITeam } from '.';
3
3
  export interface APILeague {
4
4
  readonly id: string;
@@ -11,6 +11,6 @@ export interface APISeason {
11
11
  matches: APIMatch[];
12
12
  iteration: number;
13
13
  standings: Standing[];
14
- league: League;
14
+ league: APILeague;
15
15
  champion?: APITeam;
16
16
  }
@@ -1,12 +1,12 @@
1
1
  import { EventStat, PlayerPosition } from '../service';
2
- import { APIEvent, APILeague, APITeam, APITournament } from '.';
2
+ import { APIEvent, APISeason, APITeam, APITournament } from '.';
3
3
  export interface APIMatch {
4
4
  readonly id: string;
5
5
  homeTeam: APITeam;
6
6
  awayTeam: APITeam;
7
7
  sets: APIMatchSet[];
8
8
  scheduledDate: Date;
9
- league?: APILeague;
9
+ season?: APISeason;
10
10
  tournament?: APITournament;
11
11
  }
12
12
  export interface APIMatchSet {
@@ -1,7 +1,7 @@
1
- import { LeagueModel, MatchAttributes, MatchModel, TournamentModel } from '../models';
1
+ import { MatchAttributes, MatchModel, SeasonModel, TournamentModel } from '../models';
2
2
  import { Match } from '../../service';
3
3
  import { APIMatch } from '../../api';
4
4
  declare function transformToAttributes(match: Match): MatchAttributes;
5
5
  declare function transformToObject(model: MatchModel): Match;
6
- declare function transformToAPIObject(match: MatchModel, league?: LeagueModel, tournament?: TournamentModel): APIMatch;
6
+ declare function transformToAPIObject(match: MatchModel, season?: SeasonModel, tournament?: TournamentModel): APIMatch;
7
7
  export { transformToObject as transformToMatch, transformToAPIObject as transformToAPIMatch, transformToAttributes as transformFromMatch };
@@ -1,5 +1,5 @@
1
1
  import { Match } from '../../service';
2
- import { transformToAPILeague, transformToAPIMatchSet, transformToAPITeam, transformToAPITournament, transformToMatchSet, transformToTeam } from '.';
2
+ import { transformToAPIMatchSet, transformToAPISeason, transformToAPITeam, transformToAPITournament, transformToMatchSet, transformToTeam } from '.';
3
3
  function transformToAttributes(match) {
4
4
  return {
5
5
  match_id: match.id,
@@ -22,7 +22,7 @@ function transformToObject(model) {
22
22
  isSimulated: model.is_simulated
23
23
  });
24
24
  }
25
- function transformToAPIObject(match, league, tournament) {
25
+ function transformToAPIObject(match, season, tournament) {
26
26
  const sets = match.MatchSets == null || match.MatchSets.length < 1
27
27
  ? [] : match.MatchSets.map(transformToAPIMatchSet)
28
28
  .sort((s1, s2) => s1.order - s2.order);
@@ -32,7 +32,7 @@ function transformToAPIObject(match, league, tournament) {
32
32
  awayTeam: transformToAPITeam(match.awayTeam),
33
33
  scheduledDate: new Date(match.scheduled_date),
34
34
  sets,
35
- league: league != null ? transformToAPILeague(league) : undefined,
35
+ season: season != null ? transformToAPISeason(season) : undefined,
36
36
  tournament: tournament != null ? transformToAPITournament(tournament) : undefined
37
37
  };
38
38
  }
@@ -26,7 +26,7 @@ function transformToObject(model) {
26
26
  function transformToAPIObject(model) {
27
27
  const season = transformToObject(model);
28
28
  const matches = model.SeasonMatches != null ?
29
- model.SeasonMatches.map(seasonMatch => transformToAPIMatch(seasonMatch.match, model.league)) : [];
29
+ model.SeasonMatches.map(seasonMatch => transformToAPIMatch(seasonMatch.match, model)) : [];
30
30
  return {
31
31
  id: model.season_id,
32
32
  matches: matches,
@@ -24,7 +24,7 @@ function transformToAPIObject(model) {
24
24
  return {
25
25
  id: model.tournament_id,
26
26
  iteration: model.iteration,
27
- champion: model.champion != null ? transformToAPITeam(model.champion_Team) : undefined,
27
+ champion: model.champion_Team != null ? transformToAPITeam(model.champion_Team) : undefined,
28
28
  matches: model.TournamentMatches != null ? model.TournamentMatches.map(transformToAPITournamentMatch) : [],
29
29
  teams: model.tournamentTeams != null ? model.tournamentTeams.map(transformToAPITeam) : []
30
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.55",
3
+ "version": "0.0.57",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",