overtime-utils 0.2.50 → 0.2.51
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 +21 -21
- package/src/constants/leagues/basketball.ts +485 -478
- package/src/constants/leagues/cricket.ts +95 -74
- package/src/constants/leagues/darts.ts +100 -94
- package/src/constants/leagues/handball.ts +176 -169
- package/src/constants/leagues/hockey.ts +229 -208
- package/src/constants/leagues/rugby.ts +86 -78
- package/src/constants/leagues/soccer.ts +2582 -2526
- package/src/enums/sports.ts +766 -741
- package/src/types/feedbackCodes.ts +4 -4
- package/src/utils/feedbackCodes.ts +8 -8
|
@@ -1,74 +1,95 @@
|
|
|
1
|
-
import { League, MatchResolveType, PeriodType, Provider, ScoringType, Sport } from '../../enums/sports';
|
|
2
|
-
import { LeagueInfo } from '../../types/sports';
|
|
3
|
-
|
|
4
|
-
// Common default values for Cricket leagues
|
|
5
|
-
export const CRICKET_DEFAULTS = {
|
|
6
|
-
sport: Sport.CRICKET,
|
|
7
|
-
provider: Provider.OPTICODDS,
|
|
8
|
-
scoringType: ScoringType.POINTS,
|
|
9
|
-
matchResolveType: MatchResolveType.EMPTY,
|
|
10
|
-
periodType: PeriodType.INNING,
|
|
11
|
-
isDrawAvailable: false,
|
|
12
|
-
hidden: false,
|
|
13
|
-
} as const;
|
|
14
|
-
|
|
15
|
-
export const CRICKET_LEAGUES: Partial<Record<League, LeagueInfo>> = {
|
|
16
|
-
[League.IPL]: {
|
|
17
|
-
...CRICKET_DEFAULTS,
|
|
18
|
-
id: League.IPL,
|
|
19
|
-
label: 'Indian Premier League',
|
|
20
|
-
opticOddsName: 'India - IPL',
|
|
21
|
-
logoClass: 'icon-homepage league--ipl',
|
|
22
|
-
priority: 901,
|
|
23
|
-
},
|
|
24
|
-
[League.T20_BLAST]: {
|
|
25
|
-
...CRICKET_DEFAULTS,
|
|
26
|
-
id: League.T20_BLAST,
|
|
27
|
-
label: 'T20 Blast',
|
|
28
|
-
opticOddsName: 'England - T20 Blast',
|
|
29
|
-
logoClass: 'icon-homepage league--t20',
|
|
30
|
-
priority: 902,
|
|
31
|
-
},
|
|
32
|
-
[League.ICC_T20_WORLD_CUP]: {
|
|
33
|
-
...CRICKET_DEFAULTS,
|
|
34
|
-
id: League.ICC_T20_WORLD_CUP,
|
|
35
|
-
label: 'ICC T20 World Cup',
|
|
36
|
-
opticOddsName: 'ICC - T20 World Cup',
|
|
37
|
-
priority: 903,
|
|
38
|
-
},
|
|
39
|
-
[League.AUSTRALIA_BIG_BASH_LEAGUE]: {
|
|
40
|
-
...CRICKET_DEFAULTS,
|
|
41
|
-
id: League.AUSTRALIA_BIG_BASH_LEAGUE,
|
|
42
|
-
label: 'Australia Big Bash League',
|
|
43
|
-
opticOddsName: 'Australia - Big Bash League',
|
|
44
|
-
priority: 904,
|
|
45
|
-
},
|
|
46
|
-
[League.USA_MAJOR_LEAGUE_CRICKET]: {
|
|
47
|
-
...CRICKET_DEFAULTS,
|
|
48
|
-
id: League.USA_MAJOR_LEAGUE_CRICKET,
|
|
49
|
-
label: 'USA Major League Cricket',
|
|
50
|
-
opticOddsName: 'USA - Major League Cricket',
|
|
51
|
-
priority: 905,
|
|
52
|
-
},
|
|
53
|
-
[League.AUSTRALIA_BIG_BASH_LEAGUE_WOMEN]: {
|
|
54
|
-
...CRICKET_DEFAULTS,
|
|
55
|
-
id: League.AUSTRALIA_BIG_BASH_LEAGUE_WOMEN,
|
|
56
|
-
label: 'Australia Big Bash League Women',
|
|
57
|
-
opticOddsName: 'Australia - Big Bash League Women',
|
|
58
|
-
priority: 906,
|
|
59
|
-
},
|
|
60
|
-
[League.PAKISTAN_SUPER_LEAGUE]: {
|
|
61
|
-
...CRICKET_DEFAULTS,
|
|
62
|
-
id: League.PAKISTAN_SUPER_LEAGUE,
|
|
63
|
-
label: 'Pakistan Super League',
|
|
64
|
-
opticOddsName: 'Pakistan - Super League',
|
|
65
|
-
priority: 907,
|
|
66
|
-
},
|
|
67
|
-
[League.INTERNATIONAL_T20_MATCHES]: {
|
|
68
|
-
...CRICKET_DEFAULTS,
|
|
69
|
-
id: League.INTERNATIONAL_T20_MATCHES,
|
|
70
|
-
label: 'International T20 Matches',
|
|
71
|
-
opticOddsName: 'International - T20 Matches',
|
|
72
|
-
priority: 908,
|
|
73
|
-
},
|
|
74
|
-
|
|
1
|
+
import { League, MatchResolveType, PeriodType, Provider, ScoringType, Sport } from '../../enums/sports';
|
|
2
|
+
import { LeagueInfo } from '../../types/sports';
|
|
3
|
+
|
|
4
|
+
// Common default values for Cricket leagues
|
|
5
|
+
export const CRICKET_DEFAULTS = {
|
|
6
|
+
sport: Sport.CRICKET,
|
|
7
|
+
provider: Provider.OPTICODDS,
|
|
8
|
+
scoringType: ScoringType.POINTS,
|
|
9
|
+
matchResolveType: MatchResolveType.EMPTY,
|
|
10
|
+
periodType: PeriodType.INNING,
|
|
11
|
+
isDrawAvailable: false,
|
|
12
|
+
hidden: false,
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
export const CRICKET_LEAGUES: Partial<Record<League, LeagueInfo>> = {
|
|
16
|
+
[League.IPL]: {
|
|
17
|
+
...CRICKET_DEFAULTS,
|
|
18
|
+
id: League.IPL,
|
|
19
|
+
label: 'Indian Premier League',
|
|
20
|
+
opticOddsName: 'India - IPL',
|
|
21
|
+
logoClass: 'icon-homepage league--ipl',
|
|
22
|
+
priority: 901,
|
|
23
|
+
},
|
|
24
|
+
[League.T20_BLAST]: {
|
|
25
|
+
...CRICKET_DEFAULTS,
|
|
26
|
+
id: League.T20_BLAST,
|
|
27
|
+
label: 'T20 Blast',
|
|
28
|
+
opticOddsName: 'England - T20 Blast',
|
|
29
|
+
logoClass: 'icon-homepage league--t20',
|
|
30
|
+
priority: 902,
|
|
31
|
+
},
|
|
32
|
+
[League.ICC_T20_WORLD_CUP]: {
|
|
33
|
+
...CRICKET_DEFAULTS,
|
|
34
|
+
id: League.ICC_T20_WORLD_CUP,
|
|
35
|
+
label: 'ICC T20 World Cup',
|
|
36
|
+
opticOddsName: 'ICC - T20 World Cup',
|
|
37
|
+
priority: 903,
|
|
38
|
+
},
|
|
39
|
+
[League.AUSTRALIA_BIG_BASH_LEAGUE]: {
|
|
40
|
+
...CRICKET_DEFAULTS,
|
|
41
|
+
id: League.AUSTRALIA_BIG_BASH_LEAGUE,
|
|
42
|
+
label: 'Australia Big Bash League',
|
|
43
|
+
opticOddsName: 'Australia - Big Bash League',
|
|
44
|
+
priority: 904,
|
|
45
|
+
},
|
|
46
|
+
[League.USA_MAJOR_LEAGUE_CRICKET]: {
|
|
47
|
+
...CRICKET_DEFAULTS,
|
|
48
|
+
id: League.USA_MAJOR_LEAGUE_CRICKET,
|
|
49
|
+
label: 'USA Major League Cricket',
|
|
50
|
+
opticOddsName: 'USA - Major League Cricket',
|
|
51
|
+
priority: 905,
|
|
52
|
+
},
|
|
53
|
+
[League.AUSTRALIA_BIG_BASH_LEAGUE_WOMEN]: {
|
|
54
|
+
...CRICKET_DEFAULTS,
|
|
55
|
+
id: League.AUSTRALIA_BIG_BASH_LEAGUE_WOMEN,
|
|
56
|
+
label: 'Australia Big Bash League Women',
|
|
57
|
+
opticOddsName: 'Australia - Big Bash League Women',
|
|
58
|
+
priority: 906,
|
|
59
|
+
},
|
|
60
|
+
[League.PAKISTAN_SUPER_LEAGUE]: {
|
|
61
|
+
...CRICKET_DEFAULTS,
|
|
62
|
+
id: League.PAKISTAN_SUPER_LEAGUE,
|
|
63
|
+
label: 'Pakistan Super League',
|
|
64
|
+
opticOddsName: 'Pakistan - Super League',
|
|
65
|
+
priority: 907,
|
|
66
|
+
},
|
|
67
|
+
[League.INTERNATIONAL_T20_MATCHES]: {
|
|
68
|
+
...CRICKET_DEFAULTS,
|
|
69
|
+
id: League.INTERNATIONAL_T20_MATCHES,
|
|
70
|
+
label: 'International T20 Matches',
|
|
71
|
+
opticOddsName: 'International - T20 Matches',
|
|
72
|
+
priority: 908,
|
|
73
|
+
},
|
|
74
|
+
[League.INTERNATIONAL_ODI_MATCHES]: {
|
|
75
|
+
...CRICKET_DEFAULTS,
|
|
76
|
+
id: League.INTERNATIONAL_ODI_MATCHES,
|
|
77
|
+
label: 'International ODI Matches',
|
|
78
|
+
opticOddsName: 'International - ODI Matches',
|
|
79
|
+
priority: 909,
|
|
80
|
+
},
|
|
81
|
+
[League.INTERNATIONAL_T20_MATCHES_WOMEN]: {
|
|
82
|
+
...CRICKET_DEFAULTS,
|
|
83
|
+
id: League.INTERNATIONAL_T20_MATCHES_WOMEN,
|
|
84
|
+
label: 'International T20 Matches Women',
|
|
85
|
+
opticOddsName: 'International - T20 Matches Women',
|
|
86
|
+
priority: 910,
|
|
87
|
+
},
|
|
88
|
+
[League.WEST_INDIES_CARIBBEAN_PREMIER_LEAGUE]: {
|
|
89
|
+
...CRICKET_DEFAULTS,
|
|
90
|
+
id: League.WEST_INDIES_CARIBBEAN_PREMIER_LEAGUE,
|
|
91
|
+
label: 'West Indies Caribbean Premier League',
|
|
92
|
+
opticOddsName: 'West Indies - Caribbean Premier League',
|
|
93
|
+
priority: 911,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
@@ -1,94 +1,100 @@
|
|
|
1
|
-
import { League, MatchResolveType, PeriodType, Provider, ScoringType, Sport } from '../../enums/sports';
|
|
2
|
-
import { LeagueInfo } from '../../types/sports';
|
|
3
|
-
|
|
4
|
-
// Common default values for Darts leagues
|
|
5
|
-
export const DARTS_DEFAULTS = {
|
|
6
|
-
sport: Sport.DARTS,
|
|
7
|
-
provider: Provider.OPTICODDS,
|
|
8
|
-
scoringType: ScoringType.LEGS,
|
|
9
|
-
matchResolveType: MatchResolveType.EMPTY,
|
|
10
|
-
periodType: PeriodType.LEG,
|
|
11
|
-
isDrawAvailable: false,
|
|
12
|
-
hidden: false,
|
|
13
|
-
} as const;
|
|
14
|
-
|
|
15
|
-
export const DARTS_LEAGUES: Partial<Record<League, LeagueInfo>> = {
|
|
16
|
-
[League.ENGLAND_PREMIER_LEAGUE_DARTS]: {
|
|
17
|
-
...DARTS_DEFAULTS,
|
|
18
|
-
id: League.ENGLAND_PREMIER_LEAGUE_DARTS,
|
|
19
|
-
label: 'England Premier League Darts',
|
|
20
|
-
opticOddsName: 'England - Premier League Darts',
|
|
21
|
-
priority: 2001,
|
|
22
|
-
},
|
|
23
|
-
[League.PDC_WORLD_CUP_OF_DARTS]: {
|
|
24
|
-
...DARTS_DEFAULTS,
|
|
25
|
-
id: League.PDC_WORLD_CUP_OF_DARTS,
|
|
26
|
-
label: 'PDC World Cup of Darts',
|
|
27
|
-
opticOddsName: 'PDC - World Cup of Darts',
|
|
28
|
-
priority: 2002,
|
|
29
|
-
},
|
|
30
|
-
[League.PDC_WORLD_GRAND_PRIX]: {
|
|
31
|
-
...DARTS_DEFAULTS,
|
|
32
|
-
id: League.PDC_WORLD_GRAND_PRIX,
|
|
33
|
-
label: 'PDC World Grand Prix',
|
|
34
|
-
opticOddsName: 'PDC - World Grand Prix',
|
|
35
|
-
priority: 2003,
|
|
36
|
-
},
|
|
37
|
-
[League.PDC_GRAND_SLAM_OF_DARTS]: {
|
|
38
|
-
...DARTS_DEFAULTS,
|
|
39
|
-
id: League.PDC_GRAND_SLAM_OF_DARTS,
|
|
40
|
-
label: 'PDC Grand Slam of Darts',
|
|
41
|
-
opticOddsName: 'PDC - Grand Slam of Darts',
|
|
42
|
-
priority: 2004,
|
|
43
|
-
},
|
|
44
|
-
[League.PDC_WORLD_MATCHPLAY]: {
|
|
45
|
-
...DARTS_DEFAULTS,
|
|
46
|
-
id: League.PDC_WORLD_MATCHPLAY,
|
|
47
|
-
label: 'PDC World Matchplay',
|
|
48
|
-
opticOddsName: 'PDC - World Matchplay',
|
|
49
|
-
priority: 2005,
|
|
50
|
-
},
|
|
51
|
-
[League.PDC_WORLD_MATCHPLAY_WOMEN]: {
|
|
52
|
-
...DARTS_DEFAULTS,
|
|
53
|
-
id: League.PDC_WORLD_MATCHPLAY_WOMEN,
|
|
54
|
-
label: 'PDC World Matchplay Women',
|
|
55
|
-
opticOddsName: 'PDC - World Matchplay Women',
|
|
56
|
-
priority: 2006,
|
|
57
|
-
},
|
|
58
|
-
[League.PDC_WORLD_CHAMPIONSHIP]: {
|
|
59
|
-
...DARTS_DEFAULTS,
|
|
60
|
-
id: League.PDC_WORLD_CHAMPIONSHIP,
|
|
61
|
-
label: 'PDC World Championship',
|
|
62
|
-
opticOddsName: 'PDC - World Championship',
|
|
63
|
-
priority: 2006,
|
|
64
|
-
},
|
|
65
|
-
[League.PDC_EUROPEAN_DARTS_CHAMPIONSHIP]: {
|
|
66
|
-
...DARTS_DEFAULTS,
|
|
67
|
-
id: League.PDC_EUROPEAN_DARTS_CHAMPIONSHIP,
|
|
68
|
-
label: 'PDC European Darts Championship',
|
|
69
|
-
opticOddsName: 'PDC - European Darts Championship',
|
|
70
|
-
priority: 2007,
|
|
71
|
-
},
|
|
72
|
-
[League.PDC_EUROPEAN_TOUR]: {
|
|
73
|
-
...DARTS_DEFAULTS,
|
|
74
|
-
id: League.PDC_EUROPEAN_TOUR,
|
|
75
|
-
label: 'PDC European Tour',
|
|
76
|
-
opticOddsName: 'PDC - European Tour',
|
|
77
|
-
priority: 2008,
|
|
78
|
-
},
|
|
79
|
-
[League.PDC_PLAYERS_CHAMPIONSHIP]: {
|
|
80
|
-
...DARTS_DEFAULTS,
|
|
81
|
-
id: League.PDC_PLAYERS_CHAMPIONSHIP,
|
|
82
|
-
label: 'PDC Players Championship',
|
|
83
|
-
opticOddsName: 'PDC - Players Championship',
|
|
84
|
-
priority: 2009,
|
|
85
|
-
},
|
|
86
|
-
[League.PDC_WORLD_SERIES_OF_DARTS]: {
|
|
87
|
-
...DARTS_DEFAULTS,
|
|
88
|
-
id: League.PDC_WORLD_SERIES_OF_DARTS,
|
|
89
|
-
label: 'PDC World Series Of Darts',
|
|
90
|
-
opticOddsName: 'PDC - World Series Of Darts',
|
|
91
|
-
priority: 2010,
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
1
|
+
import { League, MatchResolveType, PeriodType, Provider, ScoringType, Sport } from '../../enums/sports';
|
|
2
|
+
import { LeagueInfo } from '../../types/sports';
|
|
3
|
+
|
|
4
|
+
// Common default values for Darts leagues
|
|
5
|
+
export const DARTS_DEFAULTS = {
|
|
6
|
+
sport: Sport.DARTS,
|
|
7
|
+
provider: Provider.OPTICODDS,
|
|
8
|
+
scoringType: ScoringType.LEGS,
|
|
9
|
+
matchResolveType: MatchResolveType.EMPTY,
|
|
10
|
+
periodType: PeriodType.LEG,
|
|
11
|
+
isDrawAvailable: false,
|
|
12
|
+
hidden: false,
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
export const DARTS_LEAGUES: Partial<Record<League, LeagueInfo>> = {
|
|
16
|
+
[League.ENGLAND_PREMIER_LEAGUE_DARTS]: {
|
|
17
|
+
...DARTS_DEFAULTS,
|
|
18
|
+
id: League.ENGLAND_PREMIER_LEAGUE_DARTS,
|
|
19
|
+
label: 'England Premier League Darts',
|
|
20
|
+
opticOddsName: 'England - Premier League Darts',
|
|
21
|
+
priority: 2001,
|
|
22
|
+
},
|
|
23
|
+
[League.PDC_WORLD_CUP_OF_DARTS]: {
|
|
24
|
+
...DARTS_DEFAULTS,
|
|
25
|
+
id: League.PDC_WORLD_CUP_OF_DARTS,
|
|
26
|
+
label: 'PDC World Cup of Darts',
|
|
27
|
+
opticOddsName: 'PDC - World Cup of Darts',
|
|
28
|
+
priority: 2002,
|
|
29
|
+
},
|
|
30
|
+
[League.PDC_WORLD_GRAND_PRIX]: {
|
|
31
|
+
...DARTS_DEFAULTS,
|
|
32
|
+
id: League.PDC_WORLD_GRAND_PRIX,
|
|
33
|
+
label: 'PDC World Grand Prix',
|
|
34
|
+
opticOddsName: 'PDC - World Grand Prix',
|
|
35
|
+
priority: 2003,
|
|
36
|
+
},
|
|
37
|
+
[League.PDC_GRAND_SLAM_OF_DARTS]: {
|
|
38
|
+
...DARTS_DEFAULTS,
|
|
39
|
+
id: League.PDC_GRAND_SLAM_OF_DARTS,
|
|
40
|
+
label: 'PDC Grand Slam of Darts',
|
|
41
|
+
opticOddsName: 'PDC - Grand Slam of Darts',
|
|
42
|
+
priority: 2004,
|
|
43
|
+
},
|
|
44
|
+
[League.PDC_WORLD_MATCHPLAY]: {
|
|
45
|
+
...DARTS_DEFAULTS,
|
|
46
|
+
id: League.PDC_WORLD_MATCHPLAY,
|
|
47
|
+
label: 'PDC World Matchplay',
|
|
48
|
+
opticOddsName: 'PDC - World Matchplay',
|
|
49
|
+
priority: 2005,
|
|
50
|
+
},
|
|
51
|
+
[League.PDC_WORLD_MATCHPLAY_WOMEN]: {
|
|
52
|
+
...DARTS_DEFAULTS,
|
|
53
|
+
id: League.PDC_WORLD_MATCHPLAY_WOMEN,
|
|
54
|
+
label: 'PDC World Matchplay Women',
|
|
55
|
+
opticOddsName: 'PDC - World Matchplay Women',
|
|
56
|
+
priority: 2006,
|
|
57
|
+
},
|
|
58
|
+
[League.PDC_WORLD_CHAMPIONSHIP]: {
|
|
59
|
+
...DARTS_DEFAULTS,
|
|
60
|
+
id: League.PDC_WORLD_CHAMPIONSHIP,
|
|
61
|
+
label: 'PDC World Championship',
|
|
62
|
+
opticOddsName: 'PDC - World Championship',
|
|
63
|
+
priority: 2006,
|
|
64
|
+
},
|
|
65
|
+
[League.PDC_EUROPEAN_DARTS_CHAMPIONSHIP]: {
|
|
66
|
+
...DARTS_DEFAULTS,
|
|
67
|
+
id: League.PDC_EUROPEAN_DARTS_CHAMPIONSHIP,
|
|
68
|
+
label: 'PDC European Darts Championship',
|
|
69
|
+
opticOddsName: 'PDC - European Darts Championship',
|
|
70
|
+
priority: 2007,
|
|
71
|
+
},
|
|
72
|
+
[League.PDC_EUROPEAN_TOUR]: {
|
|
73
|
+
...DARTS_DEFAULTS,
|
|
74
|
+
id: League.PDC_EUROPEAN_TOUR,
|
|
75
|
+
label: 'PDC European Tour',
|
|
76
|
+
opticOddsName: 'PDC - European Tour',
|
|
77
|
+
priority: 2008,
|
|
78
|
+
},
|
|
79
|
+
[League.PDC_PLAYERS_CHAMPIONSHIP]: {
|
|
80
|
+
...DARTS_DEFAULTS,
|
|
81
|
+
id: League.PDC_PLAYERS_CHAMPIONSHIP,
|
|
82
|
+
label: 'PDC Players Championship',
|
|
83
|
+
opticOddsName: 'PDC - Players Championship',
|
|
84
|
+
priority: 2009,
|
|
85
|
+
},
|
|
86
|
+
[League.PDC_WORLD_SERIES_OF_DARTS]: {
|
|
87
|
+
...DARTS_DEFAULTS,
|
|
88
|
+
id: League.PDC_WORLD_SERIES_OF_DARTS,
|
|
89
|
+
label: 'PDC World Series Of Darts',
|
|
90
|
+
opticOddsName: 'PDC - World Series Of Darts',
|
|
91
|
+
priority: 2010,
|
|
92
|
+
},
|
|
93
|
+
[League.MODUS_SUPER_SERIES]: {
|
|
94
|
+
...DARTS_DEFAULTS,
|
|
95
|
+
id: League.MODUS_SUPER_SERIES,
|
|
96
|
+
label: 'MODUS Super Series',
|
|
97
|
+
opticOddsName: 'MODUS - Super Series',
|
|
98
|
+
priority: 2011,
|
|
99
|
+
},
|
|
100
|
+
};
|