@smartico/public-api 0.0.154 → 0.0.155
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/.prettierrc +12 -0
- package/dist/Base/ProtocolRequest.d.ts +1 -1
- package/dist/Base/ProtocolResponse.d.ts +1 -1
- package/dist/Core/CheckSegmentMatchRequest.d.ts +1 -1
- package/dist/Core/CheckSegmentMatchResponse.d.ts +1 -1
- package/dist/Core/GetAchievementsUserInfoRequest.d.ts +1 -1
- package/dist/Core/GetAchievementsUserInfoResponse.d.ts +1 -1
- package/dist/Core/GetLabelInfoRequest.d.ts +1 -1
- package/dist/Core/GetLabelInfoResponse.d.ts +1 -1
- package/dist/Core/GetTranslationsRequest.d.ts +2 -2
- package/dist/Core/GetTranslationsResponse.d.ts +1 -1
- package/dist/Core/ResponseIdentify.d.ts +2 -2
- package/dist/CustomSections/GetCustomSectionsRequest.d.ts +1 -1
- package/dist/CustomSections/GetCustomSectionsResponse.d.ts +2 -2
- package/dist/CustomSections/UICustomSection.d.ts +2 -2
- package/dist/GResponse.d.ts +1 -1
- package/dist/Inbox/GetInboxMessagesRequest.d.ts +1 -1
- package/dist/Inbox/GetInboxMessagesResponse.d.ts +3 -3
- package/dist/Inbox/InboxMessage.d.ts +2 -2
- package/dist/Inbox/MarkInboxMessageDeletedRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageDeletedResponse.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageReadRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageReadResponse.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageStarredRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageStarredResponse.d.ts +1 -1
- package/dist/Inbox/index.d.ts +8 -8
- package/dist/Jackpots/GetJackpotsPotsRequest.d.ts +1 -1
- package/dist/Jackpots/GetJackpotsPotsResponse.d.ts +2 -2
- package/dist/Jackpots/GetJackpotsRequest.d.ts +1 -1
- package/dist/Jackpots/GetJackpotsResponse.d.ts +2 -2
- package/dist/Jackpots/JackpotDetails.d.ts +6 -6
- package/dist/Jackpots/JackpotWinPush.d.ts +3 -3
- package/dist/Jackpots/JackpotsOptinRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptinResponse.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptoutRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptoutResponse.d.ts +1 -1
- package/dist/Leaderboard/GetLeaderBoardsRequest.d.ts +2 -2
- package/dist/Leaderboard/GetLeaderBoardsResponse.d.ts +2 -2
- package/dist/Leaderboard/LeaderBoardDetails.d.ts +3 -3
- package/dist/Leaderboard/LeaderBoards.d.ts +2 -2
- package/dist/Leaderboard/index.d.ts +6 -6
- package/dist/Level/GetLevelMapResponse.d.ts +3 -3
- package/dist/Level/Level.d.ts +1 -1
- package/dist/MiniGames/SAWAcknowledgeSpinPushRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoAknowledgeRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoAknowledgeResponse.d.ts +1 -1
- package/dist/MiniGames/SAWDoSpinRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoSpinResponse.d.ts +2 -2
- package/dist/MiniGames/SAWEventSawPush.d.ts +1 -1
- package/dist/MiniGames/SAWGetTemplatesRequest.d.ts +1 -1
- package/dist/MiniGames/SAWGetTemplatesResponse.d.ts +3 -3
- package/dist/MiniGames/SAWPrize.d.ts +2 -2
- package/dist/MiniGames/SAWPrizeDropAknowledgeRequest.d.ts +3 -1
- package/dist/MiniGames/SAWPrizeDropAknowledgeResponse.d.ts +1 -1
- package/dist/MiniGames/SAWPrizeDropWinPush.d.ts +4 -3
- package/dist/MiniGames/SAWPrizeUI.d.ts +2 -2
- package/dist/MiniGames/SAWSpinsCountPush.d.ts +1 -1
- package/dist/MiniGames/SAWTemplate.d.ts +4 -4
- package/dist/MiniGames/SAWTemplateUI.d.ts +1 -1
- package/dist/MiniGames/SAWUtils.d.ts +1 -1
- package/dist/MiniGames/index.d.ts +24 -22
- package/dist/Missions/AchClaimPrizeRequest.d.ts +1 -1
- package/dist/Missions/AchClaimPrizeResponse.d.ts +1 -1
- package/dist/Missions/AchievementCategory.d.ts +2 -2
- package/dist/Missions/AchievementOptinRequest.d.ts +1 -1
- package/dist/Missions/AchievementOptinResponse.d.ts +1 -1
- package/dist/Missions/GetAchCategoriesRequest.d.ts +1 -1
- package/dist/Missions/GetAchCategoriesResponse.d.ts +2 -2
- package/dist/Missions/GetAchievementMapRequest.d.ts +1 -1
- package/dist/Missions/GetAchievementMapResponse.d.ts +2 -2
- package/dist/Missions/GetRelatedAchTourRequest.d.ts +1 -1
- package/dist/Missions/GetRelatedAchTourResponse.d.ts +3 -3
- package/dist/Missions/ReloadAchievementsEvent.d.ts +2 -2
- package/dist/Missions/UserAchievement.d.ts +7 -7
- package/dist/Missions/UserAchievementTask.d.ts +2 -2
- package/dist/Missions/index.d.ts +13 -13
- package/dist/Quiz/MarketsInfo.d.ts +2 -2
- package/dist/Quiz/MarketsPerSport.d.ts +1 -1
- package/dist/SmarticoAPI.d.ts +8 -8
- package/dist/SmarticoLib/index.d.ts +39 -39
- package/dist/Store/BuyStoreItemRequest.d.ts +1 -1
- package/dist/Store/BuyStoreItemResponse.d.ts +1 -1
- package/dist/Store/GetCategoriesStoreResponse.d.ts +2 -2
- package/dist/Store/GetStoreHistoryRequest.d.ts +1 -1
- package/dist/Store/GetStoreHistoryResponse.d.ts +2 -2
- package/dist/Store/GetStoreItemsResponse.d.ts +2 -2
- package/dist/Store/StoreCategory.d.ts +2 -2
- package/dist/Store/StoreItem.d.ts +3 -3
- package/dist/Store/StoreItemPurchased.d.ts +2 -2
- package/dist/Store/index.d.ts +10 -10
- package/dist/Tournaments/GetTournamentInfoRequest.d.ts +1 -1
- package/dist/Tournaments/GetTournamentInfoResponse.d.ts +5 -5
- package/dist/Tournaments/GetTournamentsRequest.d.ts +1 -1
- package/dist/Tournaments/GetTournamentsResponse.d.ts +2 -2
- package/dist/Tournaments/Tournament.d.ts +8 -8
- package/dist/Tournaments/TournamentPrize.d.ts +1 -1
- package/dist/Tournaments/TournamentRegisterRequest.d.ts +1 -1
- package/dist/Tournaments/TournamentRegisterResponse.d.ts +2 -2
- package/dist/Tournaments/TournamentUtils.d.ts +3 -3
- package/dist/Tournaments/index.d.ts +16 -16
- package/dist/WSAPI/WSAPI.d.ts +65 -65
- package/dist/WSAPI/WSAPITypes.d.ts +18 -18
- package/dist/index.js +76 -78
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +103 -103
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Base/AchRelatedGame.ts +13 -13
- package/src/Base/ClassId.ts +118 -121
- package/src/Base/ProtocolMessage.ts +6 -7
- package/src/Base/ProtocolRequest.ts +4 -5
- package/src/Base/ProtocolResponse.ts +3 -5
- package/src/CookieStore.ts +10 -11
- package/src/Core/ActivityTypeLimited.ts +17 -18
- package/src/Core/CheckSegmentMatchRequest.ts +2 -3
- package/src/Core/CheckSegmentMatchResponse.ts +6 -6
- package/src/Core/CoreUtils.ts +37 -39
- package/src/Core/GetAchievementsUserInfoRequest.ts +2 -4
- package/src/Core/GetAchievementsUserInfoResponse.ts +4 -4
- package/src/Core/GetLabelInfoRequest.ts +2 -4
- package/src/Core/GetLabelInfoResponse.ts +4 -4
- package/src/Core/GetTranslationsRequest.ts +5 -7
- package/src/Core/GetTranslationsResponse.ts +3 -5
- package/src/Core/PublicLabelSettings.ts +29 -30
- package/src/Core/PublicProperties.ts +7 -7
- package/src/Core/ResponseIdentify.ts +12 -12
- package/src/Core/TranslationArea.ts +8 -9
- package/src/Core/index.ts +1 -1
- package/src/CustomSections/AchCustomSection.ts +20 -20
- package/src/CustomSections/GetCustomSectionsRequest.ts +2 -4
- package/src/CustomSections/GetCustomSectionsResponse.ts +4 -5
- package/src/CustomSections/UICustomSection.ts +30 -29
- package/src/CustomSections/index.ts +4 -4
- package/src/ErrorCodes.ts +11 -12
- package/src/GResponse.ts +5 -5
- package/src/ILogger.ts +6 -10
- package/src/Inbox/GetInboxMessagesRequest.ts +4 -5
- package/src/Inbox/GetInboxMessagesResponse.ts +15 -17
- package/src/Inbox/InboxMessage.ts +31 -33
- package/src/Inbox/InboxMessageType.ts +9 -9
- package/src/Inbox/MarkInboxMessageDeletedRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageDeletedResponse.ts +3 -3
- package/src/Inbox/MarkInboxMessageReadRequest.ts +4 -5
- package/src/Inbox/MarkInboxMessageReadResponse.ts +4 -5
- package/src/Inbox/MarkInboxMessageStarredRequest.ts +4 -5
- package/src/Inbox/MarkInboxMessageStarredResponse.ts +4 -5
- package/src/Inbox/index.ts +10 -10
- package/src/IntUtils.ts +72 -85
- package/src/Jackpots/GetJackpotsPotsRequest.ts +3 -3
- package/src/Jackpots/GetJackpotsPotsResponse.ts +3 -5
- package/src/Jackpots/GetJackpotsRequest.ts +4 -6
- package/src/Jackpots/GetJackpotsResponse.ts +5 -7
- package/src/Jackpots/JackPotWinner.ts +11 -12
- package/src/Jackpots/JackpotContributionType.ts +3 -4
- package/src/Jackpots/JackpotDetails.ts +31 -31
- package/src/Jackpots/JackpotHtmlTemplate.ts +3 -3
- package/src/Jackpots/JackpotPot.ts +11 -12
- package/src/Jackpots/JackpotPublicMeta.ts +16 -16
- package/src/Jackpots/JackpotType.ts +2 -5
- package/src/Jackpots/JackpotWinPush.ts +6 -6
- package/src/Jackpots/JackpotsOptinRequest.ts +3 -5
- package/src/Jackpots/JackpotsOptinResponse.ts +2 -4
- package/src/Jackpots/JackpotsOptoutRequest.ts +3 -5
- package/src/Jackpots/JackpotsOptoutResponse.ts +2 -4
- package/src/Jackpots/index.ts +16 -16
- package/src/Leaderboard/GetLeaderBoardsRequest.ts +8 -9
- package/src/Leaderboard/GetLeaderBoardsResponse.ts +4 -6
- package/src/Leaderboard/LeaderBoardDetails.ts +11 -12
- package/src/Leaderboard/LeaderBoardPeriodType.ts +3 -3
- package/src/Leaderboard/LeaderBoardPosition.ts +9 -10
- package/src/Leaderboard/LeaderBoardPublicMeta.ts +3 -4
- package/src/Leaderboard/LeaderBoards.ts +42 -42
- package/src/Leaderboard/index.ts +6 -6
- package/src/Level/GetLevelMapResponse.ts +18 -21
- package/src/Level/Level.ts +10 -11
- package/src/Level/LevelPublicMeta.ts +17 -17
- package/src/Level/index.ts +3 -3
- package/src/MiniGames/SAWAcknowledgeSpinPushRequest.ts +3 -4
- package/src/MiniGames/SAWAcknowledgeType.ts +3 -4
- package/src/MiniGames/SAWAskForUsername.ts +3 -4
- package/src/MiniGames/SAWBuyInType.ts +15 -13
- package/src/MiniGames/SAWDoAknowledgeRequest.ts +3 -3
- package/src/MiniGames/SAWDoAknowledgeResponse.ts +3 -3
- package/src/MiniGames/SAWDoSpinRequest.ts +3 -5
- package/src/MiniGames/SAWDoSpinResponse.ts +10 -11
- package/src/MiniGames/SAWEventSawPush.ts +3 -4
- package/src/MiniGames/SAWGameType.ts +23 -21
- package/src/MiniGames/SAWGetTemplatesRequest.ts +3 -3
- package/src/MiniGames/SAWGetTemplatesResponse.ts +53 -65
- package/src/MiniGames/SAWPrize.ts +11 -12
- package/src/MiniGames/SAWPrizeDropAknowledgeRequest.ts +5 -3
- package/src/MiniGames/SAWPrizeDropAknowledgeResponse.ts +3 -3
- package/src/MiniGames/SAWPrizeDropWinPush.ts +9 -8
- package/src/MiniGames/SAWPrizeType.ts +23 -22
- package/src/MiniGames/SAWPrizeUI.ts +17 -17
- package/src/MiniGames/SAWSpinErrorCode.ts +15 -16
- package/src/MiniGames/SAWSpinsCountPush.ts +4 -4
- package/src/MiniGames/SAWTemplate.ts +29 -29
- package/src/MiniGames/SAWTemplateUI.ts +45 -47
- package/src/MiniGames/SAWUtils.ts +23 -26
- package/src/MiniGames/SAWWinSoundType.ts +10 -11
- package/src/MiniGames/index.ts +24 -22
- package/src/Missions/AchCategoryPublicMeta.ts +2 -3
- package/src/Missions/AchClaimPrizeRequest.ts +4 -5
- package/src/Missions/AchClaimPrizeResponse.ts +3 -4
- package/src/Missions/AchievementCategory.ts +14 -15
- package/src/Missions/AchievementOptinRequest.ts +3 -5
- package/src/Missions/AchievementOptinResponse.ts +2 -4
- package/src/Missions/AchievementPublicMeta.ts +19 -20
- package/src/Missions/AchievementStatus.ts +7 -8
- package/src/Missions/AchievementTaskPublicMeta.ts +2 -3
- package/src/Missions/AchievementTaskType.ts +2 -2
- package/src/Missions/AchievementType.ts +2 -3
- package/src/Missions/GetAchCategoriesRequest.ts +2 -4
- package/src/Missions/GetAchCategoriesResponse.ts +4 -5
- package/src/Missions/GetAchievementMapRequest.ts +2 -4
- package/src/Missions/GetAchievementMapResponse.ts +3 -5
- package/src/Missions/GetRelatedAchTourRequest.ts +3 -4
- package/src/Missions/GetRelatedAchTourResponse.ts +5 -7
- package/src/Missions/ReloadAchievementsEvent.ts +5 -5
- package/src/Missions/ScheduledMissionType.ts +4 -5
- package/src/Missions/UserAchievement.ts +104 -108
- package/src/Missions/UserAchievementTask.ts +13 -15
- package/src/Missions/index.ts +19 -19
- package/src/NodeCache.ts +44 -49
- package/src/OCache.ts +51 -57
- package/src/Quiz/MarketsAnswers.ts +34 -34
- package/src/Quiz/MarketsInfo.ts +184 -177
- package/src/Quiz/MarketsPerSport.ts +30 -37
- package/src/Quiz/MarketsType.ts +28 -28
- package/src/Quiz/ScoreResultTypes.ts +18 -18
- package/src/Quiz/SportTypes.ts +4 -4
- package/src/Quiz/index.ts +6 -6
- package/src/SmarticoAPI.ts +769 -730
- package/src/SmarticoLib/index.ts +1053 -1069
- package/src/Store/BuyStoreItemErrorCode.ts +10 -10
- package/src/Store/BuyStoreItemRequest.ts +2 -2
- package/src/Store/BuyStoreItemResponse.ts +2 -3
- package/src/Store/GetCategoriesStoreResponse.ts +3 -8
- package/src/Store/GetStoreHistoryRequest.ts +3 -3
- package/src/Store/GetStoreHistoryResponse.ts +4 -4
- package/src/Store/GetStoreItemsResponse.ts +3 -4
- package/src/Store/StoreCategory.ts +14 -15
- package/src/Store/StoreCategoryPublicMeta.ts +2 -3
- package/src/Store/StoreItem.ts +32 -33
- package/src/Store/StoreItemPublicMeta.ts +10 -10
- package/src/Store/StoreItemPurchased.ts +40 -40
- package/src/Store/StoreItemType.ts +20 -19
- package/src/Store/index.ts +13 -13
- package/src/Tournaments/GetTournamentInfoRequest.ts +2 -3
- package/src/Tournaments/GetTournamentInfoResponse.ts +45 -48
- package/src/Tournaments/GetTournamentsRequest.ts +2 -4
- package/src/Tournaments/GetTournamentsResponse.ts +7 -14
- package/src/Tournaments/Tournament.ts +109 -115
- package/src/Tournaments/TournamentInstanceStatus.ts +17 -18
- package/src/Tournaments/TournamentPlayer.ts +7 -8
- package/src/Tournaments/TournamentPrize.ts +9 -10
- package/src/Tournaments/TournamentPublicMeta.ts +26 -26
- package/src/Tournaments/TournamentRegisterRequest.ts +2 -3
- package/src/Tournaments/TournamentRegisterResponse.ts +3 -7
- package/src/Tournaments/TournamentRegistrationError.ts +9 -9
- package/src/Tournaments/TournamentRegistrationStatus.ts +25 -27
- package/src/Tournaments/TournamentRegistrationType.ts +15 -16
- package/src/Tournaments/TournamentType.ts +3 -4
- package/src/Tournaments/TournamentUtils.ts +90 -89
- package/src/Tournaments/index.ts +16 -16
- package/src/WSAPI/WSAPI.ts +781 -763
- package/src/WSAPI/WSAPITypes.ts +574 -586
- package/src/index.ts +15 -15
package/dist/index.js
CHANGED
|
@@ -182,24 +182,24 @@ var IntUtils = /*#__PURE__*/function () {
|
|
|
182
182
|
IntUtils.uuid = function uuid() {
|
|
183
183
|
var a;
|
|
184
184
|
var b;
|
|
185
|
-
for (b = a =
|
|
185
|
+
for (b = a = ''; a++ < 36; b += a * 51 & 52 ? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-') {}
|
|
186
186
|
return b;
|
|
187
187
|
};
|
|
188
188
|
IntUtils.isNotNull = function isNotNull(val) {
|
|
189
|
-
return typeof val !==
|
|
189
|
+
return typeof val !== 'undefined' && val !== null;
|
|
190
190
|
};
|
|
191
191
|
IntUtils.isNotEmpty = function isNotEmpty(val) {
|
|
192
|
-
return typeof val !==
|
|
192
|
+
return typeof val !== 'undefined' && val !== null && val.length > 0;
|
|
193
193
|
};
|
|
194
194
|
IntUtils.replaceAll = function replaceAll(value, regex, replacement) {
|
|
195
195
|
if (IntUtils.isNotNull(value)) {
|
|
196
|
-
return value.replace(new RegExp(IntUtils.escapeRegExp(regex),
|
|
196
|
+
return value.replace(new RegExp(IntUtils.escapeRegExp(regex), 'g'), replacement == null ? void 0 : replacement.toString());
|
|
197
197
|
}
|
|
198
198
|
return value;
|
|
199
199
|
};
|
|
200
200
|
IntUtils.escapeRegExp = function escapeRegExp(v) {
|
|
201
201
|
if (IntUtils.isNotEmpty(v)) {
|
|
202
|
-
return v.replace(/[.*+?^${}()|[\]\\]/g,
|
|
202
|
+
return v.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
203
203
|
}
|
|
204
204
|
return v;
|
|
205
205
|
};
|
|
@@ -228,7 +228,7 @@ IntUtils.isWithinPeriod = function (timestamp, period) {
|
|
|
228
228
|
switch (period) {
|
|
229
229
|
case 'today':
|
|
230
230
|
return now.getFullYear() === completedDate.getFullYear() && now.getMonth() === completedDate.getMonth() && now.getDate() === completedDate.getDate();
|
|
231
|
-
case
|
|
231
|
+
case 'thisWeek':
|
|
232
232
|
var startOfWeek = new Date(now);
|
|
233
233
|
startOfWeek.setDate(now.getDate() - now.getDay());
|
|
234
234
|
startOfWeek.setHours(0, 0, 0, 0);
|
|
@@ -236,7 +236,7 @@ IntUtils.isWithinPeriod = function (timestamp, period) {
|
|
|
236
236
|
endOfWeek.setDate(startOfWeek.getDate() + 6);
|
|
237
237
|
endOfWeek.setHours(23, 59, 59, 999);
|
|
238
238
|
return completedDate >= startOfWeek && completedDate <= endOfWeek;
|
|
239
|
-
case
|
|
239
|
+
case 'thisMonth':
|
|
240
240
|
return now.getFullYear() === completedDate.getFullYear() && now.getMonth() === completedDate.getMonth();
|
|
241
241
|
default:
|
|
242
242
|
return false;
|
|
@@ -283,7 +283,7 @@ SAWUtils.canPlay = function (t, pointsBalance) {
|
|
|
283
283
|
}
|
|
284
284
|
default:
|
|
285
285
|
{
|
|
286
|
-
console.error(
|
|
286
|
+
console.error('MiniGamesUtils.canPlay: Unknwon SAW buyin type ' + t.saw_buyin_type_id);
|
|
287
287
|
return false;
|
|
288
288
|
}
|
|
289
289
|
}
|
|
@@ -400,8 +400,8 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
|
|
|
400
400
|
};
|
|
401
401
|
|
|
402
402
|
/*
|
|
403
|
-
* Possible error codes for the mini-games attempts
|
|
404
|
-
*/
|
|
403
|
+
* Possible error codes for the mini-games attempts
|
|
404
|
+
*/
|
|
405
405
|
exports.SAWSpinErrorCode = void 0;
|
|
406
406
|
(function (SAWSpinErrorCode) {
|
|
407
407
|
/** No error */
|
|
@@ -427,7 +427,7 @@ exports.SAWWinSoundType = void 0;
|
|
|
427
427
|
SAWWinSoundType[SAWWinSoundType["NoSound"] = 4] = "NoSound";
|
|
428
428
|
SAWWinSoundType[SAWWinSoundType["Custom"] = 5] = "Custom";
|
|
429
429
|
})(exports.SAWWinSoundType || (exports.SAWWinSoundType = {}));
|
|
430
|
-
var SAWWinSoundFiles = (_SAWWinSoundFiles = {}, _SAWWinSoundFiles[exports.SAWWinSoundType.NoSound] = null, _SAWWinSoundFiles[exports.SAWWinSoundType.Disappointing] =
|
|
430
|
+
var SAWWinSoundFiles = (_SAWWinSoundFiles = {}, _SAWWinSoundFiles[exports.SAWWinSoundType.NoSound] = null, _SAWWinSoundFiles[exports.SAWWinSoundType.Disappointing] = 'saw-disappointed.m4a', _SAWWinSoundFiles[exports.SAWWinSoundType.Positive] = 'saw-positive.m4a', _SAWWinSoundFiles[exports.SAWWinSoundType.HighlyPositive] = 'saw-highly-positive.m4a', _SAWWinSoundFiles);
|
|
431
431
|
|
|
432
432
|
var NodeCache = /*#__PURE__*/function () {
|
|
433
433
|
function NodeCache() {
|
|
@@ -591,7 +591,7 @@ var CoreUtils = /*#__PURE__*/function () {
|
|
|
591
591
|
function CoreUtils() {}
|
|
592
592
|
CoreUtils.currencySymbol = function currencySymbol(currency) {
|
|
593
593
|
var _USD$EUR$JPY$GBP$AUD$;
|
|
594
|
-
return (_USD$EUR$JPY$GBP$AUD$ = {}, _USD$EUR$JPY$GBP$AUD$[currency == null ? void 0 : currency.toUpperCase()] = currency == null ? void 0 : currency.toUpperCase(), _USD$EUR$JPY$GBP$AUD$.USD =
|
|
594
|
+
return (_USD$EUR$JPY$GBP$AUD$ = {}, _USD$EUR$JPY$GBP$AUD$[currency == null ? void 0 : currency.toUpperCase()] = currency == null ? void 0 : currency.toUpperCase(), _USD$EUR$JPY$GBP$AUD$.USD = '$', _USD$EUR$JPY$GBP$AUD$.EUR = "\u20AC", _USD$EUR$JPY$GBP$AUD$.JPY = "\xA5", _USD$EUR$JPY$GBP$AUD$.GBP = "\xA3", _USD$EUR$JPY$GBP$AUD$.AUD = 'A$', _USD$EUR$JPY$GBP$AUD$.CAD = 'C$', _USD$EUR$JPY$GBP$AUD$.CHF = 'CHF', _USD$EUR$JPY$GBP$AUD$.CNY = "\xA5", _USD$EUR$JPY$GBP$AUD$.SEK = 'kr', _USD$EUR$JPY$GBP$AUD$.NZD = 'NZ$', _USD$EUR$JPY$GBP$AUD$.MXN = 'MX$', _USD$EUR$JPY$GBP$AUD$.SGD = 'S$', _USD$EUR$JPY$GBP$AUD$.HKD = 'HK$', _USD$EUR$JPY$GBP$AUD$.NOK = 'kr', _USD$EUR$JPY$GBP$AUD$.KRW = "\u20A9", _USD$EUR$JPY$GBP$AUD$.TRY = "\u20BA", _USD$EUR$JPY$GBP$AUD$.INR = "\u20B9", _USD$EUR$JPY$GBP$AUD$.RUB = "\u20BD", _USD$EUR$JPY$GBP$AUD$.BRL = 'R$', _USD$EUR$JPY$GBP$AUD$.ZAR = 'R', _USD$EUR$JPY$GBP$AUD$)[currency == null ? void 0 : currency.toUpperCase()];
|
|
595
595
|
};
|
|
596
596
|
return CoreUtils;
|
|
597
597
|
}();
|
|
@@ -1020,12 +1020,12 @@ exports.TournamentInstanceStatus = void 0;
|
|
|
1020
1020
|
})(exports.TournamentInstanceStatus || (exports.TournamentInstanceStatus = {}));
|
|
1021
1021
|
var TournamentInstanceStatusName = function TournamentInstanceStatusName(s) {
|
|
1022
1022
|
var _TournamentInstanceSt;
|
|
1023
|
-
return (_TournamentInstanceSt = {}, _TournamentInstanceSt[exports.TournamentInstanceStatus.PUBLISHED] =
|
|
1023
|
+
return (_TournamentInstanceSt = {}, _TournamentInstanceSt[exports.TournamentInstanceStatus.PUBLISHED] = 'PUBLISHED', _TournamentInstanceSt[exports.TournamentInstanceStatus.REGISTER] = 'REGISTER', _TournamentInstanceSt[exports.TournamentInstanceStatus.STARTED] = 'STARTED', _TournamentInstanceSt[exports.TournamentInstanceStatus.FINISHED] = 'FINISHED', _TournamentInstanceSt[exports.TournamentInstanceStatus.CANCELLED] = 'CANCELLED', _TournamentInstanceSt[exports.TournamentInstanceStatus.FAILED] = 'FAILED', _TournamentInstanceSt[exports.TournamentInstanceStatus.FINALIZING] = 'FINALIZING', _TournamentInstanceSt)[s];
|
|
1024
1024
|
};
|
|
1025
1025
|
|
|
1026
1026
|
var tournamentPrizeTypeToPrizeName = function tournamentPrizeTypeToPrizeName(type) {
|
|
1027
1027
|
var _ActivityTypeLimited$;
|
|
1028
|
-
return (_ActivityTypeLimited$ = {}, _ActivityTypeLimited$[exports.ActivityTypeLimited.DoNothing] = 'TANGIBLE', _ActivityTypeLimited$[exports.ActivityTypeLimited.Points] = 'POINTS_ADD', _ActivityTypeLimited$[exports.ActivityTypeLimited.DeductPoints] = 'POINTS_DEDUCT', _ActivityTypeLimited$[exports.ActivityTypeLimited.ResetPoints] = 'POINTS_RESET', _ActivityTypeLimited$[exports.ActivityTypeLimited.MiniGameAttempt] =
|
|
1028
|
+
return (_ActivityTypeLimited$ = {}, _ActivityTypeLimited$[exports.ActivityTypeLimited.DoNothing] = 'TANGIBLE', _ActivityTypeLimited$[exports.ActivityTypeLimited.Points] = 'POINTS_ADD', _ActivityTypeLimited$[exports.ActivityTypeLimited.DeductPoints] = 'POINTS_DEDUCT', _ActivityTypeLimited$[exports.ActivityTypeLimited.ResetPoints] = 'POINTS_RESET', _ActivityTypeLimited$[exports.ActivityTypeLimited.MiniGameAttempt] = 'MINI_GAME_ATTEMPT', _ActivityTypeLimited$[exports.ActivityTypeLimited.Bonus] = 'BONUS', _ActivityTypeLimited$)[type];
|
|
1029
1029
|
};
|
|
1030
1030
|
var TournamentUtils = function TournamentUtils() {};
|
|
1031
1031
|
TournamentUtils.isCanRegister = function (tournament) {
|
|
@@ -1268,7 +1268,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1268
1268
|
* ```
|
|
1269
1269
|
*
|
|
1270
1270
|
* **Visitor mode: not supported**
|
|
1271
|
-
|
|
1271
|
+
*/;
|
|
1272
1272
|
_proto.checkSegmentMatch = function checkSegmentMatch(segment_id) {
|
|
1273
1273
|
try {
|
|
1274
1274
|
var _this2 = this;
|
|
@@ -1293,7 +1293,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1293
1293
|
* });
|
|
1294
1294
|
* ```
|
|
1295
1295
|
* **Visitor mode: not supported**
|
|
1296
|
-
|
|
1296
|
+
*/
|
|
1297
1297
|
;
|
|
1298
1298
|
_proto.checkSegmentListMatch = function checkSegmentListMatch(segment_ids) {
|
|
1299
1299
|
try {
|
|
@@ -1317,7 +1317,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1317
1317
|
* console.log(result);
|
|
1318
1318
|
* });
|
|
1319
1319
|
* ```
|
|
1320
|
-
|
|
1320
|
+
*/
|
|
1321
1321
|
;
|
|
1322
1322
|
_proto.getLevels = function getLevels() {
|
|
1323
1323
|
try {
|
|
@@ -1368,7 +1368,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1368
1368
|
* Returns all the badges available the current user
|
|
1369
1369
|
*
|
|
1370
1370
|
* **Visitor mode: not supported**
|
|
1371
|
-
|
|
1371
|
+
*/
|
|
1372
1372
|
;
|
|
1373
1373
|
_proto.getBadges = function getBadges() {
|
|
1374
1374
|
try {
|
|
@@ -1393,7 +1393,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1393
1393
|
* ```
|
|
1394
1394
|
*
|
|
1395
1395
|
* **Visitor mode: not supported**
|
|
1396
|
-
|
|
1396
|
+
*/
|
|
1397
1397
|
;
|
|
1398
1398
|
_proto.getUserLevelExtraCounters = function getUserLevelExtraCounters() {
|
|
1399
1399
|
try {
|
|
@@ -1422,7 +1422,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1422
1422
|
* console.log(result);
|
|
1423
1423
|
* });
|
|
1424
1424
|
* ```
|
|
1425
|
-
|
|
1425
|
+
*/
|
|
1426
1426
|
;
|
|
1427
1427
|
_proto.getStoreItems = function getStoreItems() {
|
|
1428
1428
|
try {
|
|
@@ -1443,7 +1443,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1443
1443
|
* ```
|
|
1444
1444
|
*
|
|
1445
1445
|
* **Visitor mode: not supported**
|
|
1446
|
-
|
|
1446
|
+
*/
|
|
1447
1447
|
;
|
|
1448
1448
|
_proto.buyStoreItem = function buyStoreItem(item_id) {
|
|
1449
1449
|
try {
|
|
@@ -1489,19 +1489,19 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
1491
|
/**
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1492
|
+
* Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
1493
|
+
* The maximum number of items per request is limited to 20.
|
|
1494
|
+
* You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
|
|
1495
|
+
*
|
|
1496
|
+
* **Example**:
|
|
1497
|
+
* ```
|
|
1498
|
+
* _smartico.api.getStorePurchasedItems().then((result) => {
|
|
1499
|
+
* console.log(result);
|
|
1500
|
+
* });
|
|
1501
|
+
* ```
|
|
1502
|
+
*
|
|
1503
|
+
* **Visitor mode: not supported**
|
|
1504
|
+
*/
|
|
1505
1505
|
;
|
|
1506
1506
|
_proto.getStorePurchasedItems = function getStorePurchasedItems(_temp2) {
|
|
1507
1507
|
var _ref2 = _temp2 === void 0 ? {} : _temp2,
|
|
@@ -1550,23 +1550,23 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
/**
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1553
|
+
* Returns list of custom sections
|
|
1554
|
+
*
|
|
1555
|
+
* **Example**:
|
|
1556
|
+
* ```
|
|
1557
|
+
* _smartico.api.getCustomSections().then((result) => {
|
|
1558
|
+
* console.log(result);
|
|
1559
|
+
* });
|
|
1560
|
+
* ```
|
|
1561
|
+
*
|
|
1562
|
+
* **Example in the Visitor mode**:
|
|
1563
|
+
* ```
|
|
1564
|
+
* _smartico.vapi('EN').getCustomSections().then((result) => {
|
|
1565
|
+
* console.log(result);
|
|
1566
|
+
* });
|
|
1567
|
+
* ```
|
|
1568
|
+
*
|
|
1569
|
+
* */
|
|
1570
1570
|
;
|
|
1571
1571
|
_proto.getCustomSections = function getCustomSections() {
|
|
1572
1572
|
try {
|
|
@@ -1618,7 +1618,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1618
1618
|
* Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
1619
1619
|
*
|
|
1620
1620
|
* **Visitor mode: not supported**
|
|
1621
|
-
|
|
1621
|
+
*/
|
|
1622
1622
|
;
|
|
1623
1623
|
_proto.playMiniGame = function playMiniGame(template_id) {
|
|
1624
1624
|
try {
|
|
@@ -1640,7 +1640,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1640
1640
|
* Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
1641
1641
|
*
|
|
1642
1642
|
* **Visitor mode: not supported**
|
|
1643
|
-
|
|
1643
|
+
*/
|
|
1644
1644
|
;
|
|
1645
1645
|
_proto.requestMissionOptIn = function requestMissionOptIn(mission_id) {
|
|
1646
1646
|
try {
|
|
@@ -1660,7 +1660,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1660
1660
|
* Request for claim reward for the specified mission id. Returns the err_code.
|
|
1661
1661
|
*
|
|
1662
1662
|
* **Visitor mode: not supported**
|
|
1663
|
-
|
|
1663
|
+
*/
|
|
1664
1664
|
;
|
|
1665
1665
|
_proto.requestMissionClaimReward = function requestMissionClaimReward(mission_id, ach_completed_id) {
|
|
1666
1666
|
try {
|
|
@@ -1713,7 +1713,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1713
1713
|
/**
|
|
1714
1714
|
* Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
|
|
1715
1715
|
*
|
|
1716
|
-
|
|
1716
|
+
* **Example**:
|
|
1717
1717
|
* ```
|
|
1718
1718
|
* _smartico.api.getTournamentsList().then((result) => {
|
|
1719
1719
|
* if (result.length > 0) {
|
|
@@ -1748,7 +1748,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1748
1748
|
* Requests registration for the specified tournament instance. Returns the err_code.
|
|
1749
1749
|
*
|
|
1750
1750
|
* **Visitor mode: not supported**
|
|
1751
|
-
|
|
1751
|
+
*/
|
|
1752
1752
|
;
|
|
1753
1753
|
_proto.registerInTournament = function registerInTournament(tournamentInstanceId) {
|
|
1754
1754
|
try {
|
|
@@ -1794,17 +1794,17 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1794
1794
|
}
|
|
1795
1795
|
}
|
|
1796
1796
|
/** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1797
|
+
* The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
1798
|
+
* You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
1799
|
+
* This functions return list of messages without the body of the message.
|
|
1800
|
+
* To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
|
|
1801
|
+
* All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
1802
|
+
* The "onUpdate" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function.
|
|
1803
|
+
*
|
|
1804
|
+
* **Visitor mode: not supported**
|
|
1805
|
+
*
|
|
1806
|
+
* @param params
|
|
1807
|
+
*/
|
|
1808
1808
|
;
|
|
1809
1809
|
_proto.getInboxMessages = function getInboxMessages(_temp5) {
|
|
1810
1810
|
var _ref5 = _temp5 === void 0 ? {} : _temp5,
|
|
@@ -1824,9 +1824,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
/**
|
|
1826
1826
|
* Returns the message body of the specified message guid.
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1827
|
+
*
|
|
1828
|
+
* **Visitor mode: not supported**
|
|
1829
|
+
*/
|
|
1830
1830
|
;
|
|
1831
1831
|
_proto.getInboxMessageBody = function getInboxMessageBody(messageGuid) {
|
|
1832
1832
|
try {
|
|
@@ -1859,7 +1859,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1859
1859
|
* Requests to mark all inbox messages as rea
|
|
1860
1860
|
*
|
|
1861
1861
|
* **Visitor mode: not supported**
|
|
1862
|
-
|
|
1862
|
+
*/
|
|
1863
1863
|
;
|
|
1864
1864
|
_proto.markAllInboxMessagesAsRead = function markAllInboxMessagesAsRead() {
|
|
1865
1865
|
try {
|
|
@@ -1933,7 +1933,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
/**
|
|
1935
1935
|
* Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
|
|
1936
|
-
|
|
1936
|
+
*/
|
|
1937
1937
|
;
|
|
1938
1938
|
_proto.getTranslations = function getTranslations(lang_code) {
|
|
1939
1939
|
try {
|
|
@@ -2076,7 +2076,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2076
2076
|
* console.log(result);
|
|
2077
2077
|
* });
|
|
2078
2078
|
* ```
|
|
2079
|
-
|
|
2079
|
+
*/
|
|
2080
2080
|
;
|
|
2081
2081
|
_proto.jackpotGet = function jackpotGet(filter) {
|
|
2082
2082
|
try {
|
|
@@ -2151,7 +2151,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2151
2151
|
*
|
|
2152
2152
|
* **Visitor mode: not supported**
|
|
2153
2153
|
*
|
|
2154
|
-
|
|
2154
|
+
*/
|
|
2155
2155
|
;
|
|
2156
2156
|
_proto.jackpotOptIn = function jackpotOptIn(filter) {
|
|
2157
2157
|
try {
|
|
@@ -2159,7 +2159,6 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2159
2159
|
if (!filter.jp_template_id) {
|
|
2160
2160
|
throw new Error('jp_template_id is required in jackpotOptIn');
|
|
2161
2161
|
}
|
|
2162
|
-
;
|
|
2163
2162
|
return Promise.resolve(_this38.api.jackpotOptIn(null, filter));
|
|
2164
2163
|
} catch (e) {
|
|
2165
2164
|
return Promise.reject(e);
|
|
@@ -2178,7 +2177,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2178
2177
|
*
|
|
2179
2178
|
* **Visitor mode: not supported**
|
|
2180
2179
|
*
|
|
2181
|
-
|
|
2180
|
+
*/
|
|
2182
2181
|
;
|
|
2183
2182
|
_proto.jackpotOptOut = function jackpotOptOut(filter) {
|
|
2184
2183
|
try {
|
|
@@ -2186,7 +2185,6 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2186
2185
|
if (!filter.jp_template_id) {
|
|
2187
2186
|
throw new Error('jp_template_id is required in jackpotOptOut');
|
|
2188
2187
|
}
|
|
2189
|
-
;
|
|
2190
2188
|
return Promise.resolve(_this39.api.jackpotOptOut(null, filter));
|
|
2191
2189
|
} catch (e) {
|
|
2192
2190
|
return Promise.reject(e);
|
|
@@ -2307,7 +2305,7 @@ function _catch(body, recover) {
|
|
|
2307
2305
|
var PUBLIC_API_URL = 'https://papi{ENV_ID}.smartico.ai/services/public';
|
|
2308
2306
|
var C_SOCKET_PROD = 'wss://api{ENV_ID}.smartico.ai/websocket/services';
|
|
2309
2307
|
var AVATAR_DOMAIN = 'https://img{ENV_ID}.smr.vc';
|
|
2310
|
-
var DEFAULT_LANG_EN =
|
|
2308
|
+
var DEFAULT_LANG_EN = 'EN';
|
|
2311
2309
|
var SmarticoAPI = /*#__PURE__*/function () {
|
|
2312
2310
|
function SmarticoAPI(label_api_key, brand_api_key, messageSender, options) {
|
|
2313
2311
|
var _options$tracker;
|