@sportsbroker/firebase-structure 3.3.1 → 3.3.4

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/.editorconfig ADDED
@@ -0,0 +1,16 @@
1
+ # Editor configuration, see https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ indent_size = 2
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.md]
12
+ max_line_length = off
13
+ trim_trailing_whitespace = false
14
+
15
+ [{Makefile,**.mk}]
16
+ indent_style = tab
@@ -10,7 +10,8 @@ export type StatsType =
10
10
  | "tackles"
11
11
  | "touches"
12
12
  | "yellowCards"
13
- | "redCards";
13
+ | "redCards"
14
+ | "foulsConceded";
14
15
 
15
16
  interface TeamsStats {
16
17
  home: number;
@@ -1,6 +1,6 @@
1
1
  import { TeamID } from "../../global";
2
2
 
3
- export type TradingInactiveReason = "SPLIT_IN_PROGRESS" | "NONE";
3
+ export type TradingInactiveReason = "SPLIT_IN_PROGRESS" | "NONE" | "MANUAL";
4
4
 
5
5
  export interface MarketIndicators {
6
6
  dailyHigh: number;
@@ -1,5 +1,4 @@
1
- import { SportID } from "../../global";
2
- import { OwnedSharesSplit } from "./ownedSharesSplit";
1
+ import {ISODate, MatchID, SportID, TeamType} from "../../global";
3
2
 
4
3
  export interface UserOwnedShares {
5
4
  sportId: SportID;
@@ -13,7 +12,7 @@ export interface UserOwnedShares {
13
12
 
14
13
  /**
15
14
  * teamID: TeamID
16
- * userID: userID
15
+ * userID: UserID
17
16
  */
18
17
  export interface OwnedShares {
19
18
  [userID: string]: {
@@ -22,5 +21,14 @@ export interface OwnedShares {
22
21
  }
23
22
 
24
23
  export interface OwnedSharesSplits {
25
- [matchId: string]: OwnedSharesSplit
24
+ [matchId: string]: OwnedSharesSplit;
25
+ }
26
+
27
+ export interface OwnedSharesSplit {
28
+ matchId: MatchID;
29
+ teamType: TeamType;
30
+ date: ISODate;
31
+ sharesAmountAfterSplit: number;
32
+ sharesAmountDiff: number;
33
+ profit: number;
26
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.3.1",
3
+ "version": "3.3.4",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {
@@ -1,21 +0,0 @@
1
- originalStartDate renamed to startDate and startDate renamed to realStartDate, because sheduled date is main date which is used, and making it's name with some kind of prefix makes it easier to use it wrongly
2
- Email added to user overview
3
-
4
- users, moved to details node and renamed to users->overviews
5
- Users watchlist removed from user item and created separate list for that
6
- usersOrders, userShares, userWallet and rank moved to users
7
-
8
- Matches restructured in matches node into overviews, teams, shares, scores, venueOverviews + moved there lineups, commentaries, events, photos and stats
9
-
10
- countries, leagues, seasons, teams, venues moved to details node and restructured to keep same data structure
11
- teamShares, moved to activeTeams
12
-
13
- participants completly removed as they need to be built from scratch once we'll know what we need
14
-
15
- teamMatches, teamOpponentMatches and seasonMatches moved to queries,
16
-
17
- matchOverviews moved to snapshots
18
-
19
- shareValueEvents completly removed as it's now counted on backend
20
-
21
- name added to shares in "teams" and ownedShares to allow alphabetic sorting
@@ -1,9 +0,0 @@
1
- import { MatchID, ISODate } from "../../global";
2
-
3
- export interface OwnedSharesSplit {
4
- matchId: MatchID;
5
- date: ISODate;
6
- sharesAmountAfterSplit: number;
7
- sharesAmountDiff: number;
8
- profit: number;
9
- }