@sportsbroker/firebase-structure 5.0.0 → 5.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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { B2BBetEventPoolData } from "../b2b-pools";
|
|
1
2
|
import type { ISODate, UUID } from "../common";
|
|
2
3
|
import type { MPQuestion } from "../match-predictor";
|
|
3
4
|
|
|
4
5
|
export type B2BBetEvent = {
|
|
5
6
|
id: string;
|
|
6
|
-
organizationId: UUID;
|
|
7
7
|
startDate: ISODate;
|
|
8
8
|
status: B2BBetEventStatusType;
|
|
9
9
|
bettingStatus: B2BBetEventBettingStatusType;
|
|
@@ -17,40 +17,6 @@ export type B2BBetEvent = {
|
|
|
17
17
|
|
|
18
18
|
export type ResultsData = B2BMPEventResultsData;
|
|
19
19
|
|
|
20
|
-
export type B2BBetEventPoolData = {
|
|
21
|
-
id: UUID;
|
|
22
|
-
betEventId: UUID;
|
|
23
|
-
operatorId: UUID;
|
|
24
|
-
operatorCode: string;
|
|
25
|
-
payoutAmount?: number;
|
|
26
|
-
participants: number; // active bets count
|
|
27
|
-
entryFee: number;
|
|
28
|
-
currency: string;
|
|
29
|
-
event: {
|
|
30
|
-
questionSetId: UUID;
|
|
31
|
-
status: B2BBetEventStatusType;
|
|
32
|
-
gameKey: GameKeyEnum;
|
|
33
|
-
startDate?: ISODate;
|
|
34
|
-
matchIds?: UUID[];
|
|
35
|
-
leagueCodes?: string[];
|
|
36
|
-
countryCodes?: string[];
|
|
37
|
-
};
|
|
38
|
-
leaderboard: {
|
|
39
|
-
entries: {
|
|
40
|
-
userId: UUID;
|
|
41
|
-
displayName: string;
|
|
42
|
-
position: number;
|
|
43
|
-
score: number;
|
|
44
|
-
prize: number | null;
|
|
45
|
-
}[];
|
|
46
|
-
};
|
|
47
|
-
payoutStructure: PoolPayoutStructure;
|
|
48
|
-
createdAt: ISODate;
|
|
49
|
-
updatedAt: ISODate;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export type PoolPayoutStructure = { [position: string]: number };
|
|
53
|
-
|
|
54
20
|
export enum GameKeyEnum {
|
|
55
21
|
MATCH_PREDICTOR = "match-predictor",
|
|
56
22
|
SCORE_PREDICTOR = "score-predictor",
|
|
@@ -1,9 +1,43 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { B2BBetEventStatusType, GameKeyEnum } from "../b2b-bet-events";
|
|
2
2
|
import type { ISODate, UUID } from "../common";
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type PoolPayoutStructure = { [position: string]: number };
|
|
5
|
+
|
|
6
|
+
export enum PrizeDistributionStrategyEnum {
|
|
7
|
+
WINNER_TAKES_ALL = "winner-takes-all",
|
|
8
|
+
TOP_3 = "top-3",
|
|
9
|
+
TOP_5 = "top-5",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type B2BBetEventPoolData = {
|
|
13
|
+
id: UUID;
|
|
5
14
|
betEventId: UUID;
|
|
6
|
-
|
|
15
|
+
operatorId: UUID;
|
|
16
|
+
operatorCode: string;
|
|
17
|
+
payoutAmount?: number;
|
|
18
|
+
participants: number; // active bets count
|
|
19
|
+
entryFee: number;
|
|
20
|
+
currency: string;
|
|
21
|
+
event: {
|
|
22
|
+
questionSetId: UUID;
|
|
23
|
+
status: B2BBetEventStatusType;
|
|
24
|
+
gameKey: GameKeyEnum;
|
|
25
|
+
startDate?: ISODate;
|
|
26
|
+
matchIds?: UUID[];
|
|
27
|
+
leagueCodes?: string[];
|
|
28
|
+
countryCodes?: string[];
|
|
29
|
+
};
|
|
30
|
+
leaderboard: {
|
|
31
|
+
entries: {
|
|
32
|
+
userId: UUID;
|
|
33
|
+
displayName: string;
|
|
34
|
+
position: number;
|
|
35
|
+
score: number;
|
|
36
|
+
prize: number | null;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
payoutStructure: PoolPayoutStructure;
|
|
40
|
+
prizeDistributionStrategy: PrizeDistributionStrategyEnum;
|
|
7
41
|
createdAt: ISODate;
|
|
8
42
|
updatedAt: ISODate;
|
|
9
|
-
};
|
|
43
|
+
};
|