overtime-utils 0.2.1 → 0.2.3
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/main.js +1 -1
- package/package.json +1 -1
- package/src/constants/leagues/index.ts +5 -2
- package/src/constants/leagues/snooker.ts +23 -0
- package/src/constants/leagues/soccer.ts +21 -0
- package/src/constants/marketTypes/futures.ts +12 -0
- package/src/constants/marketTypes.ts +2 -0
- package/src/enums/marketTypes.ts +2 -0
- package/src/enums/sports.ts +8 -0
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ export { AUSSIE_RULES_DEFAULTS, AUSSIE_RULES_LEAGUES } from './aussierules';
|
|
|
6
6
|
export { BASEBALL_DEFAULTS, BASEBALL_LEAGUES } from './baseball';
|
|
7
7
|
export { BASKETBALL_DEFAULTS, BASKETBALL_LEAGUES } from './basketball';
|
|
8
8
|
export { CRICKET_DEFAULTS, CRICKET_LEAGUES } from './cricket';
|
|
9
|
+
export { CURLING_DEFAULTS, CURLING_LEAGUES } from './curling';
|
|
9
10
|
export { DARTS_DEFAULTS, DARTS_LEAGUES } from './darts';
|
|
10
11
|
export { ESPORTS_DEFAULTS, ESPORTS_LEAGUES } from './esports';
|
|
11
12
|
export { FIGHTING_DEFAULTS, FIGHTING_LEAGUES } from './fighting';
|
|
@@ -18,17 +19,18 @@ export { LACROSSE_DEFAULTS, LACROSSE_LEAGUES } from './lacrosse';
|
|
|
18
19
|
export { MOTORSPORTS_DEFAULTS, MOTORSPORTS_LEAGUES } from './motorsports';
|
|
19
20
|
export { POLITICS_DEFAULTS, POLITICS_LEAGUES } from './politics';
|
|
20
21
|
export { RUGBY_DEFAULTS, RUGBY_LEAGUES } from './rugby';
|
|
22
|
+
export { SNOOKER_DEFAULTS, SNOOKER_LEAGUES } from './snooker';
|
|
21
23
|
export { SOCCER_DEFAULTS, SOCCER_LEAGUES } from './soccer';
|
|
22
24
|
export { TABLE_TENNIS_DEFAULTS, TABLE_TENNIS_LEAGUES } from './tabletennis';
|
|
23
25
|
export { TENNIS_DEFAULTS, TENNIS_LEAGUES } from './tennis';
|
|
24
26
|
export { VOLLEYBALL_DEFAULTS, VOLLEYBALL_LEAGUES } from './volleyball';
|
|
25
27
|
export { WATER_POLO_DEFAULTS, WATER_POLO_LEAGUES } from './waterpolo';
|
|
26
|
-
export { CURLING_DEFAULTS, CURLING_LEAGUES } from './curling';
|
|
27
28
|
|
|
28
29
|
import { AUSSIE_RULES_LEAGUES } from './aussierules';
|
|
29
30
|
import { BASEBALL_LEAGUES } from './baseball';
|
|
30
31
|
import { BASKETBALL_LEAGUES } from './basketball';
|
|
31
32
|
import { CRICKET_LEAGUES } from './cricket';
|
|
33
|
+
import { CURLING_LEAGUES } from './curling';
|
|
32
34
|
import { DARTS_LEAGUES } from './darts';
|
|
33
35
|
import { ESPORTS_LEAGUES } from './esports';
|
|
34
36
|
import { FIGHTING_LEAGUES } from './fighting';
|
|
@@ -41,12 +43,12 @@ import { LACROSSE_LEAGUES } from './lacrosse';
|
|
|
41
43
|
import { MOTORSPORTS_LEAGUES } from './motorsports';
|
|
42
44
|
import { POLITICS_LEAGUES } from './politics';
|
|
43
45
|
import { RUGBY_LEAGUES } from './rugby';
|
|
46
|
+
import { SNOOKER_LEAGUES } from './snooker';
|
|
44
47
|
import { SOCCER_LEAGUES } from './soccer';
|
|
45
48
|
import { TABLE_TENNIS_LEAGUES } from './tabletennis';
|
|
46
49
|
import { TENNIS_LEAGUES } from './tennis';
|
|
47
50
|
import { VOLLEYBALL_LEAGUES } from './volleyball';
|
|
48
51
|
import { WATER_POLO_LEAGUES } from './waterpolo';
|
|
49
|
-
import { CURLING_LEAGUES } from './curling';
|
|
50
52
|
|
|
51
53
|
// Combine all sport leagues into a single map
|
|
52
54
|
export const ALL_LEAGUES: Partial<Record<League, LeagueInfo>> = {
|
|
@@ -72,4 +74,5 @@ export const ALL_LEAGUES: Partial<Record<League, LeagueInfo>> = {
|
|
|
72
74
|
...WATER_POLO_LEAGUES,
|
|
73
75
|
...AUSSIE_RULES_LEAGUES,
|
|
74
76
|
...CURLING_LEAGUES,
|
|
77
|
+
...SNOOKER_LEAGUES,
|
|
75
78
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { League, MatchResolveType, PeriodType, Provider, ScoringType, Sport } from '../../enums/sports';
|
|
2
|
+
import { LeagueInfo } from '../../types/sports';
|
|
3
|
+
|
|
4
|
+
// Common default values for Snooker leagues
|
|
5
|
+
export const SNOOKER_DEFAULTS = {
|
|
6
|
+
sport: Sport.SNOOKER,
|
|
7
|
+
provider: Provider.OPTICODDS,
|
|
8
|
+
scoringType: ScoringType.FRAMES,
|
|
9
|
+
matchResolveType: MatchResolveType.EMPTY,
|
|
10
|
+
periodType: PeriodType.FRAME,
|
|
11
|
+
isDrawAvailable: false,
|
|
12
|
+
hidden: false,
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
export const SNOOKER_LEAGUES: Partial<Record<League, LeagueInfo>> = {
|
|
16
|
+
[League.WST_WORLD_CHAMPIONSHIP]: {
|
|
17
|
+
...SNOOKER_DEFAULTS,
|
|
18
|
+
id: League.WST_WORLD_CHAMPIONSHIP,
|
|
19
|
+
label: 'WST World Championship',
|
|
20
|
+
opticOddsName: 'WST - World Championship',
|
|
21
|
+
priority: 2100,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -1206,6 +1206,27 @@ export const SOCCER_LEAGUES: Partial<Record<League, LeagueInfo>> = {
|
|
|
1206
1206
|
opticOddsName: 'England - League 2',
|
|
1207
1207
|
priority: 150,
|
|
1208
1208
|
},
|
|
1209
|
+
[League.ENGLAND_NATIONAL_LEAGUE]: {
|
|
1210
|
+
...SOCCER_DEFAULTS,
|
|
1211
|
+
id: League.ENGLAND_NATIONAL_LEAGUE,
|
|
1212
|
+
label: 'England National League',
|
|
1213
|
+
opticOddsName: 'England - National League',
|
|
1214
|
+
priority: 150,
|
|
1215
|
+
},
|
|
1216
|
+
[League.ENGLAND_NATIONAL_LEAGUE_NORTH]: {
|
|
1217
|
+
...SOCCER_DEFAULTS,
|
|
1218
|
+
id: League.ENGLAND_NATIONAL_LEAGUE_NORTH,
|
|
1219
|
+
label: 'England National League North',
|
|
1220
|
+
opticOddsName: 'England - National League North',
|
|
1221
|
+
priority: 150,
|
|
1222
|
+
},
|
|
1223
|
+
[League.ENGLAND_NATIONAL_LEAGUE_SOUTH]: {
|
|
1224
|
+
...SOCCER_DEFAULTS,
|
|
1225
|
+
id: League.ENGLAND_NATIONAL_LEAGUE_SOUTH,
|
|
1226
|
+
label: 'England National League South',
|
|
1227
|
+
opticOddsName: 'England - National League South',
|
|
1228
|
+
priority: 150,
|
|
1229
|
+
},
|
|
1209
1230
|
[League.GERMANY_BUNDESLIGA_3]: {
|
|
1210
1231
|
...SOCCER_DEFAULTS,
|
|
1211
1232
|
id: League.GERMANY_BUNDESLIGA_3,
|
|
@@ -103,4 +103,16 @@ export const FUTURES_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>
|
|
|
103
103
|
name: 'To qualify for next round',
|
|
104
104
|
resultType: ResultType.EXACT_POSITION,
|
|
105
105
|
},
|
|
106
|
+
[MarketType.SERIES_HANDICAP]: {
|
|
107
|
+
id: MarketType.SERIES_HANDICAP,
|
|
108
|
+
key: 'seriesHandicap',
|
|
109
|
+
name: 'Series handicap',
|
|
110
|
+
resultType: ResultType.SPREAD,
|
|
111
|
+
},
|
|
112
|
+
[MarketType.SERIES_TOTAL]: {
|
|
113
|
+
id: MarketType.SERIES_TOTAL,
|
|
114
|
+
key: 'seriesTotal',
|
|
115
|
+
name: 'Series total',
|
|
116
|
+
resultType: ResultType.OVER_UNDER,
|
|
117
|
+
},
|
|
106
118
|
};
|
|
@@ -810,6 +810,8 @@ export const FUTURES_MARKET_TYPES = [
|
|
|
810
810
|
MarketType.GROUP_WINNER,
|
|
811
811
|
MarketType.GROUP_BOTTOM_FINISH,
|
|
812
812
|
MarketType.TO_QUALIFY_FOR_NEXT_ROUND,
|
|
813
|
+
MarketType.SERIES_HANDICAP,
|
|
814
|
+
MarketType.SERIES_TOTAL,
|
|
813
815
|
];
|
|
814
816
|
|
|
815
817
|
export const ONE_SIDE_PLAYER_PROPS_MARKET_TYPES = [
|
package/src/enums/marketTypes.ts
CHANGED
package/src/enums/sports.ts
CHANGED
|
@@ -21,6 +21,7 @@ export enum Sport {
|
|
|
21
21
|
CURLING = 'Curling',
|
|
22
22
|
POLITICS = 'Politics',
|
|
23
23
|
FUTURES = 'Futures',
|
|
24
|
+
SNOOKER = 'Snooker',
|
|
24
25
|
EMPTY = '',
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -458,6 +459,9 @@ export enum League {
|
|
|
458
459
|
SCOTLAND_CHAMPIONSHIP = 20669,
|
|
459
460
|
TURKEY_1_LIG = 20692,
|
|
460
461
|
ENGLAND_LEAGUE_2 = 20543,
|
|
462
|
+
ENGLAND_NATIONAL_LEAGUE = 20544,
|
|
463
|
+
ENGLAND_NATIONAL_LEAGUE_NORTH = 20748,
|
|
464
|
+
ENGLAND_NATIONAL_LEAGUE_SOUTH = 20749,
|
|
461
465
|
GERMANY_BUNDESLIGA_3 = 20563,
|
|
462
466
|
GREECE_CUP = 20566,
|
|
463
467
|
PORTUGAL_LIGA_3 = 20656,
|
|
@@ -532,6 +536,8 @@ export enum League {
|
|
|
532
536
|
PGA_FUTURES = 39998,
|
|
533
537
|
FORMULA1_FUTURES = 39999,
|
|
534
538
|
FIBA_EUROBASKET_FUTURES = 30224,
|
|
539
|
+
|
|
540
|
+
WST_WORLD_CHAMPIONSHIP = 20950,
|
|
535
541
|
}
|
|
536
542
|
|
|
537
543
|
export enum ScoringType {
|
|
@@ -541,6 +547,7 @@ export enum ScoringType {
|
|
|
541
547
|
SETS = 'sets',
|
|
542
548
|
MAPS = 'maps',
|
|
543
549
|
LEGS = 'legs',
|
|
550
|
+
FRAMES = 'frames',
|
|
544
551
|
EMPTY = '',
|
|
545
552
|
}
|
|
546
553
|
|
|
@@ -559,6 +566,7 @@ export enum PeriodType {
|
|
|
559
566
|
SET = 'set',
|
|
560
567
|
MAP = 'map',
|
|
561
568
|
LEG = 'leg',
|
|
569
|
+
FRAME = 'frame',
|
|
562
570
|
EMPTY = '',
|
|
563
571
|
}
|
|
564
572
|
|