@smartico/public-api 0.0.363 → 0.0.365
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/ClassId.d.ts +8 -0
- package/dist/Clans/Clan.d.ts +17 -0
- package/dist/Clans/GetClanInfoRequest.d.ts +5 -0
- package/dist/Clans/GetClanInfoResponse.d.ts +22 -0
- package/dist/Clans/GetClanListRequest.d.ts +4 -0
- package/dist/Clans/GetClanListResponse.d.ts +9 -0
- package/dist/Clans/JoinClanRequest.d.ts +5 -0
- package/dist/Clans/JoinClanResponse.d.ts +5 -0
- package/dist/Clans/index.d.ts +7 -0
- package/dist/SmarticoAPI.d.ts +8 -1
- package/dist/SmarticoLib/index.d.ts +196 -0
- package/dist/Tournaments/GetClanTournamentPlayersRequest.d.ts +6 -0
- package/dist/Tournaments/GetClanTournamentPlayersResponse.d.ts +40 -0
- package/dist/Tournaments/GetTournamentInfoResponse.d.ts +11 -0
- package/dist/Tournaments/Tournament.d.ts +2 -0
- package/dist/Tournaments/TournamentClan.d.ts +27 -0
- package/dist/Tournaments/index.d.ts +3 -0
- package/dist/WSAPI/WSAPI.d.ts +34 -1
- package/dist/WSAPI/WSAPITypes.d.ts +144 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +583 -293
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +213 -5
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +99 -330
- package/docs/api/classes/SAWUtils.md +25 -11
- package/docs/api/classes/WSAPI.md +737 -379
- package/docs/api/enumerations/AchCustomLayoutTheme.md +25 -0
- package/docs/api/enumerations/AchCustomSectionType.md +79 -0
- package/docs/api/{enums → enumerations}/AchMissionsTabsOptions.md +5 -5
- package/docs/api/{enums → enumerations}/AchOverviewMissionsFilter.md +9 -9
- package/docs/api/{enums → enumerations}/AchievementAvailabilityStatus.md +29 -29
- package/docs/api/enumerations/AchievementStatus.md +49 -0
- package/docs/api/{enums → enumerations}/AchievementTaskType.md +3 -3
- package/docs/api/{enums → enumerations}/AchievementType.md +3 -3
- package/docs/api/enumerations/ActivityTypeLimited.md +115 -0
- package/docs/api/{enums → enumerations}/AttemptPeriodType.md +7 -7
- package/docs/api/{enums → enumerations}/BadgesTimeLimitStates.md +11 -11
- package/docs/api/{enums → enumerations}/BonusStatus-1.md +11 -11
- package/docs/api/enumerations/BonusStatus.md +37 -0
- package/docs/api/{enums → enumerations}/BuyStoreItemErrorCode.md +21 -21
- package/docs/api/{enums → enumerations}/GPRoundStatus.md +9 -9
- package/docs/api/{enums → enumerations}/GamePickMarketType.md +3 -3
- package/docs/api/{enums → enumerations}/GamePickResolutionType.md +7 -7
- package/docs/api/{enums → enumerations}/GamePickScoreType.md +3 -3
- package/docs/api/enumerations/GamePickSportType.md +375 -0
- package/docs/api/{enums → enumerations}/GameRoundOrderType.md +7 -7
- package/docs/api/{enums → enumerations}/InboxCategories.md +5 -5
- package/docs/api/enumerations/InboxMessageType.md +55 -0
- package/docs/api/{enums → enumerations}/InboxReadStatus.md +3 -3
- package/docs/api/{enums → enumerations}/JackPotTemparature.md +7 -7
- package/docs/api/{enums → enumerations}/JackpotContributionType.md +3 -3
- package/docs/api/{enums → enumerations}/JackpotType.md +3 -3
- package/docs/api/{enums → enumerations}/LeaderBoardPeriodType.md +5 -5
- package/docs/api/enumerations/LiquidEntityData.md +73 -0
- package/docs/api/enumerations/MiniGamePrizeTypeName.md +67 -0
- package/docs/api/{enums → enumerations}/OpenLinksType.md +3 -3
- package/docs/api/enumerations/PointChangeSourceType.md +109 -0
- package/docs/api/enumerations/PrizeModifiers.md +49 -0
- package/docs/api/enumerations/QuizAnswersValueType.md +121 -0
- package/docs/api/{enums → enumerations}/RaffleDrawInstanceState.md +5 -5
- package/docs/api/{enums → enumerations}/RaffleDrawTypeExecution.md +5 -5
- package/docs/api/{enums → enumerations}/RaffleTicketCapVisualization.md +5 -5
- package/docs/api/{enums → enumerations}/SAWAcknowledgeType.md +7 -7
- package/docs/api/enumerations/SAWAcknowledgeTypeName.md +25 -0
- package/docs/api/{enums → enumerations}/SAWAskForUsername.md +3 -3
- package/docs/api/enumerations/SAWBuyInType.md +31 -0
- package/docs/api/enumerations/SAWBuyInTypeName.md +37 -0
- package/docs/api/{enums → enumerations}/SAWExposeUserSpinId.md +3 -3
- package/docs/api/{enums → enumerations}/SAWExposeUserSpinIdName.md +3 -3
- package/docs/api/enumerations/SAWGPMarketType.md +157 -0
- package/docs/api/{enums → enumerations}/SAWGameDifficultyType.md +5 -5
- package/docs/api/{enums → enumerations}/SAWGameDifficultyTypeName.md +5 -5
- package/docs/api/{enums → enumerations}/SAWGameLayout.md +3 -3
- package/docs/api/{enums → enumerations}/SAWGameLayoutName.md +3 -3
- package/docs/api/enumerations/SAWGameType.md +73 -0
- package/docs/api/enumerations/SAWGameTypeName.md +79 -0
- package/docs/api/enumerations/SAWPrizeType.md +61 -0
- package/docs/api/{enums → enumerations}/SAWSpinErrorCode.md +19 -19
- package/docs/api/{enums → enumerations}/SAWWheelLayout.md +7 -7
- package/docs/api/enumerations/SAWWinSoundType.md +31 -0
- package/docs/api/{enums → enumerations}/ScheduledMissionType.md +5 -5
- package/docs/api/{enums → enumerations}/StoreItemPurchaseType.md +5 -5
- package/docs/api/enumerations/StoreItemType.md +37 -0
- package/docs/api/enumerations/StoreItemTypeName.md +43 -0
- package/docs/api/enumerations/TournamentInstanceStatus.md +43 -0
- package/docs/api/enumerations/TournamentRegistrationError.md +55 -0
- package/docs/api/enumerations/TournamentRegistrationStatus.md +43 -0
- package/docs/api/enumerations/TournamentRegistrationStatusName.md +49 -0
- package/docs/api/enumerations/TournamentRegistrationType.md +43 -0
- package/docs/api/{enums → enumerations}/TournamentType.md +5 -5
- package/docs/api/{enums → enumerations}/UserBalanceType.md +5 -5
- package/docs/api/functions/AchCategoryTransform.md +13 -0
- package/docs/api/functions/BonusItemsTransform.md +13 -0
- package/docs/api/functions/InboxMessageBodyTransform.md +13 -0
- package/docs/api/functions/SAWHistoryTransform.md +13 -0
- package/docs/api/functions/SAWTemplatesTransform.md +13 -0
- package/docs/api/functions/StoreCategoryTransform.md +13 -0
- package/docs/api/functions/StoreItemTransform.md +13 -0
- package/docs/api/functions/StoreItemTypeNamed.md +13 -0
- package/docs/api/functions/TournamentInstanceStatusName.md +13 -0
- package/docs/api/functions/TournamentItemsTransform.md +13 -0
- package/docs/api/functions/UICustomSectionTransform.md +13 -0
- package/docs/api/functions/UserAchievementTransform.md +13 -0
- package/docs/api/functions/enrichUserAchievementsWithBadgeState.md +13 -0
- package/docs/api/functions/tournamentInfoItemTransform.md +13 -0
- package/docs/api/interfaces/AchCategory.md +5 -5
- package/docs/api/interfaces/AchCategoryPublicMeta.md +5 -5
- package/docs/api/interfaces/AchRelatedGame-1.md +50 -15
- package/docs/api/interfaces/AchRelatedGame.md +35 -16
- package/docs/api/interfaces/AchievementPublicMeta.md +65 -65
- package/docs/api/interfaces/AchievementTaskPublicMeta.md +16 -16
- package/docs/api/interfaces/AffectsProgress.md +7 -7
- package/docs/api/interfaces/Bonus.md +37 -37
- package/docs/api/interfaces/BonusMetaMap-1.md +2 -2
- package/docs/api/interfaces/BonusMetaMap.md +2 -2
- package/docs/api/interfaces/BonusTemplateMetaMap-1.md +8 -8
- package/docs/api/interfaces/BonusTemplateMetaMap.md +8 -8
- package/docs/api/interfaces/Clan.md +53 -0
- package/docs/api/interfaces/ClanLeaderboardEntry.md +31 -0
- package/docs/api/interfaces/ClanPrizeStructureEntry.md +45 -0
- package/docs/api/interfaces/ClanPrizeTier.md +43 -0
- package/docs/api/interfaces/ClanPublicMeta.md +19 -0
- package/docs/api/interfaces/GamePickBoardUser.md +17 -17
- package/docs/api/interfaces/GamePickEvent.md +40 -38
- package/docs/api/interfaces/GamePickEventMeta.md +79 -59
- package/docs/api/interfaces/GamePickGameInfo.md +5 -5
- package/docs/api/interfaces/GamePickRequestParams.md +10 -12
- package/docs/api/interfaces/GamePickRound.md +96 -98
- package/docs/api/interfaces/GamePickRoundBase.md +58 -61
- package/docs/api/interfaces/GamePickRoundBoard.md +88 -90
- package/docs/api/interfaces/GamePickRoundPublicMeta.md +26 -26
- package/docs/api/interfaces/GamePickRoundRequestParams.md +15 -17
- package/docs/api/interfaces/GamePickUserInfo.md +34 -34
- package/docs/api/interfaces/GamesApiResponse.md +11 -11
- package/docs/api/interfaces/GetCustomSectionsResponse.md +23 -25
- package/docs/api/interfaces/GetDrawRunRequest.md +21 -23
- package/docs/api/interfaces/GetDrawRunResponse.md +21 -23
- package/docs/api/interfaces/GetJackpotEligibleGamesRequest.md +13 -15
- package/docs/api/interfaces/GetJackpotEligibleGamesResponse.md +21 -23
- package/docs/api/interfaces/GetJackpotWinnersRequest.md +26 -28
- package/docs/api/interfaces/GetJackpotWinnersResponse.md +23 -25
- package/docs/api/interfaces/GetJackpotsPotsRequest.md +13 -15
- package/docs/api/interfaces/GetJackpotsPotsResponse.md +21 -23
- package/docs/api/interfaces/GetJackpotsRequest.md +17 -19
- package/docs/api/interfaces/GetJackpotsResponse.md +21 -23
- package/docs/api/interfaces/GetRaffleDrawRunsHistoryRequest.md +16 -18
- package/docs/api/interfaces/GetRaffleDrawRunsHistoryResponse.md +21 -23
- package/docs/api/interfaces/GetRafflesRequest.md +14 -16
- package/docs/api/interfaces/GetRafflesResponse.md +21 -23
- package/docs/api/interfaces/GetRelatedAchTourResponse.md +24 -26
- package/docs/api/interfaces/GetTournamentInfoResponse.md +68 -38
- package/docs/api/interfaces/InboxMarkMessageAction.md +3 -3
- package/docs/api/interfaces/InboxMessage.md +18 -18
- package/docs/api/interfaces/InboxMessageBody.md +37 -29
- package/docs/api/interfaces/JackPotWinner.md +11 -11
- package/docs/api/interfaces/JackpotDetails.md +23 -23
- package/docs/api/interfaces/JackpotEligibleGame.md +19 -19
- package/docs/api/interfaces/JackpotHtmlTemplate.md +3 -3
- package/docs/api/interfaces/JackpotPot.md +11 -11
- package/docs/api/interfaces/JackpotPublicMeta.md +15 -15
- package/docs/api/interfaces/JackpotWinPush.md +15 -17
- package/docs/api/interfaces/JackpotWinnerHistory.md +5 -5
- package/docs/api/interfaces/JackpotsOptinRequest.md +13 -15
- package/docs/api/interfaces/JackpotsOptinResponse.md +19 -21
- package/docs/api/interfaces/JackpotsOptoutRequest.md +13 -15
- package/docs/api/interfaces/JackpotsOptoutResponse.md +19 -21
- package/docs/api/interfaces/LeaderBoardDetailsT.md +16 -16
- package/docs/api/interfaces/LeaderBoardUserT.md +9 -9
- package/docs/api/interfaces/LeaderBoardsRewardsT.md +3 -3
- package/docs/api/interfaces/Level.md +15 -15
- package/docs/api/interfaces/LevelPublicMeta.md +31 -24
- package/docs/api/interfaces/QuizEventMeta.md +34 -14
- package/docs/api/interfaces/Raffle.md +13 -13
- package/docs/api/interfaces/RaffleClaimPrizeRequest.md +13 -15
- package/docs/api/interfaces/RaffleClaimPrizeResponse.md +18 -20
- package/docs/api/interfaces/RaffleDraw.md +44 -44
- package/docs/api/interfaces/RaffleDrawPublicMeta.md +15 -15
- package/docs/api/interfaces/RaffleDrawRun.md +15 -15
- package/docs/api/interfaces/RaffleOptinRequest.md +17 -19
- package/docs/api/interfaces/RaffleOptinResponse.md +19 -21
- package/docs/api/interfaces/RafflePrize.md +31 -31
- package/docs/api/interfaces/RafflePrizePublicMeta.md +7 -7
- package/docs/api/interfaces/RafflePrizeWinner.md +15 -15
- package/docs/api/interfaces/RafflePublicMeta.md +16 -16
- package/docs/api/interfaces/RaffleTicket.md +3 -3
- package/docs/api/interfaces/SAWAcknowledgeSpinPushRequest.md +24 -26
- package/docs/api/interfaces/SAWDoAknowledgeRequest.md +13 -15
- package/docs/api/interfaces/SAWDoAknowledgeResponse.md +13 -15
- package/docs/api/interfaces/SAWDoSpinRequest.md +24 -26
- package/docs/api/interfaces/SAWDoSpinResponse.md +33 -35
- package/docs/api/interfaces/SAWEventSawPush.md +17 -19
- package/docs/api/interfaces/SAWGetTemplatesRequest.md +26 -28
- package/docs/api/interfaces/SAWGetTemplatesResponse.md +21 -23
- package/docs/api/interfaces/SAWPrize.md +52 -52
- package/docs/api/interfaces/SAWPrizeDropAknowledgeRequest.md +17 -19
- package/docs/api/interfaces/SAWPrizeDropAknowledgeResponse.md +13 -15
- package/docs/api/interfaces/SAWPrizeDropWinPush.md +21 -23
- package/docs/api/interfaces/SAWPrizeUI.md +78 -78
- package/docs/api/interfaces/SAWPrizesHistory.md +15 -15
- package/docs/api/interfaces/SAWSpinsCountPush.md +15 -17
- package/docs/api/interfaces/SAWTemplate.md +70 -63
- package/docs/api/interfaces/SAWTemplateUI.md +155 -150
- package/docs/api/interfaces/SAWWinningHistoryRequest.md +21 -23
- package/docs/api/interfaces/SAWWinningHistoryResponse.md +23 -25
- package/docs/api/interfaces/StoreCategory.md +5 -5
- package/docs/api/interfaces/StoreCategoryPublicMeta.md +5 -5
- package/docs/api/interfaces/StoreItem.md +19 -19
- package/docs/api/interfaces/StoreItemPublicMeta.md +51 -51
- package/docs/api/interfaces/TAchCategory.md +5 -5
- package/docs/api/interfaces/TActivityLog.md +16 -16
- package/docs/api/interfaces/TAvatarCustomized.md +27 -0
- package/docs/api/interfaces/TAvatarDefinition.md +101 -0
- package/docs/api/interfaces/TAvatarPrompt.md +44 -0
- package/docs/api/interfaces/TBonus.md +22 -22
- package/docs/api/interfaces/TBuyStoreItemResult.md +3 -3
- package/docs/api/interfaces/TClaimBonusResult.md +6 -6
- package/docs/api/interfaces/TClan.md +79 -0
- package/docs/api/interfaces/TClanInfo.md +111 -0
- package/docs/api/interfaces/TClanJoinResult.md +15 -0
- package/docs/api/interfaces/TClanTournamentPlayers.md +71 -0
- package/docs/api/interfaces/TClans.md +27 -0
- package/docs/api/interfaces/TGetJackpotEligibleGamesResponse.md +1 -1
- package/docs/api/interfaces/TGetTranslations.md +3 -3
- package/docs/api/interfaces/TInboxMessage.md +13 -13
- package/docs/api/interfaces/TInboxMessageBody.md +28 -16
- package/docs/api/interfaces/TLevel.md +21 -23
- package/docs/api/interfaces/TLevelCurrent.md +32 -34
- package/docs/api/interfaces/TMiniGamePlayBatchResult.md +12 -12
- package/docs/api/interfaces/TMiniGamePlayResult.md +5 -5
- package/docs/api/interfaces/TMiniGamePrize.md +83 -83
- package/docs/api/interfaces/TMiniGameTemplate.md +81 -81
- package/docs/api/interfaces/TMissionClaimRewardResult.md +3 -3
- package/docs/api/interfaces/TMissionOptInResult.md +3 -3
- package/docs/api/interfaces/TMissionOrBadge.md +110 -110
- package/docs/api/interfaces/TMissionOrBadgeTask.md +15 -15
- package/docs/api/interfaces/TRaffle.md +25 -25
- package/docs/api/interfaces/TRaffleDraw.md +61 -61
- package/docs/api/interfaces/TRaffleDrawRun.md +39 -39
- package/docs/api/interfaces/TRaffleOptinResponse.md +4 -4
- package/docs/api/interfaces/TRafflePrize.md +35 -35
- package/docs/api/interfaces/TRafflePrizeWinner.md +13 -13
- package/docs/api/interfaces/TRaffleTicket.md +3 -3
- package/docs/api/interfaces/TSawHistory.md +15 -15
- package/docs/api/interfaces/TSegmentCheckResult.md +3 -3
- package/docs/api/interfaces/TSetAvatarResult.md +19 -0
- package/docs/api/interfaces/TStoreCategory.md +5 -5
- package/docs/api/interfaces/TStoreItem.md +77 -77
- package/docs/api/interfaces/TTournament.md +165 -97
- package/docs/api/interfaces/TTournamentDetailed.md +378 -140
- package/docs/api/interfaces/TTournamentRegistrationResult.md +3 -3
- package/docs/api/interfaces/TUICustomSection.md +52 -52
- package/docs/api/interfaces/TUserProfile.md +32 -32
- package/docs/api/interfaces/Tournament.md +87 -81
- package/docs/api/interfaces/TournamentPlayer.md +18 -18
- package/docs/api/interfaces/TournamentPrize.md +17 -17
- package/docs/api/interfaces/TournamentPublicMeta.md +47 -47
- package/docs/api/interfaces/TransformedRaffleClaimPrizeResponse.md +4 -4
- package/docs/api/interfaces/UICustomSection.md +50 -50
- package/docs/api/interfaces/UserAchievement.md +101 -101
- package/docs/api/interfaces/UserAchievementTask.md +38 -38
- package/docs/api/interfaces/UserLevelExtraCountersT.md +5 -5
- package/docs/api/type-aliases/TournamentRegistrationTypeName.md +3 -0
- package/docs/api/variables/AllRoundsGameBoardID.md +5 -0
- package/docs/api/variables/PrizeModifiersKeysNames.md +37 -0
- package/docs/api/variables/SAWWinSoundFiles.md +21 -0
- package/package.json +1 -1
- package/src/Base/ClassId.ts +12 -0
- package/src/Clans/Clan.ts +18 -0
- package/src/Clans/GetClanInfoRequest.ts +6 -0
- package/src/Clans/GetClanInfoResponse.ts +24 -0
- package/src/Clans/GetClanListRequest.ts +5 -0
- package/src/Clans/GetClanListResponse.ts +10 -0
- package/src/Clans/JoinClanRequest.ts +6 -0
- package/src/Clans/JoinClanResponse.ts +6 -0
- package/src/Clans/index.ts +7 -0
- package/src/Missions/MissionsUtils.ts +32 -4
- package/src/SmarticoAPI.ts +95 -0
- package/src/SmarticoLib/index.ts +163 -0
- package/src/Tournaments/GetClanTournamentPlayersRequest.ts +7 -0
- package/src/Tournaments/GetClanTournamentPlayersResponse.ts +58 -0
- package/src/Tournaments/GetTournamentInfoResponse.ts +52 -0
- package/src/Tournaments/Tournament.ts +2 -0
- package/src/Tournaments/TournamentClan.ts +30 -0
- package/src/Tournaments/index.ts +3 -0
- package/src/WSAPI/WSAPI.ts +61 -2
- package/src/WSAPI/WSAPITypes.ts +131 -0
- package/src/index.ts +2 -1
- package/tsconfig.json +5 -3
- package/docs/api/.nojekyll +0 -1
- package/docs/api/enums/AchCustomLayoutTheme.md +0 -25
- package/docs/api/enums/AchCustomSectionType.md +0 -79
- package/docs/api/enums/AchievementStatus.md +0 -49
- package/docs/api/enums/ActivityTypeLimited.md +0 -115
- package/docs/api/enums/BonusStatus.md +0 -37
- package/docs/api/enums/GamePickSportType.md +0 -375
- package/docs/api/enums/InboxMessageType.md +0 -55
- package/docs/api/enums/LiquidEntityData.md +0 -73
- package/docs/api/enums/MiniGamePrizeTypeName.md +0 -67
- package/docs/api/enums/PointChangeSourceType.md +0 -109
- package/docs/api/enums/PrizeModifiers.md +0 -49
- package/docs/api/enums/QuizAnswersValueType.md +0 -121
- package/docs/api/enums/SAWAcknowledgeTypeName.md +0 -25
- package/docs/api/enums/SAWBuyInType.md +0 -31
- package/docs/api/enums/SAWBuyInTypeName.md +0 -37
- package/docs/api/enums/SAWGPMarketType.md +0 -157
- package/docs/api/enums/SAWGameType.md +0 -73
- package/docs/api/enums/SAWGameTypeName.md +0 -79
- package/docs/api/enums/SAWPrizeType.md +0 -61
- package/docs/api/enums/SAWWinSoundType.md +0 -31
- package/docs/api/enums/StoreItemType.md +0 -37
- package/docs/api/enums/StoreItemTypeName.md +0 -43
- package/docs/api/enums/TournamentInstanceStatus.md +0 -43
- package/docs/api/enums/TournamentRegistrationError.md +0 -55
- package/docs/api/enums/TournamentRegistrationStatus.md +0 -43
- package/docs/api/enums/TournamentRegistrationStatusName.md +0 -49
- package/docs/api/enums/TournamentRegistrationType.md +0 -43
package/dist/index.js
CHANGED
|
@@ -92,6 +92,14 @@ exports.ClassId = void 0;
|
|
|
92
92
|
ClassId[ClassId["GET_AVATARS_CUSTOMIZED_RESPONSE"] = 563] = "GET_AVATARS_CUSTOMIZED_RESPONSE";
|
|
93
93
|
ClassId[ClassId["GET_AVATAR_PROMPTS_REQUEST"] = 564] = "GET_AVATAR_PROMPTS_REQUEST";
|
|
94
94
|
ClassId[ClassId["GET_AVATAR_PROMPTS_RESPONSE"] = 565] = "GET_AVATAR_PROMPTS_RESPONSE";
|
|
95
|
+
ClassId[ClassId["GET_CLAN_LIST_REQUEST"] = 570] = "GET_CLAN_LIST_REQUEST";
|
|
96
|
+
ClassId[ClassId["GET_CLAN_LIST_RESPONSE"] = 571] = "GET_CLAN_LIST_RESPONSE";
|
|
97
|
+
ClassId[ClassId["GET_CLAN_INFO_REQUEST"] = 572] = "GET_CLAN_INFO_REQUEST";
|
|
98
|
+
ClassId[ClassId["GET_CLAN_INFO_RESPONSE"] = 573] = "GET_CLAN_INFO_RESPONSE";
|
|
99
|
+
ClassId[ClassId["JOIN_CLAN_REQUEST"] = 574] = "JOIN_CLAN_REQUEST";
|
|
100
|
+
ClassId[ClassId["JOIN_CLAN_RESPONSE"] = 575] = "JOIN_CLAN_RESPONSE";
|
|
101
|
+
ClassId[ClassId["GET_CLAN_TOURNAMENT_PLAYERS_REQUEST"] = 576] = "GET_CLAN_TOURNAMENT_PLAYERS_REQUEST";
|
|
102
|
+
ClassId[ClassId["GET_CLAN_TOURNAMENT_PLAYERS_RESPONSE"] = 577] = "GET_CLAN_TOURNAMENT_PLAYERS_RESPONSE";
|
|
95
103
|
/*
|
|
96
104
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
97
105
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
@@ -1248,6 +1256,26 @@ exports.BadgesTimeLimitStates = void 0;
|
|
|
1248
1256
|
var _MissionUtils;
|
|
1249
1257
|
var USER_STATE_PARAMS_KEYS_GAMES = ['core_fav_game_top3', 'core_fav_game_type_top3', 'core_fav_game_provider_top3'];
|
|
1250
1258
|
var USER_STATE_PARAMS_KEYS_BET_AMOUNT = ['core_recommended_deposit_amount', 'core_recommended_casino_bet_amount', 'casino_last_bet_amount', 'casino_last_bet_amount_real', 'casino_last_bet_amount_bonus', 'acc_last_deposit_amount'];
|
|
1259
|
+
var MINOR_WORDS = new Set(['of', 'at', 'in', 'on', 'to', 'up', 'as', 'by', 'for', 'from', 'into', 'onto', 'with', 'upon', 'via', 'and', 'but', 'or', 'nor', 'so', 'yet', 'vs', 'v', 'a', 'an', 'the']);
|
|
1260
|
+
function toGameTitleCase(raw) {
|
|
1261
|
+
if (!raw) return raw;
|
|
1262
|
+
var tokens = raw.toLowerCase().split(/(\b\w+\b)/);
|
|
1263
|
+
var wordTokens = tokens.filter(function (t) {
|
|
1264
|
+
return /^\w+$/.test(t);
|
|
1265
|
+
});
|
|
1266
|
+
var lastWordIdx = wordTokens.length - 1;
|
|
1267
|
+
var wordIndex = 0;
|
|
1268
|
+
return tokens.map(function (token) {
|
|
1269
|
+
if (!/^\w+$/.test(token)) return token;
|
|
1270
|
+
var isFirst = wordIndex === 0;
|
|
1271
|
+
var isLast = wordIndex === lastWordIdx;
|
|
1272
|
+
wordIndex++;
|
|
1273
|
+
if (isFirst || isLast || !MINOR_WORDS.has(token)) {
|
|
1274
|
+
return token.charAt(0).toUpperCase() + token.slice(1);
|
|
1275
|
+
}
|
|
1276
|
+
return token;
|
|
1277
|
+
}).join('');
|
|
1278
|
+
}
|
|
1251
1279
|
var MissionUtils = function MissionUtils() {};
|
|
1252
1280
|
_MissionUtils = MissionUtils;
|
|
1253
1281
|
MissionUtils.getAvailabilityStatus = function (mission) {
|
|
@@ -1424,8 +1452,8 @@ MissionUtils.replaceTagsFavMissionTask = function (_ref) {
|
|
|
1424
1452
|
});
|
|
1425
1453
|
if (value && value.length > 0) {
|
|
1426
1454
|
suggestedGames = value.map(function (v) {
|
|
1427
|
-
var cleaned = v.replace(/_/g, ' ')
|
|
1428
|
-
return
|
|
1455
|
+
var cleaned = v.replace(/_/g, ' ');
|
|
1456
|
+
return toGameTitleCase(cleaned);
|
|
1429
1457
|
}).join(', ');
|
|
1430
1458
|
}
|
|
1431
1459
|
}
|
|
@@ -1435,8 +1463,7 @@ MissionUtils.replaceTagsFavMissionTask = function (_ref) {
|
|
|
1435
1463
|
if (IntUtils.isNotNull(pos) && _value && _value[pos]) {
|
|
1436
1464
|
suggestedGames = _value[pos];
|
|
1437
1465
|
if (suggestedGames) {
|
|
1438
|
-
suggestedGames = suggestedGames.replace(
|
|
1439
|
-
suggestedGames = suggestedGames.charAt(0).toUpperCase() + suggestedGames.slice(1);
|
|
1466
|
+
suggestedGames = toGameTitleCase(suggestedGames.replace(/_/g, ' '));
|
|
1440
1467
|
}
|
|
1441
1468
|
}
|
|
1442
1469
|
}
|
|
@@ -1667,6 +1694,29 @@ exports.MissionCategory = void 0;
|
|
|
1667
1694
|
MissionCategory[MissionCategory["Missed"] = 5] = "Missed";
|
|
1668
1695
|
})(exports.MissionCategory || (exports.MissionCategory = {}));
|
|
1669
1696
|
|
|
1697
|
+
var clanTournamentPlayersTransform = function clanTournamentPlayersTransform(response) {
|
|
1698
|
+
return {
|
|
1699
|
+
clan_id: response.clan_id,
|
|
1700
|
+
clan_public_meta: {
|
|
1701
|
+
name: response.clan_public_meta.name,
|
|
1702
|
+
image_url: response.clan_public_meta.image_url
|
|
1703
|
+
},
|
|
1704
|
+
players: (response.players || []).map(function (p) {
|
|
1705
|
+
return {
|
|
1706
|
+
user_id: p.user_id,
|
|
1707
|
+
public_username: p.public_username,
|
|
1708
|
+
avatar_id: p.avatar_id,
|
|
1709
|
+
avatar_real_id: p.avatar_real_id,
|
|
1710
|
+
avatar_url: p.avatar_url,
|
|
1711
|
+
position: p.position,
|
|
1712
|
+
scores: p.scores,
|
|
1713
|
+
is_me: p.is_me,
|
|
1714
|
+
clean_ext_user_id: p.clean_ext_user_id
|
|
1715
|
+
};
|
|
1716
|
+
})
|
|
1717
|
+
};
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1670
1720
|
exports.TournamentRegistrationType = void 0;
|
|
1671
1721
|
(function (TournamentRegistrationType) {
|
|
1672
1722
|
TournamentRegistrationType[TournamentRegistrationType["AUTO"] = 1] = "AUTO";
|
|
@@ -1857,6 +1907,7 @@ var TournamentItemsTransform = function TournamentItemsTransform(items) {
|
|
|
1857
1907
|
};
|
|
1858
1908
|
|
|
1859
1909
|
var tournamentInfoItemTransform = function tournamentInfoItemTransform(t) {
|
|
1910
|
+
var _t$tournamentInfo;
|
|
1860
1911
|
var response = _extends({}, TournamentItemsTransform([t.tournamentInfo.tournamentLobbyInfo])[0], {
|
|
1861
1912
|
related_games: (t.tournamentInfo.tournamentLobbyInfo.related_games || []).map(function (g, i) {
|
|
1862
1913
|
return {
|
|
@@ -1885,6 +1936,53 @@ var tournamentInfoItemTransform = function tournamentInfoItemTransform(t) {
|
|
|
1885
1936
|
if (t.userPosition) {
|
|
1886
1937
|
response.me = TournamentUtils.getPlayerTransformed(t.userPosition, true);
|
|
1887
1938
|
}
|
|
1939
|
+
if ((_t$tournamentInfo = t.tournamentInfo) != null && (_t$tournamentInfo = _t$tournamentInfo.tournamentLobbyInfo) != null && _t$tournamentInfo.isClanBased) {
|
|
1940
|
+
var _t$userClanId;
|
|
1941
|
+
response.is_clan_based = true;
|
|
1942
|
+
response.user_clan_id = (_t$userClanId = t.userClanId) != null ? _t$userClanId : null;
|
|
1943
|
+
response.clan_leaderboard = t.clanLeaderboard ? t.clanLeaderboard.map(function (entry) {
|
|
1944
|
+
return {
|
|
1945
|
+
clan_id: entry.clan_id,
|
|
1946
|
+
public_meta: {
|
|
1947
|
+
name: entry.public_meta.name,
|
|
1948
|
+
description: entry.public_meta.description,
|
|
1949
|
+
image_url: entry.public_meta.image_url
|
|
1950
|
+
},
|
|
1951
|
+
position: entry.position,
|
|
1952
|
+
total_score: entry.total_score,
|
|
1953
|
+
contributing_members: entry.contributing_members
|
|
1954
|
+
};
|
|
1955
|
+
}) : null;
|
|
1956
|
+
response.clan_prize_structure = t.clanPrizes ? t.clanPrizes.map(function (entry) {
|
|
1957
|
+
return {
|
|
1958
|
+
clan_place: entry.clan_place,
|
|
1959
|
+
prize_type_id: entry.prize_type_id,
|
|
1960
|
+
prize_pool_amount: entry.prize_pool_amount,
|
|
1961
|
+
activity_type_id: entry.activity_type_id,
|
|
1962
|
+
details_json: entry.details_json,
|
|
1963
|
+
public_meta: entry.public_meta ? {
|
|
1964
|
+
name: entry.public_meta.name,
|
|
1965
|
+
description: entry.public_meta.description,
|
|
1966
|
+
image_url: entry.public_meta.image_url
|
|
1967
|
+
} : null,
|
|
1968
|
+
tiers: (entry.tiers || []).map(function (tier) {
|
|
1969
|
+
return {
|
|
1970
|
+
player_place_from: tier.player_place_from,
|
|
1971
|
+
player_place_to: tier.player_place_to,
|
|
1972
|
+
pool_amount: tier.pool_amount,
|
|
1973
|
+
distribution_type: tier.distribution_type,
|
|
1974
|
+
activity_type_id: tier.activity_type_id,
|
|
1975
|
+
details_json: tier.details_json,
|
|
1976
|
+
public_meta: tier.public_meta ? {
|
|
1977
|
+
name: tier.public_meta.name,
|
|
1978
|
+
description: tier.public_meta.description,
|
|
1979
|
+
image_url: tier.public_meta.image_url
|
|
1980
|
+
} : null
|
|
1981
|
+
};
|
|
1982
|
+
})
|
|
1983
|
+
};
|
|
1984
|
+
}) : null;
|
|
1985
|
+
}
|
|
1888
1986
|
return response;
|
|
1889
1987
|
};
|
|
1890
1988
|
|
|
@@ -2217,6 +2315,7 @@ var onUpdateContextKey;
|
|
|
2217
2315
|
onUpdateContextKey["Pots"] = "Pots";
|
|
2218
2316
|
onUpdateContextKey["CustomSections"] = "customSections";
|
|
2219
2317
|
onUpdateContextKey["Bonuses"] = "bonuses";
|
|
2318
|
+
onUpdateContextKey["Clans"] = "clans";
|
|
2220
2319
|
onUpdateContextKey["SAWHistory"] = "sawHistory";
|
|
2221
2320
|
onUpdateContextKey["JackpotWinners"] = "jackpotWinners";
|
|
2222
2321
|
onUpdateContextKey["Raffles"] = "raffles";
|
|
@@ -2985,6 +3084,57 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2985
3084
|
return Promise.reject(e);
|
|
2986
3085
|
}
|
|
2987
3086
|
}
|
|
3087
|
+
/**
|
|
3088
|
+
* Returns clans list payload for the current user.
|
|
3089
|
+
* The returned payload is cached for 30 seconds.
|
|
3090
|
+
* If onUpdate is passed, it will be called when clans response is received.
|
|
3091
|
+
*
|
|
3092
|
+
* **Visitor mode: not supported**
|
|
3093
|
+
*/
|
|
3094
|
+
;
|
|
3095
|
+
_proto.getClans = function getClans(_temp9) {
|
|
3096
|
+
var _ref0 = _temp9 === void 0 ? {} : _temp9,
|
|
3097
|
+
onUpdate = _ref0.onUpdate;
|
|
3098
|
+
try {
|
|
3099
|
+
var _this23 = this;
|
|
3100
|
+
if (onUpdate) {
|
|
3101
|
+
_this23.onUpdateCallback.set(onUpdateContextKey.Clans, onUpdate);
|
|
3102
|
+
}
|
|
3103
|
+
return Promise.resolve(OCache.use(onUpdateContextKey.Clans, exports.ECacheContext.WSAPI, function () {
|
|
3104
|
+
return _this23.api.clansGetListT(_this23.userExtId);
|
|
3105
|
+
}, CACHE_DATA_SEC));
|
|
3106
|
+
} catch (e) {
|
|
3107
|
+
return Promise.reject(e);
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
/**
|
|
3111
|
+
* Returns detailed information for a specific clan including its members.
|
|
3112
|
+
*
|
|
3113
|
+
* **Visitor mode: not supported**
|
|
3114
|
+
*/
|
|
3115
|
+
;
|
|
3116
|
+
_proto.getClanInfo = function getClanInfo(clanId) {
|
|
3117
|
+
try {
|
|
3118
|
+
var _this24 = this;
|
|
3119
|
+
return Promise.resolve(_this24.api.clansGetInfoT(_this24.userExtId, clanId));
|
|
3120
|
+
} catch (e) {
|
|
3121
|
+
return Promise.reject(e);
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
/**
|
|
3125
|
+
* Joins a clan on behalf of the current user.
|
|
3126
|
+
*
|
|
3127
|
+
* **Visitor mode: not supported**
|
|
3128
|
+
*/
|
|
3129
|
+
;
|
|
3130
|
+
_proto.joinClan = function joinClan(clanId) {
|
|
3131
|
+
try {
|
|
3132
|
+
var _this25 = this;
|
|
3133
|
+
return Promise.resolve(_this25.api.clanJoin(_this25.userExtId, clanId));
|
|
3134
|
+
} catch (e) {
|
|
3135
|
+
return Promise.reject(e);
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
2988
3138
|
/**
|
|
2989
3139
|
* Returns detailed information for a specific tournament instance; the response includes tournament info and the leaderboard of players
|
|
2990
3140
|
*
|
|
@@ -3013,8 +3163,22 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3013
3163
|
;
|
|
3014
3164
|
_proto.getTournamentInstanceInfo = function getTournamentInstanceInfo(tournamentInstanceId) {
|
|
3015
3165
|
try {
|
|
3016
|
-
var
|
|
3017
|
-
return Promise.resolve(
|
|
3166
|
+
var _this26 = this;
|
|
3167
|
+
return Promise.resolve(_this26.api.tournamentsGetInfoT(_this26.userExtId, tournamentInstanceId));
|
|
3168
|
+
} catch (e) {
|
|
3169
|
+
return Promise.reject(e);
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
/**
|
|
3173
|
+
* Returns the players of a specific clan in a clan-based tournament.
|
|
3174
|
+
*
|
|
3175
|
+
* **Visitor mode: not supported**
|
|
3176
|
+
*/
|
|
3177
|
+
;
|
|
3178
|
+
_proto.getClanTournamentPlayers = function getClanTournamentPlayers(tournamentInstanceId, clanId) {
|
|
3179
|
+
try {
|
|
3180
|
+
var _this27 = this;
|
|
3181
|
+
return Promise.resolve(_this27.api.clanTournamentGetPlayers(_this27.userExtId, tournamentInstanceId, clanId));
|
|
3018
3182
|
} catch (e) {
|
|
3019
3183
|
return Promise.reject(e);
|
|
3020
3184
|
}
|
|
@@ -3027,8 +3191,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3027
3191
|
;
|
|
3028
3192
|
_proto.registerInTournament = function registerInTournament(tournamentInstanceId) {
|
|
3029
3193
|
try {
|
|
3030
|
-
var
|
|
3031
|
-
return Promise.resolve(
|
|
3194
|
+
var _this28 = this;
|
|
3195
|
+
return Promise.resolve(_this28.api.registerInTournament(_this28.userExtId, tournamentInstanceId)).then(function (r) {
|
|
3032
3196
|
var o = {
|
|
3033
3197
|
err_code: r.errCode,
|
|
3034
3198
|
err_message: r.errMsg
|
|
@@ -3060,9 +3224,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3060
3224
|
;
|
|
3061
3225
|
_proto.getLeaderBoard = function getLeaderBoard(periodType, getPreviousPeriod) {
|
|
3062
3226
|
try {
|
|
3063
|
-
var
|
|
3227
|
+
var _this29 = this;
|
|
3064
3228
|
return Promise.resolve(OCache.use(onUpdateContextKey.LeaderBoards, exports.ECacheContext.WSAPI, function () {
|
|
3065
|
-
return
|
|
3229
|
+
return _this29.api.leaderboardsGetT(_this29.userExtId, periodType, getPreviousPeriod);
|
|
3066
3230
|
}, CACHE_DATA_SEC));
|
|
3067
3231
|
} catch (e) {
|
|
3068
3232
|
return Promise.reject(e);
|
|
@@ -3083,20 +3247,20 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3083
3247
|
* @param params
|
|
3084
3248
|
*/
|
|
3085
3249
|
;
|
|
3086
|
-
_proto.getInboxMessages = function getInboxMessages(
|
|
3087
|
-
var
|
|
3088
|
-
from =
|
|
3089
|
-
to =
|
|
3090
|
-
onlyFavorite =
|
|
3091
|
-
categoryId =
|
|
3092
|
-
read_status =
|
|
3093
|
-
onUpdate =
|
|
3250
|
+
_proto.getInboxMessages = function getInboxMessages(_temp0) {
|
|
3251
|
+
var _ref1 = _temp0 === void 0 ? {} : _temp0,
|
|
3252
|
+
from = _ref1.from,
|
|
3253
|
+
to = _ref1.to,
|
|
3254
|
+
onlyFavorite = _ref1.onlyFavorite,
|
|
3255
|
+
categoryId = _ref1.categoryId,
|
|
3256
|
+
read_status = _ref1.read_status,
|
|
3257
|
+
onUpdate = _ref1.onUpdate;
|
|
3094
3258
|
try {
|
|
3095
|
-
var
|
|
3259
|
+
var _this30 = this;
|
|
3096
3260
|
if (onUpdate) {
|
|
3097
|
-
|
|
3261
|
+
_this30.onUpdateCallback.set(onUpdateContextKey.InboxMessages, onUpdate);
|
|
3098
3262
|
}
|
|
3099
|
-
return Promise.resolve(
|
|
3263
|
+
return Promise.resolve(_this30.api.getInboxMessagesT(_this30.userExtId, from, to, onlyFavorite, categoryId, read_status));
|
|
3100
3264
|
} catch (e) {
|
|
3101
3265
|
return Promise.reject(e);
|
|
3102
3266
|
}
|
|
@@ -3108,16 +3272,16 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3108
3272
|
* @param params
|
|
3109
3273
|
*/
|
|
3110
3274
|
;
|
|
3111
|
-
_proto.getInboxUnreadCount = function getInboxUnreadCount(
|
|
3112
|
-
var
|
|
3113
|
-
onUpdate =
|
|
3275
|
+
_proto.getInboxUnreadCount = function getInboxUnreadCount(_temp1) {
|
|
3276
|
+
var _ref10 = _temp1 === void 0 ? {} : _temp1,
|
|
3277
|
+
onUpdate = _ref10.onUpdate;
|
|
3114
3278
|
try {
|
|
3115
|
-
var
|
|
3279
|
+
var _this31 = this;
|
|
3116
3280
|
if (onUpdate) {
|
|
3117
|
-
|
|
3281
|
+
_this31.onUpdateCallback.set(onUpdateContextKey.InboxUnreadCount, onUpdate);
|
|
3118
3282
|
}
|
|
3119
3283
|
return Promise.resolve(OCache.use(onUpdateContextKey.InboxUnreadCount, exports.ECacheContext.WSAPI, function () {
|
|
3120
|
-
return
|
|
3284
|
+
return _this31.api.getInboxUnreadCountT(_this31.userExtId);
|
|
3121
3285
|
}, CACHE_DATA_SEC));
|
|
3122
3286
|
} catch (e) {
|
|
3123
3287
|
return Promise.reject(e);
|
|
@@ -3131,8 +3295,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3131
3295
|
;
|
|
3132
3296
|
_proto.getInboxMessageBody = function getInboxMessageBody(messageGuid) {
|
|
3133
3297
|
try {
|
|
3134
|
-
var
|
|
3135
|
-
return Promise.resolve(
|
|
3298
|
+
var _this32 = this;
|
|
3299
|
+
return Promise.resolve(_this32.api.getInboxMessageBodyT(messageGuid));
|
|
3136
3300
|
} catch (e) {
|
|
3137
3301
|
return Promise.reject(e);
|
|
3138
3302
|
}
|
|
@@ -3145,8 +3309,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3145
3309
|
;
|
|
3146
3310
|
_proto.markInboxMessageAsRead = function markInboxMessageAsRead(messageGuid) {
|
|
3147
3311
|
try {
|
|
3148
|
-
var
|
|
3149
|
-
return Promise.resolve(
|
|
3312
|
+
var _this33 = this;
|
|
3313
|
+
return Promise.resolve(_this33.api.markInboxMessageRead(_this33.userExtId, messageGuid)).then(function (r) {
|
|
3150
3314
|
return {
|
|
3151
3315
|
err_code: r.errCode,
|
|
3152
3316
|
err_message: r.errMsg
|
|
@@ -3164,8 +3328,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3164
3328
|
;
|
|
3165
3329
|
_proto.markAllInboxMessagesAsRead = function markAllInboxMessagesAsRead() {
|
|
3166
3330
|
try {
|
|
3167
|
-
var
|
|
3168
|
-
return Promise.resolve(
|
|
3331
|
+
var _this34 = this;
|
|
3332
|
+
return Promise.resolve(_this34.api.markAllInboxMessageRead(_this34.userExtId)).then(function (r) {
|
|
3169
3333
|
return {
|
|
3170
3334
|
err_code: r.errCode,
|
|
3171
3335
|
err_message: r.errMsg
|
|
@@ -3183,8 +3347,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3183
3347
|
;
|
|
3184
3348
|
_proto.markUnmarkInboxMessageAsFavorite = function markUnmarkInboxMessageAsFavorite(messageGuid, mark) {
|
|
3185
3349
|
try {
|
|
3186
|
-
var
|
|
3187
|
-
return Promise.resolve(
|
|
3350
|
+
var _this35 = this;
|
|
3351
|
+
return Promise.resolve(_this35.api.markUnmarkInboxMessageAsFavorite(_this35.userExtId, messageGuid, mark)).then(function (r) {
|
|
3188
3352
|
return {
|
|
3189
3353
|
err_code: r.errCode,
|
|
3190
3354
|
err_message: r.errMsg
|
|
@@ -3202,8 +3366,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3202
3366
|
;
|
|
3203
3367
|
_proto.deleteInboxMessage = function deleteInboxMessage(messageGuid) {
|
|
3204
3368
|
try {
|
|
3205
|
-
var
|
|
3206
|
-
return Promise.resolve(
|
|
3369
|
+
var _this36 = this;
|
|
3370
|
+
return Promise.resolve(_this36.api.deleteInboxMessage(_this36.userExtId, messageGuid)).then(function (r) {
|
|
3207
3371
|
return {
|
|
3208
3372
|
err_code: r.errCode,
|
|
3209
3373
|
err_message: r.errMsg
|
|
@@ -3221,8 +3385,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3221
3385
|
;
|
|
3222
3386
|
_proto.deleteAllInboxMessages = function deleteAllInboxMessages() {
|
|
3223
3387
|
try {
|
|
3224
|
-
var
|
|
3225
|
-
return Promise.resolve(
|
|
3388
|
+
var _this37 = this;
|
|
3389
|
+
return Promise.resolve(_this37.api.deleteAllInboxMessages(_this37.userExtId)).then(function (r) {
|
|
3226
3390
|
return {
|
|
3227
3391
|
err_code: r.errCode,
|
|
3228
3392
|
err_message: r.errMsg
|
|
@@ -3238,8 +3402,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3238
3402
|
;
|
|
3239
3403
|
_proto.getTranslations = function getTranslations(lang_code) {
|
|
3240
3404
|
try {
|
|
3241
|
-
var
|
|
3242
|
-
return Promise.resolve(
|
|
3405
|
+
var _this38 = this;
|
|
3406
|
+
return Promise.resolve(_this38.api.getTranslationsT(_this38.userExtId, lang_code, [])).then(function (r) {
|
|
3243
3407
|
return {
|
|
3244
3408
|
translations: r.translations
|
|
3245
3409
|
};
|
|
@@ -3263,13 +3427,14 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3263
3427
|
*
|
|
3264
3428
|
* **Visitor mode: not supported**
|
|
3265
3429
|
*
|
|
3430
|
+
* @param params - Event parameters
|
|
3266
3431
|
* @param params.engagement_uid - Unique identifier for the engagement
|
|
3267
3432
|
* @param params.activityType - Type of engagement activity (Popup=30, Inbox=31)
|
|
3268
3433
|
*/
|
|
3269
3434
|
;
|
|
3270
|
-
_proto.reportImpressionEvent = function reportImpressionEvent(
|
|
3271
|
-
var engagement_uid =
|
|
3272
|
-
activityType =
|
|
3435
|
+
_proto.reportImpressionEvent = function reportImpressionEvent(_ref11) {
|
|
3436
|
+
var engagement_uid = _ref11.engagement_uid,
|
|
3437
|
+
activityType = _ref11.activityType;
|
|
3273
3438
|
this.api.reportEngagementImpression(this.userExtId, engagement_uid, activityType);
|
|
3274
3439
|
}
|
|
3275
3440
|
/**
|
|
@@ -3289,14 +3454,15 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3289
3454
|
*
|
|
3290
3455
|
* **Visitor mode: not supported**
|
|
3291
3456
|
*
|
|
3457
|
+
* @param params - Event parameters
|
|
3292
3458
|
* @param params.engagement_uid - Unique identifier for the engagement
|
|
3293
3459
|
* @param params.activityType - Type of engagement activity (Popup=30, Inbox=31)
|
|
3294
3460
|
* @param params.action - Optional action/deeplink that was triggered by the user interaction
|
|
3295
3461
|
*/;
|
|
3296
|
-
_proto.reportClickEvent = function reportClickEvent(
|
|
3297
|
-
var engagement_uid =
|
|
3298
|
-
activityType =
|
|
3299
|
-
action =
|
|
3462
|
+
_proto.reportClickEvent = function reportClickEvent(_ref12) {
|
|
3463
|
+
var engagement_uid = _ref12.engagement_uid,
|
|
3464
|
+
activityType = _ref12.activityType,
|
|
3465
|
+
action = _ref12.action;
|
|
3300
3466
|
this.api.reportEngagementAction(this.userExtId, engagement_uid, activityType, action);
|
|
3301
3467
|
}
|
|
3302
3468
|
/**
|
|
@@ -3324,25 +3490,26 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3324
3490
|
*
|
|
3325
3491
|
* **Visitor mode: not supported**
|
|
3326
3492
|
*
|
|
3493
|
+
* @param params - Activity log parameters
|
|
3327
3494
|
* @param params.startTimeSeconds - Start time in seconds (epoch timestamp)
|
|
3328
3495
|
* @param params.endTimeSeconds - End time in seconds (epoch timestamp)
|
|
3329
3496
|
* @param params.from - Start index of records to return
|
|
3330
3497
|
* @param params.to - End index of records to return
|
|
3331
3498
|
* @param params.onUpdate - Optional callback function that will be called when the activity log is updated
|
|
3332
3499
|
*/;
|
|
3333
|
-
_proto.getActivityLog = function getActivityLog(
|
|
3334
|
-
var startTimeSeconds =
|
|
3335
|
-
endTimeSeconds =
|
|
3336
|
-
from =
|
|
3337
|
-
to =
|
|
3338
|
-
onUpdate =
|
|
3500
|
+
_proto.getActivityLog = function getActivityLog(_ref13) {
|
|
3501
|
+
var startTimeSeconds = _ref13.startTimeSeconds,
|
|
3502
|
+
endTimeSeconds = _ref13.endTimeSeconds,
|
|
3503
|
+
from = _ref13.from,
|
|
3504
|
+
to = _ref13.to,
|
|
3505
|
+
onUpdate = _ref13.onUpdate;
|
|
3339
3506
|
try {
|
|
3340
|
-
var
|
|
3507
|
+
var _this39 = this;
|
|
3341
3508
|
if (onUpdate) {
|
|
3342
|
-
|
|
3509
|
+
_this39.onUpdateCallback.set(onUpdateContextKey.ActivityLog, onUpdate);
|
|
3343
3510
|
}
|
|
3344
3511
|
return Promise.resolve(OCache.use(onUpdateContextKey.ActivityLog, exports.ECacheContext.WSAPI, function () {
|
|
3345
|
-
return
|
|
3512
|
+
return _this39.api.getActivityLogT(_this39.userExtId, startTimeSeconds, endTimeSeconds, from, to);
|
|
3346
3513
|
}, CACHE_DATA_SEC));
|
|
3347
3514
|
} catch (e) {
|
|
3348
3515
|
return Promise.reject(e);
|
|
@@ -3384,11 +3551,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3384
3551
|
;
|
|
3385
3552
|
_proto.gamePickGetActiveRounds = function gamePickGetActiveRounds(props) {
|
|
3386
3553
|
try {
|
|
3387
|
-
var
|
|
3554
|
+
var _this40 = this;
|
|
3388
3555
|
if (!props.saw_template_id) {
|
|
3389
3556
|
throw new Error('saw_template_id is required');
|
|
3390
3557
|
}
|
|
3391
|
-
return Promise.resolve(
|
|
3558
|
+
return Promise.resolve(_this40.api.gpGetActiveRounds(props.saw_template_id));
|
|
3392
3559
|
} catch (e) {
|
|
3393
3560
|
return Promise.reject(e);
|
|
3394
3561
|
}
|
|
@@ -3421,14 +3588,14 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3421
3588
|
;
|
|
3422
3589
|
_proto.gamePickGetActiveRound = function gamePickGetActiveRound(props) {
|
|
3423
3590
|
try {
|
|
3424
|
-
var
|
|
3591
|
+
var _this41 = this;
|
|
3425
3592
|
if (!props.saw_template_id) {
|
|
3426
3593
|
throw new Error('saw_template_id is required');
|
|
3427
3594
|
}
|
|
3428
3595
|
if (!props.round_id) {
|
|
3429
3596
|
throw new Error('round_id is required');
|
|
3430
3597
|
}
|
|
3431
|
-
return Promise.resolve(
|
|
3598
|
+
return Promise.resolve(_this41.api.gpGetActiveRound(props.saw_template_id, props.round_id));
|
|
3432
3599
|
} catch (e) {
|
|
3433
3600
|
return Promise.reject(e);
|
|
3434
3601
|
}
|
|
@@ -3461,11 +3628,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3461
3628
|
;
|
|
3462
3629
|
_proto.gamePickGetHistory = function gamePickGetHistory(props) {
|
|
3463
3630
|
try {
|
|
3464
|
-
var
|
|
3631
|
+
var _this42 = this;
|
|
3465
3632
|
if (!props.saw_template_id) {
|
|
3466
3633
|
throw new Error('saw_template_id is required');
|
|
3467
3634
|
}
|
|
3468
|
-
return Promise.resolve(
|
|
3635
|
+
return Promise.resolve(_this42.api.gpGetGamesHistory(props.saw_template_id));
|
|
3469
3636
|
} catch (e) {
|
|
3470
3637
|
return Promise.reject(e);
|
|
3471
3638
|
}
|
|
@@ -3505,14 +3672,14 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3505
3672
|
;
|
|
3506
3673
|
_proto.gamePickGetBoard = function gamePickGetBoard(props) {
|
|
3507
3674
|
try {
|
|
3508
|
-
var
|
|
3675
|
+
var _this43 = this;
|
|
3509
3676
|
if (!props.saw_template_id) {
|
|
3510
3677
|
throw new Error('saw_template_id is required');
|
|
3511
3678
|
}
|
|
3512
3679
|
if (!props.round_id) {
|
|
3513
3680
|
throw new Error('round_id is required');
|
|
3514
3681
|
}
|
|
3515
|
-
return Promise.resolve(
|
|
3682
|
+
return Promise.resolve(_this43.api.gpGetGameBoard(props.saw_template_id, props.round_id));
|
|
3516
3683
|
} catch (e) {
|
|
3517
3684
|
return Promise.reject(e);
|
|
3518
3685
|
}
|
|
@@ -3560,14 +3727,14 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3560
3727
|
_proto.gamePickSubmitSelection = function gamePickSubmitSelection(props) {
|
|
3561
3728
|
try {
|
|
3562
3729
|
var _props$round;
|
|
3563
|
-
var
|
|
3730
|
+
var _this44 = this;
|
|
3564
3731
|
if (!props.saw_template_id) {
|
|
3565
3732
|
throw new Error('saw_template_id is required');
|
|
3566
3733
|
}
|
|
3567
3734
|
if (!((_props$round = props.round) != null && _props$round.round_id)) {
|
|
3568
3735
|
throw new Error('round is required');
|
|
3569
3736
|
}
|
|
3570
|
-
return Promise.resolve(
|
|
3737
|
+
return Promise.resolve(_this44.api.gpSubmitSelection(props.saw_template_id, props.round, false));
|
|
3571
3738
|
} catch (e) {
|
|
3572
3739
|
return Promise.reject(e);
|
|
3573
3740
|
}
|
|
@@ -3614,14 +3781,14 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3614
3781
|
_proto.gamePickSubmitSelectionQuiz = function gamePickSubmitSelectionQuiz(props) {
|
|
3615
3782
|
try {
|
|
3616
3783
|
var _props$round2;
|
|
3617
|
-
var
|
|
3784
|
+
var _this45 = this;
|
|
3618
3785
|
if (!props.saw_template_id) {
|
|
3619
3786
|
throw new Error('saw_template_id is required');
|
|
3620
3787
|
}
|
|
3621
3788
|
if (!((_props$round2 = props.round) != null && _props$round2.round_id)) {
|
|
3622
3789
|
throw new Error('round is required');
|
|
3623
3790
|
}
|
|
3624
|
-
return Promise.resolve(
|
|
3791
|
+
return Promise.resolve(_this45.api.gpSubmitSelection(props.saw_template_id, props.round, true));
|
|
3625
3792
|
} catch (e) {
|
|
3626
3793
|
return Promise.reject(e);
|
|
3627
3794
|
}
|
|
@@ -3660,11 +3827,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3660
3827
|
;
|
|
3661
3828
|
_proto.gamePickGetUserInfo = function gamePickGetUserInfo(props) {
|
|
3662
3829
|
try {
|
|
3663
|
-
var
|
|
3830
|
+
var _this46 = this;
|
|
3664
3831
|
if (!props.saw_template_id) {
|
|
3665
3832
|
throw new Error('saw_template_id is required');
|
|
3666
3833
|
}
|
|
3667
|
-
return Promise.resolve(
|
|
3834
|
+
return Promise.resolve(_this46.api.gpGetUserInfo(props.saw_template_id));
|
|
3668
3835
|
} catch (e) {
|
|
3669
3836
|
return Promise.reject(e);
|
|
3670
3837
|
}
|
|
@@ -3706,11 +3873,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3706
3873
|
;
|
|
3707
3874
|
_proto.gamePickGetGameInfo = function gamePickGetGameInfo(props) {
|
|
3708
3875
|
try {
|
|
3709
|
-
var
|
|
3876
|
+
var _this47 = this;
|
|
3710
3877
|
if (!props.saw_template_id) {
|
|
3711
3878
|
throw new Error('saw_template_id is required');
|
|
3712
3879
|
}
|
|
3713
|
-
return Promise.resolve(
|
|
3880
|
+
return Promise.resolve(_this47.api.gpGetGameInfo(props.saw_template_id));
|
|
3714
3881
|
} catch (e) {
|
|
3715
3882
|
return Promise.reject(e);
|
|
3716
3883
|
}
|
|
@@ -3749,7 +3916,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3749
3916
|
;
|
|
3750
3917
|
_proto.gamePickGetRoundInfoForUser = function gamePickGetRoundInfoForUser(props) {
|
|
3751
3918
|
try {
|
|
3752
|
-
var
|
|
3919
|
+
var _this48 = this;
|
|
3753
3920
|
if (!props.saw_template_id) {
|
|
3754
3921
|
throw new Error('saw_template_id is required');
|
|
3755
3922
|
}
|
|
@@ -3759,7 +3926,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3759
3926
|
if (!props.int_user_id) {
|
|
3760
3927
|
throw new Error('int_user_id is required');
|
|
3761
3928
|
}
|
|
3762
|
-
return Promise.resolve(
|
|
3929
|
+
return Promise.resolve(_this48.api.gpGetRoundInfoForUser(props.saw_template_id, props.round_id, props.int_user_id));
|
|
3763
3930
|
} catch (e) {
|
|
3764
3931
|
return Promise.reject(e);
|
|
3765
3932
|
}
|
|
@@ -3782,9 +3949,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3782
3949
|
;
|
|
3783
3950
|
_proto.getAvatarsList = function getAvatarsList() {
|
|
3784
3951
|
try {
|
|
3785
|
-
var
|
|
3952
|
+
var _this49 = this;
|
|
3786
3953
|
return Promise.resolve(OCache.use(onUpdateContextKey.AvatarsList, exports.ECacheContext.WSAPI, function () {
|
|
3787
|
-
return
|
|
3954
|
+
return _this49.api.avatarsGetListT(_this49.userExtId);
|
|
3788
3955
|
}, CACHE_DATA_SEC));
|
|
3789
3956
|
} catch (e) {
|
|
3790
3957
|
return Promise.reject(e);
|
|
@@ -3807,9 +3974,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3807
3974
|
;
|
|
3808
3975
|
_proto.getAvatarsCustomized = function getAvatarsCustomized() {
|
|
3809
3976
|
try {
|
|
3810
|
-
var
|
|
3977
|
+
var _this50 = this;
|
|
3811
3978
|
return Promise.resolve(OCache.use(onUpdateContextKey.AvatarsCustomized, exports.ECacheContext.WSAPI, function () {
|
|
3812
|
-
return
|
|
3979
|
+
return _this50.api.avatarsGetCustomizedT(_this50.userExtId);
|
|
3813
3980
|
}, CACHE_DATA_SEC));
|
|
3814
3981
|
} catch (e) {
|
|
3815
3982
|
return Promise.reject(e);
|
|
@@ -3832,9 +3999,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3832
3999
|
;
|
|
3833
4000
|
_proto.getAvatarPrompts = function getAvatarPrompts() {
|
|
3834
4001
|
try {
|
|
3835
|
-
var
|
|
4002
|
+
var _this51 = this;
|
|
3836
4003
|
return Promise.resolve(OCache.use(onUpdateContextKey.AvatarPrompts, exports.ECacheContext.WSAPI, function () {
|
|
3837
|
-
return
|
|
4004
|
+
return _this51.api.avatarsGetPromptsT(_this51.userExtId);
|
|
3838
4005
|
}, CACHE_DATA_SEC));
|
|
3839
4006
|
} catch (e) {
|
|
3840
4007
|
return Promise.reject(e);
|
|
@@ -3866,14 +4033,14 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3866
4033
|
;
|
|
3867
4034
|
_proto.setAvatar = function setAvatar(props) {
|
|
3868
4035
|
try {
|
|
3869
|
-
var
|
|
4036
|
+
var _this52 = this;
|
|
3870
4037
|
if (!props.avatar_url) {
|
|
3871
4038
|
throw new Error('avatar_url is required');
|
|
3872
4039
|
}
|
|
3873
4040
|
if (!props.avatar_real_id) {
|
|
3874
4041
|
throw new Error('avatar_real_id is required');
|
|
3875
4042
|
}
|
|
3876
|
-
return Promise.resolve(
|
|
4043
|
+
return Promise.resolve(_this52.api.avatarSetAvatar(_this52.userExtId, props.avatar_url, props.avatar_real_id)).then(function (r) {
|
|
3877
4044
|
var _r$errCode;
|
|
3878
4045
|
OCache.clear(exports.ECacheContext.WSAPI, onUpdateContextKey.AvatarsList);
|
|
3879
4046
|
OCache.clear(exports.ECacheContext.WSAPI, onUpdateContextKey.AvatarsCustomized);
|
|
@@ -3888,15 +4055,15 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3888
4055
|
};
|
|
3889
4056
|
_proto.updateOnSpin = function updateOnSpin(data) {
|
|
3890
4057
|
try {
|
|
3891
|
-
var
|
|
4058
|
+
var _this53 = this;
|
|
3892
4059
|
return Promise.resolve(OCache.use(onUpdateContextKey.Saw, exports.ECacheContext.WSAPI, function () {
|
|
3893
|
-
return
|
|
4060
|
+
return _this53.api.sawGetTemplatesT(_this53.userExtId);
|
|
3894
4061
|
}, CACHE_DATA_SEC)).then(function (templates) {
|
|
3895
4062
|
var index = templates.findIndex(function (t) {
|
|
3896
4063
|
return t.id === data.saw_template_id;
|
|
3897
4064
|
});
|
|
3898
4065
|
templates[index].spin_count = data.spin_count;
|
|
3899
|
-
|
|
4066
|
+
_this53.updateEntity(onUpdateContextKey.Saw, templates);
|
|
3900
4067
|
});
|
|
3901
4068
|
} catch (e) {
|
|
3902
4069
|
return Promise.reject(e);
|
|
@@ -3904,9 +4071,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3904
4071
|
};
|
|
3905
4072
|
_proto.reloadMiniGameTemplate = function reloadMiniGameTemplate() {
|
|
3906
4073
|
try {
|
|
3907
|
-
var
|
|
3908
|
-
return Promise.resolve(
|
|
3909
|
-
|
|
4074
|
+
var _this54 = this;
|
|
4075
|
+
return Promise.resolve(_this54.api.sawGetTemplatesT(_this54.userExtId)).then(function (updatedTemplates) {
|
|
4076
|
+
_this54.updateEntity(onUpdateContextKey.Saw, updatedTemplates);
|
|
3910
4077
|
});
|
|
3911
4078
|
} catch (e) {
|
|
3912
4079
|
return Promise.reject(e);
|
|
@@ -3914,9 +4081,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3914
4081
|
};
|
|
3915
4082
|
_proto.updateMissions = function updateMissions() {
|
|
3916
4083
|
try {
|
|
3917
|
-
var
|
|
3918
|
-
return Promise.resolve(
|
|
3919
|
-
|
|
4084
|
+
var _this55 = this;
|
|
4085
|
+
return Promise.resolve(_this55.api.missionsGetItemsT(_this55.userExtId)).then(function (payload) {
|
|
4086
|
+
_this55.updateEntity(onUpdateContextKey.Missions, payload);
|
|
3920
4087
|
});
|
|
3921
4088
|
} catch (e) {
|
|
3922
4089
|
return Promise.reject(e);
|
|
@@ -3924,9 +4091,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3924
4091
|
};
|
|
3925
4092
|
_proto.updateBonuses = function updateBonuses() {
|
|
3926
4093
|
try {
|
|
3927
|
-
var
|
|
3928
|
-
return Promise.resolve(
|
|
3929
|
-
|
|
4094
|
+
var _this56 = this;
|
|
4095
|
+
return Promise.resolve(_this56.api.bonusesGetItemsT(_this56.userExtId)).then(function (payload) {
|
|
4096
|
+
_this56.updateEntity(onUpdateContextKey.Bonuses, payload);
|
|
3930
4097
|
});
|
|
3931
4098
|
} catch (e) {
|
|
3932
4099
|
return Promise.reject(e);
|
|
@@ -3934,9 +4101,19 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3934
4101
|
};
|
|
3935
4102
|
_proto.updateTournaments = function updateTournaments() {
|
|
3936
4103
|
try {
|
|
3937
|
-
var
|
|
3938
|
-
return Promise.resolve(
|
|
3939
|
-
|
|
4104
|
+
var _this57 = this;
|
|
4105
|
+
return Promise.resolve(_this57.api.tournamentsGetLobbyT(_this57.userExtId)).then(function (payload) {
|
|
4106
|
+
_this57.updateEntity(onUpdateContextKey.TournamentList, payload);
|
|
4107
|
+
});
|
|
4108
|
+
} catch (e) {
|
|
4109
|
+
return Promise.reject(e);
|
|
4110
|
+
}
|
|
4111
|
+
};
|
|
4112
|
+
_proto.updateClans = function updateClans() {
|
|
4113
|
+
try {
|
|
4114
|
+
var _this58 = this;
|
|
4115
|
+
return Promise.resolve(_this58.api.clansGetListT(_this58.userExtId)).then(function (payload) {
|
|
4116
|
+
_this58.updateEntity(onUpdateContextKey.Clans, payload);
|
|
3940
4117
|
});
|
|
3941
4118
|
} catch (e) {
|
|
3942
4119
|
return Promise.reject(e);
|
|
@@ -3944,9 +4121,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3944
4121
|
};
|
|
3945
4122
|
_proto.updateStorePurchasedItems = function updateStorePurchasedItems() {
|
|
3946
4123
|
try {
|
|
3947
|
-
var
|
|
3948
|
-
return Promise.resolve(
|
|
3949
|
-
|
|
4124
|
+
var _this59 = this;
|
|
4125
|
+
return Promise.resolve(_this59.api.storeGetPurchasedItemsT(_this59.userExtId, 20, 0)).then(function (payload) {
|
|
4126
|
+
_this59.updateEntity(onUpdateContextKey.StoreHistory, payload);
|
|
3950
4127
|
});
|
|
3951
4128
|
} catch (e) {
|
|
3952
4129
|
return Promise.reject(e);
|
|
@@ -3954,9 +4131,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3954
4131
|
};
|
|
3955
4132
|
_proto.updateStoreItems = function updateStoreItems() {
|
|
3956
4133
|
try {
|
|
3957
|
-
var
|
|
3958
|
-
return Promise.resolve(
|
|
3959
|
-
|
|
4134
|
+
var _this60 = this;
|
|
4135
|
+
return Promise.resolve(_this60.api.storeGetItemsT(_this60.userExtId)).then(function (payload) {
|
|
4136
|
+
_this60.updateEntity(onUpdateContextKey.StoreItems, payload);
|
|
3960
4137
|
});
|
|
3961
4138
|
} catch (e) {
|
|
3962
4139
|
return Promise.reject(e);
|
|
@@ -3964,8 +4141,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3964
4141
|
};
|
|
3965
4142
|
_proto.updateInboxUnreadCount = function updateInboxUnreadCount(count) {
|
|
3966
4143
|
try {
|
|
3967
|
-
var
|
|
3968
|
-
|
|
4144
|
+
var _this61 = this;
|
|
4145
|
+
_this61.updateEntity(onUpdateContextKey.InboxUnreadCount, count);
|
|
3969
4146
|
return Promise.resolve();
|
|
3970
4147
|
} catch (e) {
|
|
3971
4148
|
return Promise.reject(e);
|
|
@@ -3973,9 +4150,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3973
4150
|
};
|
|
3974
4151
|
_proto.updateInboxMessages = function updateInboxMessages() {
|
|
3975
4152
|
try {
|
|
3976
|
-
var
|
|
3977
|
-
return Promise.resolve(
|
|
3978
|
-
|
|
4153
|
+
var _this62 = this;
|
|
4154
|
+
return Promise.resolve(_this62.api.getInboxMessagesT(_this62.userExtId)).then(function (payload) {
|
|
4155
|
+
_this62.updateEntity(onUpdateContextKey.InboxMessages, payload);
|
|
3979
4156
|
});
|
|
3980
4157
|
} catch (e) {
|
|
3981
4158
|
return Promise.reject(e);
|
|
@@ -3983,9 +4160,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3983
4160
|
};
|
|
3984
4161
|
_proto.updateRaffles = function updateRaffles() {
|
|
3985
4162
|
try {
|
|
3986
|
-
var
|
|
3987
|
-
return Promise.resolve(
|
|
3988
|
-
|
|
4163
|
+
var _this63 = this;
|
|
4164
|
+
return Promise.resolve(_this63.api.getRafflesT(_this63.userExtId)).then(function (payload) {
|
|
4165
|
+
_this63.updateEntity(onUpdateContextKey.Raffles, payload);
|
|
3989
4166
|
});
|
|
3990
4167
|
} catch (e) {
|
|
3991
4168
|
return Promise.reject(e);
|
|
@@ -3993,11 +4170,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3993
4170
|
};
|
|
3994
4171
|
_proto.notifyActivityLogUpdate = function notifyActivityLogUpdate() {
|
|
3995
4172
|
try {
|
|
3996
|
-
var
|
|
4173
|
+
var _this64 = this;
|
|
3997
4174
|
var startSeconds = Date.now() / 1000 - 600;
|
|
3998
4175
|
var endSeconds = Date.now() / 1000;
|
|
3999
|
-
return Promise.resolve(
|
|
4000
|
-
|
|
4176
|
+
return Promise.resolve(_this64.api.getActivityLogT(_this64.userExtId, startSeconds, endSeconds, 0, 50)).then(function (payload) {
|
|
4177
|
+
_this64.updateEntity(onUpdateContextKey.ActivityLog, payload);
|
|
4001
4178
|
});
|
|
4002
4179
|
} catch (e) {
|
|
4003
4180
|
return Promise.reject(e);
|
|
@@ -4005,9 +4182,9 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4005
4182
|
};
|
|
4006
4183
|
_proto.updateEntity = function updateEntity(contextKey, payload) {
|
|
4007
4184
|
try {
|
|
4008
|
-
var
|
|
4185
|
+
var _this65 = this;
|
|
4009
4186
|
OCache.set(contextKey, payload, exports.ECacheContext.WSAPI);
|
|
4010
|
-
var onUpdate =
|
|
4187
|
+
var onUpdate = _this65.onUpdateCallback.get(contextKey);
|
|
4011
4188
|
if (onUpdate) {
|
|
4012
4189
|
onUpdate(payload);
|
|
4013
4190
|
}
|
|
@@ -4048,17 +4225,17 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4048
4225
|
;
|
|
4049
4226
|
_proto.jackpotGet = function jackpotGet(filter) {
|
|
4050
4227
|
try {
|
|
4051
|
-
var
|
|
4228
|
+
var _this66 = this;
|
|
4052
4229
|
var signature = (filter == null ? void 0 : filter.jp_template_id) + ":" + (filter == null ? void 0 : filter.related_game_id);
|
|
4053
|
-
if (signature !==
|
|
4054
|
-
|
|
4055
|
-
|
|
4230
|
+
if (signature !== _this66.jackpotGetSignature) {
|
|
4231
|
+
_this66.jackpotGetSignature = signature;
|
|
4232
|
+
_this66.jackpotClearCache();
|
|
4056
4233
|
}
|
|
4057
4234
|
var jackpots = [];
|
|
4058
4235
|
var pots = [];
|
|
4059
4236
|
return Promise.resolve(OCache.use(onUpdateContextKey.Jackpots, exports.ECacheContext.WSAPI, function () {
|
|
4060
4237
|
try {
|
|
4061
|
-
return Promise.resolve(
|
|
4238
|
+
return Promise.resolve(_this66.api.jackpotGet(_this66.userExtId, filter)).then(function (_jackpots) {
|
|
4062
4239
|
var _pots = _jackpots.items.map(function (jp) {
|
|
4063
4240
|
return jp.pot;
|
|
4064
4241
|
});
|
|
@@ -4072,7 +4249,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4072
4249
|
return Promise.reject(e);
|
|
4073
4250
|
}
|
|
4074
4251
|
}, JACKPOT_TEMPLATE_CACHE_SEC)).then(function (_OCache$use2) {
|
|
4075
|
-
function
|
|
4252
|
+
function _temp11() {
|
|
4076
4253
|
return jackpots.map(function (jp) {
|
|
4077
4254
|
var _jp = _extends({}, jp, {
|
|
4078
4255
|
pot: pots.find(function (p) {
|
|
@@ -4083,17 +4260,17 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4083
4260
|
});
|
|
4084
4261
|
}
|
|
4085
4262
|
jackpots = _OCache$use2;
|
|
4086
|
-
var
|
|
4263
|
+
var _temp10 = function () {
|
|
4087
4264
|
if (jackpots.length > 0) {
|
|
4088
4265
|
return Promise.resolve(OCache.use(onUpdateContextKey.Pots, exports.ECacheContext.WSAPI, function () {
|
|
4089
4266
|
try {
|
|
4090
4267
|
var jp_template_ids = jackpots.map(function (jp) {
|
|
4091
4268
|
return jp.jp_template_id;
|
|
4092
4269
|
});
|
|
4093
|
-
return Promise.resolve(
|
|
4270
|
+
return Promise.resolve(_this66.api.potGet(_this66.userExtId, {
|
|
4094
4271
|
jp_template_ids: jp_template_ids
|
|
4095
|
-
})).then(function (
|
|
4096
|
-
return
|
|
4272
|
+
})).then(function (_this66$api$potGet) {
|
|
4273
|
+
return _this66$api$potGet.items;
|
|
4097
4274
|
});
|
|
4098
4275
|
} catch (e) {
|
|
4099
4276
|
return Promise.reject(e);
|
|
@@ -4103,7 +4280,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4103
4280
|
});
|
|
4104
4281
|
}
|
|
4105
4282
|
}();
|
|
4106
|
-
return
|
|
4283
|
+
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
|
|
4107
4284
|
});
|
|
4108
4285
|
} catch (e) {
|
|
4109
4286
|
return Promise.reject(e);
|
|
@@ -4126,11 +4303,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4126
4303
|
;
|
|
4127
4304
|
_proto.jackpotOptIn = function jackpotOptIn(filter) {
|
|
4128
4305
|
try {
|
|
4129
|
-
var
|
|
4306
|
+
var _this67 = this;
|
|
4130
4307
|
if (!filter.jp_template_id) {
|
|
4131
4308
|
throw new Error('jp_template_id is required in jackpotOptIn');
|
|
4132
4309
|
}
|
|
4133
|
-
return Promise.resolve(
|
|
4310
|
+
return Promise.resolve(_this67.api.jackpotOptIn(_this67.userExtId, filter));
|
|
4134
4311
|
} catch (e) {
|
|
4135
4312
|
return Promise.reject(e);
|
|
4136
4313
|
}
|
|
@@ -4152,11 +4329,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4152
4329
|
;
|
|
4153
4330
|
_proto.jackpotOptOut = function jackpotOptOut(filter) {
|
|
4154
4331
|
try {
|
|
4155
|
-
var
|
|
4332
|
+
var _this68 = this;
|
|
4156
4333
|
if (!filter.jp_template_id) {
|
|
4157
4334
|
throw new Error('jp_template_id is required in jackpotOptOut');
|
|
4158
4335
|
}
|
|
4159
|
-
return Promise.resolve(
|
|
4336
|
+
return Promise.resolve(_this68.api.jackpotOptOut(_this68.userExtId, filter));
|
|
4160
4337
|
} catch (e) {
|
|
4161
4338
|
return Promise.reject(e);
|
|
4162
4339
|
}
|
|
@@ -4177,19 +4354,20 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4177
4354
|
*
|
|
4178
4355
|
* **Visitor mode: not supported**
|
|
4179
4356
|
*
|
|
4357
|
+
* @param params - Jackpot winners parameters
|
|
4180
4358
|
* @param params.jp_template_id - Jackpot template id (required; throws if missing)
|
|
4181
4359
|
* @param params.limit - Page size (server default 20 when omitted)
|
|
4182
4360
|
* @param params.offset - Offset into the winner list
|
|
4183
4361
|
*/
|
|
4184
4362
|
;
|
|
4185
|
-
_proto.getJackpotWinners = function getJackpotWinners(
|
|
4186
|
-
var limit =
|
|
4187
|
-
offset =
|
|
4188
|
-
jp_template_id =
|
|
4363
|
+
_proto.getJackpotWinners = function getJackpotWinners(_ref14) {
|
|
4364
|
+
var limit = _ref14.limit,
|
|
4365
|
+
offset = _ref14.offset,
|
|
4366
|
+
jp_template_id = _ref14.jp_template_id;
|
|
4189
4367
|
try {
|
|
4190
|
-
var
|
|
4368
|
+
var _this69 = this;
|
|
4191
4369
|
return Promise.resolve(OCache.use(onUpdateContextKey.JackpotWinners + jp_template_id, exports.ECacheContext.WSAPI, function () {
|
|
4192
|
-
return
|
|
4370
|
+
return _this69.api.getJackpotWinnersT(_this69.userExtId, limit, offset, jp_template_id);
|
|
4193
4371
|
}, JACKPOT_WINNERS_CACHE_SEC));
|
|
4194
4372
|
} catch (e) {
|
|
4195
4373
|
return Promise.reject(e);
|
|
@@ -4209,16 +4387,16 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4209
4387
|
*
|
|
4210
4388
|
*/
|
|
4211
4389
|
;
|
|
4212
|
-
_proto.getJackpotEligibleGames = function getJackpotEligibleGames(
|
|
4213
|
-
var jp_template_id =
|
|
4214
|
-
onUpdate =
|
|
4390
|
+
_proto.getJackpotEligibleGames = function getJackpotEligibleGames(_ref15) {
|
|
4391
|
+
var jp_template_id = _ref15.jp_template_id,
|
|
4392
|
+
onUpdate = _ref15.onUpdate;
|
|
4215
4393
|
try {
|
|
4216
|
-
var
|
|
4394
|
+
var _this70 = this;
|
|
4217
4395
|
if (onUpdate) {
|
|
4218
|
-
|
|
4396
|
+
_this70.onUpdateCallback.set(onUpdateContextKey.JackpotEligibleGames, onUpdate);
|
|
4219
4397
|
}
|
|
4220
4398
|
return Promise.resolve(OCache.use(onUpdateContextKey.JackpotEligibleGames + jp_template_id, exports.ECacheContext.WSAPI, function () {
|
|
4221
|
-
return
|
|
4399
|
+
return _this70.api.getJackpotEligibleGamesT(_this70.userExtId, {
|
|
4222
4400
|
jp_template_id: jp_template_id
|
|
4223
4401
|
});
|
|
4224
4402
|
}, JACKPOT_ELIGIBLE_GAMES_CACHE_SEC));
|
|
@@ -4247,8 +4425,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4247
4425
|
;
|
|
4248
4426
|
_proto.getRelatedItemsForGame = function getRelatedItemsForGame(related_game_id) {
|
|
4249
4427
|
try {
|
|
4250
|
-
var
|
|
4251
|
-
return Promise.resolve(
|
|
4428
|
+
var _this71 = this;
|
|
4429
|
+
return Promise.resolve(_this71.api.getRelatedItemsForGame(_this71.userExtId, related_game_id));
|
|
4252
4430
|
} catch (e) {
|
|
4253
4431
|
return Promise.reject(e);
|
|
4254
4432
|
}
|
|
@@ -4276,16 +4454,16 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4276
4454
|
*
|
|
4277
4455
|
*/
|
|
4278
4456
|
;
|
|
4279
|
-
_proto.getRaffles = function getRaffles(
|
|
4280
|
-
var
|
|
4281
|
-
onUpdate =
|
|
4457
|
+
_proto.getRaffles = function getRaffles(_temp12) {
|
|
4458
|
+
var _ref16 = _temp12 === void 0 ? {} : _temp12,
|
|
4459
|
+
onUpdate = _ref16.onUpdate;
|
|
4282
4460
|
try {
|
|
4283
|
-
var
|
|
4461
|
+
var _this72 = this;
|
|
4284
4462
|
if (onUpdate) {
|
|
4285
|
-
|
|
4463
|
+
_this72.onUpdateCallback.set(onUpdateContextKey.Raffles, onUpdate);
|
|
4286
4464
|
}
|
|
4287
4465
|
return Promise.resolve(OCache.use(onUpdateContextKey.Raffles, exports.ECacheContext.WSAPI, function () {
|
|
4288
|
-
return
|
|
4466
|
+
return _this72.api.getRafflesT(_this72.userExtId);
|
|
4289
4467
|
}, CACHE_DATA_SEC));
|
|
4290
4468
|
} catch (e) {
|
|
4291
4469
|
return Promise.reject(e);
|
|
@@ -4317,11 +4495,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4317
4495
|
;
|
|
4318
4496
|
_proto.getRaffleDrawRun = function getRaffleDrawRun(props) {
|
|
4319
4497
|
try {
|
|
4320
|
-
var
|
|
4498
|
+
var _this73 = this;
|
|
4321
4499
|
if (!props.raffle_id || !props.run_id) {
|
|
4322
4500
|
throw new Error('both raffle_id and run_id are required');
|
|
4323
4501
|
}
|
|
4324
|
-
return Promise.resolve(
|
|
4502
|
+
return Promise.resolve(_this73.api.getRaffleDrawRunT(_this73.userExtId, props.raffle_id, props.run_id, props.winners_from, props.winners_to));
|
|
4325
4503
|
} catch (e) {
|
|
4326
4504
|
return Promise.reject(e);
|
|
4327
4505
|
}
|
|
@@ -4350,8 +4528,8 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4350
4528
|
;
|
|
4351
4529
|
_proto.getRaffleDrawRunsHistory = function getRaffleDrawRunsHistory(props) {
|
|
4352
4530
|
try {
|
|
4353
|
-
var
|
|
4354
|
-
return Promise.resolve(
|
|
4531
|
+
var _this74 = this;
|
|
4532
|
+
return Promise.resolve(_this74.api.getRaffleDrawRunsHistory(_this74.userExtId, props)).then(function (res) {
|
|
4355
4533
|
if (!props.raffle_id) {
|
|
4356
4534
|
throw new Error('raffle_id is required');
|
|
4357
4535
|
}
|
|
@@ -4385,11 +4563,11 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4385
4563
|
;
|
|
4386
4564
|
_proto.claimRafflePrize = function claimRafflePrize(props) {
|
|
4387
4565
|
try {
|
|
4388
|
-
var
|
|
4566
|
+
var _this75 = this;
|
|
4389
4567
|
if (!props.won_id) {
|
|
4390
4568
|
throw new Error('won_id is required');
|
|
4391
4569
|
}
|
|
4392
|
-
return Promise.resolve(
|
|
4570
|
+
return Promise.resolve(_this75.api.claimRafflePrize(_this75.userExtId, {
|
|
4393
4571
|
won_id: props.won_id
|
|
4394
4572
|
})).then(raffleClaimPrizeResponseTransform);
|
|
4395
4573
|
} catch (e) {
|
|
@@ -4404,7 +4582,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4404
4582
|
;
|
|
4405
4583
|
_proto.requestRaffleOptin = function requestRaffleOptin(props) {
|
|
4406
4584
|
try {
|
|
4407
|
-
var
|
|
4585
|
+
var _this76 = this;
|
|
4408
4586
|
if (!props.raffle_id) {
|
|
4409
4587
|
throw new Error('raffle_id is required');
|
|
4410
4588
|
}
|
|
@@ -4414,7 +4592,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
4414
4592
|
if (!props.raffle_run_id) {
|
|
4415
4593
|
throw new Error('raffle_run_id is required');
|
|
4416
4594
|
}
|
|
4417
|
-
return Promise.resolve(
|
|
4595
|
+
return Promise.resolve(_this76.api.raffleOptin(_this76.userExtId, props)).then(function (r) {
|
|
4418
4596
|
return {
|
|
4419
4597
|
err_code: r.errCode,
|
|
4420
4598
|
err_message: r.errMsg
|
|
@@ -5584,20 +5762,110 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5584
5762
|
return Promise.reject(e);
|
|
5585
5763
|
}
|
|
5586
5764
|
};
|
|
5587
|
-
_proto.
|
|
5765
|
+
_proto.clansGetList = function clansGetList(user_ext_id, force_language) {
|
|
5588
5766
|
try {
|
|
5589
5767
|
var _this46 = this;
|
|
5590
|
-
var message = _this46.buildMessage(user_ext_id, exports.ClassId.
|
|
5768
|
+
var message = _this46.buildMessage(user_ext_id, exports.ClassId.GET_CLAN_LIST_REQUEST);
|
|
5769
|
+
return Promise.resolve(_this46.send(message, exports.ClassId.GET_CLAN_LIST_RESPONSE, force_language));
|
|
5770
|
+
} catch (e) {
|
|
5771
|
+
return Promise.reject(e);
|
|
5772
|
+
}
|
|
5773
|
+
};
|
|
5774
|
+
_proto.clansGetListT = function clansGetListT(user_ext_id) {
|
|
5775
|
+
try {
|
|
5776
|
+
var _this47 = this;
|
|
5777
|
+
return Promise.resolve(_this47.clansGetList(user_ext_id)).then(function (response) {
|
|
5778
|
+
return {
|
|
5779
|
+
clans: response.clans,
|
|
5780
|
+
user_clan_id: response.user_clan_id,
|
|
5781
|
+
cooldown_until: response.cooldown_until
|
|
5782
|
+
};
|
|
5783
|
+
});
|
|
5784
|
+
} catch (e) {
|
|
5785
|
+
return Promise.reject(e);
|
|
5786
|
+
}
|
|
5787
|
+
};
|
|
5788
|
+
_proto.clansGetInfo = function clansGetInfo(user_ext_id, clanId, force_language) {
|
|
5789
|
+
try {
|
|
5790
|
+
var _this48 = this;
|
|
5791
|
+
var message = _this48.buildMessage(user_ext_id, exports.ClassId.GET_CLAN_INFO_REQUEST, {
|
|
5792
|
+
clan_id: clanId
|
|
5793
|
+
});
|
|
5794
|
+
return Promise.resolve(_this48.send(message, exports.ClassId.GET_CLAN_INFO_RESPONSE, force_language));
|
|
5795
|
+
} catch (e) {
|
|
5796
|
+
return Promise.reject(e);
|
|
5797
|
+
}
|
|
5798
|
+
};
|
|
5799
|
+
_proto.clansGetInfoT = function clansGetInfoT(user_ext_id, clanId, force_language) {
|
|
5800
|
+
try {
|
|
5801
|
+
var _this49 = this;
|
|
5802
|
+
return Promise.resolve(_this49.clansGetInfo(user_ext_id, clanId, force_language)).then(function (response) {
|
|
5803
|
+
var _response$entry_fee_c, _response$entry_fee_a, _response$cooldown_un;
|
|
5804
|
+
var c = response.clan_info;
|
|
5805
|
+
return {
|
|
5806
|
+
clan_id: c.clan_id,
|
|
5807
|
+
public_meta: c.public_meta,
|
|
5808
|
+
member_count: c.member_count,
|
|
5809
|
+
capacity_limit: c.capacity_limit,
|
|
5810
|
+
entry_fee_currency_type_id: (_response$entry_fee_c = response.entry_fee_currency_type_id) != null ? _response$entry_fee_c : c.entry_fee_currency_type_id,
|
|
5811
|
+
entry_fee_amount: (_response$entry_fee_a = response.entry_fee_amount) != null ? _response$entry_fee_a : c.entry_fee_amount,
|
|
5812
|
+
rating_position: c.rating_position,
|
|
5813
|
+
rating_score: c.rating_score,
|
|
5814
|
+
cooldown_until: (_response$cooldown_un = response.cooldown_until) != null ? _response$cooldown_un : null,
|
|
5815
|
+
members: (response.members || []).map(function (m) {
|
|
5816
|
+
return {
|
|
5817
|
+
user_id: m.user_id,
|
|
5818
|
+
public_username: m.public_username,
|
|
5819
|
+
avatar_id: m.avatar_id,
|
|
5820
|
+
avatar_real_id: m.avatar_real_id,
|
|
5821
|
+
avatar_url: CoreUtils.avatarUrl(m.avatar_id, _this49.avatarDomain),
|
|
5822
|
+
position: m.position,
|
|
5823
|
+
contribution_score: m.contribution_score,
|
|
5824
|
+
is_me: m.is_me,
|
|
5825
|
+
clean_ext_user_id: m.clean_ext_user_id
|
|
5826
|
+
};
|
|
5827
|
+
})
|
|
5828
|
+
};
|
|
5829
|
+
});
|
|
5830
|
+
} catch (e) {
|
|
5831
|
+
return Promise.reject(e);
|
|
5832
|
+
}
|
|
5833
|
+
};
|
|
5834
|
+
_proto.clanJoin = function clanJoin(user_ext_id, clanId, joinSourceId) {
|
|
5835
|
+
if (joinSourceId === void 0) {
|
|
5836
|
+
joinSourceId = 0;
|
|
5837
|
+
}
|
|
5838
|
+
try {
|
|
5839
|
+
var _this50 = this;
|
|
5840
|
+
var message = _this50.buildMessage(user_ext_id, exports.ClassId.JOIN_CLAN_REQUEST, {
|
|
5841
|
+
clan_id: clanId,
|
|
5842
|
+
join_source_id: joinSourceId
|
|
5843
|
+
});
|
|
5844
|
+
return Promise.resolve(_this50.send(message, exports.ClassId.JOIN_CLAN_RESPONSE)).then(function (response) {
|
|
5845
|
+
var _response$errCode, _response$errMsg;
|
|
5846
|
+
return {
|
|
5847
|
+
errCode: (_response$errCode = response.errCode) != null ? _response$errCode : 0,
|
|
5848
|
+
errMsg: (_response$errMsg = response.errMsg) != null ? _response$errMsg : ''
|
|
5849
|
+
};
|
|
5850
|
+
});
|
|
5851
|
+
} catch (e) {
|
|
5852
|
+
return Promise.reject(e);
|
|
5853
|
+
}
|
|
5854
|
+
};
|
|
5855
|
+
_proto.tournamentsGetInfo = function tournamentsGetInfo(user_ext_id, tournamentInstanceId, force_language) {
|
|
5856
|
+
try {
|
|
5857
|
+
var _this51 = this;
|
|
5858
|
+
var message = _this51.buildMessage(user_ext_id, exports.ClassId.GET_TOURNAMENT_INFO_REQUEST, {
|
|
5591
5859
|
tournamentInstanceId: tournamentInstanceId
|
|
5592
5860
|
});
|
|
5593
|
-
return Promise.resolve(
|
|
5861
|
+
return Promise.resolve(_this51.send(message, exports.ClassId.GET_TOURNAMENT_INFO_RESPONSE, force_language)).then(function (response) {
|
|
5594
5862
|
var _response$userPositio, _response$tournamentI;
|
|
5595
5863
|
if ((_response$userPositio = response.userPosition) != null && _response$userPositio.avatar_id) {
|
|
5596
|
-
response.userPosition.avatar_url = CoreUtils.avatarUrl(response.userPosition.avatar_id,
|
|
5864
|
+
response.userPosition.avatar_url = CoreUtils.avatarUrl(response.userPosition.avatar_id, _this51.avatarDomain);
|
|
5597
5865
|
}
|
|
5598
5866
|
if ((_response$tournamentI = response.tournamentInfo) != null && (_response$tournamentI = _response$tournamentI.players) != null && _response$tournamentI.length) {
|
|
5599
5867
|
response.tournamentInfo.players.forEach(function (p) {
|
|
5600
|
-
p.avatar_url = CoreUtils.avatarUrl(p.avatar_id,
|
|
5868
|
+
p.avatar_url = CoreUtils.avatarUrl(p.avatar_id, _this51.avatarDomain);
|
|
5601
5869
|
});
|
|
5602
5870
|
}
|
|
5603
5871
|
return response;
|
|
@@ -5608,11 +5876,32 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5608
5876
|
};
|
|
5609
5877
|
_proto.tournamentsGetInfoT = function tournamentsGetInfoT(user_ext_id, tournamentInstanceId) {
|
|
5610
5878
|
try {
|
|
5611
|
-
var
|
|
5879
|
+
var _this52 = this;
|
|
5612
5880
|
if (!tournamentInstanceId) {
|
|
5613
5881
|
throw new Error('Missing tournament instance id');
|
|
5614
5882
|
}
|
|
5615
|
-
return Promise.resolve(
|
|
5883
|
+
return Promise.resolve(_this52.tournamentsGetInfo(user_ext_id, tournamentInstanceId)).then(tournamentInfoItemTransform);
|
|
5884
|
+
} catch (e) {
|
|
5885
|
+
return Promise.reject(e);
|
|
5886
|
+
}
|
|
5887
|
+
};
|
|
5888
|
+
_proto.clanTournamentGetPlayers = function clanTournamentGetPlayers(user_ext_id, tournamentInstanceId, clanId, force_language) {
|
|
5889
|
+
try {
|
|
5890
|
+
var _this53 = this;
|
|
5891
|
+
var message = _this53.buildMessage(user_ext_id, exports.ClassId.GET_CLAN_TOURNAMENT_PLAYERS_REQUEST, {
|
|
5892
|
+
tournamentInstanceId: tournamentInstanceId,
|
|
5893
|
+
clanId: clanId,
|
|
5894
|
+
forceLanguage: force_language
|
|
5895
|
+
});
|
|
5896
|
+
return Promise.resolve(_this53.send(message, exports.ClassId.GET_CLAN_TOURNAMENT_PLAYERS_RESPONSE, force_language)).then(function (response) {
|
|
5897
|
+
var _response$players;
|
|
5898
|
+
if ((_response$players = response.players) != null && _response$players.length) {
|
|
5899
|
+
response.players.forEach(function (p) {
|
|
5900
|
+
p.avatar_url = CoreUtils.avatarUrl(p.avatar_id, _this53.avatarDomain);
|
|
5901
|
+
});
|
|
5902
|
+
}
|
|
5903
|
+
return clanTournamentPlayersTransform(response);
|
|
5904
|
+
});
|
|
5616
5905
|
} catch (e) {
|
|
5617
5906
|
return Promise.reject(e);
|
|
5618
5907
|
}
|
|
@@ -5622,13 +5911,13 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5622
5911
|
prevPeriod = false;
|
|
5623
5912
|
}
|
|
5624
5913
|
try {
|
|
5625
|
-
var
|
|
5626
|
-
var message =
|
|
5914
|
+
var _this54 = this;
|
|
5915
|
+
var message = _this54.buildMessage(user_ext_id, exports.ClassId.GET_LEADERS_BOARD_REQUEST, {
|
|
5627
5916
|
period_type_id: period_type_id,
|
|
5628
5917
|
snapshot_offset: prevPeriod ? 1 : 0,
|
|
5629
5918
|
include_users: true
|
|
5630
5919
|
});
|
|
5631
|
-
return Promise.resolve(
|
|
5920
|
+
return Promise.resolve(_this54.send(message, exports.ClassId.GET_LEADERS_BOARD_RESPONSE, force_language)).then(function (response) {
|
|
5632
5921
|
var _response$map$boardKe, _response$map$boardKe2;
|
|
5633
5922
|
var boardKey = Object.keys(response.map || {}).find(function (k) {
|
|
5634
5923
|
return period_type_id === undefined || k === (period_type_id == null ? void 0 : period_type_id.toString());
|
|
@@ -5637,11 +5926,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5637
5926
|
return undefined;
|
|
5638
5927
|
}
|
|
5639
5928
|
if ((_response$map$boardKe = response.map[boardKey]) != null && (_response$map$boardKe = _response$map$boardKe.userPosition) != null && _response$map$boardKe.avatar_id) {
|
|
5640
|
-
response.map[boardKey].userPosition.avatar_url = CoreUtils.avatarUrl(response.map[boardKey].userPosition.avatar_id,
|
|
5929
|
+
response.map[boardKey].userPosition.avatar_url = CoreUtils.avatarUrl(response.map[boardKey].userPosition.avatar_id, _this54.avatarDomain);
|
|
5641
5930
|
}
|
|
5642
5931
|
if ((_response$map$boardKe2 = response.map[boardKey]) != null && (_response$map$boardKe2 = _response$map$boardKe2.positions) != null && _response$map$boardKe2.length) {
|
|
5643
5932
|
response.map[boardKey].positions.forEach(function (p) {
|
|
5644
|
-
p.avatar_url = CoreUtils.avatarUrl(p.avatar_id,
|
|
5933
|
+
p.avatar_url = CoreUtils.avatarUrl(p.avatar_id, _this54.avatarDomain);
|
|
5645
5934
|
});
|
|
5646
5935
|
}
|
|
5647
5936
|
return response.map[boardKey];
|
|
@@ -5655,35 +5944,35 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5655
5944
|
prevPeriod = false;
|
|
5656
5945
|
}
|
|
5657
5946
|
try {
|
|
5658
|
-
var
|
|
5947
|
+
var _this55 = this;
|
|
5659
5948
|
if (period_type_id === undefined) period_type_id = exports.LeaderBoardPeriodType.DAILY;
|
|
5660
|
-
return Promise.resolve(
|
|
5949
|
+
return Promise.resolve(_this55.leaderboardGet(user_ext_id, period_type_id, prevPeriod)).then(getLeaderBoardTransform);
|
|
5661
5950
|
} catch (e) {
|
|
5662
5951
|
return Promise.reject(e);
|
|
5663
5952
|
}
|
|
5664
5953
|
};
|
|
5665
5954
|
_proto.levelsGet = function levelsGet(user_ext_id, force_language) {
|
|
5666
5955
|
try {
|
|
5667
|
-
var
|
|
5668
|
-
var message =
|
|
5669
|
-
return Promise.resolve(
|
|
5956
|
+
var _this56 = this;
|
|
5957
|
+
var message = _this56.buildMessage(user_ext_id, exports.ClassId.GET_LEVEL_MAP_REQUEST);
|
|
5958
|
+
return Promise.resolve(_this56.send(message, exports.ClassId.GET_LEVEL_MAP_RESPONSE, force_language));
|
|
5670
5959
|
} catch (e) {
|
|
5671
5960
|
return Promise.reject(e);
|
|
5672
5961
|
}
|
|
5673
5962
|
};
|
|
5674
5963
|
_proto.levelsGetT = function levelsGetT(user_ext_id) {
|
|
5675
5964
|
try {
|
|
5676
|
-
var
|
|
5677
|
-
return Promise.resolve(
|
|
5965
|
+
var _this57 = this;
|
|
5966
|
+
return Promise.resolve(_this57.levelsGet(user_ext_id)).then(GetLevelMapResponseTransform);
|
|
5678
5967
|
} catch (e) {
|
|
5679
5968
|
return Promise.reject(e);
|
|
5680
5969
|
}
|
|
5681
5970
|
};
|
|
5682
5971
|
_proto.getLevelCurrent = function getLevelCurrent(user_ext_id) {
|
|
5683
5972
|
try {
|
|
5684
|
-
var
|
|
5685
|
-
return Promise.resolve(
|
|
5686
|
-
return Promise.resolve(
|
|
5973
|
+
var _this58 = this;
|
|
5974
|
+
return Promise.resolve(_this58.levelsGetT(user_ext_id)).then(function (levels) {
|
|
5975
|
+
return Promise.resolve(_this58.getUserGamificationInfo(user_ext_id)).then(function (userInfo) {
|
|
5687
5976
|
var _userInfo$points_ever2;
|
|
5688
5977
|
if (!levels || levels.length === 0) return null;
|
|
5689
5978
|
var sortedLevels = [].concat(levels).sort(function (a, b) {
|
|
@@ -5718,25 +6007,25 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5718
6007
|
};
|
|
5719
6008
|
_proto.customSectionsGet = function customSectionsGet(user_ext_id, force_language) {
|
|
5720
6009
|
try {
|
|
5721
|
-
var
|
|
5722
|
-
var message =
|
|
5723
|
-
return Promise.resolve(
|
|
6010
|
+
var _this59 = this;
|
|
6011
|
+
var message = _this59.buildMessage(user_ext_id, exports.ClassId.GET_CUSTOM_SECTIONS_REQUEST);
|
|
6012
|
+
return Promise.resolve(_this59.send(message, exports.ClassId.GET_CUSTOM_SECTIONS_RESPONSE, force_language));
|
|
5724
6013
|
} catch (e) {
|
|
5725
6014
|
return Promise.reject(e);
|
|
5726
6015
|
}
|
|
5727
6016
|
};
|
|
5728
6017
|
_proto.customSectionsGetT = function customSectionsGetT(user_ext_id) {
|
|
5729
6018
|
try {
|
|
5730
|
-
var
|
|
5731
|
-
return Promise.resolve(
|
|
6019
|
+
var _this60 = this;
|
|
6020
|
+
return Promise.resolve(_this60.customSectionsGet(user_ext_id)).then(UICustomSectionTransform);
|
|
5732
6021
|
} catch (e) {
|
|
5733
6022
|
return Promise.reject(e);
|
|
5734
6023
|
}
|
|
5735
6024
|
};
|
|
5736
6025
|
_proto.getTranslationsT = function getTranslationsT(user_ext_id, lang_code, areas, cacheSec) {
|
|
5737
6026
|
try {
|
|
5738
|
-
var
|
|
5739
|
-
return Promise.resolve(
|
|
6027
|
+
var _this61 = this;
|
|
6028
|
+
return Promise.resolve(_this61.coreGetTranslations(user_ext_id, lang_code, areas, 30));
|
|
5740
6029
|
} catch (e) {
|
|
5741
6030
|
return Promise.reject(e);
|
|
5742
6031
|
}
|
|
@@ -5749,15 +6038,15 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5749
6038
|
offset = 0;
|
|
5750
6039
|
}
|
|
5751
6040
|
try {
|
|
5752
|
-
var
|
|
5753
|
-
var message =
|
|
6041
|
+
var _this62 = this;
|
|
6042
|
+
var message = _this62.buildMessage(user_ext_id, exports.ClassId.GET_INBOX_MESSAGES_REQUEST, {
|
|
5754
6043
|
limit: limit,
|
|
5755
6044
|
offset: offset,
|
|
5756
6045
|
starred_only: starred_only,
|
|
5757
6046
|
category_id: category_id,
|
|
5758
6047
|
read_status: read_status
|
|
5759
6048
|
});
|
|
5760
|
-
return Promise.resolve(
|
|
6049
|
+
return Promise.resolve(_this62.send(message, exports.ClassId.GET_INBOX_MESSAGES_RESPONSE));
|
|
5761
6050
|
} catch (e) {
|
|
5762
6051
|
return Promise.reject(e);
|
|
5763
6052
|
}
|
|
@@ -5773,11 +6062,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5773
6062
|
favoriteOnly = false;
|
|
5774
6063
|
}
|
|
5775
6064
|
try {
|
|
5776
|
-
var
|
|
6065
|
+
var _this63 = this;
|
|
5777
6066
|
var limit = to - from > 20 ? 20 : to - from;
|
|
5778
6067
|
var offset = from;
|
|
5779
|
-
return Promise.resolve(
|
|
5780
|
-
return InboxMessagesTransform(
|
|
6068
|
+
return Promise.resolve(_this63.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId, read_status)).then(function (_this63$getInboxMessa) {
|
|
6069
|
+
return InboxMessagesTransform(_this63$getInboxMessa.log);
|
|
5781
6070
|
});
|
|
5782
6071
|
} catch (e) {
|
|
5783
6072
|
return Promise.reject(e);
|
|
@@ -5785,21 +6074,21 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5785
6074
|
};
|
|
5786
6075
|
_proto.getInboxUnreadCountT = function getInboxUnreadCountT(user_ext_id) {
|
|
5787
6076
|
try {
|
|
5788
|
-
var
|
|
6077
|
+
var _this64 = this;
|
|
5789
6078
|
var limit = 1;
|
|
5790
6079
|
var offset = 0;
|
|
5791
|
-
return Promise.resolve(
|
|
5792
|
-
return
|
|
6080
|
+
return Promise.resolve(_this64.getInboxMessages(user_ext_id, limit, offset, false, null)).then(function (_this64$getInboxMessa) {
|
|
6081
|
+
return _this64$getInboxMessa.unread_count;
|
|
5793
6082
|
});
|
|
5794
6083
|
} catch (e) {
|
|
5795
6084
|
return Promise.reject(e);
|
|
5796
6085
|
}
|
|
5797
6086
|
};
|
|
5798
6087
|
_proto.getInboxMessageBody = function getInboxMessageBody(messageGuid) {
|
|
5799
|
-
var
|
|
6088
|
+
var _this65 = this;
|
|
5800
6089
|
var getMessageBody = function getMessageBody(messageGuid) {
|
|
5801
6090
|
try {
|
|
5802
|
-
var inboxCdnUrl =
|
|
6091
|
+
var inboxCdnUrl = _this65.tracker.getLabelSetting(exports.PublicLabelSettings.INBOX_PUBLIC_CDN);
|
|
5803
6092
|
return Promise.resolve(_catch(function () {
|
|
5804
6093
|
var url = "" + inboxCdnUrl + messageGuid + ".json";
|
|
5805
6094
|
return Promise.resolve(fetch(url, {
|
|
@@ -5815,7 +6104,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5815
6104
|
});
|
|
5816
6105
|
});
|
|
5817
6106
|
}, function (error) {
|
|
5818
|
-
|
|
6107
|
+
_this65.logger.error('Error fetching inbox message body:', error);
|
|
5819
6108
|
return null;
|
|
5820
6109
|
}));
|
|
5821
6110
|
} catch (e) {
|
|
@@ -5826,64 +6115,64 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5826
6115
|
};
|
|
5827
6116
|
_proto.getInboxMessageBodyT = function getInboxMessageBodyT(messageGuid) {
|
|
5828
6117
|
try {
|
|
5829
|
-
var
|
|
5830
|
-
return Promise.resolve(
|
|
6118
|
+
var _this66 = this;
|
|
6119
|
+
return Promise.resolve(_this66.getInboxMessageBody(messageGuid)).then(InboxMessageBodyTransform);
|
|
5831
6120
|
} catch (e) {
|
|
5832
6121
|
return Promise.reject(e);
|
|
5833
6122
|
}
|
|
5834
6123
|
};
|
|
5835
6124
|
_proto.markInboxMessageRead = function markInboxMessageRead(user_ext_id, messageGuid) {
|
|
5836
6125
|
try {
|
|
5837
|
-
var
|
|
5838
|
-
var message =
|
|
6126
|
+
var _this67 = this;
|
|
6127
|
+
var message = _this67.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_READ_REQUEST, {
|
|
5839
6128
|
engagement_uid: messageGuid
|
|
5840
6129
|
});
|
|
5841
|
-
return Promise.resolve(
|
|
6130
|
+
return Promise.resolve(_this67.send(message, exports.ClassId.MARK_INBOX_READ_RESPONSE));
|
|
5842
6131
|
} catch (e) {
|
|
5843
6132
|
return Promise.reject(e);
|
|
5844
6133
|
}
|
|
5845
6134
|
};
|
|
5846
6135
|
_proto.markAllInboxMessageRead = function markAllInboxMessageRead(user_ext_id) {
|
|
5847
6136
|
try {
|
|
5848
|
-
var
|
|
5849
|
-
var message =
|
|
6137
|
+
var _this68 = this;
|
|
6138
|
+
var message = _this68.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_READ_REQUEST, {
|
|
5850
6139
|
all_read: true
|
|
5851
6140
|
});
|
|
5852
|
-
return Promise.resolve(
|
|
6141
|
+
return Promise.resolve(_this68.send(message, exports.ClassId.MARK_INBOX_READ_RESPONSE));
|
|
5853
6142
|
} catch (e) {
|
|
5854
6143
|
return Promise.reject(e);
|
|
5855
6144
|
}
|
|
5856
6145
|
};
|
|
5857
6146
|
_proto.markUnmarkInboxMessageAsFavorite = function markUnmarkInboxMessageAsFavorite(user_ext_id, messageGuid, mark) {
|
|
5858
6147
|
try {
|
|
5859
|
-
var
|
|
5860
|
-
var message =
|
|
6148
|
+
var _this69 = this;
|
|
6149
|
+
var message = _this69.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_STARRED_REQUEST, {
|
|
5861
6150
|
engagement_uid: messageGuid,
|
|
5862
6151
|
is_starred: mark
|
|
5863
6152
|
});
|
|
5864
|
-
return Promise.resolve(
|
|
6153
|
+
return Promise.resolve(_this69.send(message, exports.ClassId.MARK_INBOX_STARRED_RESPONSE));
|
|
5865
6154
|
} catch (e) {
|
|
5866
6155
|
return Promise.reject(e);
|
|
5867
6156
|
}
|
|
5868
6157
|
};
|
|
5869
6158
|
_proto.deleteInboxMessage = function deleteInboxMessage(user_ext_id, messageGuid) {
|
|
5870
6159
|
try {
|
|
5871
|
-
var
|
|
5872
|
-
var message =
|
|
6160
|
+
var _this70 = this;
|
|
6161
|
+
var message = _this70.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_DELETED_REQUEST, {
|
|
5873
6162
|
engagement_uid: messageGuid
|
|
5874
6163
|
});
|
|
5875
|
-
return Promise.resolve(
|
|
6164
|
+
return Promise.resolve(_this70.send(message, exports.ClassId.MARK_INBOX_DELETED_RESPONSE));
|
|
5876
6165
|
} catch (e) {
|
|
5877
6166
|
return Promise.reject(e);
|
|
5878
6167
|
}
|
|
5879
6168
|
};
|
|
5880
6169
|
_proto.deleteAllInboxMessages = function deleteAllInboxMessages(user_ext_id) {
|
|
5881
6170
|
try {
|
|
5882
|
-
var
|
|
5883
|
-
var message =
|
|
6171
|
+
var _this71 = this;
|
|
6172
|
+
var message = _this71.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_DELETED_REQUEST, {
|
|
5884
6173
|
all_deleted: true
|
|
5885
6174
|
});
|
|
5886
|
-
return Promise.resolve(
|
|
6175
|
+
return Promise.resolve(_this71.send(message, exports.ClassId.MARK_INBOX_DELETED_RESPONSE));
|
|
5887
6176
|
} catch (e) {
|
|
5888
6177
|
return Promise.reject(e);
|
|
5889
6178
|
}
|
|
@@ -5903,11 +6192,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5903
6192
|
_ref3$usePost = _ref3.usePost,
|
|
5904
6193
|
usePost = _ref3$usePost === void 0 ? false : _ref3$usePost;
|
|
5905
6194
|
try {
|
|
5906
|
-
var
|
|
5907
|
-
if (!
|
|
6195
|
+
var _this72 = this;
|
|
6196
|
+
if (!_this72.tracker) {
|
|
5908
6197
|
throw new Error("MatchX and Quiz APIs are not available in the visitor mode");
|
|
5909
6198
|
}
|
|
5910
|
-
var baseParams =
|
|
6199
|
+
var baseParams = _this72.buildGamesApiParams();
|
|
5911
6200
|
var queryString = Object.entries(baseParams).map(function (_ref4) {
|
|
5912
6201
|
var k = _ref4[0],
|
|
5913
6202
|
v = _ref4[1];
|
|
@@ -5944,7 +6233,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5944
6233
|
});
|
|
5945
6234
|
});
|
|
5946
6235
|
}, function (e) {
|
|
5947
|
-
|
|
6236
|
+
_this72.logger.error("Failed to call games API: " + method, {
|
|
5948
6237
|
url: url,
|
|
5949
6238
|
error: e.message
|
|
5950
6239
|
});
|
|
@@ -5956,11 +6245,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5956
6245
|
};
|
|
5957
6246
|
_proto.gpGetActiveRounds = function gpGetActiveRounds(saw_template_id) {
|
|
5958
6247
|
try {
|
|
5959
|
-
var
|
|
6248
|
+
var _this73 = this;
|
|
5960
6249
|
var params = {
|
|
5961
6250
|
ext_game_id: saw_template_id
|
|
5962
6251
|
};
|
|
5963
|
-
return Promise.resolve(
|
|
6252
|
+
return Promise.resolve(_this73.sendGamesApi({
|
|
5964
6253
|
method: 'active-rounds',
|
|
5965
6254
|
params: params
|
|
5966
6255
|
}));
|
|
@@ -5970,12 +6259,12 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5970
6259
|
};
|
|
5971
6260
|
_proto.gpGetActiveRound = function gpGetActiveRound(saw_template_id, round_id) {
|
|
5972
6261
|
try {
|
|
5973
|
-
var
|
|
6262
|
+
var _this74 = this;
|
|
5974
6263
|
var params = {
|
|
5975
6264
|
ext_game_id: saw_template_id,
|
|
5976
6265
|
round_id: round_id
|
|
5977
6266
|
};
|
|
5978
|
-
return Promise.resolve(
|
|
6267
|
+
return Promise.resolve(_this74.sendGamesApi({
|
|
5979
6268
|
method: 'active-round',
|
|
5980
6269
|
params: params
|
|
5981
6270
|
}));
|
|
@@ -5985,11 +6274,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5985
6274
|
};
|
|
5986
6275
|
_proto.gpGetGamesHistory = function gpGetGamesHistory(saw_template_id) {
|
|
5987
6276
|
try {
|
|
5988
|
-
var
|
|
6277
|
+
var _this75 = this;
|
|
5989
6278
|
var params = {
|
|
5990
6279
|
ext_game_id: saw_template_id
|
|
5991
6280
|
};
|
|
5992
|
-
return Promise.resolve(
|
|
6281
|
+
return Promise.resolve(_this75.sendGamesApi({
|
|
5993
6282
|
method: 'games-history',
|
|
5994
6283
|
params: params
|
|
5995
6284
|
}));
|
|
@@ -5999,12 +6288,12 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
5999
6288
|
};
|
|
6000
6289
|
_proto.gpGetGameBoard = function gpGetGameBoard(saw_template_id, round_id) {
|
|
6001
6290
|
try {
|
|
6002
|
-
var
|
|
6291
|
+
var _this76 = this;
|
|
6003
6292
|
var params = {
|
|
6004
6293
|
ext_game_id: saw_template_id,
|
|
6005
6294
|
round_id: round_id
|
|
6006
6295
|
};
|
|
6007
|
-
return Promise.resolve(
|
|
6296
|
+
return Promise.resolve(_this76.sendGamesApi({
|
|
6008
6297
|
method: 'game-board',
|
|
6009
6298
|
params: params
|
|
6010
6299
|
}));
|
|
@@ -6014,13 +6303,13 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6014
6303
|
};
|
|
6015
6304
|
_proto.gpSubmitSelection = function gpSubmitSelection(saw_template_id, round, isQuiz) {
|
|
6016
6305
|
try {
|
|
6017
|
-
var
|
|
6306
|
+
var _this77 = this;
|
|
6018
6307
|
var method = isQuiz ? 'submit-selection-quiz' : 'submit-selection';
|
|
6019
6308
|
var params = {
|
|
6020
6309
|
ext_game_id: saw_template_id,
|
|
6021
6310
|
round: round
|
|
6022
6311
|
};
|
|
6023
|
-
return Promise.resolve(
|
|
6312
|
+
return Promise.resolve(_this77.sendGamesApi({
|
|
6024
6313
|
method: method,
|
|
6025
6314
|
params: params,
|
|
6026
6315
|
usePost: true
|
|
@@ -6031,11 +6320,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6031
6320
|
};
|
|
6032
6321
|
_proto.gpGetUserInfo = function gpGetUserInfo(saw_template_id) {
|
|
6033
6322
|
try {
|
|
6034
|
-
var
|
|
6323
|
+
var _this78 = this;
|
|
6035
6324
|
var params = {
|
|
6036
6325
|
ext_game_id: saw_template_id
|
|
6037
6326
|
};
|
|
6038
|
-
return Promise.resolve(
|
|
6327
|
+
return Promise.resolve(_this78.sendGamesApi({
|
|
6039
6328
|
method: 'user-info',
|
|
6040
6329
|
params: params
|
|
6041
6330
|
}));
|
|
@@ -6045,11 +6334,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6045
6334
|
};
|
|
6046
6335
|
_proto.gpGetGameInfo = function gpGetGameInfo(saw_template_id) {
|
|
6047
6336
|
try {
|
|
6048
|
-
var
|
|
6337
|
+
var _this79 = this;
|
|
6049
6338
|
var params = {
|
|
6050
6339
|
ext_game_id: saw_template_id
|
|
6051
6340
|
};
|
|
6052
|
-
return Promise.resolve(
|
|
6341
|
+
return Promise.resolve(_this79.sendGamesApi({
|
|
6053
6342
|
method: 'game-info',
|
|
6054
6343
|
params: params
|
|
6055
6344
|
}));
|
|
@@ -6059,11 +6348,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6059
6348
|
};
|
|
6060
6349
|
_proto.gpGetTranslations = function gpGetTranslations(saw_template_id) {
|
|
6061
6350
|
try {
|
|
6062
|
-
var
|
|
6351
|
+
var _this80 = this;
|
|
6063
6352
|
var params = {
|
|
6064
6353
|
ext_game_id: saw_template_id
|
|
6065
6354
|
};
|
|
6066
|
-
return Promise.resolve(
|
|
6355
|
+
return Promise.resolve(_this80.sendGamesApi({
|
|
6067
6356
|
method: 'translations',
|
|
6068
6357
|
params: params
|
|
6069
6358
|
}));
|
|
@@ -6073,13 +6362,13 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6073
6362
|
};
|
|
6074
6363
|
_proto.gpGetRoundInfoForUser = function gpGetRoundInfoForUser(saw_template_id, round_id, int_user_id) {
|
|
6075
6364
|
try {
|
|
6076
|
-
var
|
|
6365
|
+
var _this81 = this;
|
|
6077
6366
|
var params = {
|
|
6078
6367
|
ext_game_id: saw_template_id,
|
|
6079
6368
|
round_id: round_id,
|
|
6080
6369
|
int_user_id: int_user_id
|
|
6081
6370
|
};
|
|
6082
|
-
return Promise.resolve(
|
|
6371
|
+
return Promise.resolve(_this81.sendGamesApi({
|
|
6083
6372
|
method: 'game-round-info-for-user',
|
|
6084
6373
|
params: params
|
|
6085
6374
|
}));
|
|
@@ -6089,49 +6378,49 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6089
6378
|
};
|
|
6090
6379
|
_proto.avatarsGetList = function avatarsGetList(user_ext_id) {
|
|
6091
6380
|
try {
|
|
6092
|
-
var
|
|
6093
|
-
var message =
|
|
6094
|
-
return Promise.resolve(
|
|
6381
|
+
var _this82 = this;
|
|
6382
|
+
var message = _this82.buildMessage(user_ext_id, exports.ClassId.GET_AVATARS_LIST_REQUEST);
|
|
6383
|
+
return Promise.resolve(_this82.send(message, exports.ClassId.GET_AVATARS_LIST_RESPONSE));
|
|
6095
6384
|
} catch (e) {
|
|
6096
6385
|
return Promise.reject(e);
|
|
6097
6386
|
}
|
|
6098
6387
|
};
|
|
6099
6388
|
_proto.avatarsGetCustomized = function avatarsGetCustomized(user_ext_id) {
|
|
6100
6389
|
try {
|
|
6101
|
-
var
|
|
6102
|
-
var message =
|
|
6103
|
-
return Promise.resolve(
|
|
6390
|
+
var _this83 = this;
|
|
6391
|
+
var message = _this83.buildMessage(user_ext_id, exports.ClassId.GET_AVATARS_CUSTOMIZED_REQUEST);
|
|
6392
|
+
return Promise.resolve(_this83.send(message, exports.ClassId.GET_AVATARS_CUSTOMIZED_RESPONSE));
|
|
6104
6393
|
} catch (e) {
|
|
6105
6394
|
return Promise.reject(e);
|
|
6106
6395
|
}
|
|
6107
6396
|
};
|
|
6108
6397
|
_proto.avatarsGetPrompts = function avatarsGetPrompts(user_ext_id) {
|
|
6109
6398
|
try {
|
|
6110
|
-
var
|
|
6111
|
-
var message =
|
|
6112
|
-
return Promise.resolve(
|
|
6399
|
+
var _this84 = this;
|
|
6400
|
+
var message = _this84.buildMessage(user_ext_id, exports.ClassId.GET_AVATAR_PROMPTS_REQUEST);
|
|
6401
|
+
return Promise.resolve(_this84.send(message, exports.ClassId.GET_AVATAR_PROMPTS_RESPONSE));
|
|
6113
6402
|
} catch (e) {
|
|
6114
6403
|
return Promise.reject(e);
|
|
6115
6404
|
}
|
|
6116
6405
|
};
|
|
6117
6406
|
_proto.avatarSetAvatar = function avatarSetAvatar(user_ext_id, avatar_id, avatar_real_id) {
|
|
6118
6407
|
try {
|
|
6119
|
-
var
|
|
6120
|
-
var message =
|
|
6408
|
+
var _this85 = this;
|
|
6409
|
+
var message = _this85.buildMessage(user_ext_id, exports.ClassId.CLIENT_SET_AVATAR_REQUEST, {
|
|
6121
6410
|
avatar_id: avatar_id,
|
|
6122
6411
|
avatar_real_id: avatar_real_id
|
|
6123
6412
|
});
|
|
6124
|
-
return Promise.resolve(
|
|
6413
|
+
return Promise.resolve(_this85.send(message, exports.ClassId.CLIENT_SET_AVATAR_RESPONSE));
|
|
6125
6414
|
} catch (e) {
|
|
6126
6415
|
return Promise.reject(e);
|
|
6127
6416
|
}
|
|
6128
6417
|
};
|
|
6129
6418
|
_proto.avatarsGetListT = function avatarsGetListT(user_ext_id) {
|
|
6130
6419
|
try {
|
|
6131
|
-
var
|
|
6132
|
-
return Promise.resolve(
|
|
6133
|
-
var
|
|
6134
|
-
return avatarDefinitionTransform((
|
|
6420
|
+
var _this86 = this;
|
|
6421
|
+
return Promise.resolve(_this86.avatarsGetList(user_ext_id)).then(function (_this86$avatarsGetLis) {
|
|
6422
|
+
var _this86$avatarsGetLis2;
|
|
6423
|
+
return avatarDefinitionTransform((_this86$avatarsGetLis2 = _this86$avatarsGetLis.avatars) != null ? _this86$avatarsGetLis2 : [], _this86.avatarDomain);
|
|
6135
6424
|
});
|
|
6136
6425
|
} catch (e) {
|
|
6137
6426
|
return Promise.reject(e);
|
|
@@ -6139,10 +6428,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6139
6428
|
};
|
|
6140
6429
|
_proto.avatarsGetCustomizedT = function avatarsGetCustomizedT(user_ext_id) {
|
|
6141
6430
|
try {
|
|
6142
|
-
var
|
|
6143
|
-
return Promise.resolve(
|
|
6144
|
-
var
|
|
6145
|
-
return avatarCustomizedTransform((
|
|
6431
|
+
var _this87 = this;
|
|
6432
|
+
return Promise.resolve(_this87.avatarsGetCustomized(user_ext_id)).then(function (_this87$avatarsGetCus) {
|
|
6433
|
+
var _this87$avatarsGetCus2;
|
|
6434
|
+
return avatarCustomizedTransform((_this87$avatarsGetCus2 = _this87$avatarsGetCus.avatars) != null ? _this87$avatarsGetCus2 : [], _this87.avatarDomain);
|
|
6146
6435
|
});
|
|
6147
6436
|
} catch (e) {
|
|
6148
6437
|
return Promise.reject(e);
|
|
@@ -6150,10 +6439,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6150
6439
|
};
|
|
6151
6440
|
_proto.avatarsGetPromptsT = function avatarsGetPromptsT(user_ext_id) {
|
|
6152
6441
|
try {
|
|
6153
|
-
var
|
|
6154
|
-
return Promise.resolve(
|
|
6155
|
-
var
|
|
6156
|
-
return avatarPromptTransform((
|
|
6442
|
+
var _this88 = this;
|
|
6443
|
+
return Promise.resolve(_this88.avatarsGetPrompts(user_ext_id)).then(function (_this88$avatarsGetPro) {
|
|
6444
|
+
var _this88$avatarsGetPro2;
|
|
6445
|
+
return avatarPromptTransform((_this88$avatarsGetPro2 = _this88$avatarsGetPro.prompts) != null ? _this88$avatarsGetPro2 : [], _this88.avatarDomain);
|
|
6157
6446
|
});
|
|
6158
6447
|
} catch (e) {
|
|
6159
6448
|
return Promise.reject(e);
|
|
@@ -6164,20 +6453,20 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6164
6453
|
};
|
|
6165
6454
|
_proto.getRelatedItemsForGame = function getRelatedItemsForGame(user_ext_id, related_game_id) {
|
|
6166
6455
|
try {
|
|
6167
|
-
var
|
|
6168
|
-
var message =
|
|
6456
|
+
var _this89 = this;
|
|
6457
|
+
var message = _this89.buildMessage(user_ext_id, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST, {
|
|
6169
6458
|
related_game_id: related_game_id
|
|
6170
6459
|
});
|
|
6171
|
-
return Promise.resolve(
|
|
6460
|
+
return Promise.resolve(_this89.send(message, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE));
|
|
6172
6461
|
} catch (e) {
|
|
6173
6462
|
return Promise.reject(e);
|
|
6174
6463
|
}
|
|
6175
6464
|
};
|
|
6176
6465
|
_proto.getRafflesT = function getRafflesT(user_ext_id) {
|
|
6177
6466
|
try {
|
|
6178
|
-
var
|
|
6179
|
-
return Promise.resolve(
|
|
6180
|
-
return raffleTransform(
|
|
6467
|
+
var _this90 = this;
|
|
6468
|
+
return Promise.resolve(_this90.getRaffles(user_ext_id)).then(function (_this90$getRaffles) {
|
|
6469
|
+
return raffleTransform(_this90$getRaffles.items);
|
|
6181
6470
|
});
|
|
6182
6471
|
} catch (e) {
|
|
6183
6472
|
return Promise.reject(e);
|
|
@@ -6185,18 +6474,18 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6185
6474
|
};
|
|
6186
6475
|
_proto.getRaffles = function getRaffles(user_ext_id) {
|
|
6187
6476
|
try {
|
|
6188
|
-
var
|
|
6189
|
-
var message =
|
|
6190
|
-
return Promise.resolve(
|
|
6477
|
+
var _this91 = this;
|
|
6478
|
+
var message = _this91.buildMessage(user_ext_id, exports.ClassId.RAF_GET_RAFFLES_REQUEST);
|
|
6479
|
+
return Promise.resolve(_this91.send(message, exports.ClassId.RAF_GET_RAFFLES_RESPONSE));
|
|
6191
6480
|
} catch (e) {
|
|
6192
6481
|
return Promise.reject(e);
|
|
6193
6482
|
}
|
|
6194
6483
|
};
|
|
6195
6484
|
_proto.getRaffleDrawRun = function getRaffleDrawRun(user_ext_id, payload) {
|
|
6196
6485
|
try {
|
|
6197
|
-
var
|
|
6198
|
-
var message =
|
|
6199
|
-
return Promise.resolve(
|
|
6486
|
+
var _this92 = this;
|
|
6487
|
+
var message = _this92.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_RUN_REQUEST, payload);
|
|
6488
|
+
return Promise.resolve(_this92.send(message, exports.ClassId.RAF_GET_DRAW_RUN_RESPONSE));
|
|
6200
6489
|
} catch (e) {
|
|
6201
6490
|
return Promise.reject(e);
|
|
6202
6491
|
}
|
|
@@ -6209,10 +6498,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6209
6498
|
winners_to = 20;
|
|
6210
6499
|
}
|
|
6211
6500
|
try {
|
|
6212
|
-
var
|
|
6501
|
+
var _this93 = this;
|
|
6213
6502
|
var winners_limit = winners_to - winners_from > 50 ? 50 : winners_to - winners_from;
|
|
6214
6503
|
var winners_offset = winners_from;
|
|
6215
|
-
return Promise.resolve(
|
|
6504
|
+
return Promise.resolve(_this93.getRaffleDrawRun(user_ext_id, {
|
|
6216
6505
|
raffle_id: raffle_id,
|
|
6217
6506
|
run_id: run_id,
|
|
6218
6507
|
winners_limit: winners_limit,
|
|
@@ -6224,41 +6513,41 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6224
6513
|
};
|
|
6225
6514
|
_proto.getRaffleDrawRunsHistory = function getRaffleDrawRunsHistory(user_ext_id, props) {
|
|
6226
6515
|
try {
|
|
6227
|
-
var
|
|
6228
|
-
var message =
|
|
6229
|
-
return Promise.resolve(
|
|
6516
|
+
var _this94 = this;
|
|
6517
|
+
var message = _this94.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_HISTORY_REQUEST, props);
|
|
6518
|
+
return Promise.resolve(_this94.send(message, exports.ClassId.RAF_GET_DRAW_HISTORY_RESPONSE));
|
|
6230
6519
|
} catch (e) {
|
|
6231
6520
|
return Promise.reject(e);
|
|
6232
6521
|
}
|
|
6233
6522
|
};
|
|
6234
6523
|
_proto.claimRafflePrize = function claimRafflePrize(user_ext_id, props) {
|
|
6235
6524
|
try {
|
|
6236
|
-
var
|
|
6237
|
-
var message =
|
|
6238
|
-
return Promise.resolve(
|
|
6525
|
+
var _this95 = this;
|
|
6526
|
+
var message = _this95.buildMessage(user_ext_id, exports.ClassId.RAF_CLAIM_PRIZE_REQUEST, props);
|
|
6527
|
+
return Promise.resolve(_this95.send(message, exports.ClassId.RAF_CLAIM_PRIZE_RESPONSE));
|
|
6239
6528
|
} catch (e) {
|
|
6240
6529
|
return Promise.reject(e);
|
|
6241
6530
|
}
|
|
6242
6531
|
};
|
|
6243
6532
|
_proto.raffleOptin = function raffleOptin(user_ext_id, props) {
|
|
6244
6533
|
try {
|
|
6245
|
-
var
|
|
6246
|
-
var message =
|
|
6247
|
-
return Promise.resolve(
|
|
6534
|
+
var _this96 = this;
|
|
6535
|
+
var message = _this96.buildMessage(user_ext_id, exports.ClassId.RAF_OPTIN_REQUEST, props);
|
|
6536
|
+
return Promise.resolve(_this96.send(message, exports.ClassId.RAF_OPTIN_RESPONSE));
|
|
6248
6537
|
} catch (e) {
|
|
6249
6538
|
return Promise.reject(e);
|
|
6250
6539
|
}
|
|
6251
6540
|
};
|
|
6252
6541
|
_proto.getActivityLog = function getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset) {
|
|
6253
6542
|
try {
|
|
6254
|
-
var
|
|
6255
|
-
var message =
|
|
6543
|
+
var _this97 = this;
|
|
6544
|
+
var message = _this97.buildMessage(user_ext_id, exports.ClassId.GET_POINT_HISTORY_REQUEST, {
|
|
6256
6545
|
startTimeSeconds: Math.floor(startTimeSeconds),
|
|
6257
6546
|
endTimeSeconds: Math.floor(endTimeSeconds),
|
|
6258
6547
|
limit: limit,
|
|
6259
6548
|
offset: offset
|
|
6260
6549
|
});
|
|
6261
|
-
return Promise.resolve(
|
|
6550
|
+
return Promise.resolve(_this97.send(message, exports.ClassId.GET_POINT_HISTORY_RESPONSE));
|
|
6262
6551
|
} catch (e) {
|
|
6263
6552
|
return Promise.reject(e);
|
|
6264
6553
|
}
|
|
@@ -6271,11 +6560,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6271
6560
|
to = 50;
|
|
6272
6561
|
}
|
|
6273
6562
|
try {
|
|
6274
|
-
var
|
|
6563
|
+
var _this98 = this;
|
|
6275
6564
|
var limit = to - from > 50 ? 50 : to - from;
|
|
6276
6565
|
var offset = from;
|
|
6277
|
-
return Promise.resolve(
|
|
6278
|
-
return ActivityLogTransform(
|
|
6566
|
+
return Promise.resolve(_this98.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset)).then(function (_this98$getActivityLo) {
|
|
6567
|
+
return ActivityLogTransform(_this98$getActivityLo.logHistory);
|
|
6279
6568
|
});
|
|
6280
6569
|
} catch (e) {
|
|
6281
6570
|
return Promise.reject(e);
|
|
@@ -6792,6 +7081,7 @@ exports.WSAPI = WSAPI;
|
|
|
6792
7081
|
exports.avatarCustomizedTransform = avatarCustomizedTransform;
|
|
6793
7082
|
exports.avatarDefinitionTransform = avatarDefinitionTransform;
|
|
6794
7083
|
exports.avatarPromptTransform = avatarPromptTransform;
|
|
7084
|
+
exports.clanTournamentPlayersTransform = clanTournamentPlayersTransform;
|
|
6795
7085
|
exports.drawRunHistoryTransform = drawRunHistoryTransform;
|
|
6796
7086
|
exports.drawRunTransform = drawRunTransform;
|
|
6797
7087
|
exports.drawTransform = drawTransform;
|