volleyballsimtypes 0.0.50 → 0.0.52

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,6 +1,6 @@
1
1
  import { Country, Name } from '../service';
2
2
  export interface APICoach {
3
3
  readonly id: string;
4
- readonly name: Name;
5
- readonly country: Country;
4
+ name: Name;
5
+ country: Country;
6
6
  }
@@ -2,15 +2,15 @@ import { Country, League, Standing } from '../service';
2
2
  import { APIMatch, APITeam } from '.';
3
3
  export interface APILeague {
4
4
  readonly id: string;
5
- readonly name: string;
6
- readonly country: Country;
5
+ name: string;
6
+ country: Country;
7
7
  }
8
8
  export interface APISeason {
9
9
  readonly id: string;
10
- readonly teams: APITeam[];
11
- readonly matches: APIMatch[];
12
- readonly iteration: number;
13
- readonly standings: Standing[];
14
- readonly league: League;
15
- readonly champion?: APITeam;
10
+ teams: APITeam[];
11
+ matches: APIMatch[];
12
+ iteration: number;
13
+ standings: Standing[];
14
+ league: League;
15
+ champion?: APITeam;
16
16
  }
@@ -2,35 +2,35 @@ import { EventStat, PlayerPosition } from '../service';
2
2
  import { APIEvent, APILeague, APITeam, APITournament } from '.';
3
3
  export interface APIMatch {
4
4
  readonly id: string;
5
- readonly homeTeam: APITeam;
6
- readonly awayTeam: APITeam;
7
- readonly sets: APIMatchSet[];
8
- readonly scheduledDate: Date;
9
- readonly league?: APILeague;
10
- readonly tournament?: APITournament;
5
+ homeTeam: APITeam;
6
+ awayTeam: APITeam;
7
+ sets: APIMatchSet[];
8
+ scheduledDate: Date;
9
+ league?: APILeague;
10
+ tournament?: APITournament;
11
11
  }
12
12
  export interface APIMatchSet {
13
13
  readonly id: string;
14
- readonly order: number;
15
- readonly isTieBreak: boolean;
16
- readonly homeLiberoId: string | undefined;
17
- readonly awayLiberoId: string | undefined;
18
- readonly homeScore: number;
19
- readonly awayScore: number;
20
- readonly stats: APISetStatistics[];
21
- readonly rallies: APIRally[];
14
+ order: number;
15
+ isTieBreak: boolean;
16
+ homeLiberoId: string | undefined;
17
+ awayLiberoId: string | undefined;
18
+ homeScore: number;
19
+ awayScore: number;
20
+ stats: APISetStatistics[];
21
+ rallies: APIRally[];
22
22
  }
23
23
  export interface APIRally {
24
24
  readonly id: string;
25
- readonly servingTeamId: string;
26
- readonly events: APIEvent[];
27
- readonly homePlayerPosition: PlayerPosition[];
28
- readonly awayPlayerPosition: PlayerPosition[];
29
- readonly order: number;
25
+ servingTeamId: string;
26
+ events: APIEvent[];
27
+ homePlayerPosition: PlayerPosition[];
28
+ awayPlayerPosition: PlayerPosition[];
29
+ order: number;
30
30
  }
31
31
  export interface APISetStatistics {
32
+ readonly playerId: string;
32
33
  order: number;
33
- playerId: string;
34
34
  ace: number;
35
35
  attempts: number;
36
36
  contacts: number;
@@ -10,12 +10,12 @@ export declare enum APITrait {
10
10
  }
11
11
  export interface APIPlayer {
12
12
  readonly id: string;
13
- readonly name: Name;
14
- readonly country: Country;
13
+ name: Name;
14
+ country: Country;
15
15
  gameStats: APISetStatistics[];
16
- readonly roles: Role[];
17
- readonly traits: APITrait[];
18
- readonly jerseyNumber: number;
19
- readonly team: string;
16
+ roles: Role[];
17
+ traits: APITrait[];
18
+ jerseyNumber: number;
19
+ team: string;
20
20
  generalStats: Stat[];
21
21
  }
@@ -2,10 +2,10 @@ import { Country } from '../service';
2
2
  import { APICoach, APIPlayer } from '.';
3
3
  export interface APITeam {
4
4
  readonly id: string;
5
- readonly roster: APIPlayer[];
6
- readonly name: string;
7
- readonly shortName: string;
8
- readonly coach: APICoach;
9
- readonly country: Country;
10
- readonly league?: string;
5
+ roster: APIPlayer[];
6
+ name: string;
7
+ shortName: string;
8
+ coach: APICoach;
9
+ country: Country;
10
+ league?: string;
11
11
  }
@@ -2,13 +2,13 @@ import { Stage } from '../service';
2
2
  import { APIMatch, APITeam } from '.';
3
3
  export interface APITournament {
4
4
  readonly id: string;
5
- readonly iteration: number;
6
- readonly matches: APITournamentMatch[];
7
- readonly teams: APITeam[];
8
- readonly champion?: APITeam;
5
+ iteration: number;
6
+ matches: APITournamentMatch[];
7
+ teams: APITeam[];
8
+ champion?: APITeam;
9
9
  }
10
10
  export interface APITournamentMatch {
11
- readonly stage: Stage;
12
- readonly match: APIMatch;
13
- readonly index: number;
11
+ stage: Stage;
12
+ match: APIMatch;
13
+ index: number;
14
14
  }
@@ -36,7 +36,7 @@ function transformToAPIObject(match, league, tournament) {
36
36
  homeTeam: (0, _1.transformToAPITeam)(match.homeTeam),
37
37
  awayTeam: (0, _1.transformToAPITeam)(match.awayTeam),
38
38
  scheduledDate: new Date(match.scheduled_date),
39
- sets: sets,
39
+ sets,
40
40
  league: league != null ? (0, _1.transformToAPILeague)(league) : undefined,
41
41
  tournament: tournament != null ? (0, _1.transformToAPITournament)(tournament) : undefined
42
42
  };
@@ -45,14 +45,16 @@ function transformToAttributes(rally, setId) {
45
45
  }
46
46
  exports.transformFromRally = transformToAttributes;
47
47
  function transformToObject(model) {
48
- const liberoReplacements = model.LiberoReplacements.map(_1.transformToLiberoReplacement);
49
- const substitutions = model.Substitutions.map(_1.transformToSubstitution);
50
- const serves = model.Serves.map(_1.transformToServe);
51
- const receptions = model.Receptions.map(_1.transformToReception);
52
- const sets = model.Sets.map(_1.transformToSet);
53
- const spikes = model.Spikes.map(_1.transformToSpike);
54
- const blocks = model.Blocks.map(_1.transformToBlock);
55
- const scores = model.Scores.map(_1.transformToScore);
48
+ const liberoReplacements = model.LiberoReplacements != null ?
49
+ model.LiberoReplacements.map(_1.transformToLiberoReplacement) : [];
50
+ const substitutions = model.Substitutions != null ?
51
+ model.Substitutions.map(_1.transformToSubstitution) : [];
52
+ const serves = model.Serves != null ? model.Serves.map(_1.transformToServe) : [];
53
+ const receptions = model.Receptions != null ? model.Receptions.map(_1.transformToReception) : [];
54
+ const sets = model.Sets != null ? model.Sets.map(_1.transformToSet) : [];
55
+ const spikes = model.Spikes != null ? model.Spikes.map(_1.transformToSpike) : [];
56
+ const blocks = model.Blocks != null ? model.Blocks.map(_1.transformToBlock) : [];
57
+ const scores = model.Scores != null ? model.Scores.map(_1.transformToScore) : [];
56
58
  const events = [...liberoReplacements, ...substitutions, ...serves, ...receptions, ...sets, ...spikes, ...blocks, ...scores]
57
59
  .sort((e1, e2) => e1.order - e2.order);
58
60
  return new service_1.Rally({
@@ -68,14 +70,16 @@ function transformToObject(model) {
68
70
  }
69
71
  exports.transformToRally = transformToObject;
70
72
  function transformToAPIObject(model) {
71
- const liberoReplacements = model.LiberoReplacements.map(_1.transformToAPILiberoReplacement);
72
- const substitutions = model.Substitutions.map(_1.transformToAPISubstitution);
73
- const serves = model.Serves.map(_1.transformToAPIServe);
74
- const receptions = model.Receptions.map(_1.transformToAPIReception);
75
- const sets = model.Sets.map(_1.transformToAPISet);
76
- const spikes = model.Spikes.map(_1.transformToAPISpike);
77
- const blocks = model.Blocks.map(_1.transformToAPIBlock);
78
- const scores = model.Scores.map(_1.transformToAPIScore);
73
+ const liberoReplacements = model.LiberoReplacements != null ?
74
+ model.LiberoReplacements.map(_1.transformToAPILiberoReplacement) : [];
75
+ const substitutions = model.Substitutions != null ?
76
+ model.Substitutions.map(_1.transformToAPISubstitution) : [];
77
+ const serves = model.Serves != null ? model.Serves.map(_1.transformToAPIServe) : [];
78
+ const receptions = model.Receptions != null ? model.Receptions.map(_1.transformToAPIReception) : [];
79
+ const sets = model.Sets != null ? model.Sets.map(_1.transformToAPISet) : [];
80
+ const spikes = model.Spikes != null ? model.Spikes.map(_1.transformToAPISpike) : [];
81
+ const blocks = model.Blocks != null ? model.Blocks.map(_1.transformToAPIBlock) : [];
82
+ const scores = model.Scores != null ? model.Scores.map(_1.transformToAPIScore) : [];
79
83
  const events = [...liberoReplacements, ...substitutions, ...serves, ...receptions, ...sets, ...spikes, ...blocks, ...scores]
80
84
  .sort((e1, e2) => e1.order - e2.order);
81
85
  return {
@@ -1,6 +1,6 @@
1
1
  import { Country, Name } from '../service';
2
2
  export interface APICoach {
3
3
  readonly id: string;
4
- readonly name: Name;
5
- readonly country: Country;
4
+ name: Name;
5
+ country: Country;
6
6
  }
@@ -2,15 +2,15 @@ import { Country, League, Standing } from '../service';
2
2
  import { APIMatch, APITeam } from '.';
3
3
  export interface APILeague {
4
4
  readonly id: string;
5
- readonly name: string;
6
- readonly country: Country;
5
+ name: string;
6
+ country: Country;
7
7
  }
8
8
  export interface APISeason {
9
9
  readonly id: string;
10
- readonly teams: APITeam[];
11
- readonly matches: APIMatch[];
12
- readonly iteration: number;
13
- readonly standings: Standing[];
14
- readonly league: League;
15
- readonly champion?: APITeam;
10
+ teams: APITeam[];
11
+ matches: APIMatch[];
12
+ iteration: number;
13
+ standings: Standing[];
14
+ league: League;
15
+ champion?: APITeam;
16
16
  }
@@ -2,35 +2,35 @@ import { EventStat, PlayerPosition } from '../service';
2
2
  import { APIEvent, APILeague, APITeam, APITournament } from '.';
3
3
  export interface APIMatch {
4
4
  readonly id: string;
5
- readonly homeTeam: APITeam;
6
- readonly awayTeam: APITeam;
7
- readonly sets: APIMatchSet[];
8
- readonly scheduledDate: Date;
9
- readonly league?: APILeague;
10
- readonly tournament?: APITournament;
5
+ homeTeam: APITeam;
6
+ awayTeam: APITeam;
7
+ sets: APIMatchSet[];
8
+ scheduledDate: Date;
9
+ league?: APILeague;
10
+ tournament?: APITournament;
11
11
  }
12
12
  export interface APIMatchSet {
13
13
  readonly id: string;
14
- readonly order: number;
15
- readonly isTieBreak: boolean;
16
- readonly homeLiberoId: string | undefined;
17
- readonly awayLiberoId: string | undefined;
18
- readonly homeScore: number;
19
- readonly awayScore: number;
20
- readonly stats: APISetStatistics[];
21
- readonly rallies: APIRally[];
14
+ order: number;
15
+ isTieBreak: boolean;
16
+ homeLiberoId: string | undefined;
17
+ awayLiberoId: string | undefined;
18
+ homeScore: number;
19
+ awayScore: number;
20
+ stats: APISetStatistics[];
21
+ rallies: APIRally[];
22
22
  }
23
23
  export interface APIRally {
24
24
  readonly id: string;
25
- readonly servingTeamId: string;
26
- readonly events: APIEvent[];
27
- readonly homePlayerPosition: PlayerPosition[];
28
- readonly awayPlayerPosition: PlayerPosition[];
29
- readonly order: number;
25
+ servingTeamId: string;
26
+ events: APIEvent[];
27
+ homePlayerPosition: PlayerPosition[];
28
+ awayPlayerPosition: PlayerPosition[];
29
+ order: number;
30
30
  }
31
31
  export interface APISetStatistics {
32
+ readonly playerId: string;
32
33
  order: number;
33
- playerId: string;
34
34
  ace: number;
35
35
  attempts: number;
36
36
  contacts: number;
@@ -10,12 +10,12 @@ export declare enum APITrait {
10
10
  }
11
11
  export interface APIPlayer {
12
12
  readonly id: string;
13
- readonly name: Name;
14
- readonly country: Country;
13
+ name: Name;
14
+ country: Country;
15
15
  gameStats: APISetStatistics[];
16
- readonly roles: Role[];
17
- readonly traits: APITrait[];
18
- readonly jerseyNumber: number;
19
- readonly team: string;
16
+ roles: Role[];
17
+ traits: APITrait[];
18
+ jerseyNumber: number;
19
+ team: string;
20
20
  generalStats: Stat[];
21
21
  }
@@ -2,10 +2,10 @@ import { Country } from '../service';
2
2
  import { APICoach, APIPlayer } from '.';
3
3
  export interface APITeam {
4
4
  readonly id: string;
5
- readonly roster: APIPlayer[];
6
- readonly name: string;
7
- readonly shortName: string;
8
- readonly coach: APICoach;
9
- readonly country: Country;
10
- readonly league?: string;
5
+ roster: APIPlayer[];
6
+ name: string;
7
+ shortName: string;
8
+ coach: APICoach;
9
+ country: Country;
10
+ league?: string;
11
11
  }
@@ -2,13 +2,13 @@ import { Stage } from '../service';
2
2
  import { APIMatch, APITeam } from '.';
3
3
  export interface APITournament {
4
4
  readonly id: string;
5
- readonly iteration: number;
6
- readonly matches: APITournamentMatch[];
7
- readonly teams: APITeam[];
8
- readonly champion?: APITeam;
5
+ iteration: number;
6
+ matches: APITournamentMatch[];
7
+ teams: APITeam[];
8
+ champion?: APITeam;
9
9
  }
10
10
  export interface APITournamentMatch {
11
- readonly stage: Stage;
12
- readonly match: APIMatch;
13
- readonly index: number;
11
+ stage: Stage;
12
+ match: APIMatch;
13
+ index: number;
14
14
  }
@@ -31,7 +31,7 @@ function transformToAPIObject(match, league, tournament) {
31
31
  homeTeam: transformToAPITeam(match.homeTeam),
32
32
  awayTeam: transformToAPITeam(match.awayTeam),
33
33
  scheduledDate: new Date(match.scheduled_date),
34
- sets: sets,
34
+ sets,
35
35
  league: league != null ? transformToAPILeague(league) : undefined,
36
36
  tournament: tournament != null ? transformToAPITournament(tournament) : undefined
37
37
  };
@@ -41,14 +41,16 @@ function transformToAttributes(rally, setId) {
41
41
  };
42
42
  }
43
43
  function transformToObject(model) {
44
- const liberoReplacements = model.LiberoReplacements.map(transformToLiberoReplacement);
45
- const substitutions = model.Substitutions.map(transformToSubstitution);
46
- const serves = model.Serves.map(transformToServe);
47
- const receptions = model.Receptions.map(transformToReception);
48
- const sets = model.Sets.map(transformToSet);
49
- const spikes = model.Spikes.map(transformToSpike);
50
- const blocks = model.Blocks.map(transformToBlock);
51
- const scores = model.Scores.map(transformToScore);
44
+ const liberoReplacements = model.LiberoReplacements != null ?
45
+ model.LiberoReplacements.map(transformToLiberoReplacement) : [];
46
+ const substitutions = model.Substitutions != null ?
47
+ model.Substitutions.map(transformToSubstitution) : [];
48
+ const serves = model.Serves != null ? model.Serves.map(transformToServe) : [];
49
+ const receptions = model.Receptions != null ? model.Receptions.map(transformToReception) : [];
50
+ const sets = model.Sets != null ? model.Sets.map(transformToSet) : [];
51
+ const spikes = model.Spikes != null ? model.Spikes.map(transformToSpike) : [];
52
+ const blocks = model.Blocks != null ? model.Blocks.map(transformToBlock) : [];
53
+ const scores = model.Scores != null ? model.Scores.map(transformToScore) : [];
52
54
  const events = [...liberoReplacements, ...substitutions, ...serves, ...receptions, ...sets, ...spikes, ...blocks, ...scores]
53
55
  .sort((e1, e2) => e1.order - e2.order);
54
56
  return new Rally({
@@ -63,14 +65,16 @@ function transformToObject(model) {
63
65
  });
64
66
  }
65
67
  function transformToAPIObject(model) {
66
- const liberoReplacements = model.LiberoReplacements.map(transformToAPILiberoReplacement);
67
- const substitutions = model.Substitutions.map(transformToAPISubstitution);
68
- const serves = model.Serves.map(transformToAPIServe);
69
- const receptions = model.Receptions.map(transformToAPIReception);
70
- const sets = model.Sets.map(transformToAPISet);
71
- const spikes = model.Spikes.map(transformToAPISpike);
72
- const blocks = model.Blocks.map(transformToAPIBlock);
73
- const scores = model.Scores.map(transformToAPIScore);
68
+ const liberoReplacements = model.LiberoReplacements != null ?
69
+ model.LiberoReplacements.map(transformToAPILiberoReplacement) : [];
70
+ const substitutions = model.Substitutions != null ?
71
+ model.Substitutions.map(transformToAPISubstitution) : [];
72
+ const serves = model.Serves != null ? model.Serves.map(transformToAPIServe) : [];
73
+ const receptions = model.Receptions != null ? model.Receptions.map(transformToAPIReception) : [];
74
+ const sets = model.Sets != null ? model.Sets.map(transformToAPISet) : [];
75
+ const spikes = model.Spikes != null ? model.Spikes.map(transformToAPISpike) : [];
76
+ const blocks = model.Blocks != null ? model.Blocks.map(transformToAPIBlock) : [];
77
+ const scores = model.Scores != null ? model.Scores.map(transformToAPIScore) : [];
74
78
  const events = [...liberoReplacements, ...substitutions, ...serves, ...receptions, ...sets, ...spikes, ...blocks, ...scores]
75
79
  .sort((e1, e2) => e1.order - e2.order);
76
80
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",