@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,181 @@
1
+ # Interface: GamePickEventMeta
2
+
3
+ GamePickEventMeta describes metadata for a MatchX or Quiz event, including team info and sport context
4
+
5
+ ## Hierarchy
6
+
7
+ - [`QuizEventMeta`](QuizEventMeta.md)
8
+
9
+ ↳ **`GamePickEventMeta`**
10
+
11
+ ## Properties
12
+
13
+ ### answers
14
+
15
+ • `Optional` **answers**: \{ `value`: `string` ; `text`: `string` ; `_translations`: \{ `[key: string]`: \{ `text`: `string` }; } }[]
16
+
17
+ List of possible answer options for the quiz question
18
+
19
+ #### Inherited from
20
+
21
+ [QuizEventMeta](QuizEventMeta.md).[answers](QuizEventMeta.md#answers)
22
+
23
+ ___
24
+
25
+ ### question\_image
26
+
27
+ • `Optional` **question\_image**: `string`
28
+
29
+ URL of an image associated with the question
30
+
31
+ #### Inherited from
32
+
33
+ [QuizEventMeta](QuizEventMeta.md).[question_image](QuizEventMeta.md#question_image)
34
+
35
+ ___
36
+
37
+ ### result
38
+
39
+ • `Optional` **result**: [`QuizAnswersValueType`](../enums/QuizAnswersValueType.md)
40
+
41
+ Correct answer value after resolution
42
+
43
+ #### Inherited from
44
+
45
+ [QuizEventMeta](QuizEventMeta.md).[result](QuizEventMeta.md#result)
46
+
47
+ ___
48
+
49
+ ### custom\_question
50
+
51
+ • **custom\_question**: `string`
52
+
53
+ Custom question text displayed to the user
54
+
55
+ #### Inherited from
56
+
57
+ [QuizEventMeta](QuizEventMeta.md).[custom_question](QuizEventMeta.md#custom_question)
58
+
59
+ ___
60
+
61
+ ### event\_name
62
+
63
+ • `Optional` **event\_name**: `string`
64
+
65
+ Display name of the event/match
66
+
67
+ ___
68
+
69
+ ### team1\_name
70
+
71
+ • **team1\_name**: `string`
72
+
73
+ Name of the first team (home)
74
+
75
+ ___
76
+
77
+ ### team1\_image
78
+
79
+ • **team1\_image**: `string`
80
+
81
+ URL of the first team's logo image
82
+
83
+ ___
84
+
85
+ ### team2\_name
86
+
87
+ • **team2\_name**: `string`
88
+
89
+ Name of the second team (away)
90
+
91
+ ___
92
+
93
+ ### team2\_image
94
+
95
+ • **team2\_image**: `string`
96
+
97
+ URL of the second team's logo image
98
+
99
+ ___
100
+
101
+ ### team1\_result
102
+
103
+ • `Optional` **team1\_result**: `number`
104
+
105
+ Actual result score for team 1 after resolution
106
+
107
+ ___
108
+
109
+ ### team2\_result
110
+
111
+ • `Optional` **team2\_result**: `number`
112
+
113
+ Actual result score for team 2 after resolution
114
+
115
+ ___
116
+
117
+ ### sport\_type\_id
118
+
119
+ • `Optional` **sport\_type\_id**: `number`
120
+
121
+ Betradar sport type ID for the event
122
+
123
+ ___
124
+
125
+ ### is\_canceled
126
+
127
+ • `Optional` **is\_canceled**: `boolean`
128
+
129
+ Whether the event has been canceled
130
+
131
+ ___
132
+
133
+ ### auto\_resolve\_enabled
134
+
135
+ • `Optional` **auto\_resolve\_enabled**: `boolean`
136
+
137
+ Whether auto-resolution from live data feed is enabled
138
+
139
+ ___
140
+
141
+ ### auto\_resolve\_date
142
+
143
+ • `Optional` **auto\_resolve\_date**: `string`
144
+
145
+ ISO date string for when auto-resolution is expected
146
+
147
+ ___
148
+
149
+ ### team1\_auto\_result
150
+
151
+ • `Optional` **team1\_auto\_result**: `number`
152
+
153
+ Auto-resolved score for team 1 from live data feed
154
+
155
+ ___
156
+
157
+ ### team2\_auto\_result
158
+
159
+ • `Optional` **team2\_auto\_result**: `number`
160
+
161
+ Auto-resolved score for team 2 from live data feed
162
+
163
+ ___
164
+
165
+ ### auto\_result
166
+
167
+ • `Optional` **auto\_result**: `string`
168
+
169
+ Auto-resolved answer value from live data feed (for quiz events)
170
+
171
+ ___
172
+
173
+ ### \_translations
174
+
175
+ • **\_translations**: `Object`
176
+
177
+ Per-language overrides for team names, event name, and custom question
178
+
179
+ #### Index signature
180
+
181
+ ▪ [key: `string`]: \{ `team1_name`: `string` ; `team2_name`: `string` ; `event_name`: `string` ; `custom_question`: `string` }
@@ -0,0 +1,27 @@
1
+ # Interface: GamePickGameInfo
2
+
3
+ GamePickGameInfo describes the game configuration including SAW template, rounds list, and label settings
4
+
5
+ ## Properties
6
+
7
+ ### sawTemplate
8
+
9
+ • **sawTemplate**: [`SAWTemplate`](SAWTemplate.md)
10
+
11
+ Game template configuration (SAW template) with UI settings, buy-in type, cost, and spin count
12
+
13
+ ___
14
+
15
+ ### allRounds
16
+
17
+ • **allRounds**: [`GamePickRoundBase`](GamePickRoundBase.md)[]
18
+
19
+ List of all rounds (metadata only, no events)
20
+
21
+ ___
22
+
23
+ ### labelInfo
24
+
25
+ • **labelInfo**: `any`
26
+
27
+ Label/brand configuration and settings
@@ -0,0 +1,41 @@
1
+ # Interface: GamePickRequestParams
2
+
3
+ GamePickRequestParams describes the base parameters required for GamePick API calls
4
+
5
+ ## Hierarchy
6
+
7
+ - **`GamePickRequestParams`**
8
+
9
+ ↳ [`GamePickRoundRequestParams`](GamePickRoundRequestParams.md)
10
+
11
+ ## Properties
12
+
13
+ ### saw\_template\_id
14
+
15
+ • **saw\_template\_id**: `number`
16
+
17
+ ID of the MatchX or Quiz game template
18
+
19
+ ___
20
+
21
+ ### ext\_user\_id
22
+
23
+ • **ext\_user\_id**: `string`
24
+
25
+ External user ID
26
+
27
+ ___
28
+
29
+ ### smartico\_ext\_user\_id
30
+
31
+ • **smartico\_ext\_user\_id**: `string`
32
+
33
+ Smartico external user ID used for platform API calls
34
+
35
+ ___
36
+
37
+ ### lang
38
+
39
+ • `Optional` **lang**: `string`
40
+
41
+ Language code for translations (e.g. 'EN', 'DE')
@@ -0,0 +1,385 @@
1
+ # Interface: GamePickRound
2
+
3
+ GamePickRound describes a round with its events and the current user's prediction data
4
+
5
+ ## Hierarchy
6
+
7
+ - [`GamePickRoundBase`](GamePickRoundBase.md)
8
+
9
+ ↳ **`GamePickRound`**
10
+
11
+ ## Properties
12
+
13
+ ### round\_id
14
+
15
+ • **round\_id**: `number`
16
+
17
+ Unique round identifier
18
+
19
+ #### Inherited from
20
+
21
+ [GamePickRoundBase](GamePickRoundBase.md).[round_id](GamePickRoundBase.md#round_id)
22
+
23
+ ___
24
+
25
+ ### round\_row\_id
26
+
27
+ • **round\_row\_id**: `number`
28
+
29
+ Sequential row ID used for ordering rounds
30
+
31
+ #### Inherited from
32
+
33
+ [GamePickRoundBase](GamePickRoundBase.md).[round_row_id](GamePickRoundBase.md#round_row_id)
34
+
35
+ ___
36
+
37
+ ### round\_name
38
+
39
+ • **round\_name**: `string`
40
+
41
+ Localized display name of the round
42
+
43
+ #### Inherited from
44
+
45
+ [GamePickRoundBase](GamePickRoundBase.md).[round_name](GamePickRoundBase.md#round_name)
46
+
47
+ ___
48
+
49
+ ### round\_description
50
+
51
+ • **round\_description**: `string`
52
+
53
+ Localized description of the round
54
+
55
+ #### Inherited from
56
+
57
+ [GamePickRoundBase](GamePickRoundBase.md).[round_description](GamePickRoundBase.md#round_description)
58
+
59
+ ___
60
+
61
+ ### final\_screen\_cta\_button\_title
62
+
63
+ • **final\_screen\_cta\_button\_title**: `string`
64
+
65
+ Label for the CTA button on the final/results screen
66
+
67
+ #### Inherited from
68
+
69
+ [GamePickRoundBase](GamePickRoundBase.md).[final_screen_cta_button_title](GamePickRoundBase.md#final_screen_cta_button_title)
70
+
71
+ ___
72
+
73
+ ### final\_screen\_message
74
+
75
+ • **final\_screen\_message**: `string`
76
+
77
+ Message displayed on the final/results screen
78
+
79
+ #### Inherited from
80
+
81
+ [GamePickRoundBase](GamePickRoundBase.md).[final_screen_message](GamePickRoundBase.md#final_screen_message)
82
+
83
+ ___
84
+
85
+ ### final\_screen\_image\_desktop
86
+
87
+ • **final\_screen\_image\_desktop**: `string`
88
+
89
+ URL of the final screen image (desktop)
90
+
91
+ #### Inherited from
92
+
93
+ [GamePickRoundBase](GamePickRoundBase.md).[final_screen_image_desktop](GamePickRoundBase.md#final_screen_image_desktop)
94
+
95
+ ___
96
+
97
+ ### final\_screen\_image\_mobile
98
+
99
+ • **final\_screen\_image\_mobile**: `string`
100
+
101
+ URL of the final screen image (mobile)
102
+
103
+ #### Inherited from
104
+
105
+ [GamePickRoundBase](GamePickRoundBase.md).[final_screen_image_mobile](GamePickRoundBase.md#final_screen_image_mobile)
106
+
107
+ ___
108
+
109
+ ### promo\_image
110
+
111
+ • **promo\_image**: `string`
112
+
113
+ URL of the promotional image for the round
114
+
115
+ #### Inherited from
116
+
117
+ [GamePickRoundBase](GamePickRoundBase.md).[promo_image](GamePickRoundBase.md#promo_image)
118
+
119
+ ___
120
+
121
+ ### promo\_text
122
+
123
+ • **promo\_text**: `string`
124
+
125
+ Promotional text displayed with the round
126
+
127
+ #### Inherited from
128
+
129
+ [GamePickRoundBase](GamePickRoundBase.md).[promo_text](GamePickRoundBase.md#promo_text)
130
+
131
+ ___
132
+
133
+ ### open\_date
134
+
135
+ • **open\_date**: `number`
136
+
137
+ Timestamp (ms) when the round opens for participation
138
+
139
+ #### Inherited from
140
+
141
+ [GamePickRoundBase](GamePickRoundBase.md).[open_date](GamePickRoundBase.md#open_date)
142
+
143
+ ___
144
+
145
+ ### last\_bet\_date
146
+
147
+ • **last\_bet\_date**: `number`
148
+
149
+ Timestamp (ms) of the last moment bets are accepted
150
+
151
+ #### Inherited from
152
+
153
+ [GamePickRoundBase](GamePickRoundBase.md).[last_bet_date](GamePickRoundBase.md#last_bet_date)
154
+
155
+ ___
156
+
157
+ ### resolution\_date
158
+
159
+ • **resolution\_date**: `number`
160
+
161
+ Timestamp (ms) when the round is expected to be resolved
162
+
163
+ #### Inherited from
164
+
165
+ [GamePickRoundBase](GamePickRoundBase.md).[resolution_date](GamePickRoundBase.md#resolution_date)
166
+
167
+ ___
168
+
169
+ ### score\_full\_win
170
+
171
+ • **score\_full\_win**: `number`
172
+
173
+ Points awarded for a fully correct prediction
174
+
175
+ #### Inherited from
176
+
177
+ [GamePickRoundBase](GamePickRoundBase.md).[score_full_win](GamePickRoundBase.md#score_full_win)
178
+
179
+ ___
180
+
181
+ ### score\_part\_win
182
+
183
+ • **score\_part\_win**: `number`
184
+
185
+ Points awarded for a partially correct prediction
186
+
187
+ #### Inherited from
188
+
189
+ [GamePickRoundBase](GamePickRoundBase.md).[score_part_win](GamePickRoundBase.md#score_part_win)
190
+
191
+ ___
192
+
193
+ ### score\_lost
194
+
195
+ • **score\_lost**: `number`
196
+
197
+ Points awarded (or deducted) for an incorrect prediction
198
+
199
+ #### Inherited from
200
+
201
+ [GamePickRoundBase](GamePickRoundBase.md).[score_lost](GamePickRoundBase.md#score_lost)
202
+
203
+ ___
204
+
205
+ ### is\_active\_now
206
+
207
+ • **is\_active\_now**: `boolean`
208
+
209
+ Whether the round is currently active for participation
210
+
211
+ #### Inherited from
212
+
213
+ [GamePickRoundBase](GamePickRoundBase.md).[is_active_now](GamePickRoundBase.md#is_active_now)
214
+
215
+ ___
216
+
217
+ ### is\_resolved
218
+
219
+ • **is\_resolved**: `boolean`
220
+
221
+ Whether the round has been fully resolved and scored
222
+
223
+ #### Inherited from
224
+
225
+ [GamePickRoundBase](GamePickRoundBase.md).[is_resolved](GamePickRoundBase.md#is_resolved)
226
+
227
+ ___
228
+
229
+ ### round\_status\_id
230
+
231
+ • **round\_status\_id**: [`GPRoundStatus`](../enums/GPRoundStatus.md)
232
+
233
+ Current lifecycle status of the round
234
+
235
+ #### Inherited from
236
+
237
+ [GamePickRoundBase](GamePickRoundBase.md).[round_status_id](GamePickRoundBase.md#round_status_id)
238
+
239
+ ___
240
+
241
+ ### events\_total
242
+
243
+ • **events\_total**: `number`
244
+
245
+ Total number of events in the round
246
+
247
+ #### Inherited from
248
+
249
+ [GamePickRoundBase](GamePickRoundBase.md).[events_total](GamePickRoundBase.md#events_total)
250
+
251
+ ___
252
+
253
+ ### events\_resolved
254
+
255
+ • **events\_resolved**: `number`
256
+
257
+ Number of events that have been resolved
258
+
259
+ #### Inherited from
260
+
261
+ [GamePickRoundBase](GamePickRoundBase.md).[events_resolved](GamePickRoundBase.md#events_resolved)
262
+
263
+ ___
264
+
265
+ ### score\_type\_id
266
+
267
+ • **score\_type\_id**: [`GamePickScoreType`](../enums/GamePickScoreType.md)
268
+
269
+ Scoring method used for this round
270
+
271
+ #### Inherited from
272
+
273
+ [GamePickRoundBase](GamePickRoundBase.md).[score_type_id](GamePickRoundBase.md#score_type_id)
274
+
275
+ ___
276
+
277
+ ### order\_events
278
+
279
+ • **order\_events**: [`GameRoundOrderType`](../enums/GameRoundOrderType.md)
280
+
281
+ How events are ordered for display
282
+
283
+ #### Inherited from
284
+
285
+ [GamePickRoundBase](GamePickRoundBase.md).[order_events](GamePickRoundBase.md#order_events)
286
+
287
+ ___
288
+
289
+ ### board\_users\_count
290
+
291
+ • **board\_users\_count**: `number`
292
+
293
+ Maximum number of users shown on the leaderboard
294
+
295
+ #### Inherited from
296
+
297
+ [GamePickRoundBase](GamePickRoundBase.md).[board_users_count](GamePickRoundBase.md#board_users_count)
298
+
299
+ ___
300
+
301
+ ### hide\_users\_predictions
302
+
303
+ • **hide\_users\_predictions**: `boolean`
304
+
305
+ Whether other users' predictions are hidden until resolution
306
+
307
+ #### Inherited from
308
+
309
+ [GamePickRoundBase](GamePickRoundBase.md).[hide_users_predictions](GamePickRoundBase.md#hide_users_predictions)
310
+
311
+ ___
312
+
313
+ ### public\_meta
314
+
315
+ • **public\_meta**: [`GamePickRoundPublicMeta`](GamePickRoundPublicMeta.md)
316
+
317
+ Public metadata including translations and display settings from the BackOffice
318
+
319
+ #### Inherited from
320
+
321
+ [GamePickRoundBase](GamePickRoundBase.md).[public_meta](GamePickRoundBase.md#public_meta)
322
+
323
+ ___
324
+
325
+ ### next\_round\_open\_date
326
+
327
+ • **next\_round\_open\_date**: `number`
328
+
329
+ Timestamp (ms) when the next round opens, if available
330
+
331
+ #### Inherited from
332
+
333
+ [GamePickRoundBase](GamePickRoundBase.md).[next_round_open_date](GamePickRoundBase.md#next_round_open_date)
334
+
335
+ ___
336
+
337
+ ### show\_users\_preference
338
+
339
+ • **show\_users\_preference**: `boolean`
340
+
341
+ Whether to show aggregated user preference percentages for each outcome
342
+
343
+ #### Inherited from
344
+
345
+ [GamePickRoundBase](GamePickRoundBase.md).[show_users_preference](GamePickRoundBase.md#show_users_preference)
346
+
347
+ ___
348
+
349
+ ### events
350
+
351
+ • **events**: [`GamePickEvent`](GamePickEvent.md)[]
352
+
353
+ List of events (matches/questions) in this round
354
+
355
+ ___
356
+
357
+ ### user\_score
358
+
359
+ • **user\_score**: `number`
360
+
361
+ Current user's total score in this round
362
+
363
+ ___
364
+
365
+ ### user\_placed\_bet
366
+
367
+ • **user\_placed\_bet**: `boolean`
368
+
369
+ Whether the current user has submitted any predictions in this round
370
+
371
+ ___
372
+
373
+ ### has\_open\_for\_bet\_events
374
+
375
+ • `Optional` **has\_open\_for\_bet\_events**: `boolean`
376
+
377
+ Whether there are events still open for betting
378
+
379
+ ___
380
+
381
+ ### has\_not\_submitted\_changes
382
+
383
+ • `Optional` **has\_not\_submitted\_changes**: `boolean`
384
+
385
+ Whether the user has unsaved changes to their predictions