@sportsbroker/firebase-structure 3.24.0-38 → 3.24.0-5

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,252 +2,6 @@
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-38](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-37...v3.24.0-38) (2021-08-22)
6
-
7
-
8
- ### Features
9
-
10
- * add bonus to wallet ([51d5acd](https://github.com/SportsBroker-HQ/firebase-structure/commit/51d5acd4f2fa0b91a0ee02e6ded1958ea802a198))
11
-
12
- ## [3.24.0-37](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-36...v3.24.0-37) (2021-08-17)
13
-
14
- ## [3.24.0-36](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-35...v3.24.0-36) (2021-08-09)
15
-
16
-
17
- ### Features
18
-
19
- * add abortReason to orders ([260cdef](https://github.com/SportsBroker-HQ/firebase-structure/commit/260cdeff97656cfad4620230d65f6839fd47039d))
20
-
21
- ## [3.24.0-35](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-34...v3.24.0-35) (2021-08-03)
22
-
23
-
24
- ### Features
25
-
26
- * add preciseSharesValue to order ([db2a0c3](https://github.com/SportsBroker-HQ/firebase-structure/commit/db2a0c35ca242ed8400c7bcf8680f3910976c444))
27
-
28
- ## [3.24.0-34](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-32...v3.24.0-34) (2021-07-29)
29
-
30
-
31
- ### Features
32
-
33
- * adder totalPrice to order details ([01844f2](https://github.com/SportsBroker-HQ/firebase-structure/commit/01844f22fc90630f1d19f55f7b7ad5d71f96c6b7))
34
-
35
- ## [3.24.0-33](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-32...v3.24.0-33) (2021-07-26)
36
-
37
- ## [3.24.0-32](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-31...v3.24.0-32) (2021-07-12)
38
-
39
-
40
- ### Features
41
-
42
- * added ordering for seasons ([4ec93e8](https://github.com/SportsBroker-HQ/firebase-structure/commit/4ec93e816692d64056f7279232912fabd06dea5d))
43
-
44
- ## [3.24.0-31](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-30...v3.24.0-31) (2021-06-21)
45
-
46
-
47
- ### Features
48
-
49
- * added temp goal to trading inactivity reasons ([98c7f35](https://github.com/SportsBroker-HQ/firebase-structure/commit/98c7f359294e56f08c84a5295de44f65ef8780e8))
50
-
51
- ## [3.24.0-30](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-29...v3.24.0-30) (2021-06-16)
52
-
53
-
54
- ### Features
55
-
56
- * field position types ([#145](https://github.com/SportsBroker-HQ/firebase-structure/issues/145)) ([393e46c](https://github.com/SportsBroker-HQ/firebase-structure/commit/393e46cc97eced1624e4bbcaa82f12ea7f4a4f31))
57
-
58
- ## [3.24.0-29](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-28...v3.24.0-29) (2021-05-28)
59
-
60
-
61
- ### Features
62
-
63
- * match score structure update - include penalties in periods ([3ae52f7](https://github.com/SportsBroker-HQ/firebase-structure/commit/3ae52f7d14554ce02b0cdc55c64bd4e146b9e33b))
64
-
65
- ## [3.24.0-28](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-26...v3.24.0-28) (2021-05-27)
66
-
67
-
68
- ### Features
69
-
70
- * added penalty shootout events ([c62dba9](https://github.com/SportsBroker-HQ/firebase-structure/commit/c62dba96d138bd3215ab3b437b2d93ccdf272990))
71
- * identify player by quasi unique id ([71f9554](https://github.com/SportsBroker-HQ/firebase-structure/commit/71f955447310c75d6ffa9f00dff3ba9a722aee6a))
72
-
73
- ## [3.24.0-27](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-26...v3.24.0-27) (2021-05-20)
74
-
75
-
76
- ### Features
77
-
78
- * identify player by quasi unique id ([71f9554](https://github.com/SportsBroker-HQ/firebase-structure/commit/71f955447310c75d6ffa9f00dff3ba9a722aee6a))
79
-
80
- ## [3.24.0-26](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-16...v3.24.0-26) (2021-05-20)
81
-
82
-
83
- ### Features
84
-
85
- * add missed penalty event, add period to events ([42293fe](https://github.com/SportsBroker-HQ/firebase-structure/commit/42293feefc383900fa456d8dfef80ade0581c3b6))
86
- * add short name to league table ([db3a43f](https://github.com/SportsBroker-HQ/firebase-structure/commit/db3a43f11484f3c6c42bc87261b7dbeebcca3a87))
87
- * add temporaryTeams ([3e0c94b](https://github.com/SportsBroker-HQ/firebase-structure/commit/3e0c94b16db3f364555adf2bf53a7227db7efbab))
88
- * add tournament type to match ([07a9531](https://github.com/SportsBroker-HQ/firebase-structure/commit/07a9531a80f4756a6264e87bb0c4c1c59f76943a))
89
- * add tournament type to match ([f6bb925](https://github.com/SportsBroker-HQ/firebase-structure/commit/f6bb9257d6c2848a09cf06153c42a8209e0086ff))
90
- * added match commentary types ([21c5791](https://github.com/SportsBroker-HQ/firebase-structure/commit/21c5791d7f86debd3a003ce2c930944104fbcd7b))
91
- * added tournament stage ([2b189d7](https://github.com/SportsBroker-HQ/firebase-structure/commit/2b189d7bec15763309200736e8554fcbf98c656d))
92
- * make sub player in optional ([2f66535](https://github.com/SportsBroker-HQ/firebase-structure/commit/2f66535bb82037854865ebd0d37bca5b7cb443b8))
93
- * mark teams as optional ([98a7b6b](https://github.com/SportsBroker-HQ/firebase-structure/commit/98a7b6b9daabceb41f6450f6ff6e51054248b37f))
94
- * new match statistics [ch14445] ([619f873](https://github.com/SportsBroker-HQ/firebase-structure/commit/619f873a61de094d9c9dd8db11c2b16580b52051))
95
- * new match statistics [ch14445] ([e1b598e](https://github.com/SportsBroker-HQ/firebase-structure/commit/e1b598eaf702948e33c27d9e6fccf95e53c6cafa))
96
-
97
-
98
- ### Bug Fixes
99
-
100
- * converted commentary type from enum to strings union ([#144](https://github.com/SportsBroker-HQ/firebase-structure/issues/144)) ([97e0fbe](https://github.com/SportsBroker-HQ/firebase-structure/commit/97e0fbedea00b2e9a70b1ee41db7c6fd286f2b15))
101
-
102
- ## [3.24.0-25](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-24...v3.24.0-25) (2021-05-19)
103
-
104
-
105
- ### Features
106
-
107
- * add tournament type to match ([f6bb925](https://github.com/SportsBroker-HQ/firebase-structure/commit/f6bb9257d6c2848a09cf06153c42a8209e0086ff))
108
-
109
- ## [3.24.0-24](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-23...v3.24.0-24) (2021-05-17)
110
-
111
-
112
- ### Features
113
-
114
- * add tournament type to match ([07a9531](https://github.com/SportsBroker-HQ/firebase-structure/commit/07a9531a80f4756a6264e87bb0c4c1c59f76943a))
115
-
116
- ## [3.24.0-23](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-22...v3.24.0-23) (2021-05-17)
117
-
118
-
119
- ### Features
120
-
121
- * add temporaryTeams ([3e0c94b](https://github.com/SportsBroker-HQ/firebase-structure/commit/3e0c94b16db3f364555adf2bf53a7227db7efbab))
122
-
123
- ## [3.24.0-22](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-21...v3.24.0-22) (2021-05-14)
124
-
125
-
126
- ### Features
127
-
128
- * add missed penalty event, add period to events ([42293fe](https://github.com/SportsBroker-HQ/firebase-structure/commit/42293feefc383900fa456d8dfef80ade0581c3b6))
129
-
130
- ## [3.24.0-21](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-20...v3.24.0-21) (2021-05-12)
131
-
132
-
133
- ### Features
134
-
135
- * add short name to league table ([db3a43f](https://github.com/SportsBroker-HQ/firebase-structure/commit/db3a43f11484f3c6c42bc87261b7dbeebcca3a87))
136
-
137
- ## [3.24.0-20](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-19...v3.24.0-20) (2021-05-11)
138
-
139
-
140
- ### Features
141
-
142
- * mark teams as optional ([98a7b6b](https://github.com/SportsBroker-HQ/firebase-structure/commit/98a7b6b9daabceb41f6450f6ff6e51054248b37f))
143
-
144
- ## [3.24.0-19](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-17...v3.24.0-19) (2021-05-10)
145
-
146
-
147
- ### Features
148
-
149
- * added match commentary types ([21c5791](https://github.com/SportsBroker-HQ/firebase-structure/commit/21c5791d7f86debd3a003ce2c930944104fbcd7b))
150
- * new match statistics [ch14445] ([619f873](https://github.com/SportsBroker-HQ/firebase-structure/commit/619f873a61de094d9c9dd8db11c2b16580b52051))
151
-
152
-
153
- ### Bug Fixes
154
-
155
- * converted commentary type from enum to strings union ([#144](https://github.com/SportsBroker-HQ/firebase-structure/issues/144)) ([97e0fbe](https://github.com/SportsBroker-HQ/firebase-structure/commit/97e0fbedea00b2e9a70b1ee41db7c6fd286f2b15))
156
-
157
- ## [3.24.0-18](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-17...v3.24.0-18) (2021-05-10)
158
-
159
-
160
- ### Features
161
-
162
- * added match commentary types ([21c5791](https://github.com/SportsBroker-HQ/firebase-structure/commit/21c5791d7f86debd3a003ce2c930944104fbcd7b))
163
- * new match statistics [ch14445] ([619f873](https://github.com/SportsBroker-HQ/firebase-structure/commit/619f873a61de094d9c9dd8db11c2b16580b52051))
164
-
165
-
166
- ### Bug Fixes
167
-
168
- * converted commentary type from enum to strings union ([#144](https://github.com/SportsBroker-HQ/firebase-structure/issues/144)) ([97e0fbe](https://github.com/SportsBroker-HQ/firebase-structure/commit/97e0fbedea00b2e9a70b1ee41db7c6fd286f2b15))
169
-
170
- ## [3.24.0-17](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-16...v3.24.0-17) (2021-05-06)
171
-
172
-
173
- ### Features
174
-
175
- * make sub player in optional ([2f66535](https://github.com/SportsBroker-HQ/firebase-structure/commit/2f66535bb82037854865ebd0d37bca5b7cb443b8))
176
- * new match statistics [ch14445] ([e1b598e](https://github.com/SportsBroker-HQ/firebase-structure/commit/e1b598eaf702948e33c27d9e6fccf95e53c6cafa))
177
-
178
- ## [3.24.0-16](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-15...v3.24.0-16) (2021-04-23)
179
-
180
-
181
- ### Features
182
-
183
- * adjust head to head structure ([a9e03d0](https://github.com/SportsBroker-HQ/firebase-structure/commit/a9e03d09e5632b0a52ab0fd13559320a6ba62fda))
184
-
185
- ## [3.24.0-15](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-14...v3.24.0-15) (2021-04-21)
186
-
187
- ## [3.24.0-14](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-13...v3.24.0-14) (2021-04-21)
188
-
189
-
190
- ### Bug Fixes
191
-
192
- * prevent remove of stages/groups ([cf92497](https://github.com/SportsBroker-HQ/firebase-structure/commit/cf9249774fa323eb2317e70488593e9b2c162686))
193
-
194
- ## [3.24.0-13](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-12...v3.24.0-13) (2021-04-21)
195
-
196
-
197
- ### Features
198
-
199
- * set prev/next match as optional ([fa64283](https://github.com/SportsBroker-HQ/firebase-structure/commit/fa64283cd8059db43baeefa4c75c04b97652125e))
200
-
201
- ## [3.24.0-12](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-11...v3.24.0-12) (2021-04-21)
202
-
203
-
204
- ### Features
205
-
206
- * add stages, groups ([7e0bf8f](https://github.com/SportsBroker-HQ/firebase-structure/commit/7e0bf8f96d65e84abb4e463ef0dd0f2ca643467a))
207
-
208
- ## [3.24.0-11](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-10...v3.24.0-11) (2021-04-19)
209
-
210
-
211
- ### Features
212
-
213
- * add match team predicate ([1b01393](https://github.com/SportsBroker-HQ/firebase-structure/commit/1b013931dd54e080569fd01b5a2f1a60cc982432))
214
-
215
- ## [3.24.0-10](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-9...v3.24.0-10) (2021-04-19)
216
-
217
-
218
- ### Bug Fixes
219
-
220
- * revert snapshots structures ([4dffdbe](https://github.com/SportsBroker-HQ/firebase-structure/commit/4dffdbeadde47e7cd977be4d639c1b2a013015fc))
221
-
222
- ## [3.24.0-9](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-7...v3.24.0-9) (2021-04-16)
223
-
224
-
225
- ### Features
226
-
227
- * added type and countryCode to SeasonOverview ([dc420fe](https://github.com/SportsBroker-HQ/firebase-structure/commit/dc420fe7566bb8bd0721668c449847b84a576588))
228
- * adjust events teamId ([afc6b72](https://github.com/SportsBroker-HQ/firebase-structure/commit/afc6b727dfa5e0ba2cb558c54d7e15453a6a5efd))
229
-
230
- ## [3.24.0-8](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-7...v3.24.0-8) (2021-04-16)
231
-
232
-
233
- ### Features
234
-
235
- * added type and countryCode to SeasonOverview ([dc420fe](https://github.com/SportsBroker-HQ/firebase-structure/commit/dc420fe7566bb8bd0721668c449847b84a576588))
236
-
237
- ## [3.24.0-7](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-6...v3.24.0-7) (2021-04-15)
238
-
239
-
240
- ### Features
241
-
242
- * adjust match scores schema ([e34e1d3](https://github.com/SportsBroker-HQ/firebase-structure/commit/e34e1d313256cd330105f436e90caeaebb5293c9))
243
-
244
- ## [3.24.0-6](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-5...v3.24.0-6) (2021-04-15)
245
-
246
-
247
- ### Features
248
-
249
- * adjust match scores schema ([c18bbe3](https://github.com/SportsBroker-HQ/firebase-structure/commit/c18bbe3ea23151a7567d226da57ca3914a35be9a))
250
-
251
5
  ## [3.24.0-5](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-3...v3.24.0-5) (2021-04-14)
252
6
 
253
7
 
@@ -5,11 +5,10 @@ import { Shares } from "./shares";
5
5
  import { Stats } from "./stats";
6
6
  import { Teams } from "./teams";
7
7
  import { Lineups } from "./lineups";
8
+ import { Referees } from "./referees";
8
9
  import { Stories } from "./stories";
9
10
  import { Commentaries } from "./commentaries";
10
11
  import { HeadToHeadStats } from "./h2h";
11
- import { MatchTeamPredicates } from "./matchTeamPredicate";
12
- import { MatchOfficials } from "./officials";
13
12
 
14
13
  export interface Matches {
15
14
  events: Events;
@@ -20,8 +19,7 @@ export interface Matches {
20
19
  teams: Teams;
21
20
  h2h?: HeadToHeadStats;
22
21
  lineups?: Lineups;
23
- officials?: MatchOfficials;
22
+ referees?: Referees;
24
23
  stories?: Stories;
25
24
  commentaries?: Commentaries;
26
- predicates?: MatchTeamPredicates;
27
25
  }
@@ -1,7 +1,6 @@
1
1
  export interface CommentaryItem {
2
2
  period: number;
3
3
  content: string;
4
- type: CommentaryType;
5
4
  time: {
6
5
  minutes: number;
7
6
  seconds: number;
@@ -9,24 +8,10 @@ export interface CommentaryItem {
9
8
  };
10
9
  }
11
10
 
12
- export type CommentaryType =
13
- | 'assist'
14
- | 'comment'
15
- | 'full time'
16
- | 'goal'
17
- | 'half time'
18
- | 'comment_important'
19
- | 'kick off'
20
- | 'penalty'
21
- | 'red card'
22
- | 'second_yellow red card'
23
- | 'secondyellow card'
24
- | 'substitution'
25
- | 'var'
26
- | 'yellow card';
27
-
28
11
  export interface Commentaries {
29
12
  [sportID: string]: {
30
- [matchID: string]: CommentaryItem[];
13
+ [matchID: string]: {
14
+ [commentaryID: string]: CommentaryItem;
15
+ };
31
16
  };
32
17
  }
@@ -1,13 +1,6 @@
1
- import { TeamSide, PlayerID, TeamID, MatchPeriod } from "../../global";
1
+ import { NumericID, TeamSide } from "../../global";
2
2
 
3
- type EventType =
4
- | "YELLOW_CARD"
5
- | "RED_CARD"
6
- | "GOAL"
7
- | "SUBSTITUTION"
8
- | "MISSED_PENALTY"
9
- | "PENALTY_SHOOTOUT_GOAL"
10
- | "PENALTY_SHOOTOUT_MISS";
3
+ type EventType = "YELLOW_CARD" | "RED_CARD" | "GOAL" | "SUBSTITUTION";
11
4
 
12
5
  interface EventTime {
13
6
  minutes: number;
@@ -19,14 +12,13 @@ interface BaseEvent {
19
12
  type: EventType;
20
13
  time: EventTime;
21
14
  teamType: TeamSide;
22
- teamId: TeamID;
23
- period: MatchPeriod;
15
+ teamId: NumericID;
24
16
  }
25
17
 
26
18
  interface RedCardEvent extends BaseEvent {
27
19
  type: "RED_CARD";
28
20
  isSecondYellow?: boolean;
29
- playerId: PlayerID;
21
+ playerId: NumericID;
30
22
  playerName: string;
31
23
  playerShirtName: string;
32
24
  playerUniform: string;
@@ -34,7 +26,7 @@ interface RedCardEvent extends BaseEvent {
34
26
 
35
27
  interface YellowCardEvent extends BaseEvent {
36
28
  type: "YELLOW_CARD";
37
- playerId: PlayerID;
29
+ playerId: NumericID;
38
30
  playerName: string;
39
31
  playerShirtName: string;
40
32
  playerUniform: string;
@@ -42,31 +34,14 @@ interface YellowCardEvent extends BaseEvent {
42
34
 
43
35
  interface GoalEvent extends BaseEvent {
44
36
  type: "GOAL";
45
- assistingPlayerId?: PlayerID;
37
+ assistingPlayerId?: NumericID;
46
38
  assistingPlayerName?: string;
47
39
  assistingPlayerShirtName?: string;
48
40
  assistingPlayerUniform?: string;
49
41
  goalNumber: number;
50
42
  penalty?: boolean;
51
43
  ownGoal?: boolean;
52
- playerId: PlayerID;
53
- playerName: string;
54
- playerShirtName: string;
55
- playerUniform: string;
56
- }
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
-
67
- interface MissedPenaltyEvent extends BaseEvent {
68
- type: "MISSED_PENALTY";
69
- playerId: PlayerID;
44
+ playerId: NumericID;
70
45
  playerName: string;
71
46
  playerShirtName: string;
72
47
  playerUniform: string;
@@ -74,11 +49,11 @@ interface MissedPenaltyEvent extends BaseEvent {
74
49
 
75
50
  interface SubstitutionEvent extends BaseEvent {
76
51
  type: "SUBSTITUTION";
77
- playerInId?: PlayerID;
78
- playerInName?: string;
79
- playerInShirtName?: string;
80
- playerInUniform?: string;
81
- playerOutId: PlayerID;
52
+ playerInId: NumericID;
53
+ playerInName: string;
54
+ playerInShirtName: string;
55
+ playerInUniform: string;
56
+ playerOutId: NumericID;
82
57
  playerOutName: string;
83
58
  playerOutShirtName: string;
84
59
  playerOutUniform: string;
@@ -91,9 +66,7 @@ export interface Events {
91
66
  | YellowCardEvent
92
67
  | RedCardEvent
93
68
  | GoalEvent
94
- | MissedPenaltyEvent
95
- | SubstitutionEvent
96
- | PenaltyShootoutShotEvent;
69
+ | SubstitutionEvent;
97
70
  };
98
71
  };
99
72
  }
@@ -1,21 +1,11 @@
1
- export interface TeamHeadToHeadStats {
2
- wins: number;
1
+ export interface HeadToHeadTeamStats {
3
2
  goals: number;
4
- }
5
-
6
- export interface TeamsHeadToHeadStats {
7
- [teamId: string]: TeamHeadToHeadStats;
3
+ wins: number;
8
4
  }
9
5
 
10
6
  export interface HeadToHeadStats {
11
- teamsData: TeamsHeadToHeadStats;
7
+ stats: {
8
+ [teamId: string]: HeadToHeadTeamStats;
9
+ };
12
10
  draws: number;
13
11
  }
14
-
15
- // h2hId - "<teamAId>_<teamBId>" or "<teamBId>_<teamAId>"
16
-
17
- export interface HeadToHead {
18
- [sportId: string]: {
19
- [h2hId: string]: HeadToHeadStats,
20
- }
21
- }
@@ -1,18 +1,9 @@
1
- import { PlayerID } from '../../global';
2
-
3
- export type FieldPosition =
4
- | 'attacker'
5
- | 'midfielder'
6
- | 'defender'
7
- | 'goalkeeper'
8
- | 'unknown';
9
-
10
1
  export interface Player {
11
- playerId: PlayerID;
2
+ playerId: number;
12
3
  displayName: string;
13
4
  shirtName: string;
14
5
  uniform: string;
15
- position: FieldPosition;
6
+ position?: string | null;
16
7
  startingLineup: boolean;
17
8
  isOnPitch: boolean;
18
9
  formation?: number | null;
@@ -1,4 +1,4 @@
1
- import {Group, ISODate, MatchID, MatchPeriod, MatchStatus, SeasonID, Stage} from "../../global";
1
+ import {ISODate, MatchID, MatchPeriod, MatchStatus, SeasonID} from "../../global";
2
2
 
3
3
  export interface MatchTime {
4
4
  minutes: number;
@@ -18,11 +18,8 @@ export interface MatchOverview {
18
18
  roundNb: number;
19
19
  originalRoundNb: number;
20
20
  isTba: boolean;
21
- stage?: Stage;
22
- group?: Group;
23
21
  eventStatus: EventStatus;
24
22
  season: SeasonID;
25
- tournamentType: 'DOMESTIC' | 'INTERNATIONAL';
26
23
  }
27
24
 
28
25
  export interface Overviews {
@@ -0,0 +1,13 @@
1
+ export interface MatchReferees {
2
+ referee: string;
3
+ refereeAssistants: string[];
4
+ fourthOfficial: string;
5
+ varOfficial: string;
6
+ varAssistants: string[];
7
+ }
8
+
9
+ export interface Referees {
10
+ [sportID: string]: {
11
+ [matchID: string]: MatchReferees;
12
+ };
13
+ }
@@ -1,19 +1,19 @@
1
1
  export interface Score {
2
- home: number | null;
3
- away: number | null;
2
+ home: number;
3
+ away: number;
4
4
  }
5
5
 
6
- export interface MatchScore {
7
- home: number | null; // total without penalties
8
- away: number | null; // total without penalties
9
- periods: MatchPeriods;
10
- }
11
-
12
- export interface MatchPeriods {
13
- firstHalf?: Score;
6
+ export interface MatchPeriods{
7
+ firstHalf: Score;
14
8
  secondHalf?: Score;
15
9
  firstOvertime?: Score;
16
10
  secondOvertime?: Score;
11
+ }
12
+
13
+ export interface MatchScore {
14
+ home: number;
15
+ away: number;
16
+ periods: MatchPeriods;
17
17
  shootoutPenalties?: Score;
18
18
  }
19
19
 
@@ -3,78 +3,36 @@ export interface TeamsStats {
3
3
  away: number;
4
4
  }
5
5
 
6
- /**
7
- * @see: https://sportsbroker.slite.com/app/channels/VOZ0prjzHu/notes/tOQ3uR_FUT
8
- */
9
- export interface MatchStats {
10
- // possession
11
- possessionPercentageLast15: TeamsStats,
12
- possessionPercentageLast30: TeamsStats,
6
+ export interface MatchStats {
13
7
  possession: TeamsStats,
14
- possessionLosses: TeamsStats,
15
- possessionWonAttThird: TeamsStats,
16
- possessionWonDefThird: TeamsStats,
17
- possessionWonMidThird: TeamsStats,
18
-
19
- // shots
20
- bigChanceCreated: TeamsStats,
21
- bigChanceMissed: TeamsStats,
22
- bigChanceScored: TeamsStats,
23
- crossbarHits: TeamsStats,
24
- postHitsLeft: TeamsStats,
25
- postHitsRight: TeamsStats,
26
- shots: TeamsStats,
27
- shotsOffTarget: TeamsStats,
8
+ attackingThirdPossession: TeamsStats,
9
+ ownThirdPossession: TeamsStats,
28
10
  shotsOnTarget: TeamsStats,
29
- woodwork: TeamsStats,
30
-
31
- // attacking
32
- goalAssists: TeamsStats,
33
- freeKickAwarded: TeamsStats,
34
- fastbreak: TeamsStats,
11
+ shotsOffTarget: TeamsStats,
12
+ clearances: TeamsStats,
35
13
  corners: TeamsStats,
36
- throws: TeamsStats,
37
14
  offsides: TeamsStats,
38
-
39
- // defensive
40
- fouls: TeamsStats,
41
- saves: TeamsStats,
42
- penaltySave: TeamsStats,
43
- ownGoals: TeamsStats,
44
- interceptionsInBox: TeamsStats,
45
- clearance: TeamsStats,
15
+ passes: TeamsStats,
46
16
  interceptions: TeamsStats,
17
+ penalties: TeamsStats,
18
+ shots: TeamsStats,
19
+ ownGoals: TeamsStats,
20
+ saves: TeamsStats,
21
+ freeKickAwarded: TeamsStats,
22
+ freeKickConceded: TeamsStats,
47
23
  crossBlocked: TeamsStats,
48
- shotBlocked: TeamsStats,
49
24
  tackles: TeamsStats,
50
-
51
- //passing
52
- passes: TeamsStats,
53
- backwardPass: TeamsStats,
54
- forwardPass: TeamsStats,
55
- successfulCrosses: TeamsStats,
56
- unsuccessfulCrosses: TeamsStats,
57
- successfulPasses: TeamsStats,
58
- unsuccessfulPasses: TeamsStats,
59
- successfulLongBalls: TeamsStats,
60
- unsuccessfulLongBalls: TeamsStats,
61
- penaltyAreaEntries: TeamsStats,
62
-
63
- // 1vs1
64
- duelsWon: TeamsStats,
65
- duelsLost: TeamsStats,
66
- groundDuelsWon: TeamsStats,
67
- groundDuelsLost: TeamsStats,
68
- aerialDuelsWon: TeamsStats,
69
- aerialDuelsLost: TeamsStats,
70
- oneOnOneShotAttempt: TeamsStats,
71
-
72
- // discipline
25
+ touches: TeamsStats,
73
26
  yellowCards: TeamsStats,
74
27
  redCards: TeamsStats,
75
- penaltyGoal: TeamsStats,
76
- penaltyConceded: TeamsStats,
77
- penaltyTaken: TeamsStats,
28
+ foulsConceded: TeamsStats,
29
+ groundDuelsWon: TeamsStats,
30
+ aerialDuelsWon: TeamsStats,
31
+ punches: TeamsStats,
32
+ cornerKicks: TeamsStats,
33
+ successfulPasses: TeamsStats,
34
+ successfulCrosses: TeamsStats,
35
+ unsuccessfulPasses: TeamsStats,
78
36
  }
79
37
 
80
38
  export interface Stats {
@@ -3,7 +3,6 @@ import { Image, TeamID } from "../../global";
3
3
  export interface MatchTeam {
4
4
  id: TeamID;
5
5
  name: string;
6
- shortName: string;
7
6
  abbreviation: string;
8
7
  logo?: Image;
9
8
  }
@@ -11,8 +10,8 @@ export interface MatchTeam {
11
10
  export interface Teams {
12
11
  [sportID: string]: {
13
12
  [matchID: string]: {
14
- home?: MatchTeam;
15
- away?: MatchTeam;
13
+ home: MatchTeam;
14
+ away: MatchTeam;
16
15
  };
17
16
  };
18
17
  }
@@ -1,6 +1,5 @@
1
1
  import { Overviews } from "./overviews";
2
2
  import { TeamsInSeasons } from "./teams";
3
- import { Stages } from "./stages";
4
3
 
5
4
  export interface Seasons {
6
5
  overviews: Overviews;
@@ -1,10 +1,6 @@
1
1
  import { ISODate, Image, SeasonID } from "../../global";
2
- import {Stages} from "./stages";
3
2
 
4
3
  export type SeasonState = 'UPCOMING' | 'ACTIVE' | 'FINISHED';
5
- export type SeasonType = 'DOMESTIC' | 'INTERNATIONAL';
6
- export type TournamentStage = 'group' | 'knockout';
7
-
8
4
 
9
5
  export interface SeasonOverview {
10
6
  endDate: ISODate;
@@ -15,11 +11,6 @@ export interface SeasonOverview {
15
11
  nextSeasonId?: string;
16
12
  state: SeasonState;
17
13
  logo?: Image;
18
- type: SeasonType;
19
- countryCode?: string;
20
- stages?: Stages;
21
- stage?: TournamentStage;
22
- order?: number;
23
14
  }
24
15
 
25
16
  /**
@@ -2,7 +2,6 @@ import { Image } from "../../global";
2
2
 
3
3
  export interface TableTeam {
4
4
  name: string;
5
- shortName: string;
6
5
  abbreviation: string;
7
6
  logo?: Image;
8
7
  }
@@ -1,6 +1,6 @@
1
1
  import { TeamID } from "../../global";
2
2
 
3
- export type TradingInactiveReason = "SPLIT_IN_PROGRESS" | "NONE" | "MANUAL" | "BANKRUPTCY" | "VAR" | "TEMP_GOAL";
3
+ export type TradingInactiveReason = "SPLIT_IN_PROGRESS" | "NONE" | "MANUAL" | "BANKRUPTCY" | "VAR";
4
4
 
5
5
  export interface MarketIndicators {
6
6
  dailyHigh: number;
@@ -6,18 +6,6 @@ export type OrderTransactionType = "MARKET" | "LIMIT" | "INSTANT" | "BANKRUPT";
6
6
 
7
7
  export type OrderStatus = "ACTIVE" | "COMPLETED" | "ABORTED" | "CANCELLED";
8
8
 
9
- export type OrderAbortReason =
10
- | "NOT_ENOUGH_SHARES"
11
- | "SELF_EXCLUSION"
12
- | "ACCOUNT_BLOCKED"
13
- | "ACCOUNT_CLOSURE"
14
- | "SPLIT_DIV"
15
- | "BET_MARGIN"
16
- | "BANKRUPT"
17
- | "SEASON_END"
18
- | "NOT_ENOUGH_FUNDS"
19
- | "TOO_SMALL_ORDER_VALUE";
20
-
21
9
  type OrderID = string;
22
10
 
23
11
  export interface Order {
@@ -38,9 +26,6 @@ export interface Order {
38
26
  updatedAt: ISODate;
39
27
  status: OrderStatus;
40
28
  id: OrderID;
41
- totalPrice: number;
42
- preciseSharesValue: number;
43
- abortReason: OrderAbortReason | null;
44
29
  vatPercentage?: number;
45
30
  vatProcessed?: number;
46
31
  childId?: OrderID;
@@ -1,6 +1,5 @@
1
1
  export enum UserStatus {
2
2
  CREATED = "CREATED",
3
- EMAIL_CONFIRMED = "EMAIL_CONFIRMED",
4
3
  ACTIVATED = "ACTIVATED",
5
4
  DEACTIVATED = "DEACTIVATED",
6
5
  BANNED = "BANNED",
@@ -5,7 +5,6 @@ export interface UserWallet {
5
5
  invested: number;
6
6
  profit: number;
7
7
  equity: number;
8
- bonus: number;
9
8
  }
10
9
 
11
10
  /**
@@ -8,12 +8,9 @@ export type NumericID = number;
8
8
  */
9
9
  export type MongoID = string;
10
10
 
11
-
12
- export type UUID = string;
13
-
14
11
  export type UserID = MongoID;
15
12
 
16
- export type TeamID = UUID;
13
+ export type TeamID = MongoID;
17
14
 
18
15
  /**
19
16
  * @type ISO ISODate
@@ -27,19 +24,12 @@ export type SportID = "soccer" | string;
27
24
 
28
25
  export type Language = "en" | "de" | string;
29
26
 
30
- export type MatchID = UUID;
27
+ export type MatchID = MongoID;
31
28
 
32
29
  export type SeasonID = string;
33
30
 
34
31
  export type GroupID = string;
35
32
 
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
- */
43
33
  export type PlayerID = string;
44
34
 
45
35
  export type Percentage = number // 0.0-1.0
@@ -76,11 +66,3 @@ export interface WithSeasons {
76
66
  }
77
67
 
78
68
  export type Platforms = 'IOS' | 'WEB' | 'ANDROID';
79
-
80
- export interface Stage {
81
- id: string;
82
- }
83
-
84
- export interface Group {
85
- id: string;
86
- }
@@ -1,4 +1,4 @@
1
- import {Group, ISODate, MatchID, MatchStatus, Stage} from "../global";
1
+ import {ISODate, MatchID, MatchStatus} from "../global";
2
2
 
3
3
  export interface MatchQueryData {
4
4
  id: MatchID;
@@ -6,8 +6,6 @@ export interface MatchQueryData {
6
6
  realStartDate: ISODate; // Real start time, f.e match was delayed
7
7
  roundNb: number;
8
8
  matchStatus: MatchStatus;
9
- stage?: Stage;
10
- group?: Group;
11
9
  }
12
10
 
13
11
  interface Matches {
@@ -1,30 +1,15 @@
1
- import {
2
- Group,
3
- Image,
4
- ISODate,
5
- MatchPeriod,
6
- MatchResult,
7
- MatchSide,
8
- MatchStatus,
9
- Stage,
10
- TeamID,
11
- TeamSide
12
- } from "../global";
1
+ import {Image, ISODate, MatchPeriod, MatchResult, MatchSide, MatchStatus, TeamID, TeamSide} from "../global";
13
2
 
14
3
  export interface Team {
15
4
  id: TeamID;
16
5
  name: string;
17
- shortName: string;
18
6
  abbreviation: string;
19
7
  logo?: Image;
20
8
  }
21
9
 
22
10
  export interface Opponent {
23
11
  score: number;
24
- name: string;
25
12
  teamId: string;
26
- abbreviation: string;
27
- logo?: Image;
28
13
  }
29
14
 
30
15
  export interface PreviousMatch {
@@ -57,11 +42,11 @@ export interface EventStatus {
57
42
 
58
43
  export interface MatchOverviewSnapshot {
59
44
  id: string;
60
- teams?: {
61
- home?: Team;
62
- away?: Team;
45
+ teams: {
46
+ home: Team;
47
+ away: Team;
63
48
  };
64
- score?: {
49
+ score: {
65
50
  home: number;
66
51
  away: number;
67
52
  };
@@ -69,13 +54,6 @@ export interface MatchOverviewSnapshot {
69
54
  home: Share;
70
55
  away: Share;
71
56
  };
72
- temporaryTeams?: {
73
- home?: string;
74
- away?: string;
75
- };
76
- tournamentType: 'DOMESTIC' | 'INTERNATIONAL';
77
- stage?: Stage;
78
- group?: Group;
79
57
  startDate: ISODate;
80
58
  roundNb: number;
81
59
  eventStatus: EventStatus;
@@ -1,30 +1,24 @@
1
1
  import { TeamRanking } from "../details/tables/ranking";
2
- import {Image, MatchResult} from "../global";
3
- import {Team} from "./matchOverviews";
4
-
5
- export interface MatchOveriew {
6
- vsTeam?: Team;
7
- result?: MatchResult;
8
- matchId?: string;
9
- startDate?: string;
10
- }
11
2
 
12
3
  export interface TeamTable {
13
- name: string;
14
- abbreviation: string;
15
- shortName: string;
16
- logo: Image;
17
4
  ranking: TeamRanking;
18
- groupId?: string;
19
5
  previousMatchId?: string;
20
6
  nextMatchId?: string;
21
- nextMatch?: MatchOveriew;
22
- previousMatch?: MatchOveriew;
23
7
  }
24
8
 
25
9
  export interface GroupTable {
26
10
  name: string;
27
- matchesIds: {[matchId: string]: true};
11
+ matchesIds: string[];
12
+ ranking: {
13
+ [teamID: string]: TeamRanking;
14
+ }
15
+ }
16
+
17
+ export interface SeasonTable {
18
+ groupIds?: string[];
19
+ table: {
20
+ [teamID: string]: TeamTable;
21
+ }
28
22
  }
29
23
 
30
24
  export interface TableSummary {
@@ -37,9 +31,7 @@ export interface TableSummary {
37
31
  };
38
32
  leagues: {
39
33
  [sportID: string]: {
40
- [seasonID: string]: {
41
- [teamID: string]: TeamTable;
42
- };
34
+ [seasonID: string]: SeasonTable;
43
35
  };
44
36
  };
45
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.24.0-38",
3
+ "version": "3.24.0-5",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {
@@ -1,10 +0,0 @@
1
- export interface MatchTeamPredicate {
2
- // Winner of the current match will go to nextMatchWinnerId match
3
- nextMatchWinnerId: string;
4
- }
5
-
6
- export interface MatchTeamPredicates {
7
- [sportID: string]: {
8
- [matchID: string]: MatchTeamPredicate;
9
- }
10
- }
@@ -1,18 +0,0 @@
1
- export enum MatchOfficialType {
2
- FourthOfficial = 'Fourth official',
3
- Lineman1 = 'Lineman 1',
4
- Lineman2 = 'Lineman 2',
5
- Main = 'Main',
6
- }
7
-
8
- export interface MatchOfficial {
9
- firstName: string;
10
- lastName: string;
11
- officialType: MatchOfficialType;
12
- }
13
-
14
- export interface MatchOfficials {
15
- [sportID: string]: {
16
- [matchID: string]: MatchOfficial[];
17
- };
18
- }
@@ -1,12 +0,0 @@
1
- export interface Stage {
2
- name: string;
3
- matchesIds: { [matchId: string]: true };
4
- }
5
-
6
- export interface Stages {
7
- [sportId: string]: {
8
- [seasonId: string]: {
9
- [stageId: string]: Stage;
10
- }
11
- }
12
- }