@smartico/public-api 0.0.350 → 0.0.352

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/index.js CHANGED
@@ -1811,7 +1811,8 @@ var TournamentItemsTransform = function TournamentItemsTransform(items) {
1811
1811
  is_in_progress: TournamentUtils.isInProgress(r),
1812
1812
  is_upcoming: TournamentUtils.isUpcoming(r),
1813
1813
  min_scores_win: r.minScoreToWin,
1814
- hide_leaderboard_min_scores: r.hideLeaderboardsMinScores
1814
+ hide_leaderboard_min_scores: r.hideLeaderboardsMinScores,
1815
+ total_scores: r.totalScores
1815
1816
  });
1816
1817
  if (r.prizeStructure) {
1817
1818
  x.prizes = r.prizeStructure.prizes.map(function (p) {
@@ -2056,7 +2057,8 @@ var raffleTransform = function raffleTransform(items) {
2056
2057
  end_date: item.end_date_ts,
2057
2058
  max_tickets_count: item.max_tickets_count,
2058
2059
  current_tickets_count: item.current_tickets_count,
2059
- draws: drawTransform(item.draws)
2060
+ draws: drawTransform(item.draws),
2061
+ ticket_cap_visualization: item.public_meta.ticket_cap_visualization
2060
2062
  };
2061
2063
  });
2062
2064
  };
@@ -2095,6 +2097,16 @@ var drawRunTransform = function drawRunTransform(res) {
2095
2097
  };
2096
2098
  };
2097
2099
 
2100
+ exports.RaffleTicketCapVisualization = void 0;
2101
+ (function (RaffleTicketCapVisualization) {
2102
+ /** Show nothing */
2103
+ RaffleTicketCapVisualization[RaffleTicketCapVisualization["Empty"] = 0] = "Empty";
2104
+ /** Show ticket counter */
2105
+ RaffleTicketCapVisualization[RaffleTicketCapVisualization["Counter"] = 1] = "Counter";
2106
+ /** Show message when ticket cap is reached */
2107
+ RaffleTicketCapVisualization[RaffleTicketCapVisualization["Message"] = 2] = "Message";
2108
+ })(exports.RaffleTicketCapVisualization || (exports.RaffleTicketCapVisualization = {}));
2109
+
2098
2110
  exports.RaffleDrawInstanceState = void 0;
2099
2111
  (function (RaffleDrawInstanceState) {
2100
2112
  /** Draw is open for the tickets collection */
@@ -3297,18 +3309,336 @@ var WSAPI = /*#__PURE__*/function () {
3297
3309
  } catch (e) {
3298
3310
  return Promise.reject(e);
3299
3311
  }
3312
+ }
3313
+ /**
3314
+ * Returns the active rounds for the specified MatchX or Quiz game (identified by saw_template_id).
3315
+ * Each round contains events (matches/questions) with user selections.
3316
+ *
3317
+ * **Example**:
3318
+ * ```
3319
+ * _smartico.api.getGamePickActiveRounds({
3320
+ * saw_template_id: 123,
3321
+ * ext_user_id: '149598632',
3322
+ * smartico_ext_user_id: 'user@example.com',
3323
+ * lang: 'EN'
3324
+ * }).then((result) => {
3325
+ * console.log(result);
3326
+ * });
3327
+ * ```
3328
+ *
3329
+ * **Visitor mode: not supported**
3330
+ */
3331
+ ;
3332
+ _proto.getGamePickActiveRounds = function getGamePickActiveRounds(props) {
3333
+ try {
3334
+ var _this38 = this;
3335
+ if (!props.saw_template_id) {
3336
+ throw new Error('saw_template_id is required');
3337
+ }
3338
+ return Promise.resolve(_this38.api.gpGetActiveRounds(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.lang));
3339
+ } catch (e) {
3340
+ return Promise.reject(e);
3341
+ }
3342
+ }
3343
+ /**
3344
+ * Returns a single active round (the "home" round or a specific round by ID) for the specified MatchX or Quiz game.
3345
+ * If round_id is not provided, returns the most relevant active round.
3346
+ *
3347
+ * **Example**:
3348
+ * ```
3349
+ * _smartico.api.getGamePickActiveRound({
3350
+ * saw_template_id: 123,
3351
+ * ext_user_id: '149598632',
3352
+ * smartico_ext_user_id: 'user@example.com',
3353
+ * }).then((result) => {
3354
+ * console.log(result);
3355
+ * });
3356
+ * ```
3357
+ *
3358
+ * **Visitor mode: not supported**
3359
+ */
3360
+ ;
3361
+ _proto.getGamePickActiveRound = function getGamePickActiveRound(props) {
3362
+ try {
3363
+ var _this39 = this;
3364
+ if (!props.saw_template_id) {
3365
+ throw new Error('saw_template_id is required');
3366
+ }
3367
+ return Promise.resolve(_this39.api.gpGetActiveRound(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.lang, props.round_id));
3368
+ } catch (e) {
3369
+ return Promise.reject(e);
3370
+ }
3371
+ }
3372
+ /**
3373
+ * Returns the history of all rounds (including resolved) for the specified MatchX or Quiz game.
3374
+ *
3375
+ * **Example**:
3376
+ * ```
3377
+ * _smartico.api.getGamePickHistory({
3378
+ * saw_template_id: 123,
3379
+ * ext_user_id: '149598632',
3380
+ * smartico_ext_user_id: 'user@example.com',
3381
+ * }).then((result) => {
3382
+ * console.log(result);
3383
+ * });
3384
+ * ```
3385
+ *
3386
+ * **Visitor mode: not supported**
3387
+ */
3388
+ ;
3389
+ _proto.getGamePickHistory = function getGamePickHistory(props) {
3390
+ try {
3391
+ var _this40 = this;
3392
+ if (!props.saw_template_id) {
3393
+ throw new Error('saw_template_id is required');
3394
+ }
3395
+ return Promise.resolve(_this40.api.gpGetGamesHistory(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.lang));
3396
+ } catch (e) {
3397
+ return Promise.reject(e);
3398
+ }
3399
+ }
3400
+ /**
3401
+ * Returns the leaderboard for a specific round within a MatchX or Quiz game.
3402
+ * Use round_id = -1 (AllRoundsGameBoardID) for the season/overall leaderboard.
3403
+ *
3404
+ * **Example**:
3405
+ * ```
3406
+ * _smartico.api.getGamePickBoard({
3407
+ * saw_template_id: 123,
3408
+ * ext_user_id: '149598632',
3409
+ * smartico_ext_user_id: 'user@example.com',
3410
+ * round_id: 456
3411
+ * }).then((result) => {
3412
+ * console.log(result.data.users, result.data.my_user);
3413
+ * });
3414
+ * ```
3415
+ *
3416
+ * **Visitor mode: not supported**
3417
+ */
3418
+ ;
3419
+ _proto.getGamePickBoard = function getGamePickBoard(props) {
3420
+ try {
3421
+ var _this41 = this;
3422
+ if (!props.saw_template_id) {
3423
+ throw new Error('saw_template_id is required');
3424
+ }
3425
+ if (props.round_id === undefined || props.round_id === null) {
3426
+ throw new Error('round_id is required');
3427
+ }
3428
+ return Promise.resolve(_this41.api.gpGetGameBoard(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.round_id, props.lang));
3429
+ } catch (e) {
3430
+ return Promise.reject(e);
3431
+ }
3432
+ }
3433
+ /**
3434
+ * Submits picks for a round in a MatchX game.
3435
+ * Sends the entire round with user selections for all events at once.
3436
+ * Each event should have team1_user_selection and team2_user_selection (predicted scores).
3437
+ *
3438
+ * **Example**:
3439
+ * ```
3440
+ * _smartico.api.submitGamePickSelection({
3441
+ * saw_template_id: 123,
3442
+ * ext_user_id: '149598632',
3443
+ * smartico_ext_user_id: 'user@example.com',
3444
+ * round: {
3445
+ * round_id: 456,
3446
+ * events: [
3447
+ * { gp_event_id: 789, team1_user_selection: 2, team2_user_selection: 1 },
3448
+ * { gp_event_id: 790, team1_user_selection: 0, team2_user_selection: 3 }
3449
+ * ]
3450
+ * }
3451
+ * }).then((result) => {
3452
+ * console.log(result);
3453
+ * });
3454
+ * ```
3455
+ *
3456
+ * **Visitor mode: not supported**
3457
+ */
3458
+ ;
3459
+ _proto.submitGamePickSelection = function submitGamePickSelection(props) {
3460
+ try {
3461
+ var _this42 = this;
3462
+ if (!props.saw_template_id) {
3463
+ throw new Error('saw_template_id is required');
3464
+ }
3465
+ return Promise.resolve(_this42.api.gpSubmitSelection(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.round, false, props.lang));
3466
+ } catch (e) {
3467
+ return Promise.reject(e);
3468
+ }
3469
+ }
3470
+ /**
3471
+ * Submits answers for a round in a Quiz game.
3472
+ * Sends the entire round with user answers for all events at once.
3473
+ * Each event should have user_selection (answer value from QuizAnswersValueType).
3474
+ *
3475
+ * **Example**:
3476
+ * ```
3477
+ * _smartico.api.submitGamePickSelectionQuiz({
3478
+ * saw_template_id: 123,
3479
+ * ext_user_id: '149598632',
3480
+ * smartico_ext_user_id: 'user@example.com',
3481
+ * round: {
3482
+ * round_id: 456,
3483
+ * events: [
3484
+ * { gp_event_id: 789, user_selection: '1' },
3485
+ * { gp_event_id: 790, user_selection: 'x' }
3486
+ * ]
3487
+ * }
3488
+ * }).then((result) => {
3489
+ * console.log(result);
3490
+ * });
3491
+ * ```
3492
+ *
3493
+ * **Visitor mode: not supported**
3494
+ */
3495
+ ;
3496
+ _proto.submitGamePickSelectionQuiz = function submitGamePickSelectionQuiz(props) {
3497
+ try {
3498
+ var _this43 = this;
3499
+ if (!props.saw_template_id) {
3500
+ throw new Error('saw_template_id is required');
3501
+ }
3502
+ return Promise.resolve(_this43.api.gpSubmitSelection(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.round, true, props.lang));
3503
+ } catch (e) {
3504
+ return Promise.reject(e);
3505
+ }
3506
+ }
3507
+ /**
3508
+ * Returns the current user's profile information within the specified MatchX or Quiz game.
3509
+ * Includes username, avatar, position, scores, and balances.
3510
+ *
3511
+ * **Example**:
3512
+ * ```
3513
+ * _smartico.api.getGamePickUserInfo({
3514
+ * saw_template_id: 123,
3515
+ * ext_user_id: '149598632',
3516
+ * smartico_ext_user_id: 'user@example.com',
3517
+ * }).then((result) => {
3518
+ * console.log(result.data.public_username, result.data.gp_position);
3519
+ * });
3520
+ * ```
3521
+ *
3522
+ * **Visitor mode: not supported**
3523
+ */
3524
+ ;
3525
+ _proto.getGamePickUserInfo = function getGamePickUserInfo(props) {
3526
+ try {
3527
+ var _this44 = this;
3528
+ if (!props.saw_template_id) {
3529
+ throw new Error('saw_template_id is required');
3530
+ }
3531
+ return Promise.resolve(_this44.api.gpGetUserInfo(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.lang));
3532
+ } catch (e) {
3533
+ return Promise.reject(e);
3534
+ }
3535
+ }
3536
+ /**
3537
+ * Returns the game configuration (template, label info) and the list of all rounds for the specified MatchX or Quiz game.
3538
+ *
3539
+ * **Example**:
3540
+ * ```
3541
+ * _smartico.api.getGamePickGameInfo({
3542
+ * saw_template_id: 123,
3543
+ * ext_user_id: '149598632',
3544
+ * smartico_ext_user_id: 'user@example.com',
3545
+ * }).then((result) => {
3546
+ * console.log(result.data.sawTemplate, result.data.allRounds);
3547
+ * });
3548
+ * ```
3549
+ *
3550
+ * **Visitor mode: not supported**
3551
+ */
3552
+ ;
3553
+ _proto.getGamePickGameInfo = function getGamePickGameInfo(props) {
3554
+ try {
3555
+ var _this45 = this;
3556
+ if (!props.saw_template_id) {
3557
+ throw new Error('saw_template_id is required');
3558
+ }
3559
+ return Promise.resolve(_this45.api.gpGetGameInfo(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.lang));
3560
+ } catch (e) {
3561
+ return Promise.reject(e);
3562
+ }
3563
+ }
3564
+ /**
3565
+ * Returns translations for the MatchX/Quiz game UI.
3566
+ * Translations are returned as a key-value map based on the user's language.
3567
+ *
3568
+ * **Example**:
3569
+ * ```
3570
+ * _smartico.api.getGamePickTranslations({
3571
+ * saw_template_id: 123,
3572
+ * ext_user_id: '149598632',
3573
+ * smartico_ext_user_id: 'user@example.com',
3574
+ * lang: 'EN'
3575
+ * }).then((result) => {
3576
+ * console.log(result.data);
3577
+ * });
3578
+ * ```
3579
+ *
3580
+ * **Visitor mode: not supported**
3581
+ */
3582
+ ;
3583
+ _proto.getGamePickTranslations = function getGamePickTranslations(props) {
3584
+ try {
3585
+ var _this46 = this;
3586
+ if (!props.saw_template_id) {
3587
+ throw new Error('saw_template_id is required');
3588
+ }
3589
+ return Promise.resolve(_this46.api.gpGetTranslations(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.lang));
3590
+ } catch (e) {
3591
+ return Promise.reject(e);
3592
+ }
3593
+ }
3594
+ /**
3595
+ * Returns round data with events and picks for a specific user (identified by their internal user ID).
3596
+ * Useful for showing another user's predictions from the leaderboard.
3597
+ *
3598
+ * **Example**:
3599
+ * ```
3600
+ * _smartico.api.getGamePickRoundInfoForUser({
3601
+ * saw_template_id: 123,
3602
+ * ext_user_id: '149598632',
3603
+ * smartico_ext_user_id: 'user@example.com',
3604
+ * round_id: 456,
3605
+ * int_user_id: 789
3606
+ * }).then((result) => {
3607
+ * console.log(result.data.events);
3608
+ * });
3609
+ * ```
3610
+ *
3611
+ * **Visitor mode: not supported**
3612
+ */
3613
+ ;
3614
+ _proto.getGamePickRoundInfoForUser = function getGamePickRoundInfoForUser(props) {
3615
+ try {
3616
+ var _this47 = this;
3617
+ if (!props.saw_template_id) {
3618
+ throw new Error('saw_template_id is required');
3619
+ }
3620
+ if (!props.round_id) {
3621
+ throw new Error('round_id is required');
3622
+ }
3623
+ if (!props.int_user_id) {
3624
+ throw new Error('int_user_id is required');
3625
+ }
3626
+ return Promise.resolve(_this47.api.gpGetRoundInfoForUser(props.ext_user_id, props.smartico_ext_user_id, props.saw_template_id, props.round_id, props.int_user_id, props.lang));
3627
+ } catch (e) {
3628
+ return Promise.reject(e);
3629
+ }
3300
3630
  };
3301
3631
  _proto.updateOnSpin = function updateOnSpin(data) {
3302
3632
  try {
3303
- var _this38 = this;
3633
+ var _this48 = this;
3304
3634
  return Promise.resolve(OCache.use(onUpdateContextKey.Saw, exports.ECacheContext.WSAPI, function () {
3305
- return _this38.api.sawGetTemplatesT(null);
3635
+ return _this48.api.sawGetTemplatesT(null);
3306
3636
  }, CACHE_DATA_SEC)).then(function (templates) {
3307
3637
  var index = templates.findIndex(function (t) {
3308
3638
  return t.id === data.saw_template_id;
3309
3639
  });
3310
3640
  templates[index].spin_count = data.spin_count;
3311
- _this38.updateEntity(onUpdateContextKey.Saw, templates);
3641
+ _this48.updateEntity(onUpdateContextKey.Saw, templates);
3312
3642
  });
3313
3643
  } catch (e) {
3314
3644
  return Promise.reject(e);
@@ -3316,9 +3646,9 @@ var WSAPI = /*#__PURE__*/function () {
3316
3646
  };
3317
3647
  _proto.reloadMiniGameTemplate = function reloadMiniGameTemplate() {
3318
3648
  try {
3319
- var _this39 = this;
3320
- return Promise.resolve(_this39.api.sawGetTemplatesT(null)).then(function (updatedTemplates) {
3321
- _this39.updateEntity(onUpdateContextKey.Saw, updatedTemplates);
3649
+ var _this49 = this;
3650
+ return Promise.resolve(_this49.api.sawGetTemplatesT(null)).then(function (updatedTemplates) {
3651
+ _this49.updateEntity(onUpdateContextKey.Saw, updatedTemplates);
3322
3652
  });
3323
3653
  } catch (e) {
3324
3654
  return Promise.reject(e);
@@ -3326,9 +3656,9 @@ var WSAPI = /*#__PURE__*/function () {
3326
3656
  };
3327
3657
  _proto.updateMissions = function updateMissions() {
3328
3658
  try {
3329
- var _this40 = this;
3330
- return Promise.resolve(_this40.api.missionsGetItemsT(null)).then(function (payload) {
3331
- _this40.updateEntity(onUpdateContextKey.Missions, payload);
3659
+ var _this50 = this;
3660
+ return Promise.resolve(_this50.api.missionsGetItemsT(null)).then(function (payload) {
3661
+ _this50.updateEntity(onUpdateContextKey.Missions, payload);
3332
3662
  });
3333
3663
  } catch (e) {
3334
3664
  return Promise.reject(e);
@@ -3336,9 +3666,9 @@ var WSAPI = /*#__PURE__*/function () {
3336
3666
  };
3337
3667
  _proto.updateBonuses = function updateBonuses() {
3338
3668
  try {
3339
- var _this41 = this;
3340
- return Promise.resolve(_this41.api.bonusesGetItemsT(null)).then(function (payload) {
3341
- _this41.updateEntity(onUpdateContextKey.Bonuses, payload);
3669
+ var _this51 = this;
3670
+ return Promise.resolve(_this51.api.bonusesGetItemsT(null)).then(function (payload) {
3671
+ _this51.updateEntity(onUpdateContextKey.Bonuses, payload);
3342
3672
  });
3343
3673
  } catch (e) {
3344
3674
  return Promise.reject(e);
@@ -3346,9 +3676,9 @@ var WSAPI = /*#__PURE__*/function () {
3346
3676
  };
3347
3677
  _proto.updateTournaments = function updateTournaments() {
3348
3678
  try {
3349
- var _this42 = this;
3350
- return Promise.resolve(_this42.api.tournamentsGetLobbyT(null)).then(function (payload) {
3351
- _this42.updateEntity(onUpdateContextKey.TournamentList, payload);
3679
+ var _this52 = this;
3680
+ return Promise.resolve(_this52.api.tournamentsGetLobbyT(null)).then(function (payload) {
3681
+ _this52.updateEntity(onUpdateContextKey.TournamentList, payload);
3352
3682
  });
3353
3683
  } catch (e) {
3354
3684
  return Promise.reject(e);
@@ -3356,9 +3686,9 @@ var WSAPI = /*#__PURE__*/function () {
3356
3686
  };
3357
3687
  _proto.updateStorePurchasedItems = function updateStorePurchasedItems() {
3358
3688
  try {
3359
- var _this43 = this;
3360
- return Promise.resolve(_this43.api.storeGetPurchasedItemsT(null, 20, 0)).then(function (payload) {
3361
- _this43.updateEntity(onUpdateContextKey.StoreHistory, payload);
3689
+ var _this53 = this;
3690
+ return Promise.resolve(_this53.api.storeGetPurchasedItemsT(null, 20, 0)).then(function (payload) {
3691
+ _this53.updateEntity(onUpdateContextKey.StoreHistory, payload);
3362
3692
  });
3363
3693
  } catch (e) {
3364
3694
  return Promise.reject(e);
@@ -3366,9 +3696,9 @@ var WSAPI = /*#__PURE__*/function () {
3366
3696
  };
3367
3697
  _proto.updateStoreItems = function updateStoreItems() {
3368
3698
  try {
3369
- var _this44 = this;
3370
- return Promise.resolve(_this44.api.storeGetItemsT(null)).then(function (payload) {
3371
- _this44.updateEntity(onUpdateContextKey.StoreItems, payload);
3699
+ var _this54 = this;
3700
+ return Promise.resolve(_this54.api.storeGetItemsT(null)).then(function (payload) {
3701
+ _this54.updateEntity(onUpdateContextKey.StoreItems, payload);
3372
3702
  });
3373
3703
  } catch (e) {
3374
3704
  return Promise.reject(e);
@@ -3376,8 +3706,8 @@ var WSAPI = /*#__PURE__*/function () {
3376
3706
  };
3377
3707
  _proto.updateInboxUnreadCount = function updateInboxUnreadCount(count) {
3378
3708
  try {
3379
- var _this45 = this;
3380
- _this45.updateEntity(onUpdateContextKey.InboxUnreadCount, count);
3709
+ var _this55 = this;
3710
+ _this55.updateEntity(onUpdateContextKey.InboxUnreadCount, count);
3381
3711
  return Promise.resolve();
3382
3712
  } catch (e) {
3383
3713
  return Promise.reject(e);
@@ -3385,9 +3715,9 @@ var WSAPI = /*#__PURE__*/function () {
3385
3715
  };
3386
3716
  _proto.updateInboxMessages = function updateInboxMessages() {
3387
3717
  try {
3388
- var _this46 = this;
3389
- return Promise.resolve(_this46.api.getInboxMessagesT(null)).then(function (payload) {
3390
- _this46.updateEntity(onUpdateContextKey.InboxMessages, payload);
3718
+ var _this56 = this;
3719
+ return Promise.resolve(_this56.api.getInboxMessagesT(null)).then(function (payload) {
3720
+ _this56.updateEntity(onUpdateContextKey.InboxMessages, payload);
3391
3721
  });
3392
3722
  } catch (e) {
3393
3723
  return Promise.reject(e);
@@ -3395,9 +3725,9 @@ var WSAPI = /*#__PURE__*/function () {
3395
3725
  };
3396
3726
  _proto.updateRaffles = function updateRaffles() {
3397
3727
  try {
3398
- var _this47 = this;
3399
- return Promise.resolve(_this47.api.getRafflesT(null)).then(function (payload) {
3400
- _this47.updateEntity(onUpdateContextKey.Raffles, payload);
3728
+ var _this57 = this;
3729
+ return Promise.resolve(_this57.api.getRafflesT(null)).then(function (payload) {
3730
+ _this57.updateEntity(onUpdateContextKey.Raffles, payload);
3401
3731
  });
3402
3732
  } catch (e) {
3403
3733
  return Promise.reject(e);
@@ -3405,11 +3735,11 @@ var WSAPI = /*#__PURE__*/function () {
3405
3735
  };
3406
3736
  _proto.notifyActivityLogUpdate = function notifyActivityLogUpdate() {
3407
3737
  try {
3408
- var _this48 = this;
3738
+ var _this58 = this;
3409
3739
  var startSeconds = Date.now() / 1000 - 600;
3410
3740
  var endSeconds = Date.now() / 1000;
3411
- return Promise.resolve(_this48.api.getActivityLogT(null, startSeconds, endSeconds, 0, 50)).then(function (payload) {
3412
- _this48.updateEntity(onUpdateContextKey.ActivityLog, payload);
3741
+ return Promise.resolve(_this58.api.getActivityLogT(null, startSeconds, endSeconds, 0, 50)).then(function (payload) {
3742
+ _this58.updateEntity(onUpdateContextKey.ActivityLog, payload);
3413
3743
  });
3414
3744
  } catch (e) {
3415
3745
  return Promise.reject(e);
@@ -3417,9 +3747,9 @@ var WSAPI = /*#__PURE__*/function () {
3417
3747
  };
3418
3748
  _proto.updateEntity = function updateEntity(contextKey, payload) {
3419
3749
  try {
3420
- var _this49 = this;
3750
+ var _this59 = this;
3421
3751
  OCache.set(contextKey, payload, exports.ECacheContext.WSAPI);
3422
- var onUpdate = _this49.onUpdateCallback.get(contextKey);
3752
+ var onUpdate = _this59.onUpdateCallback.get(contextKey);
3423
3753
  if (onUpdate) {
3424
3754
  onUpdate(payload);
3425
3755
  }
@@ -3460,17 +3790,17 @@ var WSAPI = /*#__PURE__*/function () {
3460
3790
  ;
3461
3791
  _proto.jackpotGet = function jackpotGet(filter) {
3462
3792
  try {
3463
- var _this50 = this;
3793
+ var _this60 = this;
3464
3794
  var signature = (filter == null ? void 0 : filter.jp_template_id) + ":" + (filter == null ? void 0 : filter.related_game_id);
3465
- if (signature !== _this50.jackpotGetSignature) {
3466
- _this50.jackpotGetSignature = signature;
3467
- _this50.jackpotClearCache();
3795
+ if (signature !== _this60.jackpotGetSignature) {
3796
+ _this60.jackpotGetSignature = signature;
3797
+ _this60.jackpotClearCache();
3468
3798
  }
3469
3799
  var jackpots = [];
3470
3800
  var pots = [];
3471
3801
  return Promise.resolve(OCache.use(onUpdateContextKey.Jackpots, exports.ECacheContext.WSAPI, function () {
3472
3802
  try {
3473
- return Promise.resolve(_this50.api.jackpotGet(null, filter)).then(function (_jackpots) {
3803
+ return Promise.resolve(_this60.api.jackpotGet(null, filter)).then(function (_jackpots) {
3474
3804
  var _pots = _jackpots.items.map(function (jp) {
3475
3805
  return jp.pot;
3476
3806
  });
@@ -3502,10 +3832,10 @@ var WSAPI = /*#__PURE__*/function () {
3502
3832
  var jp_template_ids = jackpots.map(function (jp) {
3503
3833
  return jp.jp_template_id;
3504
3834
  });
3505
- return Promise.resolve(_this50.api.potGet(null, {
3835
+ return Promise.resolve(_this60.api.potGet(null, {
3506
3836
  jp_template_ids: jp_template_ids
3507
- })).then(function (_this50$api$potGet) {
3508
- return _this50$api$potGet.items;
3837
+ })).then(function (_this60$api$potGet) {
3838
+ return _this60$api$potGet.items;
3509
3839
  });
3510
3840
  } catch (e) {
3511
3841
  return Promise.reject(e);
@@ -3538,11 +3868,11 @@ var WSAPI = /*#__PURE__*/function () {
3538
3868
  ;
3539
3869
  _proto.jackpotOptIn = function jackpotOptIn(filter) {
3540
3870
  try {
3541
- var _this51 = this;
3871
+ var _this61 = this;
3542
3872
  if (!filter.jp_template_id) {
3543
3873
  throw new Error('jp_template_id is required in jackpotOptIn');
3544
3874
  }
3545
- return Promise.resolve(_this51.api.jackpotOptIn(null, filter));
3875
+ return Promise.resolve(_this61.api.jackpotOptIn(null, filter));
3546
3876
  } catch (e) {
3547
3877
  return Promise.reject(e);
3548
3878
  }
@@ -3564,11 +3894,11 @@ var WSAPI = /*#__PURE__*/function () {
3564
3894
  ;
3565
3895
  _proto.jackpotOptOut = function jackpotOptOut(filter) {
3566
3896
  try {
3567
- var _this52 = this;
3897
+ var _this62 = this;
3568
3898
  if (!filter.jp_template_id) {
3569
3899
  throw new Error('jp_template_id is required in jackpotOptOut');
3570
3900
  }
3571
- return Promise.resolve(_this52.api.jackpotOptOut(null, filter));
3901
+ return Promise.resolve(_this62.api.jackpotOptOut(null, filter));
3572
3902
  } catch (e) {
3573
3903
  return Promise.reject(e);
3574
3904
  }
@@ -3594,9 +3924,9 @@ var WSAPI = /*#__PURE__*/function () {
3594
3924
  offset = _ref15.offset,
3595
3925
  jp_template_id = _ref15.jp_template_id;
3596
3926
  try {
3597
- var _this53 = this;
3927
+ var _this63 = this;
3598
3928
  return Promise.resolve(OCache.use(onUpdateContextKey.JackpotWinners + jp_template_id, exports.ECacheContext.WSAPI, function () {
3599
- return _this53.api.getJackpotWinnersT(null, limit, offset, jp_template_id);
3929
+ return _this63.api.getJackpotWinnersT(null, limit, offset, jp_template_id);
3600
3930
  }, JACKPOT_WINNERS_CACHE_SEC));
3601
3931
  } catch (e) {
3602
3932
  return Promise.reject(e);
@@ -3620,12 +3950,12 @@ var WSAPI = /*#__PURE__*/function () {
3620
3950
  var jp_template_id = _ref16.jp_template_id,
3621
3951
  onUpdate = _ref16.onUpdate;
3622
3952
  try {
3623
- var _this54 = this;
3953
+ var _this64 = this;
3624
3954
  if (onUpdate) {
3625
- _this54.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
3955
+ _this64.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
3626
3956
  }
3627
3957
  return Promise.resolve(OCache.use(onUpdateContextKey.JackpotEligibleGames + jp_template_id, exports.ECacheContext.WSAPI, function () {
3628
- return _this54.api.getJackpotEligibleGamesT(null, {
3958
+ return _this64.api.getJackpotEligibleGamesT(null, {
3629
3959
  jp_template_id: jp_template_id
3630
3960
  });
3631
3961
  }, JACKPOT_ELIGIBLE_GAMES_CACHE_SEC));
@@ -3654,8 +3984,8 @@ var WSAPI = /*#__PURE__*/function () {
3654
3984
  ;
3655
3985
  _proto.getRelatedItemsForGame = function getRelatedItemsForGame(related_game_id) {
3656
3986
  try {
3657
- var _this55 = this;
3658
- return Promise.resolve(_this55.api.getRelatedItemsForGame(null, related_game_id));
3987
+ var _this65 = this;
3988
+ return Promise.resolve(_this65.api.getRelatedItemsForGame(null, related_game_id));
3659
3989
  } catch (e) {
3660
3990
  return Promise.reject(e);
3661
3991
  }
@@ -3687,12 +4017,12 @@ var WSAPI = /*#__PURE__*/function () {
3687
4017
  var _ref17 = _temp13 === void 0 ? {} : _temp13,
3688
4018
  onUpdate = _ref17.onUpdate;
3689
4019
  try {
3690
- var _this56 = this;
4020
+ var _this66 = this;
3691
4021
  if (onUpdate) {
3692
- _this56.onUpdateCallback.set(onUpdateContextKey.Raffles, onUpdate);
4022
+ _this66.onUpdateCallback.set(onUpdateContextKey.Raffles, onUpdate);
3693
4023
  }
3694
4024
  return Promise.resolve(OCache.use(onUpdateContextKey.Raffles, exports.ECacheContext.WSAPI, function () {
3695
- return _this56.api.getRafflesT(null);
4025
+ return _this66.api.getRafflesT(null);
3696
4026
  }, CACHE_DATA_SEC));
3697
4027
  } catch (e) {
3698
4028
  return Promise.reject(e);
@@ -3724,11 +4054,11 @@ var WSAPI = /*#__PURE__*/function () {
3724
4054
  ;
3725
4055
  _proto.getRaffleDrawRun = function getRaffleDrawRun(props) {
3726
4056
  try {
3727
- var _this57 = this;
4057
+ var _this67 = this;
3728
4058
  if (!props.raffle_id || !props.run_id) {
3729
4059
  throw new Error('both raffle_id and run_id are required');
3730
4060
  }
3731
- return Promise.resolve(_this57.api.getRaffleDrawRunT(null, props.raffle_id, props.run_id, props.winners_from, props.winners_to));
4061
+ return Promise.resolve(_this67.api.getRaffleDrawRunT(null, props.raffle_id, props.run_id, props.winners_from, props.winners_to));
3732
4062
  } catch (e) {
3733
4063
  return Promise.reject(e);
3734
4064
  }
@@ -3757,8 +4087,8 @@ var WSAPI = /*#__PURE__*/function () {
3757
4087
  ;
3758
4088
  _proto.getRaffleDrawRunsHistory = function getRaffleDrawRunsHistory(props) {
3759
4089
  try {
3760
- var _this58 = this;
3761
- return Promise.resolve(_this58.api.getRaffleDrawRunsHistory(null, props)).then(function (res) {
4090
+ var _this68 = this;
4091
+ return Promise.resolve(_this68.api.getRaffleDrawRunsHistory(null, props)).then(function (res) {
3762
4092
  if (!props.raffle_id) {
3763
4093
  throw new Error('raffle_id is required');
3764
4094
  }
@@ -3792,11 +4122,11 @@ var WSAPI = /*#__PURE__*/function () {
3792
4122
  ;
3793
4123
  _proto.claimRafflePrize = function claimRafflePrize(props) {
3794
4124
  try {
3795
- var _this59 = this;
4125
+ var _this69 = this;
3796
4126
  if (!props.won_id) {
3797
4127
  throw new Error('won_id is required');
3798
4128
  }
3799
- return Promise.resolve(_this59.api.claimRafflePrize(null, {
4129
+ return Promise.resolve(_this69.api.claimRafflePrize(null, {
3800
4130
  won_id: props.won_id
3801
4131
  })).then(raffleClaimPrizeResponseTransform);
3802
4132
  } catch (e) {
@@ -3811,7 +4141,7 @@ var WSAPI = /*#__PURE__*/function () {
3811
4141
  ;
3812
4142
  _proto.requestRaffleOptin = function requestRaffleOptin(props) {
3813
4143
  try {
3814
- var _this60 = this;
4144
+ var _this70 = this;
3815
4145
  if (!props.raffle_id) {
3816
4146
  throw new Error('raffle_id is required');
3817
4147
  }
@@ -3821,7 +4151,7 @@ var WSAPI = /*#__PURE__*/function () {
3821
4151
  if (!props.raffle_run_id) {
3822
4152
  throw new Error('raffle_run_id is required');
3823
4153
  }
3824
- return Promise.resolve(_this60.api.raffleOptin(null, props)).then(function (r) {
4154
+ return Promise.resolve(_this70.api.raffleOptin(null, props)).then(function (r) {
3825
4155
  return {
3826
4156
  err_code: r.errCode,
3827
4157
  err_message: r.errMsg
@@ -3962,12 +4292,14 @@ var ActivityLogTransform = function ActivityLogTransform(items) {
3962
4292
  return [];
3963
4293
  }
3964
4294
  return items.map(function (item) {
4295
+ var _item$type;
3965
4296
  var itemTransformed = {
3966
4297
  create_date: item.create_date,
3967
4298
  user_ext_id: item.user_ext_id,
3968
4299
  crm_brand_id: item.crm_brand_id,
3969
4300
  source_type_id: item.source_type_id
3970
4301
  };
4302
+ item.type = (_item$type = item.type) != null ? _item$type : exports.UserBalanceType.Points;
3971
4303
  if (item.type === exports.UserBalanceType.Diamonds || item.type === exports.UserBalanceType.Gems) {
3972
4304
  itemTransformed.type = item.type;
3973
4305
  itemTransformed.amount = item.amount;
@@ -4055,6 +4387,7 @@ function _catch(body, recover) {
4055
4387
  }
4056
4388
  var PUBLIC_API_URL = 'https://papi{ENV_ID}.smartico.ai/services/public';
4057
4389
  var C_SOCKET_PROD = 'wss://api{ENV_ID}.smartico.ai/websocket/services';
4390
+ var GAMES_API_URL = 'https://r-games-api{ENV_ID}.smr.vc';
4058
4391
  var AVATAR_DOMAIN = 'https://img{ENV_ID}.smr.vc';
4059
4392
  var DEFAULT_LANG_EN = 'EN';
4060
4393
  var SmarticoAPI = /*#__PURE__*/function () {
@@ -4070,7 +4403,9 @@ var SmarticoAPI = /*#__PURE__*/function () {
4070
4403
  this.wsUrl = void 0;
4071
4404
  this.inboxCdnUrl = void 0;
4072
4405
  this.partnerUrl = void 0;
4406
+ this.gamesApiUrl = void 0;
4073
4407
  this.avatarDomain = void 0;
4408
+ this.envId = void 0;
4074
4409
  this.logger = void 0;
4075
4410
  this.logCIDs = void 0;
4076
4411
  this.logHTTPTiming = void 0;
@@ -4087,6 +4422,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
4087
4422
  this.tracker = options.tracker;
4088
4423
  this.publicUrl = SmarticoAPI.getPublicUrl(label_api_key);
4089
4424
  this.wsUrl = SmarticoAPI.getPublicWsUrl(label_api_key);
4425
+ this.gamesApiUrl = SmarticoAPI.getGamesApiUrl(label_api_key);
4090
4426
  this.avatarDomain = SmarticoAPI.getAvatarUrl(label_api_key || ((_options$tracker = options.tracker) == null ? void 0 : _options$tracker.label_api_key));
4091
4427
  this.label_api_key = SmarticoAPI.getCleanLabelApiKey(label_api_key);
4092
4428
  }
@@ -4145,8 +4481,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
4145
4481
  SmarticoAPI.getPublicWsUrl = function getPublicWsUrl(label_api_key) {
4146
4482
  return C_SOCKET_PROD.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
4147
4483
  };
4484
+ SmarticoAPI.getGamesApiUrl = function getGamesApiUrl(label_api_key) {
4485
+ return GAMES_API_URL.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
4486
+ };
4148
4487
  SmarticoAPI.getAvatarUrl = function getAvatarUrl(label_api_key) {
4149
- SmarticoAPI.getEnvDnsSuffix(label_api_key);
4150
4488
  var avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
4151
4489
  return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
4152
4490
  };
@@ -5239,25 +5577,204 @@ var SmarticoAPI = /*#__PURE__*/function () {
5239
5577
  return Promise.reject(e);
5240
5578
  }
5241
5579
  };
5580
+ _proto.buildGamesApiParams = function buildGamesApiParams(ext_user_id, smartico_ext_user_id, ext_game_id, lang) {
5581
+ var params = {
5582
+ ext_user_id: ext_user_id,
5583
+ smartico_ext_user_id: smartico_ext_user_id,
5584
+ ext_game_id: String(ext_game_id),
5585
+ lang: lang,
5586
+ env_id: String(SmarticoAPI.getEnvId(this.label_api_key)),
5587
+ label_api_key: this.label_api_key,
5588
+ hash: ''
5589
+ };
5590
+ if (this.brand_api_key) {
5591
+ params.brand_key = this.brand_api_key;
5592
+ }
5593
+ return params;
5594
+ };
5595
+ _proto.sendGamesApi = function sendGamesApi(method, ext_user_id, smartico_ext_user_id, ext_game_id, lang, extraParams, usePost) {
5596
+ if (usePost === void 0) {
5597
+ usePost = false;
5598
+ }
5599
+ try {
5600
+ var _this68 = this;
5601
+ var baseParams = _this68.buildGamesApiParams(ext_user_id, smartico_ext_user_id, ext_game_id, lang);
5602
+ var queryString = Object.entries(baseParams).map(function (_ref3) {
5603
+ var k = _ref3[0],
5604
+ v = _ref3[1];
5605
+ return k + "=" + encodeURIComponent(v);
5606
+ }).join('&');
5607
+ var url = _this68.gamesApiUrl + "/" + method + "?" + queryString;
5608
+ var fetchOptions = {
5609
+ method: 'GET',
5610
+ headers: {
5611
+ 'Accept': 'application/json'
5612
+ }
5613
+ };
5614
+ if (usePost && extraParams) {
5615
+ fetchOptions = {
5616
+ method: 'POST',
5617
+ headers: {
5618
+ 'Accept': 'application/json',
5619
+ 'Content-Type': 'application/json'
5620
+ },
5621
+ body: JSON.stringify(extraParams)
5622
+ };
5623
+ } else if (extraParams) {
5624
+ var extraQuery = Object.entries(extraParams).map(function (_ref4) {
5625
+ var k = _ref4[0],
5626
+ v = _ref4[1];
5627
+ return k + "=" + encodeURIComponent(JSON.stringify(v));
5628
+ }).join('&');
5629
+ url += "&" + extraQuery;
5630
+ }
5631
+ return Promise.resolve(_catch(function () {
5632
+ return Promise.resolve(fetch(url, fetchOptions)).then(function (response) {
5633
+ return Promise.resolve(response.json()).then(function (data) {
5634
+ return SmarticoAPI.replaceSmrDomainsWithCloudfront(data);
5635
+ });
5636
+ });
5637
+ }, function (e) {
5638
+ _this68.logger.error("Failed to call games API: " + method, {
5639
+ url: url,
5640
+ error: e.message
5641
+ });
5642
+ throw new Error("Failed to call games API: " + method + ". " + e.message);
5643
+ }));
5644
+ } catch (e) {
5645
+ return Promise.reject(e);
5646
+ }
5647
+ };
5648
+ _proto.gpGetActiveRounds = function gpGetActiveRounds(ext_user_id, smartico_ext_user_id, saw_template_id, lang) {
5649
+ if (lang === void 0) {
5650
+ lang = DEFAULT_LANG_EN;
5651
+ }
5652
+ try {
5653
+ var _this69 = this;
5654
+ return Promise.resolve(_this69.sendGamesApi('active-rounds', ext_user_id, smartico_ext_user_id, saw_template_id, lang));
5655
+ } catch (e) {
5656
+ return Promise.reject(e);
5657
+ }
5658
+ };
5659
+ _proto.gpGetActiveRound = function gpGetActiveRound(ext_user_id, smartico_ext_user_id, saw_template_id, lang, round_id) {
5660
+ if (lang === void 0) {
5661
+ lang = DEFAULT_LANG_EN;
5662
+ }
5663
+ try {
5664
+ var _this70 = this;
5665
+ var extraParams = {};
5666
+ if (round_id !== undefined) {
5667
+ extraParams.round_id = round_id;
5668
+ }
5669
+ return Promise.resolve(_this70.sendGamesApi('active-round', ext_user_id, smartico_ext_user_id, saw_template_id, lang, Object.keys(extraParams).length > 0 ? extraParams : undefined));
5670
+ } catch (e) {
5671
+ return Promise.reject(e);
5672
+ }
5673
+ };
5674
+ _proto.gpGetGamesHistory = function gpGetGamesHistory(ext_user_id, smartico_ext_user_id, saw_template_id, lang) {
5675
+ if (lang === void 0) {
5676
+ lang = DEFAULT_LANG_EN;
5677
+ }
5678
+ try {
5679
+ var _this71 = this;
5680
+ return Promise.resolve(_this71.sendGamesApi('games-history', ext_user_id, smartico_ext_user_id, saw_template_id, lang));
5681
+ } catch (e) {
5682
+ return Promise.reject(e);
5683
+ }
5684
+ };
5685
+ _proto.gpGetGameBoard = function gpGetGameBoard(ext_user_id, smartico_ext_user_id, saw_template_id, round_id, lang) {
5686
+ if (lang === void 0) {
5687
+ lang = DEFAULT_LANG_EN;
5688
+ }
5689
+ try {
5690
+ var _this72 = this;
5691
+ return Promise.resolve(_this72.sendGamesApi('game-board', ext_user_id, smartico_ext_user_id, saw_template_id, lang, {
5692
+ round_id: round_id
5693
+ }));
5694
+ } catch (e) {
5695
+ return Promise.reject(e);
5696
+ }
5697
+ };
5698
+ _proto.gpSubmitSelection = function gpSubmitSelection(ext_user_id, smartico_ext_user_id, saw_template_id, round, isQuiz, lang) {
5699
+ if (lang === void 0) {
5700
+ lang = DEFAULT_LANG_EN;
5701
+ }
5702
+ try {
5703
+ var _this73 = this;
5704
+ var method = isQuiz ? 'submit-selection-quiz' : 'submit-selection';
5705
+ return Promise.resolve(_this73.sendGamesApi(method, ext_user_id, smartico_ext_user_id, saw_template_id, lang, {
5706
+ round: round
5707
+ }, true));
5708
+ } catch (e) {
5709
+ return Promise.reject(e);
5710
+ }
5711
+ };
5712
+ _proto.gpGetUserInfo = function gpGetUserInfo(ext_user_id, smartico_ext_user_id, saw_template_id, lang) {
5713
+ if (lang === void 0) {
5714
+ lang = DEFAULT_LANG_EN;
5715
+ }
5716
+ try {
5717
+ var _this74 = this;
5718
+ return Promise.resolve(_this74.sendGamesApi('user-info', ext_user_id, smartico_ext_user_id, saw_template_id, lang));
5719
+ } catch (e) {
5720
+ return Promise.reject(e);
5721
+ }
5722
+ };
5723
+ _proto.gpGetGameInfo = function gpGetGameInfo(ext_user_id, smartico_ext_user_id, saw_template_id, lang) {
5724
+ if (lang === void 0) {
5725
+ lang = DEFAULT_LANG_EN;
5726
+ }
5727
+ try {
5728
+ var _this75 = this;
5729
+ return Promise.resolve(_this75.sendGamesApi('game-info', ext_user_id, smartico_ext_user_id, saw_template_id, lang));
5730
+ } catch (e) {
5731
+ return Promise.reject(e);
5732
+ }
5733
+ };
5734
+ _proto.gpGetTranslations = function gpGetTranslations(ext_user_id, smartico_ext_user_id, saw_template_id, lang) {
5735
+ if (lang === void 0) {
5736
+ lang = DEFAULT_LANG_EN;
5737
+ }
5738
+ try {
5739
+ var _this76 = this;
5740
+ return Promise.resolve(_this76.sendGamesApi('translations', ext_user_id, smartico_ext_user_id, saw_template_id, lang));
5741
+ } catch (e) {
5742
+ return Promise.reject(e);
5743
+ }
5744
+ };
5745
+ _proto.gpGetRoundInfoForUser = function gpGetRoundInfoForUser(ext_user_id, smartico_ext_user_id, saw_template_id, round_id, int_user_id, lang) {
5746
+ if (lang === void 0) {
5747
+ lang = DEFAULT_LANG_EN;
5748
+ }
5749
+ try {
5750
+ var _this77 = this;
5751
+ return Promise.resolve(_this77.sendGamesApi('game-round-info-for-user', ext_user_id, smartico_ext_user_id, saw_template_id, lang, {
5752
+ round_id: round_id,
5753
+ int_user_id: int_user_id
5754
+ }));
5755
+ } catch (e) {
5756
+ return Promise.reject(e);
5757
+ }
5758
+ };
5242
5759
  _proto.getWSCalls = function getWSCalls() {
5243
5760
  return new WSAPI(this);
5244
5761
  };
5245
5762
  _proto.getRelatedItemsForGame = function getRelatedItemsForGame(user_ext_id, related_game_id) {
5246
5763
  try {
5247
- var _this68 = this;
5248
- var message = _this68.buildMessage(user_ext_id, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST, {
5764
+ var _this78 = this;
5765
+ var message = _this78.buildMessage(user_ext_id, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST, {
5249
5766
  related_game_id: related_game_id
5250
5767
  });
5251
- return Promise.resolve(_this68.send(message, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE));
5768
+ return Promise.resolve(_this78.send(message, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE));
5252
5769
  } catch (e) {
5253
5770
  return Promise.reject(e);
5254
5771
  }
5255
5772
  };
5256
5773
  _proto.getRafflesT = function getRafflesT(user_ext_id) {
5257
5774
  try {
5258
- var _this69 = this;
5259
- return Promise.resolve(_this69.getRaffles(user_ext_id)).then(function (_this69$getRaffles) {
5260
- return raffleTransform(_this69$getRaffles.items);
5775
+ var _this79 = this;
5776
+ return Promise.resolve(_this79.getRaffles(user_ext_id)).then(function (_this79$getRaffles) {
5777
+ return raffleTransform(_this79$getRaffles.items);
5261
5778
  });
5262
5779
  } catch (e) {
5263
5780
  return Promise.reject(e);
@@ -5265,18 +5782,18 @@ var SmarticoAPI = /*#__PURE__*/function () {
5265
5782
  };
5266
5783
  _proto.getRaffles = function getRaffles(user_ext_id) {
5267
5784
  try {
5268
- var _this70 = this;
5269
- var message = _this70.buildMessage(user_ext_id, exports.ClassId.RAF_GET_RAFFLES_REQUEST);
5270
- return Promise.resolve(_this70.send(message, exports.ClassId.RAF_GET_RAFFLES_RESPONSE));
5785
+ var _this80 = this;
5786
+ var message = _this80.buildMessage(user_ext_id, exports.ClassId.RAF_GET_RAFFLES_REQUEST);
5787
+ return Promise.resolve(_this80.send(message, exports.ClassId.RAF_GET_RAFFLES_RESPONSE));
5271
5788
  } catch (e) {
5272
5789
  return Promise.reject(e);
5273
5790
  }
5274
5791
  };
5275
5792
  _proto.getRaffleDrawRun = function getRaffleDrawRun(user_ext_id, payload) {
5276
5793
  try {
5277
- var _this71 = this;
5278
- var message = _this71.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_RUN_REQUEST, payload);
5279
- return Promise.resolve(_this71.send(message, exports.ClassId.RAF_GET_DRAW_RUN_RESPONSE));
5794
+ var _this81 = this;
5795
+ var message = _this81.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_RUN_REQUEST, payload);
5796
+ return Promise.resolve(_this81.send(message, exports.ClassId.RAF_GET_DRAW_RUN_RESPONSE));
5280
5797
  } catch (e) {
5281
5798
  return Promise.reject(e);
5282
5799
  }
@@ -5289,10 +5806,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
5289
5806
  winners_to = 20;
5290
5807
  }
5291
5808
  try {
5292
- var _this72 = this;
5809
+ var _this82 = this;
5293
5810
  var winners_limit = winners_to - winners_from > 50 ? 50 : winners_to - winners_from;
5294
5811
  var winners_offset = winners_from;
5295
- return Promise.resolve(_this72.getRaffleDrawRun(user_ext_id, {
5812
+ return Promise.resolve(_this82.getRaffleDrawRun(user_ext_id, {
5296
5813
  raffle_id: raffle_id,
5297
5814
  run_id: run_id,
5298
5815
  winners_limit: winners_limit,
@@ -5304,41 +5821,41 @@ var SmarticoAPI = /*#__PURE__*/function () {
5304
5821
  };
5305
5822
  _proto.getRaffleDrawRunsHistory = function getRaffleDrawRunsHistory(user_ext_id, props) {
5306
5823
  try {
5307
- var _this73 = this;
5308
- var message = _this73.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_HISTORY_REQUEST, props);
5309
- return Promise.resolve(_this73.send(message, exports.ClassId.RAF_GET_DRAW_HISTORY_RESPONSE));
5824
+ var _this83 = this;
5825
+ var message = _this83.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_HISTORY_REQUEST, props);
5826
+ return Promise.resolve(_this83.send(message, exports.ClassId.RAF_GET_DRAW_HISTORY_RESPONSE));
5310
5827
  } catch (e) {
5311
5828
  return Promise.reject(e);
5312
5829
  }
5313
5830
  };
5314
5831
  _proto.claimRafflePrize = function claimRafflePrize(user_ext_id, props) {
5315
5832
  try {
5316
- var _this74 = this;
5317
- var message = _this74.buildMessage(user_ext_id, exports.ClassId.RAF_CLAIM_PRIZE_REQUEST, props);
5318
- return Promise.resolve(_this74.send(message, exports.ClassId.RAF_CLAIM_PRIZE_RESPONSE));
5833
+ var _this84 = this;
5834
+ var message = _this84.buildMessage(user_ext_id, exports.ClassId.RAF_CLAIM_PRIZE_REQUEST, props);
5835
+ return Promise.resolve(_this84.send(message, exports.ClassId.RAF_CLAIM_PRIZE_RESPONSE));
5319
5836
  } catch (e) {
5320
5837
  return Promise.reject(e);
5321
5838
  }
5322
5839
  };
5323
5840
  _proto.raffleOptin = function raffleOptin(user_ext_id, props) {
5324
5841
  try {
5325
- var _this75 = this;
5326
- var message = _this75.buildMessage(user_ext_id, exports.ClassId.RAF_OPTIN_REQUEST, props);
5327
- return Promise.resolve(_this75.send(message, exports.ClassId.RAF_OPTIN_RESPONSE));
5842
+ var _this85 = this;
5843
+ var message = _this85.buildMessage(user_ext_id, exports.ClassId.RAF_OPTIN_REQUEST, props);
5844
+ return Promise.resolve(_this85.send(message, exports.ClassId.RAF_OPTIN_RESPONSE));
5328
5845
  } catch (e) {
5329
5846
  return Promise.reject(e);
5330
5847
  }
5331
5848
  };
5332
5849
  _proto.getActivityLog = function getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset) {
5333
5850
  try {
5334
- var _this76 = this;
5335
- var message = _this76.buildMessage(user_ext_id, exports.ClassId.GET_POINT_HISTORY_REQUEST, {
5851
+ var _this86 = this;
5852
+ var message = _this86.buildMessage(user_ext_id, exports.ClassId.GET_POINT_HISTORY_REQUEST, {
5336
5853
  startTimeSeconds: Math.floor(startTimeSeconds),
5337
5854
  endTimeSeconds: Math.floor(endTimeSeconds),
5338
5855
  limit: limit,
5339
5856
  offset: offset
5340
5857
  });
5341
- return Promise.resolve(_this76.send(message, exports.ClassId.GET_POINT_HISTORY_RESPONSE));
5858
+ return Promise.resolve(_this86.send(message, exports.ClassId.GET_POINT_HISTORY_RESPONSE));
5342
5859
  } catch (e) {
5343
5860
  return Promise.reject(e);
5344
5861
  }
@@ -5351,11 +5868,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
5351
5868
  to = 50;
5352
5869
  }
5353
5870
  try {
5354
- var _this77 = this;
5871
+ var _this87 = this;
5355
5872
  var limit = to - from > 50 ? 50 : to - from;
5356
5873
  var offset = from;
5357
- return Promise.resolve(_this77.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset)).then(function (_this77$getActivityLo) {
5358
- return ActivityLogTransform(_this77$getActivityLo.logHistory);
5874
+ return Promise.resolve(_this87.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset)).then(function (_this87$getActivityLo) {
5875
+ return ActivityLogTransform(_this87$getActivityLo.logHistory);
5359
5876
  });
5360
5877
  } catch (e) {
5361
5878
  return Promise.reject(e);
@@ -5822,8 +6339,108 @@ exports.JackpotType = void 0;
5822
6339
  JackpotType[JackpotType["Personal"] = 2] = "Personal";
5823
6340
  })(exports.JackpotType || (exports.JackpotType = {}));
5824
6341
 
6342
+ exports.GamePickMarketType = void 0;
6343
+ (function (GamePickMarketType) {
6344
+ GamePickMarketType[GamePickMarketType["Goals"] = 1] = "Goals";
6345
+ GamePickMarketType[GamePickMarketType["Winner"] = 2] = "Winner";
6346
+ })(exports.GamePickMarketType || (exports.GamePickMarketType = {}));
6347
+ exports.GamePickResolutionType = void 0;
6348
+ (function (GamePickResolutionType) {
6349
+ GamePickResolutionType[GamePickResolutionType["None"] = 0] = "None";
6350
+ GamePickResolutionType[GamePickResolutionType["Lost"] = 2] = "Lost";
6351
+ GamePickResolutionType[GamePickResolutionType["PartialWin"] = 3] = "PartialWin";
6352
+ GamePickResolutionType[GamePickResolutionType["FullWin"] = 4] = "FullWin";
6353
+ })(exports.GamePickResolutionType || (exports.GamePickResolutionType = {}));
6354
+ exports.GPRoundStatus = void 0;
6355
+ (function (GPRoundStatus) {
6356
+ GPRoundStatus[GPRoundStatus["Other"] = -1] = "Other";
6357
+ GPRoundStatus[GPRoundStatus["NoEventsDefined"] = 1] = "NoEventsDefined";
6358
+ GPRoundStatus[GPRoundStatus["NoMoreBetsAllowed"] = 2] = "NoMoreBetsAllowed";
6359
+ GPRoundStatus[GPRoundStatus["AllEventsResolved_ButNotRound"] = 3] = "AllEventsResolved_ButNotRound";
6360
+ GPRoundStatus[GPRoundStatus["RoundResolved"] = 4] = "RoundResolved";
6361
+ })(exports.GPRoundStatus || (exports.GPRoundStatus = {}));
6362
+ exports.GamePickScoreType = void 0;
6363
+ (function (GamePickScoreType) {
6364
+ GamePickScoreType[GamePickScoreType["ExactScore"] = 1] = "ExactScore";
6365
+ GamePickScoreType[GamePickScoreType["PointsDifference"] = 2] = "PointsDifference";
6366
+ })(exports.GamePickScoreType || (exports.GamePickScoreType = {}));
6367
+ exports.GamePickSportType = void 0;
6368
+ (function (GamePickSportType) {
6369
+ GamePickSportType[GamePickSportType["Golf"] = 9] = "Golf";
6370
+ GamePickSportType[GamePickSportType["Cycling"] = 17] = "Cycling";
6371
+ GamePickSportType[GamePickSportType["Specials"] = 18] = "Specials";
6372
+ GamePickSportType[GamePickSportType["TouringCarRacing"] = 188] = "TouringCarRacing";
6373
+ GamePickSportType[GamePickSportType["StockCarRacing"] = 191] = "StockCarRacing";
6374
+ GamePickSportType[GamePickSportType["IndyRacing"] = 129] = "IndyRacing";
6375
+ GamePickSportType[GamePickSportType["Biathlon"] = 44] = "Biathlon";
6376
+ GamePickSportType[GamePickSportType["Speedway"] = 131] = "Speedway";
6377
+ GamePickSportType[GamePickSportType["Motorsport"] = 11] = "Motorsport";
6378
+ GamePickSportType[GamePickSportType["AlpineSkiing"] = 43] = "AlpineSkiing";
6379
+ GamePickSportType[GamePickSportType["SkiJumping"] = 48] = "SkiJumping";
6380
+ GamePickSportType[GamePickSportType["Lacrosse"] = 39] = "Lacrosse";
6381
+ GamePickSportType[GamePickSportType["CrossCountry"] = 46] = "CrossCountry";
6382
+ GamePickSportType[GamePickSportType["NordicCombined"] = 47] = "NordicCombined";
6383
+ GamePickSportType[GamePickSportType["Chess"] = 33] = "Chess";
6384
+ GamePickSportType[GamePickSportType["Athletics"] = 36] = "Athletics";
6385
+ GamePickSportType[GamePickSportType["ESportOverwatch"] = 121] = "ESportOverwatch";
6386
+ GamePickSportType[GamePickSportType["MMA"] = 117] = "MMA";
6387
+ GamePickSportType[GamePickSportType["Futsal"] = 29] = "Futsal";
6388
+ GamePickSportType[GamePickSportType["IceHockey"] = 4] = "IceHockey";
6389
+ GamePickSportType[GamePickSportType["Kabaddi"] = 138] = "Kabaddi";
6390
+ GamePickSportType[GamePickSportType["BeachVolley"] = 34] = "BeachVolley";
6391
+ GamePickSportType[GamePickSportType["Formula1"] = 40] = "Formula1";
6392
+ GamePickSportType[GamePickSportType["ESporteBasketball"] = 153] = "ESporteBasketball";
6393
+ GamePickSportType[GamePickSportType["MotorcycleRacing"] = 190] = "MotorcycleRacing";
6394
+ GamePickSportType[GamePickSportType["Bowls"] = 32] = "Bowls";
6395
+ GamePickSportType[GamePickSportType["Boxing"] = 10] = "Boxing";
6396
+ GamePickSportType[GamePickSportType["Floorball"] = 7] = "Floorball";
6397
+ GamePickSportType[GamePickSportType["GaelicHurling"] = 136] = "GaelicHurling";
6398
+ GamePickSportType[GamePickSportType["Bandy"] = 15] = "Bandy";
6399
+ GamePickSportType[GamePickSportType["Handball"] = 6] = "Handball";
6400
+ GamePickSportType[GamePickSportType["Waterpolo"] = 26] = "Waterpolo";
6401
+ GamePickSportType[GamePickSportType["Rugby"] = 12] = "Rugby";
6402
+ GamePickSportType[GamePickSportType["ESporteSoccer"] = 137] = "ESporteSoccer";
6403
+ GamePickSportType[GamePickSportType["FieldHockey"] = 24] = "FieldHockey";
6404
+ GamePickSportType[GamePickSportType["Pesapallo"] = 61] = "Pesapallo";
6405
+ GamePickSportType[GamePickSportType["Snooker"] = 19] = "Snooker";
6406
+ GamePickSportType[GamePickSportType["Badminton"] = 31] = "Badminton";
6407
+ GamePickSportType[GamePickSportType["Cricket"] = 21] = "Cricket";
6408
+ GamePickSportType[GamePickSportType["BeachSoccer"] = 60] = "BeachSoccer";
6409
+ GamePickSportType[GamePickSportType["Baseball"] = 3] = "Baseball";
6410
+ GamePickSportType[GamePickSportType["StarCraft"] = 112] = "StarCraft";
6411
+ GamePickSportType[GamePickSportType["ESportCounterStrike"] = 109] = "ESportCounterStrike";
6412
+ GamePickSportType[GamePickSportType["ESportArenaofValor"] = 158] = "ESportArenaofValor";
6413
+ GamePickSportType[GamePickSportType["Curling"] = 28] = "Curling";
6414
+ GamePickSportType[GamePickSportType["Squash"] = 37] = "Squash";
6415
+ GamePickSportType[GamePickSportType["Darts"] = 22] = "Darts";
6416
+ GamePickSportType[GamePickSportType["TableTennis"] = 20] = "TableTennis";
6417
+ GamePickSportType[GamePickSportType["Basketball3x3"] = 155] = "Basketball3x3";
6418
+ GamePickSportType[GamePickSportType["AussieRules"] = 13] = "AussieRules";
6419
+ GamePickSportType[GamePickSportType["GaelicFootball"] = 135] = "GaelicFootball";
6420
+ GamePickSportType[GamePickSportType["CallOfDuty"] = 118] = "CallOfDuty";
6421
+ GamePickSportType[GamePickSportType["Soccer"] = 1] = "Soccer";
6422
+ GamePickSportType[GamePickSportType["Tennis"] = 5] = "Tennis";
6423
+ GamePickSportType[GamePickSportType["ESportDota"] = 111] = "ESportDota";
6424
+ GamePickSportType[GamePickSportType["Basketball"] = 2] = "Basketball";
6425
+ GamePickSportType[GamePickSportType["ESportLeagueofLegends"] = 110] = "ESportLeagueofLegends";
6426
+ GamePickSportType[GamePickSportType["AmericanFootball"] = 16] = "AmericanFootball";
6427
+ GamePickSportType[GamePickSportType["Volleyball"] = 23] = "Volleyball";
6428
+ GamePickSportType[GamePickSportType["Netball"] = 35] = "Netball";
6429
+ GamePickSportType[GamePickSportType["ESportRocketLeague"] = 128] = "ESportRocketLeague";
6430
+ GamePickSportType[GamePickSportType["Schwingen"] = 56] = "Schwingen";
6431
+ })(exports.GamePickSportType || (exports.GamePickSportType = {}));
6432
+ exports.GameRoundOrderType = void 0;
6433
+ (function (GameRoundOrderType) {
6434
+ GameRoundOrderType[GameRoundOrderType["HowAdded"] = 1] = "HowAdded";
6435
+ GameRoundOrderType[GameRoundOrderType["HowAddedReversed"] = 2] = "HowAddedReversed";
6436
+ GameRoundOrderType[GameRoundOrderType["EventDateAscending"] = 3] = "EventDateAscending";
6437
+ GameRoundOrderType[GameRoundOrderType["EventDateDescending"] = 4] = "EventDateDescending";
6438
+ })(exports.GameRoundOrderType || (exports.GameRoundOrderType = {}));
6439
+ var AllRoundsGameBoardID = -1;
6440
+
5825
6441
  exports.AchCategoryTransform = AchCategoryTransform;
5826
6442
  exports.ActivityLogTransform = ActivityLogTransform;
6443
+ exports.AllRoundsGameBoardID = AllRoundsGameBoardID;
5827
6444
  exports.BonusItemsTransform = BonusItemsTransform;
5828
6445
  exports.CookieStore = CookieStore;
5829
6446
  exports.CoreUtils = CoreUtils;