@sportsbroker/firebase-structure 9.6.0 → 9.7.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.
@@ -3,7 +3,7 @@ export type { PredictionPowerCardPlay, PredictionPowerCardTarget, PredictionPowe
3
3
  import type { PredictionFamilyEngine } from "../../bet-events";
4
4
  import type { Bet, PendingPrediction, SettledPrediction } from "../../bets/bets.model";
5
5
  import type { UUID } from "../../common";
6
- import type { EventBase, EventQuestion, EventResultsData } from "../../events/events.model";
6
+ import type { EventBase, EventQuestion, EventResultsData, QuestionResultValue } from "../../events/events.model";
7
7
  import type { Pool } from "../../pools/pools.model";
8
8
 
9
9
  /**
@@ -28,6 +28,8 @@ export type Event = EventBase & {
28
28
  resultsData: EventResultsData;
29
29
  /** Omitted on pre-card and card-free event documents. */
30
30
  powerCards?: PredictionPowerCards;
31
+ /** Tiebreaker questions in tiebreak order. Omitted on events without tiebreakers. */
32
+ tiebreakers?: EventQuestion[];
31
33
  };
32
34
 
33
35
  export type PredictionEvent = Event;
@@ -53,4 +55,6 @@ export type PredictionBet = Bet & {
53
55
  predictions: PredictionAnswer[];
54
56
  /** Owner-only, never part of the public event offer. */
55
57
  entryData?: PredictionPowerCardEntryData;
58
+ /** The player's tiebreaker answers, in tiebreak order. `distance` appears when the bet is settled. */
59
+ tiebreakers?: { eventQuestionId: UUID; predictionValue: QuestionResultValue; distance?: number }[];
56
60
  };
@@ -103,5 +103,7 @@ export type PoolLeaderboard = {
103
103
  position: number;
104
104
  score: number;
105
105
  prize: number | null;
106
+ /** Distances to each tiebreaker result, in order. Written only for a settled pool. */
107
+ tiebreak?: number[];
106
108
  }[];
107
109
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportsbroker/firebase-structure",
3
- "version": "9.6.0",
3
+ "version": "9.7.0",
4
4
  "description": "Firebase structure typings",
5
5
  "main": "index.d.ts",
6
6
  "repository": {