volleyballsimtypes 0.0.453 → 0.0.455
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/match-rating.js +2 -2
- package/dist/cjs/src/data/transformers/region-qualifier.d.ts +3 -4
- package/dist/cjs/src/data/transformers/region-qualifier.js +0 -8
- package/dist/cjs/src/stat-config/traits.json +1 -1
- package/dist/esm/src/data/transformers/match-rating.js +2 -2
- package/dist/esm/src/data/transformers/region-qualifier.d.ts +3 -4
- package/dist/esm/src/data/transformers/region-qualifier.js +1 -8
- package/dist/esm/src/stat-config/traits.json +1 -1
- package/package.json +1 -1
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.transformFromMatchRating = transformToAttributes;
|
|
4
4
|
const service_1 = require("../../service");
|
|
5
5
|
function transformToAttributes(team, rating) {
|
|
6
|
-
const teamId = team === service_1.MatchTeam.HOME ? rating.match.homeTeam.id : rating.match.awayTeam.id;
|
|
7
6
|
if (team == null)
|
|
8
|
-
throw new Error(
|
|
7
|
+
throw new Error('INVALID_TEAM');
|
|
8
|
+
const teamId = team === service_1.MatchTeam.HOME ? rating.match.homeTeam.id : rating.match.awayTeam.id;
|
|
9
9
|
return {
|
|
10
10
|
match_id: rating.match.id,
|
|
11
11
|
team_id: teamId,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare function transformToAttributes(qualifier: Qualifier): RegionQualifierAttributes;
|
|
1
|
+
import { Region } from '../../service';
|
|
2
|
+
import { RegionQualifierModel } from '../models';
|
|
4
3
|
declare function transformToRegion(model: RegionQualifierModel): Region;
|
|
5
|
-
export {
|
|
4
|
+
export { transformToRegion };
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformFromRegionQualifier = transformToAttributes;
|
|
4
3
|
exports.transformToRegion = transformToRegion;
|
|
5
|
-
function transformToAttributes(qualifier) {
|
|
6
|
-
return {
|
|
7
|
-
iteration: qualifier.iteration.id,
|
|
8
|
-
region_code: qualifier.region.code,
|
|
9
|
-
competition_id: qualifier.id
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
4
|
function transformToRegion(model) {
|
|
13
5
|
return {
|
|
14
6
|
code: model.region_code,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MatchTeam } from '../../service';
|
|
2
2
|
function transformToAttributes(team, rating) {
|
|
3
|
-
const teamId = team === MatchTeam.HOME ? rating.match.homeTeam.id : rating.match.awayTeam.id;
|
|
4
3
|
if (team == null)
|
|
5
|
-
throw new Error(
|
|
4
|
+
throw new Error('INVALID_TEAM');
|
|
5
|
+
const teamId = team === MatchTeam.HOME ? rating.match.homeTeam.id : rating.match.awayTeam.id;
|
|
6
6
|
return {
|
|
7
7
|
match_id: rating.match.id,
|
|
8
8
|
team_id: teamId,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare function transformToAttributes(qualifier: Qualifier): RegionQualifierAttributes;
|
|
1
|
+
import { Region } from '../../service';
|
|
2
|
+
import { RegionQualifierModel } from '../models';
|
|
4
3
|
declare function transformToRegion(model: RegionQualifierModel): Region;
|
|
5
|
-
export {
|
|
4
|
+
export { transformToRegion };
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
function transformToAttributes(qualifier) {
|
|
2
|
-
return {
|
|
3
|
-
iteration: qualifier.iteration.id,
|
|
4
|
-
region_code: qualifier.region.code,
|
|
5
|
-
competition_id: qualifier.id
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
1
|
function transformToRegion(model) {
|
|
9
2
|
return {
|
|
10
3
|
code: model.region_code,
|
|
11
4
|
name: model.countryRegion?.region ?? model.region_code
|
|
12
5
|
};
|
|
13
6
|
}
|
|
14
|
-
export {
|
|
7
|
+
export { transformToRegion };
|