volleyballsimtypes 0.0.75 → 0.0.76
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/events.d.ts +14 -14
- package/dist/cjs/src/api/index.d.ts +7 -8
- package/dist/cjs/src/api/index.js +21 -3
- package/dist/cjs/src/data/index.d.ts +4 -6
- package/dist/cjs/src/data/index.js +18 -93
- package/dist/cjs/src/data/models/index.d.ts +62 -64
- package/dist/cjs/src/data/models/index.js +33 -33
- package/dist/cjs/src/data/transformers/block.js +12 -12
- package/dist/cjs/src/data/transformers/court-target.d.ts +3 -3
- package/dist/cjs/src/data/transformers/court-target.js +14 -14
- package/dist/cjs/src/data/transformers/event-type.d.ts +3 -3
- package/dist/cjs/src/data/transformers/event-type.js +9 -9
- package/dist/cjs/src/data/transformers/index.d.ts +35 -36
- package/dist/cjs/src/data/transformers/index.js +49 -124
- package/dist/cjs/src/data/transformers/libero-replacement.js +3 -3
- package/dist/cjs/src/data/transformers/rally.js +8 -8
- package/dist/cjs/src/data/transformers/reception.js +11 -11
- package/dist/cjs/src/data/transformers/serve.js +12 -12
- package/dist/cjs/src/data/transformers/set.js +11 -11
- package/dist/cjs/src/data/transformers/spike.js +13 -13
- package/dist/cjs/src/index.d.ts +4 -6
- package/dist/cjs/src/index.js +20 -65
- package/dist/cjs/src/service/event/__stubs__/index.js +5 -5
- package/dist/cjs/src/service/event/block.d.ts +6 -6
- package/dist/cjs/src/service/event/block.js +22 -22
- package/dist/cjs/src/service/event/block.test.js +25 -25
- package/dist/cjs/src/service/event/in-play-event.d.ts +3 -3
- package/dist/cjs/src/service/event/libero-replacement.d.ts +3 -3
- package/dist/cjs/src/service/event/libero-replacement.js +7 -7
- package/dist/cjs/src/service/event/libero-replacement.test.js +7 -7
- package/dist/cjs/src/service/event/rally-event.d.ts +3 -3
- package/dist/cjs/src/service/event/rally-event.js +12 -12
- package/dist/cjs/src/service/event/reception.d.ts +7 -7
- package/dist/cjs/src/service/event/reception.js +17 -17
- package/dist/cjs/src/service/event/reception.test.js +13 -13
- package/dist/cjs/src/service/event/score.test.js +2 -2
- package/dist/cjs/src/service/event/serve.d.ts +7 -7
- package/dist/cjs/src/service/event/serve.js +18 -18
- package/dist/cjs/src/service/event/serve.test.js +13 -13
- package/dist/cjs/src/service/event/set.d.ts +7 -7
- package/dist/cjs/src/service/event/set.js +17 -17
- package/dist/cjs/src/service/event/set.test.js +13 -13
- package/dist/cjs/src/service/event/spike.d.ts +7 -7
- package/dist/cjs/src/service/event/spike.js +20 -20
- package/dist/cjs/src/service/event/spike.test.js +20 -20
- package/dist/cjs/src/service/match/{court-target.d.ts → court-target-enum.d.ts} +4 -4
- package/dist/cjs/src/service/match/court-target-enum.js +42 -0
- package/dist/cjs/src/service/match/court-target.test.js +18 -18
- package/dist/cjs/src/service/match/index.d.ts +1 -1
- package/dist/cjs/src/service/match/index.js +1 -1
- package/dist/cjs/src/service/match/rally.js +1 -1
- package/dist/cjs/src/service/match/rally.test.js +2 -2
- package/dist/esm/src/api/events.d.ts +14 -14
- package/dist/esm/src/api/index.d.ts +7 -8
- package/dist/esm/src/api/index.js +7 -2
- package/dist/esm/src/data/index.d.ts +4 -6
- package/dist/esm/src/data/index.js +3 -4
- package/dist/esm/src/data/models/index.d.ts +62 -64
- package/dist/esm/src/data/models/index.js +32 -33
- package/dist/esm/src/data/transformers/block.js +13 -13
- package/dist/esm/src/data/transformers/court-target.d.ts +3 -3
- package/dist/esm/src/data/transformers/court-target.js +15 -15
- package/dist/esm/src/data/transformers/event-type.d.ts +3 -3
- package/dist/esm/src/data/transformers/event-type.js +10 -10
- package/dist/esm/src/data/transformers/index.d.ts +35 -36
- package/dist/esm/src/data/transformers/index.js +35 -36
- package/dist/esm/src/data/transformers/libero-replacement.js +4 -4
- package/dist/esm/src/data/transformers/rally.js +9 -9
- package/dist/esm/src/data/transformers/reception.js +12 -12
- package/dist/esm/src/data/transformers/serve.js +13 -13
- package/dist/esm/src/data/transformers/set.js +12 -12
- package/dist/esm/src/data/transformers/spike.js +14 -14
- package/dist/esm/src/index.d.ts +4 -6
- package/dist/esm/src/index.js +3 -4
- package/dist/esm/src/service/event/__stubs__/index.js +8 -8
- package/dist/esm/src/service/event/block.d.ts +6 -6
- package/dist/esm/src/service/event/block.js +21 -21
- package/dist/esm/src/service/event/block.test.js +28 -28
- package/dist/esm/src/service/event/in-play-event.d.ts +3 -3
- package/dist/esm/src/service/event/libero-replacement.d.ts +3 -3
- package/dist/esm/src/service/event/libero-replacement.js +7 -7
- package/dist/esm/src/service/event/libero-replacement.test.js +9 -9
- package/dist/esm/src/service/event/rally-event.d.ts +3 -3
- package/dist/esm/src/service/event/rally-event.js +11 -11
- package/dist/esm/src/service/event/reception.d.ts +7 -7
- package/dist/esm/src/service/event/reception.js +16 -16
- package/dist/esm/src/service/event/reception.test.js +16 -16
- package/dist/esm/src/service/event/score.test.js +3 -3
- package/dist/esm/src/service/event/serve.d.ts +7 -7
- package/dist/esm/src/service/event/serve.js +17 -17
- package/dist/esm/src/service/event/serve.test.js +16 -16
- package/dist/esm/src/service/event/set.d.ts +7 -7
- package/dist/esm/src/service/event/set.js +16 -16
- package/dist/esm/src/service/event/set.test.js +16 -16
- package/dist/esm/src/service/event/spike.d.ts +7 -7
- package/dist/esm/src/service/event/spike.js +19 -19
- package/dist/esm/src/service/event/spike.test.js +23 -23
- package/dist/esm/src/service/match/{court-target.d.ts → court-target-enum.d.ts} +4 -4
- package/dist/esm/src/service/match/court-target-enum.js +39 -0
- package/dist/esm/src/service/match/court-target.test.js +18 -18
- package/dist/esm/src/service/match/index.d.ts +1 -1
- package/dist/esm/src/service/match/index.js +1 -1
- package/dist/esm/src/service/match/rally.js +2 -2
- package/dist/esm/src/service/match/rally.test.js +3 -3
- package/package.json +1 -1
- package/dist/cjs/src/service/match/court-target.js +0 -42
- package/dist/esm/src/service/match/court-target.js +0 -39
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const globals_1 = require("@jest/globals");
|
|
4
|
-
const
|
|
4
|
+
const court_target_enum_1 = require("./court-target-enum");
|
|
5
5
|
(0, globals_1.describe)('CourtTarget Test Module', () => {
|
|
6
6
|
// getSidePosition Tests
|
|
7
7
|
(0, globals_1.test)('Should get correct court position', () => {
|
|
8
8
|
for (let i = 1; i < 7; i++) {
|
|
9
|
-
(0, globals_1.expect)(
|
|
10
|
-
(0, globals_1.expect)(
|
|
9
|
+
(0, globals_1.expect)(court_target_enum_1.CourtTargetEnum.getSidePosition(i)).toBe(i);
|
|
10
|
+
(0, globals_1.expect)(court_target_enum_1.CourtTargetEnum.getSidePosition(i + 6)).toBe(i);
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
(0, globals_1.test)('Should throw Error when position is out of bounds', () => {
|
|
14
|
-
function position() {
|
|
14
|
+
function position() { court_target_enum_1.CourtTargetEnum.getSidePosition(0); }
|
|
15
15
|
(0, globals_1.expect)(position).toThrow(/^POSITION_INDEX_OUT_OF_BOUNDS$/);
|
|
16
16
|
});
|
|
17
17
|
// getTeamSide Tests
|
|
18
18
|
(0, globals_1.test)('Should return team positions', () => {
|
|
19
|
-
const positions =
|
|
20
|
-
(0, globals_1.expect)(positions[0]).toBe(
|
|
21
|
-
(0, globals_1.expect)(positions[1]).toBe(
|
|
22
|
-
(0, globals_1.expect)(positions[2]).toBe(
|
|
23
|
-
(0, globals_1.expect)(positions[3]).toBe(
|
|
24
|
-
(0, globals_1.expect)(positions[4]).toBe(
|
|
25
|
-
(0, globals_1.expect)(positions[5]).toBe(
|
|
19
|
+
const positions = court_target_enum_1.CourtTargetEnum.getTeamSide();
|
|
20
|
+
(0, globals_1.expect)(positions[0]).toBe(court_target_enum_1.CourtTargetEnum.TEAM_RIGHT_BACK);
|
|
21
|
+
(0, globals_1.expect)(positions[1]).toBe(court_target_enum_1.CourtTargetEnum.TEAM_RIGHT_FRONT);
|
|
22
|
+
(0, globals_1.expect)(positions[2]).toBe(court_target_enum_1.CourtTargetEnum.TEAM_MIDDLE_FRONT);
|
|
23
|
+
(0, globals_1.expect)(positions[3]).toBe(court_target_enum_1.CourtTargetEnum.TEAM_LEFT_FRONT);
|
|
24
|
+
(0, globals_1.expect)(positions[4]).toBe(court_target_enum_1.CourtTargetEnum.TEAM_LEFT_BACK);
|
|
25
|
+
(0, globals_1.expect)(positions[5]).toBe(court_target_enum_1.CourtTargetEnum.TEAM_MIDDLE_BACK);
|
|
26
26
|
});
|
|
27
27
|
// getOpponentSide Tests
|
|
28
28
|
(0, globals_1.test)('Should return opponent team positions', () => {
|
|
29
|
-
const positions =
|
|
30
|
-
(0, globals_1.expect)(positions[0]).toBe(
|
|
31
|
-
(0, globals_1.expect)(positions[1]).toBe(
|
|
32
|
-
(0, globals_1.expect)(positions[2]).toBe(
|
|
33
|
-
(0, globals_1.expect)(positions[3]).toBe(
|
|
34
|
-
(0, globals_1.expect)(positions[4]).toBe(
|
|
35
|
-
(0, globals_1.expect)(positions[5]).toBe(
|
|
29
|
+
const positions = court_target_enum_1.CourtTargetEnum.getOpponentSide();
|
|
30
|
+
(0, globals_1.expect)(positions[0]).toBe(court_target_enum_1.CourtTargetEnum.OPPONENT_RIGHT_BACK);
|
|
31
|
+
(0, globals_1.expect)(positions[1]).toBe(court_target_enum_1.CourtTargetEnum.OPPONENT_RIGHT_FRONT);
|
|
32
|
+
(0, globals_1.expect)(positions[2]).toBe(court_target_enum_1.CourtTargetEnum.OPPONENT_MIDDLE_FRONT);
|
|
33
|
+
(0, globals_1.expect)(positions[3]).toBe(court_target_enum_1.CourtTargetEnum.OPPONENT_LEFT_FRONT);
|
|
34
|
+
(0, globals_1.expect)(positions[4]).toBe(court_target_enum_1.CourtTargetEnum.OPPONENT_LEFT_BACK);
|
|
35
|
+
(0, globals_1.expect)(positions[5]).toBe(court_target_enum_1.CourtTargetEnum.OPPONENT_MIDDLE_BACK);
|
|
36
36
|
});
|
|
37
37
|
});
|
|
@@ -19,5 +19,5 @@ __exportStar(require("./match-rating"), exports);
|
|
|
19
19
|
__exportStar(require("./match-set"), exports);
|
|
20
20
|
__exportStar(require("./rally"), exports);
|
|
21
21
|
__exportStar(require("./court-position"), exports);
|
|
22
|
-
__exportStar(require("./court-target"), exports);
|
|
22
|
+
__exportStar(require("./court-target-enum"), exports);
|
|
23
23
|
__exportStar(require("./match-team"), exports);
|
|
@@ -36,7 +36,7 @@ class Rally {
|
|
|
36
36
|
return this._state;
|
|
37
37
|
}
|
|
38
38
|
get score() {
|
|
39
|
-
return this.events.find(e => e.eventType === rally_event_1.
|
|
39
|
+
return this.events.find(e => e.eventType === rally_event_1.EventTypeEnum.SCORE);
|
|
40
40
|
}
|
|
41
41
|
isOver() {
|
|
42
42
|
return this._state === RallyState.FINISHED;
|
|
@@ -46,7 +46,7 @@ const __stubs__2 = require("../team/__stubs__");
|
|
|
46
46
|
(0, globals_1.test)('Should add event to event array', () => {
|
|
47
47
|
(0, globals_1.expect)(rally.events.length).toBe(0);
|
|
48
48
|
rally.addEvent(__stubs__1.serve);
|
|
49
|
-
(0, globals_1.expect)(rally.events.at(-1)?.eventType).toBe(rally_event_1.
|
|
49
|
+
(0, globals_1.expect)(rally.events.at(-1)?.eventType).toBe(rally_event_1.EventTypeEnum.SERVE);
|
|
50
50
|
});
|
|
51
51
|
// isOver Tests
|
|
52
52
|
(0, globals_1.test)('Should return false if rally state is not FINISHED', () => {
|
|
@@ -68,7 +68,7 @@ const __stubs__2 = require("../team/__stubs__");
|
|
|
68
68
|
(0, globals_1.test)('Should return Score if events array contains a Score', () => {
|
|
69
69
|
rally.addEvent(__stubs__1.score);
|
|
70
70
|
(0, globals_1.expect)(rally.score).not.toBeUndefined();
|
|
71
|
-
(0, globals_1.expect)(rally.score?.eventType).toBe(rally_event_1.
|
|
71
|
+
(0, globals_1.expect)(rally.score?.eventType).toBe(rally_event_1.EventTypeEnum.SCORE);
|
|
72
72
|
});
|
|
73
73
|
// RallyState Tests
|
|
74
74
|
(0, globals_1.test)('Should get next state', () => {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockFailureEnum, BlockTypeEnum, CourtTargetEnum, EventTypeEnum, LiberoReplacementTypeEnum, ReceptionFailureEnum, ReceptionTypeEnum, ServeFailureEnum, ServeTypeEnum, SetFailureEnum, SetTypeEnum, SpikeFailureEnum, SpikeTypeEnum } from '../service';
|
|
2
2
|
export interface APIEvent {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly order: number;
|
|
5
5
|
readonly playerId: string;
|
|
6
|
-
readonly eventType:
|
|
6
|
+
readonly eventType: EventTypeEnum;
|
|
7
7
|
}
|
|
8
8
|
export interface APILiberoReplacement extends APIEvent {
|
|
9
|
-
readonly type:
|
|
9
|
+
readonly type: LiberoReplacementTypeEnum;
|
|
10
10
|
readonly liberoId: string;
|
|
11
11
|
}
|
|
12
12
|
export interface APISubstitution extends APIEvent {
|
|
13
13
|
readonly playerOutId: string;
|
|
14
14
|
}
|
|
15
15
|
export interface APIInPlayEvent extends APIEvent {
|
|
16
|
-
readonly target:
|
|
16
|
+
readonly target: CourtTargetEnum;
|
|
17
17
|
readonly modifier: number;
|
|
18
18
|
readonly score: number;
|
|
19
19
|
}
|
|
@@ -21,23 +21,23 @@ export interface APIScore extends APIEvent {
|
|
|
21
21
|
readonly teamId: string;
|
|
22
22
|
}
|
|
23
23
|
export interface APIServe extends APIInPlayEvent {
|
|
24
|
-
readonly type:
|
|
25
|
-
readonly failure:
|
|
24
|
+
readonly type: ServeTypeEnum;
|
|
25
|
+
readonly failure: ServeFailureEnum;
|
|
26
26
|
}
|
|
27
27
|
export interface APISet extends APIInPlayEvent {
|
|
28
|
-
readonly type:
|
|
29
|
-
readonly failure:
|
|
28
|
+
readonly type: SetTypeEnum;
|
|
29
|
+
readonly failure: SetFailureEnum;
|
|
30
30
|
}
|
|
31
31
|
export interface APISpike extends APIInPlayEvent {
|
|
32
|
-
readonly failure:
|
|
33
|
-
readonly type:
|
|
32
|
+
readonly failure: SpikeFailureEnum;
|
|
33
|
+
readonly type: SpikeTypeEnum;
|
|
34
34
|
}
|
|
35
35
|
export interface APIReception extends APIInPlayEvent {
|
|
36
|
-
readonly type:
|
|
37
|
-
readonly failure:
|
|
36
|
+
readonly type: ReceptionTypeEnum;
|
|
37
|
+
readonly failure: ReceptionFailureEnum;
|
|
38
38
|
}
|
|
39
39
|
export interface APIBlock extends APIInPlayEvent {
|
|
40
|
-
readonly failure:
|
|
41
|
-
readonly type:
|
|
40
|
+
readonly failure: BlockFailureEnum;
|
|
41
|
+
readonly type: BlockTypeEnum;
|
|
42
42
|
readonly blockers: string[];
|
|
43
43
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { APICoach, APITeam, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APIMatchSet, APISetStatistics, APIInPlayEvent, APILeague, APIMatch, APIPlayer, APISeason, APIEvent, APILiberoReplacement, APIBlock, APITrait, APIRally, APITournament, APITournamentMatch };
|
|
1
|
+
export * from './events';
|
|
2
|
+
export * from './league';
|
|
3
|
+
export * from './match';
|
|
4
|
+
export * from './player';
|
|
5
|
+
export * from './team';
|
|
6
|
+
export * from './coach';
|
|
7
|
+
export * from './tournament';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { initModels, transformToStage, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, transformFromStage, transformFromPlayerTeam, transformFromMatchRating, MatchRatingModel, MatchRatingAttributes, DraftModel, DraftAttributes, DraftPickAttributes, DraftPickModel, PlayerTeamModel, PlayerTeamAttributes, SeasonMatchModel, SeasonMatchAttributes, TournamentAttributes, TournamentModel, TournamentMatchAttributes, TournamentMatchModel, BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, EventAttributes, EventModel, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, TeamModel, UserAttributes, UserModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformFromSeasonMatch, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPILeague, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToAPICoach, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, transformToIteration, transformFromIteration, TournamentTeamsAttributes, TournamentTeamsModel, IterationModel, IterationAttributes, };
|
|
6
|
-
export type { UserCreationAttributes, UserOptionalAttributes, UserRole, UserId, UserPk, MatchRatingCreationAttributes, MatchRatingId, MatchRatingPk, DraftPk, DraftId, DraftCreationAttributes, DraftPickCreationAttributes, DraftPickId, DraftPickPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, TournamentOptionalAttributes, TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, IterationCreationAttributes, IterationId, IterationPk };
|
|
1
|
+
export type { MatchRatingCreationAttributes, MatchRatingId, MatchRatingPk, DraftPk, DraftId, DraftCreationAttributes, DraftPickCreationAttributes, DraftPickId, DraftPickPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, BlockCreationAttributes, BlockFailure, BlockId, BlockPk, BlockType, CoachCreationAttributes, CoachId, CoachPk, CountryCreationAttributes, CountryId, CountryPk, CourtPositionType, CourtTarget, EventCreationAttributes, EventId, EventPk, EventType, FormationType, LeagueCreationAttributes, LeagueId, LeaguePk, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType, MatchCreationAttributes, MatchId, MatchPk, MatchSetCreationAttributes, MatchSetId, MatchSetPk, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsPk, PlayerCreationAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyId, RallyPk, RallyPositionCreationAttributes, RallyPositionId, RallyPositionPk, ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType, RoleType, ScoreCreationAttributes, ScoreId, ScorePk, SeasonCreationAttributes, SeasonId, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk, ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType, SetCreationAttributes, SetFailure, SetId, SetPk, SetType, Side, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType, SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk, TeamCreationAttributes, TeamId, TeamPk, TournamentCreationAttributes, TournamentId, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentPk, TournamentStage, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk, TraitType, IterationPk, IterationCreationAttributes, IterationId, UserCreationAttributes, UserOptionalAttributes, UserRole, UserId, UserPk } from './models';
|
|
2
|
+
export { UserAttributes, UserModel, MatchRatingModel, MatchRatingAttributes, DraftModel, DraftAttributes, DraftPickAttributes, DraftPickModel, PlayerTeamModel, PlayerTeamAttributes, BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, EventAttributes, EventModel, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonMatchAttributes, SeasonMatchModel, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, TeamModel, TournamentAttributes, TournamentMatchAttributes, TournamentMatchModel, TournamentModel, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentTeamsModel, IterationModel, IterationAttributes } from './models';
|
|
3
|
+
export * from './transformers';
|
|
4
|
+
export { initModels } from './init-models';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { initModels, transformToStage, transformFromDraft, transformToDraft, transformFromDraftPick, transformToDraftPick, transformFromStage, transformFromPlayerTeam, transformFromMatchRating, MatchRatingModel, DraftModel, DraftPickModel, PlayerTeamModel, SeasonMatchModel, TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, UserModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformFromSeasonMatch, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPILeague, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToAPICoach, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, transformToIteration, transformFromIteration, TournamentTeamsModel, IterationModel, };
|
|
1
|
+
export { UserModel, MatchRatingModel, DraftModel, DraftPickModel, PlayerTeamModel, BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, TournamentTeamsModel, IterationModel } from './models';
|
|
2
|
+
export * from './transformers';
|
|
3
|
+
export { initModels } from './init-models';
|
|
@@ -1,64 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
export type { MatchRatingCreationAttributes, MatchRatingId, MatchRatingPk, DraftPk, DraftId, DraftCreationAttributes, DraftPickCreationAttributes, DraftPickId, DraftPickPk, PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk, TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, IterationPk, IterationId, IterationCreationAttributes, UserCreationAttributes, UserOptionalAttributes, UserRole, UserId, UserPk };
|
|
64
|
-
export { UserAttributes, UserModel, MatchRatingModel, MatchRatingAttributes, DraftModel, DraftAttributes, DraftPickAttributes, DraftPickModel, PlayerTeamModel, PlayerTeamAttributes, TournamentAttributes, TournamentMatchAttributes, BlockAttributes, BlockOptionalAttributes, CoachAttributes, CoachOptionalAttributes, CountryAttributes, SeasonMatchAttributes, EventAttributes, LeagueAttributes, LiberoReplacementAttributes, MatchAttributes, MatchSetAttributes, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsOptionalAttributes, PlayerAttributes, RallyAttributes, RallyPositionAttributes, ReceptionAttributes, ScoreAttributes, SeasonAttributes, SeasonTeamsAttributes, ServeAttributes, SetAttributes, SpikeAttributes, SubstitutionAttributes, TeamAttributes, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel, SeasonMatchModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentTeamsModel, IterationAttributes, IterationModel };
|
|
1
|
+
export type { BlockCreationAttributes, BlockFailure, BlockId, BlockOptionalAttributes, BlockPk, BlockType } from './block';
|
|
2
|
+
export { BlockAttributes, BlockModel } from './block';
|
|
3
|
+
export type { CoachCreationAttributes, CoachId, CoachOptionalAttributes, CoachPk, FormationType } from './coach';
|
|
4
|
+
export { CoachAttributes, CoachModel } from './coach';
|
|
5
|
+
export type { CountryCreationAttributes, CountryId, CountryPk } from './country';
|
|
6
|
+
export { CountryAttributes, CountryModel } from './country';
|
|
7
|
+
export type { DraftCreationAttributes, DraftId, DraftPk } from './draft';
|
|
8
|
+
export { DraftAttributes, DraftModel } from './draft';
|
|
9
|
+
export type { DraftPickCreationAttributes, DraftPickId, DraftPickPk } from './draft-pick';
|
|
10
|
+
export { DraftPickAttributes, DraftPickModel } from './draft-pick';
|
|
11
|
+
export type { PlayerTeamCreationAttributes, PlayerTeamId, PlayerTeamOptionalAttributes, PlayerTeamPk } from './player-team';
|
|
12
|
+
export { PlayerTeamAttributes, PlayerTeamModel } from './player-team';
|
|
13
|
+
export type { CourtTarget, EventCreationAttributes, EventId, EventPk, EventType } from './event';
|
|
14
|
+
export { EventAttributes, EventModel } from './event';
|
|
15
|
+
export type { IterationCreationAttributes, IterationId, IterationPk } from './iteration';
|
|
16
|
+
export { IterationAttributes, IterationModel } from './iteration';
|
|
17
|
+
export type { LeagueCreationAttributes, LeagueId, LeaguePk } from './league';
|
|
18
|
+
export { LeagueAttributes, LeagueModel } from './league';
|
|
19
|
+
export type { LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType } from './libero-replacement';
|
|
20
|
+
export { LiberoReplacementAttributes, LiberoReplacementModel } from './libero-replacement';
|
|
21
|
+
export type { MatchCreationAttributes, MatchId, MatchPk } from './match';
|
|
22
|
+
export { MatchAttributes, MatchModel } from './match';
|
|
23
|
+
export type { MatchSetCreationAttributes, MatchSetId, MatchSetOptionalAttributes, MatchSetPk } from './match-set';
|
|
24
|
+
export { MatchSetAttributes, MatchSetModel } from './match-set';
|
|
25
|
+
export type { MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsOptionalAttributes, MatchSetStatsPk } from './match-set-stats';
|
|
26
|
+
export { MatchSetStatsAttributes, MatchSetStatsModel } from './match-set-stats';
|
|
27
|
+
export type { PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsOptionalAttributes, PerformanceStatsPk } from './performance-stats';
|
|
28
|
+
export { PerformanceStatsAttributes, PerformanceStatsModel } from './performance-stats';
|
|
29
|
+
export type { PlayerCreationAttributes, PlayerId, PlayerPk, RoleType, TraitType } from './player';
|
|
30
|
+
export { PlayerAttributes, PlayerModel } from './player';
|
|
31
|
+
export { RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk } from './rally';
|
|
32
|
+
export { CourtPositionType, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, Side } from './rally-position';
|
|
33
|
+
export type { ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType } from './reception';
|
|
34
|
+
export { ReceptionAttributes, ReceptionModel } from './reception';
|
|
35
|
+
export type { ScoreCreationAttributes, ScoreId, ScorePk } from './score';
|
|
36
|
+
export { ScoreAttributes, ScoreModel } from './score';
|
|
37
|
+
export type { SeasonCreationAttributes, SeasonId, SeasonPk } from './season';
|
|
38
|
+
export { SeasonAttributes, SeasonModel } from './season';
|
|
39
|
+
export type { SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk } from './season-teams';
|
|
40
|
+
export { SeasonTeamsAttributes, SeasonTeamsModel } from './season-teams';
|
|
41
|
+
export type { SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk } from './season-match';
|
|
42
|
+
export { SeasonMatchAttributes, SeasonMatchModel } from './season-match';
|
|
43
|
+
export type { ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType } from './serve';
|
|
44
|
+
export { ServeAttributes, ServeModel } from './serve';
|
|
45
|
+
export type { SetCreationAttributes, SetFailure, SetId, SetPk, SetType } from './set';
|
|
46
|
+
export { SetAttributes, SetModel } from './set';
|
|
47
|
+
export type { SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType } from './spike';
|
|
48
|
+
export { SpikeAttributes, SpikeModel } from './spike';
|
|
49
|
+
export type { SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk } from './substitution';
|
|
50
|
+
export { SubstitutionAttributes, SubstitutionModel } from './substitution';
|
|
51
|
+
export type { TeamCreationAttributes, TeamId, TeamPk } from './team';
|
|
52
|
+
export { TeamAttributes, TeamModel } from './team';
|
|
53
|
+
export type { TournamentCreationAttributes, TournamentId, TournamentOptionalAttributes, TournamentPk } from './tournament';
|
|
54
|
+
export { TournamentAttributes, TournamentModel } from './tournament';
|
|
55
|
+
export type { TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage } from './tournament-match';
|
|
56
|
+
export { TournamentMatchAttributes, TournamentMatchModel } from './tournament-match';
|
|
57
|
+
export type { TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk } from './tournament-teams';
|
|
58
|
+
export { TournamentTeamsAttributes, TournamentTeamsModel } from './tournament-teams';
|
|
59
|
+
export type { MatchRatingCreationAttributes, MatchRatingId, MatchRatingPk } from './match-rating';
|
|
60
|
+
export { MatchRatingAttributes, MatchRatingModel } from './match-rating';
|
|
61
|
+
export type { UserCreationAttributes, UserId, UserOptionalAttributes, UserPk, UserRole } from './user';
|
|
62
|
+
export { UserAttributes, UserModel } from './user';
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export { UserModel, MatchRatingModel, DraftModel, DraftPickModel, PlayerTeamModel, TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel, SeasonMatchModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentTeamsModel, IterationModel };
|
|
1
|
+
export { BlockModel } from './block';
|
|
2
|
+
export { CoachModel } from './coach';
|
|
3
|
+
export { CountryModel } from './country';
|
|
4
|
+
export { DraftModel } from './draft';
|
|
5
|
+
export { DraftPickModel } from './draft-pick';
|
|
6
|
+
export { PlayerTeamModel } from './player-team';
|
|
7
|
+
export { EventModel } from './event';
|
|
8
|
+
export { IterationModel } from './iteration';
|
|
9
|
+
export { LeagueModel } from './league';
|
|
10
|
+
export { LiberoReplacementModel } from './libero-replacement';
|
|
11
|
+
export { MatchModel } from './match';
|
|
12
|
+
export { MatchSetModel } from './match-set';
|
|
13
|
+
export { MatchSetStatsModel } from './match-set-stats';
|
|
14
|
+
export { PerformanceStatsModel } from './performance-stats';
|
|
15
|
+
export { PlayerModel } from './player';
|
|
16
|
+
export { RallyModel } from './rally';
|
|
17
|
+
export { RallyPositionModel } from './rally-position';
|
|
18
|
+
export { ReceptionModel } from './reception';
|
|
19
|
+
export { ScoreModel } from './score';
|
|
20
|
+
export { SeasonModel } from './season';
|
|
21
|
+
export { SeasonTeamsModel } from './season-teams';
|
|
22
|
+
export { SeasonMatchModel } from './season-match';
|
|
23
|
+
export { ServeModel } from './serve';
|
|
24
|
+
export { SetModel } from './set';
|
|
25
|
+
export { SpikeModel } from './spike';
|
|
26
|
+
export { SubstitutionModel } from './substitution';
|
|
27
|
+
export { TeamModel } from './team';
|
|
28
|
+
export { TournamentModel } from './tournament';
|
|
29
|
+
export { TournamentMatchModel } from './tournament-match';
|
|
30
|
+
export { TournamentTeamsModel } from './tournament-teams';
|
|
31
|
+
export { MatchRatingModel } from './match-rating';
|
|
32
|
+
export { UserModel } from './user';
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { Block,
|
|
1
|
+
import { Block, BlockFailureEnum, BlockTypeEnum } from '../../service';
|
|
2
2
|
import { transformFromCourtTarget, transformFromEventType, transformToCourtTarget, transformToEventType, transformToPlayer } from '.';
|
|
3
3
|
function transformToBlockFailure(failure) {
|
|
4
4
|
switch (failure) {
|
|
5
|
-
case
|
|
5
|
+
case BlockFailureEnum.NO_FAILURE:
|
|
6
6
|
return 'NO_FAILURE';
|
|
7
|
-
case
|
|
7
|
+
case BlockFailureEnum.FAULT:
|
|
8
8
|
return 'FAULT';
|
|
9
|
-
case
|
|
9
|
+
case BlockFailureEnum.MISS:
|
|
10
10
|
return 'MISS';
|
|
11
|
-
case
|
|
11
|
+
case BlockFailureEnum.OUT_OF_BOUNDS:
|
|
12
12
|
return 'OUT_OF_BOUNDS';
|
|
13
|
-
case
|
|
13
|
+
case BlockFailureEnum.WIPE:
|
|
14
14
|
return 'WIPE';
|
|
15
|
-
case
|
|
15
|
+
case BlockFailureEnum.TOOL:
|
|
16
16
|
return 'TOOL';
|
|
17
17
|
default:
|
|
18
18
|
throw new Error('UNKNOWN_ROLE');
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
function transformFromBlockFailure(failure) {
|
|
22
|
-
return
|
|
22
|
+
return BlockFailureEnum[failure];
|
|
23
23
|
}
|
|
24
24
|
function transformToBlockType(type) {
|
|
25
25
|
switch (type) {
|
|
26
|
-
case
|
|
26
|
+
case BlockTypeEnum.NO_BLOCKER:
|
|
27
27
|
return 'NO_BLOCKER';
|
|
28
|
-
case
|
|
28
|
+
case BlockTypeEnum.SINGLE:
|
|
29
29
|
return 'SINGLE';
|
|
30
|
-
case
|
|
30
|
+
case BlockTypeEnum.DOUBLE:
|
|
31
31
|
return 'DOUBLE';
|
|
32
|
-
case
|
|
32
|
+
case BlockTypeEnum.TRIPLE:
|
|
33
33
|
return 'TRIPLE';
|
|
34
34
|
default:
|
|
35
35
|
throw new Error('UNKNOWN_ROLE');
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
function transformFromBlockType(type) {
|
|
39
|
-
return
|
|
39
|
+
return BlockTypeEnum[type];
|
|
40
40
|
}
|
|
41
41
|
function transformToAttributes(event, rallyId) {
|
|
42
42
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CourtTargetEnum } from '../../service';
|
|
2
2
|
import { CourtTarget as CourtTargetType } from '../models';
|
|
3
|
-
declare function transformToType(target:
|
|
4
|
-
declare function transformFromType(target: CourtTargetType):
|
|
3
|
+
declare function transformToType(target: CourtTargetEnum): CourtTargetType;
|
|
4
|
+
declare function transformFromType(target: CourtTargetType): CourtTargetEnum;
|
|
5
5
|
export { transformToType as transformFromCourtTarget, transformFromType as transformToCourtTarget };
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CourtTargetEnum } from '../../service';
|
|
2
2
|
function transformToType(target) {
|
|
3
3
|
switch (target) {
|
|
4
|
-
case
|
|
4
|
+
case CourtTargetEnum.NO_TARGET:
|
|
5
5
|
return 'NO_TARGET';
|
|
6
|
-
case
|
|
6
|
+
case CourtTargetEnum.OPPONENT_RIGHT_BACK:
|
|
7
7
|
return 'OPPONENT_RIGHT_BACK';
|
|
8
|
-
case
|
|
8
|
+
case CourtTargetEnum.OPPONENT_MIDDLE_BACK:
|
|
9
9
|
return 'OPPONENT_MIDDLE_BACK';
|
|
10
|
-
case
|
|
10
|
+
case CourtTargetEnum.OPPONENT_LEFT_BACK:
|
|
11
11
|
return 'OPPONENT_LEFT_BACK';
|
|
12
|
-
case
|
|
12
|
+
case CourtTargetEnum.OPPONENT_RIGHT_FRONT:
|
|
13
13
|
return 'OPPONENT_RIGHT_FRONT';
|
|
14
|
-
case
|
|
14
|
+
case CourtTargetEnum.OPPONENT_MIDDLE_FRONT:
|
|
15
15
|
return 'OPPONENT_MIDDLE_FRONT';
|
|
16
|
-
case
|
|
16
|
+
case CourtTargetEnum.OPPONENT_LEFT_FRONT:
|
|
17
17
|
return 'OPPONENT_LEFT_FRONT';
|
|
18
|
-
case
|
|
18
|
+
case CourtTargetEnum.TEAM_RIGHT_BACK:
|
|
19
19
|
return 'TEAM_RIGHT_BACK';
|
|
20
|
-
case
|
|
20
|
+
case CourtTargetEnum.TEAM_MIDDLE_BACK:
|
|
21
21
|
return 'TEAM_MIDDLE_BACK';
|
|
22
|
-
case
|
|
22
|
+
case CourtTargetEnum.TEAM_LEFT_BACK:
|
|
23
23
|
return 'TEAM_LEFT_BACK';
|
|
24
|
-
case
|
|
24
|
+
case CourtTargetEnum.TEAM_RIGHT_FRONT:
|
|
25
25
|
return 'TEAM_RIGHT_FRONT';
|
|
26
|
-
case
|
|
26
|
+
case CourtTargetEnum.TEAM_MIDDLE_FRONT:
|
|
27
27
|
return 'TEAM_MIDDLE_FRONT';
|
|
28
|
-
case
|
|
28
|
+
case CourtTargetEnum.TEAM_LEFT_FRONT:
|
|
29
29
|
return 'TEAM_LEFT_FRONT';
|
|
30
30
|
default:
|
|
31
31
|
throw new Error('UNKNOWN_ROLE');
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
function transformFromType(target) {
|
|
35
|
-
return
|
|
35
|
+
return CourtTargetEnum[target];
|
|
36
36
|
}
|
|
37
37
|
export { transformToType as transformFromCourtTarget, transformFromType as transformToCourtTarget };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventTypeEnum } from '../../service';
|
|
2
2
|
import { EventType as eventType } from '../models';
|
|
3
|
-
declare function transformToType(type:
|
|
4
|
-
declare function transformFromType(type: eventType):
|
|
3
|
+
declare function transformToType(type: EventTypeEnum): eventType;
|
|
4
|
+
declare function transformFromType(type: eventType): EventTypeEnum;
|
|
5
5
|
export { transformToType as transformFromEventType, transformFromType as transformToEventType };
|