overtime-utils 0.1.98 → 0.1.99

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.
@@ -0,0 +1,398 @@
1
+ import { MarketType, ResultType } from '../../enums/marketTypes';
2
+ import { MarketTypeInfo } from '../../types/marketTypes';
3
+
4
+ export const TOTAL_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>> = {
5
+ // Total
6
+ [MarketType.TOTAL]: {
7
+ id: MarketType.TOTAL,
8
+ key: 'total',
9
+ name: 'Total',
10
+ resultType: ResultType.OVER_UNDER,
11
+ },
12
+ // Total - sets for tennis
13
+ [MarketType.TOTAL2]: {
14
+ id: MarketType.TOTAL2,
15
+ key: 'total2',
16
+ name: 'Total',
17
+ resultType: ResultType.OVER_UNDER,
18
+ },
19
+ // Total period - half for soccer, quarter for basketball
20
+ [MarketType.FIRST_PERIOD_TOTAL]: {
21
+ id: MarketType.FIRST_PERIOD_TOTAL,
22
+ key: 'firstPeriodTotal',
23
+ name: 'Total 1st',
24
+ resultType: ResultType.OVER_UNDER,
25
+ },
26
+ [MarketType.SECOND_PERIOD_TOTAL]: {
27
+ id: MarketType.SECOND_PERIOD_TOTAL,
28
+ key: 'secondPeriodTotal',
29
+ name: 'Total 2nd',
30
+ resultType: ResultType.OVER_UNDER,
31
+ },
32
+ [MarketType.THIRD_PERIOD_TOTAL]: {
33
+ id: MarketType.THIRD_PERIOD_TOTAL,
34
+ key: 'thirdPeriodTotal',
35
+ name: 'Total 3rd',
36
+ resultType: ResultType.OVER_UNDER,
37
+ },
38
+ [MarketType.FOURTH_PERIOD_TOTAL]: {
39
+ id: MarketType.FOURTH_PERIOD_TOTAL,
40
+ key: 'fourthPeriodTotal',
41
+ name: 'Total 4th',
42
+ resultType: ResultType.OVER_UNDER,
43
+ },
44
+ [MarketType.FIFTH_PERIOD_TOTAL]: {
45
+ id: MarketType.FIFTH_PERIOD_TOTAL,
46
+ key: 'fifthPeriodTotal',
47
+ name: 'Total 5th',
48
+ resultType: ResultType.OVER_UNDER,
49
+ },
50
+ [MarketType.SIXTH_PERIOD_TOTAL]: {
51
+ id: MarketType.SIXTH_PERIOD_TOTAL,
52
+ key: 'sixthPeriodTotal',
53
+ name: 'Total 6th',
54
+ resultType: ResultType.OVER_UNDER,
55
+ },
56
+ [MarketType.SEVENTH_PERIOD_TOTAL]: {
57
+ id: MarketType.SEVENTH_PERIOD_TOTAL,
58
+ key: 'seventhPeriodTotal',
59
+ name: 'Total 7th',
60
+ resultType: ResultType.OVER_UNDER,
61
+ },
62
+ [MarketType.EIGHTH_PERIOD_TOTAL]: {
63
+ id: MarketType.EIGHTH_PERIOD_TOTAL,
64
+ key: 'eightPeriodTotal',
65
+ name: 'Total 8th',
66
+ resultType: ResultType.OVER_UNDER,
67
+ },
68
+ [MarketType.NINTH_PERIOD_TOTAL]: {
69
+ id: MarketType.NINTH_PERIOD_TOTAL,
70
+ key: 'ninthPeriodTotal',
71
+ name: 'Total 9th',
72
+ resultType: ResultType.OVER_UNDER,
73
+ },
74
+ // Total period - half for basketball
75
+ [MarketType.FIRST_PERIOD_TOTAL2]: {
76
+ id: MarketType.FIRST_PERIOD_TOTAL2,
77
+ key: 'firstPeriodTotal2',
78
+ name: 'Total 1st',
79
+ resultType: ResultType.OVER_UNDER,
80
+ },
81
+ [MarketType.SECOND_PERIOD_TOTAL2]: {
82
+ id: MarketType.SECOND_PERIOD_TOTAL2,
83
+ key: 'secondPeriodTotal',
84
+ name: 'Total 2nd',
85
+ resultType: ResultType.OVER_UNDER,
86
+ },
87
+ [MarketType.THIRD_PERIOD_TOTAL2]: {
88
+ id: MarketType.THIRD_PERIOD_TOTAL2,
89
+ key: 'thirdPeriodTotal2',
90
+ name: 'Total 3rd',
91
+ resultType: ResultType.OVER_UNDER,
92
+ },
93
+ [MarketType.FOURTH_PERIOD_TOTAL2]: {
94
+ id: MarketType.FOURTH_PERIOD_TOTAL2,
95
+ key: 'fourthPeriodTotal2',
96
+ name: 'Total 4th',
97
+ resultType: ResultType.OVER_UNDER,
98
+ },
99
+ [MarketType.FIFTH_PERIOD_TOTAL2]: {
100
+ id: MarketType.FIFTH_PERIOD_TOTAL2,
101
+ key: 'fifthPeriodTotal2',
102
+ name: 'Total 5th',
103
+ resultType: ResultType.OVER_UNDER,
104
+ },
105
+ [MarketType.SIXTH_PERIOD_TOTAL2]: {
106
+ id: MarketType.SIXTH_PERIOD_TOTAL2,
107
+ key: 'sixthPeriodTotal2',
108
+ name: 'Total 6th',
109
+ resultType: ResultType.OVER_UNDER,
110
+ },
111
+ [MarketType.SEVENTH_PERIOD_TOTAL2]: {
112
+ id: MarketType.SEVENTH_PERIOD_TOTAL2,
113
+ key: 'seventhPeriodTotal2',
114
+ name: 'Total 7th',
115
+ resultType: ResultType.OVER_UNDER,
116
+ },
117
+ [MarketType.EIGHTH_PERIOD_TOTAL2]: {
118
+ id: MarketType.EIGHTH_PERIOD_TOTAL2,
119
+ key: 'eightPeriodTotal2',
120
+ name: 'Total 8th',
121
+ resultType: ResultType.OVER_UNDER,
122
+ },
123
+ [MarketType.NINTH_PERIOD_TOTAL2]: {
124
+ id: MarketType.NINTH_PERIOD_TOTAL2,
125
+ key: 'ninthPeriodTotal2',
126
+ name: 'Total 9th',
127
+ resultType: ResultType.OVER_UNDER,
128
+ },
129
+ // Total per team
130
+ [MarketType.TOTAL_HOME_TEAM]: {
131
+ id: MarketType.TOTAL_HOME_TEAM,
132
+ key: 'totalHomeTeam',
133
+ name: 'Total',
134
+ resultType: ResultType.OVER_UNDER,
135
+ },
136
+ [MarketType.TOTAL_AWAY_TEAM]: {
137
+ id: MarketType.TOTAL_AWAY_TEAM,
138
+ key: 'totalAwayTeam',
139
+ name: 'Total',
140
+ resultType: ResultType.OVER_UNDER,
141
+ },
142
+
143
+ // Total per team period - half for soccer
144
+ [MarketType.FIRST_PERIOD_TOTAL_HOME_TEAM]: {
145
+ id: MarketType.FIRST_PERIOD_TOTAL_HOME_TEAM,
146
+ key: 'firstPeriodTotalHomeTeam',
147
+ name: 'Total 1st',
148
+ resultType: ResultType.OVER_UNDER,
149
+ },
150
+ [MarketType.FIRST_PERIOD_TOTAL_AWAY_TEAM]: {
151
+ id: MarketType.FIRST_PERIOD_TOTAL_AWAY_TEAM,
152
+ key: 'firstPeriodTotalAwayTeam',
153
+ name: 'Total 1st',
154
+ resultType: ResultType.OVER_UNDER,
155
+ },
156
+ [MarketType.SECOND_PERIOD_TOTAL_HOME_TEAM]: {
157
+ id: MarketType.SECOND_PERIOD_TOTAL_HOME_TEAM,
158
+ key: 'secondPeriodTotalHomeTeam',
159
+ name: 'Total 2nd',
160
+ resultType: ResultType.OVER_UNDER,
161
+ },
162
+ [MarketType.SECOND_PERIOD_TOTAL_AWAY_TEAM]: {
163
+ id: MarketType.SECOND_PERIOD_TOTAL_AWAY_TEAM,
164
+ key: 'secondPeriodTotalAwayTeam',
165
+ name: 'Total 2nd',
166
+ resultType: ResultType.OVER_UNDER,
167
+ },
168
+ [MarketType.THIRD_PERIOD_TOTAL_HOME_TEAM]: {
169
+ id: MarketType.THIRD_PERIOD_TOTAL_HOME_TEAM,
170
+ key: 'thirdPeriodTotalHomeTeam',
171
+ name: 'Total 3rd',
172
+ resultType: ResultType.OVER_UNDER,
173
+ },
174
+ [MarketType.THIRD_PERIOD_TOTAL_AWAY_TEAM]: {
175
+ id: MarketType.THIRD_PERIOD_TOTAL_AWAY_TEAM,
176
+ key: 'thirdPeriodTotalAwayTeam',
177
+ name: 'Total 3rd',
178
+ resultType: ResultType.OVER_UNDER,
179
+ },
180
+ [MarketType.FOURTH_PERIOD_TOTAL_HOME_TEAM]: {
181
+ id: MarketType.FOURTH_PERIOD_TOTAL_HOME_TEAM,
182
+ key: 'fourthPeriodTotalHomeTeam',
183
+ name: 'Total 4th',
184
+ resultType: ResultType.OVER_UNDER,
185
+ },
186
+ [MarketType.FOURTH_PERIOD_TOTAL_AWAY_TEAM]: {
187
+ id: MarketType.FOURTH_PERIOD_TOTAL_AWAY_TEAM,
188
+ key: 'fourthPeriodTotalAwayTeam',
189
+ name: 'Total 4th',
190
+ resultType: ResultType.OVER_UNDER,
191
+ },
192
+ [MarketType.FIFTH_PERIOD_TOTAL_HOME_TEAM]: {
193
+ id: MarketType.FIFTH_PERIOD_TOTAL_HOME_TEAM,
194
+ key: 'fifthPeriodTotalHomeTeam',
195
+ name: 'Total 5th',
196
+ resultType: ResultType.OVER_UNDER,
197
+ },
198
+ [MarketType.FIFTH_PERIOD_TOTAL_AWAY_TEAM]: {
199
+ id: MarketType.FIFTH_PERIOD_TOTAL_AWAY_TEAM,
200
+ key: 'fifthPeriodTotalAwayTeam',
201
+ name: 'Total 5th',
202
+ resultType: ResultType.OVER_UNDER,
203
+ },
204
+ [MarketType.SIXTH_PERIOD_TOTAL_HOME_TEAM]: {
205
+ id: MarketType.SIXTH_PERIOD_TOTAL_HOME_TEAM,
206
+ key: 'sixthPeriodTotalHomeTeam',
207
+ name: 'Total 6th',
208
+ resultType: ResultType.OVER_UNDER,
209
+ },
210
+ [MarketType.SIXTH_PERIOD_TOTAL_AWAY_TEAM]: {
211
+ id: MarketType.SIXTH_PERIOD_TOTAL_AWAY_TEAM,
212
+ key: 'sixthPeriodTotalAwayTeam',
213
+ name: 'Total 6th',
214
+ resultType: ResultType.OVER_UNDER,
215
+ },
216
+ [MarketType.SEVENTH_PERIOD_TOTAL_HOME_TEAM]: {
217
+ id: MarketType.SEVENTH_PERIOD_TOTAL_HOME_TEAM,
218
+ key: 'seventhPeriodTotalHomeTeam',
219
+ name: 'Total 7th',
220
+ resultType: ResultType.OVER_UNDER,
221
+ },
222
+ [MarketType.SEVENTH_PERIOD_TOTAL_AWAY_TEAM]: {
223
+ id: MarketType.SEVENTH_PERIOD_TOTAL_AWAY_TEAM,
224
+ key: 'seventhPeriodTotalAwayTeam',
225
+ name: 'Total 7th',
226
+ resultType: ResultType.OVER_UNDER,
227
+ },
228
+ [MarketType.EIGHT_PERIOD_TOTAL_HOME_TEAM]: {
229
+ id: MarketType.EIGHT_PERIOD_TOTAL_HOME_TEAM,
230
+ key: 'eightPeriodTotalHomeTeam',
231
+ name: 'Total 8th',
232
+ resultType: ResultType.OVER_UNDER,
233
+ },
234
+ [MarketType.EIGHT_PERIOD_TOTAL_AWAY_TEAM]: {
235
+ id: MarketType.EIGHT_PERIOD_TOTAL_AWAY_TEAM,
236
+ key: 'eightPeriodTotalAwayTeam',
237
+ name: 'Total 8th',
238
+ resultType: ResultType.OVER_UNDER,
239
+ },
240
+
241
+ // Total per team period - half for basketball
242
+ [MarketType.FIRST_PERIOD_TOTAL2_HOME_TEAM]: {
243
+ id: MarketType.FIRST_PERIOD_TOTAL2_HOME_TEAM,
244
+ key: 'firstPeriodTotal2HomeTeam',
245
+ name: 'Total 1st',
246
+ resultType: ResultType.OVER_UNDER,
247
+ },
248
+ [MarketType.FIRST_PERIOD_TOTAL2_AWAY_TEAM]: {
249
+ id: MarketType.FIRST_PERIOD_TOTAL2_AWAY_TEAM,
250
+ key: 'firstPeriodTotal2AwayTeam',
251
+ name: 'Total 1st',
252
+ resultType: ResultType.OVER_UNDER,
253
+ },
254
+ [MarketType.SECOND_PERIOD_TOTAL2_HOME_TEAM]: {
255
+ id: MarketType.SECOND_PERIOD_TOTAL2_HOME_TEAM,
256
+ key: 'secondPeriodTotal2HomeTeam',
257
+ name: 'Total 2nd',
258
+ resultType: ResultType.OVER_UNDER,
259
+ },
260
+ [MarketType.SECOND_PERIOD_TOTAL2_AWAY_TEAM]: {
261
+ id: MarketType.SECOND_PERIOD_TOTAL2_AWAY_TEAM,
262
+ key: 'secondPeriodTotal2AwayTeam',
263
+ name: 'Total 2nd',
264
+ resultType: ResultType.OVER_UNDER,
265
+ },
266
+
267
+ // Total odd/even
268
+ [MarketType.TOTAL_ODD_EVEN]: {
269
+ id: MarketType.TOTAL_ODD_EVEN,
270
+ key: 'totalOddEven',
271
+ name: 'Total odd/even',
272
+ resultType: ResultType.EXACT_POSITION,
273
+ },
274
+ // Total odd/even period - half for soccer, quarter for basketball
275
+ [MarketType.FIRST_PERIOD_TOTAL_ODD_EVEN]: {
276
+ id: MarketType.FIRST_PERIOD_TOTAL_ODD_EVEN,
277
+ key: 'firstPeriodTotalOddEven',
278
+ name: 'Total odd/even 1st',
279
+ resultType: ResultType.EXACT_POSITION,
280
+ },
281
+ [MarketType.SECOND_PERIOD_TOTAL_ODD_EVEN]: {
282
+ id: MarketType.SECOND_PERIOD_TOTAL_ODD_EVEN,
283
+ key: 'secondPeriodTotalOddEven',
284
+ name: 'Total odd/even 2nd',
285
+ resultType: ResultType.EXACT_POSITION,
286
+ },
287
+ [MarketType.THIRD_PERIOD_TOTAL_ODD_EVEN]: {
288
+ id: MarketType.THIRD_PERIOD_TOTAL_ODD_EVEN,
289
+ key: 'thirdPeriodTotalOddEven',
290
+ name: 'Total odd/even 3rd',
291
+ resultType: ResultType.EXACT_POSITION,
292
+ },
293
+ [MarketType.FOURTH_PERIOD_TOTAL_ODD_EVEN]: {
294
+ id: MarketType.FOURTH_PERIOD_TOTAL_ODD_EVEN,
295
+ key: 'fourthPeriodTotalOddEven',
296
+ name: 'Total odd/even 4th',
297
+ resultType: ResultType.EXACT_POSITION,
298
+ },
299
+ [MarketType.FIFTH_PERIOD_TOTAL_ODD_EVEN]: {
300
+ id: MarketType.FIFTH_PERIOD_TOTAL_ODD_EVEN,
301
+ key: 'fifthPeriodTotalOddEven',
302
+ name: 'Total odd/even 5th',
303
+ resultType: ResultType.EXACT_POSITION,
304
+ },
305
+ [MarketType.SIXTH_PERIOD_TOTAL_ODD_EVEN]: {
306
+ id: MarketType.SIXTH_PERIOD_TOTAL_ODD_EVEN,
307
+ key: 'sixthPeriodTotalOddEven',
308
+ name: 'Total odd/even 6th',
309
+ resultType: ResultType.EXACT_POSITION,
310
+ },
311
+ [MarketType.SEVENTH_PERIOD_TOTAL_ODD_EVEN]: {
312
+ id: MarketType.SEVENTH_PERIOD_TOTAL_ODD_EVEN,
313
+ key: 'seventhPeriodTotalOddEven',
314
+ name: 'Total odd/even 7th',
315
+ resultType: ResultType.EXACT_POSITION,
316
+ },
317
+ [MarketType.EIGHTH_PERIOD_TOTAL_ODD_EVEN]: {
318
+ id: MarketType.EIGHTH_PERIOD_TOTAL_ODD_EVEN,
319
+ key: 'eightPeriodTotalOddEven',
320
+ name: 'Total odd/even 8th',
321
+ resultType: ResultType.EXACT_POSITION,
322
+ },
323
+ [MarketType.NINTH_PERIOD_TOTAL_ODD_EVEN]: {
324
+ id: MarketType.NINTH_PERIOD_TOTAL_ODD_EVEN,
325
+ key: 'ninthPeriodTotalOddEven',
326
+ name: 'Total odd/even 9th',
327
+ resultType: ResultType.EXACT_POSITION,
328
+ },
329
+ // Total odd/even period - half for basketball
330
+ [MarketType.FIRST_PERIOD_TOTAL2_ODD_EVEN]: {
331
+ id: MarketType.FIRST_PERIOD_TOTAL2_ODD_EVEN,
332
+ key: 'firstPeriodTotal2OddEven',
333
+ name: 'Total odd/even 1st',
334
+ resultType: ResultType.EXACT_POSITION,
335
+ },
336
+ [MarketType.SECOND_PERIOD_TOTAL2_ODD_EVEN]: {
337
+ id: MarketType.SECOND_PERIOD_TOTAL2_ODD_EVEN,
338
+ key: 'secondPeriodTotal2OddEven',
339
+ name: 'Total odd/even 2nd',
340
+ resultType: ResultType.EXACT_POSITION,
341
+ },
342
+ [MarketType.THIRD_PERIOD_TOTAL2_ODD_EVEN]: {
343
+ id: MarketType.THIRD_PERIOD_TOTAL2_ODD_EVEN,
344
+ key: 'thirdPeriodTotal2OddEven',
345
+ name: 'Total odd/even 3rd',
346
+ resultType: ResultType.EXACT_POSITION,
347
+ },
348
+ [MarketType.FOURTH_PERIOD_TOTAL2_ODD_EVEN]: {
349
+ id: MarketType.FOURTH_PERIOD_TOTAL2_ODD_EVEN,
350
+ key: 'fourthPeriodTotal2OddEven',
351
+ name: 'Total odd/even 4th',
352
+ resultType: ResultType.EXACT_POSITION,
353
+ },
354
+ [MarketType.FIFTH_PERIOD_TOTAL2_ODD_EVEN]: {
355
+ id: MarketType.FIFTH_PERIOD_TOTAL2_ODD_EVEN,
356
+ key: 'fifthPeriodTotal2OddEven',
357
+ name: 'Total odd/even 5th',
358
+ resultType: ResultType.EXACT_POSITION,
359
+ },
360
+ [MarketType.SIXTH_PERIOD_TOTAL2_ODD_EVEN]: {
361
+ id: MarketType.SIXTH_PERIOD_TOTAL2_ODD_EVEN,
362
+ key: 'sixthPeriodTotal2OddEven',
363
+ name: 'Total odd/even 6th',
364
+ resultType: ResultType.EXACT_POSITION,
365
+ },
366
+ [MarketType.SEVENTH_PERIOD_TOTAL2_ODD_EVEN]: {
367
+ id: MarketType.SEVENTH_PERIOD_TOTAL2_ODD_EVEN,
368
+ key: 'seventhPeriodTotal2OddEven',
369
+ name: 'Total odd/even 7th',
370
+ resultType: ResultType.EXACT_POSITION,
371
+ },
372
+ [MarketType.EIGHTH_PERIOD_TOTAL2_ODD_EVEN]: {
373
+ id: MarketType.EIGHTH_PERIOD_TOTAL2_ODD_EVEN,
374
+ key: 'eightPeriodTotal2OddEven',
375
+ name: 'Total odd/even 8th',
376
+ resultType: ResultType.EXACT_POSITION,
377
+ },
378
+ [MarketType.NINTH_PERIOD_TOTAL2_ODD_EVEN]: {
379
+ id: MarketType.NINTH_PERIOD_TOTAL2_ODD_EVEN,
380
+ key: 'ninthPeriodTotal2OddEven',
381
+ name: 'Total odd/even 9th',
382
+ resultType: ResultType.EXACT_POSITION,
383
+ },
384
+
385
+ // Total odd/even per team
386
+ [MarketType.TOTAL_HOME_TEAM_ODD_EVEN]: {
387
+ id: MarketType.TOTAL_HOME_TEAM_ODD_EVEN,
388
+ key: 'totalHomeTeamOddEven',
389
+ name: 'Total odd/even',
390
+ resultType: ResultType.EXACT_POSITION,
391
+ },
392
+ [MarketType.TOTAL_AWAY_TEAM_ODD_EVEN]: {
393
+ id: MarketType.TOTAL_AWAY_TEAM_ODD_EVEN,
394
+ key: 'totalAwayTeamOddEven',
395
+ name: 'Total odd/even',
396
+ resultType: ResultType.EXACT_POSITION,
397
+ },
398
+ };
@@ -0,0 +1,44 @@
1
+ import { MarketType, ResultType } from '../../enums/marketTypes';
2
+ import { MarketTypeInfo } from '../../types/marketTypes';
3
+
4
+ export const UFC_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>> = {
5
+ // UFC market types
6
+ [MarketType.WINNING_ROUND]: {
7
+ id: MarketType.WINNING_ROUND,
8
+ key: 'winningRound',
9
+ name: 'Winning round',
10
+ resultType: ResultType.EXACT_POSITION,
11
+ },
12
+ [MarketType.GO_THE_DISTANCE]: {
13
+ id: MarketType.GO_THE_DISTANCE,
14
+ key: 'goTheDistance',
15
+ name: 'Go the distance',
16
+ resultType: ResultType.EXACT_POSITION,
17
+ },
18
+ [MarketType.WILL_FIGHT_END_IN_FIRST_MINUTE]: {
19
+ id: MarketType.WILL_FIGHT_END_IN_FIRST_MINUTE,
20
+ key: 'willFightEndInFirstMinute',
21
+ name: 'First minute finish',
22
+ description: 'Will the fight end in the first minute',
23
+ resultType: ResultType.EXACT_POSITION,
24
+ },
25
+ [MarketType.WILL_POINT_BE_DEDUCTED]: {
26
+ id: MarketType.WILL_POINT_BE_DEDUCTED,
27
+ key: 'willPointBeDeducted',
28
+ name: 'Point to be deducted',
29
+ description: 'Will point be deducted',
30
+ resultType: ResultType.EXACT_POSITION,
31
+ },
32
+ [MarketType.ENDING_METHOD]: {
33
+ id: MarketType.ENDING_METHOD,
34
+ key: 'endingMethod',
35
+ name: 'Ending method',
36
+ resultType: ResultType.EXACT_POSITION,
37
+ },
38
+ [MarketType.METHOD_OF_VICTORY]: {
39
+ id: MarketType.METHOD_OF_VICTORY,
40
+ key: 'methodOfVictory',
41
+ name: 'Method of victory',
42
+ resultType: ResultType.EXACT_POSITION,
43
+ },
44
+ };
@@ -0,0 +1,61 @@
1
+ import { MarketType, ResultType } from '../../enums/marketTypes';
2
+ import { MarketTypeInfo } from '../../types/marketTypes';
3
+
4
+ export const US_ELECTION_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>> = {
5
+ // US election market types
6
+ [MarketType.US_ELECTION_POPULAR_VOTE_WINNER]: {
7
+ id: MarketType.US_ELECTION_POPULAR_VOTE_WINNER,
8
+ key: 'popularVoteWinner',
9
+ name: 'Popular vote winner',
10
+ resultType: ResultType.EXACT_POSITION,
11
+ },
12
+ [MarketType.US_ELECTION_WINNING_PARTY]: {
13
+ id: MarketType.US_ELECTION_WINNING_PARTY,
14
+ key: 'winningParty',
15
+ name: 'Winning party',
16
+ resultType: ResultType.EXACT_POSITION,
17
+ },
18
+ // State results
19
+ [MarketType.US_ELECTION_WINNING_PARTY_ARIZONA]: {
20
+ id: MarketType.US_ELECTION_WINNING_PARTY_ARIZONA,
21
+ key: 'winningPartyArizona',
22
+ name: 'Winning party Arizona',
23
+ resultType: ResultType.EXACT_POSITION,
24
+ },
25
+ [MarketType.US_ELECTION_WINNING_PARTY_GEORGIA]: {
26
+ id: MarketType.US_ELECTION_WINNING_PARTY_GEORGIA,
27
+ key: 'winningPartyGeorgia',
28
+ name: 'Winning party Georgia',
29
+ resultType: ResultType.EXACT_POSITION,
30
+ },
31
+ [MarketType.US_ELECTION_WINNING_PARTY_MICHIGAN]: {
32
+ id: MarketType.US_ELECTION_WINNING_PARTY_MICHIGAN,
33
+ key: 'winningPartyMichigan',
34
+ name: 'Winning party Michigan',
35
+ resultType: ResultType.EXACT_POSITION,
36
+ },
37
+ [MarketType.US_ELECTION_WINNING_PARTY_NEVADA]: {
38
+ id: MarketType.US_ELECTION_WINNING_PARTY_NEVADA,
39
+ key: 'winningPartyNevada',
40
+ name: 'Winning party Nevada',
41
+ resultType: ResultType.EXACT_POSITION,
42
+ },
43
+ [MarketType.US_ELECTION_WINNING_PARTY_PENNSYLVANIA]: {
44
+ id: MarketType.US_ELECTION_WINNING_PARTY_PENNSYLVANIA,
45
+ key: 'winningPartyPennsylvania',
46
+ name: 'Winning party Pennsylvania',
47
+ resultType: ResultType.EXACT_POSITION,
48
+ },
49
+ [MarketType.US_ELECTION_WINNING_PARTY_WINSCONSIN]: {
50
+ id: MarketType.US_ELECTION_WINNING_PARTY_WINSCONSIN,
51
+ key: 'winningPartyWinsconsin',
52
+ name: 'Winning party Winsconsin',
53
+ resultType: ResultType.EXACT_POSITION,
54
+ },
55
+ [MarketType.US_ELECTION_WINNING_PARTY_NORTH_CAROLINA]: {
56
+ id: MarketType.US_ELECTION_WINNING_PARTY_NORTH_CAROLINA,
57
+ key: 'winningPartyNorthCarolina',
58
+ name: 'Winning party North Carolina',
59
+ resultType: ResultType.EXACT_POSITION,
60
+ },
61
+ };
@@ -0,0 +1,175 @@
1
+ import { MarketType, ResultType } from '../../enums/marketTypes';
2
+ import { MarketTypeInfo } from '../../types/marketTypes';
3
+
4
+ export const WINNER_MARKET_TYPE_MAP: Partial<Record<MarketType, MarketTypeInfo>> = {
5
+ // Winner
6
+ [MarketType.WINNER]: {
7
+ id: MarketType.WINNER,
8
+ key: 'winner',
9
+ name: 'Winner',
10
+ resultType: ResultType.EXACT_POSITION,
11
+ },
12
+ // Winner without draw
13
+ [MarketType.DRAW_NO_BET]: {
14
+ id: MarketType.DRAW_NO_BET,
15
+ key: 'drawNoBet',
16
+ name: 'Draw no bet',
17
+ resultType: ResultType.SPREAD,
18
+ },
19
+ // Winner with draw - regular time
20
+ [MarketType.WINNER2]: {
21
+ id: MarketType.WINNER2,
22
+ key: 'winner2',
23
+ name: 'Winner 3-way (regular time)',
24
+ resultType: ResultType.EXACT_POSITION,
25
+ },
26
+ // Winner with draw - including overtime
27
+ [MarketType.WINNER3]: {
28
+ id: MarketType.WINNER3,
29
+ key: 'winner3',
30
+ name: 'Winner 3-way (incl. OT)',
31
+ resultType: ResultType.EXACT_POSITION,
32
+ },
33
+ // Winner period - half for soccer, quarter for basketball
34
+ [MarketType.FIRST_PERIOD_WINNER]: {
35
+ id: MarketType.FIRST_PERIOD_WINNER,
36
+ key: 'firstPeriodWinner',
37
+ name: 'Winner 1st',
38
+ resultType: ResultType.EXACT_POSITION,
39
+ },
40
+ [MarketType.SECOND_PERIOD_WINNER]: {
41
+ id: MarketType.SECOND_PERIOD_WINNER,
42
+ key: 'secondPeriodWinner',
43
+ name: 'Winner 2nd',
44
+ resultType: ResultType.EXACT_POSITION,
45
+ },
46
+ [MarketType.THIRD_PERIOD_WINNER]: {
47
+ id: MarketType.THIRD_PERIOD_WINNER,
48
+ key: 'thirdPeriodWinner',
49
+ name: 'Winner 3rd',
50
+ resultType: ResultType.EXACT_POSITION,
51
+ },
52
+ [MarketType.FOURTH_PERIOD_WINNER]: {
53
+ id: MarketType.FOURTH_PERIOD_WINNER,
54
+ key: 'fourthPeriodWinner',
55
+ name: 'Winner 4th',
56
+ resultType: ResultType.EXACT_POSITION,
57
+ },
58
+ [MarketType.FIFTH_PERIOD_WINNER]: {
59
+ id: MarketType.FIFTH_PERIOD_WINNER,
60
+ key: 'fifthPeriodWinner',
61
+ name: 'Winner 5th',
62
+ resultType: ResultType.EXACT_POSITION,
63
+ },
64
+ [MarketType.SIXTH_PERIOD_WINNER]: {
65
+ id: MarketType.SIXTH_PERIOD_WINNER,
66
+ key: 'sixthPeriodWinner',
67
+ name: 'Winner 6th',
68
+ resultType: ResultType.EXACT_POSITION,
69
+ },
70
+ [MarketType.SEVENTH_PERIOD_WINNER]: {
71
+ id: MarketType.SEVENTH_PERIOD_WINNER,
72
+ key: 'seventhPeriodWinner',
73
+ name: 'Winner 7th',
74
+ resultType: ResultType.EXACT_POSITION,
75
+ },
76
+ [MarketType.EIGHTH_PERIOD_WINNER]: {
77
+ id: MarketType.EIGHTH_PERIOD_WINNER,
78
+ key: 'eightPeriodWinner',
79
+ name: 'Winner 8th',
80
+ resultType: ResultType.EXACT_POSITION,
81
+ },
82
+ [MarketType.NINTH_PERIOD_WINNER]: {
83
+ id: MarketType.NINTH_PERIOD_WINNER,
84
+ key: 'ninthPeriodWinner',
85
+ name: 'Winner 9th',
86
+ resultType: ResultType.EXACT_POSITION,
87
+ },
88
+ // Winner period - half for basketball
89
+ [MarketType.FIRST_PERIOD_WINNER2]: {
90
+ id: MarketType.FIRST_PERIOD_WINNER2,
91
+ key: 'firstPeriodWinner2',
92
+ name: 'Winner 1st',
93
+ resultType: ResultType.EXACT_POSITION,
94
+ },
95
+ [MarketType.SECOND_PERIOD_WINNER2]: {
96
+ id: MarketType.SECOND_PERIOD_WINNER2,
97
+ key: 'secondPeriodWinner2',
98
+ name: 'Winner 2nd',
99
+ resultType: ResultType.EXACT_POSITION,
100
+ },
101
+ [MarketType.THIRD_PERIOD_WINNER2]: {
102
+ id: MarketType.THIRD_PERIOD_WINNER2,
103
+ key: 'thirdPeriodWinner2',
104
+ name: 'Winner 3rd',
105
+ resultType: ResultType.EXACT_POSITION,
106
+ },
107
+ [MarketType.FOURTH_PERIOD_WINNER2]: {
108
+ id: MarketType.FOURTH_PERIOD_WINNER2,
109
+ key: 'fourthPeriodWinner2',
110
+ name: 'Winner 4th',
111
+ resultType: ResultType.EXACT_POSITION,
112
+ },
113
+ [MarketType.FIFTH_PERIOD_WINNER2]: {
114
+ id: MarketType.FIFTH_PERIOD_WINNER2,
115
+ key: 'fifthPeriodWinner2',
116
+ name: 'Winner 5th',
117
+ resultType: ResultType.EXACT_POSITION,
118
+ },
119
+ [MarketType.SIXTH_PERIOD_WINNER2]: {
120
+ id: MarketType.SIXTH_PERIOD_WINNER2,
121
+ key: 'sixthPeriodWinner2',
122
+ name: 'Winner 6th',
123
+ resultType: ResultType.EXACT_POSITION,
124
+ },
125
+ [MarketType.SEVENTH_PERIOD_WINNER2]: {
126
+ id: MarketType.SEVENTH_PERIOD_WINNER2,
127
+ key: 'seventhPeriodWinner2',
128
+ name: 'Winner 7th',
129
+ resultType: ResultType.EXACT_POSITION,
130
+ },
131
+ [MarketType.EIGHTH_PERIOD_WINNER2]: {
132
+ id: MarketType.EIGHTH_PERIOD_WINNER2,
133
+ key: 'eightPeriodWinner2',
134
+ name: 'Winner 8th',
135
+ resultType: ResultType.EXACT_POSITION,
136
+ },
137
+ [MarketType.NINTH_PERIOD_WINNER2]: {
138
+ id: MarketType.NINTH_PERIOD_WINNER2,
139
+ key: 'ninthPeriodWinner2',
140
+ name: 'Winner 9th',
141
+ resultType: ResultType.EXACT_POSITION,
142
+ },
143
+ // Winner without draw period - half for soccer, quarter for basketball
144
+ [MarketType.FIRST_PERIOD_DRAW_NO_BET]: {
145
+ id: MarketType.FIRST_PERIOD_DRAW_NO_BET,
146
+ key: 'firstPeriodDrawNoBet',
147
+ name: 'Draw no bet 1st',
148
+ resultType: ResultType.SPREAD,
149
+ },
150
+ [MarketType.SECOND_PERIOD_DRAW_NO_BET]: {
151
+ id: MarketType.SECOND_PERIOD_DRAW_NO_BET,
152
+ key: 'secondPeriodDrawNoBet',
153
+ name: 'Draw no bet 2nd',
154
+ resultType: ResultType.SPREAD,
155
+ },
156
+ [MarketType.THIRD_PERIOD_DRAW_NO_BET]: {
157
+ id: MarketType.THIRD_PERIOD_DRAW_NO_BET,
158
+ key: 'thirdPeriodDrawNoBet',
159
+ name: 'Draw no bet 3rd',
160
+ resultType: ResultType.SPREAD,
161
+ },
162
+ [MarketType.FOURTH_PERIOD_DRAW_NO_BET]: {
163
+ id: MarketType.FOURTH_PERIOD_DRAW_NO_BET,
164
+ key: 'fourthPeriodDrawNoBet',
165
+ name: 'Draw no bet 4th',
166
+ resultType: ResultType.SPREAD,
167
+ },
168
+ // Winner 3-Way 1st period
169
+ [MarketType.FIRST_PERIOD_WINNER2_3WAY]: {
170
+ id: MarketType.FIRST_PERIOD_WINNER2_3WAY,
171
+ key: 'firstPeriod3wayWinner2',
172
+ name: 'Winner 3-Way 1st',
173
+ resultType: ResultType.EXACT_POSITION,
174
+ },
175
+ };