@sportsbroker/firebase-structure 3.42.1-0 → 3.43.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.
@@ -6,10 +6,10 @@ export interface Score {
6
6
  export interface MatchScore {
7
7
  home: number | null; // total without penalties
8
8
  away: number | null; // total without penalties
9
- periods: SoccerPeriods | NFLPeriods;
9
+ periods: MatchPeriods;
10
10
  }
11
11
 
12
- export interface SoccerPeriods {
12
+ export interface MatchPeriods {
13
13
  firstHalf?: Score;
14
14
  secondHalf?: Score;
15
15
  firstOvertime?: Score;
@@ -17,10 +17,6 @@ export interface SoccerPeriods {
17
17
  shootoutPenalties?: Score;
18
18
  }
19
19
 
20
- export interface NFLPeriods {
21
- [sequenceName: string]: Score
22
- }
23
-
24
20
  export interface Scores {
25
21
  [sportID: string]: {
26
22
  [matchID: string]: MatchScore;
@@ -6,9 +6,7 @@ export interface TeamsStats {
6
6
  /**
7
7
  * @see: https://sportsbroker.slite.com/app/channels/VOZ0prjzHu/notes/tOQ3uR_FUT
8
8
  */
9
- export type MatchStats = ISoccerStats | INFLStats;
10
-
11
- export interface ISoccerStats {
9
+ export interface MatchStats {
12
10
  // possession
13
11
  possessionPercentageLast15: TeamsStats,
14
12
  possessionPercentageLast30: TeamsStats,
@@ -79,41 +77,6 @@ export interface ISoccerStats {
79
77
  penaltyTaken: TeamsStats,
80
78
  }
81
79
 
82
- export interface INFLStats {
83
- firstDowns : TeamsStats,
84
- firstDownsPassing: TeamsStats,
85
- firstDownsRushing: TeamsStats,
86
- firstDownsFromPenalties: TeamsStats,
87
- thirdDownEfficiency: TeamsStats,
88
- fourthDownEfficiency: TeamsStats,
89
- totalPlays: TeamsStats,
90
- totalYards: TeamsStats,
91
- totalDrives: TeamsStats,
92
- yardsPerPlay: TeamsStats,
93
- passing: TeamsStats,
94
- passingCompletions: TeamsStats,
95
- passingAttempts: TeamsStats,
96
- yardsPerPass: TeamsStats,
97
- interceptionsThrown: TeamsStats,
98
- sackYardsLost: TeamsStats,
99
- rushing: TeamsStats,
100
- rushingAttempts: TeamsStats,
101
- yardsPerRush: TeamsStats,
102
- redZone: TeamsStats,
103
- penalties: TeamsStats,
104
- turnovers: TeamsStats,
105
- fumblesLost: TeamsStats,
106
- possession: TeamsStats,
107
- thirdDownEfficiencySuccess: TeamsStats
108
- thirdDownEfficiencyAttempts: TeamsStats
109
- fourthDownEfficiencySuccess: TeamsStats
110
- fourthDownEfficiencyAttempts: TeamsStats
111
- redZoneAttempts: TeamsStats
112
- redZoneSuccess: TeamsStats
113
- penaltiesYards: TeamsStats
114
- specialTeamsTDs: TeamsStats
115
- }
116
-
117
80
  export interface Stats {
118
81
  [sportID: string]: {
119
82
  [matchID: string]: MatchStats
@@ -1,4 +1,4 @@
1
- export interface SoccerTeamRanking {
1
+ export interface TeamRanking {
2
2
  position: number;
3
3
  positionChange: number;
4
4
  points: number;
@@ -11,44 +11,20 @@ export interface SoccerTeamRanking {
11
11
  goalsAgainst: number;
12
12
  }
13
13
 
14
- export interface NflTeamRanking {
15
- won: number;
16
- lost: number;
17
- draw: number;
18
- played: number;
19
- winningPercentage: number;
20
- position: number;
21
- lastPosition?: number;
22
- }
23
-
24
- export type TeamRanking = SoccerTeamRanking | NflTeamRanking;
25
-
26
14
  export interface Ranking {
27
15
  groups: {
28
- soccer: {
16
+ [sportID: string]: {
29
17
  [seasonID: string]: {
30
18
  [groupID: string]: {
31
- [teamID: string]: SoccerTeamRanking;
19
+ [teamID: string]: TeamRanking;
32
20
  };
33
21
  };
34
22
  };
35
- nfl: {
36
- [seasonID: string]: {
37
- [groupID: string]: {
38
- [teamID: string]: NflTeamRanking;
39
- };
40
- };
41
- }
42
23
  };
43
24
  leagues: {
44
- soccer: {
45
- [seasonID: string]: {
46
- [teamID: string]: SoccerTeamRanking;
47
- };
48
- };
49
- nfl: {
25
+ [sportID: string]: {
50
26
  [seasonID: string]: {
51
- [teamID: string]: NflTeamRanking;
27
+ [teamID: string]: TeamRanking;
52
28
  };
53
29
  };
54
30
  };
@@ -8,7 +8,8 @@ export type TradingInactiveReason =
8
8
  | "VAR"
9
9
  | "TEMP_GOAL"
10
10
  | "PENALTY_SHOOTOUT"
11
- | "PENALTY_AWARDED";
11
+ | "PENALTY_AWARDED"
12
+ | "LIVE_GAME";
12
13
 
13
14
  export interface MarketIndicators {
14
15
  dailyHigh: number;
@@ -1,4 +1,4 @@
1
- import {ISODate, TeamID, Percentage} from "../../global";
1
+ import {ISODate, SportID, TeamID, Percentage} from "../../global";
2
2
 
3
3
  export type OrderActionType = "BUY" | "SELL";
4
4
 
@@ -32,6 +32,7 @@ export interface Order {
32
32
  processedMoney: number;
33
33
  processedFee: number;
34
34
  processedTotalMoney: number; // processedMoney + processedFee
35
+ sportId: SportID;
35
36
  teamId: TeamID;
36
37
  transactionFee: Percentage;
37
38
  type: OrderTransactionType;
@@ -1,6 +1,7 @@
1
1
  import {ISODate, MatchID, SportID, TeamSide} from "../../global";
2
2
 
3
3
  export interface UserOwnedShares {
4
+ sportId: SportID;
4
5
  amount: number;
5
6
  availableAmount: number;
6
7
  invested: number;
@@ -23,7 +23,7 @@ export type ISODate = string;
23
23
  /**
24
24
  * Currently support only soccer
25
25
  */
26
- export type SportID = "soccer" | "nfl" | string;
26
+ export type SportID = "soccer" | string;
27
27
 
28
28
  export type Language = "en" | "de" | string;
29
29
 
@@ -29,27 +29,17 @@ export interface GroupTable {
29
29
 
30
30
  export interface TableSummary {
31
31
  groups: {
32
- soccer: {
32
+ [sportID: string]: {
33
33
  [seasonID: string]: {
34
34
  [groupId: string]: GroupTable;
35
35
  }
36
- },
37
- nfl: {
38
- [seasonID: string]: {
39
- [groupId: string]: GroupTable;
40
- }
41
- },
36
+ }
42
37
  };
43
38
  leagues: {
44
- soccer: {
45
- [seasonID: string]: {
46
- [teamID: string]: TeamTable;
47
- };
48
- },
49
- nfl: {
39
+ [sportID: string]: {
50
40
  [seasonID: string]: {
51
41
  [teamID: string]: TeamTable;
52
42
  };
53
- },
43
+ };
54
44
  };
55
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.42.1-0",
3
+ "version": "3.43.0",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {