@sportsbroker/firebase-structure 3.61.1 → 3.61.3
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.
|
@@ -5,7 +5,6 @@ import { MatchHeadToHeadStats } from "./match-h2h-stats";
|
|
|
5
5
|
import { MatchLineup } from "./match-lineup";
|
|
6
6
|
import { MatchStats } from "./match-stats";
|
|
7
7
|
import { MatchSides, MatchTime } from "./match-common";
|
|
8
|
-
import { AlgorithmCalculation } from "./algorithm-calculation";
|
|
9
8
|
|
|
10
9
|
export type MatchDoc = Match & Doc;
|
|
11
10
|
|
|
@@ -26,10 +25,8 @@ export type Match = {
|
|
|
26
25
|
events?: MatchEvent[];
|
|
27
26
|
headToHeadStats?: MatchHeadToHeadStats;
|
|
28
27
|
lineup?: MatchLineup;
|
|
29
|
-
|
|
30
|
-
betting?: MatchBettingData;
|
|
28
|
+
betting?: EventBettingData;
|
|
31
29
|
stats?: MatchStats;
|
|
32
|
-
algorithmCalculations?: AlgorithmCalculation[];
|
|
33
30
|
};
|
|
34
31
|
|
|
35
32
|
export type BetEventStatus =
|
|
@@ -40,24 +37,53 @@ export type BetEventStatus =
|
|
|
40
37
|
|
|
41
38
|
export type BetEventBettingStatus = "locked" | "unlocked";
|
|
42
39
|
|
|
43
|
-
export type
|
|
44
|
-
betEventStatus
|
|
45
|
-
bettingStatus
|
|
46
|
-
|
|
47
|
-
[key: string]: TeamBettingData;
|
|
48
|
-
};
|
|
40
|
+
export type EventBettingData = {
|
|
41
|
+
betEventStatus: BetEventStatus;
|
|
42
|
+
bettingStatus: BetEventBettingStatus;
|
|
43
|
+
pools?: EventPools;
|
|
49
44
|
};
|
|
50
45
|
|
|
46
|
+
export type EventPools = Record<Partial<PoolType>, Pool>;
|
|
47
|
+
|
|
48
|
+
export type Pool = {
|
|
49
|
+
winningOutcome: OutcomeType | null;
|
|
50
|
+
type: PoolType;
|
|
51
|
+
outcomes: PoolOutcomes;
|
|
52
|
+
brokerGuaranteeStartAmount: number;
|
|
53
|
+
brokerGuaranteeCurrentAmount: number;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type PoolOutcomes = Record<Partial<OutcomeType>, Outcome>;
|
|
57
|
+
|
|
58
|
+
export type Outcome = {
|
|
59
|
+
poolType: PoolType;
|
|
60
|
+
outcomeType: OutcomeType;
|
|
61
|
+
stakeAmount: number;
|
|
62
|
+
odds: number | null;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type PoolType = MatchPoolTypeEnum.HEAD_TO_HEAD;
|
|
66
|
+
|
|
67
|
+
export enum MatchPoolTypeEnum {
|
|
68
|
+
HEAD_TO_HEAD = "head-to-head",
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type OutcomeType =
|
|
72
|
+
| HeadToHeadOutcomeTypeEnum.AWAY_TEAM_WIN
|
|
73
|
+
| HeadToHeadOutcomeTypeEnum.DRAW
|
|
74
|
+
| HeadToHeadOutcomeTypeEnum.HOME_TEAM_WIN;
|
|
75
|
+
|
|
76
|
+
export enum HeadToHeadOutcomeTypeEnum {
|
|
77
|
+
HOME_TEAM_WIN = "home-team-win",
|
|
78
|
+
AWAY_TEAM_WIN = "away-team-win",
|
|
79
|
+
DRAW = "draw",
|
|
80
|
+
}
|
|
81
|
+
|
|
51
82
|
export type TeamBettingData = {
|
|
52
83
|
preMatchBettingPool?: number;
|
|
53
84
|
postMatchBettingPool?: number;
|
|
54
85
|
};
|
|
55
86
|
|
|
56
|
-
export type TeamSharesData = {
|
|
57
|
-
preMatchPrice?: number;
|
|
58
|
-
postMatchPrice?: number;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
87
|
export type MatchResult = "WON" | "DRAW" | "LOST";
|
|
62
88
|
|
|
63
89
|
export type TournamentType =
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { MatchSides, MatchTime } from './match-common';
|
|
2
|
-
|
|
3
|
-
export type AlgorithmCalculation = {
|
|
4
|
-
calculationId: number;
|
|
5
|
-
bettingPools: BettingPools;
|
|
6
|
-
gainLossPercentage: GainLossPercentage;
|
|
7
|
-
matchTime: MatchTime;
|
|
8
|
-
statsDiff: StatsDiff;
|
|
9
|
-
matchPoints: MatchPoints;
|
|
10
|
-
winningSide: 'home' | 'away' | null;
|
|
11
|
-
timestamp: ISOString;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type BettingPools = MatchSides<number>;
|
|
15
|
-
|
|
16
|
-
type GainLossPercentage = MatchSides<number>;
|
|
17
|
-
|
|
18
|
-
type StatsDiff = MatchSides<GameStats>;
|
|
19
|
-
|
|
20
|
-
type MatchPoints = MatchSides<number>;
|
|
21
|
-
|
|
22
|
-
type GameStats = Record<StatsKey, number>;
|
|
23
|
-
|
|
24
|
-
type StatsKey = string;
|
|
25
|
-
|
|
26
|
-
type ISOString = string;
|