@sportsbroker/firebase-structure 3.50.0 → 3.51.0
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/firestore/match.d.ts +16 -28
- package/package.json +1 -1
package/firestore/match.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type MatchDoc = MatchData & Doc;
|
|
|
4
4
|
|
|
5
5
|
export type MatchData = {
|
|
6
6
|
matchId: UUID;
|
|
7
|
-
sport:
|
|
7
|
+
sport: Sport;
|
|
8
8
|
teams?: MatchSides<MatchTeam>;
|
|
9
9
|
score?: MatchScores;
|
|
10
10
|
tournamentType: TournamentType;
|
|
@@ -19,9 +19,7 @@ export type MatchData = {
|
|
|
19
19
|
|
|
20
20
|
export type MatchResult = "WON" | "DRAW" | "LOST";
|
|
21
21
|
|
|
22
|
-
export
|
|
23
|
-
SOCCER = "soccer",
|
|
24
|
-
}
|
|
22
|
+
export type Sport = "soccer";
|
|
25
23
|
|
|
26
24
|
export type TournamentType =
|
|
27
25
|
| "DOMESTIC_LEAGUE"
|
|
@@ -40,14 +38,10 @@ export type MatchScores = {
|
|
|
40
38
|
};
|
|
41
39
|
};
|
|
42
40
|
|
|
43
|
-
export
|
|
44
|
-
HOME = "home",
|
|
45
|
-
AWAY = "away",
|
|
46
|
-
NONE = "none",
|
|
47
|
-
}
|
|
41
|
+
export type MatchTeamSide = "home" | "away" | "none";
|
|
48
42
|
|
|
49
43
|
export type PreviousMatch = {
|
|
50
|
-
playedAs:
|
|
44
|
+
playedAs: MatchTeamSide;
|
|
51
45
|
result: MatchResult;
|
|
52
46
|
score: number;
|
|
53
47
|
opponent: Opponent;
|
|
@@ -55,8 +49,8 @@ export type PreviousMatch = {
|
|
|
55
49
|
};
|
|
56
50
|
|
|
57
51
|
export interface MatchSides<T> {
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
home?: T;
|
|
53
|
+
away?: T;
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
export type MatchStage = {
|
|
@@ -83,27 +77,21 @@ export type MatchTeam = {
|
|
|
83
77
|
};
|
|
84
78
|
|
|
85
79
|
export type EventStatus = {
|
|
86
|
-
matchStatus:
|
|
87
|
-
period:
|
|
80
|
+
matchStatus: MatchStatus;
|
|
81
|
+
period: MatchPeriod;
|
|
88
82
|
isActive: boolean;
|
|
89
83
|
matchTime: MatchTime;
|
|
90
84
|
};
|
|
91
85
|
|
|
92
|
-
export
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
86
|
+
export type MatchPeriod =
|
|
87
|
+
| "PRE_MATCH"
|
|
88
|
+
| "FIRST_HALF"
|
|
89
|
+
| "SECOND_HALF"
|
|
90
|
+
| "FIRST_OVERTIME_HALF"
|
|
91
|
+
| "SECOND_OVERTIME_HALF"
|
|
92
|
+
| "SHOOTOUT";
|
|
100
93
|
|
|
101
|
-
export
|
|
102
|
-
PENDING = "PENDING",
|
|
103
|
-
STARTED = "STARTED",
|
|
104
|
-
FINISHED = "FINISHED",
|
|
105
|
-
POSTPONED = "POSTPONED",
|
|
106
|
-
}
|
|
94
|
+
export type MatchStatus = "PENDING" | "STARTED" | "FINISHED" | "POSTPONED";
|
|
107
95
|
|
|
108
96
|
export type MatchTime = {
|
|
109
97
|
minutes: number;
|