@sportsbroker/firebase-structure 3.20.0-RC1 → 3.20.0-RC3

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.
@@ -1,4 +1,4 @@
1
- import { PlayerID, TeamID, TeamSide } from "../../global";
1
+ import {NumericID, TeamSide} from "../../global";
2
2
 
3
3
  type EventType = "YELLOW_CARD" | "RED_CARD" | "GOAL" | "SUBSTITUTION";
4
4
 
@@ -12,43 +12,43 @@ interface BaseEvent {
12
12
  type: EventType;
13
13
  time: EventTime;
14
14
  teamType: TeamSide;
15
- teamId: TeamID;
15
+ teamId: NumericID;
16
16
  }
17
17
 
18
18
  interface RedCardEvent extends BaseEvent {
19
19
  type: "RED_CARD";
20
20
  isSecondYellow?: boolean;
21
- playerId?: PlayerID;
21
+ playerId: NumericID;
22
22
  playerName: string;
23
23
  playerUniform: string;
24
24
  }
25
25
 
26
26
  interface YellowCardEvent extends BaseEvent {
27
27
  type: "YELLOW_CARD";
28
- playerId?: PlayerID;
28
+ playerId: NumericID;
29
29
  playerName: string;
30
30
  playerUniform: string;
31
31
  }
32
32
 
33
33
  interface GoalEvent extends BaseEvent {
34
34
  type: "GOAL";
35
- assistingPlayerId?: PlayerID;
36
- assistingPlayerName: string;
37
- assistingPlayerUniform: string;
35
+ assistingPlayerId?: NumericID;
36
+ assistingPlayerName?: string;
37
+ assistingPlayerUniform?: string;
38
38
  goalNumber: number;
39
39
  penalty?: boolean;
40
40
  ownGoal?: boolean;
41
- playerId?: PlayerID;
41
+ playerId: NumericID;
42
42
  playerName: string;
43
43
  playerUniform: string;
44
44
  }
45
45
 
46
46
  interface SubstitutionEvent extends BaseEvent {
47
47
  type: "SUBSTITUTION";
48
- playerInId?: PlayerID;
48
+ playerInId: NumericID;
49
49
  playerInName: string;
50
50
  playerInUniform: string;
51
- playerOutId?: PlayerID;
51
+ playerOutId: NumericID;
52
52
  playerOutName: string;
53
53
  playerOutUniform: string;
54
54
  }
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Numeric ID (e.g. from stats.com API)
3
+ */
4
+ export type NumericID = number;
5
+
1
6
  /**
2
7
  * 24-char ID
3
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.20.0-RC1",
3
+ "version": "3.20.0-RC3",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {