@sportsbroker/firebase-structure 3.69.26 → 3.69.28

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.
@@ -0,0 +1 @@
1
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.69.26",
3
+ "version": "3.69.28",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {