overtime-utils 0.2.39 → 0.2.40-rc.0

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,21 +1,21 @@
1
- {
2
- "name": "overtime-utils",
3
- "version": "0.2.39",
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.40-rc.0",
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
+ }
@@ -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
  };
@@ -1041,6 +1041,11 @@ export const UFC_WINNING_ROUND_MARKET_TYPES = [MarketType.WINNING_ROUND];
1041
1041
  export const UFC_ENDING_METHOD_MARKET_TYPES = [MarketType.ENDING_METHOD];
1042
1042
  export const UFC_METHOD_OF_VICTORY_MARKET_TYPES = [MarketType.METHOD_OF_VICTORY];
1043
1043
 
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
+
1044
1049
  export const DOUBLE_CHANCE_MARKET_TYPES = [
1045
1050
  MarketType.DOUBLE_CHANCE,
1046
1051
  MarketType.FIRST_PERIOD_DOUBLE_CHANCE,
@@ -980,6 +980,7 @@ export enum MarketType {
980
980
  SECOND_PERIOD_WILL_THERE_BE_A_RED_CARD = 10666, // yes/no moneyline
981
981
  HOME_TEAM_TO_SCORE_PENALTY = 10667, // yes/no moneyline
982
982
  AWAY_TEAM_TO_SCORE_PENALTY = 10668, // yes/no moneyline
983
+ METHOD_OF_VICTORY_SOCCER = 10669, //
983
984
  // Who will score first/last per period - half for soccer
984
985
  FIRST_PERIOD_FIRST_SCORE = 10294, // who scores first in 1st half
985
986
  SECOND_PERIOD_FIRST_SCORE = 10295, // who scores first in 2nd half
@@ -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) ||
@@ -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 === MarketType.METHOD_OF_VICTORY) return OutcomeGroup.METHOD_OF_VICTORY;
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: {
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(node *)",
5
- "Bash(npx tsc *)",
6
- "Bash(echo \"EXIT:$?\")",
7
- "Bash(npm view *)",
8
- "Bash(git stash *)",
9
- "Bash(npm run *)"
10
- ]
11
- }
12
- }