@sportsbroker/firebase-structure 3.24.0-26 → 3.24.0-27
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,13 @@
|
|
|
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-27](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-26...v3.24.0-27) (2021-05-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* identify player by quasi unique id ([71f9554](https://github.com/SportsBroker-HQ/firebase-structure/commit/71f955447310c75d6ffa9f00dff3ba9a722aee6a))
|
|
11
|
+
|
|
5
12
|
## [3.24.0-26](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-16...v3.24.0-26) (2021-05-20)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TeamSide, PlayerID, TeamID, MatchPeriod } from "../../global";
|
|
2
2
|
|
|
3
3
|
type EventType = "YELLOW_CARD" | "RED_CARD" | "GOAL" | "SUBSTITUTION" | "MISSED_PENALTY";
|
|
4
4
|
|
|
@@ -19,7 +19,7 @@ interface BaseEvent {
|
|
|
19
19
|
interface RedCardEvent extends BaseEvent {
|
|
20
20
|
type: "RED_CARD";
|
|
21
21
|
isSecondYellow?: boolean;
|
|
22
|
-
playerId:
|
|
22
|
+
playerId: PlayerID;
|
|
23
23
|
playerName: string;
|
|
24
24
|
playerShirtName: string;
|
|
25
25
|
playerUniform: string;
|
|
@@ -27,7 +27,7 @@ interface RedCardEvent extends BaseEvent {
|
|
|
27
27
|
|
|
28
28
|
interface YellowCardEvent extends BaseEvent {
|
|
29
29
|
type: "YELLOW_CARD";
|
|
30
|
-
playerId:
|
|
30
|
+
playerId: PlayerID;
|
|
31
31
|
playerName: string;
|
|
32
32
|
playerShirtName: string;
|
|
33
33
|
playerUniform: string;
|
|
@@ -35,14 +35,14 @@ interface YellowCardEvent extends BaseEvent {
|
|
|
35
35
|
|
|
36
36
|
interface GoalEvent extends BaseEvent {
|
|
37
37
|
type: "GOAL";
|
|
38
|
-
assistingPlayerId?:
|
|
38
|
+
assistingPlayerId?: PlayerID;
|
|
39
39
|
assistingPlayerName?: string;
|
|
40
40
|
assistingPlayerShirtName?: string;
|
|
41
41
|
assistingPlayerUniform?: string;
|
|
42
42
|
goalNumber: number;
|
|
43
43
|
penalty?: boolean;
|
|
44
44
|
ownGoal?: boolean;
|
|
45
|
-
playerId:
|
|
45
|
+
playerId: PlayerID;
|
|
46
46
|
playerName: string;
|
|
47
47
|
playerShirtName: string;
|
|
48
48
|
playerUniform: string;
|
|
@@ -50,7 +50,7 @@ interface GoalEvent extends BaseEvent {
|
|
|
50
50
|
|
|
51
51
|
interface MissedPenaltyEvent extends BaseEvent {
|
|
52
52
|
type: "MISSED_PENALTY";
|
|
53
|
-
playerId:
|
|
53
|
+
playerId: PlayerID;
|
|
54
54
|
playerName: string;
|
|
55
55
|
playerShirtName: string;
|
|
56
56
|
playerUniform: string;
|
|
@@ -58,11 +58,11 @@ interface MissedPenaltyEvent extends BaseEvent {
|
|
|
58
58
|
|
|
59
59
|
interface SubstitutionEvent extends BaseEvent {
|
|
60
60
|
type: "SUBSTITUTION";
|
|
61
|
-
playerInId?:
|
|
61
|
+
playerInId?: PlayerID;
|
|
62
62
|
playerInName?: string;
|
|
63
63
|
playerInShirtName?: string;
|
|
64
64
|
playerInUniform?: string;
|
|
65
|
-
playerOutId:
|
|
65
|
+
playerOutId: PlayerID;
|
|
66
66
|
playerOutName: string;
|
|
67
67
|
playerOutShirtName: string;
|
|
68
68
|
playerOutUniform: string;
|
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
|