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.
- package/dist/cjs/src/api/coach.d.ts +2 -2
- package/dist/cjs/src/api/league.d.ts +8 -8
- package/dist/cjs/src/api/match.d.ts +20 -20
- package/dist/cjs/src/api/player.d.ts +6 -6
- package/dist/cjs/src/api/team.d.ts +6 -6
- package/dist/cjs/src/api/tournament.d.ts +7 -7
- package/dist/cjs/src/data/transformers/match.js +1 -1
- package/dist/cjs/src/data/transformers/rally.js +20 -16
- package/dist/esm/src/api/coach.d.ts +2 -2
- package/dist/esm/src/api/league.d.ts +8 -8
- package/dist/esm/src/api/match.d.ts +20 -20
- package/dist/esm/src/api/player.d.ts +6 -6
- package/dist/esm/src/api/team.d.ts +6 -6
- package/dist/esm/src/api/tournament.d.ts +7 -7
- package/dist/esm/src/data/transformers/match.js +1 -1
- package/dist/esm/src/data/transformers/rally.js +20 -16
- package/package.json +1 -1
|
@@ -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
|
-
|
|
6
|
-
|
|
5
|
+
name: string;
|
|
6
|
+
country: Country;
|
|
7
7
|
}
|
|
8
8
|
export interface APISeason {
|
|
9
9
|
readonly id: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
14
|
-
|
|
13
|
+
name: Name;
|
|
14
|
+
country: Country;
|
|
15
15
|
gameStats: APISetStatistics[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
iteration: number;
|
|
6
|
+
matches: APITournamentMatch[];
|
|
7
|
+
teams: APITeam[];
|
|
8
|
+
champion?: APITeam;
|
|
9
9
|
}
|
|
10
10
|
export interface APITournamentMatch {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
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
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
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
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
const
|
|
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 {
|
|
@@ -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
|
-
|
|
6
|
-
|
|
5
|
+
name: string;
|
|
6
|
+
country: Country;
|
|
7
7
|
}
|
|
8
8
|
export interface APISeason {
|
|
9
9
|
readonly id: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
14
|
-
|
|
13
|
+
name: Name;
|
|
14
|
+
country: Country;
|
|
15
15
|
gameStats: APISetStatistics[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
iteration: number;
|
|
6
|
+
matches: APITournamentMatch[];
|
|
7
|
+
teams: APITeam[];
|
|
8
|
+
champion?: APITeam;
|
|
9
9
|
}
|
|
10
10
|
export interface APITournamentMatch {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
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
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
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
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
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 {
|