@sportsbroker/firebase-structure 3.24.0-16 → 3.24.0-19

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,40 @@
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-19](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-17...v3.24.0-19) (2021-05-10)
6
+
7
+
8
+ ### Features
9
+
10
+ * added match commentary types ([21c5791](https://github.com/SportsBroker-HQ/firebase-structure/commit/21c5791d7f86debd3a003ce2c930944104fbcd7b))
11
+ * new match statistics [ch14445] ([619f873](https://github.com/SportsBroker-HQ/firebase-structure/commit/619f873a61de094d9c9dd8db11c2b16580b52051))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * 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))
17
+
18
+ ## [3.24.0-18](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-17...v3.24.0-18) (2021-05-10)
19
+
20
+
21
+ ### Features
22
+
23
+ * added match commentary types ([21c5791](https://github.com/SportsBroker-HQ/firebase-structure/commit/21c5791d7f86debd3a003ce2c930944104fbcd7b))
24
+ * new match statistics [ch14445] ([619f873](https://github.com/SportsBroker-HQ/firebase-structure/commit/619f873a61de094d9c9dd8db11c2b16580b52051))
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * 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))
30
+
31
+ ## [3.24.0-17](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-16...v3.24.0-17) (2021-05-06)
32
+
33
+
34
+ ### Features
35
+
36
+ * make sub player in optional ([2f66535](https://github.com/SportsBroker-HQ/firebase-structure/commit/2f66535bb82037854865ebd0d37bca5b7cb443b8))
37
+ * new match statistics [ch14445] ([e1b598e](https://github.com/SportsBroker-HQ/firebase-structure/commit/e1b598eaf702948e33c27d9e6fccf95e53c6cafa))
38
+
5
39
  ## [3.24.0-16](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-15...v3.24.0-16) (2021-04-23)
6
40
 
7
41
 
@@ -5,11 +5,11 @@ 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";
9
8
  import { Stories } from "./stories";
10
9
  import { Commentaries } from "./commentaries";
11
10
  import { HeadToHeadStats } from "./h2h";
12
11
  import { MatchTeamPredicates } from "./matchTeamPredicate";
12
+ import { MatchOfficials } from "./officials";
13
13
 
14
14
  export interface Matches {
15
15
  events: Events;
@@ -20,7 +20,7 @@ export interface Matches {
20
20
  teams: Teams;
21
21
  h2h?: HeadToHeadStats;
22
22
  lineups?: Lineups;
23
- referees?: Referees;
23
+ officials?: MatchOfficials;
24
24
  stories?: Stories;
25
25
  commentaries?: Commentaries;
26
26
  predicates?: MatchTeamPredicates;
@@ -1,6 +1,7 @@
1
1
  export interface CommentaryItem {
2
2
  period: number;
3
3
  content: string;
4
+ type: CommentaryType;
4
5
  time: {
5
6
  minutes: number;
6
7
  seconds: number;
@@ -8,10 +9,24 @@ export interface CommentaryItem {
8
9
  };
9
10
  }
10
11
 
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
+
11
28
  export interface Commentaries {
12
29
  [sportID: string]: {
13
- [matchID: string]: {
14
- [commentaryID: string]: CommentaryItem;
15
- };
30
+ [matchID: string]: CommentaryItem[];
16
31
  };
17
32
  }
@@ -49,10 +49,10 @@ interface GoalEvent extends BaseEvent {
49
49
 
50
50
  interface SubstitutionEvent extends BaseEvent {
51
51
  type: "SUBSTITUTION";
52
- playerInId: NumericID;
53
- playerInName: string;
54
- playerInShirtName: string;
55
- playerInUniform: string;
52
+ playerInId?: NumericID;
53
+ playerInName?: string;
54
+ playerInShirtName?: string;
55
+ playerInUniform?: string;
56
56
  playerOutId: NumericID;
57
57
  playerOutName: string;
58
58
  playerOutShirtName: string;
@@ -0,0 +1,18 @@
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
+ }
@@ -3,36 +3,78 @@ export interface TeamsStats {
3
3
  away: number;
4
4
  }
5
5
 
6
- export interface MatchStats {
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,
7
13
  possession: TeamsStats,
8
- attackingThirdPossession: TeamsStats,
9
- ownThirdPossession: TeamsStats,
10
- shotsOnTarget: 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,
11
27
  shotsOffTarget: TeamsStats,
12
- clearances: TeamsStats,
28
+ shotsOnTarget: TeamsStats,
29
+ woodwork: TeamsStats,
30
+
31
+ // attacking
32
+ goalAssists: TeamsStats,
33
+ freeKickAwarded: TeamsStats,
34
+ fastbreak: TeamsStats,
13
35
  corners: TeamsStats,
36
+ throws: TeamsStats,
14
37
  offsides: TeamsStats,
15
- passes: TeamsStats,
16
- interceptions: TeamsStats,
17
- penalties: TeamsStats,
18
- shots: TeamsStats,
19
- ownGoals: TeamsStats,
38
+
39
+ // defensive
40
+ fouls: TeamsStats,
20
41
  saves: TeamsStats,
21
- freeKickAwarded: TeamsStats,
22
- freeKickConceded: TeamsStats,
42
+ penaltySave: TeamsStats,
43
+ ownGoals: TeamsStats,
44
+ interceptionsInBox: TeamsStats,
45
+ clearance: TeamsStats,
46
+ interceptions: TeamsStats,
23
47
  crossBlocked: TeamsStats,
48
+ shotBlocked: TeamsStats,
24
49
  tackles: TeamsStats,
25
- touches: TeamsStats,
26
- yellowCards: TeamsStats,
27
- redCards: TeamsStats,
28
- foulsConceded: TeamsStats,
29
- groundDuelsWon: TeamsStats,
30
- aerialDuelsWon: TeamsStats,
31
- punches: TeamsStats,
32
- cornerKicks: TeamsStats,
33
- successfulPasses: TeamsStats,
50
+
51
+ //passing
52
+ passes: TeamsStats,
53
+ backwardPass: TeamsStats,
54
+ forwardPass: TeamsStats,
34
55
  successfulCrosses: TeamsStats,
56
+ unsuccessfulCrosses: TeamsStats,
57
+ successfulPasses: TeamsStats,
35
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
73
+ yellowCards: TeamsStats,
74
+ redCards: TeamsStats,
75
+ penaltyGoal: TeamsStats,
76
+ penaltyConceded: TeamsStats,
77
+ penaltyTaken: TeamsStats,
36
78
  }
37
79
 
38
80
  export interface Stats {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.24.0-16",
3
+ "version": "3.24.0-19",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {
@@ -1,13 +0,0 @@
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
- }