volleyballsimtypes 0.0.88 → 0.0.90
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/models/season.d.ts +2 -1
- package/dist/cjs/src/data/models/tournament.d.ts +2 -1
- package/dist/cjs/src/data/transformers/season-match.d.ts +2 -1
- package/dist/cjs/src/data/transformers/season-match.js +4 -2
- package/dist/cjs/src/data/transformers/season.js +4 -2
- package/dist/cjs/src/data/transformers/tournament-match.js +1 -1
- package/dist/cjs/src/data/transformers/tournament.js +7 -3
- package/dist/esm/src/data/models/season.d.ts +2 -1
- package/dist/esm/src/data/models/tournament.d.ts +2 -1
- package/dist/esm/src/data/transformers/season-match.d.ts +2 -1
- package/dist/esm/src/data/transformers/season-match.js +4 -2
- package/dist/esm/src/data/transformers/season.js +4 -2
- package/dist/esm/src/data/transformers/tournament-match.js +1 -1
- package/dist/esm/src/data/transformers/tournament.js +7 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model } from 'sequelize';
|
|
3
|
-
import type { IterationId, LeagueAttributes, LeagueId, LeagueModel, SeasonMatchAttributes, SeasonTeamsId, SeasonTeamsModel, TeamAttributes, TeamId, TeamModel } from '.';
|
|
3
|
+
import type { IterationId, LeagueAttributes, LeagueId, LeagueModel, SeasonMatchAttributes, SeasonTeamsAttributes, SeasonTeamsId, SeasonTeamsModel, TeamAttributes, TeamId, TeamModel } from '.';
|
|
4
4
|
import { IterationModel, SeasonMatchId, SeasonMatchModel } from '.';
|
|
5
5
|
export interface SeasonAttributes {
|
|
6
6
|
season_id: string;
|
|
@@ -8,6 +8,7 @@ export interface SeasonAttributes {
|
|
|
8
8
|
league_id: string;
|
|
9
9
|
seasonTeams?: TeamAttributes[];
|
|
10
10
|
SeasonMatches?: SeasonMatchAttributes[];
|
|
11
|
+
SeasonTeams?: SeasonTeamsAttributes[];
|
|
11
12
|
league?: LeagueAttributes;
|
|
12
13
|
champion?: string;
|
|
13
14
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
|
-
import type { IterationId, TeamId, TeamModel, TournamentMatchAttributes, TournamentMatchId, TournamentMatchModel, TournamentTeamsId } from '.';
|
|
3
|
+
import type { IterationId, TeamId, TeamModel, TournamentMatchAttributes, TournamentMatchId, TournamentMatchModel, TournamentTeamsAttributes, TournamentTeamsId } from '.';
|
|
4
4
|
import { IterationModel, TeamAttributes, TournamentTeamsModel } from '.';
|
|
5
5
|
export interface TournamentAttributes {
|
|
6
6
|
tournament_id: string;
|
|
7
7
|
iteration: number;
|
|
8
8
|
champion?: string;
|
|
9
9
|
TournamentMatches?: TournamentMatchAttributes[];
|
|
10
|
+
TournamentTeams?: TournamentTeamsAttributes[];
|
|
10
11
|
tournamentTeams?: TeamAttributes[];
|
|
11
12
|
}
|
|
12
13
|
export type TournamentPk = 'tournament_id';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { SeasonMatchAttributes } from '../models';
|
|
2
|
-
|
|
2
|
+
import { Match } from '../../service';
|
|
3
|
+
declare function transformToAttributes(seasonId: string, match: Match): SeasonMatchAttributes;
|
|
3
4
|
export { transformToAttributes as transformFromSeasonMatch };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformFromSeasonMatch = void 0;
|
|
4
|
-
|
|
4
|
+
const match_1 = require("./match");
|
|
5
|
+
function transformToAttributes(seasonId, match) {
|
|
5
6
|
return {
|
|
6
7
|
season_id: seasonId,
|
|
7
|
-
match_id:
|
|
8
|
+
match_id: match.id,
|
|
9
|
+
match: (0, match_1.transformFromMatch)(match)
|
|
8
10
|
};
|
|
9
11
|
}
|
|
10
12
|
exports.transformFromSeasonMatch = transformToAttributes;
|
|
@@ -5,14 +5,16 @@ const _1 = require(".");
|
|
|
5
5
|
const service_1 = require("../../service");
|
|
6
6
|
function transformToAttributes(season, leagueId) {
|
|
7
7
|
const seasonMatches = season.matches != null ?
|
|
8
|
-
season.matches.map(match => (0, _1.transformFromSeasonMatch)(season.id, match
|
|
8
|
+
season.matches.map(match => (0, _1.transformFromSeasonMatch)(season.id, match)) : [];
|
|
9
|
+
const seasonTeams = season.teams.map(team => ({ season_id: season.id, team_id: team.id }));
|
|
9
10
|
return {
|
|
10
11
|
season_id: season.id,
|
|
11
12
|
iteration: season.iteration.id,
|
|
12
13
|
league_id: leagueId,
|
|
13
14
|
champion: season.champion != null ? season.champion.id : undefined,
|
|
14
15
|
seasonTeams: season.teams != null ? season.teams.map(_1.transformFromTeam) : [],
|
|
15
|
-
SeasonMatches: seasonMatches
|
|
16
|
+
SeasonMatches: seasonMatches,
|
|
17
|
+
SeasonTeams: seasonTeams
|
|
16
18
|
};
|
|
17
19
|
}
|
|
18
20
|
exports.transformFromSeason = transformToAttributes;
|
|
@@ -9,7 +9,7 @@ function transformToAttributes(tournamentMatch, tournamentId) {
|
|
|
9
9
|
match_id: tournamentMatch.match.id,
|
|
10
10
|
index: tournamentMatch.index,
|
|
11
11
|
stage: (0, _1.transformFromStage)(tournamentMatch.stage),
|
|
12
|
-
match:
|
|
12
|
+
match: (0, _1.transformFromMatch)(tournamentMatch.match)
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
exports.transformFromTournamentMatch = transformToAttributes;
|
|
@@ -4,14 +4,18 @@ exports.transformFromTournament = exports.transformToAPITournament = exports.tra
|
|
|
4
4
|
const _1 = require(".");
|
|
5
5
|
const service_1 = require("../../service");
|
|
6
6
|
function transformToAttributes(tournament) {
|
|
7
|
-
const tournamentMatches = tournament.matches
|
|
8
|
-
|
|
7
|
+
const tournamentMatches = tournament.matches.map(match => (0, _1.transformFromTournamentMatch)(match, tournament.id));
|
|
8
|
+
const tournamentTeams = tournament.teams.map(team => ({
|
|
9
|
+
tournament_id: tournament.id,
|
|
10
|
+
team_id: team.id
|
|
11
|
+
}));
|
|
9
12
|
return {
|
|
10
13
|
tournament_id: tournament.id,
|
|
11
14
|
iteration: tournament.iteration.id,
|
|
12
15
|
champion: tournament.champion != null ? tournament.champion.id : undefined,
|
|
13
16
|
tournamentTeams: tournament.teams != null ? tournament.teams.map(_1.transformFromTeam) : [],
|
|
14
|
-
TournamentMatches: tournamentMatches
|
|
17
|
+
TournamentMatches: tournamentMatches,
|
|
18
|
+
TournamentTeams: tournamentTeams
|
|
15
19
|
};
|
|
16
20
|
}
|
|
17
21
|
exports.transformFromTournament = transformToAttributes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model } from 'sequelize';
|
|
3
|
-
import type { IterationId, LeagueAttributes, LeagueId, LeagueModel, SeasonMatchAttributes, SeasonTeamsId, SeasonTeamsModel, TeamAttributes, TeamId, TeamModel } from '.';
|
|
3
|
+
import type { IterationId, LeagueAttributes, LeagueId, LeagueModel, SeasonMatchAttributes, SeasonTeamsAttributes, SeasonTeamsId, SeasonTeamsModel, TeamAttributes, TeamId, TeamModel } from '.';
|
|
4
4
|
import { IterationModel, SeasonMatchId, SeasonMatchModel } from '.';
|
|
5
5
|
export interface SeasonAttributes {
|
|
6
6
|
season_id: string;
|
|
@@ -8,6 +8,7 @@ export interface SeasonAttributes {
|
|
|
8
8
|
league_id: string;
|
|
9
9
|
seasonTeams?: TeamAttributes[];
|
|
10
10
|
SeasonMatches?: SeasonMatchAttributes[];
|
|
11
|
+
SeasonTeams?: SeasonTeamsAttributes[];
|
|
11
12
|
league?: LeagueAttributes;
|
|
12
13
|
champion?: string;
|
|
13
14
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
|
-
import type { IterationId, TeamId, TeamModel, TournamentMatchAttributes, TournamentMatchId, TournamentMatchModel, TournamentTeamsId } from '.';
|
|
3
|
+
import type { IterationId, TeamId, TeamModel, TournamentMatchAttributes, TournamentMatchId, TournamentMatchModel, TournamentTeamsAttributes, TournamentTeamsId } from '.';
|
|
4
4
|
import { IterationModel, TeamAttributes, TournamentTeamsModel } from '.';
|
|
5
5
|
export interface TournamentAttributes {
|
|
6
6
|
tournament_id: string;
|
|
7
7
|
iteration: number;
|
|
8
8
|
champion?: string;
|
|
9
9
|
TournamentMatches?: TournamentMatchAttributes[];
|
|
10
|
+
TournamentTeams?: TournamentTeamsAttributes[];
|
|
10
11
|
tournamentTeams?: TeamAttributes[];
|
|
11
12
|
}
|
|
12
13
|
export type TournamentPk = 'tournament_id';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { SeasonMatchAttributes } from '../models';
|
|
2
|
-
|
|
2
|
+
import { Match } from '../../service';
|
|
3
|
+
declare function transformToAttributes(seasonId: string, match: Match): SeasonMatchAttributes;
|
|
3
4
|
export { transformToAttributes as transformFromSeasonMatch };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { transformFromMatch } from './match';
|
|
2
|
+
function transformToAttributes(seasonId, match) {
|
|
2
3
|
return {
|
|
3
4
|
season_id: seasonId,
|
|
4
|
-
match_id:
|
|
5
|
+
match_id: match.id,
|
|
6
|
+
match: transformFromMatch(match)
|
|
5
7
|
};
|
|
6
8
|
}
|
|
7
9
|
export { transformToAttributes as transformFromSeasonMatch };
|
|
@@ -2,14 +2,16 @@ import { transformFromSeasonMatch, transformFromTeam, transformToAPIMatch, trans
|
|
|
2
2
|
import { Season } from '../../service';
|
|
3
3
|
function transformToAttributes(season, leagueId) {
|
|
4
4
|
const seasonMatches = season.matches != null ?
|
|
5
|
-
season.matches.map(match => transformFromSeasonMatch(season.id, match
|
|
5
|
+
season.matches.map(match => transformFromSeasonMatch(season.id, match)) : [];
|
|
6
|
+
const seasonTeams = season.teams.map(team => ({ season_id: season.id, team_id: team.id }));
|
|
6
7
|
return {
|
|
7
8
|
season_id: season.id,
|
|
8
9
|
iteration: season.iteration.id,
|
|
9
10
|
league_id: leagueId,
|
|
10
11
|
champion: season.champion != null ? season.champion.id : undefined,
|
|
11
12
|
seasonTeams: season.teams != null ? season.teams.map(transformFromTeam) : [],
|
|
12
|
-
SeasonMatches: seasonMatches
|
|
13
|
+
SeasonMatches: seasonMatches,
|
|
14
|
+
SeasonTeams: seasonTeams
|
|
13
15
|
};
|
|
14
16
|
}
|
|
15
17
|
function transformToObject(model) {
|
|
@@ -6,7 +6,7 @@ function transformToAttributes(tournamentMatch, tournamentId) {
|
|
|
6
6
|
match_id: tournamentMatch.match.id,
|
|
7
7
|
index: tournamentMatch.index,
|
|
8
8
|
stage: transformFromStage(tournamentMatch.stage),
|
|
9
|
-
match:
|
|
9
|
+
match: transformFromMatch(tournamentMatch.match)
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
function transformToObject(model) {
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { transformFromTeam, transformFromTournamentMatch, transformToAPITeam, transformToAPITournamentMatch, transformToIteration, transformToTeam, transformToTournamentMatch } from '.';
|
|
2
2
|
import { Tournament } from '../../service';
|
|
3
3
|
function transformToAttributes(tournament) {
|
|
4
|
-
const tournamentMatches = tournament.matches
|
|
5
|
-
|
|
4
|
+
const tournamentMatches = tournament.matches.map(match => transformFromTournamentMatch(match, tournament.id));
|
|
5
|
+
const tournamentTeams = tournament.teams.map(team => ({
|
|
6
|
+
tournament_id: tournament.id,
|
|
7
|
+
team_id: team.id
|
|
8
|
+
}));
|
|
6
9
|
return {
|
|
7
10
|
tournament_id: tournament.id,
|
|
8
11
|
iteration: tournament.iteration.id,
|
|
9
12
|
champion: tournament.champion != null ? tournament.champion.id : undefined,
|
|
10
13
|
tournamentTeams: tournament.teams != null ? tournament.teams.map(transformFromTeam) : [],
|
|
11
|
-
TournamentMatches: tournamentMatches
|
|
14
|
+
TournamentMatches: tournamentMatches,
|
|
15
|
+
TournamentTeams: tournamentTeams
|
|
12
16
|
};
|
|
13
17
|
}
|
|
14
18
|
function transformToObject(model) {
|