@sportsbroker/firebase-structure 3.56.0 → 3.57.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.
- package/firestore/common.d.ts +3 -0
- package/firestore/matches/algorithm-calculation.d.ts +19 -0
- package/firestore/matches/index.ts +2 -0
- package/firestore/matches/match-common.d.ts +10 -0
- package/firestore/matches/match-event.d.ts +5 -5
- package/firestore/matches/match-lineup.d.ts +1 -1
- package/firestore/matches/match-stats.d.ts +1 -1
- package/firestore/matches/match.d.ts +5 -13
- package/package.json +4 -6
- package/.vscode/settings.json +0 -22
package/firestore/common.d.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MatchSides, MatchTime } from './match-common';
|
|
2
|
+
|
|
3
|
+
export type AlgorithmCalculation = {
|
|
4
|
+
calculationId: number;
|
|
5
|
+
bettingPools: BettingPools;
|
|
6
|
+
gainLossPercentage: GainLossPercentage;
|
|
7
|
+
matchTime: MatchTime;
|
|
8
|
+
statsDiff: StatsDiff;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type BettingPools = MatchSides<number>;
|
|
12
|
+
|
|
13
|
+
type GainLossPercentage = MatchSides<number>;
|
|
14
|
+
|
|
15
|
+
type StatsDiff = MatchSides<GameStats>;
|
|
16
|
+
|
|
17
|
+
type GameStats = Record<StatsKey, number>;
|
|
18
|
+
|
|
19
|
+
type StatsKey = string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export * from "./match-common";
|
|
1
2
|
export * from "./match";
|
|
2
3
|
export * from "./match-commentary";
|
|
3
4
|
export * from "./match-event";
|
|
4
5
|
export * from "./match-h2h-stats";
|
|
5
6
|
export * from "./match-lineup";
|
|
6
7
|
export * from "./match-stats";
|
|
8
|
+
export * from "./algorithm-calculation";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PlayerID, TeamID } from "..";
|
|
2
1
|
import { MatchPeriod } from "./match";
|
|
2
|
+
import { PlayerId, TeamId } from '../common';
|
|
3
3
|
|
|
4
4
|
export type MatchEvent =
|
|
5
5
|
| YellowCardEvent
|
|
@@ -27,7 +27,7 @@ export type EventTime = {
|
|
|
27
27
|
type BaseEvent = {
|
|
28
28
|
type: EventType;
|
|
29
29
|
time: EventTime;
|
|
30
|
-
teamId:
|
|
30
|
+
teamId: TeamId;
|
|
31
31
|
period: MatchPeriod;
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -48,7 +48,7 @@ export type YellowCardEvent = BaseEvent & {
|
|
|
48
48
|
|
|
49
49
|
export type GoalEvent = BaseEvent & {
|
|
50
50
|
type: "GOAL";
|
|
51
|
-
assistingPlayerId?:
|
|
51
|
+
assistingPlayerId?: PlayerId;
|
|
52
52
|
assistingPlayerName?: string;
|
|
53
53
|
assistingPlayerShirtName?: string;
|
|
54
54
|
assistingPlayerUniform?: string;
|
|
@@ -77,11 +77,11 @@ export type MissedPenaltyEvent = BaseEvent & {
|
|
|
77
77
|
|
|
78
78
|
export type SubstitutionEvent = BaseEvent & {
|
|
79
79
|
type: "SUBSTITUTION";
|
|
80
|
-
playerInId?:
|
|
80
|
+
playerInId?: PlayerId;
|
|
81
81
|
playerInName?: string;
|
|
82
82
|
playerInShirtName?: string;
|
|
83
83
|
playerInUniform?: string;
|
|
84
|
-
playerOutId:
|
|
84
|
+
playerOutId: PlayerId;
|
|
85
85
|
playerOutName: string;
|
|
86
86
|
playerOutShirtName: string;
|
|
87
87
|
playerOutUniform: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ISODate, UUID, Image, Doc, Sport } from "
|
|
1
|
+
import { ISODate, UUID, Image, Doc, Sport } from "../common";
|
|
2
2
|
import { MatchCommentary } from "./match-commentary";
|
|
3
3
|
import { MatchEvent } from "./match-event";
|
|
4
4
|
import { MatchHeadToHeadStats } from "./match-h2h-stats";
|
|
5
5
|
import { MatchLineup } from "./match-lineup";
|
|
6
6
|
import { MatchStats } from "./match-stats";
|
|
7
|
+
import { MatchSides, MatchTime } from './match-common';
|
|
8
|
+
import { AlgorithmCalculation } from './algorithm-calculation';
|
|
7
9
|
|
|
8
10
|
export type MatchDoc = Match & Doc;
|
|
9
11
|
|
|
@@ -27,10 +29,11 @@ export type Match = {
|
|
|
27
29
|
shares?: MatchSides<TeamSharesData>;
|
|
28
30
|
betting?: MatchBettingData;
|
|
29
31
|
stats?: MatchStats;
|
|
32
|
+
algorithmCalculations?: AlgorithmCalculation[];
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
export type MatchBettingData = {
|
|
33
|
-
[key:
|
|
36
|
+
[key: string]: TeamBettingData;
|
|
34
37
|
};
|
|
35
38
|
|
|
36
39
|
export type TeamBettingData = {
|
|
@@ -68,11 +71,6 @@ export type PreviousMatch = {
|
|
|
68
71
|
startDate: ISODate;
|
|
69
72
|
};
|
|
70
73
|
|
|
71
|
-
export interface MatchSides<T> {
|
|
72
|
-
home?: T;
|
|
73
|
-
away?: T;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
74
|
export type MatchStage = {
|
|
77
75
|
stageId: UUID;
|
|
78
76
|
name?: string;
|
|
@@ -109,12 +107,6 @@ export type MatchPeriod =
|
|
|
109
107
|
|
|
110
108
|
export type MatchStatusType = "PENDING" | "STARTED" | "FINISHED" | "POSTPONED";
|
|
111
109
|
|
|
112
|
-
export type MatchTime = {
|
|
113
|
-
minutes: number;
|
|
114
|
-
additionalMinutes: number;
|
|
115
|
-
periodId: number;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
110
|
export type Opponent = {
|
|
119
111
|
score: number;
|
|
120
112
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sportsbroker/firebase-structure",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.57.1",
|
|
4
4
|
"description": "Firebase structure typings",
|
|
5
5
|
"main": "index.d.ts",
|
|
6
6
|
"repository": {
|
|
@@ -12,11 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"author": "SportsBroker",
|
|
14
14
|
"license": "ISC",
|
|
15
|
-
"
|
|
16
|
-
"url": "https://github.com/BonFireITLTD/firebase-structure/issues"
|
|
17
|
-
},
|
|
18
|
-
"homepage": "https://github.com/BonFireITLTD/firebase-structure#readme",
|
|
15
|
+
"homepage": "https://github.com/SportsBroker-HQ/firebase-structure",
|
|
19
16
|
"devDependencies": {
|
|
20
|
-
"typescript": "
|
|
17
|
+
"typescript": "4.9.4",
|
|
18
|
+
"standard-version": "9.5.0"
|
|
21
19
|
}
|
|
22
20
|
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|