volleyballsimtypes 0.0.113 → 0.0.115

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,5 +1,5 @@
1
1
  import { EventStat, PlayerPosition } from '../service';
2
- import { APIEvent, APISeason, APITeam, APITournament } from '.';
2
+ import { APIEvent, APIPlayer, APISeason, APITeam, APITournament } from '.';
3
3
  export interface APIMatch {
4
4
  readonly id: string;
5
5
  homeTeam: APITeam;
@@ -13,18 +13,28 @@ export interface APIMatchSet {
13
13
  readonly id: string;
14
14
  order: number;
15
15
  isTieBreak: boolean;
16
- homePlayerPosition: PlayerPosition[];
17
- awayPlayerPosition: PlayerPosition[];
18
16
  homeScore: number;
19
17
  awayScore: number;
20
- stats: APISetStatistics[];
21
18
  rallies: APIRally[];
19
+ stats: APISetStatistics[];
20
+ homePlayerPosition: PlayerPosition[];
21
+ awayPlayerPosition: PlayerPosition[];
22
+ homeTeam?: APITeam;
23
+ awayTeam?: APITeam;
24
+ homeLibero?: APIPlayer;
25
+ awayLibero?: APIPlayer;
22
26
  }
23
27
  export interface APIRally {
24
28
  readonly id: string;
25
29
  servingTeamId: string;
26
30
  events: APIEvent[];
27
31
  order: number;
32
+ homePlayerPosition?: PlayerPosition[];
33
+ awayPlayerPosition?: PlayerPosition[];
34
+ homeTeam?: APITeam;
35
+ awayTeam?: APITeam;
36
+ homeLibero?: APIPlayer;
37
+ awayLibero?: APIPlayer;
28
38
  }
29
39
  export interface APISetStatistics {
30
40
  readonly playerId: string;
@@ -40,7 +40,7 @@ exports.transformToSeason = transformToObject;
40
40
  function transformToAPIObject(model) {
41
41
  const season = transformToObject(model);
42
42
  const matches = model.CompetitionMatches != null ?
43
- model.CompetitionMatches.map(matches => (0, _1.transformToAPIMatch)(matches.Match, model)) : [];
43
+ model.CompetitionMatches.map(matches => (0, _1.transformToAPIMatch)(matches.Match)) : [];
44
44
  const teams = model.Teams != null ? model.Teams.map(_1.transformToAPITeam) : [];
45
45
  const standings = season.standings.map(standing => ({
46
46
  team: teams.find(t => standing.team.id === t.id),
@@ -1,5 +1,5 @@
1
1
  import { EventStat, PlayerPosition } from '../service';
2
- import { APIEvent, APISeason, APITeam, APITournament } from '.';
2
+ import { APIEvent, APIPlayer, APISeason, APITeam, APITournament } from '.';
3
3
  export interface APIMatch {
4
4
  readonly id: string;
5
5
  homeTeam: APITeam;
@@ -13,18 +13,28 @@ export interface APIMatchSet {
13
13
  readonly id: string;
14
14
  order: number;
15
15
  isTieBreak: boolean;
16
- homePlayerPosition: PlayerPosition[];
17
- awayPlayerPosition: PlayerPosition[];
18
16
  homeScore: number;
19
17
  awayScore: number;
20
- stats: APISetStatistics[];
21
18
  rallies: APIRally[];
19
+ stats: APISetStatistics[];
20
+ homePlayerPosition: PlayerPosition[];
21
+ awayPlayerPosition: PlayerPosition[];
22
+ homeTeam?: APITeam;
23
+ awayTeam?: APITeam;
24
+ homeLibero?: APIPlayer;
25
+ awayLibero?: APIPlayer;
22
26
  }
23
27
  export interface APIRally {
24
28
  readonly id: string;
25
29
  servingTeamId: string;
26
30
  events: APIEvent[];
27
31
  order: number;
32
+ homePlayerPosition?: PlayerPosition[];
33
+ awayPlayerPosition?: PlayerPosition[];
34
+ homeTeam?: APITeam;
35
+ awayTeam?: APITeam;
36
+ homeLibero?: APIPlayer;
37
+ awayLibero?: APIPlayer;
28
38
  }
29
39
  export interface APISetStatistics {
30
40
  readonly playerId: string;
@@ -35,7 +35,7 @@ function transformToObject(model) {
35
35
  function transformToAPIObject(model) {
36
36
  const season = transformToObject(model);
37
37
  const matches = model.CompetitionMatches != null ?
38
- model.CompetitionMatches.map(matches => transformToAPIMatch(matches.Match, model)) : [];
38
+ model.CompetitionMatches.map(matches => transformToAPIMatch(matches.Match)) : [];
39
39
  const teams = model.Teams != null ? model.Teams.map(transformToAPITeam) : [];
40
40
  const standings = season.standings.map(standing => ({
41
41
  team: teams.find(t => standing.team.id === t.id),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",