overtime-utils 0.2.6 → 0.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overtime-utils",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "",
5
5
  "main": "main.js",
6
6
  "scripts": {
@@ -49,6 +49,14 @@ export const FUTURES_LEAGUES: Partial<Record<League, LeagueInfo>> = {
49
49
  logoClass: 'icon-homepage league--nba',
50
50
  priority: 1802,
51
51
  },
52
+ [League.WNBA_FUTURES]: {
53
+ ...FUTURES_DEFAULTS,
54
+ id: League.WNBA_FUTURES,
55
+ initialSport: Sport.BASKETBALL,
56
+ label: 'WNBA Futures',
57
+ logoClass: 'icon-homepage league--wnba',
58
+ priority: 1808,
59
+ },
52
60
  [League.MLB_FUTURES]: {
53
61
  ...FUTURES_DEFAULTS,
54
62
  id: League.MLB_FUTURES,
@@ -299,7 +299,7 @@ export const SOCCER_LEAGUES: Partial<Record<League, LeagueInfo>> = {
299
299
  [League.SAUDI_PROFESSIONAL_LEAGUE]: {
300
300
  ...SOCCER_DEFAULTS,
301
301
  id: League.SAUDI_PROFESSIONAL_LEAGUE,
302
- label: 'Saudi Arabia Professional League',
302
+ label: 'Saudi Arabia Saudi League',
303
303
  opticOddsName: 'Saudi Arabia - Saudi League',
304
304
  priority: 145,
305
305
  },
@@ -775,4 +775,34 @@ export const PLAYER_PROPS_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketType
775
775
  name: 'Player Faceoffs Won',
776
776
  resultType: ResultType.OVER_UNDER,
777
777
  },
778
+ [MarketType.PLAYER_PROPS_CLEARANCES]: {
779
+ id: MarketType.PLAYER_PROPS_CLEARANCES,
780
+ key: 'clearances',
781
+ name: 'Clearances',
782
+ resultType: ResultType.OVER_UNDER,
783
+ },
784
+ [MarketType.PLAYER_PROPS_CROSSES]: {
785
+ id: MarketType.PLAYER_PROPS_CROSSES,
786
+ key: 'crosses',
787
+ name: 'Crosses',
788
+ resultType: ResultType.OVER_UNDER,
789
+ },
790
+ [MarketType.PLAYER_PROPS_DRIBBLE_ATTEMPTS]: {
791
+ id: MarketType.PLAYER_PROPS_DRIBBLE_ATTEMPTS,
792
+ key: 'dribbleAttempts',
793
+ name: 'Dribble Attempts',
794
+ resultType: ResultType.OVER_UNDER,
795
+ },
796
+ [MarketType.PLAYER_PROPS_PASSES_COMPLETED]: {
797
+ id: MarketType.PLAYER_PROPS_PASSES_COMPLETED,
798
+ key: 'passesCompleted',
799
+ name: 'Passes Completed',
800
+ resultType: ResultType.OVER_UNDER,
801
+ },
802
+ [MarketType.PLAYER_PROPS_SOCCER_PASSING_ATTEMPTS]: {
803
+ id: MarketType.PLAYER_PROPS_SOCCER_PASSING_ATTEMPTS,
804
+ key: 'soccerPassingAttempts',
805
+ name: 'Passing Attempts',
806
+ resultType: ResultType.OVER_UNDER,
807
+ },
778
808
  };
@@ -491,4 +491,92 @@ export const SOCCER_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>>
491
491
  name: 'Both teams to score 9th',
492
492
  resultType: ResultType.EXACT_POSITION,
493
493
  },
494
+
495
+ // Both teams to score in both halves
496
+ [MarketType.BOTH_TEAMS_TO_SCORE_BOTH_HALVES]: {
497
+ id: MarketType.BOTH_TEAMS_TO_SCORE_BOTH_HALVES,
498
+ key: 'bothTeamsToScoreBothHalves',
499
+ name: 'Both teams to score in both halves',
500
+ resultType: ResultType.EXACT_POSITION,
501
+ },
502
+ // Will there be a penalty
503
+ [MarketType.WILL_THERE_BE_A_PENALTY]: {
504
+ id: MarketType.WILL_THERE_BE_A_PENALTY,
505
+ key: 'willThereBeAPenalty',
506
+ name: 'Will there be a penalty',
507
+ resultType: ResultType.EXACT_POSITION,
508
+ },
509
+ // Will there be an own goal
510
+ [MarketType.WILL_THERE_BE_AN_OWN_GOAL]: {
511
+ id: MarketType.WILL_THERE_BE_AN_OWN_GOAL,
512
+ key: 'willThereBeAnOwnGoal',
513
+ name: 'Will there be an own goal',
514
+ resultType: ResultType.EXACT_POSITION,
515
+ },
516
+
517
+ // First minutes moneyline / total
518
+ [MarketType.FIRST_10_MINUTES_MONEYLINE]: {
519
+ id: MarketType.FIRST_10_MINUTES_MONEYLINE,
520
+ key: 'first10MinutesMoneyline',
521
+ name: 'Winner first 10 min',
522
+ resultType: ResultType.EXACT_POSITION,
523
+ },
524
+ [MarketType.FIRST_10_MINUTES_TOTAL_GOALS]: {
525
+ id: MarketType.FIRST_10_MINUTES_TOTAL_GOALS,
526
+ key: 'first10MinutesTotalGoals',
527
+ name: 'Total goals first 10 min',
528
+ resultType: ResultType.OVER_UNDER,
529
+ },
530
+ [MarketType.FIRST_15_MINUTES_MONEYLINE]: {
531
+ id: MarketType.FIRST_15_MINUTES_MONEYLINE,
532
+ key: 'first15MinutesMoneyline',
533
+ name: 'Winner first 15 min',
534
+ resultType: ResultType.EXACT_POSITION,
535
+ },
536
+ [MarketType.FIRST_30_MINUTES_MONEYLINE]: {
537
+ id: MarketType.FIRST_30_MINUTES_MONEYLINE,
538
+ key: 'first30MinutesMoneyline',
539
+ name: 'Winner first 30 min',
540
+ resultType: ResultType.EXACT_POSITION,
541
+ },
542
+
543
+ // Highest scoring half
544
+ [MarketType.HIGHEST_SCORING_HALF]: {
545
+ id: MarketType.HIGHEST_SCORING_HALF,
546
+ key: 'highestScoringHalf',
547
+ name: 'Highest scoring half',
548
+ resultType: ResultType.EXACT_POSITION,
549
+ },
550
+ [MarketType.HOME_TEAM_HIGHEST_SCORING_HALF]: {
551
+ id: MarketType.HOME_TEAM_HIGHEST_SCORING_HALF,
552
+ key: 'homeTeamHighestScoringHalf',
553
+ name: 'Highest scoring half',
554
+ resultType: ResultType.EXACT_POSITION,
555
+ },
556
+ [MarketType.AWAY_TEAM_HIGHEST_SCORING_HALF]: {
557
+ id: MarketType.AWAY_TEAM_HIGHEST_SCORING_HALF,
558
+ key: 'awayTeamHighestScoringHalf',
559
+ name: 'Highest scoring half',
560
+ resultType: ResultType.EXACT_POSITION,
561
+ },
562
+
563
+ // Total passes
564
+ [MarketType.TOTAL_PASSES]: {
565
+ id: MarketType.TOTAL_PASSES,
566
+ key: 'totalPasses',
567
+ name: 'Total passes',
568
+ resultType: ResultType.OVER_UNDER,
569
+ },
570
+ [MarketType.HOME_TEAM_TOTAL_PASSING_ATTEMPTS]: {
571
+ id: MarketType.HOME_TEAM_TOTAL_PASSING_ATTEMPTS,
572
+ key: 'homeTeamTotalPassingAttempts',
573
+ name: 'Total passing attempts',
574
+ resultType: ResultType.OVER_UNDER,
575
+ },
576
+ [MarketType.AWAY_TEAM_TOTAL_PASSING_ATTEMPTS]: {
577
+ id: MarketType.AWAY_TEAM_TOTAL_PASSING_ATTEMPTS,
578
+ key: 'awayTeamTotalPassingAttempts',
579
+ name: 'Total passing attempts',
580
+ resultType: ResultType.OVER_UNDER,
581
+ },
494
582
  };
@@ -47,6 +47,14 @@ export const WINNER_MARKET_TYPES = [
47
47
  MarketType.MOST_180,
48
48
  MarketType.HIGHEST_MATCH_CHECKOUT,
49
49
 
50
+ // Soccer – first minutes / highest scoring half
51
+ MarketType.FIRST_10_MINUTES_MONEYLINE,
52
+ MarketType.FIRST_15_MINUTES_MONEYLINE,
53
+ MarketType.FIRST_30_MINUTES_MONEYLINE,
54
+ MarketType.HIGHEST_SCORING_HALF,
55
+ MarketType.HOME_TEAM_HIGHEST_SCORING_HALF,
56
+ MarketType.AWAY_TEAM_HIGHEST_SCORING_HALF,
57
+
50
58
  // Dota – most towers destroyed (2-way & 3-way)
51
59
  MarketType.FIRST_PERIOD_MOST_TOWERS_DESTROYED_2_WAY,
52
60
  MarketType.FIRST_PERIOD_MOST_TOWERS_DESTROYED_3_WAY,
@@ -460,6 +468,12 @@ export const TOTAL_MARKET_TYPES = [
460
468
  MarketType.AWAY_TEAM_TOTAL_ASSISTS,
461
469
  MarketType.HOME_TEAM_TOTAL_FAULS,
462
470
  MarketType.AWAY_TEAM_TOTAL_FAULS,
471
+
472
+ // Soccer – passes / first minutes goals
473
+ MarketType.FIRST_10_MINUTES_TOTAL_GOALS,
474
+ MarketType.TOTAL_PASSES,
475
+ MarketType.HOME_TEAM_TOTAL_PASSING_ATTEMPTS,
476
+ MarketType.AWAY_TEAM_TOTAL_PASSING_ATTEMPTS,
463
477
  ];
464
478
 
465
479
  export const HOME_TEAM_TOTAL_MARKET_TYPES = [
@@ -517,6 +531,7 @@ export const HOME_TEAM_TOTAL_MARKET_TYPES = [
517
531
  MarketType.HOME_TEAM_TOTAL_STEALS,
518
532
  MarketType.HOME_TEAM_TOTAL_ASSISTS,
519
533
  MarketType.HOME_TEAM_TOTAL_FAULS,
534
+ MarketType.HOME_TEAM_TOTAL_PASSING_ATTEMPTS,
520
535
  ];
521
536
 
522
537
  export const AWAY_TEAM_TOTAL_MARKET_TYPES = [
@@ -574,6 +589,7 @@ export const AWAY_TEAM_TOTAL_MARKET_TYPES = [
574
589
  MarketType.AWAY_TEAM_TOTAL_STEALS,
575
590
  MarketType.AWAY_TEAM_TOTAL_ASSISTS,
576
591
  MarketType.AWAY_TEAM_TOTAL_FAULS,
592
+ MarketType.AWAY_TEAM_TOTAL_PASSING_ATTEMPTS,
577
593
  ];
578
594
 
579
595
  export const TOTAL_ODD_EVEN_MARKET_TYPES = [
@@ -791,6 +807,11 @@ export const PLAYER_PROPS_MARKET_TYPES = [
791
807
  MarketType.PLAYER_PROPS_TO_SCORE_AND_ASSIST,
792
808
  MarketType.PLAYER_PROPS_TO_SCORE_OR_ASSIST,
793
809
  MarketType.PLAYER_PROPS_FACEOFFS_WON,
810
+ MarketType.PLAYER_PROPS_CLEARANCES,
811
+ MarketType.PLAYER_PROPS_CROSSES,
812
+ MarketType.PLAYER_PROPS_DRIBBLE_ATTEMPTS,
813
+ MarketType.PLAYER_PROPS_PASSES_COMPLETED,
814
+ MarketType.PLAYER_PROPS_SOCCER_PASSING_ATTEMPTS,
794
815
  ];
795
816
 
796
817
  export const FUTURES_MARKET_TYPES = [
@@ -849,6 +870,7 @@ export const BOTH_TEAMS_TO_SCORE_MARKET_TYPES = [
849
870
  MarketType.SEVENTH_PERIOD_BOTH_TEAMS_TO_SCORE,
850
871
  MarketType.EIGHTH_PERIOD_BOTH_TEAMS_TO_SCORE,
851
872
  MarketType.NINTH_PERIOD_BOTH_TEAMS_TO_SCORE,
873
+ MarketType.BOTH_TEAMS_TO_SCORE_BOTH_HALVES,
852
874
  ];
853
875
 
854
876
  export const OTHER_YES_NO_MARKET_TYPES = [
@@ -894,6 +916,8 @@ export const OTHER_YES_NO_MARKET_TYPES = [
894
916
  MarketType.GOAL_BOTH_HALVES,
895
917
  MarketType.HOME_TEAM_TO_SCORE_BOTH_HALVES,
896
918
  MarketType.AWAY_TEAM_TO_SCORE_BOTH_HALVES,
919
+ MarketType.WILL_THERE_BE_A_PENALTY,
920
+ MarketType.WILL_THERE_BE_AN_OWN_GOAL,
897
921
  ];
898
922
 
899
923
  export const CORRECT_SCORE_MARKET_TYPES = [
@@ -1821,6 +1845,12 @@ export const YES_NO_OUTCOME_MARKET_TYPES = new Set<MarketType>([
1821
1845
  ...OTHER_YES_NO_MARKET_TYPES,
1822
1846
  ]);
1823
1847
 
1848
+ export const HIGHEST_SCORING_HALF_MARKET_TYPES = [
1849
+ MarketType.HIGHEST_SCORING_HALF,
1850
+ MarketType.HOME_TEAM_HIGHEST_SCORING_HALF,
1851
+ MarketType.AWAY_TEAM_HIGHEST_SCORING_HALF,
1852
+ ];
1853
+
1824
1854
  Object.keys(MarketTypeMap).forEach((key) => {
1825
1855
  const keyNum = Number(key);
1826
1856
  if (Number.isNaN(keyNum)) return;
@@ -246,6 +246,11 @@ export enum MarketType {
246
246
  PLAYER_PROPS_TO_SCORE_AND_ASSIST = 11302,
247
247
  PLAYER_PROPS_TO_SCORE_OR_ASSIST = 11303,
248
248
  PLAYER_PROPS_FACEOFFS_WON = 11308,
249
+ PLAYER_PROPS_CLEARANCES = 11309,
250
+ PLAYER_PROPS_CROSSES = 11310,
251
+ PLAYER_PROPS_DRIBBLE_ATTEMPTS = 11311,
252
+ PLAYER_PROPS_PASSES_COMPLETED = 11312,
253
+ PLAYER_PROPS_SOCCER_PASSING_ATTEMPTS = 11313,
249
254
 
250
255
  PLAYER_PROPS_OUTS = 11213,
251
256
  PLAYER_PROPS_RBIS = 11214,
@@ -881,4 +886,17 @@ export enum MarketType {
881
886
  AWAY_TEAM_TOTAL_ASSISTS = 10262, // line type total
882
887
  HOME_TEAM_TOTAL_FAULS = 10263, // line type total
883
888
  AWAY_TEAM_TOTAL_FAULS = 10264, // line type total
889
+ BOTH_TEAMS_TO_SCORE_BOTH_HALVES = 10265, // yes/no moneyline
890
+ WILL_THERE_BE_A_PENALTY = 10266, // yes/no moneyline
891
+ WILL_THERE_BE_AN_OWN_GOAL = 10267, // yes/no moneyline
892
+ FIRST_10_MINUTES_MONEYLINE = 10313, // moneyline 3-way
893
+ FIRST_10_MINUTES_TOTAL_GOALS = 10314, // line over/under
894
+ FIRST_15_MINUTES_MONEYLINE = 10315, // moneyline 3-way
895
+ FIRST_30_MINUTES_MONEYLINE = 10316, // moneyline 3-way
896
+ HIGHEST_SCORING_HALF = 10317, // moneyline 3-way (1st, 2nd, draw)
897
+ HOME_TEAM_HIGHEST_SCORING_HALF = 10318, // moneyline 3-way (1st, 2nd, draw)
898
+ AWAY_TEAM_HIGHEST_SCORING_HALF = 10319, // moneyline 3-way (1st, 2nd, draw)
899
+ TOTAL_PASSES = 10655, // line over/under
900
+ HOME_TEAM_TOTAL_PASSING_ATTEMPTS = 10656, // line over/under
901
+ AWAY_TEAM_TOTAL_PASSING_ATTEMPTS = 10657, // line over/under
884
902
  }
@@ -520,6 +520,7 @@ export enum League {
520
520
  NBA_FUTURES = 30004,
521
521
  NCAAB_FUTURES = 30005,
522
522
  NHL_FUTURES = 30006,
523
+ WNBA_FUTURES = 30008,
523
524
  EPL_FUTURES = 30011,
524
525
  LIGUE_ONE_FUTURES = 30012,
525
526
  BUNDESLIGA_FUTURES = 30013,
@@ -20,6 +20,7 @@ import {
20
20
  FIRST_THREE_INNINGS_MARKET_TYPES,
21
21
  FOURTH_PERIOD_MARKET_TYPES,
22
22
  FUTURES_MARKET_TYPES,
23
+ HIGHEST_SCORING_HALF_MARKET_TYPES,
23
24
  HOME_TEAM_MARKET_TYPES,
24
25
  HOME_TEAM_TOTAL_MARKET_TYPES,
25
26
  NINTH_PERIOD_MARKET_TYPES,
@@ -94,7 +95,9 @@ export const isDoubleChanceMarket = (marketType: MarketType) => DOUBLE_CHANCE_MA
94
95
  export const isCorrectScoreMarket = (marketType: MarketType) => CORRECT_SCORE_MARKET_TYPES.includes(marketType);
95
96
 
96
97
  export const isDrawAvailableMarket = (marketType: MarketType) =>
97
- WINNER_MARKET_TYPES.includes(marketType) || SCORE_MARKET_TYPES.includes(marketType);
98
+ WINNER_MARKET_TYPES.includes(marketType) ||
99
+ SCORE_MARKET_TYPES.includes(marketType) ||
100
+ HIGHEST_SCORING_HALF_MARKET_TYPES.includes(marketType);
98
101
 
99
102
  export const isPeriodMarket = (marketType: MarketType) => PERIOD_MARKET_TYPES.includes(marketType);
100
103
 
@@ -116,6 +119,9 @@ export const isAwayTeamMarket = (marketType: MarketType) => AWAY_TEAM_MARKET_TYP
116
119
 
117
120
  export const isScoreMarket = (marketType: MarketType) => SCORE_MARKET_TYPES.includes(marketType);
118
121
 
122
+ export const isHighestScoringHalfMarket = (marketType: MarketType) =>
123
+ HIGHEST_SCORING_HALF_MARKET_TYPES.includes(marketType);
124
+
119
125
  export const isOnlyOverPlayerPropsMarket = (marketType: MarketType, odds: number[]) =>
120
126
  isPlayerPropsMarket(marketType) && odds.length === 1;
121
127