@smartico/public-api 0.0.402 → 0.0.404
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/.claude/skills/api-tsdoc/SKILL.md +675 -0
- package/.claude/skills/api-tsdoc-final/SKILL.md +266 -0
- package/.claude/skills/api-tsdoc-howto/SKILL.md +143 -0
- package/dist/MiniGames/SAWTemplate.d.ts +4 -0
- package/dist/NodeCache.d.ts +1 -0
- package/dist/OCache.d.ts +7 -0
- package/dist/SmarticoGlobal.d.ts +0 -6
- package/dist/WSAPI/WSAPITypes.d.ts +43 -0
- package/dist/WSAPI/WSAPIUser.d.ts +3 -0
- package/dist/index.js +92 -33
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +60 -10
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/interfaces/TUserProfile.md +136 -0
- package/docs/capabilities/_responses/buyStoreItem.json +4 -0
- package/docs/capabilities/_responses/claimBonus.json +4 -0
- package/docs/capabilities/_responses/gamePickGetActiveRound.json +95 -0
- package/docs/capabilities/_responses/gamePickGetActiveRounds.json +191 -0
- package/docs/capabilities/_responses/gamePickGetBoard.json +47 -0
- package/docs/capabilities/_responses/gamePickGetGameInfo.json +355 -0
- package/docs/capabilities/_responses/gamePickGetHistory.json +191 -0
- package/docs/capabilities/_responses/gamePickGetUserInfo.json +14 -0
- package/docs/capabilities/_responses/getAchCategories.json +12 -0
- package/docs/capabilities/_responses/getActivityLog.json +1 -0
- package/docs/capabilities/_responses/getAvatarPrompts.json +16 -0
- package/docs/capabilities/_responses/getAvatarsCustomized.json +12 -0
- package/docs/capabilities/_responses/getAvatarsList.json +24 -0
- package/docs/capabilities/_responses/getBadges.json +98 -0
- package/docs/capabilities/_responses/getBonuses.json +18 -0
- package/docs/capabilities/_responses/getClanInfo.json +39 -0
- package/docs/capabilities/_responses/getClans.json +35 -0
- package/docs/capabilities/_responses/getCurrentLevel.json +20 -0
- package/docs/capabilities/_responses/getCustomSections.json +25 -0
- package/docs/capabilities/_responses/getInboxMessageBody.json +7 -0
- package/docs/capabilities/_responses/getInboxMessages.json +18 -0
- package/docs/capabilities/_responses/getInboxUnreadCount.json +1 -0
- package/docs/capabilities/_responses/getJackpotEligibleGames.json +20 -0
- package/docs/capabilities/_responses/getJackpotWinners.json +28 -0
- package/docs/capabilities/_responses/getLeaderBoard.json +45 -0
- package/docs/capabilities/_responses/getLevels.json +40 -0
- package/docs/capabilities/_responses/getMiniGames.json +208 -0
- package/docs/capabilities/_responses/getMiniGamesHistory.json +1 -0
- package/docs/capabilities/_responses/getMissions.json +117 -0
- package/docs/capabilities/_responses/getRaffleDrawRun.json +62 -0
- package/docs/capabilities/_responses/getRaffleDrawRunsHistory.json +34 -0
- package/docs/capabilities/_responses/getRaffles.json +140 -0
- package/docs/capabilities/_responses/getStoreCategories.json +12 -0
- package/docs/capabilities/_responses/getStoreItems.json +47 -0
- package/docs/capabilities/_responses/getStorePurchasedItems.json +49 -0
- package/docs/capabilities/_responses/getTournamentInstanceInfo.json +75 -0
- package/docs/capabilities/_responses/getTournamentsList.json +66 -0
- package/docs/capabilities/_responses/getTranslations.json +25 -0
- package/docs/capabilities/_responses/getUserLevelExtraCounters.json +4 -0
- package/docs/capabilities/_responses/getUserProfile.json +34 -0
- package/docs/capabilities/_responses/jackpotGet.json +113 -0
- package/docs/capabilities/_responses/jackpotOptIn.json +9 -0
- package/docs/capabilities/_responses/jackpotOptOut.json +9 -0
- package/docs/capabilities/_responses/markAllInboxMessagesAsRead.json +4 -0
- package/docs/capabilities/_responses/markInboxMessageAsRead.json +4 -0
- package/docs/capabilities/_responses/markUnmarkInboxMessageAsFavorite.json +4 -0
- package/docs/capabilities/_responses/miniGameWinAcknowledgeRequest.json +10 -0
- package/docs/capabilities/_responses/playMiniGame.json +6 -0
- package/docs/capabilities/_responses/playMiniGameBatch.json +9 -0
- package/docs/capabilities/_responses/registerInTournament.json +4 -0
- package/docs/capabilities/_responses/requestMissionOptIn.json +4 -0
- package/docs/capabilities/_responses/setAvatar.json +4 -0
- package/docs/capabilities/avatarsCustomize.md +115 -0
- package/docs/capabilities/buyStoreItem.md +179 -0
- package/docs/capabilities/checkSegmentListMatch.md +69 -0
- package/docs/capabilities/checkSegmentMatch.md +74 -0
- package/docs/capabilities/claimBonus.md +125 -0
- package/docs/capabilities/claimRafflePrize.md +116 -0
- package/docs/capabilities/deleteAllInboxMessages.md +66 -0
- package/docs/capabilities/deleteInboxMessage.md +60 -0
- package/docs/capabilities/gamePickGetActiveRound.md +248 -0
- package/docs/capabilities/gamePickGetActiveRounds.md +259 -0
- package/docs/capabilities/gamePickGetBoard.md +202 -0
- package/docs/capabilities/gamePickGetGameInfo.md +318 -0
- package/docs/capabilities/gamePickGetHistory.md +244 -0
- package/docs/capabilities/gamePickGetRoundInfoForUser.md +189 -0
- package/docs/capabilities/gamePickGetUserInfo.md +91 -0
- package/docs/capabilities/gamePickSubmitSelection.md +222 -0
- package/docs/capabilities/gamePickSubmitSelectionQuiz.md +198 -0
- package/docs/capabilities/getAchCategories.md +119 -0
- package/docs/capabilities/getActivityLog.md +108 -0
- package/docs/capabilities/getAvatarPrompts.md +81 -0
- package/docs/capabilities/getAvatarsCustomized.md +96 -0
- package/docs/capabilities/getAvatarsList.md +101 -0
- package/docs/capabilities/getBadges.md +237 -0
- package/docs/capabilities/getBonuses.md +159 -0
- package/docs/capabilities/getClanInfo.md +164 -0
- package/docs/capabilities/getClanTournamentPlayers.md +112 -0
- package/docs/capabilities/getClans.md +168 -0
- package/docs/capabilities/getCurrentLevel.md +123 -0
- package/docs/capabilities/getCustomSections.md +96 -0
- package/docs/capabilities/getInboxMessageBody.md +87 -0
- package/docs/capabilities/getInboxMessages.md +146 -0
- package/docs/capabilities/getInboxUnreadCount.md +54 -0
- package/docs/capabilities/getJackpotEligibleGames.md +93 -0
- package/docs/capabilities/getJackpotWinners.md +113 -0
- package/docs/capabilities/getLeaderBoard.md +187 -0
- package/docs/capabilities/getLeaderBoards.md +88 -0
- package/docs/capabilities/getLevels.md +118 -0
- package/docs/capabilities/getMiniGames.md +295 -0
- package/docs/capabilities/getMiniGamesHistory.md +183 -0
- package/docs/capabilities/getMissions.md +253 -0
- package/docs/capabilities/getRaffleDrawRun.md +210 -0
- package/docs/capabilities/getRaffleDrawRunsHistory.md +116 -0
- package/docs/capabilities/getRaffleWonPrizes.md +153 -0
- package/docs/capabilities/getRaffles.md +249 -0
- package/docs/capabilities/getRelatedItemsForGame.md +236 -0
- package/docs/capabilities/getStoreCategories.md +128 -0
- package/docs/capabilities/getStoreItems.md +260 -0
- package/docs/capabilities/getStorePurchasedItems.md +280 -0
- package/docs/capabilities/getTournamentInstanceInfo.md +301 -0
- package/docs/capabilities/getTournamentsList.md +234 -0
- package/docs/capabilities/getTranslations.md +95 -0
- package/docs/capabilities/getUserLevelExtraCounters.md +92 -0
- package/docs/capabilities/getUserProfile.md +184 -0
- package/docs/capabilities/jackpotGet.md +173 -0
- package/docs/capabilities/jackpotOptIn.md +94 -0
- package/docs/capabilities/jackpotOptOut.md +92 -0
- package/docs/capabilities/joinClan.md +169 -0
- package/docs/capabilities/markAllInboxMessagesAsRead.md +72 -0
- package/docs/capabilities/markInboxMessageAsRead.md +69 -0
- package/docs/capabilities/markUnmarkInboxMessageAsFavorite.md +75 -0
- package/docs/capabilities/miniGameWinAcknowledgeRequest.md +98 -0
- package/docs/capabilities/playMiniGame.md +217 -0
- package/docs/capabilities/playMiniGameBatch.md +129 -0
- package/docs/capabilities/registerInTournament.md +187 -0
- package/docs/capabilities/reportClickEvent.md +74 -0
- package/docs/capabilities/reportImpressionEvent.md +67 -0
- package/docs/capabilities/requestMissionClaimReward.md +117 -0
- package/docs/capabilities/requestMissionOptIn.md +98 -0
- package/docs/capabilities/requestRaffleOptin.md +108 -0
- package/docs/capabilities/setAvatar.md +132 -0
- package/docs/capabilities/smarticoCallbacks.md +165 -0
- package/docs/capabilities/smarticoGlobal.md +62 -0
- package/package.json +3 -2
- package/readme-smartico-dev.md +208 -0
- package/scripts/capture-responses-browser.mjs +301 -0
- package/scripts/gen-capabilities.js +368 -0
- package/scripts/run-public-api.mjs +105 -0
- package/src/MiniGames/SAWGetTemplatesResponse.ts +2 -0
- package/src/MiniGames/SAWTemplate.ts +5 -0
- package/src/NodeCache.ts +8 -0
- package/src/OCache.ts +17 -0
- package/src/SmarticoGlobal.ts +0 -7
- package/src/WSAPI/WSAPI.ts +3 -3
- package/src/WSAPI/WSAPIJackpots.ts +4 -1
- package/src/WSAPI/WSAPIMiniGames.ts +1 -1
- package/src/WSAPI/WSAPITypes.ts +44 -0
- package/src/WSAPI/WSAPIUser.ts +30 -5
package/dist/index.js
CHANGED
|
@@ -510,6 +510,8 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
|
|
|
510
510
|
activeFromDate: r.activeFromDate,
|
|
511
511
|
activeTillDate: r.activeTillDate,
|
|
512
512
|
next_available_spin_ts: r.next_available_spin_ts,
|
|
513
|
+
earliest_expiration_dt: r.earliest_expiration_dt,
|
|
514
|
+
latest_expiration_dt: r.latest_expiration_dt,
|
|
513
515
|
steps_to_finish_game: r.saw_template_ui_definition.steps_to_finish_game,
|
|
514
516
|
custom_section_id: r.saw_template_ui_definition.custom_section_id,
|
|
515
517
|
saw_template_ui_definition: r.saw_template_ui_definition
|
|
@@ -706,6 +708,13 @@ var NodeCache = /*#__PURE__*/function () {
|
|
|
706
708
|
delete this.cache[key];
|
|
707
709
|
}
|
|
708
710
|
};
|
|
711
|
+
_proto.removeByPrefix = function removeByPrefix(prefix) {
|
|
712
|
+
for (var key in this.cache) {
|
|
713
|
+
if (this.cache.hasOwnProperty(key) && key.indexOf(prefix) === 0) {
|
|
714
|
+
delete this.cache[key];
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
};
|
|
709
718
|
_proto.flushAll = function flushAll() {
|
|
710
719
|
this.cache = {};
|
|
711
720
|
if (this.ttlChecker) {
|
|
@@ -778,27 +787,49 @@ var OCache = /*#__PURE__*/function () {
|
|
|
778
787
|
} catch (e) {
|
|
779
788
|
return Promise.reject(e);
|
|
780
789
|
}
|
|
781
|
-
}
|
|
782
|
-
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Remove every entry whose string key starts with `oKeyBase` — the bare key
|
|
793
|
+
* AND all per-parameter composite variants (`${oKeyBase}:…` / `${oKeyBase}<id>`).
|
|
794
|
+
* Use when a cache is keyed per parameter (paginated, per-template, per-window):
|
|
795
|
+
* an exact-key `clear(oKeyBase)` would miss every variant. `oKeyBase` must be a string.
|
|
796
|
+
*/
|
|
797
|
+
;
|
|
798
|
+
OCache.clearByPrefix = function clearByPrefix(cacheContext, oKeyBase) {
|
|
783
799
|
try {
|
|
784
800
|
var _this2 = this;
|
|
801
|
+
// `set`/`get` build keys as `<context>_<JSON.stringify(oKey)>`; JSON.stringify
|
|
802
|
+
// wraps a string in quotes, so dropping the trailing quote yields a prefix that
|
|
803
|
+
// matches both the bare `"base"` key and every `"base…"` composite key.
|
|
804
|
+
var prefix = cacheContext.toString() + '_' + JSON.stringify(oKeyBase).slice(0, -1);
|
|
785
805
|
if (_this2.cache[cacheContext]) {
|
|
786
|
-
_this2.cache[cacheContext].
|
|
806
|
+
_this2.cache[cacheContext].removeByPrefix(prefix);
|
|
787
807
|
}
|
|
788
808
|
return Promise.resolve();
|
|
789
809
|
} catch (e) {
|
|
790
810
|
return Promise.reject(e);
|
|
791
811
|
}
|
|
792
812
|
};
|
|
793
|
-
OCache.
|
|
813
|
+
OCache.clearContext = function clearContext(cacheContext) {
|
|
794
814
|
try {
|
|
795
815
|
var _this3 = this;
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
816
|
+
if (_this3.cache[cacheContext]) {
|
|
817
|
+
_this3.cache[cacheContext].flushAll();
|
|
818
|
+
}
|
|
819
|
+
return Promise.resolve();
|
|
820
|
+
} catch (e) {
|
|
821
|
+
return Promise.reject(e);
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
OCache.clearAll = function clearAll() {
|
|
825
|
+
try {
|
|
826
|
+
var _this4 = this;
|
|
827
|
+
for (var cacheContext in _this4.cache) {
|
|
828
|
+
if (_this4.cache.hasOwnProperty(cacheContext)) {
|
|
829
|
+
_this4.cache[cacheContext].flushAll();
|
|
799
830
|
}
|
|
800
831
|
}
|
|
801
|
-
|
|
832
|
+
_this4.cache = {};
|
|
802
833
|
return Promise.resolve();
|
|
803
834
|
} catch (e) {
|
|
804
835
|
return Promise.reject(e);
|
|
@@ -2461,7 +2492,15 @@ var raffleClaimPrizeResponseTransform = function raffleClaimPrizeResponseTransfo
|
|
|
2461
2492
|
/** @group User */
|
|
2462
2493
|
var WSAPIUser = /*#__PURE__*/function (_WSAPIBase) {
|
|
2463
2494
|
function WSAPIUser() {
|
|
2464
|
-
|
|
2495
|
+
var _this;
|
|
2496
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2497
|
+
args[_key] = arguments[_key];
|
|
2498
|
+
}
|
|
2499
|
+
_this = _WSAPIBase.call.apply(_WSAPIBase, [this].concat(args)) || this;
|
|
2500
|
+
/** @hidden Last window passed to `getActivityLog` with an `onUpdate`, so a push
|
|
2501
|
+
* refresh re-fetches the same window and updates its matching composite cache key. */
|
|
2502
|
+
_this.activityLogOnUpdateParams = void 0;
|
|
2503
|
+
return _this;
|
|
2465
2504
|
}
|
|
2466
2505
|
_inheritsLoose(WSAPIUser, _WSAPIBase);
|
|
2467
2506
|
var _proto = WSAPIUser.prototype;
|
|
@@ -2658,8 +2697,8 @@ var WSAPIUser = /*#__PURE__*/function (_WSAPIBase) {
|
|
|
2658
2697
|
*/;
|
|
2659
2698
|
_proto.checkSegmentMatch = function checkSegmentMatch(segment_id) {
|
|
2660
2699
|
try {
|
|
2661
|
-
var
|
|
2662
|
-
return Promise.resolve(
|
|
2700
|
+
var _this2 = this;
|
|
2701
|
+
return Promise.resolve(_this2.api.coreCheckSegments(_this2.userExtId, [segment_id])).then(function (r) {
|
|
2663
2702
|
if (r && r.find(function (s) {
|
|
2664
2703
|
return s.segment_id === segment_id && s.is_matching;
|
|
2665
2704
|
})) {
|
|
@@ -2737,8 +2776,8 @@ var WSAPIUser = /*#__PURE__*/function (_WSAPIBase) {
|
|
|
2737
2776
|
;
|
|
2738
2777
|
_proto.checkSegmentListMatch = function checkSegmentListMatch(segment_ids) {
|
|
2739
2778
|
try {
|
|
2740
|
-
var
|
|
2741
|
-
return Promise.resolve(
|
|
2779
|
+
var _this3 = this;
|
|
2780
|
+
return Promise.resolve(_this3.api.coreCheckSegments(_this3.userExtId, Array.isArray(segment_ids) ? segment_ids : [segment_ids]));
|
|
2742
2781
|
} catch (e) {
|
|
2743
2782
|
return Promise.reject(e);
|
|
2744
2783
|
}
|
|
@@ -2815,9 +2854,9 @@ var WSAPIUser = /*#__PURE__*/function (_WSAPIBase) {
|
|
|
2815
2854
|
;
|
|
2816
2855
|
_proto.getLevels = function getLevels() {
|
|
2817
2856
|
try {
|
|
2818
|
-
var
|
|
2857
|
+
var _this4 = this;
|
|
2819
2858
|
return Promise.resolve(OCache.use(onUpdateContextKey.Levels, exports.ECacheContext.WSAPI, function () {
|
|
2820
|
-
return
|
|
2859
|
+
return _this4.api.levelsGetT(_this4.userExtId);
|
|
2821
2860
|
}, CACHE_DATA_SEC));
|
|
2822
2861
|
} catch (e) {
|
|
2823
2862
|
return Promise.reject(e);
|
|
@@ -2897,9 +2936,9 @@ var WSAPIUser = /*#__PURE__*/function (_WSAPIBase) {
|
|
|
2897
2936
|
;
|
|
2898
2937
|
_proto.getCurrentLevel = function getCurrentLevel() {
|
|
2899
2938
|
try {
|
|
2900
|
-
var
|
|
2939
|
+
var _this5 = this;
|
|
2901
2940
|
return Promise.resolve(OCache.use(onUpdateContextKey.CurrentLevel, exports.ECacheContext.WSAPI, function () {
|
|
2902
|
-
return
|
|
2941
|
+
return _this5.api.getLevelCurrent(_this5.userExtId);
|
|
2903
2942
|
}, CACHE_DATA_SEC));
|
|
2904
2943
|
} catch (e) {
|
|
2905
2944
|
return Promise.reject(e);
|
|
@@ -2980,9 +3019,9 @@ var WSAPIUser = /*#__PURE__*/function (_WSAPIBase) {
|
|
|
2980
3019
|
;
|
|
2981
3020
|
_proto.getUserLevelExtraCounters = function getUserLevelExtraCounters() {
|
|
2982
3021
|
try {
|
|
2983
|
-
var
|
|
3022
|
+
var _this6 = this;
|
|
2984
3023
|
return Promise.resolve(OCache.use(onUpdateContextKey.LevelExtraCounters, exports.ECacheContext.WSAPI, function () {
|
|
2985
|
-
return
|
|
3024
|
+
return _this6.api.getUserGamificationInfoT(_this6.userExtId);
|
|
2986
3025
|
}, CACHE_DATA_SEC));
|
|
2987
3026
|
} catch (e) {
|
|
2988
3027
|
return Promise.reject(e);
|
|
@@ -3060,12 +3099,21 @@ var WSAPIUser = /*#__PURE__*/function (_WSAPIBase) {
|
|
|
3060
3099
|
to = _ref.to,
|
|
3061
3100
|
onUpdate = _ref.onUpdate;
|
|
3062
3101
|
try {
|
|
3063
|
-
var
|
|
3102
|
+
var _this7 = this;
|
|
3103
|
+
var cacheKey = onUpdateContextKey.ActivityLog + ":" + startTimeSeconds + ":" + endTimeSeconds + ":" + from + ":" + to;
|
|
3064
3104
|
if (typeof onUpdate === 'function') {
|
|
3065
|
-
|
|
3105
|
+
_this7.onUpdateCallback.set(onUpdateContextKey.ActivityLog, onUpdate);
|
|
3106
|
+
// Remember the requested window so a push refresh re-fetches THIS window
|
|
3107
|
+
// and writes the matching composite cache key (see notifyActivityLogUpdate).
|
|
3108
|
+
_this7.activityLogOnUpdateParams = {
|
|
3109
|
+
startTimeSeconds: startTimeSeconds,
|
|
3110
|
+
endTimeSeconds: endTimeSeconds,
|
|
3111
|
+
from: from,
|
|
3112
|
+
to: to
|
|
3113
|
+
};
|
|
3066
3114
|
}
|
|
3067
|
-
return Promise.resolve(OCache.use(
|
|
3068
|
-
return
|
|
3115
|
+
return Promise.resolve(OCache.use(cacheKey, exports.ECacheContext.WSAPI, function () {
|
|
3116
|
+
return _this7.api.getActivityLogT(_this7.userExtId, startTimeSeconds, endTimeSeconds, from, to);
|
|
3069
3117
|
}, CACHE_DATA_SEC));
|
|
3070
3118
|
} catch (e) {
|
|
3071
3119
|
return Promise.reject(e);
|
|
@@ -3073,11 +3121,19 @@ var WSAPIUser = /*#__PURE__*/function (_WSAPIBase) {
|
|
|
3073
3121
|
};
|
|
3074
3122
|
_proto.notifyActivityLogUpdate = function notifyActivityLogUpdate() {
|
|
3075
3123
|
try {
|
|
3076
|
-
var
|
|
3077
|
-
var
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3124
|
+
var _this8 = this;
|
|
3125
|
+
var params = _this8.activityLogOnUpdateParams;
|
|
3126
|
+
// No consumer has subscribed to a specific window yet — nothing to refresh.
|
|
3127
|
+
if (!params) {
|
|
3128
|
+
return Promise.resolve();
|
|
3129
|
+
}
|
|
3130
|
+
return Promise.resolve(_this8.api.getActivityLogT(_this8.userExtId, params.startTimeSeconds, params.endTimeSeconds, params.from, params.to)).then(function (payload) {
|
|
3131
|
+
var cacheKey = onUpdateContextKey.ActivityLog + ":" + params.startTimeSeconds + ":" + params.endTimeSeconds + ":" + params.from + ":" + params.to;
|
|
3132
|
+
OCache.set(cacheKey, payload, exports.ECacheContext.WSAPI);
|
|
3133
|
+
var onUpdate = _this8.onUpdateCallback.get(onUpdateContextKey.ActivityLog);
|
|
3134
|
+
if (typeof onUpdate === 'function') {
|
|
3135
|
+
onUpdate(payload);
|
|
3136
|
+
}
|
|
3081
3137
|
});
|
|
3082
3138
|
} catch (e) {
|
|
3083
3139
|
return Promise.reject(e);
|
|
@@ -5928,7 +5984,10 @@ var WSAPIJackpots = /*#__PURE__*/function (_WSAPIClans) {
|
|
|
5928
5984
|
try {
|
|
5929
5985
|
OCache.clear(exports.ECacheContext.WSAPI, onUpdateContextKey.Jackpots);
|
|
5930
5986
|
OCache.clear(exports.ECacheContext.WSAPI, onUpdateContextKey.Pots);
|
|
5931
|
-
|
|
5987
|
+
// Winners + eligible-games are cached per jp_template_id (composite keys),
|
|
5988
|
+
// so a bare clear misses every variant — clear by prefix.
|
|
5989
|
+
OCache.clearByPrefix(exports.ECacheContext.WSAPI, onUpdateContextKey.JackpotWinners);
|
|
5990
|
+
OCache.clearByPrefix(exports.ECacheContext.WSAPI, onUpdateContextKey.JackpotEligibleGames);
|
|
5932
5991
|
return Promise.resolve();
|
|
5933
5992
|
} catch (e) {
|
|
5934
5993
|
return Promise.reject(e);
|
|
@@ -7289,7 +7348,7 @@ var WSAPIMiniGames = /*#__PURE__*/function (_WSAPIRaffles) {
|
|
|
7289
7348
|
saw_template_id = _ref2.saw_template_id;
|
|
7290
7349
|
try {
|
|
7291
7350
|
var _this2 = this;
|
|
7292
|
-
return Promise.resolve(OCache.use(onUpdateContextKey.SAWHistory, exports.ECacheContext.WSAPI, function () {
|
|
7351
|
+
return Promise.resolve(OCache.use(onUpdateContextKey.SAWHistory + ":" + (saw_template_id != null ? saw_template_id : '') + ":" + (limit != null ? limit : '') + ":" + (offset != null ? offset : ''), exports.ECacheContext.WSAPI, function () {
|
|
7293
7352
|
return _this2.api.getSawWinningHistoryT(_this2.userExtId, limit, offset, saw_template_id);
|
|
7294
7353
|
}, CACHE_DATA_SEC));
|
|
7295
7354
|
} catch (e) {
|
|
@@ -9940,11 +9999,11 @@ var WSAPI = /*#__PURE__*/function (_WSAPIInbox) {
|
|
|
9940
9999
|
});
|
|
9941
10000
|
on(exports.ClassId.SAW_AKNOWLEDGE_RESPONSE, function () {
|
|
9942
10001
|
_this.reloadMiniGameTemplate();
|
|
9943
|
-
OCache.
|
|
10002
|
+
OCache.clearByPrefix(exports.ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);
|
|
9944
10003
|
});
|
|
9945
10004
|
on(exports.ClassId.SAW_DO_SPIN_RESPONSE, function () {
|
|
9946
10005
|
_this.reloadMiniGameTemplate();
|
|
9947
|
-
OCache.
|
|
10006
|
+
OCache.clearByPrefix(exports.ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);
|
|
9948
10007
|
});
|
|
9949
10008
|
on(exports.ClassId.MISSION_OPTIN_RESPONSE, function () {
|
|
9950
10009
|
return _this.updateMissions();
|
|
@@ -9985,7 +10044,7 @@ var WSAPI = /*#__PURE__*/function (_WSAPIInbox) {
|
|
|
9985
10044
|
});
|
|
9986
10045
|
on(exports.ClassId.SAW_DO_SPIN_BATCH_RESPONSE, function () {
|
|
9987
10046
|
_this.reloadMiniGameTemplate();
|
|
9988
|
-
OCache.
|
|
10047
|
+
OCache.clearByPrefix(exports.ECacheContext.WSAPI, onUpdateContextKey.SAWHistory);
|
|
9989
10048
|
});
|
|
9990
10049
|
on(exports.ClassId.RAF_CLAIM_PRIZE_RESPONSE, function () {
|
|
9991
10050
|
return _this.updateRaffles();
|