volleyballsimtypes 0.0.18 → 0.0.19
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/data/transformers/coach.d.ts +1 -1
- package/dist/cjs/src/data/transformers/match-set-stats.d.ts +2 -2
- package/dist/cjs/src/data/transformers/match-set-stats.js +2 -2
- package/dist/cjs/src/data/transformers/match-set.d.ts +2 -2
- package/dist/cjs/src/data/transformers/match-set.js +2 -2
- package/dist/cjs/src/data/transformers/match.d.ts +2 -2
- package/dist/cjs/src/data/transformers/match.js +2 -2
- package/dist/cjs/src/data/transformers/player.d.ts +2 -2
- package/dist/cjs/src/data/transformers/player.js +2 -2
- package/dist/cjs/src/data/transformers/rally.d.ts +2 -2
- package/dist/cjs/src/data/transformers/rally.js +3 -3
- package/dist/cjs/src/data/transformers/season.d.ts +2 -2
- package/dist/cjs/src/data/transformers/season.js +2 -2
- package/dist/cjs/src/data/transformers/substitution.d.ts +2 -2
- package/dist/cjs/src/data/transformers/substitution.js +2 -2
- package/dist/esm/src/data/transformers/coach.d.ts +1 -1
- package/dist/esm/src/data/transformers/match-set-stats.d.ts +2 -2
- package/dist/esm/src/data/transformers/match-set-stats.js +2 -2
- package/dist/esm/src/data/transformers/match-set.d.ts +2 -2
- package/dist/esm/src/data/transformers/match-set.js +2 -2
- package/dist/esm/src/data/transformers/match.d.ts +2 -2
- package/dist/esm/src/data/transformers/match.js +2 -2
- package/dist/esm/src/data/transformers/player.d.ts +2 -2
- package/dist/esm/src/data/transformers/player.js +2 -2
- package/dist/esm/src/data/transformers/rally.d.ts +2 -2
- package/dist/esm/src/data/transformers/rally.js +3 -3
- package/dist/esm/src/data/transformers/season.d.ts +2 -2
- package/dist/esm/src/data/transformers/season.js +2 -2
- package/dist/esm/src/data/transformers/substitution.d.ts +2 -2
- package/dist/esm/src/data/transformers/substitution.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoachAttributes, CoachModel } from '../models';
|
|
2
2
|
import { Coach } from '../../service';
|
|
3
|
-
import { APICoach } from '../../routing
|
|
3
|
+
import { APICoach } from '../../routing';
|
|
4
4
|
declare function transformToAttributes(coach: Coach): CoachAttributes;
|
|
5
5
|
declare function transformToObject(model: CoachModel): Coach;
|
|
6
6
|
declare function transformToAPIObject(model: CoachModel): APICoach;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MatchSetStatsAttributes, MatchSetStatsModel } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { SetStatistics } from '../../service';
|
|
3
3
|
import { APISetStatistics } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(stats: SetStatistics,
|
|
4
|
+
declare function transformToAttributes(stats: SetStatistics, setId: string): MatchSetStatsAttributes;
|
|
5
5
|
declare function transformToObject(model: MatchSetStatsModel): SetStatistics;
|
|
6
6
|
declare function transformToAPIObject(model: MatchSetStatsModel, order: number): APISetStatistics;
|
|
7
7
|
export { transformToObject as transformToMatchSetStats, transformToAPIObject as transformToAPIMatchSetStats, transformToAttributes as transformFromMatchSetStats };
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformFromMatchSetStats = exports.transformToAPIMatchSetStats = exports.transformToMatchSetStats = void 0;
|
|
4
4
|
const player_1 = require("./player");
|
|
5
|
-
function transformToAttributes(stats,
|
|
5
|
+
function transformToAttributes(stats, setId) {
|
|
6
6
|
return {
|
|
7
7
|
player_id: stats.player.id,
|
|
8
|
-
match_set_id:
|
|
8
|
+
match_set_id: setId,
|
|
9
9
|
aces: stats.ace,
|
|
10
10
|
assists: stats.assists,
|
|
11
11
|
attempts: stats.attempts,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MatchSetAttributes, MatchSetModel } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { MatchSet } from '../../service';
|
|
3
3
|
import { APIMatchSet } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(set: MatchSet,
|
|
4
|
+
declare function transformToAttributes(set: MatchSet, matchId: string): MatchSetAttributes;
|
|
5
5
|
declare function transformToObject(model: MatchSetModel): MatchSet;
|
|
6
6
|
declare function transformToAPIObject(model: MatchSetModel): APIMatchSet;
|
|
7
7
|
export { transformToObject as transformToMatchSet, transformToAPIObject as transformToAPIMatchSet, transformToAttributes as transformFromMatchSet };
|
|
@@ -5,10 +5,10 @@ const service_1 = require("../../service");
|
|
|
5
5
|
const player_1 = require("./player");
|
|
6
6
|
const rally_1 = require("./rally");
|
|
7
7
|
const match_set_stats_1 = require("./match-set-stats");
|
|
8
|
-
function transformToAttributes(set,
|
|
8
|
+
function transformToAttributes(set, matchId) {
|
|
9
9
|
return {
|
|
10
10
|
match_set_id: set.id,
|
|
11
|
-
match_id:
|
|
11
|
+
match_id: matchId,
|
|
12
12
|
order: set.order,
|
|
13
13
|
away_libero: set.awayLibero?.id,
|
|
14
14
|
home_libero: set.homeLibero?.id,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MatchAttributes, MatchModel } from '../models';
|
|
2
|
-
import { Match
|
|
2
|
+
import { Match } from '../../service';
|
|
3
3
|
import { APIMatch } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(match: Match,
|
|
4
|
+
declare function transformToAttributes(match: Match, seasonId: string): MatchAttributes;
|
|
5
5
|
declare function transformToObject(model: MatchModel): Match;
|
|
6
6
|
declare function transformToAPIObject(model: MatchModel): APIMatch;
|
|
7
7
|
export { transformToObject as transformToMatch, transformToAPIObject as transformToAPIMatch, transformToAttributes as transformFromMatch };
|
|
@@ -4,10 +4,10 @@ exports.transformFromMatch = exports.transformToAPIMatch = exports.transformToMa
|
|
|
4
4
|
const service_1 = require("../../service");
|
|
5
5
|
const team_1 = require("./team");
|
|
6
6
|
const match_set_1 = require("./match-set");
|
|
7
|
-
function transformToAttributes(match,
|
|
7
|
+
function transformToAttributes(match, seasonId) {
|
|
8
8
|
return {
|
|
9
9
|
match_id: match.id,
|
|
10
|
-
season_id:
|
|
10
|
+
season_id: seasonId,
|
|
11
11
|
away_team: match.awayTeam.id,
|
|
12
12
|
home_team: match.homeTeam.id,
|
|
13
13
|
scheduled_date: match.scheduledDate.toISOString(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlayerAttributes, PlayerModel } from '../models';
|
|
2
|
-
import { Player
|
|
2
|
+
import { Player } from '../../service';
|
|
3
3
|
import { APIPlayer } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(player: Player,
|
|
4
|
+
declare function transformToAttributes(player: Player, teamId: string): PlayerAttributes;
|
|
5
5
|
declare function transformToObject(model: PlayerModel): Player;
|
|
6
6
|
declare function transformToAPIObject(model: PlayerModel): APIPlayer;
|
|
7
7
|
export { transformToObject as transformToPlayer, transformToAPIObject as transformToAPIPlayer, transformToAttributes as transformFromPlayer };
|
|
@@ -7,10 +7,10 @@ const role_1 = require("./role");
|
|
|
7
7
|
const performance_stats_1 = require("./performance-stats");
|
|
8
8
|
const country_1 = require("./country");
|
|
9
9
|
const match_set_stats_1 = require("./match-set-stats");
|
|
10
|
-
function transformToAttributes(player,
|
|
10
|
+
function transformToAttributes(player, teamId) {
|
|
11
11
|
return {
|
|
12
12
|
player_id: player.id,
|
|
13
|
-
team_id:
|
|
13
|
+
team_id: teamId,
|
|
14
14
|
country_id: player.country.id,
|
|
15
15
|
jersey_number: player.jerseyNumber,
|
|
16
16
|
first_name: player.name.first,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RallyAttributes, RallyModel } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { Rally } from '../../service';
|
|
3
3
|
import { APIRally } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(rally: Rally,
|
|
4
|
+
declare function transformToAttributes(rally: Rally, setId: string): RallyAttributes;
|
|
5
5
|
declare function transformToObject(model: RallyModel): Rally;
|
|
6
6
|
declare function transformToAPIObject(model: RallyModel): APIRally;
|
|
7
7
|
export { transformToObject as transformToRally, transformToAPIObject as transformToAPIRally, transformToAttributes as transformFromRally };
|
|
@@ -12,7 +12,7 @@ const set_1 = require("./set");
|
|
|
12
12
|
const spike_1 = require("./spike");
|
|
13
13
|
const block_1 = require("./block");
|
|
14
14
|
const score_1 = require("./score");
|
|
15
|
-
function transformToAttributes(rally,
|
|
15
|
+
function transformToAttributes(rally, setId) {
|
|
16
16
|
const rallyPositions = [
|
|
17
17
|
...rally.awayPlayerPosition.map(pp => (0, rally_position_1.transformFromPlayerPosition)(pp, 'Away', rally)),
|
|
18
18
|
...rally.homePlayerPosition.map(pp => (0, rally_position_1.transformFromPlayerPosition)(pp, 'Home', rally))
|
|
@@ -30,14 +30,14 @@ function transformToAttributes(rally, set) {
|
|
|
30
30
|
}
|
|
31
31
|
return {
|
|
32
32
|
rally_id: rally.id,
|
|
33
|
-
match_set_id:
|
|
33
|
+
match_set_id: setId,
|
|
34
34
|
order: rally.order,
|
|
35
35
|
serving_team: rally.servingTeam.id,
|
|
36
36
|
RallyPositions: rallyPositions,
|
|
37
37
|
LiberoReplacements: rally.events.filter(event => event.eventType === service_1.EventType.LIBERO_REPLACEMENT)
|
|
38
38
|
.map(event => (0, libero_replacement_1.transformFromLiberoReplacement)(event, rally)),
|
|
39
39
|
Substitutions: rally.events.filter(event => event.eventType === service_1.EventType.SUBSTITUTION)
|
|
40
|
-
.map(event => (0, substitution_1.transformFromSubstitution)(event, rally)),
|
|
40
|
+
.map(event => (0, substitution_1.transformFromSubstitution)(event, rally.id)),
|
|
41
41
|
Serves: rally.events.filter(event => event.eventType === service_1.EventType.SERVE)
|
|
42
42
|
.map(event => (0, serve_1.transformFromServe)(event, rally)),
|
|
43
43
|
Receptions: rally.events.filter(event => event.eventType === service_1.EventType.RECEPTION)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SeasonAttributes, SeasonModel } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { Season } from '../../service';
|
|
3
3
|
import { APISeason } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(season: Season,
|
|
4
|
+
declare function transformToAttributes(season: Season, leagueId: string): SeasonAttributes;
|
|
5
5
|
declare function transformToObject(model: SeasonModel): Season;
|
|
6
6
|
declare function transformToAPIObject(model: SeasonModel): APISeason;
|
|
7
7
|
export { transformToObject as transformToSeason, transformToAPIObject as transformToAPISeason, transformToAttributes as transformFromSeason };
|
|
@@ -5,11 +5,11 @@ const team_1 = require("./team");
|
|
|
5
5
|
const service_1 = require("../../service");
|
|
6
6
|
const match_1 = require("./match");
|
|
7
7
|
const league_1 = require("./league");
|
|
8
|
-
function transformToAttributes(season,
|
|
8
|
+
function transformToAttributes(season, leagueId) {
|
|
9
9
|
return {
|
|
10
10
|
season_id: season.id,
|
|
11
11
|
iteration: season.iteration,
|
|
12
|
-
league_id:
|
|
12
|
+
league_id: leagueId
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
exports.transformFromSeason = transformToAttributes;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Substitution } from '../../service';
|
|
2
2
|
import { SubstitutionAttributes, SubstitutionModel } from '../models';
|
|
3
3
|
import { APISubstitution } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(event: Substitution,
|
|
4
|
+
declare function transformToAttributes(event: Substitution, rallyId: string): SubstitutionAttributes;
|
|
5
5
|
declare function transformToObject(event: SubstitutionModel): Substitution;
|
|
6
6
|
declare function transformToAPIObject(event: SubstitutionModel): APISubstitution;
|
|
7
7
|
export { transformToObject as transformToSubstitution, transformToAPIObject as transformToAPISubstitution, transformToAttributes as transformFromSubstitution };
|
|
@@ -4,14 +4,14 @@ exports.transformFromSubstitution = exports.transformToAPISubstitution = exports
|
|
|
4
4
|
const service_1 = require("../../service");
|
|
5
5
|
const event_type_1 = require("./event-type");
|
|
6
6
|
const player_1 = require("./player");
|
|
7
|
-
function transformToAttributes(event,
|
|
7
|
+
function transformToAttributes(event, rallyId) {
|
|
8
8
|
return {
|
|
9
9
|
player_id: event.player.id,
|
|
10
10
|
event_id: event.id,
|
|
11
11
|
order: event.order,
|
|
12
12
|
event_type: (0, event_type_1.transformFromEventType)(event.eventType),
|
|
13
13
|
player_out: event.playerOut.id,
|
|
14
|
-
rally_id:
|
|
14
|
+
rally_id: rallyId
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
exports.transformFromSubstitution = transformToAttributes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoachAttributes, CoachModel } from '../models';
|
|
2
2
|
import { Coach } from '../../service';
|
|
3
|
-
import { APICoach } from '../../routing
|
|
3
|
+
import { APICoach } from '../../routing';
|
|
4
4
|
declare function transformToAttributes(coach: Coach): CoachAttributes;
|
|
5
5
|
declare function transformToObject(model: CoachModel): Coach;
|
|
6
6
|
declare function transformToAPIObject(model: CoachModel): APICoach;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MatchSetStatsAttributes, MatchSetStatsModel } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { SetStatistics } from '../../service';
|
|
3
3
|
import { APISetStatistics } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(stats: SetStatistics,
|
|
4
|
+
declare function transformToAttributes(stats: SetStatistics, setId: string): MatchSetStatsAttributes;
|
|
5
5
|
declare function transformToObject(model: MatchSetStatsModel): SetStatistics;
|
|
6
6
|
declare function transformToAPIObject(model: MatchSetStatsModel, order: number): APISetStatistics;
|
|
7
7
|
export { transformToObject as transformToMatchSetStats, transformToAPIObject as transformToAPIMatchSetStats, transformToAttributes as transformFromMatchSetStats };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { transformToPlayer } from './player';
|
|
2
|
-
function transformToAttributes(stats,
|
|
2
|
+
function transformToAttributes(stats, setId) {
|
|
3
3
|
return {
|
|
4
4
|
player_id: stats.player.id,
|
|
5
|
-
match_set_id:
|
|
5
|
+
match_set_id: setId,
|
|
6
6
|
aces: stats.ace,
|
|
7
7
|
assists: stats.assists,
|
|
8
8
|
attempts: stats.attempts,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MatchSetAttributes, MatchSetModel } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { MatchSet } from '../../service';
|
|
3
3
|
import { APIMatchSet } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(set: MatchSet,
|
|
4
|
+
declare function transformToAttributes(set: MatchSet, matchId: string): MatchSetAttributes;
|
|
5
5
|
declare function transformToObject(model: MatchSetModel): MatchSet;
|
|
6
6
|
declare function transformToAPIObject(model: MatchSetModel): APIMatchSet;
|
|
7
7
|
export { transformToObject as transformToMatchSet, transformToAPIObject as transformToAPIMatchSet, transformToAttributes as transformFromMatchSet };
|
|
@@ -2,10 +2,10 @@ import { MatchSet } from '../../service';
|
|
|
2
2
|
import { transformToPlayer } from './player';
|
|
3
3
|
import { transformToAPIRally, transformToRally } from './rally';
|
|
4
4
|
import { transformToAPIMatchSetStats, transformToMatchSetStats } from './match-set-stats';
|
|
5
|
-
function transformToAttributes(set,
|
|
5
|
+
function transformToAttributes(set, matchId) {
|
|
6
6
|
return {
|
|
7
7
|
match_set_id: set.id,
|
|
8
|
-
match_id:
|
|
8
|
+
match_id: matchId,
|
|
9
9
|
order: set.order,
|
|
10
10
|
away_libero: set.awayLibero?.id,
|
|
11
11
|
home_libero: set.homeLibero?.id,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MatchAttributes, MatchModel } from '../models';
|
|
2
|
-
import { Match
|
|
2
|
+
import { Match } from '../../service';
|
|
3
3
|
import { APIMatch } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(match: Match,
|
|
4
|
+
declare function transformToAttributes(match: Match, seasonId: string): MatchAttributes;
|
|
5
5
|
declare function transformToObject(model: MatchModel): Match;
|
|
6
6
|
declare function transformToAPIObject(model: MatchModel): APIMatch;
|
|
7
7
|
export { transformToObject as transformToMatch, transformToAPIObject as transformToAPIMatch, transformToAttributes as transformFromMatch };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Match } from '../../service';
|
|
2
2
|
import { transformToAPITeam, transformToTeam } from './team';
|
|
3
3
|
import { transformToAPIMatchSet, transformToMatchSet } from './match-set';
|
|
4
|
-
function transformToAttributes(match,
|
|
4
|
+
function transformToAttributes(match, seasonId) {
|
|
5
5
|
return {
|
|
6
6
|
match_id: match.id,
|
|
7
|
-
season_id:
|
|
7
|
+
season_id: seasonId,
|
|
8
8
|
away_team: match.awayTeam.id,
|
|
9
9
|
home_team: match.homeTeam.id,
|
|
10
10
|
scheduled_date: match.scheduledDate.toISOString(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlayerAttributes, PlayerModel } from '../models';
|
|
2
|
-
import { Player
|
|
2
|
+
import { Player } from '../../service';
|
|
3
3
|
import { APIPlayer } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(player: Player,
|
|
4
|
+
declare function transformToAttributes(player: Player, teamId: string): PlayerAttributes;
|
|
5
5
|
declare function transformToObject(model: PlayerModel): Player;
|
|
6
6
|
declare function transformToAPIObject(model: PlayerModel): APIPlayer;
|
|
7
7
|
export { transformToObject as transformToPlayer, transformToAPIObject as transformToAPIPlayer, transformToAttributes as transformFromPlayer };
|
|
@@ -4,10 +4,10 @@ import { transformFromRole, transformToRole } from './role';
|
|
|
4
4
|
import { transformToPerformanceStats } from './performance-stats';
|
|
5
5
|
import { transformToCountry } from './country';
|
|
6
6
|
import { transformToAPIMatchSetStats } from './match-set-stats';
|
|
7
|
-
function transformToAttributes(player,
|
|
7
|
+
function transformToAttributes(player, teamId) {
|
|
8
8
|
return {
|
|
9
9
|
player_id: player.id,
|
|
10
|
-
team_id:
|
|
10
|
+
team_id: teamId,
|
|
11
11
|
country_id: player.country.id,
|
|
12
12
|
jersey_number: player.jerseyNumber,
|
|
13
13
|
first_name: player.name.first,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RallyAttributes, RallyModel } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { Rally } from '../../service';
|
|
3
3
|
import { APIRally } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(rally: Rally,
|
|
4
|
+
declare function transformToAttributes(rally: Rally, setId: string): RallyAttributes;
|
|
5
5
|
declare function transformToObject(model: RallyModel): Rally;
|
|
6
6
|
declare function transformToAPIObject(model: RallyModel): APIRally;
|
|
7
7
|
export { transformToObject as transformToRally, transformToAPIObject as transformToAPIRally, transformToAttributes as transformFromRally };
|
|
@@ -9,7 +9,7 @@ import { transformFromSet, transformToAPISet, transformToSet } from './set';
|
|
|
9
9
|
import { transformFromSpike, transformToAPISpike, transformToSpike } from './spike';
|
|
10
10
|
import { transformFromBlock, transformToAPIBlock, transformToBlock } from './block';
|
|
11
11
|
import { transformFromScore, transformToAPIScore, transformToScore } from './score';
|
|
12
|
-
function transformToAttributes(rally,
|
|
12
|
+
function transformToAttributes(rally, setId) {
|
|
13
13
|
const rallyPositions = [
|
|
14
14
|
...rally.awayPlayerPosition.map(pp => transformFromPlayerPosition(pp, 'Away', rally)),
|
|
15
15
|
...rally.homePlayerPosition.map(pp => transformFromPlayerPosition(pp, 'Home', rally))
|
|
@@ -27,14 +27,14 @@ function transformToAttributes(rally, set) {
|
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
29
|
rally_id: rally.id,
|
|
30
|
-
match_set_id:
|
|
30
|
+
match_set_id: setId,
|
|
31
31
|
order: rally.order,
|
|
32
32
|
serving_team: rally.servingTeam.id,
|
|
33
33
|
RallyPositions: rallyPositions,
|
|
34
34
|
LiberoReplacements: rally.events.filter(event => event.eventType === EventType.LIBERO_REPLACEMENT)
|
|
35
35
|
.map(event => transformFromLiberoReplacement(event, rally)),
|
|
36
36
|
Substitutions: rally.events.filter(event => event.eventType === EventType.SUBSTITUTION)
|
|
37
|
-
.map(event => transformFromSubstitution(event, rally)),
|
|
37
|
+
.map(event => transformFromSubstitution(event, rally.id)),
|
|
38
38
|
Serves: rally.events.filter(event => event.eventType === EventType.SERVE)
|
|
39
39
|
.map(event => transformFromServe(event, rally)),
|
|
40
40
|
Receptions: rally.events.filter(event => event.eventType === EventType.RECEPTION)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SeasonAttributes, SeasonModel } from '../models';
|
|
2
|
-
import {
|
|
2
|
+
import { Season } from '../../service';
|
|
3
3
|
import { APISeason } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(season: Season,
|
|
4
|
+
declare function transformToAttributes(season: Season, leagueId: string): SeasonAttributes;
|
|
5
5
|
declare function transformToObject(model: SeasonModel): Season;
|
|
6
6
|
declare function transformToAPIObject(model: SeasonModel): APISeason;
|
|
7
7
|
export { transformToObject as transformToSeason, transformToAPIObject as transformToAPISeason, transformToAttributes as transformFromSeason };
|
|
@@ -2,11 +2,11 @@ import { transformToAPITeam, transformToTeam } from './team';
|
|
|
2
2
|
import { Season } from '../../service';
|
|
3
3
|
import { transformToAPIMatch, transformToMatch } from './match';
|
|
4
4
|
import { transformToLeague } from './league';
|
|
5
|
-
function transformToAttributes(season,
|
|
5
|
+
function transformToAttributes(season, leagueId) {
|
|
6
6
|
return {
|
|
7
7
|
season_id: season.id,
|
|
8
8
|
iteration: season.iteration,
|
|
9
|
-
league_id:
|
|
9
|
+
league_id: leagueId
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
function transformToObject(model) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Substitution } from '../../service';
|
|
2
2
|
import { SubstitutionAttributes, SubstitutionModel } from '../models';
|
|
3
3
|
import { APISubstitution } from '../../routing';
|
|
4
|
-
declare function transformToAttributes(event: Substitution,
|
|
4
|
+
declare function transformToAttributes(event: Substitution, rallyId: string): SubstitutionAttributes;
|
|
5
5
|
declare function transformToObject(event: SubstitutionModel): Substitution;
|
|
6
6
|
declare function transformToAPIObject(event: SubstitutionModel): APISubstitution;
|
|
7
7
|
export { transformToObject as transformToSubstitution, transformToAPIObject as transformToAPISubstitution, transformToAttributes as transformFromSubstitution };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Substitution } from '../../service';
|
|
2
2
|
import { transformFromEventType, transformToEventType } from './event-type';
|
|
3
3
|
import { transformToPlayer } from './player';
|
|
4
|
-
function transformToAttributes(event,
|
|
4
|
+
function transformToAttributes(event, rallyId) {
|
|
5
5
|
return {
|
|
6
6
|
player_id: event.player.id,
|
|
7
7
|
event_id: event.id,
|
|
8
8
|
order: event.order,
|
|
9
9
|
event_type: transformFromEventType(event.eventType),
|
|
10
10
|
player_out: event.playerOut.id,
|
|
11
|
-
rally_id:
|
|
11
|
+
rally_id: rallyId
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
function transformToObject(event) {
|