@smartico/public-api 0.0.154 → 0.0.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +12 -0
- package/dist/Base/ProtocolRequest.d.ts +1 -1
- package/dist/Base/ProtocolResponse.d.ts +1 -1
- package/dist/Core/CheckSegmentMatchRequest.d.ts +1 -1
- package/dist/Core/CheckSegmentMatchResponse.d.ts +1 -1
- package/dist/Core/GetAchievementsUserInfoRequest.d.ts +1 -1
- package/dist/Core/GetAchievementsUserInfoResponse.d.ts +1 -1
- package/dist/Core/GetLabelInfoRequest.d.ts +1 -1
- package/dist/Core/GetLabelInfoResponse.d.ts +1 -1
- package/dist/Core/GetTranslationsRequest.d.ts +2 -2
- package/dist/Core/GetTranslationsResponse.d.ts +1 -1
- package/dist/Core/ResponseIdentify.d.ts +2 -2
- package/dist/CustomSections/GetCustomSectionsRequest.d.ts +1 -1
- package/dist/CustomSections/GetCustomSectionsResponse.d.ts +2 -2
- package/dist/CustomSections/UICustomSection.d.ts +2 -2
- package/dist/GResponse.d.ts +1 -1
- package/dist/Inbox/GetInboxMessagesRequest.d.ts +1 -1
- package/dist/Inbox/GetInboxMessagesResponse.d.ts +3 -3
- package/dist/Inbox/InboxMessage.d.ts +2 -2
- package/dist/Inbox/MarkInboxMessageDeletedRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageDeletedResponse.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageReadRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageReadResponse.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageStarredRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageStarredResponse.d.ts +1 -1
- package/dist/Inbox/index.d.ts +8 -8
- package/dist/Jackpots/GetJackpotsPotsRequest.d.ts +1 -1
- package/dist/Jackpots/GetJackpotsPotsResponse.d.ts +2 -2
- package/dist/Jackpots/GetJackpotsRequest.d.ts +1 -1
- package/dist/Jackpots/GetJackpotsResponse.d.ts +2 -2
- package/dist/Jackpots/JackpotDetails.d.ts +6 -6
- package/dist/Jackpots/JackpotWinPush.d.ts +3 -3
- package/dist/Jackpots/JackpotsOptinRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptinResponse.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptoutRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptoutResponse.d.ts +1 -1
- package/dist/Leaderboard/GetLeaderBoardsRequest.d.ts +2 -2
- package/dist/Leaderboard/GetLeaderBoardsResponse.d.ts +2 -2
- package/dist/Leaderboard/LeaderBoardDetails.d.ts +3 -3
- package/dist/Leaderboard/LeaderBoards.d.ts +2 -2
- package/dist/Leaderboard/index.d.ts +6 -6
- package/dist/Level/GetLevelMapResponse.d.ts +3 -3
- package/dist/Level/Level.d.ts +1 -1
- package/dist/MiniGames/SAWAcknowledgeSpinPushRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoAknowledgeRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoAknowledgeResponse.d.ts +1 -1
- package/dist/MiniGames/SAWDoSpinRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoSpinResponse.d.ts +2 -2
- package/dist/MiniGames/SAWEventSawPush.d.ts +1 -1
- package/dist/MiniGames/SAWGetTemplatesRequest.d.ts +1 -1
- package/dist/MiniGames/SAWGetTemplatesResponse.d.ts +3 -3
- package/dist/MiniGames/SAWPrize.d.ts +2 -2
- package/dist/MiniGames/SAWPrizeDropAknowledgeRequest.d.ts +3 -1
- package/dist/MiniGames/SAWPrizeDropAknowledgeResponse.d.ts +1 -1
- package/dist/MiniGames/SAWPrizeDropWinPush.d.ts +4 -3
- package/dist/MiniGames/SAWPrizeUI.d.ts +2 -2
- package/dist/MiniGames/SAWSpinsCountPush.d.ts +1 -1
- package/dist/MiniGames/SAWTemplate.d.ts +4 -4
- package/dist/MiniGames/SAWTemplateUI.d.ts +1 -1
- package/dist/MiniGames/SAWUtils.d.ts +1 -1
- package/dist/MiniGames/index.d.ts +24 -22
- package/dist/Missions/AchClaimPrizeRequest.d.ts +1 -1
- package/dist/Missions/AchClaimPrizeResponse.d.ts +1 -1
- package/dist/Missions/AchievementCategory.d.ts +2 -2
- package/dist/Missions/AchievementOptinRequest.d.ts +1 -1
- package/dist/Missions/AchievementOptinResponse.d.ts +1 -1
- package/dist/Missions/GetAchCategoriesRequest.d.ts +1 -1
- package/dist/Missions/GetAchCategoriesResponse.d.ts +2 -2
- package/dist/Missions/GetAchievementMapRequest.d.ts +1 -1
- package/dist/Missions/GetAchievementMapResponse.d.ts +2 -2
- package/dist/Missions/GetRelatedAchTourRequest.d.ts +1 -1
- package/dist/Missions/GetRelatedAchTourResponse.d.ts +3 -3
- package/dist/Missions/ReloadAchievementsEvent.d.ts +2 -2
- package/dist/Missions/UserAchievement.d.ts +7 -7
- package/dist/Missions/UserAchievementTask.d.ts +2 -2
- package/dist/Missions/index.d.ts +13 -13
- package/dist/Quiz/MarketsInfo.d.ts +2 -2
- package/dist/Quiz/MarketsPerSport.d.ts +1 -1
- package/dist/SmarticoAPI.d.ts +8 -8
- package/dist/SmarticoLib/index.d.ts +39 -39
- package/dist/Store/BuyStoreItemRequest.d.ts +1 -1
- package/dist/Store/BuyStoreItemResponse.d.ts +1 -1
- package/dist/Store/GetCategoriesStoreResponse.d.ts +2 -2
- package/dist/Store/GetStoreHistoryRequest.d.ts +1 -1
- package/dist/Store/GetStoreHistoryResponse.d.ts +2 -2
- package/dist/Store/GetStoreItemsResponse.d.ts +2 -2
- package/dist/Store/StoreCategory.d.ts +2 -2
- package/dist/Store/StoreItem.d.ts +3 -3
- package/dist/Store/StoreItemPurchased.d.ts +2 -2
- package/dist/Store/index.d.ts +10 -10
- package/dist/Tournaments/GetTournamentInfoRequest.d.ts +1 -1
- package/dist/Tournaments/GetTournamentInfoResponse.d.ts +5 -5
- package/dist/Tournaments/GetTournamentsRequest.d.ts +1 -1
- package/dist/Tournaments/GetTournamentsResponse.d.ts +2 -2
- package/dist/Tournaments/Tournament.d.ts +8 -8
- package/dist/Tournaments/TournamentPrize.d.ts +1 -1
- package/dist/Tournaments/TournamentRegisterRequest.d.ts +1 -1
- package/dist/Tournaments/TournamentRegisterResponse.d.ts +2 -2
- package/dist/Tournaments/TournamentUtils.d.ts +3 -3
- package/dist/Tournaments/index.d.ts +16 -16
- package/dist/WSAPI/WSAPI.d.ts +65 -65
- package/dist/WSAPI/WSAPITypes.d.ts +18 -18
- package/dist/index.js +76 -78
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +103 -103
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Base/AchRelatedGame.ts +13 -13
- package/src/Base/ClassId.ts +118 -121
- package/src/Base/ProtocolMessage.ts +6 -7
- package/src/Base/ProtocolRequest.ts +4 -5
- package/src/Base/ProtocolResponse.ts +3 -5
- package/src/CookieStore.ts +10 -11
- package/src/Core/ActivityTypeLimited.ts +17 -18
- package/src/Core/CheckSegmentMatchRequest.ts +2 -3
- package/src/Core/CheckSegmentMatchResponse.ts +6 -6
- package/src/Core/CoreUtils.ts +37 -39
- package/src/Core/GetAchievementsUserInfoRequest.ts +2 -4
- package/src/Core/GetAchievementsUserInfoResponse.ts +4 -4
- package/src/Core/GetLabelInfoRequest.ts +2 -4
- package/src/Core/GetLabelInfoResponse.ts +4 -4
- package/src/Core/GetTranslationsRequest.ts +5 -7
- package/src/Core/GetTranslationsResponse.ts +3 -5
- package/src/Core/PublicLabelSettings.ts +29 -30
- package/src/Core/PublicProperties.ts +7 -7
- package/src/Core/ResponseIdentify.ts +12 -12
- package/src/Core/TranslationArea.ts +8 -9
- package/src/Core/index.ts +1 -1
- package/src/CustomSections/AchCustomSection.ts +20 -20
- package/src/CustomSections/GetCustomSectionsRequest.ts +2 -4
- package/src/CustomSections/GetCustomSectionsResponse.ts +4 -5
- package/src/CustomSections/UICustomSection.ts +30 -29
- package/src/CustomSections/index.ts +4 -4
- package/src/ErrorCodes.ts +11 -12
- package/src/GResponse.ts +5 -5
- package/src/ILogger.ts +6 -10
- package/src/Inbox/GetInboxMessagesRequest.ts +4 -5
- package/src/Inbox/GetInboxMessagesResponse.ts +15 -17
- package/src/Inbox/InboxMessage.ts +31 -33
- package/src/Inbox/InboxMessageType.ts +9 -9
- package/src/Inbox/MarkInboxMessageDeletedRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageDeletedResponse.ts +3 -3
- package/src/Inbox/MarkInboxMessageReadRequest.ts +4 -5
- package/src/Inbox/MarkInboxMessageReadResponse.ts +4 -5
- package/src/Inbox/MarkInboxMessageStarredRequest.ts +4 -5
- package/src/Inbox/MarkInboxMessageStarredResponse.ts +4 -5
- package/src/Inbox/index.ts +10 -10
- package/src/IntUtils.ts +72 -85
- package/src/Jackpots/GetJackpotsPotsRequest.ts +3 -3
- package/src/Jackpots/GetJackpotsPotsResponse.ts +3 -5
- package/src/Jackpots/GetJackpotsRequest.ts +4 -6
- package/src/Jackpots/GetJackpotsResponse.ts +5 -7
- package/src/Jackpots/JackPotWinner.ts +11 -12
- package/src/Jackpots/JackpotContributionType.ts +3 -4
- package/src/Jackpots/JackpotDetails.ts +31 -31
- package/src/Jackpots/JackpotHtmlTemplate.ts +3 -3
- package/src/Jackpots/JackpotPot.ts +11 -12
- package/src/Jackpots/JackpotPublicMeta.ts +16 -16
- package/src/Jackpots/JackpotType.ts +2 -5
- package/src/Jackpots/JackpotWinPush.ts +6 -6
- package/src/Jackpots/JackpotsOptinRequest.ts +3 -5
- package/src/Jackpots/JackpotsOptinResponse.ts +2 -4
- package/src/Jackpots/JackpotsOptoutRequest.ts +3 -5
- package/src/Jackpots/JackpotsOptoutResponse.ts +2 -4
- package/src/Jackpots/index.ts +16 -16
- package/src/Leaderboard/GetLeaderBoardsRequest.ts +8 -9
- package/src/Leaderboard/GetLeaderBoardsResponse.ts +4 -6
- package/src/Leaderboard/LeaderBoardDetails.ts +11 -12
- package/src/Leaderboard/LeaderBoardPeriodType.ts +3 -3
- package/src/Leaderboard/LeaderBoardPosition.ts +9 -10
- package/src/Leaderboard/LeaderBoardPublicMeta.ts +3 -4
- package/src/Leaderboard/LeaderBoards.ts +42 -42
- package/src/Leaderboard/index.ts +6 -6
- package/src/Level/GetLevelMapResponse.ts +18 -21
- package/src/Level/Level.ts +10 -11
- package/src/Level/LevelPublicMeta.ts +17 -17
- package/src/Level/index.ts +3 -3
- package/src/MiniGames/SAWAcknowledgeSpinPushRequest.ts +3 -4
- package/src/MiniGames/SAWAcknowledgeType.ts +3 -4
- package/src/MiniGames/SAWAskForUsername.ts +3 -4
- package/src/MiniGames/SAWBuyInType.ts +15 -13
- package/src/MiniGames/SAWDoAknowledgeRequest.ts +3 -3
- package/src/MiniGames/SAWDoAknowledgeResponse.ts +3 -3
- package/src/MiniGames/SAWDoSpinRequest.ts +3 -5
- package/src/MiniGames/SAWDoSpinResponse.ts +10 -11
- package/src/MiniGames/SAWEventSawPush.ts +3 -4
- package/src/MiniGames/SAWGameType.ts +23 -21
- package/src/MiniGames/SAWGetTemplatesRequest.ts +3 -3
- package/src/MiniGames/SAWGetTemplatesResponse.ts +53 -65
- package/src/MiniGames/SAWPrize.ts +11 -12
- package/src/MiniGames/SAWPrizeDropAknowledgeRequest.ts +5 -3
- package/src/MiniGames/SAWPrizeDropAknowledgeResponse.ts +3 -3
- package/src/MiniGames/SAWPrizeDropWinPush.ts +9 -8
- package/src/MiniGames/SAWPrizeType.ts +23 -22
- package/src/MiniGames/SAWPrizeUI.ts +17 -17
- package/src/MiniGames/SAWSpinErrorCode.ts +15 -16
- package/src/MiniGames/SAWSpinsCountPush.ts +4 -4
- package/src/MiniGames/SAWTemplate.ts +29 -29
- package/src/MiniGames/SAWTemplateUI.ts +45 -47
- package/src/MiniGames/SAWUtils.ts +23 -26
- package/src/MiniGames/SAWWinSoundType.ts +10 -11
- package/src/MiniGames/index.ts +24 -22
- package/src/Missions/AchCategoryPublicMeta.ts +2 -3
- package/src/Missions/AchClaimPrizeRequest.ts +4 -5
- package/src/Missions/AchClaimPrizeResponse.ts +3 -4
- package/src/Missions/AchievementCategory.ts +14 -15
- package/src/Missions/AchievementOptinRequest.ts +3 -5
- package/src/Missions/AchievementOptinResponse.ts +2 -4
- package/src/Missions/AchievementPublicMeta.ts +19 -20
- package/src/Missions/AchievementStatus.ts +7 -8
- package/src/Missions/AchievementTaskPublicMeta.ts +2 -3
- package/src/Missions/AchievementTaskType.ts +2 -2
- package/src/Missions/AchievementType.ts +2 -3
- package/src/Missions/GetAchCategoriesRequest.ts +2 -4
- package/src/Missions/GetAchCategoriesResponse.ts +4 -5
- package/src/Missions/GetAchievementMapRequest.ts +2 -4
- package/src/Missions/GetAchievementMapResponse.ts +3 -5
- package/src/Missions/GetRelatedAchTourRequest.ts +3 -4
- package/src/Missions/GetRelatedAchTourResponse.ts +5 -7
- package/src/Missions/ReloadAchievementsEvent.ts +5 -5
- package/src/Missions/ScheduledMissionType.ts +4 -5
- package/src/Missions/UserAchievement.ts +104 -108
- package/src/Missions/UserAchievementTask.ts +13 -15
- package/src/Missions/index.ts +19 -19
- package/src/NodeCache.ts +44 -49
- package/src/OCache.ts +51 -57
- package/src/Quiz/MarketsAnswers.ts +34 -34
- package/src/Quiz/MarketsInfo.ts +184 -177
- package/src/Quiz/MarketsPerSport.ts +30 -37
- package/src/Quiz/MarketsType.ts +28 -28
- package/src/Quiz/ScoreResultTypes.ts +18 -18
- package/src/Quiz/SportTypes.ts +4 -4
- package/src/Quiz/index.ts +6 -6
- package/src/SmarticoAPI.ts +769 -730
- package/src/SmarticoLib/index.ts +1053 -1069
- package/src/Store/BuyStoreItemErrorCode.ts +10 -10
- package/src/Store/BuyStoreItemRequest.ts +2 -2
- package/src/Store/BuyStoreItemResponse.ts +2 -3
- package/src/Store/GetCategoriesStoreResponse.ts +3 -8
- package/src/Store/GetStoreHistoryRequest.ts +3 -3
- package/src/Store/GetStoreHistoryResponse.ts +4 -4
- package/src/Store/GetStoreItemsResponse.ts +3 -4
- package/src/Store/StoreCategory.ts +14 -15
- package/src/Store/StoreCategoryPublicMeta.ts +2 -3
- package/src/Store/StoreItem.ts +32 -33
- package/src/Store/StoreItemPublicMeta.ts +10 -10
- package/src/Store/StoreItemPurchased.ts +40 -40
- package/src/Store/StoreItemType.ts +20 -19
- package/src/Store/index.ts +13 -13
- package/src/Tournaments/GetTournamentInfoRequest.ts +2 -3
- package/src/Tournaments/GetTournamentInfoResponse.ts +45 -48
- package/src/Tournaments/GetTournamentsRequest.ts +2 -4
- package/src/Tournaments/GetTournamentsResponse.ts +7 -14
- package/src/Tournaments/Tournament.ts +109 -115
- package/src/Tournaments/TournamentInstanceStatus.ts +17 -18
- package/src/Tournaments/TournamentPlayer.ts +7 -8
- package/src/Tournaments/TournamentPrize.ts +9 -10
- package/src/Tournaments/TournamentPublicMeta.ts +26 -26
- package/src/Tournaments/TournamentRegisterRequest.ts +2 -3
- package/src/Tournaments/TournamentRegisterResponse.ts +3 -7
- package/src/Tournaments/TournamentRegistrationError.ts +9 -9
- package/src/Tournaments/TournamentRegistrationStatus.ts +25 -27
- package/src/Tournaments/TournamentRegistrationType.ts +15 -16
- package/src/Tournaments/TournamentType.ts +3 -4
- package/src/Tournaments/TournamentUtils.ts +90 -89
- package/src/Tournaments/index.ts +16 -16
- package/src/WSAPI/WSAPI.ts +781 -763
- package/src/WSAPI/WSAPITypes.ts +574 -586
- package/src/index.ts +15 -15
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
/** @hidden */
|
|
2
2
|
export enum SAWPrizeType {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
JACKPOT = 6
|
|
3
|
+
NO_PRIZE = 1,
|
|
4
|
+
POINTS = 2,
|
|
5
|
+
BONUS = 3,
|
|
6
|
+
MANUAL = 4,
|
|
7
|
+
SPIN = 5,
|
|
8
|
+
JACKPOT = 6,
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
export enum MiniGamePrizeTypeName {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
NO_PRIZE = 'no-prize',
|
|
13
|
+
POINTS = 'points',
|
|
14
|
+
BONUS = 'bonus',
|
|
15
|
+
MANUAL = 'manual',
|
|
16
|
+
SPIN = 'spin',
|
|
17
|
+
JACKPOT = 'jackpot',
|
|
18
|
+
UNKNOWN = 'unknown',
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
/** @hidden */
|
|
23
22
|
export const MiniGamePrizeTypeNamed = (type: SAWPrizeType): MiniGamePrizeTypeName => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
return (
|
|
24
|
+
{
|
|
25
|
+
[SAWPrizeType.NO_PRIZE]: MiniGamePrizeTypeName.NO_PRIZE,
|
|
26
|
+
[SAWPrizeType.POINTS]: MiniGamePrizeTypeName.POINTS,
|
|
27
|
+
[SAWPrizeType.BONUS]: MiniGamePrizeTypeName.BONUS,
|
|
28
|
+
[SAWPrizeType.MANUAL]: MiniGamePrizeTypeName.MANUAL,
|
|
29
|
+
[SAWPrizeType.SPIN]: MiniGamePrizeTypeName.SPIN,
|
|
30
|
+
[SAWPrizeType.JACKPOT]: MiniGamePrizeTypeName.JACKPOT,
|
|
31
|
+
}[type] || MiniGamePrizeTypeName.UNKNOWN
|
|
32
|
+
)
|
|
32
33
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { SAWAcknowledgeType } from
|
|
2
|
-
import { SAWWinSoundType } from
|
|
1
|
+
import { SAWAcknowledgeType } from './SAWAcknowledgeType'
|
|
2
|
+
import { SAWWinSoundType } from './SAWWinSoundType'
|
|
3
3
|
|
|
4
4
|
export interface SAWPrizeUI {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
5
|
+
position?: number // for scratch card defines position of prize in the list
|
|
6
|
+
name: string
|
|
7
|
+
name_original: string // keeps original name, how it came from the servers. This is needed for the Jackpot value replacemenet
|
|
8
|
+
aknowledge_message: string
|
|
9
|
+
sectors: number[]
|
|
10
|
+
acknowledge_type: SAWAcknowledgeType
|
|
11
|
+
acknowledge_dp?: string
|
|
12
|
+
font_size?: number
|
|
13
|
+
font_size_mobile?: number
|
|
14
|
+
sound_type: SAWWinSoundType
|
|
15
|
+
icon?: string
|
|
16
|
+
replace_name_with_image?: boolean
|
|
17
|
+
acknowledge_action_title?: string
|
|
18
|
+
custom_win_sound?: string
|
|
19
|
+
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
|
|
2
1
|
/*
|
|
3
|
-
* Possible error codes for the mini-games attempts
|
|
4
|
-
*/
|
|
2
|
+
* Possible error codes for the mini-games attempts
|
|
3
|
+
*/
|
|
5
4
|
export enum SAWSpinErrorCode {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
5
|
+
/** No error */
|
|
6
|
+
SAW_OK = 0,
|
|
7
|
+
/** User doesn't have 'spin attempts' to play. In case buy in type for the game is 'spins' based */
|
|
8
|
+
SAW_NO_SPINS = 40001,
|
|
9
|
+
/** The are no prizes left to play the game */
|
|
10
|
+
SAW_PRIZE_POOL_EMPTY = 40002,
|
|
11
|
+
/** User doesn't have enough points to play. In case buy in type for the game is 'points' based */
|
|
12
|
+
SAW_NOT_ENOUGH_POINTS = 40003,
|
|
13
|
+
/** User reached max number of game attempts defined in the BackOffice */
|
|
14
|
+
SAW_FAILED_MAX_SPINS_REACHED = 40004,
|
|
15
|
+
/** Special code for the 'visitor' mode */
|
|
16
|
+
SAW_VISITOR_STOP_SPIN_REQUEST = -40001,
|
|
17
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProtocolMessage } from
|
|
1
|
+
import { ProtocolMessage } from '.././Base/ProtocolMessage'
|
|
2
2
|
|
|
3
3
|
export interface SAWSpinsCountPush extends ProtocolMessage {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
4
|
+
saw_template_id: number
|
|
5
|
+
spin_count: number
|
|
6
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { SAWBuyInType } from
|
|
2
|
-
import { SAWGameType } from
|
|
3
|
-
import { SAWPrize } from
|
|
4
|
-
import { SAWTemplateUI } from
|
|
1
|
+
import { SAWBuyInType } from './SAWBuyInType'
|
|
2
|
+
import { SAWGameType } from './SAWGameType'
|
|
3
|
+
import { SAWPrize } from './SAWPrize'
|
|
4
|
+
import { SAWTemplateUI } from './SAWTemplateUI'
|
|
5
5
|
|
|
6
6
|
export interface SAWTemplate {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
saw_template_id: number
|
|
8
|
+
saw_game_type_id: SAWGameType
|
|
9
|
+
saw_template_ui_definition: SAWTemplateUI
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
saw_buyin_type_id: SAWBuyInType
|
|
12
|
+
buyin_cost_points?: number
|
|
13
|
+
visibile_when_can_spin: boolean
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
spin_count?: number // inital count, after that server will push SAWSpinsCountPush
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
prizes: SAWPrize[]
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
is_visible: boolean
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
jackpot_add_on_attempt: number
|
|
22
|
+
jackpot_current: number
|
|
23
|
+
jackpot_guaranteed: number
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
maxActiveSpinsAllowed: number
|
|
26
|
+
maxSpinsCount: number
|
|
27
|
+
maxSpinsPediodMs: number
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
next_available_spin_ts?: number
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
saw_skin_key: string
|
|
32
|
+
saw_skin_ui_definition: {
|
|
33
|
+
skin_folder: string
|
|
34
|
+
skin_css: string
|
|
35
|
+
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
expose_game_stat_on_api?: boolean
|
|
38
|
+
|
|
39
|
+
// AA: releavnt only in the context of the SAWPrizeDropWinPush
|
|
40
|
+
requires_prize_claim?: boolean
|
|
41
41
|
}
|
|
@@ -1,53 +1,51 @@
|
|
|
1
|
-
import { SAWAskForUsername } from
|
|
1
|
+
import { SAWAskForUsername } from './SAWAskForUsername'
|
|
2
2
|
|
|
3
3
|
export interface SAWTemplateUI {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
4
|
+
skin: string
|
|
5
|
+
name: string
|
|
6
|
+
description?: string
|
|
7
|
+
over_limit_message?: string
|
|
8
|
+
no_attempts_message?: string
|
|
9
|
+
thumbnail?: string
|
|
10
|
+
sectors_count: number
|
|
11
|
+
priority: number
|
|
12
|
+
flow_builder_only: boolean
|
|
13
|
+
background_image?: string
|
|
14
|
+
background_image_mobile?: string
|
|
15
|
+
background_sound?: string
|
|
16
|
+
spin_animation_duration?: number
|
|
17
|
+
scratch_logo?: string
|
|
18
|
+
scratch_cover?: string
|
|
19
|
+
scratch_bg_desktop?: string
|
|
20
|
+
scratch_bg_mobile?: string
|
|
21
|
+
scratch_cursor?: string
|
|
22
|
+
custom_css?: string
|
|
23
|
+
custom_skin_folder?: string
|
|
24
|
+
jackpot_symbol?: string
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
promo_image?: string
|
|
27
|
+
promo_text?: string
|
|
28
|
+
matchx_banner?: string
|
|
29
|
+
matchx_seasonal_ranking?: boolean
|
|
30
|
+
matchx_is_completed?: boolean
|
|
31
|
+
matchx_general_board_users_count?: number
|
|
32
|
+
matchx_hide_ranking?: boolean
|
|
33
|
+
ask_for_username?: SAWAskForUsername
|
|
34
|
+
show_prize_board?: boolean
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
max_spins_period_ms?: number
|
|
37
|
+
show_countdown_for_next_availability?: boolean
|
|
38
|
+
disable_background_music?: boolean
|
|
39
|
+
custom_section_id?: number
|
|
40
|
+
only_in_custom_section?: boolean
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
custom_data: any
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
44
|
+
// prize drop specific
|
|
45
|
+
placeholder1?: string
|
|
46
|
+
placeholder2?: string
|
|
47
|
+
prize_drop_template?: {
|
|
48
|
+
id: string
|
|
49
|
+
content: string
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,31 +1,28 @@
|
|
|
1
|
-
import { SAWBuyInType } from
|
|
2
|
-
import { SAWTemplate } from
|
|
3
|
-
|
|
1
|
+
import { SAWBuyInType } from './SAWBuyInType'
|
|
2
|
+
import { SAWTemplate } from './SAWTemplate'
|
|
4
3
|
|
|
5
4
|
class SAWUtils {
|
|
5
|
+
public static canPlay = (t: SAWTemplate, pointsBalance: number): boolean => {
|
|
6
|
+
if (t === null || t === undefined) {
|
|
7
|
+
return false
|
|
8
|
+
}
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
console.error("MiniGamesUtils.canPlay: Unknwon SAW buyin type " + t.saw_buyin_type_id);
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
10
|
+
switch (t.saw_buyin_type_id) {
|
|
11
|
+
case SAWBuyInType.Free: {
|
|
12
|
+
return true
|
|
13
|
+
}
|
|
14
|
+
case SAWBuyInType.Spins: {
|
|
15
|
+
return t.spin_count !== null && t.spin_count > 0
|
|
16
|
+
}
|
|
17
|
+
case SAWBuyInType.Points: {
|
|
18
|
+
return t.buyin_cost_points <= pointsBalance
|
|
19
|
+
}
|
|
20
|
+
default: {
|
|
21
|
+
console.error('MiniGamesUtils.canPlay: Unknwon SAW buyin type ' + t.saw_buyin_type_id)
|
|
22
|
+
return false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
export { SAWUtils }
|
|
28
|
+
export { SAWUtils }
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
export enum SAWWinSoundType {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Custom = 5,
|
|
2
|
+
Disappointing = 1,
|
|
3
|
+
Positive = 2,
|
|
4
|
+
HighlyPositive = 3,
|
|
5
|
+
NoSound = 4,
|
|
6
|
+
Custom = 5,
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
export const SAWWinSoundFiles = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
10
|
+
[SAWWinSoundType.NoSound]: null,
|
|
11
|
+
[SAWWinSoundType.Disappointing]: 'saw-disappointed.m4a',
|
|
12
|
+
[SAWWinSoundType.Positive]: 'saw-positive.m4a',
|
|
13
|
+
[SAWWinSoundType.HighlyPositive]: 'saw-highly-positive.m4a',
|
|
14
|
+
}
|
package/src/MiniGames/index.ts
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
1
|
+
export * from './SAWUtils'
|
|
2
|
+
export * from './SAWAcknowledgeType'
|
|
3
|
+
export * from './SAWAskForUsername'
|
|
4
|
+
export * from './SAWBuyInType'
|
|
5
|
+
export * from './SAWDoSpinRequest'
|
|
6
|
+
export * from './SAWDoSpinResponse'
|
|
7
|
+
export * from './SAWGameType'
|
|
8
|
+
export * from './SAWGetTemplatesRequest'
|
|
9
|
+
export * from './SAWGetTemplatesResponse'
|
|
10
|
+
export * from './SAWPrize'
|
|
11
|
+
export * from './SAWPrizeType'
|
|
12
|
+
export * from './SAWPrizeUI'
|
|
13
|
+
export * from './SAWSpinErrorCode'
|
|
14
|
+
export * from './SAWTemplate'
|
|
15
|
+
export * from './SAWTemplateUI'
|
|
16
|
+
export * from './SAWWinSoundType'
|
|
17
|
+
export * from './SAWDoAknowledgeRequest'
|
|
18
|
+
export * from './SAWDoAknowledgeResponse'
|
|
19
|
+
export * from './SAWSpinsCountPush'
|
|
20
|
+
export * from './SAWPrizeDropWinPush'
|
|
21
|
+
export * from './SAWPrizeDropAknowledgeRequest'
|
|
22
|
+
export * from './SAWPrizeDropAknowledgeResponse'
|
|
23
|
+
export * from './SAWEventSawPush'
|
|
24
|
+
export * from './SAWAcknowledgeSpinPushRequest'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ProtocolMessage } from
|
|
1
|
+
import { ProtocolMessage } from '../Base/ProtocolMessage'
|
|
2
2
|
|
|
3
3
|
export interface AchClaimPrizeRequest extends ProtocolMessage {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
4
|
+
ach_id: number
|
|
5
|
+
ach_completed_id: number // ID of the completion fact from ach_completed or ach_completed_recurring tables
|
|
6
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ProtocolResponse } from
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse'
|
|
2
2
|
export interface AchClaimPrizeResponse extends ProtocolResponse {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
// no details here, just check for errCode and reload list of missions
|
|
4
|
+
}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { TAchCategory } from
|
|
2
|
-
import { AchCategoryPublicMeta } from
|
|
1
|
+
import { TAchCategory } from '../WSAPI/WSAPITypes'
|
|
2
|
+
import { AchCategoryPublicMeta } from './AchCategoryPublicMeta'
|
|
3
3
|
|
|
4
4
|
export interface AchCategory {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
publicMeta?: AchCategoryPublicMeta;
|
|
5
|
+
id?: number
|
|
6
|
+
publicMeta?: AchCategoryPublicMeta
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
export const AchCategoryTransform = (items: AchCategory[]): TAchCategory[] => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
9
|
+
export const AchCategoryTransform = (items: AchCategory[]): TAchCategory[] => {
|
|
10
|
+
return items.map((r) => {
|
|
11
|
+
const x: TAchCategory = {
|
|
12
|
+
id: r.id,
|
|
13
|
+
name: r.publicMeta?.name,
|
|
14
|
+
order: r.publicMeta?.order,
|
|
15
|
+
}
|
|
16
|
+
return x
|
|
17
|
+
})
|
|
18
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ProtocolResponse } from
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse'
|
|
2
2
|
|
|
3
|
-
export interface AchievementOptinResponse extends ProtocolResponse {
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
export interface AchievementOptinResponse extends ProtocolResponse {}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
export interface AchievementPublicMeta {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
custom_section_type_id?: number;
|
|
2
|
+
description?: string
|
|
3
|
+
unlock_mission_description?: string
|
|
4
|
+
custom_data?: string
|
|
5
|
+
cta_text?: string
|
|
6
|
+
cta_action?: string
|
|
7
|
+
label_tag?: string
|
|
8
|
+
custom_label_tag?: string
|
|
9
|
+
reward?: string
|
|
10
|
+
image_url?: string
|
|
11
|
+
name?: string
|
|
12
|
+
position?: number
|
|
13
|
+
hide_tasks?: boolean
|
|
14
|
+
hide_locked_mission?: boolean
|
|
15
|
+
custom_section_id?: number
|
|
16
|
+
only_in_custom_section?: boolean
|
|
17
|
+
hint_text?: string
|
|
18
|
+
hide_badge_from_ui?: boolean
|
|
19
|
+
show_badge_first_task_completed?: boolean
|
|
20
|
+
custom_section_type_id?: number
|
|
22
21
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export enum AchievementStatus {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Recurring = 7
|
|
2
|
+
Draft = 1,
|
|
3
|
+
AvailableUnlocked = 2,
|
|
4
|
+
AvailableLocked = 3,
|
|
5
|
+
Archived = 4,
|
|
6
|
+
FeaturedManually = 5,
|
|
7
|
+
FeaturedAI = 6,
|
|
8
|
+
Recurring = 7,
|
|
10
9
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ProtocolResponse } from
|
|
2
|
-
import { AchCategory } from
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse'
|
|
2
|
+
import { AchCategory } from './AchievementCategory'
|
|
3
3
|
|
|
4
4
|
export interface GetAchCategoriesResponse extends ProtocolResponse {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
5
|
+
categories: AchCategory[]
|
|
6
|
+
}
|