@sportsbroker/firebase-structure 9.1.0 → 9.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.
|
@@ -28,8 +28,27 @@ export type Pool = {
|
|
|
28
28
|
payoutStructure: PoolPayoutStructure;
|
|
29
29
|
prizeDistributionStrategy: PrizeDistributionStrategyEnum;
|
|
30
30
|
track?: PoolTrack;
|
|
31
|
+
teamKits?: PoolTeamKits;
|
|
31
32
|
};
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* The shirt to draw for a team taking part in this pool, by team id.
|
|
36
|
+
*
|
|
37
|
+
* A MAP rather than two fields on the embedded fixture, because a pool is not one match. A
|
|
38
|
+
* prediction or score-predictor pool runs over several fixtures and therefore over several teams,
|
|
39
|
+
* and one map answers for two teams as well as for twenty. The ids are the same ones the `Fixtures`
|
|
40
|
+
* documents named under `matchIds`, so a client joins what it already read.
|
|
41
|
+
*
|
|
42
|
+
* It lives on the POOL and not on the fixture because a shirt is one operator's choice: a fixture
|
|
43
|
+
* document is shared by every operator running that match, and could not carry a per-operator
|
|
44
|
+
* answer. The pool is the only document that knows whose it is.
|
|
45
|
+
*
|
|
46
|
+
* Optional at every level, by design. A team with no shirt is absent from the map, a pool whose
|
|
47
|
+
* teams have none carries no map at all, and a client that finds nothing draws what it drew before.
|
|
48
|
+
* Nothing here is a promise that a team has a shirt.
|
|
49
|
+
*/
|
|
50
|
+
export type PoolTeamKits = Record<UUID, string>;
|
|
51
|
+
|
|
33
52
|
export type PoolPayoutStructure = { [position: string]: number };
|
|
34
53
|
|
|
35
54
|
export type PoolTrack = "real" | "demo";
|