@sportsbroker/firebase-structure 3.34.4 → 3.35.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.
@@ -6,10 +6,10 @@ export interface Score {
6
6
  export interface MatchScore {
7
7
  home: number | null; // total without penalties
8
8
  away: number | null; // total without penalties
9
- periods: MatchPeriods;
9
+ periods: SoccerPeriods | NFLPeriods;
10
10
  }
11
11
 
12
- export interface MatchPeriods {
12
+ export interface SoccerPeriods {
13
13
  firstHalf?: Score;
14
14
  secondHalf?: Score;
15
15
  firstOvertime?: Score;
@@ -17,6 +17,10 @@ export interface MatchPeriods {
17
17
  shootoutPenalties?: Score;
18
18
  }
19
19
 
20
+ export interface NFLPeriods {
21
+ [sequenceName: string]: Score
22
+ }
23
+
20
24
  export interface Scores {
21
25
  [sportID: string]: {
22
26
  [matchID: string]: MatchScore;
@@ -1,4 +1,4 @@
1
- export interface TeamRanking {
1
+ export interface SoccerTeamRanking {
2
2
  position: number;
3
3
  positionChange: number;
4
4
  points: number;
@@ -11,20 +11,44 @@ export interface TeamRanking {
11
11
  goalsAgainst: number;
12
12
  }
13
13
 
14
+ export interface NflTeamRanking {
15
+ won: number;
16
+ lost: number;
17
+ draw: number;
18
+ played: number;
19
+ winningPercentage: number;
20
+ position: number;
21
+ lastPosition?: number;
22
+ }
23
+
24
+ export type TeamRanking = SoccerTeamRanking | NflTeamRanking;
25
+
14
26
  export interface Ranking {
15
27
  groups: {
16
- [sportID: string]: {
28
+ soccer: {
17
29
  [seasonID: string]: {
18
30
  [groupID: string]: {
19
- [teamID: string]: TeamRanking;
31
+ [teamID: string]: SoccerTeamRanking;
20
32
  };
21
33
  };
22
34
  };
35
+ nfl: {
36
+ [seasonID: string]: {
37
+ [groupID: string]: {
38
+ [teamID: string]: NflTeamRanking;
39
+ };
40
+ };
41
+ }
23
42
  };
24
43
  leagues: {
25
- [sportID: string]: {
44
+ soccer: {
45
+ [seasonID: string]: {
46
+ [teamID: string]: SoccerTeamRanking;
47
+ };
48
+ };
49
+ nfl: {
26
50
  [seasonID: string]: {
27
- [teamID: string]: TeamRanking;
51
+ [teamID: string]: NflTeamRanking;
28
52
  };
29
53
  };
30
54
  };
@@ -14,9 +14,7 @@ export type NotificationType =
14
14
  | 'SHARE_SELL_SUCCESSFUL'
15
15
  | 'SHARE_BUY_UNSUCCESSFUL'
16
16
  | 'SHARE_SELL_UNSUCCESSFUL'
17
- | 'FOOTBALL_PASSPORT_STAMP_ACQUIRED'
18
- | 'APP_RATING'
19
- ;
17
+ | 'FOOTBALL_PASSPORT_STAMP_ACQUIRED';
20
18
 
21
19
  export type VariablesMap = {
22
20
  ['CUSTOM']: {
@@ -66,7 +64,6 @@ export type VariablesMap = {
66
64
  promoEndDate: string;
67
65
  stampUrl: string;
68
66
  };
69
- ['APP_RATING']: {};
70
67
  }
71
68
 
72
69
  export interface Notification<T extends NotificationType> {
@@ -1,4 +1,4 @@
1
- import {ISODate, SportID, TeamID, Percentage} from "../../global";
1
+ import {ISODate, TeamID, Percentage} from "../../global";
2
2
 
3
3
  export type OrderActionType = "BUY" | "SELL";
4
4
 
@@ -32,7 +32,6 @@ export interface Order {
32
32
  processedMoney: number;
33
33
  processedFee: number;
34
34
  processedTotalMoney: number; // processedMoney + processedFee
35
- sportId: SportID;
36
35
  teamId: TeamID;
37
36
  transactionFee: Percentage;
38
37
  type: OrderTransactionType;
@@ -1,7 +1,6 @@
1
1
  import {ISODate, MatchID, SportID, TeamSide} from "../../global";
2
2
 
3
3
  export interface UserOwnedShares {
4
- sportId: SportID;
5
4
  amount: number;
6
5
  availableAmount: number;
7
6
  invested: number;
@@ -23,7 +23,7 @@ export type ISODate = string;
23
23
  /**
24
24
  * Currently support only soccer
25
25
  */
26
- export type SportID = "soccer" | string;
26
+ export type SportID = "soccer" | "nfl" | string;
27
27
 
28
28
  export type Language = "en" | "de" | string;
29
29
 
@@ -29,17 +29,27 @@ export interface GroupTable {
29
29
 
30
30
  export interface TableSummary {
31
31
  groups: {
32
- [sportID: string]: {
32
+ soccer: {
33
33
  [seasonID: string]: {
34
34
  [groupId: string]: GroupTable;
35
35
  }
36
- }
36
+ },
37
+ nfl: {
38
+ [seasonID: string]: {
39
+ [groupId: string]: GroupTable;
40
+ }
41
+ },
37
42
  };
38
43
  leagues: {
39
- [sportID: string]: {
44
+ soccer: {
45
+ [seasonID: string]: {
46
+ [teamID: string]: TeamTable;
47
+ };
48
+ },
49
+ nfl: {
40
50
  [seasonID: string]: {
41
51
  [teamID: string]: TeamTable;
42
52
  };
43
- };
53
+ },
44
54
  };
45
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.34.4",
3
+ "version": "3.35.0-0",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {