shufflecom-calculations 4.1.3 → 4.1.5
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/lib/lottery/lottery.d.ts +1 -1
- package/lib/lottery/lottery.js +1 -1
- package/lib/sports/sports-search.types.d.ts +49 -0
- package/lib/sports/sports-search.types.js +25 -0
- package/lib/sports/sports-search.types.js.map +1 -0
- package/lib/sports/sports-selection.types.d.ts +2 -1
- package/lib/sports/sports.types.d.ts +6 -0
- package/lib/sports/sports.types.js +5 -2
- package/lib/sports/sports.types.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/lottery/lottery.ts +1 -1
- package/src/sports/sports-search.types.ts +56 -0
- package/src/sports/sports-selection.types.ts +13 -6
- package/src/sports/sports.types.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shufflecom-calculations",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
},
|
|
15
15
|
"author": "",
|
|
16
16
|
"license": "ISC",
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "4811124d7088a5ca5691639618609da98b10f98d"
|
|
18
18
|
}
|
package/src/lottery/lottery.ts
CHANGED
|
@@ -17,7 +17,7 @@ export const LOTTERY_VERSION_RECORD: Record<LotteryVersion, LotteryConfig> = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export class Lottery {
|
|
20
|
-
static readonly version = LotteryVersion.
|
|
20
|
+
static readonly version = LotteryVersion.V1;
|
|
21
21
|
|
|
22
22
|
static getConfig(version: LotteryVersion): LotteryConfig {
|
|
23
23
|
return LOTTERY_VERSION_RECORD[version];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { MatchStatusParts, Sports, SportsFixtureStatus } from './sports.types';
|
|
2
|
+
|
|
3
|
+
export class SportsSearchPage<T> {
|
|
4
|
+
totalCount: number;
|
|
5
|
+
nodes: T[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class SportsSearchSportInfo {
|
|
9
|
+
sports: Sports;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class SportsSearchCategoryInfo {
|
|
13
|
+
name: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
countryCode: string | null;
|
|
16
|
+
sports: Sports;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class SportsSearchCompetitionInfo {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
slug: string;
|
|
23
|
+
iconPath: string | null;
|
|
24
|
+
category: SportsSearchCategoryInfo;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class SportsSearchMatchStateInfo {
|
|
28
|
+
matchSummary: {
|
|
29
|
+
matchStatusDisplay: MatchStatusParts[] | null;
|
|
30
|
+
currentRound?: string | null;
|
|
31
|
+
timeElapsed?: number | null;
|
|
32
|
+
providerMessageTimestamp?: string | null;
|
|
33
|
+
timeRemaining?: number | null;
|
|
34
|
+
stoppageTime?: number | null;
|
|
35
|
+
stoppageTimeAnnounced?: number | null;
|
|
36
|
+
clockRunning?: boolean | null;
|
|
37
|
+
} | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class SportsSearchFixtureInfo {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
slug: string;
|
|
44
|
+
startTime: string;
|
|
45
|
+
status: SportsFixtureStatus;
|
|
46
|
+
inPlayAllowed: boolean | null;
|
|
47
|
+
matchState: SportsSearchMatchStateInfo | null;
|
|
48
|
+
competition: SportsSearchCompetitionInfo;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export class SportsSearchResultInfo {
|
|
52
|
+
sports: SportsSearchSportInfo[];
|
|
53
|
+
categories: SportsSearchPage<SportsSearchCategoryInfo>;
|
|
54
|
+
competitions: SportsSearchPage<SportsSearchCompetitionInfo>;
|
|
55
|
+
fixtures: SportsSearchPage<SportsSearchFixtureInfo>;
|
|
56
|
+
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
SportsMarketProductId,
|
|
3
|
+
SportsMarketProvider,
|
|
4
|
+
SportsMarketSelectionOddsBoost,
|
|
5
|
+
SportsMarketSelectionStatus,
|
|
6
|
+
SportsMarketStatus,
|
|
7
|
+
} from './sports.types';
|
|
2
8
|
|
|
3
9
|
export type SportsMarketSelectionType = {
|
|
4
10
|
id: string;
|
|
@@ -6,6 +12,7 @@ export type SportsMarketSelectionType = {
|
|
|
6
12
|
status: SportsMarketSelectionStatus;
|
|
7
13
|
oddsNumerator: string;
|
|
8
14
|
oddsDenominator: string;
|
|
15
|
+
boost: SportsMarketSelectionOddsBoost | null;
|
|
9
16
|
market: {
|
|
10
17
|
id: string;
|
|
11
18
|
fullName: string | null;
|
|
@@ -13,24 +20,24 @@ export type SportsMarketSelectionType = {
|
|
|
13
20
|
status: SportsMarketStatus;
|
|
14
21
|
inPlay: boolean;
|
|
15
22
|
productId: SportsMarketProductId;
|
|
16
|
-
}
|
|
23
|
+
};
|
|
17
24
|
fixture: {
|
|
18
25
|
id: string;
|
|
19
26
|
slug: string;
|
|
20
27
|
name: string;
|
|
21
28
|
isOutrightLike: boolean;
|
|
22
29
|
shortName: string;
|
|
23
|
-
}
|
|
30
|
+
};
|
|
24
31
|
competition: {
|
|
25
32
|
id: string;
|
|
26
33
|
slug: string;
|
|
27
34
|
name: string;
|
|
28
|
-
}
|
|
35
|
+
};
|
|
29
36
|
category: {
|
|
30
37
|
id: string;
|
|
31
38
|
slug: string;
|
|
32
39
|
name: string;
|
|
33
40
|
sports: string;
|
|
34
|
-
}
|
|
41
|
+
};
|
|
35
42
|
provider: SportsMarketProvider;
|
|
36
|
-
}
|
|
43
|
+
};
|
|
@@ -229,11 +229,18 @@ export enum BetradarOutcomeResult {
|
|
|
229
229
|
UNDECIDED = '-1',
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
export class SportsMarketSelectionOddsBoost {
|
|
233
|
+
id: string;
|
|
234
|
+
oddsDecimal: string;
|
|
235
|
+
accountMaxStakeUSD: number;
|
|
236
|
+
}
|
|
237
|
+
|
|
232
238
|
export class SportsMarketSelectionOddsUpdate {
|
|
233
239
|
id: string;
|
|
234
240
|
marketProductId: SportsMarketProductId;
|
|
235
241
|
oddsNumerator: string;
|
|
236
242
|
oddsDenominator: string;
|
|
243
|
+
boost: Nullable<SportsMarketSelectionOddsBoost>;
|
|
237
244
|
status: SportsMarketSelectionStatus;
|
|
238
245
|
probability?: Nullable<string>;
|
|
239
246
|
additionalProbability?: Nullable<AdditionalProbabilityDataModel>;
|