overtime-utils 0.2.7 → 0.2.9
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
|
@@ -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,11 @@ 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
|
+
|
|
50
55
|
// Dota – most towers destroyed (2-way & 3-way)
|
|
51
56
|
MarketType.FIRST_PERIOD_MOST_TOWERS_DESTROYED_2_WAY,
|
|
52
57
|
MarketType.FIRST_PERIOD_MOST_TOWERS_DESTROYED_3_WAY,
|
|
@@ -460,6 +465,12 @@ export const TOTAL_MARKET_TYPES = [
|
|
|
460
465
|
MarketType.AWAY_TEAM_TOTAL_ASSISTS,
|
|
461
466
|
MarketType.HOME_TEAM_TOTAL_FAULS,
|
|
462
467
|
MarketType.AWAY_TEAM_TOTAL_FAULS,
|
|
468
|
+
|
|
469
|
+
// Soccer – passes / first minutes goals
|
|
470
|
+
MarketType.FIRST_10_MINUTES_TOTAL_GOALS,
|
|
471
|
+
MarketType.TOTAL_PASSES,
|
|
472
|
+
MarketType.HOME_TEAM_TOTAL_PASSING_ATTEMPTS,
|
|
473
|
+
MarketType.AWAY_TEAM_TOTAL_PASSING_ATTEMPTS,
|
|
463
474
|
];
|
|
464
475
|
|
|
465
476
|
export const HOME_TEAM_TOTAL_MARKET_TYPES = [
|
|
@@ -517,6 +528,8 @@ export const HOME_TEAM_TOTAL_MARKET_TYPES = [
|
|
|
517
528
|
MarketType.HOME_TEAM_TOTAL_STEALS,
|
|
518
529
|
MarketType.HOME_TEAM_TOTAL_ASSISTS,
|
|
519
530
|
MarketType.HOME_TEAM_TOTAL_FAULS,
|
|
531
|
+
MarketType.HOME_TEAM_TOTAL_PASSING_ATTEMPTS,
|
|
532
|
+
MarketType.HOME_TEAM_HIGHEST_SCORING_HALF,
|
|
520
533
|
];
|
|
521
534
|
|
|
522
535
|
export const AWAY_TEAM_TOTAL_MARKET_TYPES = [
|
|
@@ -574,6 +587,8 @@ export const AWAY_TEAM_TOTAL_MARKET_TYPES = [
|
|
|
574
587
|
MarketType.AWAY_TEAM_TOTAL_STEALS,
|
|
575
588
|
MarketType.AWAY_TEAM_TOTAL_ASSISTS,
|
|
576
589
|
MarketType.AWAY_TEAM_TOTAL_FAULS,
|
|
590
|
+
MarketType.AWAY_TEAM_TOTAL_PASSING_ATTEMPTS,
|
|
591
|
+
MarketType.AWAY_TEAM_HIGHEST_SCORING_HALF,
|
|
577
592
|
];
|
|
578
593
|
|
|
579
594
|
export const TOTAL_ODD_EVEN_MARKET_TYPES = [
|
|
@@ -791,6 +806,11 @@ export const PLAYER_PROPS_MARKET_TYPES = [
|
|
|
791
806
|
MarketType.PLAYER_PROPS_TO_SCORE_AND_ASSIST,
|
|
792
807
|
MarketType.PLAYER_PROPS_TO_SCORE_OR_ASSIST,
|
|
793
808
|
MarketType.PLAYER_PROPS_FACEOFFS_WON,
|
|
809
|
+
MarketType.PLAYER_PROPS_CLEARANCES,
|
|
810
|
+
MarketType.PLAYER_PROPS_CROSSES,
|
|
811
|
+
MarketType.PLAYER_PROPS_DRIBBLE_ATTEMPTS,
|
|
812
|
+
MarketType.PLAYER_PROPS_PASSES_COMPLETED,
|
|
813
|
+
MarketType.PLAYER_PROPS_SOCCER_PASSING_ATTEMPTS,
|
|
794
814
|
];
|
|
795
815
|
|
|
796
816
|
export const FUTURES_MARKET_TYPES = [
|
|
@@ -849,6 +869,7 @@ export const BOTH_TEAMS_TO_SCORE_MARKET_TYPES = [
|
|
|
849
869
|
MarketType.SEVENTH_PERIOD_BOTH_TEAMS_TO_SCORE,
|
|
850
870
|
MarketType.EIGHTH_PERIOD_BOTH_TEAMS_TO_SCORE,
|
|
851
871
|
MarketType.NINTH_PERIOD_BOTH_TEAMS_TO_SCORE,
|
|
872
|
+
MarketType.BOTH_TEAMS_TO_SCORE_BOTH_HALVES,
|
|
852
873
|
];
|
|
853
874
|
|
|
854
875
|
export const OTHER_YES_NO_MARKET_TYPES = [
|
|
@@ -894,6 +915,8 @@ export const OTHER_YES_NO_MARKET_TYPES = [
|
|
|
894
915
|
MarketType.GOAL_BOTH_HALVES,
|
|
895
916
|
MarketType.HOME_TEAM_TO_SCORE_BOTH_HALVES,
|
|
896
917
|
MarketType.AWAY_TEAM_TO_SCORE_BOTH_HALVES,
|
|
918
|
+
MarketType.WILL_THERE_BE_A_PENALTY,
|
|
919
|
+
MarketType.WILL_THERE_BE_AN_OWN_GOAL,
|
|
897
920
|
];
|
|
898
921
|
|
|
899
922
|
export const CORRECT_SCORE_MARKET_TYPES = [
|
|
@@ -1821,6 +1844,12 @@ export const YES_NO_OUTCOME_MARKET_TYPES = new Set<MarketType>([
|
|
|
1821
1844
|
...OTHER_YES_NO_MARKET_TYPES,
|
|
1822
1845
|
]);
|
|
1823
1846
|
|
|
1847
|
+
export const HIGHEST_SCORING_HALF_MARKET_TYPES = [
|
|
1848
|
+
MarketType.HIGHEST_SCORING_HALF,
|
|
1849
|
+
MarketType.HOME_TEAM_HIGHEST_SCORING_HALF,
|
|
1850
|
+
MarketType.AWAY_TEAM_HIGHEST_SCORING_HALF,
|
|
1851
|
+
];
|
|
1852
|
+
|
|
1824
1853
|
Object.keys(MarketTypeMap).forEach((key) => {
|
|
1825
1854
|
const keyNum = Number(key);
|
|
1826
1855
|
if (Number.isNaN(keyNum)) return;
|
package/src/enums/marketTypes.ts
CHANGED
|
@@ -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
|
}
|
package/src/utils/markets.ts
CHANGED
|
@@ -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) ||
|
|
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
|
|