volleyballsimtypes 0.0.176 → 0.0.178
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/rally.js +2 -3
- package/dist/cjs/src/service/event/event-types.d.ts +7 -0
- package/dist/cjs/src/service/event/event-types.js +2 -0
- package/dist/cjs/src/service/event/index.d.ts +1 -0
- package/dist/cjs/src/service/event/index.js +1 -0
- package/dist/cjs/src/service/match/rally.d.ts +3 -4
- package/dist/cjs/src/service/match/rally.js +2 -2
- package/dist/esm/src/data/transformers/rally.js +2 -3
- package/dist/esm/src/service/event/event-types.d.ts +7 -0
- package/dist/esm/src/service/event/event-types.js +1 -0
- package/dist/esm/src/service/event/index.d.ts +1 -0
- package/dist/esm/src/service/event/index.js +1 -0
- package/dist/esm/src/service/match/rally.d.ts +3 -4
- package/dist/esm/src/service/match/rally.js +2 -2
- package/package.json +1 -1
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.transformFromRally = exports.transformToRally = void 0;
|
|
4
4
|
const service_1 = require("../../service");
|
|
5
5
|
const lz_string_1 = require("lz-string");
|
|
6
|
-
const team_1 = require("./team");
|
|
7
6
|
const events_1 = require("./events");
|
|
8
7
|
function transformToAttributes(rally, setId) {
|
|
9
8
|
const events = `[${rally.events.map((e) => e.toString()).join(',')}]`;
|
|
@@ -11,7 +10,7 @@ function transformToAttributes(rally, setId) {
|
|
|
11
10
|
rally_id: rally.id,
|
|
12
11
|
match_set_id: setId,
|
|
13
12
|
order: rally.order,
|
|
14
|
-
serving_team: rally.
|
|
13
|
+
serving_team: rally.servingTeamId,
|
|
15
14
|
events: (0, lz_string_1.compressToBase64)(events)
|
|
16
15
|
};
|
|
17
16
|
}
|
|
@@ -50,7 +49,7 @@ function transformToObject(model) {
|
|
|
50
49
|
return new service_1.Rally({
|
|
51
50
|
id: model.rally_id,
|
|
52
51
|
order: model.order,
|
|
53
|
-
|
|
52
|
+
servingTeamId: model.ServingTeam.team_id,
|
|
54
53
|
events
|
|
55
54
|
});
|
|
56
55
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockFailure, BlockType } from './block';
|
|
2
|
+
import type { ReceptionFailure, ReceptionType } from './reception';
|
|
3
|
+
import type { ServeFailure, ServeType } from './serve';
|
|
4
|
+
import type { SetFailure, SetType } from './set';
|
|
5
|
+
import type { SpikeFailure, SpikeType } from './spike';
|
|
6
|
+
export type EventSubType = BlockType | ReceptionType | ServeType | SetType | SpikeType;
|
|
7
|
+
export type EventFailureType = BlockFailure | ReceptionFailure | ServeFailure | SetFailure | SpikeFailure;
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./block"), exports);
|
|
18
|
+
__exportStar(require("./event-types"), exports);
|
|
18
19
|
__exportStar(require("./in-play-event"), exports);
|
|
19
20
|
__exportStar(require("./libero-replacement"), exports);
|
|
20
21
|
__exportStar(require("./rally-event"), exports);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Team } from '../team';
|
|
2
1
|
import { CourtPosition } from './court-position';
|
|
3
2
|
import { RallyEvent } from '../event';
|
|
4
3
|
interface RallyParams {
|
|
5
4
|
readonly id: string;
|
|
6
5
|
readonly order: number;
|
|
7
|
-
readonly
|
|
6
|
+
readonly servingTeamId: string;
|
|
8
7
|
readonly events: RallyEvent[];
|
|
9
8
|
}
|
|
10
9
|
export interface PlayerPosition {
|
|
@@ -13,10 +12,10 @@ export interface PlayerPosition {
|
|
|
13
12
|
}
|
|
14
13
|
export declare class Rally {
|
|
15
14
|
readonly id: string;
|
|
16
|
-
readonly
|
|
15
|
+
readonly servingTeamId: string;
|
|
17
16
|
readonly events: RallyEvent[];
|
|
18
17
|
readonly order: number;
|
|
19
|
-
constructor({ id, order,
|
|
18
|
+
constructor({ id, order, servingTeamId, events }: RallyParams);
|
|
20
19
|
addEvent(event: RallyEvent): void;
|
|
21
20
|
}
|
|
22
21
|
export {};
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Rally = void 0;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
class Rally {
|
|
6
|
-
constructor({ id, order,
|
|
6
|
+
constructor({ id, order, servingTeamId, events }) {
|
|
7
7
|
(0, utils_1.validateUUID)(id);
|
|
8
8
|
this.id = id;
|
|
9
9
|
this.order = order;
|
|
10
|
-
this.
|
|
10
|
+
this.servingTeamId = servingTeamId;
|
|
11
11
|
this.events = events;
|
|
12
12
|
}
|
|
13
13
|
addEvent(event) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Rally } from '../../service';
|
|
2
2
|
import { compressToBase64, decompressFromBase64 } from 'lz-string';
|
|
3
|
-
import { transformToTeam } from './team';
|
|
4
3
|
import { transformToBlock, transformToLiberoReplacement, transformToReception, transformToServe, transformToSet, transformToSpike, transformToSubstitution } from './events';
|
|
5
4
|
function transformToAttributes(rally, setId) {
|
|
6
5
|
const events = `[${rally.events.map((e) => e.toString()).join(',')}]`;
|
|
@@ -8,7 +7,7 @@ function transformToAttributes(rally, setId) {
|
|
|
8
7
|
rally_id: rally.id,
|
|
9
8
|
match_set_id: setId,
|
|
10
9
|
order: rally.order,
|
|
11
|
-
serving_team: rally.
|
|
10
|
+
serving_team: rally.servingTeamId,
|
|
12
11
|
events: compressToBase64(events)
|
|
13
12
|
};
|
|
14
13
|
}
|
|
@@ -46,7 +45,7 @@ function transformToObject(model) {
|
|
|
46
45
|
return new Rally({
|
|
47
46
|
id: model.rally_id,
|
|
48
47
|
order: model.order,
|
|
49
|
-
|
|
48
|
+
servingTeamId: model.ServingTeam.team_id,
|
|
50
49
|
events
|
|
51
50
|
});
|
|
52
51
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockFailure, BlockType } from './block';
|
|
2
|
+
import type { ReceptionFailure, ReceptionType } from './reception';
|
|
3
|
+
import type { ServeFailure, ServeType } from './serve';
|
|
4
|
+
import type { SetFailure, SetType } from './set';
|
|
5
|
+
import type { SpikeFailure, SpikeType } from './spike';
|
|
6
|
+
export type EventSubType = BlockType | ReceptionType | ServeType | SetType | SpikeType;
|
|
7
|
+
export type EventFailureType = BlockFailure | ReceptionFailure | ServeFailure | SetFailure | SpikeFailure;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Team } from '../team';
|
|
2
1
|
import { CourtPosition } from './court-position';
|
|
3
2
|
import { RallyEvent } from '../event';
|
|
4
3
|
interface RallyParams {
|
|
5
4
|
readonly id: string;
|
|
6
5
|
readonly order: number;
|
|
7
|
-
readonly
|
|
6
|
+
readonly servingTeamId: string;
|
|
8
7
|
readonly events: RallyEvent[];
|
|
9
8
|
}
|
|
10
9
|
export interface PlayerPosition {
|
|
@@ -13,10 +12,10 @@ export interface PlayerPosition {
|
|
|
13
12
|
}
|
|
14
13
|
export declare class Rally {
|
|
15
14
|
readonly id: string;
|
|
16
|
-
readonly
|
|
15
|
+
readonly servingTeamId: string;
|
|
17
16
|
readonly events: RallyEvent[];
|
|
18
17
|
readonly order: number;
|
|
19
|
-
constructor({ id, order,
|
|
18
|
+
constructor({ id, order, servingTeamId, events }: RallyParams);
|
|
20
19
|
addEvent(event: RallyEvent): void;
|
|
21
20
|
}
|
|
22
21
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { validateUUID } from '../utils';
|
|
2
2
|
export class Rally {
|
|
3
|
-
constructor({ id, order,
|
|
3
|
+
constructor({ id, order, servingTeamId, events }) {
|
|
4
4
|
validateUUID(id);
|
|
5
5
|
this.id = id;
|
|
6
6
|
this.order = order;
|
|
7
|
-
this.
|
|
7
|
+
this.servingTeamId = servingTeamId;
|
|
8
8
|
this.events = events;
|
|
9
9
|
}
|
|
10
10
|
addEvent(event) {
|