@sportsbroker/firebase-structure 3.24.0-27 → 3.24.0-29
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.24.0-29](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-28...v3.24.0-29) (2021-05-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* match score structure update - include penalties in periods ([3ae52f7](https://github.com/SportsBroker-HQ/firebase-structure/commit/3ae52f7d14554ce02b0cdc55c64bd4e146b9e33b))
|
|
11
|
+
|
|
12
|
+
## [3.24.0-28](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-26...v3.24.0-28) (2021-05-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* added penalty shootout events ([c62dba9](https://github.com/SportsBroker-HQ/firebase-structure/commit/c62dba96d138bd3215ab3b437b2d93ccdf272990))
|
|
18
|
+
* identify player by quasi unique id ([71f9554](https://github.com/SportsBroker-HQ/firebase-structure/commit/71f955447310c75d6ffa9f00dff3ba9a722aee6a))
|
|
19
|
+
|
|
5
20
|
## [3.24.0-27](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-26...v3.24.0-27) (2021-05-20)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { TeamSide, PlayerID, TeamID, MatchPeriod } from "../../global";
|
|
2
2
|
|
|
3
|
-
type EventType =
|
|
3
|
+
type EventType =
|
|
4
|
+
| "YELLOW_CARD"
|
|
5
|
+
| "RED_CARD"
|
|
6
|
+
| "GOAL"
|
|
7
|
+
| "SUBSTITUTION"
|
|
8
|
+
| "MISSED_PENALTY"
|
|
9
|
+
| "PENALTY_SHOOTOUT_GOAL"
|
|
10
|
+
| "PENALTY_SHOOTOUT_MISS";
|
|
4
11
|
|
|
5
12
|
interface EventTime {
|
|
6
13
|
minutes: number;
|
|
@@ -48,6 +55,15 @@ interface GoalEvent extends BaseEvent {
|
|
|
48
55
|
playerUniform: string;
|
|
49
56
|
}
|
|
50
57
|
|
|
58
|
+
interface PenaltyShootoutShotEvent extends BaseEvent {
|
|
59
|
+
type: "PENALTY_SHOOTOUT_GOAL" | "PENALTY_SHOOTOUT_MISS";
|
|
60
|
+
playerId: PlayerID;
|
|
61
|
+
playerName: string;
|
|
62
|
+
playerShirtName: string;
|
|
63
|
+
playerUniform: string;
|
|
64
|
+
teamPenaltyNumber: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
51
67
|
interface MissedPenaltyEvent extends BaseEvent {
|
|
52
68
|
type: "MISSED_PENALTY";
|
|
53
69
|
playerId: PlayerID;
|
|
@@ -76,7 +92,8 @@ export interface Events {
|
|
|
76
92
|
| RedCardEvent
|
|
77
93
|
| GoalEvent
|
|
78
94
|
| MissedPenaltyEvent
|
|
79
|
-
| SubstitutionEvent
|
|
95
|
+
| SubstitutionEvent
|
|
96
|
+
| PenaltyShootoutShotEvent;
|
|
80
97
|
};
|
|
81
98
|
};
|
|
82
99
|
}
|
|
@@ -3,18 +3,17 @@ export interface Score {
|
|
|
3
3
|
away: number | null;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
export interface MatchScore {
|
|
7
|
+
home: number | null; // total without penalties
|
|
8
|
+
away: number | null; // total without penalties
|
|
9
|
+
periods: MatchPeriods;
|
|
10
|
+
}
|
|
11
|
+
|
|
7
12
|
export interface MatchPeriods {
|
|
8
|
-
firstHalf
|
|
13
|
+
firstHalf?: Score;
|
|
9
14
|
secondHalf?: Score;
|
|
10
15
|
firstOvertime?: Score;
|
|
11
16
|
secondOvertime?: Score;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface MatchScore {
|
|
15
|
-
home: number | null;
|
|
16
|
-
away: number | null;
|
|
17
|
-
periods: MatchPeriods;
|
|
18
17
|
shootoutPenalties?: Score;
|
|
19
18
|
}
|
|
20
19
|
|