@sportsbroker/firebase-structure 3.24.0-26 → 3.24.0-28
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-28](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-26...v3.24.0-28) (2021-05-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added penalty shootout events ([c62dba9](https://github.com/SportsBroker-HQ/firebase-structure/commit/c62dba96d138bd3215ab3b437b2d93ccdf272990))
|
|
11
|
+
* identify player by quasi unique id ([71f9554](https://github.com/SportsBroker-HQ/firebase-structure/commit/71f955447310c75d6ffa9f00dff3ba9a722aee6a))
|
|
12
|
+
|
|
13
|
+
## [3.24.0-27](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-26...v3.24.0-27) (2021-05-20)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* identify player by quasi unique id ([71f9554](https://github.com/SportsBroker-HQ/firebase-structure/commit/71f955447310c75d6ffa9f00dff3ba9a722aee6a))
|
|
19
|
+
|
|
5
20
|
## [3.24.0-26](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-16...v3.24.0-26) (2021-05-20)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
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;
|
|
@@ -19,7 +26,7 @@ interface BaseEvent {
|
|
|
19
26
|
interface RedCardEvent extends BaseEvent {
|
|
20
27
|
type: "RED_CARD";
|
|
21
28
|
isSecondYellow?: boolean;
|
|
22
|
-
playerId:
|
|
29
|
+
playerId: PlayerID;
|
|
23
30
|
playerName: string;
|
|
24
31
|
playerShirtName: string;
|
|
25
32
|
playerUniform: string;
|
|
@@ -27,7 +34,7 @@ interface RedCardEvent extends BaseEvent {
|
|
|
27
34
|
|
|
28
35
|
interface YellowCardEvent extends BaseEvent {
|
|
29
36
|
type: "YELLOW_CARD";
|
|
30
|
-
playerId:
|
|
37
|
+
playerId: PlayerID;
|
|
31
38
|
playerName: string;
|
|
32
39
|
playerShirtName: string;
|
|
33
40
|
playerUniform: string;
|
|
@@ -35,22 +42,31 @@ interface YellowCardEvent extends BaseEvent {
|
|
|
35
42
|
|
|
36
43
|
interface GoalEvent extends BaseEvent {
|
|
37
44
|
type: "GOAL";
|
|
38
|
-
assistingPlayerId?:
|
|
45
|
+
assistingPlayerId?: PlayerID;
|
|
39
46
|
assistingPlayerName?: string;
|
|
40
47
|
assistingPlayerShirtName?: string;
|
|
41
48
|
assistingPlayerUniform?: string;
|
|
42
49
|
goalNumber: number;
|
|
43
50
|
penalty?: boolean;
|
|
44
51
|
ownGoal?: boolean;
|
|
45
|
-
playerId:
|
|
52
|
+
playerId: PlayerID;
|
|
46
53
|
playerName: string;
|
|
47
54
|
playerShirtName: string;
|
|
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
|
-
playerId:
|
|
69
|
+
playerId: PlayerID;
|
|
54
70
|
playerName: string;
|
|
55
71
|
playerShirtName: string;
|
|
56
72
|
playerUniform: string;
|
|
@@ -58,11 +74,11 @@ interface MissedPenaltyEvent extends BaseEvent {
|
|
|
58
74
|
|
|
59
75
|
interface SubstitutionEvent extends BaseEvent {
|
|
60
76
|
type: "SUBSTITUTION";
|
|
61
|
-
playerInId?:
|
|
77
|
+
playerInId?: PlayerID;
|
|
62
78
|
playerInName?: string;
|
|
63
79
|
playerInShirtName?: string;
|
|
64
80
|
playerInUniform?: string;
|
|
65
|
-
playerOutId:
|
|
81
|
+
playerOutId: PlayerID;
|
|
66
82
|
playerOutName: string;
|
|
67
83
|
playerOutShirtName: string;
|
|
68
84
|
playerOutUniform: string;
|
|
@@ -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
|
}
|
package/models/global.d.ts
CHANGED
|
@@ -33,6 +33,13 @@ export type SeasonID = string;
|
|
|
33
33
|
|
|
34
34
|
export type GroupID = string;
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Until we will support external player ids and there is need
|
|
38
|
+
* to have match unique player ids it will be constructed as
|
|
39
|
+
* concatenation of Team ID and Player uniform number
|
|
40
|
+
*
|
|
41
|
+
* ie. 5f4160de-72d3-4821-ae19-6bfb4f05a0c9_11
|
|
42
|
+
*/
|
|
36
43
|
export type PlayerID = string;
|
|
37
44
|
|
|
38
45
|
export type Percentage = number // 0.0-1.0
|