@smartico/public-api 0.0.150 → 0.0.152
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/Base/AchRelatedGame.d.ts +13 -13
- package/dist/Base/ClassId.d.ts +97 -97
- package/dist/Base/ProtocolMessage.d.ts +5 -5
- package/dist/Base/ProtocolRequest.d.ts +6 -6
- package/dist/Base/ProtocolResponse.d.ts +5 -5
- package/dist/CookieStore.d.ts +6 -6
- package/dist/Core/ActivityTypeLimited.d.ts +18 -18
- package/dist/Core/CheckSegmentMatchRequest.d.ts +4 -4
- package/dist/Core/CheckSegmentMatchResponse.d.ts +7 -7
- package/dist/Core/CoreUtils.d.ts +5 -5
- package/dist/Core/GetAchievementsUserInfoRequest.d.ts +3 -3
- package/dist/Core/GetAchievementsUserInfoResponse.d.ts +5 -5
- package/dist/Core/GetLabelInfoRequest.d.ts +3 -3
- package/dist/Core/GetLabelInfoResponse.d.ts +7 -7
- package/dist/Core/GetTranslationsRequest.d.ts +7 -7
- package/dist/Core/GetTranslationsResponse.d.ts +7 -7
- package/dist/Core/PublicLabelSettings.d.ts +27 -27
- package/dist/Core/PublicProperties.d.ts +9 -9
- package/dist/Core/ResponseIdentify.d.ts +12 -12
- package/dist/Core/TranslationArea.d.ts +10 -10
- package/dist/Core/index.d.ts +9 -9
- package/dist/CustomSections/AchCustomSection.d.ts +27 -27
- package/dist/CustomSections/GetCustomSectionsRequest.d.ts +3 -3
- package/dist/CustomSections/GetCustomSectionsResponse.d.ts +7 -7
- package/dist/CustomSections/UICustomSection.d.ts +15 -15
- package/dist/CustomSections/index.d.ts +4 -4
- package/dist/ErrorCodes.d.ts +12 -12
- package/dist/GResponse.d.ts +9 -9
- package/dist/ILogger.d.ts +7 -7
- package/dist/Inbox/GetInboxMessagesRequest.d.ts +6 -6
- package/dist/Inbox/GetInboxMessagesResponse.d.ts +7 -7
- package/dist/Inbox/InboxMessage.d.ts +23 -23
- package/dist/Inbox/InboxMessageType.d.ts +11 -11
- package/dist/Inbox/MarkInboxMessageDeletedRequest.d.ts +5 -5
- package/dist/Inbox/MarkInboxMessageDeletedResponse.d.ts +5 -5
- package/dist/Inbox/MarkInboxMessageReadRequest.d.ts +5 -5
- package/dist/Inbox/MarkInboxMessageReadResponse.d.ts +5 -5
- package/dist/Inbox/MarkInboxMessageStarredRequest.d.ts +5 -5
- package/dist/Inbox/MarkInboxMessageStarredResponse.d.ts +5 -5
- package/dist/Inbox/index.d.ts +10 -10
- package/dist/IntUtils.d.ts +10 -10
- package/dist/Jackpots/GetJackpotsPotsRequest.d.ts +4 -4
- package/dist/Jackpots/GetJackpotsPotsResponse.d.ts +5 -5
- package/dist/Jackpots/GetJackpotsRequest.d.ts +5 -5
- package/dist/Jackpots/GetJackpotsResponse.d.ts +5 -5
- package/dist/Jackpots/JackPotWinner.d.ts +13 -13
- package/dist/Jackpots/JackpotContributionType.d.ts +5 -5
- package/dist/Jackpots/JackpotDetails.d.ts +37 -37
- package/dist/Jackpots/JackpotHtmlTemplate.d.ts +5 -5
- package/dist/Jackpots/JackpotPot.d.ts +13 -13
- package/dist/Jackpots/JackpotPublicMeta.d.ts +18 -18
- package/dist/Jackpots/JackpotType.d.ts +4 -4
- package/dist/Jackpots/JackpotWinPush.d.ts +7 -7
- package/dist/Jackpots/JackpotsOptinRequest.d.ts +4 -4
- package/dist/Jackpots/JackpotsOptinResponse.d.ts +3 -3
- package/dist/Jackpots/JackpotsOptoutRequest.d.ts +4 -4
- package/dist/Jackpots/JackpotsOptoutResponse.d.ts +3 -3
- package/dist/Jackpots/index.d.ts +16 -16
- package/dist/Leaderboard/GetLeaderBoardsRequest.d.ts +7 -7
- package/dist/Leaderboard/GetLeaderBoardsResponse.d.ts +7 -7
- package/dist/Leaderboard/LeaderBoardDetails.d.ts +13 -13
- package/dist/Leaderboard/LeaderBoardPeriodType.d.ts +5 -5
- package/dist/Leaderboard/LeaderBoardPosition.d.ts +10 -10
- package/dist/Leaderboard/LeaderBoardPublicMeta.d.ts +5 -5
- package/dist/Leaderboard/LeaderBoards.d.ts +3 -3
- package/dist/Leaderboard/index.d.ts +6 -6
- package/dist/Level/GetLevelMapResponse.d.ts +7 -7
- package/dist/Level/Level.d.ts +12 -12
- package/dist/Level/LevelPublicMeta.d.ts +19 -19
- package/dist/Level/index.d.ts +3 -3
- package/dist/MiniGames/SAWAcknowledgeType.d.ts +5 -5
- package/dist/MiniGames/SAWAskForUsername.d.ts +4 -4
- package/dist/MiniGames/SAWBuyInType.d.ts +14 -14
- package/dist/MiniGames/SAWDoAknowledgeRequest.d.ts +4 -4
- package/dist/MiniGames/SAWDoAknowledgeResponse.d.ts +4 -4
- package/dist/MiniGames/SAWDoSpinRequest.d.ts +5 -5
- package/dist/MiniGames/SAWDoSpinResponse.d.ts +11 -11
- package/dist/MiniGames/SAWGameType.d.ts +20 -20
- package/dist/MiniGames/SAWGetTemplatesRequest.d.ts +5 -5
- package/dist/MiniGames/SAWGetTemplatesResponse.d.ts +7 -7
- package/dist/MiniGames/SAWPrize.d.ts +13 -13
- package/dist/MiniGames/SAWPrizeDropAknowledgeRequest.d.ts +4 -4
- package/dist/MiniGames/SAWPrizeDropAknowledgeResponse.d.ts +4 -4
- package/dist/MiniGames/SAWPrizeDropWinPush.d.ts +9 -9
- package/dist/MiniGames/SAWPrizeType.d.ts +20 -20
- package/dist/MiniGames/SAWPrizeUI.d.ts +18 -18
- package/dist/MiniGames/SAWSpinErrorCode.d.ts +14 -14
- package/dist/MiniGames/SAWSpinsCountPush.d.ts +5 -5
- package/dist/MiniGames/SAWTemplate.d.ts +29 -29
- package/dist/MiniGames/SAWTemplateUI.d.ts +45 -45
- package/dist/MiniGames/SAWUtils.d.ts +5 -5
- package/dist/MiniGames/SAWWinSoundType.d.ts +13 -13
- package/dist/MiniGames/index.d.ts +20 -20
- package/dist/Missions/AchCategoryPublicMeta.d.ts +4 -4
- package/dist/Missions/AchClaimPrizeRequest.d.ts +5 -5
- package/dist/Missions/AchClaimPrizeResponse.d.ts +3 -3
- package/dist/Missions/AchievementCategory.d.ts +7 -7
- package/dist/Missions/AchievementOptinRequest.d.ts +4 -4
- package/dist/Missions/AchievementOptinResponse.d.ts +3 -3
- package/dist/Missions/AchievementPublicMeta.d.ts +21 -21
- package/dist/Missions/AchievementStatus.d.ts +9 -9
- package/dist/Missions/AchievementTaskPublicMeta.d.ts +4 -3
- package/dist/Missions/AchievementTaskType.d.ts +4 -4
- package/dist/Missions/AchievementType.d.ts +4 -4
- package/dist/Missions/GetAchCategoriesRequest.d.ts +3 -3
- package/dist/Missions/GetAchCategoriesResponse.d.ts +5 -5
- package/dist/Missions/GetAchievementMapRequest.d.ts +3 -3
- package/dist/Missions/GetAchievementMapResponse.d.ts +5 -5
- package/dist/Missions/ReloadAchievementsEvent.d.ts +3 -3
- package/dist/Missions/ScheduledMissionType.d.ts +5 -5
- package/dist/Missions/UserAchievement.d.ts +39 -39
- package/dist/Missions/UserAchievementTask.d.ts +15 -15
- package/dist/Missions/index.d.ts +19 -19
- package/dist/NodeCache.d.ts +10 -10
- package/dist/OCache.d.ts +15 -15
- package/dist/Quiz/MarketsAnswers.d.ts +38 -38
- package/dist/Quiz/MarketsInfo.d.ts +14 -14
- package/dist/Quiz/MarketsPerSport.d.ts +6 -6
- package/dist/Quiz/MarketsType.d.ts +29 -29
- package/dist/Quiz/ScoreResultTypes.d.ts +28 -28
- package/dist/Quiz/SportTypes.d.ts +6 -6
- package/dist/Quiz/index.d.ts +6 -6
- package/dist/SmarticoAPI.d.ts +119 -119
- package/dist/SmarticoLib/index.d.ts +2013 -2013
- package/dist/Store/BuyStoreItemErrorCode.d.ts +11 -11
- package/dist/Store/BuyStoreItemRequest.d.ts +4 -4
- package/dist/Store/BuyStoreItemResponse.d.ts +4 -4
- package/dist/Store/GetCategoriesStoreResponse.d.ts +5 -5
- package/dist/Store/GetStoreHistoryRequest.d.ts +5 -5
- package/dist/Store/GetStoreHistoryResponse.d.ts +6 -6
- package/dist/Store/GetStoreItemsResponse.d.ts +5 -5
- package/dist/Store/StoreCategory.d.ts +7 -7
- package/dist/Store/StoreCategoryPublicMeta.d.ts +4 -4
- package/dist/Store/StoreItem.d.ts +12 -12
- package/dist/Store/StoreItemPublicMeta.d.ts +12 -12
- package/dist/Store/StoreItemPurchased.d.ts +11 -11
- package/dist/Store/StoreItemType.d.ts +16 -16
- package/dist/Store/index.d.ts +13 -13
- package/dist/Tournaments/GetTournamentInfoRequest.d.ts +4 -4
- package/dist/Tournaments/GetTournamentInfoResponse.d.ts +22 -22
- package/dist/Tournaments/GetTournamentsRequest.d.ts +3 -3
- package/dist/Tournaments/GetTournamentsResponse.d.ts +6 -6
- package/dist/Tournaments/Tournament.d.ts +59 -59
- package/dist/Tournaments/TournamentInstanceStatus.d.ts +10 -10
- package/dist/Tournaments/TournamentPlayer.d.ts +9 -9
- package/dist/Tournaments/TournamentPrize.d.ts +10 -10
- package/dist/Tournaments/TournamentPublicMeta.d.ts +27 -27
- package/dist/Tournaments/TournamentRegisterRequest.d.ts +4 -4
- package/dist/Tournaments/TournamentRegisterResponse.d.ts +5 -5
- package/dist/Tournaments/TournamentRegistrationError.d.ts +11 -11
- package/dist/Tournaments/TournamentRegistrationStatus.d.ts +22 -22
- package/dist/Tournaments/TournamentRegistrationType.d.ts +11 -11
- package/dist/Tournaments/TournamentType.d.ts +5 -5
- package/dist/Tournaments/TournamentUtils.d.ts +27 -27
- package/dist/Tournaments/index.d.ts +16 -16
- package/dist/WSAPI/WSAPI.d.ts +445 -445
- package/dist/WSAPI/WSAPITypes.d.ts +621 -621
- package/dist/index.d.ts +15 -15
- package/dist/index.js +375 -367
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +383 -376
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/TMissionOrBadgeTask.md +10 -1
- package/package.json +1 -1
- package/src/Core/CoreUtils.ts +9 -9
- package/src/Missions/AchievementTaskPublicMeta.ts +1 -0
- package/src/Missions/UserAchievement.ts +1 -0
package/dist/index.modern.mjs
CHANGED
|
@@ -16,9 +16,9 @@ var ClassId;
|
|
|
16
16
|
ClassId[ClassId["LOGOUT_RESPONSE"] = 12] = "LOGOUT_RESPONSE";
|
|
17
17
|
ClassId[ClassId["GET_TRANSLATIONS_REQUEST"] = 13] = "GET_TRANSLATIONS_REQUEST";
|
|
18
18
|
ClassId[ClassId["GET_TRANSLATIONS_RESPONSE"] = 14] = "GET_TRANSLATIONS_RESPONSE";
|
|
19
|
-
/*
|
|
20
|
-
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
21
|
-
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
19
|
+
/*
|
|
20
|
+
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
21
|
+
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
22
22
|
*/
|
|
23
23
|
ClassId[ClassId["CLIENT_ENGAGEMENT_IMPRESSION_REQUEST"] = 103] = "CLIENT_ENGAGEMENT_IMPRESSION_REQUEST";
|
|
24
24
|
ClassId[ClassId["CLIENT_ENGAGEMENT_ACTION_REQUEST"] = 104] = "CLIENT_ENGAGEMENT_ACTION_REQUEST";
|
|
@@ -34,9 +34,9 @@ var ClassId;
|
|
|
34
34
|
ClassId[ClassId["CLIENT_SET_CUSTOM_USERNAME_RESPONSE"] = 160] = "CLIENT_SET_CUSTOM_USERNAME_RESPONSE";
|
|
35
35
|
ClassId[ClassId["CHECK_SEGMENT_MATCH_REQUEST"] = 161] = "CHECK_SEGMENT_MATCH_REQUEST";
|
|
36
36
|
ClassId[ClassId["CHECK_SEGMENT_MATCH_RESPONSE"] = 162] = "CHECK_SEGMENT_MATCH_RESPONSE";
|
|
37
|
-
/*
|
|
38
|
-
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
39
|
-
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
37
|
+
/*
|
|
38
|
+
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
39
|
+
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
40
40
|
*/
|
|
41
41
|
// 500-1000 - Achievements
|
|
42
42
|
ClassId[ClassId["GET_LEVEL_MAP_REQUEST"] = 500] = "GET_LEVEL_MAP_REQUEST";
|
|
@@ -64,9 +64,9 @@ var ClassId;
|
|
|
64
64
|
ClassId[ClassId["GET_CUSTOM_SECTIONS_RESPONSE"] = 524] = "GET_CUSTOM_SECTIONS_RESPONSE";
|
|
65
65
|
ClassId[ClassId["MISSION_OPTIN_REQUEST"] = 525] = "MISSION_OPTIN_REQUEST";
|
|
66
66
|
ClassId[ClassId["MISSION_OPTIN_RESPONSE"] = 526] = "MISSION_OPTIN_RESPONSE";
|
|
67
|
-
/*
|
|
68
|
-
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
69
|
-
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
67
|
+
/*
|
|
68
|
+
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
69
|
+
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
70
70
|
*/
|
|
71
71
|
ClassId[ClassId["GET_ACHIEVEMENT_USER_REQUEST"] = 527] = "GET_ACHIEVEMENT_USER_REQUEST";
|
|
72
72
|
ClassId[ClassId["GET_ACHIEVEMENT_USER_RESPONSE"] = 528] = "GET_ACHIEVEMENT_USER_RESPONSE";
|
|
@@ -82,9 +82,9 @@ var ClassId;
|
|
|
82
82
|
ClassId[ClassId["ACHIEVEMENT_CLAIM_PRIZE_RESPONSE"] = 540] = "ACHIEVEMENT_CLAIM_PRIZE_RESPONSE";
|
|
83
83
|
ClassId[ClassId["ACH_SHOP_ITEM_HISTORY_REQUEST"] = 541] = "ACH_SHOP_ITEM_HISTORY_REQUEST";
|
|
84
84
|
ClassId[ClassId["ACH_SHOP_ITEM_HISTORY_RESPONSE"] = 542] = "ACH_SHOP_ITEM_HISTORY_RESPONSE";
|
|
85
|
-
/*
|
|
86
|
-
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
87
|
-
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
85
|
+
/*
|
|
86
|
+
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
87
|
+
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
88
88
|
*/
|
|
89
89
|
ClassId[ClassId["GET_BONUSES_REQUEST"] = 600] = "GET_BONUSES_REQUEST";
|
|
90
90
|
ClassId[ClassId["GET_BONUSES_RESPONSE"] = 601] = "GET_BONUSES_RESPONSE";
|
|
@@ -101,9 +101,9 @@ var ClassId;
|
|
|
101
101
|
ClassId[ClassId["SAW_PRIZE_DROP_WIN_PUSH"] = 708] = "SAW_PRIZE_DROP_WIN_PUSH";
|
|
102
102
|
ClassId[ClassId["SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST"] = 709] = "SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST";
|
|
103
103
|
ClassId[ClassId["SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE"] = 710] = "SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE";
|
|
104
|
-
/*
|
|
105
|
-
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
106
|
-
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
104
|
+
/*
|
|
105
|
+
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
106
|
+
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
107
107
|
*/
|
|
108
108
|
ClassId[ClassId["JP_GET_JACKPOTS_REQUEST"] = 800] = "JP_GET_JACKPOTS_REQUEST";
|
|
109
109
|
ClassId[ClassId["JP_GET_JACKPOTS_RESPONSE"] = 801] = "JP_GET_JACKPOTS_RESPONSE";
|
|
@@ -114,16 +114,16 @@ var ClassId;
|
|
|
114
114
|
ClassId[ClassId["JP_OPTOUT_REQUEST"] = 806] = "JP_OPTOUT_REQUEST";
|
|
115
115
|
ClassId[ClassId["JP_OPTOUT_RESPONSE"] = 807] = "JP_OPTOUT_RESPONSE";
|
|
116
116
|
ClassId[ClassId["JP_WIN_PUSH"] = 808] = "JP_WIN_PUSH";
|
|
117
|
-
/*
|
|
118
|
-
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
119
|
-
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
117
|
+
/*
|
|
118
|
+
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
119
|
+
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
120
120
|
*/
|
|
121
121
|
ClassId[ClassId["REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ"] = 1003] = "REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ";
|
|
122
122
|
ClassId[ClassId["REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP"] = 2003] = "REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP";
|
|
123
123
|
ClassId[ClassId["CLIENT_DEBUG_REQUEST"] = 77777] = "CLIENT_DEBUG_REQUEST";
|
|
124
|
-
/*
|
|
125
|
-
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
126
|
-
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
124
|
+
/*
|
|
125
|
+
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
126
|
+
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
127
127
|
*/
|
|
128
128
|
ClassId[ClassId["UNSUPPORTED_COMMAND"] = 99999] = "UNSUPPORTED_COMMAND";
|
|
129
129
|
})(ClassId || (ClassId = {}));
|
|
@@ -179,6 +179,13 @@ IntUtils.JsonOrText = str => {
|
|
|
179
179
|
}
|
|
180
180
|
return str;
|
|
181
181
|
};
|
|
182
|
+
// public static wsTimeToEpoch = (time: string): number => {
|
|
183
|
+
// if (time) {
|
|
184
|
+
// return moment.utc(time, "DD/MM/YYYY HH:mm:ss").valueOf()
|
|
185
|
+
// } else {
|
|
186
|
+
// return null
|
|
187
|
+
// }
|
|
188
|
+
// }
|
|
182
189
|
IntUtils.isWithinPeriod = (timestamp, period) => {
|
|
183
190
|
const now = new Date();
|
|
184
191
|
const completedDate = new Date(timestamp);
|
|
@@ -371,8 +378,8 @@ const SAWTemplatesTransform = items => {
|
|
|
371
378
|
});
|
|
372
379
|
};
|
|
373
380
|
|
|
374
|
-
/*
|
|
375
|
-
* Possible error codes for the mini-games attempts
|
|
381
|
+
/*
|
|
382
|
+
* Possible error codes for the mini-games attempts
|
|
376
383
|
*/
|
|
377
384
|
var SAWSpinErrorCode;
|
|
378
385
|
(function (SAWSpinErrorCode) {
|
|
@@ -527,25 +534,25 @@ class CoreUtils {
|
|
|
527
534
|
return {
|
|
528
535
|
[currency == null ? void 0 : currency.toUpperCase()]: currency == null ? void 0 : currency.toUpperCase(),
|
|
529
536
|
USD: "$",
|
|
530
|
-
EUR: "
|
|
531
|
-
JPY: "
|
|
532
|
-
GBP: "
|
|
537
|
+
EUR: "\u20AC",
|
|
538
|
+
JPY: "\u00A5",
|
|
539
|
+
GBP: "\u00A3",
|
|
533
540
|
AUD: "A$",
|
|
534
541
|
CAD: "C$",
|
|
535
542
|
CHF: "CHF",
|
|
536
|
-
CNY: "
|
|
543
|
+
CNY: "\u00A5",
|
|
537
544
|
SEK: "kr",
|
|
538
545
|
NZD: "NZ$",
|
|
539
546
|
MXN: "MX$",
|
|
540
547
|
SGD: "S$",
|
|
541
548
|
HKD: "HK$",
|
|
542
549
|
NOK: "kr",
|
|
543
|
-
KRW: "
|
|
544
|
-
TRY: "
|
|
545
|
-
INR: "
|
|
546
|
-
RUB: "
|
|
550
|
+
KRW: "\u20A9",
|
|
551
|
+
TRY: "\u20BA",
|
|
552
|
+
INR: "\u20B9",
|
|
553
|
+
RUB: "\u20BD",
|
|
547
554
|
BRL: "R$",
|
|
548
|
-
ZAR: "R" // South African Rand
|
|
555
|
+
ZAR: "R" // South African Rand
|
|
549
556
|
}[currency == null ? void 0 : currency.toUpperCase()];
|
|
550
557
|
}
|
|
551
558
|
}
|
|
@@ -813,7 +820,8 @@ const UserAchievementTransform = items => {
|
|
|
813
820
|
is_completed: t.isCompleted,
|
|
814
821
|
progress: t.userProgress,
|
|
815
822
|
execution_count_expected: t.executionCount,
|
|
816
|
-
execution_count_actual: t.userExecutedCount
|
|
823
|
+
execution_count_actual: t.userExecutedCount,
|
|
824
|
+
display_progress_as_count: t.task_public_meta.display_progress_as_count
|
|
817
825
|
};
|
|
818
826
|
}),
|
|
819
827
|
related_games: (r.related_games || []).map(g => ({
|
|
@@ -1175,15 +1183,15 @@ class WSAPI {
|
|
|
1175
1183
|
on(ClassId.JP_OPTIN_RESPONSE, data => this.jackpotClearCache());
|
|
1176
1184
|
}
|
|
1177
1185
|
}
|
|
1178
|
-
/** Returns information about current user
|
|
1179
|
-
*
|
|
1180
|
-
* **Example**:
|
|
1181
|
-
* ```
|
|
1182
|
-
* _smartico.api.getUserProfile().then((result) => {
|
|
1183
|
-
* console.log(result);
|
|
1184
|
-
* });
|
|
1185
|
-
* ```
|
|
1186
|
-
* **Visitor mode: not supported**
|
|
1186
|
+
/** Returns information about current user
|
|
1187
|
+
*
|
|
1188
|
+
* **Example**:
|
|
1189
|
+
* ```
|
|
1190
|
+
* _smartico.api.getUserProfile().then((result) => {
|
|
1191
|
+
* console.log(result);
|
|
1192
|
+
* });
|
|
1193
|
+
* ```
|
|
1194
|
+
* **Visitor mode: not supported**
|
|
1187
1195
|
* */
|
|
1188
1196
|
getUserProfile() {
|
|
1189
1197
|
if (this.api.tracker) {
|
|
@@ -1194,15 +1202,15 @@ class WSAPI {
|
|
|
1194
1202
|
throw new Error('Tracker is not initialized, cannot getUserProfile');
|
|
1195
1203
|
}
|
|
1196
1204
|
}
|
|
1197
|
-
/** Check if user belongs to specific segments
|
|
1198
|
-
* **Example**:
|
|
1199
|
-
* ```
|
|
1200
|
-
* _smartico.api.checkSegmentMatch(1).then((result) => {
|
|
1201
|
-
* console.log(result);
|
|
1202
|
-
* });
|
|
1203
|
-
* ```
|
|
1204
|
-
*
|
|
1205
|
-
* **Visitor mode: not supported**
|
|
1205
|
+
/** Check if user belongs to specific segments
|
|
1206
|
+
* **Example**:
|
|
1207
|
+
* ```
|
|
1208
|
+
* _smartico.api.checkSegmentMatch(1).then((result) => {
|
|
1209
|
+
* console.log(result);
|
|
1210
|
+
* });
|
|
1211
|
+
* ```
|
|
1212
|
+
*
|
|
1213
|
+
* **Visitor mode: not supported**
|
|
1206
1214
|
*/
|
|
1207
1215
|
async checkSegmentMatch(segment_id) {
|
|
1208
1216
|
const r = await this.api.coreCheckSegments(null, [segment_id]);
|
|
@@ -1212,54 +1220,54 @@ class WSAPI {
|
|
|
1212
1220
|
return false;
|
|
1213
1221
|
}
|
|
1214
1222
|
}
|
|
1215
|
-
/** Check if user belongs to specific list of segments
|
|
1216
|
-
* **Example**:
|
|
1217
|
-
* ```
|
|
1218
|
-
* _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
|
|
1219
|
-
* console.log(result);
|
|
1220
|
-
* });
|
|
1221
|
-
* ```
|
|
1222
|
-
* **Visitor mode: not supported**
|
|
1223
|
+
/** Check if user belongs to specific list of segments
|
|
1224
|
+
* **Example**:
|
|
1225
|
+
* ```
|
|
1226
|
+
* _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
|
|
1227
|
+
* console.log(result);
|
|
1228
|
+
* });
|
|
1229
|
+
* ```
|
|
1230
|
+
* **Visitor mode: not supported**
|
|
1223
1231
|
*/
|
|
1224
1232
|
async checkSegmentListMatch(segment_ids) {
|
|
1225
1233
|
return await this.api.coreCheckSegments(null, Array.isArray(segment_ids) ? segment_ids : [segment_ids]);
|
|
1226
1234
|
}
|
|
1227
|
-
/** Returns all the levels available the current user
|
|
1228
|
-
* **Example**:
|
|
1229
|
-
* ```
|
|
1230
|
-
* _smartico.api.getLevels().then((result) => {
|
|
1231
|
-
* console.log(result);
|
|
1232
|
-
* });
|
|
1233
|
-
* ```
|
|
1234
|
-
*
|
|
1235
|
-
* **Example in the Visitor mode**:
|
|
1236
|
-
* ```
|
|
1237
|
-
* _smartico.vapi('EN').getLevels().then((result) => {
|
|
1238
|
-
* console.log(result);
|
|
1239
|
-
* });
|
|
1240
|
-
* ```
|
|
1235
|
+
/** Returns all the levels available the current user
|
|
1236
|
+
* **Example**:
|
|
1237
|
+
* ```
|
|
1238
|
+
* _smartico.api.getLevels().then((result) => {
|
|
1239
|
+
* console.log(result);
|
|
1240
|
+
* });
|
|
1241
|
+
* ```
|
|
1242
|
+
*
|
|
1243
|
+
* **Example in the Visitor mode**:
|
|
1244
|
+
* ```
|
|
1245
|
+
* _smartico.vapi('EN').getLevels().then((result) => {
|
|
1246
|
+
* console.log(result);
|
|
1247
|
+
* });
|
|
1248
|
+
* ```
|
|
1241
1249
|
*/
|
|
1242
1250
|
async getLevels() {
|
|
1243
1251
|
return OCache.use(onUpdateContextKey.Levels, ECacheContext.WSAPI, () => this.api.levelsGetT(null), CACHE_DATA_SEC);
|
|
1244
1252
|
}
|
|
1245
|
-
/** Returns all the missions available the current user.
|
|
1246
|
-
* The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
1247
|
-
* Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1248
|
-
* The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
|
|
1249
|
-
*
|
|
1250
|
-
* **Example**:
|
|
1251
|
-
* ```
|
|
1252
|
-
* _smartico.api.getMissions().then((result) => {
|
|
1253
|
-
* console.log(result);
|
|
1254
|
-
* });
|
|
1255
|
-
* ```
|
|
1256
|
-
*
|
|
1257
|
-
* **Example in the Visitor mode**:
|
|
1258
|
-
* ```
|
|
1259
|
-
* _smartico.vapi('EN').getMissions().then((result) => {
|
|
1260
|
-
* console.log(result);
|
|
1261
|
-
* });
|
|
1262
|
-
* ```
|
|
1253
|
+
/** Returns all the missions available the current user.
|
|
1254
|
+
* The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
1255
|
+
* Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1256
|
+
* The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
|
|
1257
|
+
*
|
|
1258
|
+
* **Example**:
|
|
1259
|
+
* ```
|
|
1260
|
+
* _smartico.api.getMissions().then((result) => {
|
|
1261
|
+
* console.log(result);
|
|
1262
|
+
* });
|
|
1263
|
+
* ```
|
|
1264
|
+
*
|
|
1265
|
+
* **Example in the Visitor mode**:
|
|
1266
|
+
* ```
|
|
1267
|
+
* _smartico.vapi('EN').getMissions().then((result) => {
|
|
1268
|
+
* console.log(result);
|
|
1269
|
+
* });
|
|
1270
|
+
* ```
|
|
1263
1271
|
*/
|
|
1264
1272
|
async getMissions({
|
|
1265
1273
|
onUpdate
|
|
@@ -1269,61 +1277,61 @@ class WSAPI {
|
|
|
1269
1277
|
}
|
|
1270
1278
|
return OCache.use(onUpdateContextKey.Missions, ECacheContext.WSAPI, () => this.api.missionsGetItemsT(null), CACHE_DATA_SEC);
|
|
1271
1279
|
}
|
|
1272
|
-
/**
|
|
1273
|
-
* Returns all the badges available the current user
|
|
1274
|
-
*
|
|
1275
|
-
* **Visitor mode: not supported**
|
|
1280
|
+
/**
|
|
1281
|
+
* Returns all the badges available the current user
|
|
1282
|
+
*
|
|
1283
|
+
* **Visitor mode: not supported**
|
|
1276
1284
|
*/
|
|
1277
1285
|
async getBadges() {
|
|
1278
1286
|
return OCache.use(onUpdateContextKey.Badges, ECacheContext.WSAPI, () => this.api.badgetsGetItemsT(null), CACHE_DATA_SEC);
|
|
1279
1287
|
}
|
|
1280
|
-
/**
|
|
1281
|
-
* Returns the extra counters for the current user level.
|
|
1282
|
-
* These are counters that are configured for each Smartico client separatly by request.
|
|
1283
|
-
* For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
|
|
1284
|
-
*
|
|
1285
|
-
* **Example**:
|
|
1286
|
-
* ```
|
|
1287
|
-
* _smartico.api.getUserLevelExtraCounters().then((result) => {
|
|
1288
|
-
* console.log(result);
|
|
1289
|
-
* });
|
|
1290
|
-
* ```
|
|
1291
|
-
*
|
|
1292
|
-
* **Visitor mode: not supported**
|
|
1288
|
+
/**
|
|
1289
|
+
* Returns the extra counters for the current user level.
|
|
1290
|
+
* These are counters that are configured for each Smartico client separatly by request.
|
|
1291
|
+
* For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
|
|
1292
|
+
*
|
|
1293
|
+
* **Example**:
|
|
1294
|
+
* ```
|
|
1295
|
+
* _smartico.api.getUserLevelExtraCounters().then((result) => {
|
|
1296
|
+
* console.log(result);
|
|
1297
|
+
* });
|
|
1298
|
+
* ```
|
|
1299
|
+
*
|
|
1300
|
+
* **Visitor mode: not supported**
|
|
1293
1301
|
*/
|
|
1294
1302
|
async getUserLevelExtraCounters() {
|
|
1295
1303
|
return OCache.use(onUpdateContextKey.LevelExtraCounters, ECacheContext.WSAPI, () => this.api.getUserGamificationInfoT(null), CACHE_DATA_SEC);
|
|
1296
1304
|
}
|
|
1297
|
-
/**
|
|
1298
|
-
*
|
|
1299
|
-
* Returns all the store items available the current user
|
|
1300
|
-
*
|
|
1301
|
-
* **Example**:
|
|
1302
|
-
* ```
|
|
1303
|
-
* _smartico.api.getStoreItems().then((result) => {
|
|
1304
|
-
* console.log(result);
|
|
1305
|
-
* });
|
|
1306
|
-
* ```
|
|
1307
|
-
*
|
|
1308
|
-
* **Example in the Visitor mode**:
|
|
1309
|
-
* ```
|
|
1310
|
-
* _smartico.vapi('EN').getStoreItems().then((result) => {
|
|
1311
|
-
* console.log(result);
|
|
1312
|
-
* });
|
|
1313
|
-
* ```
|
|
1305
|
+
/**
|
|
1306
|
+
*
|
|
1307
|
+
* Returns all the store items available the current user
|
|
1308
|
+
*
|
|
1309
|
+
* **Example**:
|
|
1310
|
+
* ```
|
|
1311
|
+
* _smartico.api.getStoreItems().then((result) => {
|
|
1312
|
+
* console.log(result);
|
|
1313
|
+
* });
|
|
1314
|
+
* ```
|
|
1315
|
+
*
|
|
1316
|
+
* **Example in the Visitor mode**:
|
|
1317
|
+
* ```
|
|
1318
|
+
* _smartico.vapi('EN').getStoreItems().then((result) => {
|
|
1319
|
+
* console.log(result);
|
|
1320
|
+
* });
|
|
1321
|
+
* ```
|
|
1314
1322
|
*/
|
|
1315
1323
|
async getStoreItems() {
|
|
1316
1324
|
return OCache.use(onUpdateContextKey.StoreItems, ECacheContext.WSAPI, () => this.api.storeGetItemsT(null), CACHE_DATA_SEC);
|
|
1317
1325
|
}
|
|
1318
|
-
/** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
|
|
1319
|
-
* **Example**:
|
|
1320
|
-
* ```
|
|
1321
|
-
* _smartico.api.buyStoreItem(1).then((result) => {
|
|
1322
|
-
* console.log(result);
|
|
1323
|
-
* });
|
|
1324
|
-
* ```
|
|
1325
|
-
*
|
|
1326
|
-
* **Visitor mode: not supported**
|
|
1326
|
+
/** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
|
|
1327
|
+
* **Example**:
|
|
1328
|
+
* ```
|
|
1329
|
+
* _smartico.api.buyStoreItem(1).then((result) => {
|
|
1330
|
+
* console.log(result);
|
|
1331
|
+
* });
|
|
1332
|
+
* ```
|
|
1333
|
+
*
|
|
1334
|
+
* **Visitor mode: not supported**
|
|
1327
1335
|
*/
|
|
1328
1336
|
async buyStoreItem(item_id) {
|
|
1329
1337
|
const r = await this.api.buyStoreItem(null, item_id);
|
|
@@ -1333,40 +1341,40 @@ class WSAPI {
|
|
|
1333
1341
|
};
|
|
1334
1342
|
return o;
|
|
1335
1343
|
}
|
|
1336
|
-
/**
|
|
1337
|
-
*
|
|
1338
|
-
* Returns store categories
|
|
1339
|
-
*
|
|
1340
|
-
* **Example**:
|
|
1341
|
-
* ```
|
|
1342
|
-
* _smartico.api.getStoreCategories().then((result) => {
|
|
1343
|
-
* console.log(result);
|
|
1344
|
-
* });
|
|
1345
|
-
* ```
|
|
1346
|
-
*
|
|
1347
|
-
* **Example in the Visitor mode**:
|
|
1348
|
-
* ```
|
|
1349
|
-
* _smartico.vapi('EN').getStoreCategories().then((result) => {
|
|
1350
|
-
* console.log(result);
|
|
1351
|
-
* });
|
|
1352
|
-
* ```
|
|
1344
|
+
/**
|
|
1345
|
+
*
|
|
1346
|
+
* Returns store categories
|
|
1347
|
+
*
|
|
1348
|
+
* **Example**:
|
|
1349
|
+
* ```
|
|
1350
|
+
* _smartico.api.getStoreCategories().then((result) => {
|
|
1351
|
+
* console.log(result);
|
|
1352
|
+
* });
|
|
1353
|
+
* ```
|
|
1354
|
+
*
|
|
1355
|
+
* **Example in the Visitor mode**:
|
|
1356
|
+
* ```
|
|
1357
|
+
* _smartico.vapi('EN').getStoreCategories().then((result) => {
|
|
1358
|
+
* console.log(result);
|
|
1359
|
+
* });
|
|
1360
|
+
* ```
|
|
1353
1361
|
*/
|
|
1354
1362
|
async getStoreCategories() {
|
|
1355
1363
|
return OCache.use(onUpdateContextKey.StoreCategories, ECacheContext.WSAPI, () => this.api.storeGetCategoriesT(null), CACHE_DATA_SEC);
|
|
1356
1364
|
}
|
|
1357
|
-
/**
|
|
1358
|
-
* Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
1359
|
-
* The maximum number of items per request is limited to 20.
|
|
1360
|
-
* You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
|
|
1361
|
-
*
|
|
1362
|
-
* **Example**:
|
|
1363
|
-
* ```
|
|
1364
|
-
* _smartico.api.getStorePurchasedItems().then((result) => {
|
|
1365
|
-
* console.log(result);
|
|
1366
|
-
* });
|
|
1367
|
-
* ```
|
|
1368
|
-
*
|
|
1369
|
-
* **Visitor mode: not supported**
|
|
1365
|
+
/**
|
|
1366
|
+
* Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
1367
|
+
* The maximum number of items per request is limited to 20.
|
|
1368
|
+
* You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
|
|
1369
|
+
*
|
|
1370
|
+
* **Example**:
|
|
1371
|
+
* ```
|
|
1372
|
+
* _smartico.api.getStorePurchasedItems().then((result) => {
|
|
1373
|
+
* console.log(result);
|
|
1374
|
+
* });
|
|
1375
|
+
* ```
|
|
1376
|
+
*
|
|
1377
|
+
* **Visitor mode: not supported**
|
|
1370
1378
|
*/
|
|
1371
1379
|
async getStorePurchasedItems({
|
|
1372
1380
|
limit,
|
|
@@ -1378,67 +1386,67 @@ class WSAPI {
|
|
|
1378
1386
|
}
|
|
1379
1387
|
return OCache.use(onUpdateContextKey.StoreHistory, ECacheContext.WSAPI, () => this.api.storeGetPurchasedItemsT(null, limit, offset), CACHE_DATA_SEC);
|
|
1380
1388
|
}
|
|
1381
|
-
/**
|
|
1382
|
-
* Returns missions & badges categories
|
|
1383
|
-
*
|
|
1384
|
-
* **Example**:
|
|
1385
|
-
* ```
|
|
1386
|
-
* _smartico.api.getAchCategories().then((result) => {
|
|
1387
|
-
* console.log(result);
|
|
1388
|
-
* });
|
|
1389
|
-
* ```
|
|
1390
|
-
*
|
|
1391
|
-
* **Example in the Visitor mode**:
|
|
1392
|
-
* ```
|
|
1393
|
-
* _smartico.vapi('EN').getAchCategories().then((result) => {
|
|
1394
|
-
* console.log(result);
|
|
1395
|
-
* });
|
|
1396
|
-
* ```
|
|
1397
|
-
*
|
|
1389
|
+
/**
|
|
1390
|
+
* Returns missions & badges categories
|
|
1391
|
+
*
|
|
1392
|
+
* **Example**:
|
|
1393
|
+
* ```
|
|
1394
|
+
* _smartico.api.getAchCategories().then((result) => {
|
|
1395
|
+
* console.log(result);
|
|
1396
|
+
* });
|
|
1397
|
+
* ```
|
|
1398
|
+
*
|
|
1399
|
+
* **Example in the Visitor mode**:
|
|
1400
|
+
* ```
|
|
1401
|
+
* _smartico.vapi('EN').getAchCategories().then((result) => {
|
|
1402
|
+
* console.log(result);
|
|
1403
|
+
* });
|
|
1404
|
+
* ```
|
|
1405
|
+
*
|
|
1398
1406
|
* */
|
|
1399
1407
|
async getAchCategories() {
|
|
1400
1408
|
return OCache.use(onUpdateContextKey.AchCategories, ECacheContext.WSAPI, () => this.api.achGetCategoriesT(null), CACHE_DATA_SEC);
|
|
1401
1409
|
}
|
|
1402
|
-
/**
|
|
1403
|
-
* Returns list of custom sections
|
|
1404
|
-
*
|
|
1405
|
-
* **Example**:
|
|
1406
|
-
* ```
|
|
1407
|
-
* _smartico.api.getCustomSections().then((result) => {
|
|
1408
|
-
* console.log(result);
|
|
1409
|
-
* });
|
|
1410
|
-
* ```
|
|
1411
|
-
*
|
|
1412
|
-
* **Example in the Visitor mode**:
|
|
1413
|
-
* ```
|
|
1414
|
-
* _smartico.vapi('EN').getCustomSections().then((result) => {
|
|
1415
|
-
* console.log(result);
|
|
1416
|
-
* });
|
|
1417
|
-
* ```
|
|
1418
|
-
*
|
|
1410
|
+
/**
|
|
1411
|
+
* Returns list of custom sections
|
|
1412
|
+
*
|
|
1413
|
+
* **Example**:
|
|
1414
|
+
* ```
|
|
1415
|
+
* _smartico.api.getCustomSections().then((result) => {
|
|
1416
|
+
* console.log(result);
|
|
1417
|
+
* });
|
|
1418
|
+
* ```
|
|
1419
|
+
*
|
|
1420
|
+
* **Example in the Visitor mode**:
|
|
1421
|
+
* ```
|
|
1422
|
+
* _smartico.vapi('EN').getCustomSections().then((result) => {
|
|
1423
|
+
* console.log(result);
|
|
1424
|
+
* });
|
|
1425
|
+
* ```
|
|
1426
|
+
*
|
|
1419
1427
|
* */
|
|
1420
1428
|
async getCustomSections() {
|
|
1421
1429
|
return OCache.use(onUpdateContextKey.CustomSections, ECacheContext.WSAPI, () => this.api.getCustomSectionsT(null), CACHE_DATA_SEC);
|
|
1422
1430
|
}
|
|
1423
|
-
/**
|
|
1424
|
-
* Returns the list of mini-games available for user
|
|
1425
|
-
* The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1426
|
-
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
|
|
1427
|
-
*
|
|
1428
|
-
* **Example**:
|
|
1429
|
-
* ```
|
|
1430
|
-
* _smartico.api.getMiniGames().then((result) => {
|
|
1431
|
-
* console.log(result);
|
|
1432
|
-
* });
|
|
1433
|
-
* ```
|
|
1434
|
-
*
|
|
1435
|
-
* **Example in the Visitor mode**:
|
|
1436
|
-
* ```
|
|
1437
|
-
* _smartico.vapi('EN').getMiniGames().then((result) => {
|
|
1438
|
-
* console.log(result);
|
|
1439
|
-
* });
|
|
1440
|
-
* ```
|
|
1441
|
-
*
|
|
1431
|
+
/**
|
|
1432
|
+
* Returns the list of mini-games available for user
|
|
1433
|
+
* The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1434
|
+
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
|
|
1435
|
+
*
|
|
1436
|
+
* **Example**:
|
|
1437
|
+
* ```
|
|
1438
|
+
* _smartico.api.getMiniGames().then((result) => {
|
|
1439
|
+
* console.log(result);
|
|
1440
|
+
* });
|
|
1441
|
+
* ```
|
|
1442
|
+
*
|
|
1443
|
+
* **Example in the Visitor mode**:
|
|
1444
|
+
* ```
|
|
1445
|
+
* _smartico.vapi('EN').getMiniGames().then((result) => {
|
|
1446
|
+
* console.log(result);
|
|
1447
|
+
* });
|
|
1448
|
+
* ```
|
|
1449
|
+
*
|
|
1442
1450
|
*/
|
|
1443
1451
|
async getMiniGames({
|
|
1444
1452
|
onUpdate
|
|
@@ -1448,10 +1456,10 @@ class WSAPI {
|
|
|
1448
1456
|
}
|
|
1449
1457
|
return OCache.use(onUpdateContextKey.Saw, ECacheContext.WSAPI, () => this.api.sawGetTemplatesT(null), CACHE_DATA_SEC);
|
|
1450
1458
|
}
|
|
1451
|
-
/**
|
|
1452
|
-
* Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
1453
|
-
*
|
|
1454
|
-
* **Visitor mode: not supported**
|
|
1459
|
+
/**
|
|
1460
|
+
* Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
1461
|
+
*
|
|
1462
|
+
* **Visitor mode: not supported**
|
|
1455
1463
|
*/
|
|
1456
1464
|
async playMiniGame(template_id) {
|
|
1457
1465
|
const r = await this.api.sawSpinRequest(null, template_id);
|
|
@@ -1463,10 +1471,10 @@ class WSAPI {
|
|
|
1463
1471
|
};
|
|
1464
1472
|
return o;
|
|
1465
1473
|
}
|
|
1466
|
-
/**
|
|
1467
|
-
* Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
1468
|
-
*
|
|
1469
|
-
* **Visitor mode: not supported**
|
|
1474
|
+
/**
|
|
1475
|
+
* Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
1476
|
+
*
|
|
1477
|
+
* **Visitor mode: not supported**
|
|
1470
1478
|
*/
|
|
1471
1479
|
async requestMissionOptIn(mission_id) {
|
|
1472
1480
|
const r = await this.api.missionOptIn(null, mission_id);
|
|
@@ -1476,10 +1484,10 @@ class WSAPI {
|
|
|
1476
1484
|
};
|
|
1477
1485
|
return o;
|
|
1478
1486
|
}
|
|
1479
|
-
/**
|
|
1480
|
-
* Request for claim reward for the specified mission id. Returns the err_code.
|
|
1481
|
-
*
|
|
1482
|
-
* **Visitor mode: not supported**
|
|
1487
|
+
/**
|
|
1488
|
+
* Request for claim reward for the specified mission id. Returns the err_code.
|
|
1489
|
+
*
|
|
1490
|
+
* **Visitor mode: not supported**
|
|
1483
1491
|
*/
|
|
1484
1492
|
async requestMissionClaimReward(mission_id, ach_completed_id) {
|
|
1485
1493
|
const r = await this.api.missionClaimPrize(null, mission_id, ach_completed_id);
|
|
@@ -1489,23 +1497,23 @@ class WSAPI {
|
|
|
1489
1497
|
};
|
|
1490
1498
|
return o;
|
|
1491
1499
|
}
|
|
1492
|
-
/** Returns all the active instances of tournaments
|
|
1493
|
-
* The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1494
|
-
* The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
|
|
1495
|
-
*
|
|
1496
|
-
* **Example**:
|
|
1497
|
-
* ```
|
|
1498
|
-
* _smartico.api.getTournamentsList().then((result) => {
|
|
1499
|
-
* console.log(result);
|
|
1500
|
-
* });
|
|
1501
|
-
* ```
|
|
1502
|
-
*
|
|
1503
|
-
* **Example in the Visitor mode**:
|
|
1504
|
-
* ```
|
|
1505
|
-
* _smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
1506
|
-
* console.log(result);
|
|
1507
|
-
* });
|
|
1508
|
-
* ```
|
|
1500
|
+
/** Returns all the active instances of tournaments
|
|
1501
|
+
* The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1502
|
+
* The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
|
|
1503
|
+
*
|
|
1504
|
+
* **Example**:
|
|
1505
|
+
* ```
|
|
1506
|
+
* _smartico.api.getTournamentsList().then((result) => {
|
|
1507
|
+
* console.log(result);
|
|
1508
|
+
* });
|
|
1509
|
+
* ```
|
|
1510
|
+
*
|
|
1511
|
+
* **Example in the Visitor mode**:
|
|
1512
|
+
* ```
|
|
1513
|
+
* _smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
1514
|
+
* console.log(result);
|
|
1515
|
+
* });
|
|
1516
|
+
* ```
|
|
1509
1517
|
* */
|
|
1510
1518
|
async getTournamentsList({
|
|
1511
1519
|
onUpdate
|
|
@@ -1515,38 +1523,38 @@ class WSAPI {
|
|
|
1515
1523
|
}
|
|
1516
1524
|
return OCache.use(onUpdateContextKey.TournamentList, ECacheContext.WSAPI, () => this.api.tournamentsGetLobbyT(null), CACHE_DATA_SEC);
|
|
1517
1525
|
}
|
|
1518
|
-
/**
|
|
1519
|
-
* Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
|
|
1520
|
-
*
|
|
1521
|
-
* **Example**:
|
|
1522
|
-
* ```
|
|
1523
|
-
* _smartico.api.getTournamentsList().then((result) => {
|
|
1524
|
-
* if (result.length > 0) {
|
|
1525
|
-
* _smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
1526
|
-
* console.log(result);
|
|
1527
|
-
* });
|
|
1528
|
-
* }
|
|
1529
|
-
* });
|
|
1530
|
-
* ```
|
|
1531
|
-
*
|
|
1532
|
-
* **Example in the Visitor mode**:
|
|
1533
|
-
* ```
|
|
1534
|
-
* _smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
1535
|
-
* if (result.length > 0) {
|
|
1536
|
-
* _smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
1537
|
-
* console.log(result);
|
|
1538
|
-
* });
|
|
1539
|
-
* }
|
|
1540
|
-
* });
|
|
1541
|
-
* ```
|
|
1526
|
+
/**
|
|
1527
|
+
* Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
|
|
1528
|
+
*
|
|
1529
|
+
* **Example**:
|
|
1530
|
+
* ```
|
|
1531
|
+
* _smartico.api.getTournamentsList().then((result) => {
|
|
1532
|
+
* if (result.length > 0) {
|
|
1533
|
+
* _smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
1534
|
+
* console.log(result);
|
|
1535
|
+
* });
|
|
1536
|
+
* }
|
|
1537
|
+
* });
|
|
1538
|
+
* ```
|
|
1539
|
+
*
|
|
1540
|
+
* **Example in the Visitor mode**:
|
|
1541
|
+
* ```
|
|
1542
|
+
* _smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
1543
|
+
* if (result.length > 0) {
|
|
1544
|
+
* _smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
1545
|
+
* console.log(result);
|
|
1546
|
+
* });
|
|
1547
|
+
* }
|
|
1548
|
+
* });
|
|
1549
|
+
* ```
|
|
1542
1550
|
*/
|
|
1543
1551
|
async getTournamentInstanceInfo(tournamentInstanceId) {
|
|
1544
1552
|
return this.api.tournamentsGetInfoT(null, tournamentInstanceId);
|
|
1545
1553
|
}
|
|
1546
|
-
/**
|
|
1547
|
-
* Requests registration for the specified tournament instance. Returns the err_code.
|
|
1548
|
-
*
|
|
1549
|
-
* **Visitor mode: not supported**
|
|
1554
|
+
/**
|
|
1555
|
+
* Requests registration for the specified tournament instance. Returns the err_code.
|
|
1556
|
+
*
|
|
1557
|
+
* **Visitor mode: not supported**
|
|
1550
1558
|
*/
|
|
1551
1559
|
async registerInTournament(tournamentInstanceId) {
|
|
1552
1560
|
const r = await this.api.registerInTournament(null, tournamentInstanceId);
|
|
@@ -1556,38 +1564,38 @@ class WSAPI {
|
|
|
1556
1564
|
};
|
|
1557
1565
|
return o;
|
|
1558
1566
|
}
|
|
1559
|
-
/**
|
|
1560
|
-
* Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
|
|
1561
|
-
* For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
|
|
1562
|
-
*
|
|
1563
|
-
* **Example**:
|
|
1564
|
-
* ```
|
|
1565
|
-
* _smartico.api.getLeaderBoard(1).then((result) => {
|
|
1566
|
-
* console.log(result);
|
|
1567
|
-
* });
|
|
1568
|
-
* ```
|
|
1569
|
-
*
|
|
1570
|
-
* **Example in the Visitor mode**:
|
|
1571
|
-
* ```
|
|
1572
|
-
* _smartico.vapi('EN').getLeaderBoard(1).then((result) => {
|
|
1573
|
-
* console.log(result);
|
|
1574
|
-
* });
|
|
1575
|
-
* ```
|
|
1567
|
+
/**
|
|
1568
|
+
* Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
|
|
1569
|
+
* For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
|
|
1570
|
+
*
|
|
1571
|
+
* **Example**:
|
|
1572
|
+
* ```
|
|
1573
|
+
* _smartico.api.getLeaderBoard(1).then((result) => {
|
|
1574
|
+
* console.log(result);
|
|
1575
|
+
* });
|
|
1576
|
+
* ```
|
|
1577
|
+
*
|
|
1578
|
+
* **Example in the Visitor mode**:
|
|
1579
|
+
* ```
|
|
1580
|
+
* _smartico.vapi('EN').getLeaderBoard(1).then((result) => {
|
|
1581
|
+
* console.log(result);
|
|
1582
|
+
* });
|
|
1583
|
+
* ```
|
|
1576
1584
|
*/
|
|
1577
1585
|
async getLeaderBoard(periodType, getPreviousPeriod) {
|
|
1578
1586
|
return OCache.use(onUpdateContextKey.LeaderBoards, ECacheContext.WSAPI, () => this.api.leaderboardsGetT(null, periodType, getPreviousPeriod), CACHE_DATA_SEC);
|
|
1579
1587
|
}
|
|
1580
|
-
/** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
1581
|
-
* The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
1582
|
-
* You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
1583
|
-
* This functions return list of messages without the body of the message.
|
|
1584
|
-
* 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.
|
|
1585
|
-
* All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
1586
|
-
* 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.
|
|
1587
|
-
*
|
|
1588
|
-
* **Visitor mode: not supported**
|
|
1589
|
-
*
|
|
1590
|
-
* @param params
|
|
1588
|
+
/** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
1589
|
+
* The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
1590
|
+
* You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
1591
|
+
* This functions return list of messages without the body of the message.
|
|
1592
|
+
* 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.
|
|
1593
|
+
* All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
1594
|
+
* 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.
|
|
1595
|
+
*
|
|
1596
|
+
* **Visitor mode: not supported**
|
|
1597
|
+
*
|
|
1598
|
+
* @param params
|
|
1591
1599
|
*/
|
|
1592
1600
|
async getInboxMessages({
|
|
1593
1601
|
from,
|
|
@@ -1600,18 +1608,18 @@ class WSAPI {
|
|
|
1600
1608
|
}
|
|
1601
1609
|
return await this.api.getInboxMessagesT(null, from, to, onlyFavorite);
|
|
1602
1610
|
}
|
|
1603
|
-
/**
|
|
1604
|
-
* Returns the message body of the specified message guid.
|
|
1605
|
-
*
|
|
1606
|
-
* **Visitor mode: not supported**
|
|
1611
|
+
/**
|
|
1612
|
+
* Returns the message body of the specified message guid.
|
|
1613
|
+
*
|
|
1614
|
+
* **Visitor mode: not supported**
|
|
1607
1615
|
*/
|
|
1608
1616
|
async getInboxMessageBody(messageGuid) {
|
|
1609
1617
|
return await this.api.getInboxMessageBodyT(messageGuid);
|
|
1610
1618
|
}
|
|
1611
|
-
/**
|
|
1612
|
-
* Requests to mark inbox message with specified guid as read
|
|
1613
|
-
*
|
|
1614
|
-
* **Visitor mode: not supported**
|
|
1619
|
+
/**
|
|
1620
|
+
* Requests to mark inbox message with specified guid as read
|
|
1621
|
+
*
|
|
1622
|
+
* **Visitor mode: not supported**
|
|
1615
1623
|
*/
|
|
1616
1624
|
async markInboxMessageAsRead(messageGuid) {
|
|
1617
1625
|
const r = await this.api.markInboxMessageRead(null, messageGuid);
|
|
@@ -1620,10 +1628,10 @@ class WSAPI {
|
|
|
1620
1628
|
err_message: r.errMsg
|
|
1621
1629
|
};
|
|
1622
1630
|
}
|
|
1623
|
-
/**
|
|
1624
|
-
* Requests to mark all inbox messages as rea
|
|
1625
|
-
*
|
|
1626
|
-
* **Visitor mode: not supported**
|
|
1631
|
+
/**
|
|
1632
|
+
* Requests to mark all inbox messages as rea
|
|
1633
|
+
*
|
|
1634
|
+
* **Visitor mode: not supported**
|
|
1627
1635
|
*/
|
|
1628
1636
|
async markAllInboxMessagesAsRead() {
|
|
1629
1637
|
const r = await this.api.markAllInboxMessageRead(null);
|
|
@@ -1632,10 +1640,10 @@ class WSAPI {
|
|
|
1632
1640
|
err_message: r.errMsg
|
|
1633
1641
|
};
|
|
1634
1642
|
}
|
|
1635
|
-
/**
|
|
1636
|
-
* Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
|
|
1637
|
-
*
|
|
1638
|
-
* **Visitor mode: not supported**
|
|
1643
|
+
/**
|
|
1644
|
+
* Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
|
|
1645
|
+
*
|
|
1646
|
+
* **Visitor mode: not supported**
|
|
1639
1647
|
*/
|
|
1640
1648
|
async markUnmarkInboxMessageAsFavorite(messageGuid, mark) {
|
|
1641
1649
|
const r = await this.api.markUnmarkInboxMessageAsFavorite(null, messageGuid, mark);
|
|
@@ -1644,10 +1652,10 @@ class WSAPI {
|
|
|
1644
1652
|
err_message: r.errMsg
|
|
1645
1653
|
};
|
|
1646
1654
|
}
|
|
1647
|
-
/**
|
|
1648
|
-
* Requests to delete inbox message
|
|
1649
|
-
*
|
|
1650
|
-
* **Visitor mode: not supported**
|
|
1655
|
+
/**
|
|
1656
|
+
* Requests to delete inbox message
|
|
1657
|
+
*
|
|
1658
|
+
* **Visitor mode: not supported**
|
|
1651
1659
|
*/
|
|
1652
1660
|
async deleteInboxMessage(messageGuid) {
|
|
1653
1661
|
const r = await this.api.deleteInboxMessage(null, messageGuid);
|
|
@@ -1656,10 +1664,10 @@ class WSAPI {
|
|
|
1656
1664
|
err_message: r.errMsg
|
|
1657
1665
|
};
|
|
1658
1666
|
}
|
|
1659
|
-
/**
|
|
1660
|
-
* Requests to delete all inbox messages
|
|
1661
|
-
*
|
|
1662
|
-
* **Visitor mode: not supported**
|
|
1667
|
+
/**
|
|
1668
|
+
* Requests to delete all inbox messages
|
|
1669
|
+
*
|
|
1670
|
+
* **Visitor mode: not supported**
|
|
1663
1671
|
*/
|
|
1664
1672
|
async deleteAllInboxMessages() {
|
|
1665
1673
|
const r = await this.api.deleteAllInboxMessages(null);
|
|
@@ -1668,8 +1676,8 @@ class WSAPI {
|
|
|
1668
1676
|
err_message: r.errMsg
|
|
1669
1677
|
};
|
|
1670
1678
|
}
|
|
1671
|
-
/**
|
|
1672
|
-
* Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
|
|
1679
|
+
/**
|
|
1680
|
+
* Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
|
|
1673
1681
|
*/
|
|
1674
1682
|
async getTranslations(lang_code) {
|
|
1675
1683
|
const r = await this.api.getTranslationsT(null, lang_code, []);
|
|
@@ -1722,24 +1730,24 @@ class WSAPI {
|
|
|
1722
1730
|
OCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Jackpots);
|
|
1723
1731
|
OCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Pots);
|
|
1724
1732
|
}
|
|
1725
|
-
/** Returns list of Jackpots that are active in the systen and matching to the filter definition.
|
|
1726
|
-
* If filter is not provided, all active jackpots will be returned.
|
|
1727
|
-
* Filter can be used to get jackpots related to specific game or specific jackpot template.
|
|
1728
|
-
* You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users
|
|
1729
|
-
*
|
|
1730
|
-
* **Example**:
|
|
1731
|
-
* ```
|
|
1732
|
-
* _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
1733
|
-
* console.log(result);
|
|
1734
|
-
* });
|
|
1735
|
-
* ```
|
|
1736
|
-
*
|
|
1737
|
-
* **Example in the Visitor mode**:
|
|
1738
|
-
* ```
|
|
1739
|
-
* _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
1740
|
-
* console.log(result);
|
|
1741
|
-
* });
|
|
1742
|
-
* ```
|
|
1733
|
+
/** Returns list of Jackpots that are active in the systen and matching to the filter definition.
|
|
1734
|
+
* If filter is not provided, all active jackpots will be returned.
|
|
1735
|
+
* Filter can be used to get jackpots related to specific game or specific jackpot template.
|
|
1736
|
+
* You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users
|
|
1737
|
+
*
|
|
1738
|
+
* **Example**:
|
|
1739
|
+
* ```
|
|
1740
|
+
* _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
1741
|
+
* console.log(result);
|
|
1742
|
+
* });
|
|
1743
|
+
* ```
|
|
1744
|
+
*
|
|
1745
|
+
* **Example in the Visitor mode**:
|
|
1746
|
+
* ```
|
|
1747
|
+
* _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
1748
|
+
* console.log(result);
|
|
1749
|
+
* });
|
|
1750
|
+
* ```
|
|
1743
1751
|
*/
|
|
1744
1752
|
async jackpotGet(filter) {
|
|
1745
1753
|
var _this = this;
|
|
@@ -1771,19 +1779,19 @@ class WSAPI {
|
|
|
1771
1779
|
return _jp;
|
|
1772
1780
|
});
|
|
1773
1781
|
}
|
|
1774
|
-
/**
|
|
1775
|
-
* Opt-in currently logged in user to the jackpot with the specified jp_template_id.
|
|
1776
|
-
* You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
|
|
1777
|
-
*
|
|
1778
|
-
* **Example**:
|
|
1779
|
-
* ```
|
|
1780
|
-
* _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
|
|
1781
|
-
* console.log('Opted in to the jackpot');
|
|
1782
|
-
* });
|
|
1783
|
-
* ```
|
|
1784
|
-
*
|
|
1785
|
-
* **Visitor mode: not supported**
|
|
1786
|
-
*
|
|
1782
|
+
/**
|
|
1783
|
+
* Opt-in currently logged in user to the jackpot with the specified jp_template_id.
|
|
1784
|
+
* You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
|
|
1785
|
+
*
|
|
1786
|
+
* **Example**:
|
|
1787
|
+
* ```
|
|
1788
|
+
* _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
|
|
1789
|
+
* console.log('Opted in to the jackpot');
|
|
1790
|
+
* });
|
|
1791
|
+
* ```
|
|
1792
|
+
*
|
|
1793
|
+
* **Visitor mode: not supported**
|
|
1794
|
+
*
|
|
1787
1795
|
*/
|
|
1788
1796
|
async jackpotOptIn(filter) {
|
|
1789
1797
|
if (!filter.jp_template_id) {
|
|
@@ -1792,19 +1800,19 @@ class WSAPI {
|
|
|
1792
1800
|
const result = await this.api.jackpotOptIn(null, filter);
|
|
1793
1801
|
return result;
|
|
1794
1802
|
}
|
|
1795
|
-
/**
|
|
1796
|
-
* Opt-out currently logged in user from the jackpot with the specified jp_template_id.
|
|
1797
|
-
* You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
|
|
1798
|
-
*
|
|
1799
|
-
* **Example**:
|
|
1800
|
-
* ```
|
|
1801
|
-
* _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
|
|
1802
|
-
* console.log('Opted out from the jackpot');
|
|
1803
|
-
* });
|
|
1804
|
-
* ```
|
|
1805
|
-
*
|
|
1806
|
-
* **Visitor mode: not supported**
|
|
1807
|
-
*
|
|
1803
|
+
/**
|
|
1804
|
+
* Opt-out currently logged in user from the jackpot with the specified jp_template_id.
|
|
1805
|
+
* You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
|
|
1806
|
+
*
|
|
1807
|
+
* **Example**:
|
|
1808
|
+
* ```
|
|
1809
|
+
* _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
|
|
1810
|
+
* console.log('Opted out from the jackpot');
|
|
1811
|
+
* });
|
|
1812
|
+
* ```
|
|
1813
|
+
*
|
|
1814
|
+
* **Visitor mode: not supported**
|
|
1815
|
+
*
|
|
1808
1816
|
*/
|
|
1809
1817
|
async jackpotOptOut(filter) {
|
|
1810
1818
|
if (!filter.jp_template_id) {
|
|
@@ -2091,7 +2099,6 @@ class SmarticoAPI {
|
|
|
2091
2099
|
const message = this.buildMessage(user_ext_id, ClassId.IDENTIFY, {
|
|
2092
2100
|
request_id: IntUtils.uuid() // AA: do we need request_id?
|
|
2093
2101
|
});
|
|
2094
|
-
|
|
2095
2102
|
const r = await this.send(message, ClassId.IDENTIFY_RESPONSE);
|
|
2096
2103
|
r.avatar_id = CoreUtils.avatarUrl(r.avatar_id, this.avatarDomain);
|
|
2097
2104
|
return r;
|
|
@@ -2331,7 +2338,7 @@ class SmarticoAPI {
|
|
|
2331
2338
|
return tournamentInfoItemTransform(response);
|
|
2332
2339
|
}
|
|
2333
2340
|
async leaderboardGet(user_ext_id, period_type_id, prevPeriod = false, force_language) {
|
|
2334
|
-
var _response$map$boardKe, _response$map$boardKe2
|
|
2341
|
+
var _response$map$boardKe, _response$map$boardKe2;
|
|
2335
2342
|
const message = this.buildMessage(user_ext_id, ClassId.GET_LEADERS_BOARD_REQUEST, {
|
|
2336
2343
|
period_type_id,
|
|
2337
2344
|
snapshot_offset: prevPeriod ? 1 : 0,
|
|
@@ -2342,10 +2349,10 @@ class SmarticoAPI {
|
|
|
2342
2349
|
if (boardKey === undefined) {
|
|
2343
2350
|
return undefined;
|
|
2344
2351
|
}
|
|
2345
|
-
if ((_response$map$boardKe = response.map[boardKey]) != null && (_response$map$
|
|
2352
|
+
if ((_response$map$boardKe = response.map[boardKey]) != null && (_response$map$boardKe = _response$map$boardKe.userPosition) != null && _response$map$boardKe.avatar_id) {
|
|
2346
2353
|
response.map[boardKey].userPosition.avatar_url = CoreUtils.avatarUrl(response.map[boardKey].userPosition.avatar_id, this.avatarDomain);
|
|
2347
2354
|
}
|
|
2348
|
-
if ((_response$map$
|
|
2355
|
+
if ((_response$map$boardKe2 = response.map[boardKey]) != null && (_response$map$boardKe2 = _response$map$boardKe2.positions) != null && _response$map$boardKe2.length) {
|
|
2349
2356
|
response.map[boardKey].positions.forEach(p => {
|
|
2350
2357
|
p.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);
|
|
2351
2358
|
});
|