@sportsbroker/firebase-structure 6.3.0 → 7.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.
- package/firestore/bet-events/bet-events.model.ts +0 -2
- package/firestore/bets/bets.model.ts +11 -2
- package/firestore/common.d.ts +0 -2
- package/firestore/events/events.model.ts +0 -2
- package/firestore/fixtures/fixtures.model.ts +0 -2
- package/firestore/leaderboard/leaderboard.d.ts +1 -3
- package/firestore/pools/pools.model.ts +0 -2
- package/firestore/question-sets/question-sets.model.ts +1 -3
- package/firestore/score-predictor/score-predictor.d.ts +0 -2
- package/models/details/users/notifications.d.ts +0 -4
- package/models/details/users/orders.d.ts +0 -2
- package/models/details/users/transactions.d.ts +0 -2
- package/models/queries/orders.d.ts +0 -2
- package/package.json +1 -1
|
@@ -18,8 +18,11 @@ export type Bet = {
|
|
|
18
18
|
* before this field existed omit it and MUST be treated as `"real"`. New projections always set it.
|
|
19
19
|
*/
|
|
20
20
|
track?: PoolTrack;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
/**
|
|
22
|
+
* When the user placed this bet. Replaces the removed `createdAt`/`updatedAt` pair:
|
|
23
|
+
* bets are immutable once placed, so a single placement timestamp is enough.
|
|
24
|
+
*/
|
|
25
|
+
betPlaceDate: ISODate;
|
|
23
26
|
};
|
|
24
27
|
|
|
25
28
|
export enum BetStatusEnum {
|
|
@@ -36,6 +39,12 @@ export type BetPredictionType = Prediction;
|
|
|
36
39
|
export type Prediction = {
|
|
37
40
|
eventQuestionId: UUID;
|
|
38
41
|
predictionValue: QuestionResultValue;
|
|
42
|
+
/**
|
|
43
|
+
* Whether this answer was correct, set only once the bet is settled (won/lost).
|
|
44
|
+
* Absent = pending: no final result yet, or a document projected before this field
|
|
45
|
+
* existed. Consumers MUST treat absent as pending, never as "wrong".
|
|
46
|
+
*/
|
|
47
|
+
correct?: boolean;
|
|
39
48
|
};
|
|
40
49
|
|
|
41
50
|
export enum MatchSideResultEnum {
|
package/firestore/common.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Doc,
|
|
1
|
+
import { Doc, UUID } from "../common";
|
|
2
2
|
|
|
3
3
|
export type LeaderboardDoc = Leaderboard & Doc;
|
|
4
4
|
|
|
@@ -7,8 +7,6 @@ export type Leaderboard = {
|
|
|
7
7
|
betEventId: UUID;
|
|
8
8
|
poolId: UUID;
|
|
9
9
|
entries: LeaderboardEntry[];
|
|
10
|
-
createdAt: ISODate;
|
|
11
|
-
updatedAt: ISODate;
|
|
12
10
|
};
|
|
13
11
|
|
|
14
12
|
export type LeaderboardEntry = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UUID } from "../common";
|
|
2
2
|
import type { InGameEventKey, QuestionTypeEnum } from "../events";
|
|
3
3
|
|
|
4
4
|
export type QuestionSet = {
|
|
@@ -7,8 +7,6 @@ export type QuestionSet = {
|
|
|
7
7
|
questions: QuestionTemplate[];
|
|
8
8
|
rules: string;
|
|
9
9
|
status: QuestionSetStatusEnum;
|
|
10
|
-
createdAt: ISODate;
|
|
11
|
-
updatedAt: ISODate;
|
|
12
10
|
};
|
|
13
11
|
|
|
14
12
|
export type QuestionTemplate = {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ISODate } from "../../global";
|
|
2
|
-
|
|
3
1
|
export type NotificationID = string;
|
|
4
2
|
|
|
5
3
|
export type OrderType = "MARKET" | "LIMIT";
|
|
@@ -102,8 +100,6 @@ export interface Notification<T extends NotificationType> {
|
|
|
102
100
|
description?: string;
|
|
103
101
|
variables?: VariablesMap[T];
|
|
104
102
|
shown: boolean;
|
|
105
|
-
createdAt: ISODate;
|
|
106
|
-
updatedAt: ISODate;
|
|
107
103
|
id: NotificationID;
|
|
108
104
|
}
|
|
109
105
|
|
|
@@ -25,7 +25,6 @@ export interface Order {
|
|
|
25
25
|
action: OrderActionType;
|
|
26
26
|
allOrNothing: boolean;
|
|
27
27
|
amount: number;
|
|
28
|
-
createdAt: ISODate;
|
|
29
28
|
executedAt?: ISODate;
|
|
30
29
|
limit?: number;
|
|
31
30
|
processedAmount: number;
|
|
@@ -35,7 +34,6 @@ export interface Order {
|
|
|
35
34
|
teamId: TeamID;
|
|
36
35
|
transactionFee: Percentage;
|
|
37
36
|
type: OrderTransactionType;
|
|
38
|
-
updatedAt: ISODate;
|
|
39
37
|
status: OrderStatus;
|
|
40
38
|
id: OrderID;
|
|
41
39
|
totalPrice: number;
|
|
@@ -13,8 +13,6 @@ export type TransactionPaymentMethod = 'SKRILL' | 'SPORTSBROKER' | 'PAY360';
|
|
|
13
13
|
export type TransactionStatus = "PREPARED" | "PENDING" | "SUCCEED" | "FAILED" | "CANCELLED" | "IN_REVIEW";
|
|
14
14
|
|
|
15
15
|
export interface Transaction {
|
|
16
|
-
createdAt: ISODate;
|
|
17
|
-
updatedAt: ISODate;
|
|
18
16
|
executedAt?: ISODate;
|
|
19
17
|
id: TransactionID,
|
|
20
18
|
status: TransactionStatus;
|