@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
package/src/WSAPI/WSAPITypes.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { SAWGPMarketType } from '../Quiz/MarketsType';
|
|
|
13
13
|
import { QuizAnswersValueType } from '../Quiz/MarketsAnswers';
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
/** Preset ribbon keys or a custom image URL. For custom images **250×300 px** */
|
|
16
17
|
type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string;
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -33,7 +34,7 @@ export interface TMiniGamePrize {
|
|
|
33
34
|
font_size?: number;
|
|
34
35
|
/** Custom font size for the prize (mobile) */
|
|
35
36
|
font_size_mobile?: number;
|
|
36
|
-
/** The URL of the icon of the prize */
|
|
37
|
+
/** The URL of the icon of the prize, aspect ratio 1:1 */
|
|
37
38
|
icon?: string;
|
|
38
39
|
/** for scratch card defines position of prize in the list */
|
|
39
40
|
position: number;
|
|
@@ -123,7 +124,7 @@ export interface TMiniGameTemplate {
|
|
|
123
124
|
name: string;
|
|
124
125
|
/** Description of the mini-game template, translated to the user language */
|
|
125
126
|
description: string;
|
|
126
|
-
/** URL of the icon of the mini-game template */
|
|
127
|
+
/** URL of the icon of the mini-game template, 256x256px */
|
|
127
128
|
thumbnail: string;
|
|
128
129
|
|
|
129
130
|
/** Indicates if the mini-game is visible when the user have attempts/points/gems/diamonds to play */
|
|
@@ -164,7 +165,7 @@ export interface TMiniGameTemplate {
|
|
|
164
165
|
*/
|
|
165
166
|
jackpot_symbol: string;
|
|
166
167
|
|
|
167
|
-
/** The promo image
|
|
168
|
+
/** The promo image, 500x240px */
|
|
168
169
|
promo_image: string;
|
|
169
170
|
/** The promo text */
|
|
170
171
|
promo_text: string;
|
|
@@ -256,7 +257,7 @@ export interface TLevel {
|
|
|
256
257
|
name: string;
|
|
257
258
|
/** The description of the Level, translated to the user language */
|
|
258
259
|
description: string;
|
|
259
|
-
/** The URL of the image of the Level */
|
|
260
|
+
/** The URL of the image of the Level, 256x256px */
|
|
260
261
|
image: string;
|
|
261
262
|
/** The amount of points required to reach the Level */
|
|
262
263
|
required_points: number;
|
|
@@ -309,11 +310,11 @@ export interface TTournament {
|
|
|
309
310
|
name: string;
|
|
310
311
|
/** Description of the tournament, translated to the user language */
|
|
311
312
|
description: string;
|
|
312
|
-
/** 1st image URL representing the tournament */
|
|
313
|
+
/** 1st image URL representing the tournament, 544×216px */
|
|
313
314
|
image1: string;
|
|
314
|
-
/** 2nd image URL representing the tournament */
|
|
315
|
+
/** 2nd image URL representing the tournament, 920x200px */
|
|
315
316
|
image2: string;
|
|
316
|
-
/** 2nd image URL representing the tournament for mobile */
|
|
317
|
+
/** 2nd image URL representing the tournament for mobile, 720x400px */
|
|
317
318
|
image2_mobile: string;
|
|
318
319
|
/** The message indicating the prize pool of the tournament */
|
|
319
320
|
prize_pool_short: string;
|
|
@@ -333,7 +334,7 @@ export interface TTournament {
|
|
|
333
334
|
/** The indicator if the tournament is 'Featured' */
|
|
334
335
|
is_featured: boolean;
|
|
335
336
|
|
|
336
|
-
/** The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
337
|
+
/** The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250×300px */
|
|
337
338
|
ribbon: TRibbon;
|
|
338
339
|
|
|
339
340
|
/** A number is used to order the tournaments, representing their priority in the list */
|
|
@@ -361,7 +362,7 @@ export interface TTournament {
|
|
|
361
362
|
name: string;
|
|
362
363
|
/** The description of the prize */
|
|
363
364
|
description: string;
|
|
364
|
-
/** The image of the prize */
|
|
365
|
+
/** The image of the prize, 1:1 aspect ratio */
|
|
365
366
|
image_url: string;
|
|
366
367
|
/** from-to range of the places to which this prize */
|
|
367
368
|
place_from: number;
|
|
@@ -467,7 +468,7 @@ export interface TTournamentDetailed extends TTournament {
|
|
|
467
468
|
name: string;
|
|
468
469
|
/** The description of the prize */
|
|
469
470
|
description: string;
|
|
470
|
-
/** The image of the prize */
|
|
471
|
+
/** The image of the prize, 1:1 aspect ratio */
|
|
471
472
|
image_url: string;
|
|
472
473
|
/** from-to range of the places to which this prize */
|
|
473
474
|
place_from: number;
|
|
@@ -501,13 +502,13 @@ export interface TStoreItem {
|
|
|
501
502
|
name: string;
|
|
502
503
|
/** Description of the store item, translated to the user language */
|
|
503
504
|
description: string;
|
|
504
|
-
/** URL of the image of the store item */
|
|
505
|
+
/** URL of the image of the store item, 256x256px */
|
|
505
506
|
image: string;
|
|
506
507
|
/** Type of the store item. Can be 'bonus' or 'tangible' or different others. */
|
|
507
508
|
type: 'bonus' | 'tangible' | 'minigamespin' | 'changelevel' | 'prizedrop' | 'unknown' | 'raffleticket';
|
|
508
509
|
/** The price of the store item in the gamification points */
|
|
509
510
|
price: number;
|
|
510
|
-
/** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
511
|
+
/** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250x300px */
|
|
511
512
|
ribbon: TRibbon;
|
|
512
513
|
/**
|
|
513
514
|
* 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.
|
|
@@ -554,7 +555,7 @@ export interface TStoreItem {
|
|
|
554
555
|
discounted_price?: number;
|
|
555
556
|
/** The ribbon of the discounted price. */
|
|
556
557
|
discount_price_ribbon?: string;
|
|
557
|
-
/** The custom ribbon image of the discounted price
|
|
558
|
+
/** The custom ribbon image of the discounted price, 250x300px */
|
|
558
559
|
custom_ribbon_image?: string;
|
|
559
560
|
/** The ID of the custom section where the store item is assigned */
|
|
560
561
|
custom_section_id?: number;
|
|
@@ -594,7 +595,7 @@ export interface TMissionOrBadge {
|
|
|
594
595
|
description: string;
|
|
595
596
|
/** Description of the mission reward if defined */
|
|
596
597
|
reward: string;
|
|
597
|
-
/** URL of the image of the mission or badge */
|
|
598
|
+
/** URL of the image of the mission or badge, 256x256px */
|
|
598
599
|
image: string;
|
|
599
600
|
/** Indicator if the mission is completed or badge is granted */
|
|
600
601
|
is_completed: boolean;
|
|
@@ -655,7 +656,7 @@ export interface TMissionOrBadge {
|
|
|
655
656
|
/** Priority (or position) of the mission in the UI. Low value indicates higher position in the UI */
|
|
656
657
|
position?: number;
|
|
657
658
|
|
|
658
|
-
/** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
659
|
+
/** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon, 250x300px */
|
|
659
660
|
ribbon?: TRibbon;
|
|
660
661
|
|
|
661
662
|
/** ID of the completion fact from ach_completed or ach_completed_recurring tables */
|
|
@@ -721,7 +722,7 @@ export interface AchRelatedGame {
|
|
|
721
722
|
name: string;
|
|
722
723
|
/** The URL to the game */
|
|
723
724
|
link: string;
|
|
724
|
-
/** The URL to the image of the game */
|
|
725
|
+
/** The URL to the image of the game, 1:1 aspect ratio */
|
|
725
726
|
image: string;
|
|
726
727
|
/** The indicator if the game is enabled */
|
|
727
728
|
enabled: boolean;
|
|
@@ -824,7 +825,7 @@ export interface TInboxMessageBody {
|
|
|
824
825
|
title: string;
|
|
825
826
|
/** Short preview body of the message */
|
|
826
827
|
preview_body: string;
|
|
827
|
-
/** Message icon */
|
|
828
|
+
/** Message icon, 128x128px */
|
|
828
829
|
icon: string;
|
|
829
830
|
/** The action that should be performed when user clicks on the message.
|
|
830
831
|
* 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);
|
|
@@ -906,7 +907,7 @@ export interface TUICustomSection {
|
|
|
906
907
|
id: number;
|
|
907
908
|
/** The body of the custom section */
|
|
908
909
|
body?: string;
|
|
909
|
-
/** The image of the custom section */
|
|
910
|
+
/** The image of the custom section, 64x64px */
|
|
910
911
|
menu_img?: string;
|
|
911
912
|
/** The name of the custom section */
|
|
912
913
|
menu_name?: string;
|
|
@@ -978,7 +979,7 @@ export interface BonusTemplateMetaMap {
|
|
|
978
979
|
description: string;
|
|
979
980
|
/** Acknowledge message setup in the bonus template*/
|
|
980
981
|
acknowledge: string;
|
|
981
|
-
/** Image URL of the bonus template*/
|
|
982
|
+
/** Image URL of the bonus template, 1:1 aspect ratio */
|
|
982
983
|
image_url: string;
|
|
983
984
|
/** Redirect URL of the bonus template*/
|
|
984
985
|
redirect_url?: string;
|
|
@@ -1028,9 +1029,9 @@ export interface TRaffle {
|
|
|
1028
1029
|
description: string;
|
|
1029
1030
|
/** ID of the custom section that is linked to the raffle in the Gamification widget */
|
|
1030
1031
|
custom_section_id: number;
|
|
1031
|
-
/** URL of the image that represents the raffle */
|
|
1032
|
+
/** URL of the image that represents the raffle, 890x193px */
|
|
1032
1033
|
image_url: string;
|
|
1033
|
-
/** URL of the mobile image that represents the raffle */
|
|
1034
|
+
/** URL of the mobile image that represents the raffle, 300x142px */
|
|
1034
1035
|
image_url_mobile: string;
|
|
1035
1036
|
/**
|
|
1036
1037
|
* Custom data as string or JSON string that can be used in API to build custom UI
|
|
@@ -1081,7 +1082,7 @@ export interface TRafflePrize {
|
|
|
1081
1082
|
name: string;
|
|
1082
1083
|
/** Description of the prize */
|
|
1083
1084
|
description: string;
|
|
1084
|
-
/** URL of the image that represents the prize */
|
|
1085
|
+
/** URL of the image that represents the prize, 256x256px */
|
|
1085
1086
|
image_url: string;
|
|
1086
1087
|
/**
|
|
1087
1088
|
* The number of prizes available per run of the draw.
|
|
@@ -1202,15 +1203,24 @@ export interface TRaffleDraw {
|
|
|
1202
1203
|
name: string;
|
|
1203
1204
|
/** Description of the draw */
|
|
1204
1205
|
description: string;
|
|
1205
|
-
/** URL of the image that represents the draw */
|
|
1206
|
+
/** URL of the image that represents the draw, 365x175px */
|
|
1206
1207
|
image_url: string;
|
|
1207
|
-
/** URL of the moible image that represents the draw */
|
|
1208
|
+
/** URL of the moible image that represents the draw, 300x145px */
|
|
1208
1209
|
image_url_mobile: string;
|
|
1209
|
-
/**
|
|
1210
|
+
/**
|
|
1211
|
+
* URL of the icon that represents the draw
|
|
1212
|
+
* @remarks Square icon target **256×256 px**
|
|
1213
|
+
*/
|
|
1210
1214
|
icon_url: string;
|
|
1211
|
-
/**
|
|
1215
|
+
/**
|
|
1216
|
+
* URL of the background image that will be used in the draw list item
|
|
1217
|
+
* @remarks Desktop draw list strip: **900×85 px**.
|
|
1218
|
+
*/
|
|
1212
1219
|
background_image_url: string;
|
|
1213
|
-
/**
|
|
1220
|
+
/**
|
|
1221
|
+
* URL of the moible background image that will be used in the draw list item
|
|
1222
|
+
* @remarks Mobile draw list background: **1328×240 px**.
|
|
1223
|
+
*/
|
|
1214
1224
|
background_image_url_mobile: string;
|
|
1215
1225
|
/** Show if the draw is grand and is marked as special */
|
|
1216
1226
|
is_grand: boolean;
|
|
@@ -1314,15 +1324,30 @@ export interface TRaffleDrawRun {
|
|
|
1314
1324
|
name: string;
|
|
1315
1325
|
/** Description of the draw */
|
|
1316
1326
|
description: string;
|
|
1317
|
-
/**
|
|
1327
|
+
/**
|
|
1328
|
+
* URL of the image that represents the draw
|
|
1329
|
+
* @remarks Same as {@link TRaffleDraw.image_url}: **365×175 px** desktop promo.
|
|
1330
|
+
*/
|
|
1318
1331
|
image_url: string;
|
|
1319
|
-
/**
|
|
1332
|
+
/**
|
|
1333
|
+
* URL of the moible image that represents the draw
|
|
1334
|
+
* @remarks Same as {@link TRaffleDraw.image_url_mobile}: **300×145 px** mobile promo.
|
|
1335
|
+
*/
|
|
1320
1336
|
image_url_mobile: string;
|
|
1321
|
-
/**
|
|
1337
|
+
/**
|
|
1338
|
+
* URL of the icon that represents the draw
|
|
1339
|
+
* @remarks Same as {@link TRaffleDraw.icon_url}: **256×256 px** square.
|
|
1340
|
+
*/
|
|
1322
1341
|
icon_url: string;
|
|
1323
|
-
/**
|
|
1342
|
+
/**
|
|
1343
|
+
* URL of the background image that will be used in the draw list item
|
|
1344
|
+
* @remarks Same as {@link TRaffleDraw.background_image_url}: **900×85 px**.
|
|
1345
|
+
*/
|
|
1324
1346
|
background_image_url: string;
|
|
1325
|
-
/**
|
|
1347
|
+
/**
|
|
1348
|
+
* URL of the moible background image that will be used in the draw list item
|
|
1349
|
+
* @remarks Same as {@link TRaffleDraw.background_image_url_mobile}: **1328×240 px**.
|
|
1350
|
+
*/
|
|
1326
1351
|
background_image_url_mobile: string;
|
|
1327
1352
|
/** Show if the draw is grand and is marked as special */
|
|
1328
1353
|
is_grand: boolean;
|
|
@@ -1385,4 +1410,472 @@ export interface TRaffleOptinResponse {
|
|
|
1385
1410
|
err_message?: string;
|
|
1386
1411
|
}
|
|
1387
1412
|
|
|
1413
|
+
/**
|
|
1414
|
+
* GamePickMarketType defines legacy market categories for MatchX events
|
|
1415
|
+
*/
|
|
1416
|
+
export enum GamePickMarketType {
|
|
1417
|
+
/** Predict the number of goals */
|
|
1418
|
+
Goals = 1,
|
|
1419
|
+
/** Predict the winner */
|
|
1420
|
+
Winner = 2,
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* GamePickResolutionType defines how a user's prediction was scored after event resolution
|
|
1425
|
+
*/
|
|
1426
|
+
export enum GamePickResolutionType {
|
|
1427
|
+
/** Event not yet resolved */
|
|
1428
|
+
None = 0,
|
|
1429
|
+
/** Prediction was wrong */
|
|
1430
|
+
Lost = 2,
|
|
1431
|
+
/** Prediction was partially correct (e.g. correct winner but wrong score) */
|
|
1432
|
+
PartialWin = 3,
|
|
1433
|
+
/** Prediction was fully correct */
|
|
1434
|
+
FullWin = 4,
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* GPRoundStatus defines the lifecycle stage of a game round
|
|
1439
|
+
*/
|
|
1440
|
+
export enum GPRoundStatus {
|
|
1441
|
+
/** Round is in an active/other state */
|
|
1442
|
+
Other = -1,
|
|
1443
|
+
/** Round exists but has no events defined yet */
|
|
1444
|
+
NoEventsDefined = 1,
|
|
1445
|
+
/** Betting deadline has passed, no more bets allowed */
|
|
1446
|
+
NoMoreBetsAllowed = 2,
|
|
1447
|
+
/** All events in the round are resolved, but the round itself is not finalized */
|
|
1448
|
+
AllEventsResolved_ButNotRound = 3,
|
|
1449
|
+
/** Round is fully resolved and scored */
|
|
1450
|
+
RoundResolved = 4,
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* GamePickScoreType defines how scores are calculated for predictions
|
|
1455
|
+
*/
|
|
1456
|
+
export enum GamePickScoreType {
|
|
1457
|
+
/** Score based on exact match of predicted result */
|
|
1458
|
+
ExactScore = 1,
|
|
1459
|
+
/** Score based on closeness (difference) of predicted result */
|
|
1460
|
+
PointsDifference = 2,
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* GamePickSportType defines supported sport types for events, using Betradar sport IDs
|
|
1465
|
+
*/
|
|
1466
|
+
export enum GamePickSportType {
|
|
1467
|
+
Soccer = 1,
|
|
1468
|
+
Basketball = 2,
|
|
1469
|
+
Baseball = 3,
|
|
1470
|
+
IceHockey = 4,
|
|
1471
|
+
Tennis = 5,
|
|
1472
|
+
Handball = 6,
|
|
1473
|
+
Floorball = 7,
|
|
1474
|
+
Golf = 9,
|
|
1475
|
+
Boxing = 10,
|
|
1476
|
+
Motorsport = 11,
|
|
1477
|
+
Rugby = 12,
|
|
1478
|
+
AussieRules = 13,
|
|
1479
|
+
Bandy = 15,
|
|
1480
|
+
AmericanFootball = 16,
|
|
1481
|
+
Cycling = 17,
|
|
1482
|
+
Specials = 18,
|
|
1483
|
+
Snooker = 19,
|
|
1484
|
+
TableTennis = 20,
|
|
1485
|
+
Cricket = 21,
|
|
1486
|
+
Darts = 22,
|
|
1487
|
+
Volleyball = 23,
|
|
1488
|
+
FieldHockey = 24,
|
|
1489
|
+
Waterpolo = 26,
|
|
1490
|
+
Curling = 28,
|
|
1491
|
+
Futsal = 29,
|
|
1492
|
+
Badminton = 31,
|
|
1493
|
+
Bowls = 32,
|
|
1494
|
+
Chess = 33,
|
|
1495
|
+
BeachVolley = 34,
|
|
1496
|
+
Netball = 35,
|
|
1497
|
+
Athletics = 36,
|
|
1498
|
+
Squash = 37,
|
|
1499
|
+
Lacrosse = 39,
|
|
1500
|
+
Formula1 = 40,
|
|
1501
|
+
AlpineSkiing = 43,
|
|
1502
|
+
Biathlon = 44,
|
|
1503
|
+
CrossCountry = 46,
|
|
1504
|
+
NordicCombined = 47,
|
|
1505
|
+
SkiJumping = 48,
|
|
1506
|
+
Schwingen = 56,
|
|
1507
|
+
BeachSoccer = 60,
|
|
1508
|
+
Pesapallo = 61,
|
|
1509
|
+
ESportCounterStrike = 109,
|
|
1510
|
+
ESportLeagueofLegends = 110,
|
|
1511
|
+
ESportDota = 111,
|
|
1512
|
+
StarCraft = 112,
|
|
1513
|
+
MMA = 117,
|
|
1514
|
+
CallOfDuty = 118,
|
|
1515
|
+
ESportOverwatch = 121,
|
|
1516
|
+
ESportRocketLeague = 128,
|
|
1517
|
+
IndyRacing = 129,
|
|
1518
|
+
Speedway = 131,
|
|
1519
|
+
GaelicFootball = 135,
|
|
1520
|
+
GaelicHurling = 136,
|
|
1521
|
+
ESporteSoccer = 137,
|
|
1522
|
+
Kabaddi = 138,
|
|
1523
|
+
ESporteBasketball = 153,
|
|
1524
|
+
Basketball3x3 = 155,
|
|
1525
|
+
ESportArenaofValor = 158,
|
|
1526
|
+
TouringCarRacing = 188,
|
|
1527
|
+
MotorcycleRacing = 190,
|
|
1528
|
+
StockCarRacing = 191,
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
/**
|
|
1532
|
+
* GameRoundOrderType defines how events within a round are ordered for display
|
|
1533
|
+
*/
|
|
1534
|
+
export enum GameRoundOrderType {
|
|
1535
|
+
/** Display in the order events were added */
|
|
1536
|
+
HowAdded = 1,
|
|
1537
|
+
/** Display in reverse of the order events were added */
|
|
1538
|
+
HowAddedReversed = 2,
|
|
1539
|
+
/** Display ordered by event/match date ascending (earliest first) */
|
|
1540
|
+
EventDateAscending = 3,
|
|
1541
|
+
/** Display ordered by event/match date descending (latest first) */
|
|
1542
|
+
EventDateDescending = 4,
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
/** Round ID constant used to request the overall/seasonal leaderboard across all rounds */
|
|
1546
|
+
export const AllRoundsGameBoardID = -1;
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* QuizEventMeta describes metadata for a quiz-type event (custom question with answer options)
|
|
1550
|
+
*/
|
|
1551
|
+
export interface QuizEventMeta {
|
|
1552
|
+
/** List of possible answer options for the quiz question */
|
|
1553
|
+
answers?: {
|
|
1554
|
+
/** Answer identifier value sent on submission */
|
|
1555
|
+
value: string;
|
|
1556
|
+
/** Localized display text of the answer */
|
|
1557
|
+
text: string;
|
|
1558
|
+
/** Per-language overrides for the answer text */
|
|
1559
|
+
_translations: {
|
|
1560
|
+
[key: string]: {
|
|
1561
|
+
text: string;
|
|
1562
|
+
};
|
|
1563
|
+
};
|
|
1564
|
+
}[];
|
|
1565
|
+
/** URL of an image associated with the question */
|
|
1566
|
+
question_image?: string;
|
|
1567
|
+
/** Correct answer value after resolution */
|
|
1568
|
+
result?: QuizAnswersValueType;
|
|
1569
|
+
/** Custom question text displayed to the user */
|
|
1570
|
+
custom_question: string;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* GamePickEventMeta describes metadata for a MatchX or Quiz event, including team info and sport context
|
|
1575
|
+
*/
|
|
1576
|
+
export interface GamePickEventMeta extends QuizEventMeta {
|
|
1577
|
+
/** Display name of the event/match */
|
|
1578
|
+
event_name?: string;
|
|
1579
|
+
/** Name of the first team (home) */
|
|
1580
|
+
team1_name: string;
|
|
1581
|
+
/** URL of the first team's logo image */
|
|
1582
|
+
team1_image: string;
|
|
1583
|
+
/** Name of the second team (away) */
|
|
1584
|
+
team2_name: string;
|
|
1585
|
+
/** URL of the second team's logo image */
|
|
1586
|
+
team2_image: string;
|
|
1587
|
+
/** Actual result score for team 1 after resolution */
|
|
1588
|
+
team1_result?: number;
|
|
1589
|
+
/** Actual result score for team 2 after resolution */
|
|
1590
|
+
team2_result?: number;
|
|
1591
|
+
/** Betradar sport type ID for the event */
|
|
1592
|
+
sport_type_id?: number;
|
|
1593
|
+
/** Whether the event has been canceled */
|
|
1594
|
+
is_canceled?: boolean;
|
|
1595
|
+
/** Whether auto-resolution from live data feed is enabled */
|
|
1596
|
+
auto_resolve_enabled?: boolean;
|
|
1597
|
+
/** ISO date string for when auto-resolution is expected */
|
|
1598
|
+
auto_resolve_date?: string;
|
|
1599
|
+
/** Auto-resolved score for team 1 from live data feed */
|
|
1600
|
+
team1_auto_result?: number;
|
|
1601
|
+
/** Auto-resolved score for team 2 from live data feed */
|
|
1602
|
+
team2_auto_result?: number;
|
|
1603
|
+
/** Auto-resolved answer value from live data feed (for quiz events) */
|
|
1604
|
+
auto_result?: string;
|
|
1605
|
+
/** Per-language overrides for team names, event name, and custom question */
|
|
1606
|
+
_translations: {
|
|
1607
|
+
[key: string]: {
|
|
1608
|
+
team1_name: string;
|
|
1609
|
+
team2_name: string;
|
|
1610
|
+
event_name: string;
|
|
1611
|
+
custom_question: string;
|
|
1612
|
+
};
|
|
1613
|
+
};
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
* GamePickEvent describes a single event (match or question) within a round, including the user's prediction and resolution
|
|
1618
|
+
*/
|
|
1619
|
+
export interface GamePickEvent {
|
|
1620
|
+
/** Unique identifier of the event */
|
|
1621
|
+
gp_event_id: number;
|
|
1622
|
+
/** Timestamp (ms) when the event was resolved, null if not yet resolved */
|
|
1623
|
+
event_resolution_date: number;
|
|
1624
|
+
/** Timestamp (ms) of the match/event start time */
|
|
1625
|
+
match_date: number;
|
|
1626
|
+
/** Market type defining the prediction format (e.g. two-team score, quiz question, custom) */
|
|
1627
|
+
market_type_id: SAWGPMarketType;
|
|
1628
|
+
/** Event metadata containing team names, images, sport type, and question details */
|
|
1629
|
+
event_meta: GamePickEventMeta;
|
|
1630
|
+
/** Whether the current user has submitted a prediction for this event */
|
|
1631
|
+
user_placed_bet: boolean;
|
|
1632
|
+
/** User's predicted score for team 1 (MatchX only). Can be a number or a range object */
|
|
1633
|
+
team1_user_selection?: number | { from: number; to: number };
|
|
1634
|
+
/** User's predicted score for team 2 (MatchX only). Can be a number or a range object */
|
|
1635
|
+
team2_user_selection?: number | { from: number; to: number };
|
|
1636
|
+
/** User's selected answer (Quiz only). Value depends on market type (e.g. '1', '2', 'x', 'yes', 'no') */
|
|
1637
|
+
user_selection?: QuizAnswersValueType;
|
|
1638
|
+
/** How the user's prediction was scored after resolution */
|
|
1639
|
+
resolution_type_id: GamePickResolutionType;
|
|
1640
|
+
/** Points awarded for this event based on prediction accuracy */
|
|
1641
|
+
resolution_score?: number;
|
|
1642
|
+
/** Whether this event is still accepting predictions */
|
|
1643
|
+
is_open_for_bets?: boolean;
|
|
1644
|
+
/** Betting odds details for the event outcomes */
|
|
1645
|
+
odds_details?: { odd_value: { [key: string]: number } };
|
|
1646
|
+
/** URL of a question-specific image (quiz events) */
|
|
1647
|
+
question_image?: string;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* GamePickRoundPublicMeta describes the public-facing metadata and translations for a round, configured in the BackOffice
|
|
1652
|
+
*/
|
|
1653
|
+
export interface GamePickRoundPublicMeta {
|
|
1654
|
+
/** Localized round name */
|
|
1655
|
+
round_name: string;
|
|
1656
|
+
/** Localized round description */
|
|
1657
|
+
round_description: string;
|
|
1658
|
+
/** URL of the promotional image for the round */
|
|
1659
|
+
promo_image: string;
|
|
1660
|
+
/** Promotional text displayed with the round */
|
|
1661
|
+
promo_text: string;
|
|
1662
|
+
/** Whether to hide the round from the UI after it has been resolved */
|
|
1663
|
+
hide_resolved_round: boolean;
|
|
1664
|
+
/** URL of the final screen image for desktop */
|
|
1665
|
+
final_screen_image_desktop: string;
|
|
1666
|
+
/** URL of the final screen image for mobile */
|
|
1667
|
+
final_screen_image_mobile: string;
|
|
1668
|
+
/** Message displayed on the final/results screen */
|
|
1669
|
+
final_screen_message: string;
|
|
1670
|
+
/** Label for the CTA button on the final screen */
|
|
1671
|
+
final_screen_cta_button_title: string;
|
|
1672
|
+
/** Deep link triggered by the CTA button on the final screen */
|
|
1673
|
+
final_screen_cta_dp: string;
|
|
1674
|
+
/** Whether users can edit their answers after initial submission (within betting window) */
|
|
1675
|
+
allow_edit_answers?: boolean;
|
|
1676
|
+
/** Per-language overrides for round display content */
|
|
1677
|
+
_translations: {
|
|
1678
|
+
[key: string]: {
|
|
1679
|
+
round_name: string;
|
|
1680
|
+
round_description: string;
|
|
1681
|
+
promo_image: string;
|
|
1682
|
+
promo_text: string;
|
|
1683
|
+
final_screen_image_desktop: string;
|
|
1684
|
+
final_screen_image_mobile: string;
|
|
1685
|
+
final_screen_message: string;
|
|
1686
|
+
final_screen_cta_button_title: string;
|
|
1687
|
+
};
|
|
1688
|
+
};
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* GamePickRoundBase describes a game round's metadata (without events or user-specific data)
|
|
1693
|
+
*/
|
|
1694
|
+
export interface GamePickRoundBase {
|
|
1695
|
+
/** Unique round identifier */
|
|
1696
|
+
round_id: number;
|
|
1697
|
+
/** Sequential row ID used for ordering rounds */
|
|
1698
|
+
round_row_id: number;
|
|
1699
|
+
/** Localized display name of the round */
|
|
1700
|
+
round_name: string;
|
|
1701
|
+
/** Localized description of the round */
|
|
1702
|
+
round_description: string;
|
|
1703
|
+
/** Label for the CTA button on the final/results screen */
|
|
1704
|
+
final_screen_cta_button_title: string;
|
|
1705
|
+
/** Message displayed on the final/results screen */
|
|
1706
|
+
final_screen_message: string;
|
|
1707
|
+
/** URL of the final screen image (desktop) */
|
|
1708
|
+
final_screen_image_desktop: string;
|
|
1709
|
+
/** URL of the final screen image (mobile) */
|
|
1710
|
+
final_screen_image_mobile: string;
|
|
1711
|
+
/** URL of the promotional image for the round */
|
|
1712
|
+
promo_image: string;
|
|
1713
|
+
/** Promotional text displayed with the round */
|
|
1714
|
+
promo_text: string;
|
|
1715
|
+
/** Timestamp (ms) when the round opens for participation */
|
|
1716
|
+
open_date: number;
|
|
1717
|
+
/** Timestamp (ms) of the last moment bets are accepted */
|
|
1718
|
+
last_bet_date: number;
|
|
1719
|
+
/** Timestamp (ms) when the round is expected to be resolved */
|
|
1720
|
+
resolution_date: number;
|
|
1721
|
+
/** Points awarded for a fully correct prediction */
|
|
1722
|
+
score_full_win: number;
|
|
1723
|
+
/** Points awarded for a partially correct prediction */
|
|
1724
|
+
score_part_win: number;
|
|
1725
|
+
/** Points awarded (or deducted) for an incorrect prediction */
|
|
1726
|
+
score_lost: number;
|
|
1727
|
+
/** Whether the round is currently active for participation */
|
|
1728
|
+
is_active_now: boolean;
|
|
1729
|
+
/** Whether the round has been fully resolved and scored */
|
|
1730
|
+
is_resolved: boolean;
|
|
1731
|
+
/** Current lifecycle status of the round */
|
|
1732
|
+
round_status_id: GPRoundStatus;
|
|
1733
|
+
/** Total number of events in the round */
|
|
1734
|
+
events_total: number;
|
|
1735
|
+
/** Number of events that have been resolved */
|
|
1736
|
+
events_resolved: number;
|
|
1737
|
+
/** Scoring method used for this round */
|
|
1738
|
+
score_type_id: GamePickScoreType;
|
|
1739
|
+
/** How events are ordered for display */
|
|
1740
|
+
order_events: GameRoundOrderType;
|
|
1741
|
+
/** Maximum number of users shown on the leaderboard */
|
|
1742
|
+
board_users_count: number;
|
|
1743
|
+
/** Whether other users' predictions are hidden until resolution */
|
|
1744
|
+
hide_users_predictions: boolean;
|
|
1745
|
+
/** Public metadata including translations and display settings from the BackOffice */
|
|
1746
|
+
public_meta: GamePickRoundPublicMeta;
|
|
1747
|
+
/** Timestamp (ms) when the next round opens, if available */
|
|
1748
|
+
next_round_open_date: number;
|
|
1749
|
+
/** Whether to show aggregated user preference percentages for each outcome */
|
|
1750
|
+
show_users_preference: boolean;
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* GamePickRound describes a round with its events and the current user's prediction data
|
|
1755
|
+
*/
|
|
1756
|
+
export interface GamePickRound extends GamePickRoundBase {
|
|
1757
|
+
/** List of events (matches/questions) in this round */
|
|
1758
|
+
events: GamePickEvent[];
|
|
1759
|
+
/** Current user's total score in this round */
|
|
1760
|
+
user_score: number;
|
|
1761
|
+
/** Whether the current user has submitted any predictions in this round */
|
|
1762
|
+
user_placed_bet: boolean;
|
|
1763
|
+
/** Whether there are events still open for betting */
|
|
1764
|
+
has_open_for_bet_events?: boolean;
|
|
1765
|
+
/** Whether the user has unsaved changes to their predictions */
|
|
1766
|
+
has_not_submitted_changes?: boolean;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
/**
|
|
1770
|
+
* GamePickRoundBoard describes a round's leaderboard with ranked users
|
|
1771
|
+
*/
|
|
1772
|
+
export interface GamePickRoundBoard extends GamePickRoundBase {
|
|
1773
|
+
/** Current user's leaderboard entry, or null if user hasn't participated */
|
|
1774
|
+
my_user: GamePickBoardUser;
|
|
1775
|
+
/** Ranked list of users on the leaderboard */
|
|
1776
|
+
users: GamePickBoardUser[];
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* GamePickBoardUser describes a user's entry on the round leaderboard
|
|
1781
|
+
*/
|
|
1782
|
+
export interface GamePickBoardUser {
|
|
1783
|
+
/** External user ID (Smartico numeric user ID) */
|
|
1784
|
+
ext_user_id: string;
|
|
1785
|
+
/** Internal user ID within the games system */
|
|
1786
|
+
int_user_id: number;
|
|
1787
|
+
/** Display name shown on the leaderboard */
|
|
1788
|
+
public_username: string;
|
|
1789
|
+
/** URL of the user's avatar image */
|
|
1790
|
+
avatar_url: string;
|
|
1791
|
+
/** User's rank position on the leaderboard, null if not yet ranked */
|
|
1792
|
+
gp_position: number;
|
|
1793
|
+
/** User's total score in this round/season */
|
|
1794
|
+
resolution_score: number;
|
|
1795
|
+
/** Number of fully correct predictions */
|
|
1796
|
+
full_wins_count: number;
|
|
1797
|
+
/** Number of partially correct predictions */
|
|
1798
|
+
part_wins_count: number;
|
|
1799
|
+
/** Number of incorrect predictions */
|
|
1800
|
+
lost_count: number;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* GamePickUserInfo describes the current user's profile in the games system
|
|
1805
|
+
*/
|
|
1806
|
+
export interface GamePickUserInfo {
|
|
1807
|
+
/** External user ID (Smartico numeric user ID) */
|
|
1808
|
+
ext_user_id: string;
|
|
1809
|
+
/** Internal user ID within the games system */
|
|
1810
|
+
int_user_id: number;
|
|
1811
|
+
/** Display name */
|
|
1812
|
+
public_username: string;
|
|
1813
|
+
/** URL of the user's avatar image */
|
|
1814
|
+
avatar_url: string;
|
|
1815
|
+
/** User's leaderboard rank position */
|
|
1816
|
+
gp_position?: number;
|
|
1817
|
+
/** Number of fully correct predictions */
|
|
1818
|
+
full_wins_count?: number;
|
|
1819
|
+
/** Number of partially correct predictions */
|
|
1820
|
+
part_wins_count?: number;
|
|
1821
|
+
/** User's total score */
|
|
1822
|
+
resolution_score?: number;
|
|
1823
|
+
/** Last time the user's balance was synced from the Smartico platform */
|
|
1824
|
+
last_wallet_sync_time?: Date;
|
|
1825
|
+
/** User's current points balance */
|
|
1826
|
+
ach_points_balance?: number;
|
|
1827
|
+
/** User's current gems balance */
|
|
1828
|
+
ach_gems_balance?: number;
|
|
1829
|
+
/** User's current diamonds balance */
|
|
1830
|
+
ach_diamonds_balance?: number;
|
|
1831
|
+
/** Whether the user has set a custom public username */
|
|
1832
|
+
pubic_username_set?: boolean;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
/**
|
|
1836
|
+
* GamePickGameInfo describes the game configuration including SAW template, rounds list, and label settings
|
|
1837
|
+
*/
|
|
1838
|
+
export interface GamePickGameInfo {
|
|
1839
|
+
/** Game template configuration (SAW template) with UI settings, buy-in type, cost, and spin count */
|
|
1840
|
+
sawTemplate: SAWTemplate;
|
|
1841
|
+
/** List of all rounds (metadata only, no events) */
|
|
1842
|
+
allRounds: GamePickRoundBase[];
|
|
1843
|
+
/** Label/brand configuration and settings */
|
|
1844
|
+
labelInfo: any;
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
/**
|
|
1848
|
+
* GamesApiResponse is the standard response wrapper for all GamePick/Quiz API calls
|
|
1849
|
+
*/
|
|
1850
|
+
export interface GamesApiResponse<T> {
|
|
1851
|
+
/** Error code: 0 on success, non-zero on failure */
|
|
1852
|
+
errCode: number;
|
|
1853
|
+
/** Human-readable error message when errCode is non-zero */
|
|
1854
|
+
errMessage?: string;
|
|
1855
|
+
/** Response payload, present on success */
|
|
1856
|
+
data?: T;
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* GamePickRequestParams describes the base parameters required for GamePick API calls
|
|
1861
|
+
*/
|
|
1862
|
+
export interface GamePickRequestParams {
|
|
1863
|
+
/** ID of the MatchX or Quiz game template */
|
|
1864
|
+
saw_template_id: number;
|
|
1865
|
+
/** External user ID */
|
|
1866
|
+
ext_user_id: string;
|
|
1867
|
+
/** Smartico external user ID used for platform API calls */
|
|
1868
|
+
smartico_ext_user_id: string;
|
|
1869
|
+
/** Language code for translations (e.g. 'EN', 'DE') */
|
|
1870
|
+
lang?: string;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* GamePickRoundRequestParams extends base params with a specific round ID
|
|
1875
|
+
*/
|
|
1876
|
+
export interface GamePickRoundRequestParams extends GamePickRequestParams {
|
|
1877
|
+
/** ID of the specific round */
|
|
1878
|
+
round_id: number;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1388
1881
|
export { SAWAcknowledgeTypeName, PrizeModifiers, SAWTemplateUI, InboxCategories, AchCustomSectionType, SAWAskForUsername, SAWGameLayout, PointChangeSourceType, UserBalanceType, SAWGPMarketType, QuizAnswersValueType }
|