@sportsbroker/firebase-structure 3.80.0 → 5.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.
@@ -27,7 +27,7 @@ export type B2BBetEventPoolData = {
27
27
  entryFee: number;
28
28
  currency: string;
29
29
  event: {
30
- gameTypeId: UUID;
30
+ questionSetId: UUID;
31
31
  status: B2BBetEventStatusType;
32
32
  gameKey: GameKeyEnum;
33
33
  startDate?: ISODate;
@@ -1,12 +1,12 @@
1
1
  import type { GameKeyEnum } from "../b2b-bet-events";
2
- import type { GFQuestionResultValue } from "../b2b-gf-events";
2
+ import type { QuestionResultValue } from "../b2b-events";
3
3
  import type { ISODate, UUID } from "../common";
4
4
 
5
5
  export type B2BBet = {
6
6
  id: string;
7
7
  userId: UUID;
8
8
  gameKey: GameKeyEnum;
9
- gameTypeId: UUID;
9
+ questionSetId: UUID;
10
10
  status: BetStatusEnum;
11
11
  betEventId: UUID;
12
12
  predictions: BetPredictionType[];
@@ -23,16 +23,16 @@ export enum BetStatusEnum {
23
23
  LOCKED = "locked",
24
24
  }
25
25
 
26
- export type BetPredictionType = MPPrediction | GFPrediction;
26
+ export type BetPredictionType = MPPrediction | Prediction;
27
27
 
28
28
  export type MPPrediction = {
29
29
  questionKey: MPQuestionKeyEnum;
30
30
  predictionValue: MPQuestionResultTypeValueType[MPQuestionResultTypeEnum];
31
31
  };
32
32
 
33
- export type GFPrediction = {
33
+ export type Prediction = {
34
34
  eventQuestionId: UUID;
35
- predictionValue: GFQuestionResultValue;
35
+ predictionValue: QuestionResultValue;
36
36
  };
37
37
 
38
38
  export enum MPQuestionKeyEnum {
@@ -0,0 +1 @@
1
+ export * from "./b2b-events.model";
@@ -5,29 +5,25 @@ import type {
5
5
  } from "../b2b-bet-events";
6
6
  import type { ISODate, UUID } from "../common";
7
7
 
8
- export type B2BGFEvent = {
8
+ export type B2BEvent = {
9
9
  id: UUID;
10
10
  startDate: ISODate;
11
11
  status: B2BBetEventStatusType;
12
12
  bettingStatus: B2BBetEventBettingStatusType;
13
13
  gameKey: GameKeyEnum;
14
- gameTypeId: UUID;
14
+ questionSetId: UUID;
15
15
  name: string;
16
- entryFeeAmount: number;
17
- commissionPercent: number;
18
- prizeDistributionStrategy: GFPrizeDistributionStrategyEnum;
19
- seedValue: number;
20
- questions: GFEventQuestion[];
21
- resultsData: GFEventResultsData;
16
+ questions: EventQuestion[];
17
+ resultsData: EventResultsData;
22
18
  resultsUpdateReason: string | null;
23
19
  createdAt: ISODate;
24
20
  updatedAt: ISODate;
25
21
  matchIds?: UUID[];
26
22
  };
27
23
 
28
- export type GFEventQuestion = {
24
+ export type EventQuestion = {
29
25
  eventQuestionId: UUID;
30
- questionType: GFQuestionTypeEnum;
26
+ questionType: QuestionTypeEnum;
31
27
  text: string;
32
28
  matchId: UUID;
33
29
  gameTypeQuestionId?: UUID;
@@ -36,40 +32,40 @@ export type GFEventQuestion = {
36
32
  helperText?: string;
37
33
  label: string;
38
34
  sport: string;
39
- inGameEventKey: GFInGameEventKey;
35
+ inGameEventKey: InGameEventKey;
40
36
  pointsForExactHit: number;
41
37
  pointsForCorrectResult: number;
42
38
  pointsForWrongAnswer: number;
43
39
  };
44
40
 
45
- export type GFEventResultsData = {
46
- [eventQuestionId: UUID]: GFEventResultData;
41
+ export type EventResultsData = {
42
+ [eventQuestionId: UUID]: EventResultData;
47
43
  } | null;
48
44
 
49
- export type GFEventResultData = {
45
+ export type EventResultData = {
50
46
  matchId: UUID;
51
47
  isMatchFinished?: boolean;
52
48
  result: {
53
49
  isFinal: boolean;
54
- value: GFQuestionResultValue;
50
+ value: QuestionResultValue;
55
51
  };
56
52
  };
57
53
 
58
- export type GFOccurrenceCountForSides = {
54
+ export type OccurrenceCountForSides = {
59
55
  home: number;
60
56
  away: number;
61
57
  };
62
58
 
63
- export type GFQuestionResultValue = string | number | boolean | GFOccurrenceCountForSides;
59
+ export type QuestionResultValue = string | number | boolean | OccurrenceCountForSides;
64
60
 
65
- export enum GFQuestionTypeEnum {
61
+ export enum QuestionTypeEnum {
66
62
  OCCURRENCE_COUNT_FOR_SIDES = "occurrence-count-for-sides",
67
63
  MOST_OCCURRENCE_RESULT = "most-occurrence-result",
68
64
  TOTAL_OCCURRENCE_COUNT = "total-occurrence-count",
69
65
  OCCURRED_OR_NOT = "occurred-or-not",
70
66
  }
71
67
 
72
- export enum GFInGameEventKey {
68
+ export enum InGameEventKey {
73
69
  SCORE = "score",
74
70
  GOAL = "goal",
75
71
  CORNERS = "corners",
@@ -96,7 +92,7 @@ export enum GFInGameEventKey {
96
92
  SAVES_TOTAL = "saves_total",
97
93
  }
98
94
 
99
- export enum GFPrizeDistributionStrategyEnum {
95
+ export enum PrizeDistributionStrategyEnum {
100
96
  WINNER_TAKES_ALL = "winner-takes-all",
101
97
  TOP_3 = "top-3",
102
98
  }
@@ -0,0 +1 @@
1
+ export * from "./b2b-events.model";
@@ -1,7 +1,7 @@
1
1
  import type { B2BBetEventPoolData } from "../b2b-bet-events";
2
2
  import type { ISODate, UUID } from "../common";
3
3
 
4
- export type B2BGFPool = B2BBetEventPoolData & {
4
+ export type B2BPool = B2BBetEventPoolData & {
5
5
  betEventId: UUID;
6
6
  organizationId: UUID;
7
7
  createdAt: ISODate;
@@ -0,0 +1 @@
1
+ export * from "./b2b-pools.model";
@@ -0,0 +1 @@
1
+ export * from "./b2b-question-sets.model";
@@ -1,31 +1,31 @@
1
1
  import type { ISODate, UUID } from "../common";
2
- import type { GFInGameEventKey, GFQuestionTypeEnum } from "../b2b-gf-events";
2
+ import type { InGameEventKey, QuestionTypeEnum } from "../b2b-events";
3
3
 
4
- export type B2BGFGameTemplate = {
4
+ export type B2BQuestionSet = {
5
5
  id: UUID;
6
6
  displayName: string;
7
- questionsTemplates: B2BGFQuestionTemplate[];
7
+ questions: B2BQuestionTemplate[];
8
8
  rules: string;
9
- status: B2BGFGameTemplateStatusEnum;
9
+ status: B2BQuestionSetStatusEnum;
10
10
  createdAt: ISODate;
11
11
  updatedAt: ISODate;
12
12
  };
13
13
 
14
- export type B2BGFQuestionTemplate = {
14
+ export type B2BQuestionTemplate = {
15
15
  id: UUID;
16
16
  providerKey: string;
17
17
  displayOrder: number;
18
18
  helperText?: string;
19
19
  label: string;
20
20
  sport: string;
21
- inGameEventKey: GFInGameEventKey;
22
- type: GFQuestionTypeEnum;
21
+ inGameEventKey: InGameEventKey;
22
+ type: QuestionTypeEnum;
23
23
  pointsForExactHit: number;
24
24
  pointsForCorrectResult: number;
25
25
  pointsForWrongAnswer: number;
26
26
  };
27
27
 
28
- export enum B2BGFGameTemplateStatusEnum {
28
+ export enum B2BQuestionSetStatusEnum {
29
29
  DRAFT = "draft",
30
30
  PUBLISHED = "published",
31
31
  ARCHIVED = "archived",
@@ -0,0 +1 @@
1
+ export * from "./b2b-question-sets.model";
@@ -1,3 +1,3 @@
1
1
  export * from "./common";
2
2
  export * from "./user-status";
3
- export * from "./b2b-gf-pools";
3
+ export * from "./b2b-pools";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "3.80.0",
3
+ "version": "5.0.0",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- export * from "./b2b-gf-events.model";
@@ -1 +0,0 @@
1
- export * from "./b2b-gf-events.model";
@@ -1 +0,0 @@
1
- export * from "./b2b-gf-game-templates.model";
@@ -1 +0,0 @@
1
- export * from "./b2b-gf-game-templates.model";
@@ -1 +0,0 @@
1
- export * from "./b2b-gf-pools.model";