@sportsbroker/firebase-structure 3.19.0 → 3.20.0-RC1

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.
@@ -4,6 +4,9 @@ import { Scores } from "./scores";
4
4
  import { Shares } from "./shares";
5
5
  import { Stats } from "./stats";
6
6
  import { Teams } from "./teams";
7
+ import { Lineups } from "./lineups";
8
+ import { Referees } from "./referees";
9
+ import { Stories } from "./stories";
7
10
 
8
11
  export interface Matches {
9
12
  events: Events;
@@ -12,4 +15,7 @@ export interface Matches {
12
15
  shares: Shares;
13
16
  stats: Stats;
14
17
  teams: Teams;
18
+ lineups: Lineups;
19
+ referees: Referees;
20
+ stories: Stories;
15
21
  }
@@ -1,9 +1,7 @@
1
- import { TeamID, TeamSide } from "../../global";
1
+ import { PlayerID, TeamID, TeamSide } from "../../global";
2
2
 
3
3
  type EventType = "YELLOW_CARD" | "RED_CARD" | "GOAL" | "SUBSTITUTION";
4
4
 
5
- type PlayerID = string;
6
-
7
5
  interface EventTime {
8
6
  minutes: number;
9
7
  seconds: number;
@@ -22,31 +20,37 @@ interface RedCardEvent extends BaseEvent {
22
20
  isSecondYellow?: boolean;
23
21
  playerId?: PlayerID;
24
22
  playerName: string;
23
+ playerUniform: string;
25
24
  }
26
25
 
27
26
  interface YellowCardEvent extends BaseEvent {
28
27
  type: "YELLOW_CARD";
29
28
  playerId?: PlayerID;
30
29
  playerName: string;
30
+ playerUniform: string;
31
31
  }
32
32
 
33
33
  interface GoalEvent extends BaseEvent {
34
34
  type: "GOAL";
35
35
  assistingPlayerId?: PlayerID;
36
36
  assistingPlayerName: string;
37
+ assistingPlayerUniform: string;
37
38
  goalNumber: number;
38
39
  penalty?: boolean;
39
40
  ownGoal?: boolean;
40
41
  playerId?: PlayerID;
41
42
  playerName: string;
43
+ playerUniform: string;
42
44
  }
43
45
 
44
46
  interface SubstitutionEvent extends BaseEvent {
45
47
  type: "SUBSTITUTION";
46
48
  playerInId?: PlayerID;
47
49
  playerInName: string;
50
+ playerInUniform: string;
48
51
  playerOutId?: PlayerID;
49
52
  playerOutName: string;
53
+ playerOutUniform: string;
50
54
  }
51
55
 
52
56
  export interface Events {
@@ -0,0 +1,32 @@
1
+ import { PlayerID } from "../../global";
2
+
3
+ export interface Player {
4
+ playerId: PlayerID;
5
+ displayName: string;
6
+ shirtName: string;
7
+ uniform: string;
8
+ position?: string | null;
9
+ startingLineup: boolean;
10
+ isOnPitch: boolean;
11
+ formation?: number | null;
12
+ }
13
+
14
+ export interface TeamLineup {
15
+ name: string;
16
+ formation: string;
17
+ coach: string;
18
+ players: {
19
+ [playerID: string]: Player;
20
+ }
21
+ }
22
+
23
+ export interface MatchLineup {
24
+ home: TeamLineup;
25
+ away: TeamLineup;
26
+ }
27
+
28
+ export interface Lineups {
29
+ [sportID: string]: {
30
+ [matchID: string]: MatchLineup;
31
+ };
32
+ }
@@ -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
+ }
@@ -0,0 +1,15 @@
1
+ export interface MatchStory {
2
+ header: string;
3
+ content: string[];
4
+ }
5
+
6
+ export interface MatchStories {
7
+ preview?: MatchStory;
8
+ recap?: MatchStory;
9
+ }
10
+
11
+ export interface Stories {
12
+ [sportID: string]: {
13
+ [matchID: string]: MatchStories;
14
+ };
15
+ }
@@ -25,6 +25,8 @@ export type SeasonID = string;
25
25
 
26
26
  export type GroupID = string;
27
27
 
28
+ export type PlayerID = string;
29
+
28
30
  export type Percentage = number // 0.0-1.0
29
31
 
30
32
  export interface Image {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.19.0",
3
+ "version": "3.20.0-RC1",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {