overtime-utils 0.2.41 → 0.2.43
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/marketTypes/playerProps.ts +18 -0
- package/src/constants/marketTypes/soccer.ts +6 -0
- package/src/constants/marketTypes.ts +8 -0
- package/src/enums/marketTypes.ts +5 -0
- package/src/utils/markets.ts +5 -0
- package/src/utils/outcomes.ts +2 -1
- package/.claude/settings.local.json +0 -12
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.43",
|
|
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
|
+
}
|
|
@@ -296,6 +296,24 @@ export const PLAYER_PROPS_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketType
|
|
|
296
296
|
name: 'Walks allowed',
|
|
297
297
|
resultType: ResultType.OVER_UNDER,
|
|
298
298
|
},
|
|
299
|
+
[MarketType.PLAYER_PROPS_HITS_RUNS_STOLEN_BASES]: {
|
|
300
|
+
id: MarketType.PLAYER_PROPS_HITS_RUNS_STOLEN_BASES,
|
|
301
|
+
key: 'hitsRunsStolenBases',
|
|
302
|
+
name: 'Hits + Runs + Stolen bases',
|
|
303
|
+
resultType: ResultType.OVER_UNDER,
|
|
304
|
+
},
|
|
305
|
+
[MarketType.PLAYER_PROPS_HITS_STOLEN_BASES]: {
|
|
306
|
+
id: MarketType.PLAYER_PROPS_HITS_STOLEN_BASES,
|
|
307
|
+
key: 'hitsStolenBases',
|
|
308
|
+
name: 'Hits + Stolen bases',
|
|
309
|
+
resultType: ResultType.OVER_UNDER,
|
|
310
|
+
},
|
|
311
|
+
[MarketType.PLAYER_PROPS_HITS_WALKS_STOLEN_BASES]: {
|
|
312
|
+
id: MarketType.PLAYER_PROPS_HITS_WALKS_STOLEN_BASES,
|
|
313
|
+
key: 'hitsWalksStolenBases',
|
|
314
|
+
name: 'Hits + Walks + Stolen bases',
|
|
315
|
+
resultType: ResultType.OVER_UNDER,
|
|
316
|
+
},
|
|
299
317
|
// Basketball player props
|
|
300
318
|
[MarketType.PLAYER_PROPS_POINTS_ASSISTS]: {
|
|
301
319
|
id: MarketType.PLAYER_PROPS_POINTS_ASSISTS,
|
|
@@ -697,4 +697,10 @@ 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
|
+
},
|
|
700
706
|
};
|
|
@@ -741,6 +741,9 @@ export const PLAYER_PROPS_MARKET_TYPES = [
|
|
|
741
741
|
MarketType.PLAYER_PROPS_STOLEN_BASES,
|
|
742
742
|
MarketType.PLAYER_PROPS_RUNS,
|
|
743
743
|
MarketType.PLAYER_PROPS_WALKS,
|
|
744
|
+
MarketType.PLAYER_PROPS_HITS_RUNS_STOLEN_BASES,
|
|
745
|
+
MarketType.PLAYER_PROPS_HITS_STOLEN_BASES,
|
|
746
|
+
MarketType.PLAYER_PROPS_HITS_WALKS_STOLEN_BASES,
|
|
744
747
|
MarketType.PLAYER_PROPS_POINTS_ASSISTS,
|
|
745
748
|
MarketType.PLAYER_PROPS_POINTS_REBOUNDS,
|
|
746
749
|
MarketType.PLAYER_PROPS_POINTS_REBOUNDS_ASSISTS,
|
|
@@ -1043,6 +1046,11 @@ export const UFC_WINNING_ROUND_MARKET_TYPES = [MarketType.WINNING_ROUND];
|
|
|
1043
1046
|
export const UFC_ENDING_METHOD_MARKET_TYPES = [MarketType.ENDING_METHOD];
|
|
1044
1047
|
export const UFC_METHOD_OF_VICTORY_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY];
|
|
1045
1048
|
|
|
1049
|
+
export const SOCCER_SPECIFIC_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY_SOCCER];
|
|
1050
|
+
export const SOCCER_METHOD_OF_VICTORY_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY_SOCCER];
|
|
1051
|
+
|
|
1052
|
+
export const METHOD_OF_VICTORY_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY, MarketType.METHOD_OF_VICTORY_SOCCER];
|
|
1053
|
+
|
|
1046
1054
|
export const DOUBLE_CHANCE_MARKET_TYPES = [
|
|
1047
1055
|
MarketType.DOUBLE_CHANCE,
|
|
1048
1056
|
MarketType.FIRST_PERIOD_DOUBLE_CHANCE,
|
package/src/enums/marketTypes.ts
CHANGED
|
@@ -273,6 +273,10 @@ export enum MarketType {
|
|
|
273
273
|
SECOND_PERIOD_PLAYER_PROPS_SHOTS = 11323,
|
|
274
274
|
FIRST_PERIOD_PLAYER_PROPS_SHOTS_ON_TARGET = 11324,
|
|
275
275
|
SECOND_PERIOD_PLAYER_PROPS_SHOTS_ON_TARGET = 11325,
|
|
276
|
+
// Baseball player props market types
|
|
277
|
+
PLAYER_PROPS_HITS_RUNS_STOLEN_BASES = 11326,
|
|
278
|
+
PLAYER_PROPS_HITS_STOLEN_BASES = 11327,
|
|
279
|
+
PLAYER_PROPS_HITS_WALKS_STOLEN_BASES = 11328,
|
|
276
280
|
|
|
277
281
|
PLAYER_PROPS_OUTS = 11213,
|
|
278
282
|
PLAYER_PROPS_RBIS = 11214,
|
|
@@ -981,6 +985,7 @@ export enum MarketType {
|
|
|
981
985
|
SECOND_PERIOD_WILL_THERE_BE_A_RED_CARD = 10666, // yes/no moneyline
|
|
982
986
|
HOME_TEAM_TO_SCORE_PENALTY = 10667, // yes/no moneyline
|
|
983
987
|
AWAY_TEAM_TO_SCORE_PENALTY = 10668, // yes/no moneyline
|
|
988
|
+
METHOD_OF_VICTORY_SOCCER = 10669, //
|
|
984
989
|
// Who will score first/last per period - half for soccer
|
|
985
990
|
FIRST_PERIOD_FIRST_SCORE = 10294, // who scores first in 1st half
|
|
986
991
|
SECOND_PERIOD_FIRST_SCORE = 10295, // who scores first in 2nd half
|
package/src/utils/markets.ts
CHANGED
|
@@ -38,6 +38,8 @@ 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,
|
|
41
43
|
SOCCER_TOTAL_MARKET_TYPES,
|
|
42
44
|
SPREAD_MARKET_TYPES,
|
|
43
45
|
THIRD_PERIOD_MARKET_TYPES,
|
|
@@ -134,6 +136,9 @@ export const isUfcWinningMarket = (marketType: MarketType) => UFC_WINNING_ROUND_
|
|
|
134
136
|
export const isEndingUfcMarket = (marketType: MarketType) => UFC_ENDING_METHOD_MARKET_TYPES.includes(marketType);
|
|
135
137
|
export const isUfcVictoryMarket = (marketType: MarketType) => UFC_METHOD_OF_VICTORY_MARKET_TYPES.includes(marketType);
|
|
136
138
|
|
|
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
|
+
|
|
137
142
|
export const isContractResultView = (marketType: MarketType) =>
|
|
138
143
|
CORNERS_MARKET_TYPES.includes(marketType) ||
|
|
139
144
|
CARDS_MARKET_TYPES.includes(marketType) ||
|
package/src/utils/outcomes.ts
CHANGED
|
@@ -4,6 +4,7 @@ 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,
|
|
7
8
|
SCORE_MARKET_TYPES,
|
|
8
9
|
TOTAL_EXACT_MARKET_TYPES,
|
|
9
10
|
TOTAL_ODD_EVEN_MARKET_TYPES,
|
|
@@ -344,7 +345,7 @@ const getOutcomeGroup = (marketType: MarketType, resultType?: ResultType): Outco
|
|
|
344
345
|
if (marketType === MarketType.HALFTIME_FULLTIME) return OutcomeGroup.HALFTIME_FULLTIME;
|
|
345
346
|
if (marketType === MarketType.WINNING_ROUND) return OutcomeGroup.WINNING_ROUND;
|
|
346
347
|
if (marketType === MarketType.ENDING_METHOD) return OutcomeGroup.ENDING_METHOD;
|
|
347
|
-
if (marketType
|
|
348
|
+
if (METHOD_OF_VICTORY_MARKET_TYPES.includes(marketType)) return OutcomeGroup.METHOD_OF_VICTORY;
|
|
348
349
|
if (!resultType) return undefined;
|
|
349
350
|
switch (resultType) {
|
|
350
351
|
case ResultType.OVER_UNDER: {
|