@sportsbroker/firebase-structure 5.3.0 → 5.4.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.d.ts +1 -0
- package/firestore/{b2b-bet-events/b2b-bet-events.model.ts → bet-events/bet-events.model.ts} +14 -14
- package/firestore/bet-events/index.ts +1 -0
- package/firestore/bets/bets.d.ts +1 -0
- package/firestore/{b2b-bets/b2b-bets.model.ts → bets/bets.model.ts} +3 -3
- package/firestore/bets/index.ts +1 -0
- package/firestore/events/events.d.ts +1 -0
- package/firestore/{b2b-events/b2b-events.model.ts → events/events.model.ts} +6 -6
- package/firestore/events/index.ts +1 -0
- package/firestore/fixtures/fixtures.d.ts +1 -0
- package/firestore/{b2b-matches/b2b-match.model.ts → fixtures/fixtures.model.ts} +7 -7
- package/firestore/fixtures/index.ts +1 -0
- package/firestore/index.d.ts +1 -1
- package/firestore/pools/index.ts +1 -0
- package/firestore/{b2b-pools/b2b-pools.model.ts → pools/pools.model.ts} +7 -7
- package/firestore/question-sets/index.ts +2 -0
- package/firestore/question-sets/question-sets.d.ts +1 -0
- package/firestore/{b2b-question-sets/b2b-question-sets.model.ts → question-sets/question-sets.model.ts} +6 -6
- package/firestore/question-sets/question.d.ts +1 -0
- package/package.json +1 -1
- package/firestore/b2b-bet-events/b2b-bet-events.d.ts +0 -1
- package/firestore/b2b-bet-events/index.ts +0 -1
- package/firestore/b2b-bets/b2b-bets.d.ts +0 -1
- package/firestore/b2b-bets/index.ts +0 -1
- package/firestore/b2b-events/b2b-events.d.ts +0 -1
- package/firestore/b2b-events/index.ts +0 -1
- package/firestore/b2b-matches/b2b-match.d.ts +0 -1
- package/firestore/b2b-matches/index.ts +0 -1
- package/firestore/b2b-pools/index.ts +0 -1
- package/firestore/b2b-question-sets/b2b-question-sets.d.ts +0 -1
- package/firestore/b2b-question-sets/b2b-question.d.ts +0 -1
- package/firestore/b2b-question-sets/index.ts +0 -2
- /package/firestore/{b2b-question-sets/b2b-question.model.ts → question-sets/question.model.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./bet-events.model";
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Question } from "../
|
|
1
|
+
import { Pool } from "../pools";
|
|
2
|
+
import { Question } from "../question-sets";
|
|
3
3
|
import type { ISODate, UUID } from "../common";
|
|
4
4
|
|
|
5
|
-
export type
|
|
5
|
+
export type BetEvent = {
|
|
6
6
|
id: string;
|
|
7
7
|
startDate: ISODate;
|
|
8
|
-
status:
|
|
9
|
-
bettingStatus:
|
|
8
|
+
status: BetEventStatusType;
|
|
9
|
+
bettingStatus: BetEventBettingStatusType;
|
|
10
10
|
engine: GameEngineEnum;
|
|
11
|
-
gameSpecificData:
|
|
11
|
+
gameSpecificData: EventGameSpecificData;
|
|
12
12
|
resultsData: ResultsData;
|
|
13
|
-
poolData:
|
|
13
|
+
poolData: Pool;
|
|
14
14
|
createdAt: ISODate;
|
|
15
15
|
updatedAt: ISODate;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export type ResultsData =
|
|
18
|
+
export type ResultsData = EventResultsData;
|
|
19
19
|
|
|
20
20
|
export enum GameEngineEnum {
|
|
21
21
|
MATCH_PREDICTOR = "match-predictor",
|
|
22
22
|
EDGE = "edge"
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export type
|
|
25
|
+
export type BetEventBettingStatusType = "locked" | "unlocked" | "settled";
|
|
26
26
|
|
|
27
|
-
export type
|
|
27
|
+
export type BetEventStatusType =
|
|
28
28
|
| "pending" // before we start display event ald at this time betting is locked
|
|
29
29
|
| "open" // now we can place bets on event but match did not start yet
|
|
30
30
|
| "event-in-progress" // match already started betting is locked again
|
|
@@ -33,13 +33,13 @@ export type B2BBetEventStatusType =
|
|
|
33
33
|
| "finished" // event is finished and settled
|
|
34
34
|
| "cancelled"; // event is cancelled
|
|
35
35
|
|
|
36
|
-
export type
|
|
36
|
+
export type EventGameSpecificData = {
|
|
37
37
|
matchId: UUID;
|
|
38
38
|
questions: Question[];
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export type
|
|
42
|
-
[questionKey: QuestionKey]:
|
|
41
|
+
export type EventResultsData = {
|
|
42
|
+
[questionKey: QuestionKey]: EventResultData;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export type QuestionKey = `${QuestionKeyEnum}` | string;
|
|
@@ -58,7 +58,7 @@ export enum QuestionKeyEnum {
|
|
|
58
58
|
CORNERS_10_OR_MORE = "corners-10-or-more",
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export type
|
|
61
|
+
export type EventResultData = Question & {
|
|
62
62
|
result: {
|
|
63
63
|
isFinal: boolean;
|
|
64
64
|
value: QuestionResultTypeValueType[QuestionResultTypeEnum];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./bet-events.model";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./bets.model";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GameEngineEnum } from "../
|
|
2
|
-
import type { QuestionResultValue } from "../
|
|
1
|
+
import type { GameEngineEnum } from "../bet-events";
|
|
2
|
+
import type { QuestionResultValue } from "../events";
|
|
3
3
|
import type { ISODate, UUID } from "../common";
|
|
4
4
|
|
|
5
|
-
export type
|
|
5
|
+
export type Bet = {
|
|
6
6
|
id: string;
|
|
7
7
|
userId: UUID;
|
|
8
8
|
engine: GameEngineEnum;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./bets.model";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./events.model";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
BetEventBettingStatusType,
|
|
3
|
+
BetEventStatusType,
|
|
4
4
|
GameEngineEnum,
|
|
5
|
-
} from "../
|
|
5
|
+
} from "../bet-events";
|
|
6
6
|
import type { ISODate, UUID } from "../common";
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type Event = {
|
|
9
9
|
id: UUID;
|
|
10
10
|
startDate: ISODate;
|
|
11
|
-
status:
|
|
12
|
-
bettingStatus:
|
|
11
|
+
status: BetEventStatusType;
|
|
12
|
+
bettingStatus: BetEventBettingStatusType;
|
|
13
13
|
engine: GameEngineEnum;
|
|
14
14
|
questionSetId: UUID;
|
|
15
15
|
name: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./events.model";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./fixtures.model";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ISODate, UUID } from "../common";
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type Fixture = {
|
|
4
4
|
id: UUID;
|
|
5
5
|
startDate: ISODate;
|
|
6
6
|
homeTeam: MatchTeam;
|
|
7
7
|
awayTeam: MatchTeam;
|
|
8
|
-
status:
|
|
8
|
+
status: FixtureStatus;
|
|
9
9
|
createdAt: ISODate;
|
|
10
10
|
updatedAt: ISODate;
|
|
11
11
|
};
|
|
@@ -17,17 +17,17 @@ export type MatchTeam = {
|
|
|
17
17
|
score: number;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export type
|
|
21
|
-
matchStatus:
|
|
20
|
+
export type FixtureStatus = {
|
|
21
|
+
matchStatus: FixtureStatusType;
|
|
22
22
|
isActive: boolean;
|
|
23
|
-
period:
|
|
23
|
+
period: FixturePeriod;
|
|
24
24
|
periodId: number;
|
|
25
25
|
minutes: number;
|
|
26
26
|
additionalMinutes: number;
|
|
27
27
|
fullTimeFinished: boolean;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
export type
|
|
30
|
+
export type FixturePeriod =
|
|
31
31
|
| "PRE_MATCH"
|
|
32
32
|
| "FIRST_HALF"
|
|
33
33
|
| "SECOND_HALF"
|
|
@@ -35,7 +35,7 @@ export type B2BMatchPeriod =
|
|
|
35
35
|
| "SECOND_OVERTIME_HALF"
|
|
36
36
|
| "SHOOTOUT";
|
|
37
37
|
|
|
38
|
-
export type
|
|
38
|
+
export type FixtureStatusType =
|
|
39
39
|
| "finished"
|
|
40
40
|
| "preMatch"
|
|
41
41
|
| "live"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./fixtures.model";
|
package/firestore/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./pools.model";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BetEventStatusType, GameEngineEnum } from "../bet-events";
|
|
2
2
|
import type { ISODate, UUID } from "../common";
|
|
3
3
|
|
|
4
4
|
export type PoolPayoutStructure = { [position: string]: number };
|
|
@@ -9,9 +9,9 @@ export enum PrizeDistributionStrategyEnum {
|
|
|
9
9
|
TOP_5 = "top-5",
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export type
|
|
12
|
+
export type PoolEvent = {
|
|
13
13
|
questionSetId: UUID;
|
|
14
|
-
status:
|
|
14
|
+
status: BetEventStatusType;
|
|
15
15
|
engine: GameEngineEnum;
|
|
16
16
|
startDate?: ISODate;
|
|
17
17
|
matchIds?: UUID[];
|
|
@@ -19,7 +19,7 @@ export type B2BPoolEvent = {
|
|
|
19
19
|
countryCodes?: string[];
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export type
|
|
22
|
+
export type PoolLeaderboard = {
|
|
23
23
|
entries: {
|
|
24
24
|
userId: UUID;
|
|
25
25
|
displayName: string;
|
|
@@ -29,7 +29,7 @@ export type B2BPoolLeaderboard = {
|
|
|
29
29
|
}[];
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export type
|
|
32
|
+
export type Pool = {
|
|
33
33
|
id: UUID;
|
|
34
34
|
betEventId: UUID;
|
|
35
35
|
operatorId: UUID;
|
|
@@ -38,8 +38,8 @@ export type B2BPool = {
|
|
|
38
38
|
participants: number; // active bets count
|
|
39
39
|
entryFee: number;
|
|
40
40
|
currency: string;
|
|
41
|
-
event:
|
|
42
|
-
leaderboard:
|
|
41
|
+
event: PoolEvent;
|
|
42
|
+
leaderboard: PoolLeaderboard;
|
|
43
43
|
payoutStructure: PoolPayoutStructure;
|
|
44
44
|
prizeDistributionStrategy: PrizeDistributionStrategyEnum;
|
|
45
45
|
createdAt: ISODate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./question-sets.model";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { ISODate, UUID } from "../common";
|
|
2
|
-
import type { InGameEventKey, QuestionTypeEnum } from "../
|
|
2
|
+
import type { InGameEventKey, QuestionTypeEnum } from "../events";
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type QuestionSet = {
|
|
5
5
|
id: UUID;
|
|
6
6
|
displayName: string;
|
|
7
|
-
questions:
|
|
7
|
+
questions: QuestionTemplate[];
|
|
8
8
|
rules: string;
|
|
9
|
-
status:
|
|
9
|
+
status: QuestionSetStatusEnum;
|
|
10
10
|
createdAt: ISODate;
|
|
11
11
|
updatedAt: ISODate;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
export type
|
|
14
|
+
export type QuestionTemplate = {
|
|
15
15
|
id: UUID;
|
|
16
16
|
providerKey: string;
|
|
17
17
|
displayOrder: number;
|
|
@@ -25,7 +25,7 @@ export type B2BQuestionTemplate = {
|
|
|
25
25
|
pointsForWrongAnswer: number;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
export enum
|
|
28
|
+
export enum QuestionSetStatusEnum {
|
|
29
29
|
DRAFT = "draft",
|
|
30
30
|
PUBLISHED = "published",
|
|
31
31
|
ARCHIVED = "archived",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./question.model";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-bet-events.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-bet-events.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-bets.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-bets.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-events.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-events.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-match.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-match.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-pools.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-question-sets.model";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./b2b-question.model";
|
/package/firestore/{b2b-question-sets/b2b-question.model.ts → question-sets/question.model.ts}
RENAMED
|
File without changes
|