@smartico/public-api 0.0.355 → 0.0.357

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.
Files changed (56) hide show
  1. package/README.md +33 -8
  2. package/dist/SmarticoAPI.d.ts +1 -1
  3. package/dist/WSAPI/WSAPI.d.ts +27 -56
  4. package/dist/WSAPI/WSAPITypes.d.ts +515 -32
  5. package/dist/index.d.ts +0 -1
  6. package/dist/index.js +92 -231
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.modern.mjs +27 -159
  9. package/dist/index.modern.mjs.map +1 -1
  10. package/docs/api/README.md +27 -0
  11. package/docs/api/classes/WSAPI.md +37 -57
  12. package/docs/api/enums/GPRoundStatus.md +43 -0
  13. package/docs/api/enums/GamePickMarketType.md +19 -0
  14. package/docs/api/enums/GamePickResolutionType.md +35 -0
  15. package/docs/api/enums/GamePickScoreType.md +19 -0
  16. package/docs/api/enums/GamePickSportType.md +375 -0
  17. package/docs/api/enums/GameRoundOrderType.md +35 -0
  18. package/docs/api/enums/PointChangeSourceType.md +6 -0
  19. package/docs/api/interfaces/AchRelatedGame-1.md +1 -1
  20. package/docs/api/interfaces/BonusTemplateMetaMap.md +1 -1
  21. package/docs/api/interfaces/GamePickBoardUser.md +75 -0
  22. package/docs/api/interfaces/GamePickEvent.md +121 -0
  23. package/docs/api/interfaces/GamePickEventMeta.md +181 -0
  24. package/docs/api/interfaces/GamePickGameInfo.md +27 -0
  25. package/docs/api/interfaces/GamePickRequestParams.md +41 -0
  26. package/docs/api/interfaces/GamePickRound.md +385 -0
  27. package/docs/api/interfaces/GamePickRoundBase.md +235 -0
  28. package/docs/api/interfaces/GamePickRoundBoard.md +361 -0
  29. package/docs/api/interfaces/GamePickRoundPublicMeta.md +103 -0
  30. package/docs/api/interfaces/GamePickRoundRequestParams.md +65 -0
  31. package/docs/api/interfaces/GamePickUserInfo.md +107 -0
  32. package/docs/api/interfaces/GamesApiResponse.md +33 -0
  33. package/docs/api/interfaces/QuizEventMeta.md +41 -0
  34. package/docs/api/interfaces/TInboxMessageBody.md +1 -1
  35. package/docs/api/interfaces/TLevel.md +1 -1
  36. package/docs/api/interfaces/TLevelCurrent.md +1 -1
  37. package/docs/api/interfaces/TMiniGamePrize.md +1 -1
  38. package/docs/api/interfaces/TMiniGameTemplate.md +2 -2
  39. package/docs/api/interfaces/TMissionOrBadge.md +2 -2
  40. package/docs/api/interfaces/TRaffle.md +2 -2
  41. package/docs/api/interfaces/TRaffleDraw.md +14 -2
  42. package/docs/api/interfaces/TRaffleDrawRun.md +20 -0
  43. package/docs/api/interfaces/TRafflePrize.md +1 -1
  44. package/docs/api/interfaces/TStoreItem.md +3 -3
  45. package/docs/api/interfaces/TTournament.md +4 -4
  46. package/docs/api/interfaces/TTournamentDetailed.md +4 -4
  47. package/docs/api/interfaces/TUICustomSection.md +1 -1
  48. package/package.json +6 -6
  49. package/src/SmarticoAPI.ts +1 -1
  50. package/src/WSAPI/WSAPI.ts +27 -63
  51. package/src/WSAPI/WSAPITypes.ts +525 -32
  52. package/src/index.ts +1 -2
  53. package/dist/GamePick/GPTypes.d.ts +0 -268
  54. package/dist/GamePick/index.d.ts +0 -1
  55. package/src/GamePick/GPTypes.ts +0 -277
  56. package/src/GamePick/index.ts +0 -1
@@ -0,0 +1,375 @@
1
+ # Enumeration: GamePickSportType
2
+
3
+ GamePickSportType defines supported sport types for events, using Betradar sport IDs
4
+
5
+ ## Enumeration Members
6
+
7
+ ### Soccer
8
+
9
+ • **Soccer** = ``1``
10
+
11
+ ___
12
+
13
+ ### Basketball
14
+
15
+ • **Basketball** = ``2``
16
+
17
+ ___
18
+
19
+ ### Baseball
20
+
21
+ • **Baseball** = ``3``
22
+
23
+ ___
24
+
25
+ ### IceHockey
26
+
27
+ • **IceHockey** = ``4``
28
+
29
+ ___
30
+
31
+ ### Tennis
32
+
33
+ • **Tennis** = ``5``
34
+
35
+ ___
36
+
37
+ ### Handball
38
+
39
+ • **Handball** = ``6``
40
+
41
+ ___
42
+
43
+ ### Floorball
44
+
45
+ • **Floorball** = ``7``
46
+
47
+ ___
48
+
49
+ ### Golf
50
+
51
+ • **Golf** = ``9``
52
+
53
+ ___
54
+
55
+ ### Boxing
56
+
57
+ • **Boxing** = ``10``
58
+
59
+ ___
60
+
61
+ ### Motorsport
62
+
63
+ • **Motorsport** = ``11``
64
+
65
+ ___
66
+
67
+ ### Rugby
68
+
69
+ • **Rugby** = ``12``
70
+
71
+ ___
72
+
73
+ ### AussieRules
74
+
75
+ • **AussieRules** = ``13``
76
+
77
+ ___
78
+
79
+ ### Bandy
80
+
81
+ • **Bandy** = ``15``
82
+
83
+ ___
84
+
85
+ ### AmericanFootball
86
+
87
+ • **AmericanFootball** = ``16``
88
+
89
+ ___
90
+
91
+ ### Cycling
92
+
93
+ • **Cycling** = ``17``
94
+
95
+ ___
96
+
97
+ ### Specials
98
+
99
+ • **Specials** = ``18``
100
+
101
+ ___
102
+
103
+ ### Snooker
104
+
105
+ • **Snooker** = ``19``
106
+
107
+ ___
108
+
109
+ ### TableTennis
110
+
111
+ • **TableTennis** = ``20``
112
+
113
+ ___
114
+
115
+ ### Cricket
116
+
117
+ • **Cricket** = ``21``
118
+
119
+ ___
120
+
121
+ ### Darts
122
+
123
+ • **Darts** = ``22``
124
+
125
+ ___
126
+
127
+ ### Volleyball
128
+
129
+ • **Volleyball** = ``23``
130
+
131
+ ___
132
+
133
+ ### FieldHockey
134
+
135
+ • **FieldHockey** = ``24``
136
+
137
+ ___
138
+
139
+ ### Waterpolo
140
+
141
+ • **Waterpolo** = ``26``
142
+
143
+ ___
144
+
145
+ ### Curling
146
+
147
+ • **Curling** = ``28``
148
+
149
+ ___
150
+
151
+ ### Futsal
152
+
153
+ • **Futsal** = ``29``
154
+
155
+ ___
156
+
157
+ ### Badminton
158
+
159
+ • **Badminton** = ``31``
160
+
161
+ ___
162
+
163
+ ### Bowls
164
+
165
+ • **Bowls** = ``32``
166
+
167
+ ___
168
+
169
+ ### Chess
170
+
171
+ • **Chess** = ``33``
172
+
173
+ ___
174
+
175
+ ### BeachVolley
176
+
177
+ • **BeachVolley** = ``34``
178
+
179
+ ___
180
+
181
+ ### Netball
182
+
183
+ • **Netball** = ``35``
184
+
185
+ ___
186
+
187
+ ### Athletics
188
+
189
+ • **Athletics** = ``36``
190
+
191
+ ___
192
+
193
+ ### Squash
194
+
195
+ • **Squash** = ``37``
196
+
197
+ ___
198
+
199
+ ### Lacrosse
200
+
201
+ • **Lacrosse** = ``39``
202
+
203
+ ___
204
+
205
+ ### Formula1
206
+
207
+ • **Formula1** = ``40``
208
+
209
+ ___
210
+
211
+ ### AlpineSkiing
212
+
213
+ • **AlpineSkiing** = ``43``
214
+
215
+ ___
216
+
217
+ ### Biathlon
218
+
219
+ • **Biathlon** = ``44``
220
+
221
+ ___
222
+
223
+ ### CrossCountry
224
+
225
+ • **CrossCountry** = ``46``
226
+
227
+ ___
228
+
229
+ ### NordicCombined
230
+
231
+ • **NordicCombined** = ``47``
232
+
233
+ ___
234
+
235
+ ### SkiJumping
236
+
237
+ • **SkiJumping** = ``48``
238
+
239
+ ___
240
+
241
+ ### Schwingen
242
+
243
+ • **Schwingen** = ``56``
244
+
245
+ ___
246
+
247
+ ### BeachSoccer
248
+
249
+ • **BeachSoccer** = ``60``
250
+
251
+ ___
252
+
253
+ ### Pesapallo
254
+
255
+ • **Pesapallo** = ``61``
256
+
257
+ ___
258
+
259
+ ### ESportCounterStrike
260
+
261
+ • **ESportCounterStrike** = ``109``
262
+
263
+ ___
264
+
265
+ ### ESportLeagueofLegends
266
+
267
+ • **ESportLeagueofLegends** = ``110``
268
+
269
+ ___
270
+
271
+ ### ESportDota
272
+
273
+ • **ESportDota** = ``111``
274
+
275
+ ___
276
+
277
+ ### StarCraft
278
+
279
+ • **StarCraft** = ``112``
280
+
281
+ ___
282
+
283
+ ### MMA
284
+
285
+ • **MMA** = ``117``
286
+
287
+ ___
288
+
289
+ ### CallOfDuty
290
+
291
+ • **CallOfDuty** = ``118``
292
+
293
+ ___
294
+
295
+ ### ESportOverwatch
296
+
297
+ • **ESportOverwatch** = ``121``
298
+
299
+ ___
300
+
301
+ ### ESportRocketLeague
302
+
303
+ • **ESportRocketLeague** = ``128``
304
+
305
+ ___
306
+
307
+ ### IndyRacing
308
+
309
+ • **IndyRacing** = ``129``
310
+
311
+ ___
312
+
313
+ ### Speedway
314
+
315
+ • **Speedway** = ``131``
316
+
317
+ ___
318
+
319
+ ### GaelicFootball
320
+
321
+ • **GaelicFootball** = ``135``
322
+
323
+ ___
324
+
325
+ ### GaelicHurling
326
+
327
+ • **GaelicHurling** = ``136``
328
+
329
+ ___
330
+
331
+ ### ESporteSoccer
332
+
333
+ • **ESporteSoccer** = ``137``
334
+
335
+ ___
336
+
337
+ ### Kabaddi
338
+
339
+ • **Kabaddi** = ``138``
340
+
341
+ ___
342
+
343
+ ### ESporteBasketball
344
+
345
+ • **ESporteBasketball** = ``153``
346
+
347
+ ___
348
+
349
+ ### Basketball3x3
350
+
351
+ • **Basketball3x3** = ``155``
352
+
353
+ ___
354
+
355
+ ### ESportArenaofValor
356
+
357
+ • **ESportArenaofValor** = ``158``
358
+
359
+ ___
360
+
361
+ ### TouringCarRacing
362
+
363
+ • **TouringCarRacing** = ``188``
364
+
365
+ ___
366
+
367
+ ### MotorcycleRacing
368
+
369
+ • **MotorcycleRacing** = ``190``
370
+
371
+ ___
372
+
373
+ ### StockCarRacing
374
+
375
+ • **StockCarRacing** = ``191``
@@ -0,0 +1,35 @@
1
+ # Enumeration: GameRoundOrderType
2
+
3
+ GameRoundOrderType defines how events within a round are ordered for display
4
+
5
+ ## Enumeration Members
6
+
7
+ ### HowAdded
8
+
9
+ • **HowAdded** = ``1``
10
+
11
+ Display in the order events were added
12
+
13
+ ___
14
+
15
+ ### HowAddedReversed
16
+
17
+ • **HowAddedReversed** = ``2``
18
+
19
+ Display in reverse of the order events were added
20
+
21
+ ___
22
+
23
+ ### EventDateAscending
24
+
25
+ • **EventDateAscending** = ``3``
26
+
27
+ Display ordered by event/match date ascending (earliest first)
28
+
29
+ ___
30
+
31
+ ### EventDateDescending
32
+
33
+ • **EventDateDescending** = ``4``
34
+
35
+ Display ordered by event/match date descending (latest first)
@@ -101,3 +101,9 @@ ___
101
101
  ### Raffle
102
102
 
103
103
  • **Raffle** = ``21``
104
+
105
+ ___
106
+
107
+ ### Avatars
108
+
109
+ • **Avatars** = ``22``
@@ -22,7 +22,7 @@ Game public meta information
22
22
  | :------ | :------ | :------ |
23
23
  | `name` | `string` | The name of the game |
24
24
  | `link` | `string` | The URL to the game |
25
- | `image` | `string` | The URL to the image of the game |
25
+ | `image` | `string` | The URL to the image of the game, 1:1 aspect ratio |
26
26
  | `enabled` | `boolean` | The indicator if the game is enabled |
27
27
  | `game_categories` | `string`[] | The list of categories of the game |
28
28
  | `game_provider` | `string` | The name of the game provider |
@@ -22,7 +22,7 @@ ___
22
22
 
23
23
  • **image\_url**: `string`
24
24
 
25
- Image URL of the bonus template
25
+ Image URL of the bonus template, 1:1 aspect ratio
26
26
 
27
27
  ___
28
28
 
@@ -0,0 +1,75 @@
1
+ # Interface: GamePickBoardUser
2
+
3
+ GamePickBoardUser describes a user's entry on the round leaderboard
4
+
5
+ ## Properties
6
+
7
+ ### ext\_user\_id
8
+
9
+ • **ext\_user\_id**: `string`
10
+
11
+ External user ID (Smartico numeric user ID)
12
+
13
+ ___
14
+
15
+ ### int\_user\_id
16
+
17
+ • **int\_user\_id**: `number`
18
+
19
+ Internal user ID within the games system
20
+
21
+ ___
22
+
23
+ ### public\_username
24
+
25
+ • **public\_username**: `string`
26
+
27
+ Display name shown on the leaderboard
28
+
29
+ ___
30
+
31
+ ### avatar\_url
32
+
33
+ • **avatar\_url**: `string`
34
+
35
+ URL of the user's avatar image
36
+
37
+ ___
38
+
39
+ ### gp\_position
40
+
41
+ • **gp\_position**: `number`
42
+
43
+ User's rank position on the leaderboard, null if not yet ranked
44
+
45
+ ___
46
+
47
+ ### resolution\_score
48
+
49
+ • **resolution\_score**: `number`
50
+
51
+ User's total score in this round/season
52
+
53
+ ___
54
+
55
+ ### full\_wins\_count
56
+
57
+ • **full\_wins\_count**: `number`
58
+
59
+ Number of fully correct predictions
60
+
61
+ ___
62
+
63
+ ### part\_wins\_count
64
+
65
+ • **part\_wins\_count**: `number`
66
+
67
+ Number of partially correct predictions
68
+
69
+ ___
70
+
71
+ ### lost\_count
72
+
73
+ • **lost\_count**: `number`
74
+
75
+ Number of incorrect predictions
@@ -0,0 +1,121 @@
1
+ # Interface: GamePickEvent
2
+
3
+ GamePickEvent describes a single event (match or question) within a round, including the user's prediction and resolution
4
+
5
+ ## Properties
6
+
7
+ ### gp\_event\_id
8
+
9
+ • **gp\_event\_id**: `number`
10
+
11
+ Unique identifier of the event
12
+
13
+ ___
14
+
15
+ ### event\_resolution\_date
16
+
17
+ • **event\_resolution\_date**: `number`
18
+
19
+ Timestamp (ms) when the event was resolved, null if not yet resolved
20
+
21
+ ___
22
+
23
+ ### match\_date
24
+
25
+ • **match\_date**: `number`
26
+
27
+ Timestamp (ms) of the match/event start time
28
+
29
+ ___
30
+
31
+ ### market\_type\_id
32
+
33
+ • **market\_type\_id**: [`SAWGPMarketType`](../enums/SAWGPMarketType.md)
34
+
35
+ Market type defining the prediction format (e.g. two-team score, quiz question, custom)
36
+
37
+ ___
38
+
39
+ ### event\_meta
40
+
41
+ • **event\_meta**: [`GamePickEventMeta`](GamePickEventMeta.md)
42
+
43
+ Event metadata containing team names, images, sport type, and question details
44
+
45
+ ___
46
+
47
+ ### user\_placed\_bet
48
+
49
+ • **user\_placed\_bet**: `boolean`
50
+
51
+ Whether the current user has submitted a prediction for this event
52
+
53
+ ___
54
+
55
+ ### team1\_user\_selection
56
+
57
+ • `Optional` **team1\_user\_selection**: `number` \| \{ `from`: `number` ; `to`: `number` }
58
+
59
+ User's predicted score for team 1 (MatchX only). Can be a number or a range object
60
+
61
+ ___
62
+
63
+ ### team2\_user\_selection
64
+
65
+ • `Optional` **team2\_user\_selection**: `number` \| \{ `from`: `number` ; `to`: `number` }
66
+
67
+ User's predicted score for team 2 (MatchX only). Can be a number or a range object
68
+
69
+ ___
70
+
71
+ ### user\_selection
72
+
73
+ • `Optional` **user\_selection**: [`QuizAnswersValueType`](../enums/QuizAnswersValueType.md)
74
+
75
+ User's selected answer (Quiz only). Value depends on market type (e.g. '1', '2', 'x', 'yes', 'no')
76
+
77
+ ___
78
+
79
+ ### resolution\_type\_id
80
+
81
+ • **resolution\_type\_id**: [`GamePickResolutionType`](../enums/GamePickResolutionType.md)
82
+
83
+ How the user's prediction was scored after resolution
84
+
85
+ ___
86
+
87
+ ### resolution\_score
88
+
89
+ • `Optional` **resolution\_score**: `number`
90
+
91
+ Points awarded for this event based on prediction accuracy
92
+
93
+ ___
94
+
95
+ ### is\_open\_for\_bets
96
+
97
+ • `Optional` **is\_open\_for\_bets**: `boolean`
98
+
99
+ Whether this event is still accepting predictions
100
+
101
+ ___
102
+
103
+ ### odds\_details
104
+
105
+ • `Optional` **odds\_details**: `Object`
106
+
107
+ Betting odds details for the event outcomes
108
+
109
+ #### Type declaration
110
+
111
+ | Name | Type |
112
+ | :------ | :------ |
113
+ | `odd_value` | \{ `[key: string]`: `number`; } |
114
+
115
+ ___
116
+
117
+ ### question\_image
118
+
119
+ • `Optional` **question\_image**: `string`
120
+
121
+ URL of a question-specific image (quiz events)