@sportsbroker/firebase-structure 3.72.2 → 3.73.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.
@@ -0,0 +1,22 @@
1
+ {
2
+ "workbench.colorCustomizations": {
3
+ "activityBar.activeBackground": "#1f6fd0",
4
+ "activityBar.background": "#1f6fd0",
5
+ "activityBar.foreground": "#e7e7e7",
6
+ "activityBar.inactiveForeground": "#e7e7e799",
7
+ "activityBarBadge.background": "#ee90bb",
8
+ "activityBarBadge.foreground": "#15202b",
9
+ "commandCenter.border": "#e7e7e799",
10
+ "sash.hoverBorder": "#1f6fd0",
11
+ "statusBar.background": "#1857a4",
12
+ "statusBar.foreground": "#e7e7e7",
13
+ "statusBarItem.hoverBackground": "#1f6fd0",
14
+ "statusBarItem.remoteBackground": "#1857a4",
15
+ "statusBarItem.remoteForeground": "#e7e7e7",
16
+ "titleBar.activeBackground": "#1857a4",
17
+ "titleBar.activeForeground": "#e7e7e7",
18
+ "titleBar.inactiveBackground": "#1857a499",
19
+ "titleBar.inactiveForeground": "#e7e7e799"
20
+ },
21
+ "peacock.color": "#1857a4"
22
+ }
@@ -0,0 +1,54 @@
1
+ import { ISODate, UUID } from "../common";
2
+ import { MPQuestion } from "../match-predictor";
3
+
4
+ export type B2BBetEvent = {
5
+ id: string;
6
+ organizationId: UUID;
7
+ startDate: ISODate;
8
+ status: B2BBetEventStatusType;
9
+ bettingStatus: B2BBetEventBettingStatusType;
10
+ gameKey: GameKeyEnum;
11
+ gameSpecificData: B2BMPEventGameSpecificData;
12
+ poolData: B2BBetEventPoolData;
13
+ createdAt: ISODate;
14
+ updatedAt: ISODate;
15
+ };
16
+
17
+ export type B2BBetEventPoolData = {
18
+ id: UUID;
19
+ potAmount: number; // gross pool entries sum
20
+ participants: number; // active bets count
21
+ entryFee: number;
22
+ leaderboard: {
23
+ entries: {
24
+ userId: UUID;
25
+ displayName: string;
26
+ position: number;
27
+ score: number;
28
+ prize: number | null;
29
+ }[];
30
+ };
31
+ payoutStructure: PoolPayoutStructure;
32
+ };
33
+
34
+ export type PoolPayoutStructure = { [position: string]: number };
35
+
36
+ export enum GameKeyEnum {
37
+ MATCH_PREDICTOR = "match-predictor",
38
+ }
39
+
40
+ export type B2BBetEventBettingStatusType = "locked" | "unlocked" | "settled";
41
+
42
+ export type B2BBetEventStatusType =
43
+ | "pending" // before we start display event ald at this time betting is locked
44
+ | "open" // now we can place bets on event but match did not start yet
45
+ | "event-in-progress" // match already started betting is locked again
46
+ | "waiting-for-results-approval" // match is finished and we wait for CSA to approve match results
47
+ | "results-approved" // results are approved and event is ready to be settled
48
+ | "finished" // event is finished and settled
49
+ | "canceled"; // event is canceled
50
+
51
+ export type B2BMPEventGameSpecificData = {
52
+ matchId: UUID;
53
+ questions: MPQuestion[];
54
+ };
@@ -0,0 +1 @@
1
+ export * from "./b2b-bet-events";
@@ -0,0 +1,14 @@
1
+ import { ISODate, UUID } from "../common";
2
+
3
+ export type B2BBets = {
4
+ id: string; // organisationId-userId
5
+ userId: UUID;
6
+ organisationId: UUID;
7
+ // betting: { activeBettingEvents: UserActiveBettingEvents };
8
+ createdAt: ISODate;
9
+ updatedAt: ISODate;
10
+ };
11
+
12
+ // export type UserActiveBettingEvents = {
13
+ // mpEvents: UUID[];
14
+ // };
@@ -0,0 +1 @@
1
+ export * from "./b2b-bets";
@@ -0,0 +1,42 @@
1
+ import { ISODate, UUID, Image } from "../common";
2
+
3
+ export type B2BMatch = {
4
+ id: UUID;
5
+ startDate: ISODate;
6
+ homeTeam: MatchTeam;
7
+ awayTeam: MatchTeam;
8
+ status: B2BMatchStatus;
9
+ createdAt: ISODate;
10
+ updatedAt: ISODate;
11
+ };
12
+
13
+ export type MatchTeam = {
14
+ id: UUID;
15
+ name: string;
16
+ logo: Image | null;
17
+ score: number;
18
+ };
19
+
20
+ export type B2BMatchStatus = {
21
+ matchStatus: B2BMatchStatusType;
22
+ isActive: boolean;
23
+ period: B2BMatchPeriod;
24
+ periodId: number;
25
+ minutes: number;
26
+ additionalMinutes: number;
27
+ };
28
+
29
+ export type B2BMatchPeriod =
30
+ | "PRE_MATCH"
31
+ | "FIRST_HALF"
32
+ | "SECOND_HALF"
33
+ | "FIRST_OVERTIME_HALF"
34
+ | "SECOND_OVERTIME_HALF"
35
+ | "SHOOTOUT";
36
+
37
+ export type B2BMatchStatusType =
38
+ | "PENDING"
39
+ | "STARTED"
40
+ | "FINISHED"
41
+ | "POSTPONED"
42
+ | "CANCELLED";
@@ -0,0 +1 @@
1
+ export * from "./b2b-match";
@@ -1,7 +1,7 @@
1
1
  export type Doc = {
2
2
  docId: UUID;
3
3
  createdAt: ISODate;
4
- updatedAt?: ISODate;
4
+ updatedAt: ISODate;
5
5
  };
6
6
 
7
7
  export type ISODate = string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.72.2",
3
+ "version": "3.73.1",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {