@sportsbroker/firebase-structure 3.69.25 → 3.69.27

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.
File without changes
@@ -1 +1,2 @@
1
1
  export * from "./score-predictor";
2
+ export * from "./match-predictor";
@@ -0,0 +1,53 @@
1
+ import { Doc, ISODate, UUID } from "../common";
2
+ import { MatchTime } from "../matches";
3
+
4
+ export type MPEventDoc = MPEvent & Doc;
5
+
6
+ export interface MPEvent {
7
+ id: UUID;
8
+ status: MPEventStatusType;
9
+ eventName: string;
10
+ startDate: Date;
11
+ matchData: MPMatchesData;
12
+ pools: { [key: string]: MPEventPool };
13
+ createdAt: ISODate;
14
+ updatedAt: ISODate;
15
+ }
16
+
17
+ export type MPEventMatchStatusType =
18
+ | "pre-event"
19
+ | "live"
20
+ | "finished"
21
+ | "canceled";
22
+
23
+ export type MPMatchesData = {
24
+ matchId: UUID;
25
+ status: MPEventMatchStatusType;
26
+ startDate: ISODate;
27
+ homeTeamName: string;
28
+ homeTeamId: UUID | null;
29
+ awayTeamName: string;
30
+ awayTeamId: UUID | null;
31
+ isActive: boolean;
32
+ matchTime: MatchTime;
33
+ };
34
+
35
+ export type MPEventStatusType =
36
+ | "pending"
37
+ | "open"
38
+ | "event-in-progress"
39
+ | "waiting-for-results-approval"
40
+ | "results-approved"
41
+ | "finished"
42
+ | "canceled";
43
+
44
+ export type MPEventPool = {
45
+ id: UUID;
46
+ potAmount: number; // gross pool entries sum aka prize pool
47
+ participants: number; // active bets count
48
+ entryFee: number;
49
+ leaderboardId: UUID;
50
+ payoutStructure: MPPoolPayoutStructure;
51
+ };
52
+
53
+ export type MPPoolPayoutStructure = { [position: string]: number };
@@ -11,7 +11,6 @@ export interface SPEvent {
11
11
  matchesData: SPMatchesData;
12
12
  pools: { [key: string]: SPEventPool };
13
13
  jackpot: Jackpot | null;
14
- miniJackpot?: boolean;
15
14
  createdAt: ISODate;
16
15
  updatedAt: ISODate;
17
16
  }
@@ -76,5 +75,7 @@ export type SPEventPool = {
76
75
  participants: number; // active bets count
77
76
  entryFee: number;
78
77
  leaderboardId: UUID;
79
- payoutStructure: { [position: string]: number };
78
+ payoutStructure: SPPoolPayoutStructure;
80
79
  };
80
+
81
+ export type SPPoolPayoutStructure = { [position: string]: number };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.69.25",
3
+ "version": "3.69.27",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {