volleyballsimtypes 0.0.16 → 0.0.17
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/coach.d.ts +3 -2
- package/dist/cjs/src/data/transformers/coach.d.ts +1 -1
- package/dist/cjs/src/data/transformers/coach.js +7 -7
- package/dist/cjs/src/data/transformers/formation.d.ts +3 -3
- package/dist/cjs/src/data/transformers/formation.js +4 -4
- package/dist/cjs/src/service/coach/coach.d.ts +2 -2
- package/dist/cjs/src/service/coach/formation.js +1 -1
- package/dist/esm/src/data/models/coach.d.ts +3 -2
- package/dist/esm/src/data/transformers/coach.d.ts +1 -1
- package/dist/esm/src/data/transformers/coach.js +7 -7
- package/dist/esm/src/data/transformers/formation.d.ts +3 -3
- package/dist/esm/src/data/transformers/formation.js +4 -4
- package/dist/esm/src/service/coach/coach.d.ts +2 -2
- package/dist/esm/src/service/coach/formation.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import type { CountryId, CountryModel } from './country';
|
|
|
4
4
|
import type { TeamId, TeamModel } from './team';
|
|
5
5
|
export interface CoachAttributes {
|
|
6
6
|
coach_id: string;
|
|
7
|
-
formation:
|
|
7
|
+
formation: formation;
|
|
8
8
|
substitution_tolerance: number;
|
|
9
9
|
first_name: string;
|
|
10
10
|
last_name: string;
|
|
@@ -12,11 +12,12 @@ export interface CoachAttributes {
|
|
|
12
12
|
}
|
|
13
13
|
export type CoachPk = 'coach_id';
|
|
14
14
|
export type CoachId = CoachModel[CoachPk];
|
|
15
|
+
export type formation = '4-2' | '6-2' | '5-1';
|
|
15
16
|
export type CoachOptionalAttributes = 'substitution_tolerance';
|
|
16
17
|
export type CoachCreationAttributes = Optional<CoachAttributes, CoachOptionalAttributes>;
|
|
17
18
|
export declare class CoachModel extends Model<CoachAttributes, CoachCreationAttributes> implements CoachAttributes {
|
|
18
19
|
coach_id: string;
|
|
19
|
-
formation:
|
|
20
|
+
formation: formation;
|
|
20
21
|
substitution_tolerance: number;
|
|
21
22
|
first_name: string;
|
|
22
23
|
last_name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoachAttributes, CoachModel } from '../models';
|
|
2
2
|
import { Coach } from '../../service';
|
|
3
3
|
declare function transformToAttributes(coach: Coach): CoachAttributes;
|
|
4
|
-
declare function transformToObject(
|
|
4
|
+
declare function transformToObject(model: CoachModel): Coach;
|
|
5
5
|
export { transformToObject as transformToCoach, transformToAttributes as transformFromCoach };
|
|
@@ -15,16 +15,16 @@ function transformToAttributes(coach) {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
exports.transformFromCoach = transformToAttributes;
|
|
18
|
-
function transformToObject(
|
|
18
|
+
function transformToObject(model) {
|
|
19
19
|
return new service_1.Coach({
|
|
20
|
-
id:
|
|
20
|
+
id: model.coach_id,
|
|
21
21
|
name: {
|
|
22
|
-
first:
|
|
23
|
-
last:
|
|
22
|
+
first: model.first_name,
|
|
23
|
+
last: model.last_name
|
|
24
24
|
},
|
|
25
|
-
country: (0, country_1.transformToCountry)(
|
|
26
|
-
substitutionTolerance:
|
|
27
|
-
formation:
|
|
25
|
+
country: (0, country_1.transformToCountry)(model.country),
|
|
26
|
+
substitutionTolerance: model.substitution_tolerance != null ? model.substitution_tolerance : undefined,
|
|
27
|
+
formation: (0, formation_1.transformToFormation)(model.formation)
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
exports.transformToCoach = transformToObject;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Formation } from '../../service';
|
|
2
|
-
|
|
3
|
-
declare function transformToType(
|
|
4
|
-
declare function transformFromType(
|
|
2
|
+
import { formation } from '../models/coach';
|
|
3
|
+
declare function transformToType(_formation: Formation): formation;
|
|
4
|
+
declare function transformFromType(_formation: formation): Formation;
|
|
5
5
|
export { transformToType as transformFromFormation, transformFromType as transformToFormation };
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformToFormation = exports.transformFromFormation = void 0;
|
|
4
4
|
const service_1 = require("../../service");
|
|
5
|
-
function transformToType(
|
|
6
|
-
return
|
|
5
|
+
function transformToType(_formation) {
|
|
6
|
+
return _formation.name;
|
|
7
7
|
}
|
|
8
8
|
exports.transformFromFormation = transformToType;
|
|
9
|
-
function transformFromType(
|
|
10
|
-
return service_1.Formation[
|
|
9
|
+
function transformFromType(_formation) {
|
|
10
|
+
return service_1.Formation[_formation];
|
|
11
11
|
}
|
|
12
12
|
exports.transformToFormation = transformFromType;
|
|
@@ -5,14 +5,14 @@ export interface CoachOpts {
|
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly name: Name;
|
|
7
7
|
readonly country: Country;
|
|
8
|
-
readonly formation
|
|
8
|
+
readonly formation: Formation;
|
|
9
9
|
readonly substitutionTolerance?: number;
|
|
10
10
|
}
|
|
11
11
|
export declare class Coach {
|
|
12
12
|
readonly id: string;
|
|
13
13
|
readonly name: Name;
|
|
14
14
|
readonly country: Country;
|
|
15
|
-
readonly formation
|
|
15
|
+
readonly formation: Formation;
|
|
16
16
|
readonly substitutionTolerance?: number;
|
|
17
17
|
constructor({ id, name, country, formation, substitutionTolerance }: CoachOpts);
|
|
18
18
|
}
|
|
@@ -4,7 +4,7 @@ import type { CountryId, CountryModel } from './country';
|
|
|
4
4
|
import type { TeamId, TeamModel } from './team';
|
|
5
5
|
export interface CoachAttributes {
|
|
6
6
|
coach_id: string;
|
|
7
|
-
formation:
|
|
7
|
+
formation: formation;
|
|
8
8
|
substitution_tolerance: number;
|
|
9
9
|
first_name: string;
|
|
10
10
|
last_name: string;
|
|
@@ -12,11 +12,12 @@ export interface CoachAttributes {
|
|
|
12
12
|
}
|
|
13
13
|
export type CoachPk = 'coach_id';
|
|
14
14
|
export type CoachId = CoachModel[CoachPk];
|
|
15
|
+
export type formation = '4-2' | '6-2' | '5-1';
|
|
15
16
|
export type CoachOptionalAttributes = 'substitution_tolerance';
|
|
16
17
|
export type CoachCreationAttributes = Optional<CoachAttributes, CoachOptionalAttributes>;
|
|
17
18
|
export declare class CoachModel extends Model<CoachAttributes, CoachCreationAttributes> implements CoachAttributes {
|
|
18
19
|
coach_id: string;
|
|
19
|
-
formation:
|
|
20
|
+
formation: formation;
|
|
20
21
|
substitution_tolerance: number;
|
|
21
22
|
first_name: string;
|
|
22
23
|
last_name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoachAttributes, CoachModel } from '../models';
|
|
2
2
|
import { Coach } from '../../service';
|
|
3
3
|
declare function transformToAttributes(coach: Coach): CoachAttributes;
|
|
4
|
-
declare function transformToObject(
|
|
4
|
+
declare function transformToObject(model: CoachModel): Coach;
|
|
5
5
|
export { transformToObject as transformToCoach, transformToAttributes as transformFromCoach };
|
|
@@ -11,16 +11,16 @@ function transformToAttributes(coach) {
|
|
|
11
11
|
formation: transformFromFormation(coach.formation)
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function transformToObject(
|
|
14
|
+
function transformToObject(model) {
|
|
15
15
|
return new Coach({
|
|
16
|
-
id:
|
|
16
|
+
id: model.coach_id,
|
|
17
17
|
name: {
|
|
18
|
-
first:
|
|
19
|
-
last:
|
|
18
|
+
first: model.first_name,
|
|
19
|
+
last: model.last_name
|
|
20
20
|
},
|
|
21
|
-
country: transformToCountry(
|
|
22
|
-
substitutionTolerance:
|
|
23
|
-
formation:
|
|
21
|
+
country: transformToCountry(model.country),
|
|
22
|
+
substitutionTolerance: model.substitution_tolerance != null ? model.substitution_tolerance : undefined,
|
|
23
|
+
formation: transformToFormation(model.formation)
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
export { transformToObject as transformToCoach, transformToAttributes as transformFromCoach };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Formation } from '../../service';
|
|
2
|
-
|
|
3
|
-
declare function transformToType(
|
|
4
|
-
declare function transformFromType(
|
|
2
|
+
import { formation } from '../models/coach';
|
|
3
|
+
declare function transformToType(_formation: Formation): formation;
|
|
4
|
+
declare function transformFromType(_formation: formation): Formation;
|
|
5
5
|
export { transformToType as transformFromFormation, transformFromType as transformToFormation };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Formation } from '../../service';
|
|
2
|
-
function transformToType(
|
|
3
|
-
return
|
|
2
|
+
function transformToType(_formation) {
|
|
3
|
+
return _formation.name;
|
|
4
4
|
}
|
|
5
|
-
function transformFromType(
|
|
6
|
-
return Formation[
|
|
5
|
+
function transformFromType(_formation) {
|
|
6
|
+
return Formation[_formation];
|
|
7
7
|
}
|
|
8
8
|
export { transformToType as transformFromFormation, transformFromType as transformToFormation };
|
|
@@ -5,14 +5,14 @@ export interface CoachOpts {
|
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly name: Name;
|
|
7
7
|
readonly country: Country;
|
|
8
|
-
readonly formation
|
|
8
|
+
readonly formation: Formation;
|
|
9
9
|
readonly substitutionTolerance?: number;
|
|
10
10
|
}
|
|
11
11
|
export declare class Coach {
|
|
12
12
|
readonly id: string;
|
|
13
13
|
readonly name: Name;
|
|
14
14
|
readonly country: Country;
|
|
15
|
-
readonly formation
|
|
15
|
+
readonly formation: Formation;
|
|
16
16
|
readonly substitutionTolerance?: number;
|
|
17
17
|
constructor({ id, name, country, formation, substitutionTolerance }: CoachOpts);
|
|
18
18
|
}
|