@sportsbroker/firebase-structure 3.73.4 → 3.73.6
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.
|
@@ -9,11 +9,14 @@ export type B2BBetEvent = {
|
|
|
9
9
|
bettingStatus: B2BBetEventBettingStatusType;
|
|
10
10
|
gameKey: GameKeyEnum;
|
|
11
11
|
gameSpecificData: B2BMPEventGameSpecificData;
|
|
12
|
+
resultsData: ResultsData;
|
|
12
13
|
poolData: B2BBetEventPoolData;
|
|
13
14
|
createdAt: ISODate;
|
|
14
15
|
updatedAt: ISODate;
|
|
15
16
|
};
|
|
16
17
|
|
|
18
|
+
export type ResultsData = B2BMPEventResultsData;
|
|
19
|
+
|
|
17
20
|
export type B2BBetEventPoolData = {
|
|
18
21
|
id: UUID;
|
|
19
22
|
potAmount: number; // gross pool entries sum
|
|
@@ -48,7 +51,64 @@ export type B2BBetEventStatusType =
|
|
|
48
51
|
| "finished" // event is finished and settled
|
|
49
52
|
| "canceled"; // event is canceled
|
|
50
53
|
|
|
54
|
+
////////////////////////////////////// MATCH PREDICTOR SPECIFIC TYPES //////////////////////////////////////
|
|
55
|
+
|
|
51
56
|
export type B2BMPEventGameSpecificData = {
|
|
52
57
|
matchId: UUID;
|
|
53
58
|
questions: MPQuestion[];
|
|
54
59
|
};
|
|
60
|
+
|
|
61
|
+
export type B2BMPEventResultsData = {
|
|
62
|
+
[mpQuestionKey: MPQuestionKeyType]: B2BMPEventResultData;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type MPQuestionKeyType = `${MPQuestionKeyEnum}` | string;
|
|
66
|
+
|
|
67
|
+
export enum MPQuestionKeyEnum {
|
|
68
|
+
MATCH_SCORE = "match-score",
|
|
69
|
+
TOTAL_SHOTS_ON_TARGET = "total-shots-on-target",
|
|
70
|
+
TOTAL_CARDS = "total-cards",
|
|
71
|
+
// MATCH_RESULT = 'match-result',
|
|
72
|
+
RED_CARD_IS_GIVEN = "red-card-is-given",
|
|
73
|
+
PENALTY_AWARDED = "penalty-awarded",
|
|
74
|
+
// BOTH_TEAM_SCORE = 'both-team-score',
|
|
75
|
+
// GOAL_IN_BOTH_HALVES = 'goal-in-both-halves',
|
|
76
|
+
GOAL_IN_FIRST_15 = "goal-in-first-15",
|
|
77
|
+
MOST_TACKLES_WON = "most-tackles-won",
|
|
78
|
+
CORNERS_10_OR_MORE = "corners-10-or-more",
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type B2BMPEventResultData = MPQuestion & {
|
|
82
|
+
result: {
|
|
83
|
+
isFinal: boolean;
|
|
84
|
+
value: MPQuestionResultTypeValueType[MPQuestionResultTypeEnum];
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type MPQuestionResultTypeValueType = {
|
|
89
|
+
[MPQuestionResultTypeEnum.BOTH_SIDES_POSITIVE_INTEGER]: BothSidesPositiveInteger;
|
|
90
|
+
[MPQuestionResultTypeEnum.POSITIVE_INTEGER]: PositiveInteger;
|
|
91
|
+
[MPQuestionResultTypeEnum.MATCH_SIDE_RESULT]: MatchSideResultEnum;
|
|
92
|
+
[MPQuestionResultTypeEnum.YES_NO]: YesNoResultEnum;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export enum MatchSideResultEnum {
|
|
96
|
+
HOME = "home",
|
|
97
|
+
AWAY = "away",
|
|
98
|
+
DRAW = "draw",
|
|
99
|
+
}
|
|
100
|
+
export enum YesNoResultEnum {
|
|
101
|
+
YES = "yes",
|
|
102
|
+
NO = "no",
|
|
103
|
+
}
|
|
104
|
+
export type BothSidesPositiveInteger = { home: number; away: number };
|
|
105
|
+
export type PositiveInteger = number;
|
|
106
|
+
|
|
107
|
+
export enum MPQuestionResultTypeEnum {
|
|
108
|
+
BOTH_SIDES_POSITIVE_INTEGER = "both-sides-positive-integer",
|
|
109
|
+
POSITIVE_INTEGER = "positive-integer",
|
|
110
|
+
MATCH_SIDE_RESULT = "match-side-result",
|
|
111
|
+
YES_NO = "yes-no",
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|