@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/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3675,45 +3675,6 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3675
3675
|
return Promise.reject(e);
|
|
3676
3676
|
}
|
|
3677
3677
|
}
|
|
3678
|
-
/**
|
|
3679
|
-
* Returns translations for the MatchX/Quiz game UI.
|
|
3680
|
-
* Translations are returned as a key-value map for the Gamification and RetentionGames areas,
|
|
3681
|
-
* resolved to the current user's language.
|
|
3682
|
-
*
|
|
3683
|
-
* @param props.saw_template_id - The ID of the MatchX or Quiz game template
|
|
3684
|
-
*
|
|
3685
|
-
* **Response** `GamesApiResponse<any>`:
|
|
3686
|
-
* - `errCode` - 0 on success
|
|
3687
|
-
* - `data`:
|
|
3688
|
-
* - `translations` - Key-value map of translation strings (e.g. `rgSubmitSelection`, `rgLeaderboardTitle`, `quizConfirmAnswer`, etc.)
|
|
3689
|
-
* - `hash_code` - Hash for cache invalidation
|
|
3690
|
-
* - `lang_code` - Resolved language code (e.g. 'EN')
|
|
3691
|
-
*
|
|
3692
|
-
* **Example**:
|
|
3693
|
-
* ```
|
|
3694
|
-
* _smartico.api.getGamePickTranslations({
|
|
3695
|
-
* saw_template_id: 1083,
|
|
3696
|
-
* }).then((result) => {
|
|
3697
|
-
* const tr = result.data.translations;
|
|
3698
|
-
* console.log(tr.rgSubmitSelection); // "Submit selection"
|
|
3699
|
-
* console.log(tr.rgLeaderboardTitle); // "Leaderboard"
|
|
3700
|
-
* });
|
|
3701
|
-
* ```
|
|
3702
|
-
*
|
|
3703
|
-
* **Visitor mode: not supported**
|
|
3704
|
-
*/
|
|
3705
|
-
;
|
|
3706
|
-
_proto.getGamePickTranslations = function getGamePickTranslations(props) {
|
|
3707
|
-
try {
|
|
3708
|
-
var _this44 = this;
|
|
3709
|
-
if (!props.saw_template_id) {
|
|
3710
|
-
throw new Error('saw_template_id is required');
|
|
3711
|
-
}
|
|
3712
|
-
return Promise.resolve(_this44.api.gpGetTranslations(props.saw_template_id));
|
|
3713
|
-
} catch (e) {
|
|
3714
|
-
return Promise.reject(e);
|
|
3715
|
-
}
|
|
3716
|
-
}
|
|
3717
3678
|
/**
|
|
3718
3679
|
* Returns round data with events and picks for a specific user (identified by their internal user ID).
|
|
3719
3680
|
* Useful for viewing another user's predictions from the leaderboard.
|
|
@@ -3748,7 +3709,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3748
3709
|
;
|
|
3749
3710
|
_proto.getGamePickRoundInfoForUser = function getGamePickRoundInfoForUser(props) {
|
|
3750
3711
|
try {
|
|
3751
|
-
var
|
|
3712
|
+
var _this44 = this;
|
|
3752
3713
|
if (!props.saw_template_id) {
|
|
3753
3714
|
throw new Error('saw_template_id is required');
|
|
3754
3715
|
}
|
|
@@ -3758,22 +3719,22 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3758
3719
|
if (!props.int_user_id) {
|
|
3759
3720
|
throw new Error('int_user_id is required');
|
|
3760
3721
|
}
|
|
3761
|
-
return Promise.resolve(
|
|
3722
|
+
return Promise.resolve(_this44.api.gpGetRoundInfoForUser(props.saw_template_id, props.round_id, props.int_user_id));
|
|
3762
3723
|
} catch (e) {
|
|
3763
3724
|
return Promise.reject(e);
|
|
3764
3725
|
}
|
|
3765
3726
|
};
|
|
3766
3727
|
_proto.updateOnSpin = function updateOnSpin(data) {
|
|
3767
3728
|
try {
|
|
3768
|
-
var
|
|
3729
|
+
var _this45 = this;
|
|
3769
3730
|
return Promise.resolve(OCache.use(onUpdateContextKey.Saw, exports.ECacheContext.WSAPI, function () {
|
|
3770
|
-
return
|
|
3731
|
+
return _this45.api.sawGetTemplatesT(_this45.userExtId);
|
|
3771
3732
|
}, CACHE_DATA_SEC)).then(function (templates) {
|
|
3772
3733
|
var index = templates.findIndex(function (t) {
|
|
3773
3734
|
return t.id === data.saw_template_id;
|
|
3774
3735
|
});
|
|
3775
3736
|
templates[index].spin_count = data.spin_count;
|
|
3776
|
-
|
|
3737
|
+
_this45.updateEntity(onUpdateContextKey.Saw, templates);
|
|
3777
3738
|
});
|
|
3778
3739
|
} catch (e) {
|
|
3779
3740
|
return Promise.reject(e);
|
|
@@ -3781,9 +3742,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3781
3742
|
};
|
|
3782
3743
|
_proto.reloadMiniGameTemplate = function reloadMiniGameTemplate() {
|
|
3783
3744
|
try {
|
|
3784
|
-
var
|
|
3785
|
-
return Promise.resolve(
|
|
3786
|
-
|
|
3745
|
+
var _this46 = this;
|
|
3746
|
+
return Promise.resolve(_this46.api.sawGetTemplatesT(_this46.userExtId)).then(function (updatedTemplates) {
|
|
3747
|
+
_this46.updateEntity(onUpdateContextKey.Saw, updatedTemplates);
|
|
3787
3748
|
});
|
|
3788
3749
|
} catch (e) {
|
|
3789
3750
|
return Promise.reject(e);
|
|
@@ -3791,9 +3752,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3791
3752
|
};
|
|
3792
3753
|
_proto.updateMissions = function updateMissions() {
|
|
3793
3754
|
try {
|
|
3794
|
-
var
|
|
3795
|
-
return Promise.resolve(
|
|
3796
|
-
|
|
3755
|
+
var _this47 = this;
|
|
3756
|
+
return Promise.resolve(_this47.api.missionsGetItemsT(_this47.userExtId)).then(function (payload) {
|
|
3757
|
+
_this47.updateEntity(onUpdateContextKey.Missions, payload);
|
|
3797
3758
|
});
|
|
3798
3759
|
} catch (e) {
|
|
3799
3760
|
return Promise.reject(e);
|
|
@@ -3801,9 +3762,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3801
3762
|
};
|
|
3802
3763
|
_proto.updateBonuses = function updateBonuses() {
|
|
3803
3764
|
try {
|
|
3804
|
-
var
|
|
3805
|
-
return Promise.resolve(
|
|
3806
|
-
|
|
3765
|
+
var _this48 = this;
|
|
3766
|
+
return Promise.resolve(_this48.api.bonusesGetItemsT(_this48.userExtId)).then(function (payload) {
|
|
3767
|
+
_this48.updateEntity(onUpdateContextKey.Bonuses, payload);
|
|
3807
3768
|
});
|
|
3808
3769
|
} catch (e) {
|
|
3809
3770
|
return Promise.reject(e);
|
|
@@ -3811,9 +3772,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3811
3772
|
};
|
|
3812
3773
|
_proto.updateTournaments = function updateTournaments() {
|
|
3813
3774
|
try {
|
|
3814
|
-
var
|
|
3815
|
-
return Promise.resolve(
|
|
3816
|
-
|
|
3775
|
+
var _this49 = this;
|
|
3776
|
+
return Promise.resolve(_this49.api.tournamentsGetLobbyT(_this49.userExtId)).then(function (payload) {
|
|
3777
|
+
_this49.updateEntity(onUpdateContextKey.TournamentList, payload);
|
|
3817
3778
|
});
|
|
3818
3779
|
} catch (e) {
|
|
3819
3780
|
return Promise.reject(e);
|
|
@@ -3821,9 +3782,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3821
3782
|
};
|
|
3822
3783
|
_proto.updateStorePurchasedItems = function updateStorePurchasedItems() {
|
|
3823
3784
|
try {
|
|
3824
|
-
var
|
|
3825
|
-
return Promise.resolve(
|
|
3826
|
-
|
|
3785
|
+
var _this50 = this;
|
|
3786
|
+
return Promise.resolve(_this50.api.storeGetPurchasedItemsT(_this50.userExtId, 20, 0)).then(function (payload) {
|
|
3787
|
+
_this50.updateEntity(onUpdateContextKey.StoreHistory, payload);
|
|
3827
3788
|
});
|
|
3828
3789
|
} catch (e) {
|
|
3829
3790
|
return Promise.reject(e);
|
|
@@ -3831,9 +3792,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3831
3792
|
};
|
|
3832
3793
|
_proto.updateStoreItems = function updateStoreItems() {
|
|
3833
3794
|
try {
|
|
3834
|
-
var
|
|
3835
|
-
return Promise.resolve(
|
|
3836
|
-
|
|
3795
|
+
var _this51 = this;
|
|
3796
|
+
return Promise.resolve(_this51.api.storeGetItemsT(_this51.userExtId)).then(function (payload) {
|
|
3797
|
+
_this51.updateEntity(onUpdateContextKey.StoreItems, payload);
|
|
3837
3798
|
});
|
|
3838
3799
|
} catch (e) {
|
|
3839
3800
|
return Promise.reject(e);
|
|
@@ -3841,8 +3802,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3841
3802
|
};
|
|
3842
3803
|
_proto.updateInboxUnreadCount = function updateInboxUnreadCount(count) {
|
|
3843
3804
|
try {
|
|
3844
|
-
var
|
|
3845
|
-
|
|
3805
|
+
var _this52 = this;
|
|
3806
|
+
_this52.updateEntity(onUpdateContextKey.InboxUnreadCount, count);
|
|
3846
3807
|
return Promise.resolve();
|
|
3847
3808
|
} catch (e) {
|
|
3848
3809
|
return Promise.reject(e);
|
|
@@ -3850,9 +3811,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3850
3811
|
};
|
|
3851
3812
|
_proto.updateInboxMessages = function updateInboxMessages() {
|
|
3852
3813
|
try {
|
|
3853
|
-
var
|
|
3854
|
-
return Promise.resolve(
|
|
3855
|
-
|
|
3814
|
+
var _this53 = this;
|
|
3815
|
+
return Promise.resolve(_this53.api.getInboxMessagesT(_this53.userExtId)).then(function (payload) {
|
|
3816
|
+
_this53.updateEntity(onUpdateContextKey.InboxMessages, payload);
|
|
3856
3817
|
});
|
|
3857
3818
|
} catch (e) {
|
|
3858
3819
|
return Promise.reject(e);
|
|
@@ -3860,9 +3821,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3860
3821
|
};
|
|
3861
3822
|
_proto.updateRaffles = function updateRaffles() {
|
|
3862
3823
|
try {
|
|
3863
|
-
var
|
|
3864
|
-
return Promise.resolve(
|
|
3865
|
-
|
|
3824
|
+
var _this54 = this;
|
|
3825
|
+
return Promise.resolve(_this54.api.getRafflesT(_this54.userExtId)).then(function (payload) {
|
|
3826
|
+
_this54.updateEntity(onUpdateContextKey.Raffles, payload);
|
|
3866
3827
|
});
|
|
3867
3828
|
} catch (e) {
|
|
3868
3829
|
return Promise.reject(e);
|
|
@@ -3870,11 +3831,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3870
3831
|
};
|
|
3871
3832
|
_proto.notifyActivityLogUpdate = function notifyActivityLogUpdate() {
|
|
3872
3833
|
try {
|
|
3873
|
-
var
|
|
3834
|
+
var _this55 = this;
|
|
3874
3835
|
var startSeconds = Date.now() / 1000 - 600;
|
|
3875
3836
|
var endSeconds = Date.now() / 1000;
|
|
3876
|
-
return Promise.resolve(
|
|
3877
|
-
|
|
3837
|
+
return Promise.resolve(_this55.api.getActivityLogT(_this55.userExtId, startSeconds, endSeconds, 0, 50)).then(function (payload) {
|
|
3838
|
+
_this55.updateEntity(onUpdateContextKey.ActivityLog, payload);
|
|
3878
3839
|
});
|
|
3879
3840
|
} catch (e) {
|
|
3880
3841
|
return Promise.reject(e);
|
|
@@ -3882,9 +3843,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3882
3843
|
};
|
|
3883
3844
|
_proto.updateEntity = function updateEntity(contextKey, payload) {
|
|
3884
3845
|
try {
|
|
3885
|
-
var
|
|
3846
|
+
var _this56 = this;
|
|
3886
3847
|
OCache.set(contextKey, payload, exports.ECacheContext.WSAPI);
|
|
3887
|
-
var onUpdate =
|
|
3848
|
+
var onUpdate = _this56.onUpdateCallback.get(contextKey);
|
|
3888
3849
|
if (onUpdate) {
|
|
3889
3850
|
onUpdate(payload);
|
|
3890
3851
|
}
|
|
@@ -3925,17 +3886,17 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3925
3886
|
;
|
|
3926
3887
|
_proto.jackpotGet = function jackpotGet(filter) {
|
|
3927
3888
|
try {
|
|
3928
|
-
var
|
|
3889
|
+
var _this57 = this;
|
|
3929
3890
|
var signature = (filter == null ? void 0 : filter.jp_template_id) + ":" + (filter == null ? void 0 : filter.related_game_id);
|
|
3930
|
-
if (signature !==
|
|
3931
|
-
|
|
3932
|
-
|
|
3891
|
+
if (signature !== _this57.jackpotGetSignature) {
|
|
3892
|
+
_this57.jackpotGetSignature = signature;
|
|
3893
|
+
_this57.jackpotClearCache();
|
|
3933
3894
|
}
|
|
3934
3895
|
var jackpots = [];
|
|
3935
3896
|
var pots = [];
|
|
3936
3897
|
return Promise.resolve(OCache.use(onUpdateContextKey.Jackpots, exports.ECacheContext.WSAPI, function () {
|
|
3937
3898
|
try {
|
|
3938
|
-
return Promise.resolve(
|
|
3899
|
+
return Promise.resolve(_this57.api.jackpotGet(_this57.userExtId, filter)).then(function (_jackpots) {
|
|
3939
3900
|
var _pots = _jackpots.items.map(function (jp) {
|
|
3940
3901
|
return jp.pot;
|
|
3941
3902
|
});
|
|
@@ -3967,10 +3928,10 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3967
3928
|
var jp_template_ids = jackpots.map(function (jp) {
|
|
3968
3929
|
return jp.jp_template_id;
|
|
3969
3930
|
});
|
|
3970
|
-
return Promise.resolve(
|
|
3931
|
+
return Promise.resolve(_this57.api.potGet(_this57.userExtId, {
|
|
3971
3932
|
jp_template_ids: jp_template_ids
|
|
3972
|
-
})).then(function (
|
|
3973
|
-
return
|
|
3933
|
+
})).then(function (_this57$api$potGet) {
|
|
3934
|
+
return _this57$api$potGet.items;
|
|
3974
3935
|
});
|
|
3975
3936
|
} catch (e) {
|
|
3976
3937
|
return Promise.reject(e);
|
|
@@ -4003,11 +3964,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4003
3964
|
;
|
|
4004
3965
|
_proto.jackpotOptIn = function jackpotOptIn(filter) {
|
|
4005
3966
|
try {
|
|
4006
|
-
var
|
|
3967
|
+
var _this58 = this;
|
|
4007
3968
|
if (!filter.jp_template_id) {
|
|
4008
3969
|
throw new Error('jp_template_id is required in jackpotOptIn');
|
|
4009
3970
|
}
|
|
4010
|
-
return Promise.resolve(
|
|
3971
|
+
return Promise.resolve(_this58.api.jackpotOptIn(_this58.userExtId, filter));
|
|
4011
3972
|
} catch (e) {
|
|
4012
3973
|
return Promise.reject(e);
|
|
4013
3974
|
}
|
|
@@ -4029,11 +3990,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4029
3990
|
;
|
|
4030
3991
|
_proto.jackpotOptOut = function jackpotOptOut(filter) {
|
|
4031
3992
|
try {
|
|
4032
|
-
var
|
|
3993
|
+
var _this59 = this;
|
|
4033
3994
|
if (!filter.jp_template_id) {
|
|
4034
3995
|
throw new Error('jp_template_id is required in jackpotOptOut');
|
|
4035
3996
|
}
|
|
4036
|
-
return Promise.resolve(
|
|
3997
|
+
return Promise.resolve(_this59.api.jackpotOptOut(_this59.userExtId, filter));
|
|
4037
3998
|
} catch (e) {
|
|
4038
3999
|
return Promise.reject(e);
|
|
4039
4000
|
}
|
|
@@ -4059,9 +4020,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4059
4020
|
offset = _ref13.offset,
|
|
4060
4021
|
jp_template_id = _ref13.jp_template_id;
|
|
4061
4022
|
try {
|
|
4062
|
-
var
|
|
4023
|
+
var _this60 = this;
|
|
4063
4024
|
return Promise.resolve(OCache.use(onUpdateContextKey.JackpotWinners + jp_template_id, exports.ECacheContext.WSAPI, function () {
|
|
4064
|
-
return
|
|
4025
|
+
return _this60.api.getJackpotWinnersT(_this60.userExtId, limit, offset, jp_template_id);
|
|
4065
4026
|
}, JACKPOT_WINNERS_CACHE_SEC));
|
|
4066
4027
|
} catch (e) {
|
|
4067
4028
|
return Promise.reject(e);
|
|
@@ -4085,12 +4046,12 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4085
4046
|
var jp_template_id = _ref14.jp_template_id,
|
|
4086
4047
|
onUpdate = _ref14.onUpdate;
|
|
4087
4048
|
try {
|
|
4088
|
-
var
|
|
4049
|
+
var _this61 = this;
|
|
4089
4050
|
if (onUpdate) {
|
|
4090
|
-
|
|
4051
|
+
_this61.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
|
|
4091
4052
|
}
|
|
4092
4053
|
return Promise.resolve(OCache.use(onUpdateContextKey.JackpotEligibleGames + jp_template_id, exports.ECacheContext.WSAPI, function () {
|
|
4093
|
-
return
|
|
4054
|
+
return _this61.api.getJackpotEligibleGamesT(_this61.userExtId, {
|
|
4094
4055
|
jp_template_id: jp_template_id
|
|
4095
4056
|
});
|
|
4096
4057
|
}, JACKPOT_ELIGIBLE_GAMES_CACHE_SEC));
|
|
@@ -4119,8 +4080,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4119
4080
|
;
|
|
4120
4081
|
_proto.getRelatedItemsForGame = function getRelatedItemsForGame(related_game_id) {
|
|
4121
4082
|
try {
|
|
4122
|
-
var
|
|
4123
|
-
return Promise.resolve(
|
|
4083
|
+
var _this62 = this;
|
|
4084
|
+
return Promise.resolve(_this62.api.getRelatedItemsForGame(_this62.userExtId, related_game_id));
|
|
4124
4085
|
} catch (e) {
|
|
4125
4086
|
return Promise.reject(e);
|
|
4126
4087
|
}
|
|
@@ -4152,12 +4113,12 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4152
4113
|
var _ref15 = _temp11 === void 0 ? {} : _temp11,
|
|
4153
4114
|
onUpdate = _ref15.onUpdate;
|
|
4154
4115
|
try {
|
|
4155
|
-
var
|
|
4116
|
+
var _this63 = this;
|
|
4156
4117
|
if (onUpdate) {
|
|
4157
|
-
|
|
4118
|
+
_this63.onUpdateCallback.set(onUpdateContextKey.Raffles, onUpdate);
|
|
4158
4119
|
}
|
|
4159
4120
|
return Promise.resolve(OCache.use(onUpdateContextKey.Raffles, exports.ECacheContext.WSAPI, function () {
|
|
4160
|
-
return
|
|
4121
|
+
return _this63.api.getRafflesT(_this63.userExtId);
|
|
4161
4122
|
}, CACHE_DATA_SEC));
|
|
4162
4123
|
} catch (e) {
|
|
4163
4124
|
return Promise.reject(e);
|
|
@@ -4189,11 +4150,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4189
4150
|
;
|
|
4190
4151
|
_proto.getRaffleDrawRun = function getRaffleDrawRun(props) {
|
|
4191
4152
|
try {
|
|
4192
|
-
var
|
|
4153
|
+
var _this64 = this;
|
|
4193
4154
|
if (!props.raffle_id || !props.run_id) {
|
|
4194
4155
|
throw new Error('both raffle_id and run_id are required');
|
|
4195
4156
|
}
|
|
4196
|
-
return Promise.resolve(
|
|
4157
|
+
return Promise.resolve(_this64.api.getRaffleDrawRunT(_this64.userExtId, props.raffle_id, props.run_id, props.winners_from, props.winners_to));
|
|
4197
4158
|
} catch (e) {
|
|
4198
4159
|
return Promise.reject(e);
|
|
4199
4160
|
}
|
|
@@ -4222,8 +4183,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4222
4183
|
;
|
|
4223
4184
|
_proto.getRaffleDrawRunsHistory = function getRaffleDrawRunsHistory(props) {
|
|
4224
4185
|
try {
|
|
4225
|
-
var
|
|
4226
|
-
return Promise.resolve(
|
|
4186
|
+
var _this65 = this;
|
|
4187
|
+
return Promise.resolve(_this65.api.getRaffleDrawRunsHistory(_this65.userExtId, props)).then(function (res) {
|
|
4227
4188
|
if (!props.raffle_id) {
|
|
4228
4189
|
throw new Error('raffle_id is required');
|
|
4229
4190
|
}
|
|
@@ -4257,11 +4218,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4257
4218
|
;
|
|
4258
4219
|
_proto.claimRafflePrize = function claimRafflePrize(props) {
|
|
4259
4220
|
try {
|
|
4260
|
-
var
|
|
4221
|
+
var _this66 = this;
|
|
4261
4222
|
if (!props.won_id) {
|
|
4262
4223
|
throw new Error('won_id is required');
|
|
4263
4224
|
}
|
|
4264
|
-
return Promise.resolve(
|
|
4225
|
+
return Promise.resolve(_this66.api.claimRafflePrize(_this66.userExtId, {
|
|
4265
4226
|
won_id: props.won_id
|
|
4266
4227
|
})).then(raffleClaimPrizeResponseTransform);
|
|
4267
4228
|
} catch (e) {
|
|
@@ -4276,7 +4237,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4276
4237
|
;
|
|
4277
4238
|
_proto.requestRaffleOptin = function requestRaffleOptin(props) {
|
|
4278
4239
|
try {
|
|
4279
|
-
var
|
|
4240
|
+
var _this67 = this;
|
|
4280
4241
|
if (!props.raffle_id) {
|
|
4281
4242
|
throw new Error('raffle_id is required');
|
|
4282
4243
|
}
|
|
@@ -4286,7 +4247,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4286
4247
|
if (!props.raffle_run_id) {
|
|
4287
4248
|
throw new Error('raffle_run_id is required');
|
|
4288
4249
|
}
|
|
4289
|
-
return Promise.resolve(
|
|
4250
|
+
return Promise.resolve(_this67.api.raffleOptin(_this67.userExtId, props)).then(function (r) {
|
|
4290
4251
|
return {
|
|
4291
4252
|
err_code: r.errCode,
|
|
4292
4253
|
err_message: r.errMsg
|
|
@@ -6501,108 +6462,8 @@ exports.JackpotType = void 0;
|
|
|
6501
6462
|
JackpotType[JackpotType["Personal"] = 2] = "Personal";
|
|
6502
6463
|
})(exports.JackpotType || (exports.JackpotType = {}));
|
|
6503
6464
|
|
|
6504
|
-
exports.GamePickMarketType = void 0;
|
|
6505
|
-
(function (GamePickMarketType) {
|
|
6506
|
-
GamePickMarketType[GamePickMarketType["Goals"] = 1] = "Goals";
|
|
6507
|
-
GamePickMarketType[GamePickMarketType["Winner"] = 2] = "Winner";
|
|
6508
|
-
})(exports.GamePickMarketType || (exports.GamePickMarketType = {}));
|
|
6509
|
-
exports.GamePickResolutionType = void 0;
|
|
6510
|
-
(function (GamePickResolutionType) {
|
|
6511
|
-
GamePickResolutionType[GamePickResolutionType["None"] = 0] = "None";
|
|
6512
|
-
GamePickResolutionType[GamePickResolutionType["Lost"] = 2] = "Lost";
|
|
6513
|
-
GamePickResolutionType[GamePickResolutionType["PartialWin"] = 3] = "PartialWin";
|
|
6514
|
-
GamePickResolutionType[GamePickResolutionType["FullWin"] = 4] = "FullWin";
|
|
6515
|
-
})(exports.GamePickResolutionType || (exports.GamePickResolutionType = {}));
|
|
6516
|
-
exports.GPRoundStatus = void 0;
|
|
6517
|
-
(function (GPRoundStatus) {
|
|
6518
|
-
GPRoundStatus[GPRoundStatus["Other"] = -1] = "Other";
|
|
6519
|
-
GPRoundStatus[GPRoundStatus["NoEventsDefined"] = 1] = "NoEventsDefined";
|
|
6520
|
-
GPRoundStatus[GPRoundStatus["NoMoreBetsAllowed"] = 2] = "NoMoreBetsAllowed";
|
|
6521
|
-
GPRoundStatus[GPRoundStatus["AllEventsResolved_ButNotRound"] = 3] = "AllEventsResolved_ButNotRound";
|
|
6522
|
-
GPRoundStatus[GPRoundStatus["RoundResolved"] = 4] = "RoundResolved";
|
|
6523
|
-
})(exports.GPRoundStatus || (exports.GPRoundStatus = {}));
|
|
6524
|
-
exports.GamePickScoreType = void 0;
|
|
6525
|
-
(function (GamePickScoreType) {
|
|
6526
|
-
GamePickScoreType[GamePickScoreType["ExactScore"] = 1] = "ExactScore";
|
|
6527
|
-
GamePickScoreType[GamePickScoreType["PointsDifference"] = 2] = "PointsDifference";
|
|
6528
|
-
})(exports.GamePickScoreType || (exports.GamePickScoreType = {}));
|
|
6529
|
-
exports.GamePickSportType = void 0;
|
|
6530
|
-
(function (GamePickSportType) {
|
|
6531
|
-
GamePickSportType[GamePickSportType["Golf"] = 9] = "Golf";
|
|
6532
|
-
GamePickSportType[GamePickSportType["Cycling"] = 17] = "Cycling";
|
|
6533
|
-
GamePickSportType[GamePickSportType["Specials"] = 18] = "Specials";
|
|
6534
|
-
GamePickSportType[GamePickSportType["TouringCarRacing"] = 188] = "TouringCarRacing";
|
|
6535
|
-
GamePickSportType[GamePickSportType["StockCarRacing"] = 191] = "StockCarRacing";
|
|
6536
|
-
GamePickSportType[GamePickSportType["IndyRacing"] = 129] = "IndyRacing";
|
|
6537
|
-
GamePickSportType[GamePickSportType["Biathlon"] = 44] = "Biathlon";
|
|
6538
|
-
GamePickSportType[GamePickSportType["Speedway"] = 131] = "Speedway";
|
|
6539
|
-
GamePickSportType[GamePickSportType["Motorsport"] = 11] = "Motorsport";
|
|
6540
|
-
GamePickSportType[GamePickSportType["AlpineSkiing"] = 43] = "AlpineSkiing";
|
|
6541
|
-
GamePickSportType[GamePickSportType["SkiJumping"] = 48] = "SkiJumping";
|
|
6542
|
-
GamePickSportType[GamePickSportType["Lacrosse"] = 39] = "Lacrosse";
|
|
6543
|
-
GamePickSportType[GamePickSportType["CrossCountry"] = 46] = "CrossCountry";
|
|
6544
|
-
GamePickSportType[GamePickSportType["NordicCombined"] = 47] = "NordicCombined";
|
|
6545
|
-
GamePickSportType[GamePickSportType["Chess"] = 33] = "Chess";
|
|
6546
|
-
GamePickSportType[GamePickSportType["Athletics"] = 36] = "Athletics";
|
|
6547
|
-
GamePickSportType[GamePickSportType["ESportOverwatch"] = 121] = "ESportOverwatch";
|
|
6548
|
-
GamePickSportType[GamePickSportType["MMA"] = 117] = "MMA";
|
|
6549
|
-
GamePickSportType[GamePickSportType["Futsal"] = 29] = "Futsal";
|
|
6550
|
-
GamePickSportType[GamePickSportType["IceHockey"] = 4] = "IceHockey";
|
|
6551
|
-
GamePickSportType[GamePickSportType["Kabaddi"] = 138] = "Kabaddi";
|
|
6552
|
-
GamePickSportType[GamePickSportType["BeachVolley"] = 34] = "BeachVolley";
|
|
6553
|
-
GamePickSportType[GamePickSportType["Formula1"] = 40] = "Formula1";
|
|
6554
|
-
GamePickSportType[GamePickSportType["ESporteBasketball"] = 153] = "ESporteBasketball";
|
|
6555
|
-
GamePickSportType[GamePickSportType["MotorcycleRacing"] = 190] = "MotorcycleRacing";
|
|
6556
|
-
GamePickSportType[GamePickSportType["Bowls"] = 32] = "Bowls";
|
|
6557
|
-
GamePickSportType[GamePickSportType["Boxing"] = 10] = "Boxing";
|
|
6558
|
-
GamePickSportType[GamePickSportType["Floorball"] = 7] = "Floorball";
|
|
6559
|
-
GamePickSportType[GamePickSportType["GaelicHurling"] = 136] = "GaelicHurling";
|
|
6560
|
-
GamePickSportType[GamePickSportType["Bandy"] = 15] = "Bandy";
|
|
6561
|
-
GamePickSportType[GamePickSportType["Handball"] = 6] = "Handball";
|
|
6562
|
-
GamePickSportType[GamePickSportType["Waterpolo"] = 26] = "Waterpolo";
|
|
6563
|
-
GamePickSportType[GamePickSportType["Rugby"] = 12] = "Rugby";
|
|
6564
|
-
GamePickSportType[GamePickSportType["ESporteSoccer"] = 137] = "ESporteSoccer";
|
|
6565
|
-
GamePickSportType[GamePickSportType["FieldHockey"] = 24] = "FieldHockey";
|
|
6566
|
-
GamePickSportType[GamePickSportType["Pesapallo"] = 61] = "Pesapallo";
|
|
6567
|
-
GamePickSportType[GamePickSportType["Snooker"] = 19] = "Snooker";
|
|
6568
|
-
GamePickSportType[GamePickSportType["Badminton"] = 31] = "Badminton";
|
|
6569
|
-
GamePickSportType[GamePickSportType["Cricket"] = 21] = "Cricket";
|
|
6570
|
-
GamePickSportType[GamePickSportType["BeachSoccer"] = 60] = "BeachSoccer";
|
|
6571
|
-
GamePickSportType[GamePickSportType["Baseball"] = 3] = "Baseball";
|
|
6572
|
-
GamePickSportType[GamePickSportType["StarCraft"] = 112] = "StarCraft";
|
|
6573
|
-
GamePickSportType[GamePickSportType["ESportCounterStrike"] = 109] = "ESportCounterStrike";
|
|
6574
|
-
GamePickSportType[GamePickSportType["ESportArenaofValor"] = 158] = "ESportArenaofValor";
|
|
6575
|
-
GamePickSportType[GamePickSportType["Curling"] = 28] = "Curling";
|
|
6576
|
-
GamePickSportType[GamePickSportType["Squash"] = 37] = "Squash";
|
|
6577
|
-
GamePickSportType[GamePickSportType["Darts"] = 22] = "Darts";
|
|
6578
|
-
GamePickSportType[GamePickSportType["TableTennis"] = 20] = "TableTennis";
|
|
6579
|
-
GamePickSportType[GamePickSportType["Basketball3x3"] = 155] = "Basketball3x3";
|
|
6580
|
-
GamePickSportType[GamePickSportType["AussieRules"] = 13] = "AussieRules";
|
|
6581
|
-
GamePickSportType[GamePickSportType["GaelicFootball"] = 135] = "GaelicFootball";
|
|
6582
|
-
GamePickSportType[GamePickSportType["CallOfDuty"] = 118] = "CallOfDuty";
|
|
6583
|
-
GamePickSportType[GamePickSportType["Soccer"] = 1] = "Soccer";
|
|
6584
|
-
GamePickSportType[GamePickSportType["Tennis"] = 5] = "Tennis";
|
|
6585
|
-
GamePickSportType[GamePickSportType["ESportDota"] = 111] = "ESportDota";
|
|
6586
|
-
GamePickSportType[GamePickSportType["Basketball"] = 2] = "Basketball";
|
|
6587
|
-
GamePickSportType[GamePickSportType["ESportLeagueofLegends"] = 110] = "ESportLeagueofLegends";
|
|
6588
|
-
GamePickSportType[GamePickSportType["AmericanFootball"] = 16] = "AmericanFootball";
|
|
6589
|
-
GamePickSportType[GamePickSportType["Volleyball"] = 23] = "Volleyball";
|
|
6590
|
-
GamePickSportType[GamePickSportType["Netball"] = 35] = "Netball";
|
|
6591
|
-
GamePickSportType[GamePickSportType["ESportRocketLeague"] = 128] = "ESportRocketLeague";
|
|
6592
|
-
GamePickSportType[GamePickSportType["Schwingen"] = 56] = "Schwingen";
|
|
6593
|
-
})(exports.GamePickSportType || (exports.GamePickSportType = {}));
|
|
6594
|
-
exports.GameRoundOrderType = void 0;
|
|
6595
|
-
(function (GameRoundOrderType) {
|
|
6596
|
-
GameRoundOrderType[GameRoundOrderType["HowAdded"] = 1] = "HowAdded";
|
|
6597
|
-
GameRoundOrderType[GameRoundOrderType["HowAddedReversed"] = 2] = "HowAddedReversed";
|
|
6598
|
-
GameRoundOrderType[GameRoundOrderType["EventDateAscending"] = 3] = "EventDateAscending";
|
|
6599
|
-
GameRoundOrderType[GameRoundOrderType["EventDateDescending"] = 4] = "EventDateDescending";
|
|
6600
|
-
})(exports.GameRoundOrderType || (exports.GameRoundOrderType = {}));
|
|
6601
|
-
var AllRoundsGameBoardID = -1;
|
|
6602
|
-
|
|
6603
6465
|
exports.AchCategoryTransform = AchCategoryTransform;
|
|
6604
6466
|
exports.ActivityLogTransform = ActivityLogTransform;
|
|
6605
|
-
exports.AllRoundsGameBoardID = AllRoundsGameBoardID;
|
|
6606
6467
|
exports.BonusItemsTransform = BonusItemsTransform;
|
|
6607
6468
|
exports.CookieStore = CookieStore;
|
|
6608
6469
|
exports.CoreUtils = CoreUtils;
|