@smartico/public-api 0.0.355 → 0.0.356
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/dist/SmarticoAPI.d.ts +1 -1
- package/dist/WSAPI/WSAPI.d.ts +1 -30
- package/dist/WSAPI/WSAPITypes.d.ts +515 -32
- package/dist/index.d.ts +0 -1
- package/dist/index.js +66 -205
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -133
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +27 -0
- package/docs/api/classes/WSAPI.md +27 -47
- package/docs/api/enums/GPRoundStatus.md +43 -0
- package/docs/api/enums/GamePickMarketType.md +19 -0
- package/docs/api/enums/GamePickResolutionType.md +35 -0
- package/docs/api/enums/GamePickScoreType.md +19 -0
- package/docs/api/enums/GamePickSportType.md +375 -0
- package/docs/api/enums/GameRoundOrderType.md +35 -0
- package/docs/api/enums/PointChangeSourceType.md +6 -0
- package/docs/api/interfaces/AchRelatedGame-1.md +1 -1
- package/docs/api/interfaces/BonusTemplateMetaMap.md +1 -1
- package/docs/api/interfaces/GamePickBoardUser.md +75 -0
- package/docs/api/interfaces/GamePickEvent.md +121 -0
- package/docs/api/interfaces/GamePickEventMeta.md +181 -0
- package/docs/api/interfaces/GamePickGameInfo.md +27 -0
- package/docs/api/interfaces/GamePickRequestParams.md +41 -0
- package/docs/api/interfaces/GamePickRound.md +385 -0
- package/docs/api/interfaces/GamePickRoundBase.md +235 -0
- package/docs/api/interfaces/GamePickRoundBoard.md +361 -0
- package/docs/api/interfaces/GamePickRoundPublicMeta.md +103 -0
- package/docs/api/interfaces/GamePickRoundRequestParams.md +65 -0
- package/docs/api/interfaces/GamePickUserInfo.md +107 -0
- package/docs/api/interfaces/GamesApiResponse.md +33 -0
- package/docs/api/interfaces/QuizEventMeta.md +41 -0
- package/docs/api/interfaces/TInboxMessageBody.md +1 -1
- package/docs/api/interfaces/TLevel.md +1 -1
- package/docs/api/interfaces/TLevelCurrent.md +1 -1
- package/docs/api/interfaces/TMiniGamePrize.md +1 -1
- package/docs/api/interfaces/TMiniGameTemplate.md +2 -2
- package/docs/api/interfaces/TMissionOrBadge.md +2 -2
- package/docs/api/interfaces/TRaffle.md +2 -2
- package/docs/api/interfaces/TRaffleDraw.md +14 -2
- package/docs/api/interfaces/TRaffleDrawRun.md +20 -0
- package/docs/api/interfaces/TRafflePrize.md +1 -1
- package/docs/api/interfaces/TStoreItem.md +3 -3
- package/docs/api/interfaces/TTournament.md +4 -4
- package/docs/api/interfaces/TTournamentDetailed.md +4 -4
- package/docs/api/interfaces/TUICustomSection.md +1 -1
- package/package.json +6 -6
- package/src/SmarticoAPI.ts +1 -1
- package/src/WSAPI/WSAPI.ts +1 -37
- package/src/WSAPI/WSAPITypes.ts +525 -32
- package/src/index.ts +1 -2
- package/dist/GamePick/GPTypes.d.ts +0 -268
- package/dist/GamePick/index.d.ts +0 -1
- package/src/GamePick/GPTypes.ts +0 -277
- package/src/GamePick/index.ts +0 -1
|
@@ -11,6 +11,7 @@ import { PointChangeSourceType } from '../ActivityLog/PointChangeSourceType';
|
|
|
11
11
|
import { UserBalanceType } from '../ActivityLog/UserBalanceType';
|
|
12
12
|
import { SAWGPMarketType } from '../Quiz/MarketsType';
|
|
13
13
|
import { QuizAnswersValueType } from '../Quiz/MarketsAnswers';
|
|
14
|
+
/** Preset ribbon keys or a custom image URL. For custom images **250×300 px** */
|
|
14
15
|
type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string;
|
|
15
16
|
/**
|
|
16
17
|
* TMiniGamePrize describes the information of prize in the array of prizes in the TMiniGameTemplate
|
|
@@ -30,7 +31,7 @@ export interface TMiniGamePrize {
|
|
|
30
31
|
font_size?: number;
|
|
31
32
|
/** Custom font size for the prize (mobile) */
|
|
32
33
|
font_size_mobile?: number;
|
|
33
|
-
/** The URL of the icon of the prize */
|
|
34
|
+
/** The URL of the icon of the prize, aspect ratio 1:1 */
|
|
34
35
|
icon?: string;
|
|
35
36
|
/** for scratch card defines position of prize in the list */
|
|
36
37
|
position: number;
|
|
@@ -117,7 +118,7 @@ export interface TMiniGameTemplate {
|
|
|
117
118
|
name: string;
|
|
118
119
|
/** Description of the mini-game template, translated to the user language */
|
|
119
120
|
description: string;
|
|
120
|
-
/** URL of the icon of the mini-game template */
|
|
121
|
+
/** URL of the icon of the mini-game template, 256x256px */
|
|
121
122
|
thumbnail: string;
|
|
122
123
|
/** Indicates if the mini-game is visible when the user have attempts/points/gems/diamonds to play */
|
|
123
124
|
visibile_when_can_spin?: boolean;
|
|
@@ -151,7 +152,7 @@ export interface TMiniGameTemplate {
|
|
|
151
152
|
/** The symbol of jackpot that is giving the sense to the 'amount' E.g. the symbol could be EUR and connected to the amount it can indicate that amount is monetary, e.g. '100 EUR'. Or the symbol can be 'Free spins' and connected to the amount it can indicate that amount is number of free spins, e.g. '100 Free spins'.
|
|
152
153
|
*/
|
|
153
154
|
jackpot_symbol: string;
|
|
154
|
-
/** The promo image
|
|
155
|
+
/** The promo image, 500x240px */
|
|
155
156
|
promo_image: string;
|
|
156
157
|
/** The promo text */
|
|
157
158
|
promo_text: string;
|
|
@@ -236,7 +237,7 @@ export interface TLevel {
|
|
|
236
237
|
name: string;
|
|
237
238
|
/** The description of the Level, translated to the user language */
|
|
238
239
|
description: string;
|
|
239
|
-
/** The URL of the image of the Level */
|
|
240
|
+
/** The URL of the image of the Level, 256x256px */
|
|
240
241
|
image: string;
|
|
241
242
|
/** The amount of points required to reach the Level */
|
|
242
243
|
required_points: number;
|
|
@@ -284,11 +285,11 @@ export interface TTournament {
|
|
|
284
285
|
name: string;
|
|
285
286
|
/** Description of the tournament, translated to the user language */
|
|
286
287
|
description: string;
|
|
287
|
-
/** 1st image URL representing the tournament */
|
|
288
|
+
/** 1st image URL representing the tournament, 544×216px */
|
|
288
289
|
image1: string;
|
|
289
|
-
/** 2nd image URL representing the tournament */
|
|
290
|
+
/** 2nd image URL representing the tournament, 920x200px */
|
|
290
291
|
image2: string;
|
|
291
|
-
/** 2nd image URL representing the tournament for mobile */
|
|
292
|
+
/** 2nd image URL representing the tournament for mobile, 720x400px */
|
|
292
293
|
image2_mobile: string;
|
|
293
294
|
/** The message indicating the prize pool of the tournament */
|
|
294
295
|
prize_pool_short: string;
|
|
@@ -305,7 +306,7 @@ export interface TTournament {
|
|
|
305
306
|
custom_data: any;
|
|
306
307
|
/** The indicator if the tournament is 'Featured' */
|
|
307
308
|
is_featured: boolean;
|
|
308
|
-
/** The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
309
|
+
/** The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250×300px */
|
|
309
310
|
ribbon: TRibbon;
|
|
310
311
|
/** A number is used to order the tournaments, representing their priority in the list */
|
|
311
312
|
priority: number;
|
|
@@ -332,7 +333,7 @@ export interface TTournament {
|
|
|
332
333
|
name: string;
|
|
333
334
|
/** The description of the prize */
|
|
334
335
|
description: string;
|
|
335
|
-
/** The image of the prize */
|
|
336
|
+
/** The image of the prize, 1:1 aspect ratio */
|
|
336
337
|
image_url: string;
|
|
337
338
|
/** from-to range of the places to which this prize */
|
|
338
339
|
place_from: number;
|
|
@@ -432,7 +433,7 @@ export interface TTournamentDetailed extends TTournament {
|
|
|
432
433
|
name: string;
|
|
433
434
|
/** The description of the prize */
|
|
434
435
|
description: string;
|
|
435
|
-
/** The image of the prize */
|
|
436
|
+
/** The image of the prize, 1:1 aspect ratio */
|
|
436
437
|
image_url: string;
|
|
437
438
|
/** from-to range of the places to which this prize */
|
|
438
439
|
place_from: number;
|
|
@@ -464,13 +465,13 @@ export interface TStoreItem {
|
|
|
464
465
|
name: string;
|
|
465
466
|
/** Description of the store item, translated to the user language */
|
|
466
467
|
description: string;
|
|
467
|
-
/** URL of the image of the store item */
|
|
468
|
+
/** URL of the image of the store item, 256x256px */
|
|
468
469
|
image: string;
|
|
469
470
|
/** Type of the store item. Can be 'bonus' or 'tangible' or different others. */
|
|
470
471
|
type: 'bonus' | 'tangible' | 'minigamespin' | 'changelevel' | 'prizedrop' | 'unknown' | 'raffleticket';
|
|
471
472
|
/** The price of the store item in the gamification points */
|
|
472
473
|
price: number;
|
|
473
|
-
/** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
474
|
+
/** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250x300px */
|
|
474
475
|
ribbon: TRibbon;
|
|
475
476
|
/**
|
|
476
477
|
* The message that should be shown to the user if he is not eligible to buy it. this message can be used to explain the reason why user cannot buy the item, e.g. 'You should be VIP to buy this item' and can be used in case can_buy property is false.
|
|
@@ -517,7 +518,7 @@ export interface TStoreItem {
|
|
|
517
518
|
discounted_price?: number;
|
|
518
519
|
/** The ribbon of the discounted price. */
|
|
519
520
|
discount_price_ribbon?: string;
|
|
520
|
-
/** The custom ribbon image of the discounted price
|
|
521
|
+
/** The custom ribbon image of the discounted price, 250x300px */
|
|
521
522
|
custom_ribbon_image?: string;
|
|
522
523
|
/** The ID of the custom section where the store item is assigned */
|
|
523
524
|
custom_section_id?: number;
|
|
@@ -555,7 +556,7 @@ export interface TMissionOrBadge {
|
|
|
555
556
|
description: string;
|
|
556
557
|
/** Description of the mission reward if defined */
|
|
557
558
|
reward: string;
|
|
558
|
-
/** URL of the image of the mission or badge */
|
|
559
|
+
/** URL of the image of the mission or badge, 256x256px */
|
|
559
560
|
image: string;
|
|
560
561
|
/** Indicator if the mission is completed or badge is granted */
|
|
561
562
|
is_completed: boolean;
|
|
@@ -606,7 +607,7 @@ export interface TMissionOrBadge {
|
|
|
606
607
|
hint_text?: string;
|
|
607
608
|
/** Priority (or position) of the mission in the UI. Low value indicates higher position in the UI */
|
|
608
609
|
position?: number;
|
|
609
|
-
/** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
610
|
+
/** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250x300px */
|
|
610
611
|
ribbon?: TRibbon;
|
|
611
612
|
/** ID of the completion fact from ach_completed or ach_completed_recurring tables */
|
|
612
613
|
ach_completed_id?: number;
|
|
@@ -654,7 +655,7 @@ export interface AchRelatedGame {
|
|
|
654
655
|
name: string;
|
|
655
656
|
/** The URL to the game */
|
|
656
657
|
link: string;
|
|
657
|
-
/** The URL to the image of the game */
|
|
658
|
+
/** The URL to the image of the game, 1:1 aspect ratio */
|
|
658
659
|
image: string;
|
|
659
660
|
/** The indicator if the game is enabled */
|
|
660
661
|
enabled: boolean;
|
|
@@ -751,7 +752,7 @@ export interface TInboxMessageBody {
|
|
|
751
752
|
title: string;
|
|
752
753
|
/** Short preview body of the message */
|
|
753
754
|
preview_body: string;
|
|
754
|
-
/** Message icon */
|
|
755
|
+
/** Message icon, 128x128px */
|
|
755
756
|
icon: string;
|
|
756
757
|
/** The action that should be performed when user clicks on the message.
|
|
757
758
|
* Can be URL or deep link, e.g. 'dp:deposit'. The most safe to execute CTA is to pass it to _smartico.dp(cta_action);
|
|
@@ -826,7 +827,7 @@ export interface TUICustomSection {
|
|
|
826
827
|
id: number;
|
|
827
828
|
/** The body of the custom section */
|
|
828
829
|
body?: string;
|
|
829
|
-
/** The image of the custom section */
|
|
830
|
+
/** The image of the custom section, 64x64px */
|
|
830
831
|
menu_img?: string;
|
|
831
832
|
/** The name of the custom section */
|
|
832
833
|
menu_name?: string;
|
|
@@ -896,7 +897,7 @@ export interface BonusTemplateMetaMap {
|
|
|
896
897
|
description: string;
|
|
897
898
|
/** Acknowledge message setup in the bonus template*/
|
|
898
899
|
acknowledge: string;
|
|
899
|
-
/** Image URL of the bonus template*/
|
|
900
|
+
/** Image URL of the bonus template, 1:1 aspect ratio */
|
|
900
901
|
image_url: string;
|
|
901
902
|
/** Redirect URL of the bonus template*/
|
|
902
903
|
redirect_url?: string;
|
|
@@ -943,9 +944,9 @@ export interface TRaffle {
|
|
|
943
944
|
description: string;
|
|
944
945
|
/** ID of the custom section that is linked to the raffle in the Gamification widget */
|
|
945
946
|
custom_section_id: number;
|
|
946
|
-
/** URL of the image that represents the raffle */
|
|
947
|
+
/** URL of the image that represents the raffle, 890x193px */
|
|
947
948
|
image_url: string;
|
|
948
|
-
/** URL of the mobile image that represents the raffle */
|
|
949
|
+
/** URL of the mobile image that represents the raffle, 300x142px */
|
|
949
950
|
image_url_mobile: string;
|
|
950
951
|
/**
|
|
951
952
|
* Custom data as string or JSON string that can be used in API to build custom UI
|
|
@@ -993,7 +994,7 @@ export interface TRafflePrize {
|
|
|
993
994
|
name: string;
|
|
994
995
|
/** Description of the prize */
|
|
995
996
|
description: string;
|
|
996
|
-
/** URL of the image that represents the prize */
|
|
997
|
+
/** URL of the image that represents the prize, 256x256px */
|
|
997
998
|
image_url: string;
|
|
998
999
|
/**
|
|
999
1000
|
* The number of prizes available per run of the draw.
|
|
@@ -1101,15 +1102,24 @@ export interface TRaffleDraw {
|
|
|
1101
1102
|
name: string;
|
|
1102
1103
|
/** Description of the draw */
|
|
1103
1104
|
description: string;
|
|
1104
|
-
/** URL of the image that represents the draw */
|
|
1105
|
+
/** URL of the image that represents the draw, 365x175px */
|
|
1105
1106
|
image_url: string;
|
|
1106
|
-
/** URL of the moible image that represents the draw */
|
|
1107
|
+
/** URL of the moible image that represents the draw, 300x145px */
|
|
1107
1108
|
image_url_mobile: string;
|
|
1108
|
-
/**
|
|
1109
|
+
/**
|
|
1110
|
+
* URL of the icon that represents the draw
|
|
1111
|
+
* @remarks Square icon target **256×256 px**
|
|
1112
|
+
*/
|
|
1109
1113
|
icon_url: string;
|
|
1110
|
-
/**
|
|
1114
|
+
/**
|
|
1115
|
+
* URL of the background image that will be used in the draw list item
|
|
1116
|
+
* @remarks Desktop draw list strip: **900×85 px**.
|
|
1117
|
+
*/
|
|
1111
1118
|
background_image_url: string;
|
|
1112
|
-
/**
|
|
1119
|
+
/**
|
|
1120
|
+
* URL of the moible background image that will be used in the draw list item
|
|
1121
|
+
* @remarks Mobile draw list background: **1328×240 px**.
|
|
1122
|
+
*/
|
|
1113
1123
|
background_image_url_mobile: string;
|
|
1114
1124
|
/** Show if the draw is grand and is marked as special */
|
|
1115
1125
|
is_grand: boolean;
|
|
@@ -1201,15 +1211,30 @@ export interface TRaffleDrawRun {
|
|
|
1201
1211
|
name: string;
|
|
1202
1212
|
/** Description of the draw */
|
|
1203
1213
|
description: string;
|
|
1204
|
-
/**
|
|
1214
|
+
/**
|
|
1215
|
+
* URL of the image that represents the draw
|
|
1216
|
+
* @remarks Same as {@link TRaffleDraw.image_url}: **365×175 px** desktop promo.
|
|
1217
|
+
*/
|
|
1205
1218
|
image_url: string;
|
|
1206
|
-
/**
|
|
1219
|
+
/**
|
|
1220
|
+
* URL of the moible image that represents the draw
|
|
1221
|
+
* @remarks Same as {@link TRaffleDraw.image_url_mobile}: **300×145 px** mobile promo.
|
|
1222
|
+
*/
|
|
1207
1223
|
image_url_mobile: string;
|
|
1208
|
-
/**
|
|
1224
|
+
/**
|
|
1225
|
+
* URL of the icon that represents the draw
|
|
1226
|
+
* @remarks Same as {@link TRaffleDraw.icon_url}: **256×256 px** square.
|
|
1227
|
+
*/
|
|
1209
1228
|
icon_url: string;
|
|
1210
|
-
/**
|
|
1229
|
+
/**
|
|
1230
|
+
* URL of the background image that will be used in the draw list item
|
|
1231
|
+
* @remarks Same as {@link TRaffleDraw.background_image_url}: **900×85 px**.
|
|
1232
|
+
*/
|
|
1211
1233
|
background_image_url: string;
|
|
1212
|
-
/**
|
|
1234
|
+
/**
|
|
1235
|
+
* URL of the moible background image that will be used in the draw list item
|
|
1236
|
+
* @remarks Same as {@link TRaffleDraw.background_image_url_mobile}: **1328×240 px**.
|
|
1237
|
+
*/
|
|
1213
1238
|
background_image_url_mobile: string;
|
|
1214
1239
|
/** Show if the draw is grand and is marked as special */
|
|
1215
1240
|
is_grand: boolean;
|
|
@@ -1267,4 +1292,462 @@ export interface TRaffleOptinResponse {
|
|
|
1267
1292
|
/** Optional error message */
|
|
1268
1293
|
err_message?: string;
|
|
1269
1294
|
}
|
|
1295
|
+
/**
|
|
1296
|
+
* GamePickMarketType defines legacy market categories for MatchX events
|
|
1297
|
+
*/
|
|
1298
|
+
export declare enum GamePickMarketType {
|
|
1299
|
+
/** Predict the number of goals */
|
|
1300
|
+
Goals = 1,
|
|
1301
|
+
/** Predict the winner */
|
|
1302
|
+
Winner = 2
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* GamePickResolutionType defines how a user's prediction was scored after event resolution
|
|
1306
|
+
*/
|
|
1307
|
+
export declare enum GamePickResolutionType {
|
|
1308
|
+
/** Event not yet resolved */
|
|
1309
|
+
None = 0,
|
|
1310
|
+
/** Prediction was wrong */
|
|
1311
|
+
Lost = 2,
|
|
1312
|
+
/** Prediction was partially correct (e.g. correct winner but wrong score) */
|
|
1313
|
+
PartialWin = 3,
|
|
1314
|
+
/** Prediction was fully correct */
|
|
1315
|
+
FullWin = 4
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* GPRoundStatus defines the lifecycle stage of a game round
|
|
1319
|
+
*/
|
|
1320
|
+
export declare enum GPRoundStatus {
|
|
1321
|
+
/** Round is in an active/other state */
|
|
1322
|
+
Other = -1,
|
|
1323
|
+
/** Round exists but has no events defined yet */
|
|
1324
|
+
NoEventsDefined = 1,
|
|
1325
|
+
/** Betting deadline has passed, no more bets allowed */
|
|
1326
|
+
NoMoreBetsAllowed = 2,
|
|
1327
|
+
/** All events in the round are resolved, but the round itself is not finalized */
|
|
1328
|
+
AllEventsResolved_ButNotRound = 3,
|
|
1329
|
+
/** Round is fully resolved and scored */
|
|
1330
|
+
RoundResolved = 4
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* GamePickScoreType defines how scores are calculated for predictions
|
|
1334
|
+
*/
|
|
1335
|
+
export declare enum GamePickScoreType {
|
|
1336
|
+
/** Score based on exact match of predicted result */
|
|
1337
|
+
ExactScore = 1,
|
|
1338
|
+
/** Score based on closeness (difference) of predicted result */
|
|
1339
|
+
PointsDifference = 2
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
* GamePickSportType defines supported sport types for events, using Betradar sport IDs
|
|
1343
|
+
*/
|
|
1344
|
+
export declare enum GamePickSportType {
|
|
1345
|
+
Soccer = 1,
|
|
1346
|
+
Basketball = 2,
|
|
1347
|
+
Baseball = 3,
|
|
1348
|
+
IceHockey = 4,
|
|
1349
|
+
Tennis = 5,
|
|
1350
|
+
Handball = 6,
|
|
1351
|
+
Floorball = 7,
|
|
1352
|
+
Golf = 9,
|
|
1353
|
+
Boxing = 10,
|
|
1354
|
+
Motorsport = 11,
|
|
1355
|
+
Rugby = 12,
|
|
1356
|
+
AussieRules = 13,
|
|
1357
|
+
Bandy = 15,
|
|
1358
|
+
AmericanFootball = 16,
|
|
1359
|
+
Cycling = 17,
|
|
1360
|
+
Specials = 18,
|
|
1361
|
+
Snooker = 19,
|
|
1362
|
+
TableTennis = 20,
|
|
1363
|
+
Cricket = 21,
|
|
1364
|
+
Darts = 22,
|
|
1365
|
+
Volleyball = 23,
|
|
1366
|
+
FieldHockey = 24,
|
|
1367
|
+
Waterpolo = 26,
|
|
1368
|
+
Curling = 28,
|
|
1369
|
+
Futsal = 29,
|
|
1370
|
+
Badminton = 31,
|
|
1371
|
+
Bowls = 32,
|
|
1372
|
+
Chess = 33,
|
|
1373
|
+
BeachVolley = 34,
|
|
1374
|
+
Netball = 35,
|
|
1375
|
+
Athletics = 36,
|
|
1376
|
+
Squash = 37,
|
|
1377
|
+
Lacrosse = 39,
|
|
1378
|
+
Formula1 = 40,
|
|
1379
|
+
AlpineSkiing = 43,
|
|
1380
|
+
Biathlon = 44,
|
|
1381
|
+
CrossCountry = 46,
|
|
1382
|
+
NordicCombined = 47,
|
|
1383
|
+
SkiJumping = 48,
|
|
1384
|
+
Schwingen = 56,
|
|
1385
|
+
BeachSoccer = 60,
|
|
1386
|
+
Pesapallo = 61,
|
|
1387
|
+
ESportCounterStrike = 109,
|
|
1388
|
+
ESportLeagueofLegends = 110,
|
|
1389
|
+
ESportDota = 111,
|
|
1390
|
+
StarCraft = 112,
|
|
1391
|
+
MMA = 117,
|
|
1392
|
+
CallOfDuty = 118,
|
|
1393
|
+
ESportOverwatch = 121,
|
|
1394
|
+
ESportRocketLeague = 128,
|
|
1395
|
+
IndyRacing = 129,
|
|
1396
|
+
Speedway = 131,
|
|
1397
|
+
GaelicFootball = 135,
|
|
1398
|
+
GaelicHurling = 136,
|
|
1399
|
+
ESporteSoccer = 137,
|
|
1400
|
+
Kabaddi = 138,
|
|
1401
|
+
ESporteBasketball = 153,
|
|
1402
|
+
Basketball3x3 = 155,
|
|
1403
|
+
ESportArenaofValor = 158,
|
|
1404
|
+
TouringCarRacing = 188,
|
|
1405
|
+
MotorcycleRacing = 190,
|
|
1406
|
+
StockCarRacing = 191
|
|
1407
|
+
}
|
|
1408
|
+
/**
|
|
1409
|
+
* GameRoundOrderType defines how events within a round are ordered for display
|
|
1410
|
+
*/
|
|
1411
|
+
export declare enum GameRoundOrderType {
|
|
1412
|
+
/** Display in the order events were added */
|
|
1413
|
+
HowAdded = 1,
|
|
1414
|
+
/** Display in reverse of the order events were added */
|
|
1415
|
+
HowAddedReversed = 2,
|
|
1416
|
+
/** Display ordered by event/match date ascending (earliest first) */
|
|
1417
|
+
EventDateAscending = 3,
|
|
1418
|
+
/** Display ordered by event/match date descending (latest first) */
|
|
1419
|
+
EventDateDescending = 4
|
|
1420
|
+
}
|
|
1421
|
+
/** Round ID constant used to request the overall/seasonal leaderboard across all rounds */
|
|
1422
|
+
export declare const AllRoundsGameBoardID = -1;
|
|
1423
|
+
/**
|
|
1424
|
+
* QuizEventMeta describes metadata for a quiz-type event (custom question with answer options)
|
|
1425
|
+
*/
|
|
1426
|
+
export interface QuizEventMeta {
|
|
1427
|
+
/** List of possible answer options for the quiz question */
|
|
1428
|
+
answers?: {
|
|
1429
|
+
/** Answer identifier value sent on submission */
|
|
1430
|
+
value: string;
|
|
1431
|
+
/** Localized display text of the answer */
|
|
1432
|
+
text: string;
|
|
1433
|
+
/** Per-language overrides for the answer text */
|
|
1434
|
+
_translations: {
|
|
1435
|
+
[key: string]: {
|
|
1436
|
+
text: string;
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
}[];
|
|
1440
|
+
/** URL of an image associated with the question */
|
|
1441
|
+
question_image?: string;
|
|
1442
|
+
/** Correct answer value after resolution */
|
|
1443
|
+
result?: QuizAnswersValueType;
|
|
1444
|
+
/** Custom question text displayed to the user */
|
|
1445
|
+
custom_question: string;
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* GamePickEventMeta describes metadata for a MatchX or Quiz event, including team info and sport context
|
|
1449
|
+
*/
|
|
1450
|
+
export interface GamePickEventMeta extends QuizEventMeta {
|
|
1451
|
+
/** Display name of the event/match */
|
|
1452
|
+
event_name?: string;
|
|
1453
|
+
/** Name of the first team (home) */
|
|
1454
|
+
team1_name: string;
|
|
1455
|
+
/** URL of the first team's logo image */
|
|
1456
|
+
team1_image: string;
|
|
1457
|
+
/** Name of the second team (away) */
|
|
1458
|
+
team2_name: string;
|
|
1459
|
+
/** URL of the second team's logo image */
|
|
1460
|
+
team2_image: string;
|
|
1461
|
+
/** Actual result score for team 1 after resolution */
|
|
1462
|
+
team1_result?: number;
|
|
1463
|
+
/** Actual result score for team 2 after resolution */
|
|
1464
|
+
team2_result?: number;
|
|
1465
|
+
/** Betradar sport type ID for the event */
|
|
1466
|
+
sport_type_id?: number;
|
|
1467
|
+
/** Whether the event has been canceled */
|
|
1468
|
+
is_canceled?: boolean;
|
|
1469
|
+
/** Whether auto-resolution from live data feed is enabled */
|
|
1470
|
+
auto_resolve_enabled?: boolean;
|
|
1471
|
+
/** ISO date string for when auto-resolution is expected */
|
|
1472
|
+
auto_resolve_date?: string;
|
|
1473
|
+
/** Auto-resolved score for team 1 from live data feed */
|
|
1474
|
+
team1_auto_result?: number;
|
|
1475
|
+
/** Auto-resolved score for team 2 from live data feed */
|
|
1476
|
+
team2_auto_result?: number;
|
|
1477
|
+
/** Auto-resolved answer value from live data feed (for quiz events) */
|
|
1478
|
+
auto_result?: string;
|
|
1479
|
+
/** Per-language overrides for team names, event name, and custom question */
|
|
1480
|
+
_translations: {
|
|
1481
|
+
[key: string]: {
|
|
1482
|
+
team1_name: string;
|
|
1483
|
+
team2_name: string;
|
|
1484
|
+
event_name: string;
|
|
1485
|
+
custom_question: string;
|
|
1486
|
+
};
|
|
1487
|
+
};
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* GamePickEvent describes a single event (match or question) within a round, including the user's prediction and resolution
|
|
1491
|
+
*/
|
|
1492
|
+
export interface GamePickEvent {
|
|
1493
|
+
/** Unique identifier of the event */
|
|
1494
|
+
gp_event_id: number;
|
|
1495
|
+
/** Timestamp (ms) when the event was resolved, null if not yet resolved */
|
|
1496
|
+
event_resolution_date: number;
|
|
1497
|
+
/** Timestamp (ms) of the match/event start time */
|
|
1498
|
+
match_date: number;
|
|
1499
|
+
/** Market type defining the prediction format (e.g. two-team score, quiz question, custom) */
|
|
1500
|
+
market_type_id: SAWGPMarketType;
|
|
1501
|
+
/** Event metadata containing team names, images, sport type, and question details */
|
|
1502
|
+
event_meta: GamePickEventMeta;
|
|
1503
|
+
/** Whether the current user has submitted a prediction for this event */
|
|
1504
|
+
user_placed_bet: boolean;
|
|
1505
|
+
/** User's predicted score for team 1 (MatchX only). Can be a number or a range object */
|
|
1506
|
+
team1_user_selection?: number | {
|
|
1507
|
+
from: number;
|
|
1508
|
+
to: number;
|
|
1509
|
+
};
|
|
1510
|
+
/** User's predicted score for team 2 (MatchX only). Can be a number or a range object */
|
|
1511
|
+
team2_user_selection?: number | {
|
|
1512
|
+
from: number;
|
|
1513
|
+
to: number;
|
|
1514
|
+
};
|
|
1515
|
+
/** User's selected answer (Quiz only). Value depends on market type (e.g. '1', '2', 'x', 'yes', 'no') */
|
|
1516
|
+
user_selection?: QuizAnswersValueType;
|
|
1517
|
+
/** How the user's prediction was scored after resolution */
|
|
1518
|
+
resolution_type_id: GamePickResolutionType;
|
|
1519
|
+
/** Points awarded for this event based on prediction accuracy */
|
|
1520
|
+
resolution_score?: number;
|
|
1521
|
+
/** Whether this event is still accepting predictions */
|
|
1522
|
+
is_open_for_bets?: boolean;
|
|
1523
|
+
/** Betting odds details for the event outcomes */
|
|
1524
|
+
odds_details?: {
|
|
1525
|
+
odd_value: {
|
|
1526
|
+
[key: string]: number;
|
|
1527
|
+
};
|
|
1528
|
+
};
|
|
1529
|
+
/** URL of a question-specific image (quiz events) */
|
|
1530
|
+
question_image?: string;
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* GamePickRoundPublicMeta describes the public-facing metadata and translations for a round, configured in the BackOffice
|
|
1534
|
+
*/
|
|
1535
|
+
export interface GamePickRoundPublicMeta {
|
|
1536
|
+
/** Localized round name */
|
|
1537
|
+
round_name: string;
|
|
1538
|
+
/** Localized round description */
|
|
1539
|
+
round_description: string;
|
|
1540
|
+
/** URL of the promotional image for the round */
|
|
1541
|
+
promo_image: string;
|
|
1542
|
+
/** Promotional text displayed with the round */
|
|
1543
|
+
promo_text: string;
|
|
1544
|
+
/** Whether to hide the round from the UI after it has been resolved */
|
|
1545
|
+
hide_resolved_round: boolean;
|
|
1546
|
+
/** URL of the final screen image for desktop */
|
|
1547
|
+
final_screen_image_desktop: string;
|
|
1548
|
+
/** URL of the final screen image for mobile */
|
|
1549
|
+
final_screen_image_mobile: string;
|
|
1550
|
+
/** Message displayed on the final/results screen */
|
|
1551
|
+
final_screen_message: string;
|
|
1552
|
+
/** Label for the CTA button on the final screen */
|
|
1553
|
+
final_screen_cta_button_title: string;
|
|
1554
|
+
/** Deep link triggered by the CTA button on the final screen */
|
|
1555
|
+
final_screen_cta_dp: string;
|
|
1556
|
+
/** Whether users can edit their answers after initial submission (within betting window) */
|
|
1557
|
+
allow_edit_answers?: boolean;
|
|
1558
|
+
/** Per-language overrides for round display content */
|
|
1559
|
+
_translations: {
|
|
1560
|
+
[key: string]: {
|
|
1561
|
+
round_name: string;
|
|
1562
|
+
round_description: string;
|
|
1563
|
+
promo_image: string;
|
|
1564
|
+
promo_text: string;
|
|
1565
|
+
final_screen_image_desktop: string;
|
|
1566
|
+
final_screen_image_mobile: string;
|
|
1567
|
+
final_screen_message: string;
|
|
1568
|
+
final_screen_cta_button_title: string;
|
|
1569
|
+
};
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* GamePickRoundBase describes a game round's metadata (without events or user-specific data)
|
|
1574
|
+
*/
|
|
1575
|
+
export interface GamePickRoundBase {
|
|
1576
|
+
/** Unique round identifier */
|
|
1577
|
+
round_id: number;
|
|
1578
|
+
/** Sequential row ID used for ordering rounds */
|
|
1579
|
+
round_row_id: number;
|
|
1580
|
+
/** Localized display name of the round */
|
|
1581
|
+
round_name: string;
|
|
1582
|
+
/** Localized description of the round */
|
|
1583
|
+
round_description: string;
|
|
1584
|
+
/** Label for the CTA button on the final/results screen */
|
|
1585
|
+
final_screen_cta_button_title: string;
|
|
1586
|
+
/** Message displayed on the final/results screen */
|
|
1587
|
+
final_screen_message: string;
|
|
1588
|
+
/** URL of the final screen image (desktop) */
|
|
1589
|
+
final_screen_image_desktop: string;
|
|
1590
|
+
/** URL of the final screen image (mobile) */
|
|
1591
|
+
final_screen_image_mobile: string;
|
|
1592
|
+
/** URL of the promotional image for the round */
|
|
1593
|
+
promo_image: string;
|
|
1594
|
+
/** Promotional text displayed with the round */
|
|
1595
|
+
promo_text: string;
|
|
1596
|
+
/** Timestamp (ms) when the round opens for participation */
|
|
1597
|
+
open_date: number;
|
|
1598
|
+
/** Timestamp (ms) of the last moment bets are accepted */
|
|
1599
|
+
last_bet_date: number;
|
|
1600
|
+
/** Timestamp (ms) when the round is expected to be resolved */
|
|
1601
|
+
resolution_date: number;
|
|
1602
|
+
/** Points awarded for a fully correct prediction */
|
|
1603
|
+
score_full_win: number;
|
|
1604
|
+
/** Points awarded for a partially correct prediction */
|
|
1605
|
+
score_part_win: number;
|
|
1606
|
+
/** Points awarded (or deducted) for an incorrect prediction */
|
|
1607
|
+
score_lost: number;
|
|
1608
|
+
/** Whether the round is currently active for participation */
|
|
1609
|
+
is_active_now: boolean;
|
|
1610
|
+
/** Whether the round has been fully resolved and scored */
|
|
1611
|
+
is_resolved: boolean;
|
|
1612
|
+
/** Current lifecycle status of the round */
|
|
1613
|
+
round_status_id: GPRoundStatus;
|
|
1614
|
+
/** Total number of events in the round */
|
|
1615
|
+
events_total: number;
|
|
1616
|
+
/** Number of events that have been resolved */
|
|
1617
|
+
events_resolved: number;
|
|
1618
|
+
/** Scoring method used for this round */
|
|
1619
|
+
score_type_id: GamePickScoreType;
|
|
1620
|
+
/** How events are ordered for display */
|
|
1621
|
+
order_events: GameRoundOrderType;
|
|
1622
|
+
/** Maximum number of users shown on the leaderboard */
|
|
1623
|
+
board_users_count: number;
|
|
1624
|
+
/** Whether other users' predictions are hidden until resolution */
|
|
1625
|
+
hide_users_predictions: boolean;
|
|
1626
|
+
/** Public metadata including translations and display settings from the BackOffice */
|
|
1627
|
+
public_meta: GamePickRoundPublicMeta;
|
|
1628
|
+
/** Timestamp (ms) when the next round opens, if available */
|
|
1629
|
+
next_round_open_date: number;
|
|
1630
|
+
/** Whether to show aggregated user preference percentages for each outcome */
|
|
1631
|
+
show_users_preference: boolean;
|
|
1632
|
+
}
|
|
1633
|
+
/**
|
|
1634
|
+
* GamePickRound describes a round with its events and the current user's prediction data
|
|
1635
|
+
*/
|
|
1636
|
+
export interface GamePickRound extends GamePickRoundBase {
|
|
1637
|
+
/** List of events (matches/questions) in this round */
|
|
1638
|
+
events: GamePickEvent[];
|
|
1639
|
+
/** Current user's total score in this round */
|
|
1640
|
+
user_score: number;
|
|
1641
|
+
/** Whether the current user has submitted any predictions in this round */
|
|
1642
|
+
user_placed_bet: boolean;
|
|
1643
|
+
/** Whether there are events still open for betting */
|
|
1644
|
+
has_open_for_bet_events?: boolean;
|
|
1645
|
+
/** Whether the user has unsaved changes to their predictions */
|
|
1646
|
+
has_not_submitted_changes?: boolean;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* GamePickRoundBoard describes a round's leaderboard with ranked users
|
|
1650
|
+
*/
|
|
1651
|
+
export interface GamePickRoundBoard extends GamePickRoundBase {
|
|
1652
|
+
/** Current user's leaderboard entry, or null if user hasn't participated */
|
|
1653
|
+
my_user: GamePickBoardUser;
|
|
1654
|
+
/** Ranked list of users on the leaderboard */
|
|
1655
|
+
users: GamePickBoardUser[];
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* GamePickBoardUser describes a user's entry on the round leaderboard
|
|
1659
|
+
*/
|
|
1660
|
+
export interface GamePickBoardUser {
|
|
1661
|
+
/** External user ID (Smartico numeric user ID) */
|
|
1662
|
+
ext_user_id: string;
|
|
1663
|
+
/** Internal user ID within the games system */
|
|
1664
|
+
int_user_id: number;
|
|
1665
|
+
/** Display name shown on the leaderboard */
|
|
1666
|
+
public_username: string;
|
|
1667
|
+
/** URL of the user's avatar image */
|
|
1668
|
+
avatar_url: string;
|
|
1669
|
+
/** User's rank position on the leaderboard, null if not yet ranked */
|
|
1670
|
+
gp_position: number;
|
|
1671
|
+
/** User's total score in this round/season */
|
|
1672
|
+
resolution_score: number;
|
|
1673
|
+
/** Number of fully correct predictions */
|
|
1674
|
+
full_wins_count: number;
|
|
1675
|
+
/** Number of partially correct predictions */
|
|
1676
|
+
part_wins_count: number;
|
|
1677
|
+
/** Number of incorrect predictions */
|
|
1678
|
+
lost_count: number;
|
|
1679
|
+
}
|
|
1680
|
+
/**
|
|
1681
|
+
* GamePickUserInfo describes the current user's profile in the games system
|
|
1682
|
+
*/
|
|
1683
|
+
export interface GamePickUserInfo {
|
|
1684
|
+
/** External user ID (Smartico numeric user ID) */
|
|
1685
|
+
ext_user_id: string;
|
|
1686
|
+
/** Internal user ID within the games system */
|
|
1687
|
+
int_user_id: number;
|
|
1688
|
+
/** Display name */
|
|
1689
|
+
public_username: string;
|
|
1690
|
+
/** URL of the user's avatar image */
|
|
1691
|
+
avatar_url: string;
|
|
1692
|
+
/** User's leaderboard rank position */
|
|
1693
|
+
gp_position?: number;
|
|
1694
|
+
/** Number of fully correct predictions */
|
|
1695
|
+
full_wins_count?: number;
|
|
1696
|
+
/** Number of partially correct predictions */
|
|
1697
|
+
part_wins_count?: number;
|
|
1698
|
+
/** User's total score */
|
|
1699
|
+
resolution_score?: number;
|
|
1700
|
+
/** Last time the user's balance was synced from the Smartico platform */
|
|
1701
|
+
last_wallet_sync_time?: Date;
|
|
1702
|
+
/** User's current points balance */
|
|
1703
|
+
ach_points_balance?: number;
|
|
1704
|
+
/** User's current gems balance */
|
|
1705
|
+
ach_gems_balance?: number;
|
|
1706
|
+
/** User's current diamonds balance */
|
|
1707
|
+
ach_diamonds_balance?: number;
|
|
1708
|
+
/** Whether the user has set a custom public username */
|
|
1709
|
+
pubic_username_set?: boolean;
|
|
1710
|
+
}
|
|
1711
|
+
/**
|
|
1712
|
+
* GamePickGameInfo describes the game configuration including SAW template, rounds list, and label settings
|
|
1713
|
+
*/
|
|
1714
|
+
export interface GamePickGameInfo {
|
|
1715
|
+
/** Game template configuration (SAW template) with UI settings, buy-in type, cost, and spin count */
|
|
1716
|
+
sawTemplate: SAWTemplate;
|
|
1717
|
+
/** List of all rounds (metadata only, no events) */
|
|
1718
|
+
allRounds: GamePickRoundBase[];
|
|
1719
|
+
/** Label/brand configuration and settings */
|
|
1720
|
+
labelInfo: any;
|
|
1721
|
+
}
|
|
1722
|
+
/**
|
|
1723
|
+
* GamesApiResponse is the standard response wrapper for all GamePick/Quiz API calls
|
|
1724
|
+
*/
|
|
1725
|
+
export interface GamesApiResponse<T> {
|
|
1726
|
+
/** Error code: 0 on success, non-zero on failure */
|
|
1727
|
+
errCode: number;
|
|
1728
|
+
/** Human-readable error message when errCode is non-zero */
|
|
1729
|
+
errMessage?: string;
|
|
1730
|
+
/** Response payload, present on success */
|
|
1731
|
+
data?: T;
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* GamePickRequestParams describes the base parameters required for GamePick API calls
|
|
1735
|
+
*/
|
|
1736
|
+
export interface GamePickRequestParams {
|
|
1737
|
+
/** ID of the MatchX or Quiz game template */
|
|
1738
|
+
saw_template_id: number;
|
|
1739
|
+
/** External user ID */
|
|
1740
|
+
ext_user_id: string;
|
|
1741
|
+
/** Smartico external user ID used for platform API calls */
|
|
1742
|
+
smartico_ext_user_id: string;
|
|
1743
|
+
/** Language code for translations (e.g. 'EN', 'DE') */
|
|
1744
|
+
lang?: string;
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* GamePickRoundRequestParams extends base params with a specific round ID
|
|
1748
|
+
*/
|
|
1749
|
+
export interface GamePickRoundRequestParams extends GamePickRequestParams {
|
|
1750
|
+
/** ID of the specific round */
|
|
1751
|
+
round_id: number;
|
|
1752
|
+
}
|
|
1270
1753
|
export { SAWAcknowledgeTypeName, PrizeModifiers, SAWTemplateUI, InboxCategories, AchCustomSectionType, SAWAskForUsername, SAWGameLayout, PointChangeSourceType, UserBalanceType, SAWGPMarketType, QuizAnswersValueType };
|