@sportsbroker/firebase-structure 3.80.1 → 5.0.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/firestore/b2b-bet-events/b2b-bet-events.model.ts +1 -1
- package/firestore/b2b-bets/b2b-bets.model.ts +5 -5
- package/firestore/b2b-events/b2b-events.d.ts +1 -0
- package/firestore/{b2b-gf-events/b2b-gf-events.model.ts → b2b-events/b2b-events.model.ts} +16 -16
- package/firestore/b2b-events/index.ts +1 -0
- package/firestore/{b2b-gf-pools/b2b-gf-pools.model.ts → b2b-pools/b2b-pools.model.ts} +1 -1
- package/firestore/b2b-pools/index.ts +1 -0
- package/firestore/b2b-question-sets/b2b-question-sets.d.ts +1 -0
- package/firestore/{b2b-gf-game-templates/b2b-gf-game-templates.model.ts → b2b-question-sets/b2b-question-sets.model.ts} +8 -8
- package/firestore/b2b-question-sets/index.ts +1 -0
- package/firestore/index.d.ts +1 -1
- package/package.json +1 -1
- package/firestore/b2b-gf-events/b2b-gf-events.d.ts +0 -1
- package/firestore/b2b-gf-events/index.ts +0 -1
- package/firestore/b2b-gf-game-templates/b2b-gf-game-templates.d.ts +0 -1
- package/firestore/b2b-gf-game-templates/index.ts +0 -1
- package/firestore/b2b-gf-pools/index.ts +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { GameKeyEnum } from "../b2b-bet-events";
|
|
2
|
-
import type {
|
|
2
|
+
import type { QuestionResultValue } from "../b2b-events";
|
|
3
3
|
import type { ISODate, UUID } from "../common";
|
|
4
4
|
|
|
5
5
|
export type B2BBet = {
|
|
6
6
|
id: string;
|
|
7
7
|
userId: UUID;
|
|
8
8
|
gameKey: GameKeyEnum;
|
|
9
|
-
|
|
9
|
+
questionSetId: UUID;
|
|
10
10
|
status: BetStatusEnum;
|
|
11
11
|
betEventId: UUID;
|
|
12
12
|
predictions: BetPredictionType[];
|
|
@@ -23,16 +23,16 @@ export enum BetStatusEnum {
|
|
|
23
23
|
LOCKED = "locked",
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export type BetPredictionType = MPPrediction |
|
|
26
|
+
export type BetPredictionType = MPPrediction | Prediction;
|
|
27
27
|
|
|
28
28
|
export type MPPrediction = {
|
|
29
29
|
questionKey: MPQuestionKeyEnum;
|
|
30
30
|
predictionValue: MPQuestionResultTypeValueType[MPQuestionResultTypeEnum];
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export type
|
|
33
|
+
export type Prediction = {
|
|
34
34
|
eventQuestionId: UUID;
|
|
35
|
-
predictionValue:
|
|
35
|
+
predictionValue: QuestionResultValue;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export enum MPQuestionKeyEnum {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./b2b-events.model";
|
|
@@ -5,25 +5,25 @@ import type {
|
|
|
5
5
|
} from "../b2b-bet-events";
|
|
6
6
|
import type { ISODate, UUID } from "../common";
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type B2BEvent = {
|
|
9
9
|
id: UUID;
|
|
10
10
|
startDate: ISODate;
|
|
11
11
|
status: B2BBetEventStatusType;
|
|
12
12
|
bettingStatus: B2BBetEventBettingStatusType;
|
|
13
13
|
gameKey: GameKeyEnum;
|
|
14
|
-
|
|
14
|
+
questionSetId: UUID;
|
|
15
15
|
name: string;
|
|
16
|
-
questions:
|
|
17
|
-
resultsData:
|
|
16
|
+
questions: EventQuestion[];
|
|
17
|
+
resultsData: EventResultsData;
|
|
18
18
|
resultsUpdateReason: string | null;
|
|
19
19
|
createdAt: ISODate;
|
|
20
20
|
updatedAt: ISODate;
|
|
21
21
|
matchIds?: UUID[];
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type EventQuestion = {
|
|
25
25
|
eventQuestionId: UUID;
|
|
26
|
-
questionType:
|
|
26
|
+
questionType: QuestionTypeEnum;
|
|
27
27
|
text: string;
|
|
28
28
|
matchId: UUID;
|
|
29
29
|
gameTypeQuestionId?: UUID;
|
|
@@ -32,40 +32,40 @@ export type GFEventQuestion = {
|
|
|
32
32
|
helperText?: string;
|
|
33
33
|
label: string;
|
|
34
34
|
sport: string;
|
|
35
|
-
inGameEventKey:
|
|
35
|
+
inGameEventKey: InGameEventKey;
|
|
36
36
|
pointsForExactHit: number;
|
|
37
37
|
pointsForCorrectResult: number;
|
|
38
38
|
pointsForWrongAnswer: number;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export type
|
|
42
|
-
[eventQuestionId: UUID]:
|
|
41
|
+
export type EventResultsData = {
|
|
42
|
+
[eventQuestionId: UUID]: EventResultData;
|
|
43
43
|
} | null;
|
|
44
44
|
|
|
45
|
-
export type
|
|
45
|
+
export type EventResultData = {
|
|
46
46
|
matchId: UUID;
|
|
47
47
|
isMatchFinished?: boolean;
|
|
48
48
|
result: {
|
|
49
49
|
isFinal: boolean;
|
|
50
|
-
value:
|
|
50
|
+
value: QuestionResultValue;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
export type
|
|
54
|
+
export type OccurrenceCountForSides = {
|
|
55
55
|
home: number;
|
|
56
56
|
away: number;
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
export type
|
|
59
|
+
export type QuestionResultValue = string | number | boolean | OccurrenceCountForSides;
|
|
60
60
|
|
|
61
|
-
export enum
|
|
61
|
+
export enum QuestionTypeEnum {
|
|
62
62
|
OCCURRENCE_COUNT_FOR_SIDES = "occurrence-count-for-sides",
|
|
63
63
|
MOST_OCCURRENCE_RESULT = "most-occurrence-result",
|
|
64
64
|
TOTAL_OCCURRENCE_COUNT = "total-occurrence-count",
|
|
65
65
|
OCCURRED_OR_NOT = "occurred-or-not",
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
export enum
|
|
68
|
+
export enum InGameEventKey {
|
|
69
69
|
SCORE = "score",
|
|
70
70
|
GOAL = "goal",
|
|
71
71
|
CORNERS = "corners",
|
|
@@ -92,7 +92,7 @@ export enum GFInGameEventKey {
|
|
|
92
92
|
SAVES_TOTAL = "saves_total",
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
export enum
|
|
95
|
+
export enum PrizeDistributionStrategyEnum {
|
|
96
96
|
WINNER_TAKES_ALL = "winner-takes-all",
|
|
97
97
|
TOP_3 = "top-3",
|
|
98
98
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./b2b-events.model";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { B2BBetEventPoolData } from "../b2b-bet-events";
|
|
2
2
|
import type { ISODate, UUID } from "../common";
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type B2BPool = B2BBetEventPoolData & {
|
|
5
5
|
betEventId: UUID;
|
|
6
6
|
organizationId: UUID;
|
|
7
7
|
createdAt: ISODate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./b2b-pools.model";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./b2b-question-sets.model";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import type { ISODate, UUID } from "../common";
|
|
2
|
-
import type {
|
|
2
|
+
import type { InGameEventKey, QuestionTypeEnum } from "../b2b-events";
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type B2BQuestionSet = {
|
|
5
5
|
id: UUID;
|
|
6
6
|
displayName: string;
|
|
7
|
-
|
|
7
|
+
questions: B2BQuestionTemplate[];
|
|
8
8
|
rules: string;
|
|
9
|
-
status:
|
|
9
|
+
status: B2BQuestionSetStatusEnum;
|
|
10
10
|
createdAt: ISODate;
|
|
11
11
|
updatedAt: ISODate;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
export type
|
|
14
|
+
export type B2BQuestionTemplate = {
|
|
15
15
|
id: UUID;
|
|
16
16
|
providerKey: string;
|
|
17
17
|
displayOrder: number;
|
|
18
18
|
helperText?: string;
|
|
19
19
|
label: string;
|
|
20
20
|
sport: string;
|
|
21
|
-
inGameEventKey:
|
|
22
|
-
type:
|
|
21
|
+
inGameEventKey: InGameEventKey;
|
|
22
|
+
type: QuestionTypeEnum;
|
|
23
23
|
pointsForExactHit: number;
|
|
24
24
|
pointsForCorrectResult: number;
|
|
25
25
|
pointsForWrongAnswer: number;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
export enum
|
|
28
|
+
export enum B2BQuestionSetStatusEnum {
|
|
29
29
|
DRAFT = "draft",
|
|
30
30
|
PUBLISHED = "published",
|
|
31
31
|
ARCHIVED = "archived",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./b2b-question-sets.model";
|
package/firestore/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-gf-events.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-gf-events.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-gf-game-templates.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-gf-game-templates.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-gf-pools.model";
|