@sportsbroker/firebase-structure 3.52.0 → 3.53.0-1
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 +3 -8
- package/models/details/matches/overviews.d.ts +1 -0
- package/models/details/matches/scores.d.ts +6 -2
- package/models/details/matches/stats.d.ts +39 -1
- package/models/details/tables/ranking.d.ts +29 -5
- package/models/details/users/_index.d.ts +3 -1
- package/models/details/users/leaderboard.d.ts +11 -0
- package/models/details/users/orders.d.ts +1 -2
- package/models/details/users/ownedShares.d.ts +0 -1
- package/models/global.d.ts +1 -1
- package/models/snapshots/matchOverviews.d.ts +2 -4
- package/models/snapshots/tableSummary.d.ts +14 -4
- package/package.json +1 -1
package/firestore/match.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ISODate, UUID, Image, Doc } from "./common";
|
|
2
|
+
import { MatchSide } from '../models/global';
|
|
2
3
|
|
|
3
4
|
export type MatchDoc = MatchData & Doc;
|
|
4
5
|
|
|
@@ -19,7 +20,7 @@ export type MatchData = {
|
|
|
19
20
|
|
|
20
21
|
export type MatchResult = "WON" | "DRAW" | "LOST";
|
|
21
22
|
|
|
22
|
-
export type Sport = "soccer";
|
|
23
|
+
export type Sport = "soccer" | "nfl";
|
|
23
24
|
|
|
24
25
|
export type TournamentType =
|
|
25
26
|
| "DOMESTIC_LEAGUE"
|
|
@@ -29,13 +30,7 @@ export type TournamentType =
|
|
|
29
30
|
export type MatchScores = {
|
|
30
31
|
home: number | null;
|
|
31
32
|
away: number | null;
|
|
32
|
-
periods:
|
|
33
|
-
firstHalf: MatchSides<number | null>;
|
|
34
|
-
secondHalf: MatchSides<number | null>;
|
|
35
|
-
firstOvertime: MatchSides<number | null>;
|
|
36
|
-
secondOvertime: MatchSides<number | null>;
|
|
37
|
-
shootoutPenalties: MatchSides<number | null>;
|
|
38
|
-
};
|
|
33
|
+
periods: Record<string, MatchSides<number | null>>;
|
|
39
34
|
};
|
|
40
35
|
|
|
41
36
|
export type MatchTeamSide = "home" | "away" | "none";
|
|
@@ -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:
|
|
9
|
+
periods: SoccerPeriods | NFLPeriods;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export interface
|
|
12
|
+
export interface SoccerPeriods {
|
|
13
13
|
firstHalf?: Score;
|
|
14
14
|
secondHalf?: Score;
|
|
15
15
|
firstOvertime?: Score;
|
|
@@ -17,6 +17,10 @@ export interface MatchPeriods {
|
|
|
17
17
|
shootoutPenalties?: Score;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
export interface NFLPeriods {
|
|
21
|
+
[sequenceName: string]: Score
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
export interface Scores {
|
|
21
25
|
[sportID: string]: {
|
|
22
26
|
[matchID: string]: MatchScore;
|
|
@@ -6,7 +6,9 @@ export interface TeamsStats {
|
|
|
6
6
|
/**
|
|
7
7
|
* @see: https://sportsbroker.slite.com/app/channels/VOZ0prjzHu/notes/tOQ3uR_FUT
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
export type MatchStats = ISoccerStats | INFLStats;
|
|
10
|
+
|
|
11
|
+
export interface ISoccerStats {
|
|
10
12
|
// possession
|
|
11
13
|
possessionPercentageLast15: TeamsStats,
|
|
12
14
|
possessionPercentageLast30: TeamsStats,
|
|
@@ -77,6 +79,42 @@ export interface TeamsStats {
|
|
|
77
79
|
penaltyTaken: TeamsStats,
|
|
78
80
|
}
|
|
79
81
|
|
|
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
|
+
rushing: TeamsStats,
|
|
99
|
+
rushingAttempts: TeamsStats,
|
|
100
|
+
yardsPerRush: TeamsStats,
|
|
101
|
+
redZone: TeamsStats,
|
|
102
|
+
turnovers: TeamsStats,
|
|
103
|
+
fumblesLost: TeamsStats,
|
|
104
|
+
possession: TeamsStats,
|
|
105
|
+
thirdDownEfficiencySuccess: TeamsStats
|
|
106
|
+
thirdDownEfficiencyAttempts: TeamsStats
|
|
107
|
+
fourthDownEfficiencySuccess: TeamsStats
|
|
108
|
+
fourthDownEfficiencyAttempts: TeamsStats
|
|
109
|
+
redZoneAttempts: TeamsStats
|
|
110
|
+
redZoneSuccess: TeamsStats
|
|
111
|
+
penaltiesYards: TeamsStats
|
|
112
|
+
specialTeamsTDs: TeamsStats
|
|
113
|
+
sackYardLostSacks: TeamsStats
|
|
114
|
+
sackYardLostSackYards: TeamsStats
|
|
115
|
+
penaltiesTotal: TeamsStats
|
|
116
|
+
}
|
|
117
|
+
|
|
80
118
|
export interface Stats {
|
|
81
119
|
[sportID: string]: {
|
|
82
120
|
[matchID: string]: MatchStats
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface SoccerTeamRanking {
|
|
2
2
|
position: number;
|
|
3
3
|
positionChange: number;
|
|
4
4
|
points: number;
|
|
@@ -11,20 +11,44 @@ export interface TeamRanking {
|
|
|
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
|
+
|
|
14
26
|
export interface Ranking {
|
|
15
27
|
groups: {
|
|
16
|
-
|
|
28
|
+
soccer: {
|
|
17
29
|
[seasonID: string]: {
|
|
18
30
|
[groupID: string]: {
|
|
19
|
-
[teamID: string]:
|
|
31
|
+
[teamID: string]: SoccerTeamRanking;
|
|
20
32
|
};
|
|
21
33
|
};
|
|
22
34
|
};
|
|
35
|
+
nfl: {
|
|
36
|
+
[seasonID: string]: {
|
|
37
|
+
[groupID: string]: {
|
|
38
|
+
[teamID: string]: NflTeamRanking;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}
|
|
23
42
|
};
|
|
24
43
|
leagues: {
|
|
25
|
-
|
|
44
|
+
soccer: {
|
|
45
|
+
[seasonID: string]: {
|
|
46
|
+
[teamID: string]: SoccerTeamRanking;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
nfl: {
|
|
26
50
|
[seasonID: string]: {
|
|
27
|
-
[teamID: string]:
|
|
51
|
+
[teamID: string]: NflTeamRanking;
|
|
28
52
|
};
|
|
29
53
|
};
|
|
30
54
|
};
|
|
@@ -8,6 +8,7 @@ import { Transactions } from './transactions';
|
|
|
8
8
|
import { Messages } from './messages';
|
|
9
9
|
import { PromoOffers } from './promoOffers';
|
|
10
10
|
import { UserVerificationStatuses } from './verificationStatus';
|
|
11
|
+
import { Leaderboard } from './leaderboard';
|
|
11
12
|
|
|
12
13
|
export interface Users {
|
|
13
14
|
orders: Orders;
|
|
@@ -19,5 +20,6 @@ export interface Users {
|
|
|
19
20
|
transactions: Transactions;
|
|
20
21
|
messages: Messages;
|
|
21
22
|
promoOffers?: PromoOffers;
|
|
22
|
-
verificationStatus: UserVerificationStatuses
|
|
23
|
+
verificationStatus: UserVerificationStatuses;
|
|
24
|
+
leaderboard: Leaderboard;
|
|
23
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {ISODate,
|
|
1
|
+
import {ISODate, TeamID, Percentage} from "../../global";
|
|
2
2
|
|
|
3
3
|
export type OrderActionType = "BUY" | "SELL";
|
|
4
4
|
|
|
@@ -32,7 +32,6 @@ export interface Order {
|
|
|
32
32
|
processedMoney: number;
|
|
33
33
|
processedFee: number;
|
|
34
34
|
processedTotalMoney: number; // processedMoney + processedFee
|
|
35
|
-
sportId: SportID;
|
|
36
35
|
teamId: TeamID;
|
|
37
36
|
transactionFee: Percentage;
|
|
38
37
|
type: OrderTransactionType;
|
package/models/global.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
TeamSide,
|
|
12
12
|
TournamentType,
|
|
13
13
|
} from "../global";
|
|
14
|
+
import {MatchTime} from "../details/matches/overviews";
|
|
14
15
|
|
|
15
16
|
export interface Team {
|
|
16
17
|
id: TeamID;
|
|
@@ -50,10 +51,7 @@ export interface EventStatus {
|
|
|
50
51
|
matchStatus: MatchStatus;
|
|
51
52
|
period: MatchPeriod;
|
|
52
53
|
isActive: boolean;
|
|
53
|
-
matchTime:
|
|
54
|
-
minutes: number;
|
|
55
|
-
additionalMinutes: number;
|
|
56
|
-
};
|
|
54
|
+
matchTime: MatchTime
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
export interface MatchOverviewSnapshot {
|
|
@@ -29,17 +29,27 @@ export interface GroupTable {
|
|
|
29
29
|
|
|
30
30
|
export interface TableSummary {
|
|
31
31
|
groups: {
|
|
32
|
-
|
|
32
|
+
soccer: {
|
|
33
33
|
[seasonID: string]: {
|
|
34
34
|
[groupId: string]: GroupTable;
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
|
+
nfl: {
|
|
38
|
+
[seasonID: string]: {
|
|
39
|
+
[groupId: string]: GroupTable;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
37
42
|
};
|
|
38
43
|
leagues: {
|
|
39
|
-
|
|
44
|
+
soccer: {
|
|
45
|
+
[seasonID: string]: {
|
|
46
|
+
[teamID: string]: TeamTable;
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
nfl: {
|
|
40
50
|
[seasonID: string]: {
|
|
41
51
|
[teamID: string]: TeamTable;
|
|
42
52
|
};
|
|
43
|
-
}
|
|
53
|
+
},
|
|
44
54
|
};
|
|
45
55
|
}
|