@sportsbroker/firebase-structure 3.0.11 → 3.2.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.
- package/models/details/tables/teams.d.ts +7 -5
- package/models/details/users/_index.d.ts +2 -2
- package/models/details/users/status.d.ts +14 -0
- package/models/global.d.ts +1 -1
- package/package.json +1 -1
- package/sportsbroker-firebase-structure-3.2.0.tgz +0 -0
- package/models/details/users/overviews.d.ts +0 -46
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { Image } from "../../global";
|
|
2
2
|
|
|
3
|
+
export interface TableTeam {
|
|
4
|
+
name: string;
|
|
5
|
+
abbreviation: string;
|
|
6
|
+
logo?: Image;
|
|
7
|
+
}
|
|
8
|
+
|
|
3
9
|
export interface Teams {
|
|
4
10
|
[sportID: string]: {
|
|
5
11
|
[seasonID: string]: {
|
|
6
|
-
[teamID: string]:
|
|
7
|
-
name: string;
|
|
8
|
-
abbreviation: string;
|
|
9
|
-
logo?: Image;
|
|
10
|
-
};
|
|
12
|
+
[teamID: string]: TableTeam
|
|
11
13
|
};
|
|
12
14
|
};
|
|
13
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Orders } from "./orders";
|
|
2
|
-
import {
|
|
2
|
+
import { Status } from "./status";
|
|
3
3
|
import { Wallet } from "./wallet";
|
|
4
4
|
import { Watchlist } from "./watchlist";
|
|
5
5
|
import { Notifications } from "./notifications";
|
|
@@ -8,7 +8,7 @@ import { Transactions } from './transactions';
|
|
|
8
8
|
|
|
9
9
|
export interface Users {
|
|
10
10
|
orders: Orders;
|
|
11
|
-
|
|
11
|
+
status: Status;
|
|
12
12
|
wallet: Wallet;
|
|
13
13
|
watchlist: Watchlist;
|
|
14
14
|
notifications: Notifications;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export enum UserStatus {
|
|
2
|
+
CREATED = "CREATED",
|
|
3
|
+
ACTIVATED = "ACTIVATED",
|
|
4
|
+
DEACTIVATED = "DEACTIVATED",
|
|
5
|
+
BANNED = "BANNED",
|
|
6
|
+
SELF_EXCLUDED = "SELF_EXCLUDED",
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* userID: UserID
|
|
11
|
+
*/
|
|
12
|
+
export interface Status {
|
|
13
|
+
[userID: string]: UserStatus;
|
|
14
|
+
}
|
package/models/global.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export type MatchPeriod =
|
|
|
41
41
|
/**
|
|
42
42
|
* PENDING means that match hasn't started yet
|
|
43
43
|
*/
|
|
44
|
-
export type MatchStatus = "PENDING" | "STARTED" | "FINISHED";
|
|
44
|
+
export type MatchStatus = "PENDING" | "STARTED" | "FINISHED" | "POSTPONED";
|
|
45
45
|
|
|
46
46
|
export interface WithSeasons {
|
|
47
47
|
seasons: {
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { UserID } from "../../global";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This stateful structure is required because of asynchronous matter of id verification.
|
|
5
|
-
* The values might change during integration with 3rd party provider.
|
|
6
|
-
*/
|
|
7
|
-
type IDVerification = "SUBMITTED" | "VERIFIED" | "REJECTED";
|
|
8
|
-
|
|
9
|
-
export interface UserStatus {
|
|
10
|
-
emailVerified: boolean;
|
|
11
|
-
idVerification: IDVerification | null;
|
|
12
|
-
phoneVerified: boolean;
|
|
13
|
-
banned: boolean;
|
|
14
|
-
deactivated: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface UserProfile {
|
|
18
|
-
firstName?: string;
|
|
19
|
-
lastName?: string;
|
|
20
|
-
birthdate?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface UserAddress {
|
|
24
|
-
addressLine1?: string;
|
|
25
|
-
addressLine2?: string;
|
|
26
|
-
county?: string;
|
|
27
|
-
city?: string;
|
|
28
|
-
postalCode?: string;
|
|
29
|
-
countryCode: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface User {
|
|
33
|
-
username: string;
|
|
34
|
-
email: string;
|
|
35
|
-
id: UserID;
|
|
36
|
-
status: UserStatus;
|
|
37
|
-
profile?: UserProfile;
|
|
38
|
-
address: UserAddress;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* userID: UserID
|
|
43
|
-
*/
|
|
44
|
-
export interface Overviews {
|
|
45
|
-
[userID: string]: User;
|
|
46
|
-
}
|