@sportsbroker/firebase-structure 3.24.0-0 → 3.24.0-10

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/CHANGELOG.md CHANGED
@@ -2,6 +2,78 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.24.0-10](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-9...v3.24.0-10) (2021-04-19)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * revert snapshots structures ([4dffdbe](https://github.com/SportsBroker-HQ/firebase-structure/commit/4dffdbeadde47e7cd977be4d639c1b2a013015fc))
11
+
12
+ ## [3.24.0-9](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-7...v3.24.0-9) (2021-04-16)
13
+
14
+
15
+ ### Features
16
+
17
+ * added type and countryCode to SeasonOverview ([dc420fe](https://github.com/SportsBroker-HQ/firebase-structure/commit/dc420fe7566bb8bd0721668c449847b84a576588))
18
+ * adjust events teamId ([afc6b72](https://github.com/SportsBroker-HQ/firebase-structure/commit/afc6b727dfa5e0ba2cb558c54d7e15453a6a5efd))
19
+
20
+ ## [3.24.0-8](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-7...v3.24.0-8) (2021-04-16)
21
+
22
+
23
+ ### Features
24
+
25
+ * added type and countryCode to SeasonOverview ([dc420fe](https://github.com/SportsBroker-HQ/firebase-structure/commit/dc420fe7566bb8bd0721668c449847b84a576588))
26
+
27
+ ## [3.24.0-7](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-6...v3.24.0-7) (2021-04-15)
28
+
29
+
30
+ ### Features
31
+
32
+ * adjust match scores schema ([e34e1d3](https://github.com/SportsBroker-HQ/firebase-structure/commit/e34e1d313256cd330105f436e90caeaebb5293c9))
33
+
34
+ ## [3.24.0-6](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-5...v3.24.0-6) (2021-04-15)
35
+
36
+
37
+ ### Features
38
+
39
+ * adjust match scores schema ([c18bbe3](https://github.com/SportsBroker-HQ/firebase-structure/commit/c18bbe3ea23151a7567d226da57ca3914a35be9a))
40
+
41
+ ## [3.24.0-5](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-3...v3.24.0-5) (2021-04-14)
42
+
43
+
44
+ ### Features
45
+
46
+ * adjust head2head structure ([39ee387](https://github.com/SportsBroker-HQ/firebase-structure/commit/39ee38764e4ff0aee5224207bfb83933ebae11b8))
47
+
48
+ ## [3.24.0-4](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-3...v3.24.0-4) (2021-04-14)
49
+
50
+
51
+ ### Features
52
+
53
+ * adjust head2head structure ([39ee387](https://github.com/SportsBroker-HQ/firebase-structure/commit/39ee38764e4ff0aee5224207bfb83933ebae11b8))
54
+
55
+ ## [3.24.0-3](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-2...v3.24.0-3) (2021-04-14)
56
+
57
+
58
+ ### Features
59
+
60
+ * add euro groups ([f990eb9](https://github.com/SportsBroker-HQ/firebase-structure/commit/f990eb908a16aee582f39c7341f74647c8032112))
61
+ * adjust head2head structure ([523552b](https://github.com/SportsBroker-HQ/firebase-structure/commit/523552b539b79b8f7500af6b24d4291ab48f927d))
62
+
63
+ ## [3.24.0-2](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-1...v3.24.0-2) (2021-04-12)
64
+
65
+
66
+ ### Features
67
+
68
+ * simplify opponent structure ([065a8ab](https://github.com/SportsBroker-HQ/firebase-structure/commit/065a8ab64a26fa5e1c525fb0b9a7f78f8bedcf1a))
69
+
70
+ ## [3.24.0-1](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.24.0-0...v3.24.0-1) (2021-04-09)
71
+
72
+
73
+ ### Features
74
+
75
+ * match lineup adjustment ([bce0810](https://github.com/SportsBroker-HQ/firebase-structure/commit/bce0810ccb5093c9ee464df4409320157c8de481))
76
+
5
77
  ## [3.24.0-0](https://github.com/SportsBroker-HQ/firebase-structure/compare/v3.22.0...v3.24.0-0) (2021-04-09)
6
78
 
7
79
 
@@ -8,6 +8,7 @@ import { Lineups } from "./lineups";
8
8
  import { Referees } from "./referees";
9
9
  import { Stories } from "./stories";
10
10
  import { Commentaries } from "./commentaries";
11
+ import { HeadToHeadStats } from "./h2h";
11
12
 
12
13
  export interface Matches {
13
14
  events: Events;
@@ -16,6 +17,7 @@ export interface Matches {
16
17
  shares: Shares;
17
18
  stats: Stats;
18
19
  teams: Teams;
20
+ h2h?: HeadToHeadStats;
19
21
  lineups?: Lineups;
20
22
  referees?: Referees;
21
23
  stories?: Stories;
@@ -1,4 +1,4 @@
1
- import { NumericID, TeamSide } from "../../global";
1
+ import { NumericID, TeamSide, TeamID } from "../../global";
2
2
 
3
3
  type EventType = "YELLOW_CARD" | "RED_CARD" | "GOAL" | "SUBSTITUTION";
4
4
 
@@ -12,7 +12,7 @@ interface BaseEvent {
12
12
  type: EventType;
13
13
  time: EventTime;
14
14
  teamType: TeamSide;
15
- teamId: NumericID;
15
+ teamId: TeamID;
16
16
  }
17
17
 
18
18
  interface RedCardEvent extends BaseEvent {
@@ -1,14 +1,11 @@
1
- export interface HeadToHeadStats {
1
+ export interface HeadToHeadTeamStats {
2
+ goals: number;
2
3
  wins: number;
3
- homeWins: number;
4
- awayWins: number;
5
- draws: number;
6
4
  }
7
5
 
8
- // h2hId - "<teamAId>_<teamBId>"
9
-
10
- export interface HeadToHead {
11
- [sportId: string]: {
12
- [h2hId: string]: HeadToHeadStats,
13
- }
6
+ export interface HeadToHeadStats {
7
+ stats: {
8
+ [teamId: string]: HeadToHeadTeamStats;
9
+ };
10
+ draws: number;
14
11
  }
@@ -11,8 +11,8 @@ export interface Player {
11
11
 
12
12
  export interface TeamLineup {
13
13
  name: string;
14
- formation: string;
15
- coach: string;
14
+ formation?: string | null;
15
+ coach?: string | null;
16
16
  players: {
17
17
  [playerID: string]: Player;
18
18
  }
@@ -1,8 +1,9 @@
1
1
  export interface Score {
2
- home: number;
3
- away: number;
2
+ home: number | null;
3
+ away: number | null;
4
4
  }
5
5
 
6
+ // @TODO: change to firstHalf, fullTime, overtime
6
7
  export interface MatchPeriods{
7
8
  firstHalf: Score;
8
9
  secondHalf?: Score;
@@ -11,8 +12,8 @@ export interface MatchPeriods{
11
12
  }
12
13
 
13
14
  export interface MatchScore {
14
- home: number;
15
- away: number;
15
+ home: number | null;
16
+ away: number | null;
16
17
  periods: MatchPeriods;
17
18
  shootoutPenalties?: Score;
18
19
  }
@@ -1,6 +1,7 @@
1
1
  import { ISODate, Image, SeasonID } from "../../global";
2
2
 
3
3
  export type SeasonState = 'UPCOMING' | 'ACTIVE' | 'FINISHED';
4
+ export type SeasonType = 'CLUB' | 'INTERNATIONAL';
4
5
 
5
6
  export interface SeasonOverview {
6
7
  endDate: ISODate;
@@ -11,6 +12,8 @@ export interface SeasonOverview {
11
12
  nextSeasonId?: string;
12
13
  state: SeasonState;
13
14
  logo?: Image;
15
+ type: SeasonType;
16
+ countryCode?: string;
14
17
  }
15
18
 
16
19
  /**
@@ -8,9 +8,12 @@ export type NumericID = number;
8
8
  */
9
9
  export type MongoID = string;
10
10
 
11
+
12
+ export type UUID = string;
13
+
11
14
  export type UserID = MongoID;
12
15
 
13
- export type TeamID = MongoID;
16
+ export type TeamID = UUID;
14
17
 
15
18
  /**
16
19
  * @type ISO ISODate
@@ -24,7 +27,7 @@ export type SportID = "soccer" | string;
24
27
 
25
28
  export type Language = "en" | "de" | string;
26
29
 
27
- export type MatchID = MongoID;
30
+ export type MatchID = UUID;
28
31
 
29
32
  export type SeasonID = string;
30
33
 
@@ -8,10 +8,11 @@ export interface Team {
8
8
  }
9
9
 
10
10
  export interface Opponent {
11
- name: string;
12
11
  score: number;
13
- logo: string;
12
+ name: string;
13
+ teamId: string;
14
14
  abbreviation: string;
15
+ logo?: Image;
15
16
  }
16
17
 
17
18
  export interface PreviousMatch {
@@ -1,26 +1,54 @@
1
1
  import { TeamRanking } from "../details/tables/ranking";
2
+ import {Image, MatchResult} from "../global";
3
+ import {Team} from "./matchOverviews";
2
4
 
3
5
  export interface TeamTable {
6
+ name: string;
7
+ abbreviation: string;
8
+ logo: Image;
4
9
  ranking: TeamRanking;
5
10
  previousMatchId?: string;
6
11
  nextMatchId?: string;
12
+ nextMatch?: {
13
+ vsTeam: Team;
14
+ result?: MatchResult;
15
+ matchId?: string;
16
+ startDate: string;
17
+ };
18
+ previousMatch?: {
19
+ vsTeam: Team;
20
+ result?: MatchResult;
21
+ matchId?: string;
22
+ startDate: string;
23
+ }
24
+ }
25
+
26
+ export interface GroupTable {
27
+ name: string;
28
+ matchesIds: string[];
29
+ ranking: {
30
+ [teamID: string]: TeamRanking;
31
+ }
32
+ }
33
+
34
+ export interface SeasonTable {
35
+ groupIds?: string[];
36
+ table: {
37
+ [teamID: string]: TeamTable;
38
+ }
7
39
  }
8
40
 
9
41
  export interface TableSummary {
10
42
  groups: {
11
43
  [sportID: string]: {
12
44
  [seasonID: string]: {
13
- [groupID: string]: {
14
- [teamID: string]: TeamTable;
15
- };
16
- };
17
- };
45
+ [groupId: string]: GroupTable;
46
+ }
47
+ }
18
48
  };
19
49
  leagues: {
20
50
  [sportID: string]: {
21
- [seasonID: string]: {
22
- [teamID: string]: TeamTable;
23
- };
51
+ [seasonID: string]: SeasonTable;
24
52
  };
25
53
  };
26
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.24.0-0",
3
+ "version": "3.24.0-10",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {
@@ -1,13 +0,0 @@
1
- types:
2
- - build
3
- - chore
4
- - ci
5
- - docs
6
- - feat
7
- - fix
8
- - improvement
9
- - perf
10
- - refactor
11
- - revert
12
- - style
13
- - test