overtime-utils 0.2.40-rc.0 → 0.2.41
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/.claude/settings.local.json +12 -0
- package/main.js +1 -1
- package/package.json +21 -21
- package/src/constants/marketTypes/futures.ts +10 -1
- package/src/constants/marketTypes/soccer.ts +0 -6
- package/src/constants/marketTypes.ts +2 -5
- package/src/enums/marketTypes.ts +1 -1
- package/src/utils/markets.ts +0 -5
- package/src/utils/outcomes.ts +1 -2
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "overtime-utils",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "main.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"pack": "webpack --mode production",
|
|
8
|
-
"prepublish": "npm run pack"
|
|
9
|
-
},
|
|
10
|
-
"author": "",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"bytes32": "^0.0.3"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"ts-loader": "^9.5.0",
|
|
17
|
-
"typescript": "^5.0.4",
|
|
18
|
-
"webpack": "^5.89.0",
|
|
19
|
-
"webpack-cli": "^5.1.4"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "overtime-utils",
|
|
3
|
+
"version": "0.2.41",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "main.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"pack": "webpack --mode production",
|
|
8
|
+
"prepublish": "npm run pack"
|
|
9
|
+
},
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"bytes32": "^0.0.3"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"ts-loader": "^9.5.0",
|
|
17
|
+
"typescript": "^5.0.4",
|
|
18
|
+
"webpack": "^5.89.0",
|
|
19
|
+
"webpack-cli": "^5.1.4"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -21,6 +21,12 @@ export const FUTURES_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>
|
|
|
21
21
|
name: 'Cup winner',
|
|
22
22
|
resultType: ResultType.EXACT_POSITION,
|
|
23
23
|
},
|
|
24
|
+
[MarketType.TO_MAKE_PLAYOFFS]: {
|
|
25
|
+
id: MarketType.TO_MAKE_PLAYOFFS,
|
|
26
|
+
key: 'toMakePlayoffs',
|
|
27
|
+
name: 'To make playoffs',
|
|
28
|
+
resultType: ResultType.EXACT_POSITION,
|
|
29
|
+
},
|
|
24
30
|
[MarketType.TO_MAKE_FINAL_FOUR]: {
|
|
25
31
|
id: MarketType.TO_MAKE_FINAL_FOUR,
|
|
26
32
|
key: 'toMakeFinalFour',
|
|
@@ -317,7 +323,10 @@ export const FUTURES_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>
|
|
|
317
323
|
[MarketType.FINAL_EXACTA]: {
|
|
318
324
|
id: MarketType.FINAL_EXACTA,
|
|
319
325
|
key: 'finalExacta',
|
|
320
|
-
|
|
326
|
+
// Both finalists in exact order — the team listed first in an outcome wins the final
|
|
327
|
+
// (e.g. Super Bowl), the second is runner-up. Named for clarity over the "exacta" term.
|
|
328
|
+
name: 'Matchup and winner',
|
|
329
|
+
tooltipKey: 'matchup-and-winner',
|
|
321
330
|
resultType: ResultType.EXACT_POSITION,
|
|
322
331
|
},
|
|
323
332
|
[MarketType.REGULAR_SEASON_WINS]: {
|
|
@@ -697,10 +697,4 @@ export const SOCCER_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>>
|
|
|
697
697
|
name: 'Total offsides',
|
|
698
698
|
resultType: ResultType.OVER_UNDER,
|
|
699
699
|
},
|
|
700
|
-
[MarketType.METHOD_OF_VICTORY_SOCCER]: {
|
|
701
|
-
id: MarketType.METHOD_OF_VICTORY_SOCCER,
|
|
702
|
-
key: 'methodOfVictory',
|
|
703
|
-
name: 'Method of victory',
|
|
704
|
-
resultType: ResultType.EXACT_POSITION,
|
|
705
|
-
},
|
|
706
700
|
};
|
|
@@ -843,6 +843,7 @@ export const FUTURES_MARKET_TYPES = [
|
|
|
843
843
|
MarketType.LEAGUE_WINNER,
|
|
844
844
|
MarketType.MVP,
|
|
845
845
|
MarketType.CUP_WINNER,
|
|
846
|
+
MarketType.TO_MAKE_PLAYOFFS,
|
|
846
847
|
MarketType.TO_MAKE_FINAL_FOUR,
|
|
847
848
|
MarketType.RACE_WINNER,
|
|
848
849
|
MarketType.RACE_PODIUM,
|
|
@@ -959,6 +960,7 @@ export const OTHER_YES_NO_MARKET_TYPES = [
|
|
|
959
960
|
MarketType.GO_THE_DISTANCE,
|
|
960
961
|
MarketType.WILL_FIGHT_END_IN_FIRST_MINUTE,
|
|
961
962
|
MarketType.WILL_POINT_BE_DEDUCTED,
|
|
963
|
+
MarketType.TO_MAKE_PLAYOFFS,
|
|
962
964
|
MarketType.TO_MAKE_FINAL_FOUR,
|
|
963
965
|
MarketType.WILL_THERE_BE_CENTURY,
|
|
964
966
|
MarketType.WILL_THERE_BE_FIFTY,
|
|
@@ -1041,11 +1043,6 @@ export const UFC_WINNING_ROUND_MARKET_TYPES = [MarketType.WINNING_ROUND];
|
|
|
1041
1043
|
export const UFC_ENDING_METHOD_MARKET_TYPES = [MarketType.ENDING_METHOD];
|
|
1042
1044
|
export const UFC_METHOD_OF_VICTORY_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY];
|
|
1043
1045
|
|
|
1044
|
-
export const SOCCER_SPECIFIC_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY_SOCCER];
|
|
1045
|
-
export const SOCCER_METHOD_OF_VICTORY_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY_SOCCER];
|
|
1046
|
-
|
|
1047
|
-
export const METHOD_OF_VICTORY_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY, MarketType.METHOD_OF_VICTORY_SOCCER];
|
|
1048
|
-
|
|
1049
1046
|
export const DOUBLE_CHANCE_MARKET_TYPES = [
|
|
1050
1047
|
MarketType.DOUBLE_CHANCE,
|
|
1051
1048
|
MarketType.FIRST_PERIOD_DOUBLE_CHANCE,
|
package/src/enums/marketTypes.ts
CHANGED
|
@@ -383,6 +383,7 @@ export enum MarketType {
|
|
|
383
383
|
LEAGUE_WINNER = 13001,
|
|
384
384
|
MVP = 13002,
|
|
385
385
|
CUP_WINNER = 13003,
|
|
386
|
+
TO_MAKE_PLAYOFFS = 13004,
|
|
386
387
|
TO_MAKE_FINAL_FOUR = 13005,
|
|
387
388
|
RACE_WINNER = 13006,
|
|
388
389
|
RACE_PODIUM = 13007,
|
|
@@ -980,7 +981,6 @@ export enum MarketType {
|
|
|
980
981
|
SECOND_PERIOD_WILL_THERE_BE_A_RED_CARD = 10666, // yes/no moneyline
|
|
981
982
|
HOME_TEAM_TO_SCORE_PENALTY = 10667, // yes/no moneyline
|
|
982
983
|
AWAY_TEAM_TO_SCORE_PENALTY = 10668, // yes/no moneyline
|
|
983
|
-
METHOD_OF_VICTORY_SOCCER = 10669, //
|
|
984
984
|
// Who will score first/last per period - half for soccer
|
|
985
985
|
FIRST_PERIOD_FIRST_SCORE = 10294, // who scores first in 1st half
|
|
986
986
|
SECOND_PERIOD_FIRST_SCORE = 10295, // who scores first in 2nd half
|
package/src/utils/markets.ts
CHANGED
|
@@ -38,8 +38,6 @@ import {
|
|
|
38
38
|
SGP_BUILDER_MARKET_TYPES,
|
|
39
39
|
SGP_NOT_SUPPORTED_MARKET_TYPES,
|
|
40
40
|
SIXTH_PERIOD_MARKET_TYPES,
|
|
41
|
-
SOCCER_METHOD_OF_VICTORY_MARKET_TYPES,
|
|
42
|
-
SOCCER_SPECIFIC_MARKET_TYPES,
|
|
43
41
|
SOCCER_TOTAL_MARKET_TYPES,
|
|
44
42
|
SPREAD_MARKET_TYPES,
|
|
45
43
|
THIRD_PERIOD_MARKET_TYPES,
|
|
@@ -136,9 +134,6 @@ export const isUfcWinningMarket = (marketType: MarketType) => UFC_WINNING_ROUND_
|
|
|
136
134
|
export const isEndingUfcMarket = (marketType: MarketType) => UFC_ENDING_METHOD_MARKET_TYPES.includes(marketType);
|
|
137
135
|
export const isUfcVictoryMarket = (marketType: MarketType) => UFC_METHOD_OF_VICTORY_MARKET_TYPES.includes(marketType);
|
|
138
136
|
|
|
139
|
-
export const isSoccerSpecificMarket = (marketType: MarketType) => SOCCER_SPECIFIC_MARKET_TYPES.includes(marketType);
|
|
140
|
-
export const isSoccerMethodOfVictoryMarket = (marketType: MarketType) => SOCCER_METHOD_OF_VICTORY_MARKET_TYPES.includes(marketType);
|
|
141
|
-
|
|
142
137
|
export const isContractResultView = (marketType: MarketType) =>
|
|
143
138
|
CORNERS_MARKET_TYPES.includes(marketType) ||
|
|
144
139
|
CARDS_MARKET_TYPES.includes(marketType) ||
|
package/src/utils/outcomes.ts
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
DOUBLE_CHANCE_MARKET_TYPES,
|
|
5
5
|
DRAW_NO_BET_MARKET_TYPES,
|
|
6
6
|
HOME_TEAM_MARKET_TYPES,
|
|
7
|
-
METHOD_OF_VICTORY_MARKET_TYPES,
|
|
8
7
|
SCORE_MARKET_TYPES,
|
|
9
8
|
TOTAL_EXACT_MARKET_TYPES,
|
|
10
9
|
TOTAL_ODD_EVEN_MARKET_TYPES,
|
|
@@ -345,7 +344,7 @@ const getOutcomeGroup = (marketType: MarketType, resultType?: ResultType): Outco
|
|
|
345
344
|
if (marketType === MarketType.HALFTIME_FULLTIME) return OutcomeGroup.HALFTIME_FULLTIME;
|
|
346
345
|
if (marketType === MarketType.WINNING_ROUND) return OutcomeGroup.WINNING_ROUND;
|
|
347
346
|
if (marketType === MarketType.ENDING_METHOD) return OutcomeGroup.ENDING_METHOD;
|
|
348
|
-
if (
|
|
347
|
+
if (marketType === MarketType.METHOD_OF_VICTORY) return OutcomeGroup.METHOD_OF_VICTORY;
|
|
349
348
|
if (!resultType) return undefined;
|
|
350
349
|
switch (resultType) {
|
|
351
350
|
case ResultType.OVER_UNDER: {
|