@sportsbroker/firebase-structure 3.44.0 → 3.45.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.
- package/models/details/matches/scores.d.ts +2 -6
- package/models/details/matches/stats.d.ts +1 -39
- package/models/details/tables/ranking.d.ts +5 -29
- package/models/details/users/_index.d.ts +1 -3
- package/models/details/users/notifications.d.ts +38 -36
- package/models/details/users/orders.d.ts +2 -1
- package/models/details/users/ownedShares.d.ts +1 -0
- package/models/global.d.ts +1 -1
- package/models/snapshots/tableSummary.d.ts +4 -14
- package/package.json +1 -1
- package/models/details/users/leaderboard.d.ts +0 -7
|
@@ -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: MatchPeriods;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export interface
|
|
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
|
|
10
|
-
|
|
11
|
-
export interface ISoccerStats {
|
|
9
|
+
export interface MatchStats {
|
|
12
10
|
// possession
|
|
13
11
|
possessionPercentageLast15: TeamsStats,
|
|
14
12
|
possessionPercentageLast30: TeamsStats,
|
|
@@ -79,42 +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
|
-
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
|
-
|
|
118
80
|
export interface Stats {
|
|
119
81
|
[sportID: string]: {
|
|
120
82
|
[matchID: string]: MatchStats
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
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
|
-
|
|
16
|
+
[sportID: string]: {
|
|
29
17
|
[seasonID: string]: {
|
|
30
18
|
[groupID: string]: {
|
|
31
|
-
[teamID: string]:
|
|
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
|
-
|
|
45
|
-
[seasonID: string]: {
|
|
46
|
-
[teamID: string]: SoccerTeamRanking;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
nfl: {
|
|
25
|
+
[sportID: string]: {
|
|
50
26
|
[seasonID: string]: {
|
|
51
|
-
[teamID: string]:
|
|
27
|
+
[teamID: string]: TeamRanking;
|
|
52
28
|
};
|
|
53
29
|
};
|
|
54
30
|
};
|
|
@@ -8,7 +8,6 @@ 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';
|
|
12
11
|
|
|
13
12
|
export interface Users {
|
|
14
13
|
orders: Orders;
|
|
@@ -20,6 +19,5 @@ export interface Users {
|
|
|
20
19
|
transactions: Transactions;
|
|
21
20
|
messages: Messages;
|
|
22
21
|
promoOffers?: PromoOffers;
|
|
23
|
-
verificationStatus: UserVerificationStatuses
|
|
24
|
-
leaderboard: Leaderboard;
|
|
22
|
+
verificationStatus: UserVerificationStatuses
|
|
25
23
|
}
|
|
@@ -2,74 +2,75 @@ import { ISODate } from "../../global";
|
|
|
2
2
|
|
|
3
3
|
export type NotificationID = string;
|
|
4
4
|
|
|
5
|
-
export type OrderType =
|
|
6
|
-
| 'MARKET'
|
|
7
|
-
| 'LIMIT';
|
|
5
|
+
export type OrderType = "MARKET" | "LIMIT";
|
|
8
6
|
|
|
9
7
|
export type NotificationType =
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
;
|
|
8
|
+
| "CUSTOM"
|
|
9
|
+
| "TEAM_BANKRUPT"
|
|
10
|
+
| "SHARE_SPLIT"
|
|
11
|
+
| "SHARE_BUY_SUCCESSFUL"
|
|
12
|
+
| "SHARE_SELL_SUCCESSFUL"
|
|
13
|
+
| "SHARE_BUY_UNSUCCESSFUL"
|
|
14
|
+
| "SHARE_SELL_UNSUCCESSFUL"
|
|
15
|
+
| "FOOTBALL_PASSPORT_STAMP_ACQUIRED"
|
|
16
|
+
| "APP_RATING"
|
|
17
|
+
| "APPSFLYER_BUY_ORDER_SUCCESSFUL"
|
|
18
|
+
| "APPSFLYER_DEPOSIT_SUCCESSFUL"
|
|
19
|
+
| "APPSFLYER_WITHDRAWAL_SUCCESSFUL"
|
|
20
|
+
| "APPSFLYER_USER_REGISTRATION_SUCCESSFUL"
|
|
21
|
+
| "REFERRAL_BONUS_GRANTED";
|
|
24
22
|
|
|
25
23
|
export type VariablesMap = {
|
|
26
|
-
[
|
|
24
|
+
["REFERRAL_BONUS_GRANTED"]: {
|
|
25
|
+
bonusAmount: number;
|
|
26
|
+
};
|
|
27
|
+
["CUSTOM"]: {
|
|
27
28
|
title: string;
|
|
28
29
|
content: string;
|
|
29
30
|
icon?: string;
|
|
30
31
|
};
|
|
31
|
-
[
|
|
32
|
+
["TEAM_BANKRUPT"]: {
|
|
32
33
|
teamId: string;
|
|
33
34
|
teamName: string;
|
|
34
35
|
};
|
|
35
|
-
[
|
|
36
|
-
[
|
|
36
|
+
["SHARE_SPLIT"]: {};
|
|
37
|
+
["SHARE_BUY_SUCCESSFUL"]: {
|
|
37
38
|
orderId: number;
|
|
38
|
-
orderType: OrderType
|
|
39
|
+
orderType: OrderType;
|
|
39
40
|
shareAmount: number;
|
|
40
41
|
teamId: string;
|
|
41
42
|
teamName: string;
|
|
42
43
|
};
|
|
43
|
-
[
|
|
44
|
+
["SHARE_SELL_SUCCESSFUL"]: {
|
|
44
45
|
orderId: number;
|
|
45
|
-
orderType: OrderType
|
|
46
|
+
orderType: OrderType;
|
|
46
47
|
shareAmount: number;
|
|
47
48
|
teamId: string;
|
|
48
49
|
teamName: string;
|
|
49
50
|
};
|
|
50
|
-
[
|
|
51
|
+
["SHARE_BUY_UNSUCCESSFUL"]: {
|
|
51
52
|
orderId: number;
|
|
52
|
-
orderType: OrderType
|
|
53
|
+
orderType: OrderType;
|
|
53
54
|
shareAmount: number;
|
|
54
55
|
teamId: string;
|
|
55
56
|
teamName: string;
|
|
56
57
|
};
|
|
57
|
-
[
|
|
58
|
+
["SHARE_SELL_UNSUCCESSFUL"]: {
|
|
58
59
|
orderId: number;
|
|
59
|
-
orderType: OrderType
|
|
60
|
+
orderType: OrderType;
|
|
60
61
|
shareAmount: number;
|
|
61
62
|
teamId: string;
|
|
62
63
|
teamName: string;
|
|
63
64
|
};
|
|
64
|
-
[
|
|
65
|
+
["FOOTBALL_PASSPORT_STAMP_ACQUIRED"]: {
|
|
65
66
|
tournamentId: string;
|
|
66
67
|
tournamentName: string;
|
|
67
68
|
refundAmount: number;
|
|
68
69
|
promoEndDate: string;
|
|
69
70
|
stampUrl: string;
|
|
70
71
|
};
|
|
71
|
-
[
|
|
72
|
-
[
|
|
72
|
+
["APP_RATING"]: {};
|
|
73
|
+
["APPSFLYER_BUY_ORDER_SUCCESSFUL"]: {
|
|
73
74
|
orderId: string;
|
|
74
75
|
teamId: string;
|
|
75
76
|
teamName: string;
|
|
@@ -78,22 +79,22 @@ export type VariablesMap = {
|
|
|
78
79
|
currency: string;
|
|
79
80
|
platform: string;
|
|
80
81
|
};
|
|
81
|
-
[
|
|
82
|
+
["APPSFLYER_DEPOSIT_SUCCESSFUL"]: {
|
|
82
83
|
revenue: number;
|
|
83
84
|
currency: string;
|
|
84
85
|
transactionId: string;
|
|
85
86
|
platform: string;
|
|
86
87
|
};
|
|
87
|
-
[
|
|
88
|
+
["APPSFLYER_WITHDRAWAL_SUCCESSFUL"]: {
|
|
88
89
|
revenue: number;
|
|
89
90
|
currency: string;
|
|
90
91
|
transactionId: string;
|
|
91
92
|
platform: string;
|
|
92
93
|
};
|
|
93
|
-
[
|
|
94
|
+
["APPSFLYER_USER_REGISTRATION_SUCCESSFUL"]: {
|
|
94
95
|
platform: string;
|
|
95
96
|
};
|
|
96
|
-
}
|
|
97
|
+
};
|
|
97
98
|
|
|
98
99
|
export interface Notification<T extends NotificationType> {
|
|
99
100
|
type: T;
|
|
@@ -109,7 +110,8 @@ export interface Notification<T extends NotificationType> {
|
|
|
109
110
|
export interface Notifications {
|
|
110
111
|
[userId: string]: {
|
|
111
112
|
unreadCount: number;
|
|
112
|
-
en: {
|
|
113
|
+
en: {
|
|
114
|
+
// This is for backward compatibility
|
|
113
115
|
entries: {
|
|
114
116
|
[notificationId: string]: Notification<NotificationType>;
|
|
115
117
|
};
|
|
@@ -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;
|
package/models/global.d.ts
CHANGED
|
@@ -29,27 +29,17 @@ export interface GroupTable {
|
|
|
29
29
|
|
|
30
30
|
export interface TableSummary {
|
|
31
31
|
groups: {
|
|
32
|
-
|
|
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
|
-
|
|
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