@smartico/public-api 0.0.154 → 0.0.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +12 -0
- package/dist/Base/ProtocolRequest.d.ts +1 -1
- package/dist/Base/ProtocolResponse.d.ts +1 -1
- package/dist/Core/CheckSegmentMatchRequest.d.ts +1 -1
- package/dist/Core/CheckSegmentMatchResponse.d.ts +1 -1
- package/dist/Core/GetAchievementsUserInfoRequest.d.ts +1 -1
- package/dist/Core/GetAchievementsUserInfoResponse.d.ts +1 -1
- package/dist/Core/GetLabelInfoRequest.d.ts +1 -1
- package/dist/Core/GetLabelInfoResponse.d.ts +1 -1
- package/dist/Core/GetTranslationsRequest.d.ts +2 -2
- package/dist/Core/GetTranslationsResponse.d.ts +1 -1
- package/dist/Core/ResponseIdentify.d.ts +2 -2
- package/dist/CustomSections/GetCustomSectionsRequest.d.ts +1 -1
- package/dist/CustomSections/GetCustomSectionsResponse.d.ts +2 -2
- package/dist/CustomSections/UICustomSection.d.ts +2 -2
- package/dist/GResponse.d.ts +1 -1
- package/dist/Inbox/GetInboxMessagesRequest.d.ts +1 -1
- package/dist/Inbox/GetInboxMessagesResponse.d.ts +3 -3
- package/dist/Inbox/InboxMessage.d.ts +2 -2
- package/dist/Inbox/MarkInboxMessageDeletedRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageDeletedResponse.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageReadRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageReadResponse.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageStarredRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageStarredResponse.d.ts +1 -1
- package/dist/Inbox/index.d.ts +8 -8
- package/dist/Jackpots/GetJackpotsPotsRequest.d.ts +1 -1
- package/dist/Jackpots/GetJackpotsPotsResponse.d.ts +2 -2
- package/dist/Jackpots/GetJackpotsRequest.d.ts +1 -1
- package/dist/Jackpots/GetJackpotsResponse.d.ts +2 -2
- package/dist/Jackpots/JackpotDetails.d.ts +6 -6
- package/dist/Jackpots/JackpotWinPush.d.ts +3 -3
- package/dist/Jackpots/JackpotsOptinRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptinResponse.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptoutRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptoutResponse.d.ts +1 -1
- package/dist/Leaderboard/GetLeaderBoardsRequest.d.ts +2 -2
- package/dist/Leaderboard/GetLeaderBoardsResponse.d.ts +2 -2
- package/dist/Leaderboard/LeaderBoardDetails.d.ts +3 -3
- package/dist/Leaderboard/LeaderBoards.d.ts +2 -2
- package/dist/Leaderboard/index.d.ts +6 -6
- package/dist/Level/GetLevelMapResponse.d.ts +3 -3
- package/dist/Level/Level.d.ts +1 -1
- package/dist/MiniGames/SAWAcknowledgeSpinPushRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoAknowledgeRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoAknowledgeResponse.d.ts +1 -1
- package/dist/MiniGames/SAWDoSpinRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoSpinResponse.d.ts +2 -2
- package/dist/MiniGames/SAWEventSawPush.d.ts +1 -1
- package/dist/MiniGames/SAWGetTemplatesRequest.d.ts +1 -1
- package/dist/MiniGames/SAWGetTemplatesResponse.d.ts +3 -3
- package/dist/MiniGames/SAWPrize.d.ts +2 -2
- package/dist/MiniGames/SAWPrizeDropAknowledgeRequest.d.ts +3 -1
- package/dist/MiniGames/SAWPrizeDropAknowledgeResponse.d.ts +1 -1
- package/dist/MiniGames/SAWPrizeDropWinPush.d.ts +4 -3
- package/dist/MiniGames/SAWPrizeUI.d.ts +2 -2
- package/dist/MiniGames/SAWSpinsCountPush.d.ts +1 -1
- package/dist/MiniGames/SAWTemplate.d.ts +4 -4
- package/dist/MiniGames/SAWTemplateUI.d.ts +1 -1
- package/dist/MiniGames/SAWUtils.d.ts +1 -1
- package/dist/MiniGames/index.d.ts +24 -22
- package/dist/Missions/AchClaimPrizeRequest.d.ts +1 -1
- package/dist/Missions/AchClaimPrizeResponse.d.ts +1 -1
- package/dist/Missions/AchievementCategory.d.ts +2 -2
- package/dist/Missions/AchievementOptinRequest.d.ts +1 -1
- package/dist/Missions/AchievementOptinResponse.d.ts +1 -1
- package/dist/Missions/GetAchCategoriesRequest.d.ts +1 -1
- package/dist/Missions/GetAchCategoriesResponse.d.ts +2 -2
- package/dist/Missions/GetAchievementMapRequest.d.ts +1 -1
- package/dist/Missions/GetAchievementMapResponse.d.ts +2 -2
- package/dist/Missions/GetRelatedAchTourRequest.d.ts +1 -1
- package/dist/Missions/GetRelatedAchTourResponse.d.ts +3 -3
- package/dist/Missions/ReloadAchievementsEvent.d.ts +2 -2
- package/dist/Missions/UserAchievement.d.ts +7 -7
- package/dist/Missions/UserAchievementTask.d.ts +2 -2
- package/dist/Missions/index.d.ts +13 -13
- package/dist/Quiz/MarketsInfo.d.ts +2 -2
- package/dist/Quiz/MarketsPerSport.d.ts +1 -1
- package/dist/SmarticoAPI.d.ts +8 -8
- package/dist/SmarticoLib/index.d.ts +39 -39
- package/dist/Store/BuyStoreItemRequest.d.ts +1 -1
- package/dist/Store/BuyStoreItemResponse.d.ts +1 -1
- package/dist/Store/GetCategoriesStoreResponse.d.ts +2 -2
- package/dist/Store/GetStoreHistoryRequest.d.ts +1 -1
- package/dist/Store/GetStoreHistoryResponse.d.ts +2 -2
- package/dist/Store/GetStoreItemsResponse.d.ts +2 -2
- package/dist/Store/StoreCategory.d.ts +2 -2
- package/dist/Store/StoreItem.d.ts +3 -3
- package/dist/Store/StoreItemPurchased.d.ts +2 -2
- package/dist/Store/index.d.ts +10 -10
- package/dist/Tournaments/GetTournamentInfoRequest.d.ts +1 -1
- package/dist/Tournaments/GetTournamentInfoResponse.d.ts +5 -5
- package/dist/Tournaments/GetTournamentsRequest.d.ts +1 -1
- package/dist/Tournaments/GetTournamentsResponse.d.ts +2 -2
- package/dist/Tournaments/Tournament.d.ts +8 -8
- package/dist/Tournaments/TournamentPrize.d.ts +1 -1
- package/dist/Tournaments/TournamentRegisterRequest.d.ts +1 -1
- package/dist/Tournaments/TournamentRegisterResponse.d.ts +2 -2
- package/dist/Tournaments/TournamentUtils.d.ts +3 -3
- package/dist/Tournaments/index.d.ts +16 -16
- package/dist/WSAPI/WSAPI.d.ts +65 -65
- package/dist/WSAPI/WSAPITypes.d.ts +18 -18
- package/dist/index.js +76 -78
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +103 -103
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Base/AchRelatedGame.ts +13 -13
- package/src/Base/ClassId.ts +118 -121
- package/src/Base/ProtocolMessage.ts +6 -7
- package/src/Base/ProtocolRequest.ts +4 -5
- package/src/Base/ProtocolResponse.ts +3 -5
- package/src/CookieStore.ts +10 -11
- package/src/Core/ActivityTypeLimited.ts +17 -18
- package/src/Core/CheckSegmentMatchRequest.ts +2 -3
- package/src/Core/CheckSegmentMatchResponse.ts +6 -6
- package/src/Core/CoreUtils.ts +37 -39
- package/src/Core/GetAchievementsUserInfoRequest.ts +2 -4
- package/src/Core/GetAchievementsUserInfoResponse.ts +4 -4
- package/src/Core/GetLabelInfoRequest.ts +2 -4
- package/src/Core/GetLabelInfoResponse.ts +4 -4
- package/src/Core/GetTranslationsRequest.ts +5 -7
- package/src/Core/GetTranslationsResponse.ts +3 -5
- package/src/Core/PublicLabelSettings.ts +29 -30
- package/src/Core/PublicProperties.ts +7 -7
- package/src/Core/ResponseIdentify.ts +12 -12
- package/src/Core/TranslationArea.ts +8 -9
- package/src/Core/index.ts +1 -1
- package/src/CustomSections/AchCustomSection.ts +20 -20
- package/src/CustomSections/GetCustomSectionsRequest.ts +2 -4
- package/src/CustomSections/GetCustomSectionsResponse.ts +4 -5
- package/src/CustomSections/UICustomSection.ts +30 -29
- package/src/CustomSections/index.ts +4 -4
- package/src/ErrorCodes.ts +11 -12
- package/src/GResponse.ts +5 -5
- package/src/ILogger.ts +6 -10
- package/src/Inbox/GetInboxMessagesRequest.ts +4 -5
- package/src/Inbox/GetInboxMessagesResponse.ts +15 -17
- package/src/Inbox/InboxMessage.ts +31 -33
- package/src/Inbox/InboxMessageType.ts +9 -9
- package/src/Inbox/MarkInboxMessageDeletedRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageDeletedResponse.ts +3 -3
- package/src/Inbox/MarkInboxMessageReadRequest.ts +4 -5
- package/src/Inbox/MarkInboxMessageReadResponse.ts +4 -5
- package/src/Inbox/MarkInboxMessageStarredRequest.ts +4 -5
- package/src/Inbox/MarkInboxMessageStarredResponse.ts +4 -5
- package/src/Inbox/index.ts +10 -10
- package/src/IntUtils.ts +72 -85
- package/src/Jackpots/GetJackpotsPotsRequest.ts +3 -3
- package/src/Jackpots/GetJackpotsPotsResponse.ts +3 -5
- package/src/Jackpots/GetJackpotsRequest.ts +4 -6
- package/src/Jackpots/GetJackpotsResponse.ts +5 -7
- package/src/Jackpots/JackPotWinner.ts +11 -12
- package/src/Jackpots/JackpotContributionType.ts +3 -4
- package/src/Jackpots/JackpotDetails.ts +31 -31
- package/src/Jackpots/JackpotHtmlTemplate.ts +3 -3
- package/src/Jackpots/JackpotPot.ts +11 -12
- package/src/Jackpots/JackpotPublicMeta.ts +16 -16
- package/src/Jackpots/JackpotType.ts +2 -5
- package/src/Jackpots/JackpotWinPush.ts +6 -6
- package/src/Jackpots/JackpotsOptinRequest.ts +3 -5
- package/src/Jackpots/JackpotsOptinResponse.ts +2 -4
- package/src/Jackpots/JackpotsOptoutRequest.ts +3 -5
- package/src/Jackpots/JackpotsOptoutResponse.ts +2 -4
- package/src/Jackpots/index.ts +16 -16
- package/src/Leaderboard/GetLeaderBoardsRequest.ts +8 -9
- package/src/Leaderboard/GetLeaderBoardsResponse.ts +4 -6
- package/src/Leaderboard/LeaderBoardDetails.ts +11 -12
- package/src/Leaderboard/LeaderBoardPeriodType.ts +3 -3
- package/src/Leaderboard/LeaderBoardPosition.ts +9 -10
- package/src/Leaderboard/LeaderBoardPublicMeta.ts +3 -4
- package/src/Leaderboard/LeaderBoards.ts +42 -42
- package/src/Leaderboard/index.ts +6 -6
- package/src/Level/GetLevelMapResponse.ts +18 -21
- package/src/Level/Level.ts +10 -11
- package/src/Level/LevelPublicMeta.ts +17 -17
- package/src/Level/index.ts +3 -3
- package/src/MiniGames/SAWAcknowledgeSpinPushRequest.ts +3 -4
- package/src/MiniGames/SAWAcknowledgeType.ts +3 -4
- package/src/MiniGames/SAWAskForUsername.ts +3 -4
- package/src/MiniGames/SAWBuyInType.ts +15 -13
- package/src/MiniGames/SAWDoAknowledgeRequest.ts +3 -3
- package/src/MiniGames/SAWDoAknowledgeResponse.ts +3 -3
- package/src/MiniGames/SAWDoSpinRequest.ts +3 -5
- package/src/MiniGames/SAWDoSpinResponse.ts +10 -11
- package/src/MiniGames/SAWEventSawPush.ts +3 -4
- package/src/MiniGames/SAWGameType.ts +23 -21
- package/src/MiniGames/SAWGetTemplatesRequest.ts +3 -3
- package/src/MiniGames/SAWGetTemplatesResponse.ts +53 -65
- package/src/MiniGames/SAWPrize.ts +11 -12
- package/src/MiniGames/SAWPrizeDropAknowledgeRequest.ts +5 -3
- package/src/MiniGames/SAWPrizeDropAknowledgeResponse.ts +3 -3
- package/src/MiniGames/SAWPrizeDropWinPush.ts +9 -8
- package/src/MiniGames/SAWPrizeType.ts +23 -22
- package/src/MiniGames/SAWPrizeUI.ts +17 -17
- package/src/MiniGames/SAWSpinErrorCode.ts +15 -16
- package/src/MiniGames/SAWSpinsCountPush.ts +4 -4
- package/src/MiniGames/SAWTemplate.ts +29 -29
- package/src/MiniGames/SAWTemplateUI.ts +45 -47
- package/src/MiniGames/SAWUtils.ts +23 -26
- package/src/MiniGames/SAWWinSoundType.ts +10 -11
- package/src/MiniGames/index.ts +24 -22
- package/src/Missions/AchCategoryPublicMeta.ts +2 -3
- package/src/Missions/AchClaimPrizeRequest.ts +4 -5
- package/src/Missions/AchClaimPrizeResponse.ts +3 -4
- package/src/Missions/AchievementCategory.ts +14 -15
- package/src/Missions/AchievementOptinRequest.ts +3 -5
- package/src/Missions/AchievementOptinResponse.ts +2 -4
- package/src/Missions/AchievementPublicMeta.ts +19 -20
- package/src/Missions/AchievementStatus.ts +7 -8
- package/src/Missions/AchievementTaskPublicMeta.ts +2 -3
- package/src/Missions/AchievementTaskType.ts +2 -2
- package/src/Missions/AchievementType.ts +2 -3
- package/src/Missions/GetAchCategoriesRequest.ts +2 -4
- package/src/Missions/GetAchCategoriesResponse.ts +4 -5
- package/src/Missions/GetAchievementMapRequest.ts +2 -4
- package/src/Missions/GetAchievementMapResponse.ts +3 -5
- package/src/Missions/GetRelatedAchTourRequest.ts +3 -4
- package/src/Missions/GetRelatedAchTourResponse.ts +5 -7
- package/src/Missions/ReloadAchievementsEvent.ts +5 -5
- package/src/Missions/ScheduledMissionType.ts +4 -5
- package/src/Missions/UserAchievement.ts +104 -108
- package/src/Missions/UserAchievementTask.ts +13 -15
- package/src/Missions/index.ts +19 -19
- package/src/NodeCache.ts +44 -49
- package/src/OCache.ts +51 -57
- package/src/Quiz/MarketsAnswers.ts +34 -34
- package/src/Quiz/MarketsInfo.ts +184 -177
- package/src/Quiz/MarketsPerSport.ts +30 -37
- package/src/Quiz/MarketsType.ts +28 -28
- package/src/Quiz/ScoreResultTypes.ts +18 -18
- package/src/Quiz/SportTypes.ts +4 -4
- package/src/Quiz/index.ts +6 -6
- package/src/SmarticoAPI.ts +769 -730
- package/src/SmarticoLib/index.ts +1053 -1069
- package/src/Store/BuyStoreItemErrorCode.ts +10 -10
- package/src/Store/BuyStoreItemRequest.ts +2 -2
- package/src/Store/BuyStoreItemResponse.ts +2 -3
- package/src/Store/GetCategoriesStoreResponse.ts +3 -8
- package/src/Store/GetStoreHistoryRequest.ts +3 -3
- package/src/Store/GetStoreHistoryResponse.ts +4 -4
- package/src/Store/GetStoreItemsResponse.ts +3 -4
- package/src/Store/StoreCategory.ts +14 -15
- package/src/Store/StoreCategoryPublicMeta.ts +2 -3
- package/src/Store/StoreItem.ts +32 -33
- package/src/Store/StoreItemPublicMeta.ts +10 -10
- package/src/Store/StoreItemPurchased.ts +40 -40
- package/src/Store/StoreItemType.ts +20 -19
- package/src/Store/index.ts +13 -13
- package/src/Tournaments/GetTournamentInfoRequest.ts +2 -3
- package/src/Tournaments/GetTournamentInfoResponse.ts +45 -48
- package/src/Tournaments/GetTournamentsRequest.ts +2 -4
- package/src/Tournaments/GetTournamentsResponse.ts +7 -14
- package/src/Tournaments/Tournament.ts +109 -115
- package/src/Tournaments/TournamentInstanceStatus.ts +17 -18
- package/src/Tournaments/TournamentPlayer.ts +7 -8
- package/src/Tournaments/TournamentPrize.ts +9 -10
- package/src/Tournaments/TournamentPublicMeta.ts +26 -26
- package/src/Tournaments/TournamentRegisterRequest.ts +2 -3
- package/src/Tournaments/TournamentRegisterResponse.ts +3 -7
- package/src/Tournaments/TournamentRegistrationError.ts +9 -9
- package/src/Tournaments/TournamentRegistrationStatus.ts +25 -27
- package/src/Tournaments/TournamentRegistrationType.ts +15 -16
- package/src/Tournaments/TournamentType.ts +3 -4
- package/src/Tournaments/TournamentUtils.ts +90 -89
- package/src/Tournaments/index.ts +16 -16
- package/src/WSAPI/WSAPI.ts +781 -763
- package/src/WSAPI/WSAPITypes.ts +574 -586
- package/src/index.ts +15 -15
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
interface AchRelatedGame {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
/* ID of the game on Smartico side */
|
|
3
|
+
ach_game_id: number
|
|
4
|
+
/* ID of the game on operator side */
|
|
5
|
+
ext_game_id: string
|
|
6
|
+
game_public_meta: {
|
|
7
|
+
name: string
|
|
8
|
+
link: string
|
|
9
|
+
image: string
|
|
10
|
+
enabled: boolean
|
|
11
|
+
game_categories?: string[]
|
|
12
|
+
game_provider?: string
|
|
13
|
+
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export { AchRelatedGame }
|
|
16
|
+
export { AchRelatedGame }
|
package/src/Base/ClassId.ts
CHANGED
|
@@ -1,163 +1,160 @@
|
|
|
1
1
|
export enum ClassId {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
PING = 1,
|
|
3
|
+
PONG = 2,
|
|
4
4
|
|
|
5
|
+
INIT = 3,
|
|
6
|
+
INIT_RESPONSE = 4,
|
|
7
|
+
IDENTIFY = 5,
|
|
8
|
+
IDENTIFY_RESPONSE = 6,
|
|
9
|
+
LOGIN = 7,
|
|
10
|
+
LOGOUT = 8,
|
|
11
|
+
EVENT = 9,
|
|
12
|
+
EVENT_RESPONSE = 10,
|
|
5
13
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
IDENTIFY = 5,
|
|
9
|
-
IDENTIFY_RESPONSE = 6,
|
|
10
|
-
LOGIN = 7,
|
|
11
|
-
LOGOUT = 8,
|
|
12
|
-
EVENT = 9,
|
|
13
|
-
EVENT_RESPONSE = 10,
|
|
14
|
+
LOGIN_RESPONSE = 11,
|
|
15
|
+
LOGOUT_RESPONSE = 12,
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
GET_TRANSLATIONS_REQUEST = 13,
|
|
18
|
+
GET_TRANSLATIONS_RESPONSE = 14,
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
GET_TRANSLATIONS_RESPONSE = 14,
|
|
20
|
-
|
|
21
|
-
/*
|
|
20
|
+
/*
|
|
22
21
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
23
22
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
24
|
-
*/
|
|
23
|
+
*/
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
CLIENT_ENGAGEMENT_IMPRESSION_REQUEST = 103,
|
|
26
|
+
CLIENT_ENGAGEMENT_ACTION_REQUEST = 104,
|
|
27
|
+
CLIENT_EXECUTE_DEEPLINK_EVENT = 105,
|
|
28
|
+
CLIENT_ENGAGEMENT_FAILED_REQUEST = 106,
|
|
29
|
+
CLIENT_EXECUTE_JS_EVENT = 107,
|
|
30
|
+
CLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT = 108,
|
|
31
|
+
CLIENT_ENGAGEMENT_EVENT_NEW = 110,
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
CLIENT_TRACK_ACTIVITY_REQUEST = 155,
|
|
34
|
+
CLIENT_SET_AVATAR_REQUEST = 157,
|
|
35
|
+
CLIENT_SET_AVATAR_RESPONSE = 158,
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
CLIENT_SET_CUSTOM_USERNAME_REQUEST = 159,
|
|
38
|
+
CLIENT_SET_CUSTOM_USERNAME_RESPONSE = 160,
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
CHECK_SEGMENT_MATCH_REQUEST = 161,
|
|
41
|
+
CHECK_SEGMENT_MATCH_RESPONSE = 162,
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
/*
|
|
45
44
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
46
45
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
// 500-1000 - Achievements
|
|
49
|
+
GET_LEVEL_MAP_REQUEST = 500,
|
|
50
|
+
GET_LEVEL_MAP_RESPONSE = 501,
|
|
51
|
+
GET_ACHIEVEMENT_MAP_REQUEST = 502,
|
|
52
|
+
GET_ACHIEVEMENT_MAP_RESPONSE = 503,
|
|
53
|
+
RELOAD_ACHIEVEMENTS_EVENT = 504,
|
|
54
|
+
GET_LEADERS_BOARD_REQUEST = 505,
|
|
55
|
+
GET_LEADERS_BOARD_RESPONSE = 506,
|
|
56
|
+
GET_SHOP_ITEMS_REQUEST = 509,
|
|
57
|
+
GET_SHOP_ITEMS_RESPONSE = 510,
|
|
58
|
+
BUY_SHOP_ITEM_REQUEST = 511,
|
|
59
|
+
BUY_SHOP_ITEM_RESPONSE = 512,
|
|
60
|
+
GET_INBOX_MESSAGES_REQUEST = 513,
|
|
61
|
+
GET_INBOX_MESSAGES_RESPONSE = 514,
|
|
62
|
+
GET_SHOP_CATEGORIES_REQUEST = 515,
|
|
63
|
+
GET_SHOP_CATEGORIES_RESPONSE = 516,
|
|
64
|
+
GET_TOURNAMENT_LOBBY_REQUEST = 517,
|
|
65
|
+
GET_TOURNAMENT_LOBBY_RESPONSE = 518,
|
|
66
|
+
GET_TOURNAMENT_INFO_REQUEST = 519,
|
|
67
|
+
GET_TOURNAMENT_INFO_RESPONSE = 520,
|
|
68
|
+
TOURNAMENT_REGISTER_REQUEST = 521,
|
|
69
|
+
TOURNAMENT_REGISTER_RESPONSE = 522,
|
|
70
|
+
GET_CUSTOM_SECTIONS_REQUEST = 523,
|
|
71
|
+
GET_CUSTOM_SECTIONS_RESPONSE = 524,
|
|
72
|
+
MISSION_OPTIN_REQUEST = 525,
|
|
73
|
+
MISSION_OPTIN_RESPONSE = 526,
|
|
74
|
+
|
|
75
|
+
/*
|
|
77
76
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
78
77
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
79
|
-
*/
|
|
78
|
+
*/
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
GET_ACHIEVEMENT_USER_REQUEST = 527,
|
|
81
|
+
GET_ACHIEVEMENT_USER_RESPONSE = 528,
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
MARK_INBOX_READ_REQUEST = 529,
|
|
84
|
+
MARK_INBOX_READ_RESPONSE = 530,
|
|
85
|
+
MARK_INBOX_STARRED_REQUEST = 531,
|
|
86
|
+
MARK_INBOX_STARRED_RESPONSE = 532,
|
|
87
|
+
MARK_INBOX_DELETED_REQUEST = 535,
|
|
88
|
+
MARK_INBOX_DELETED_RESPONSE = 536,
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
GET_ACH_CATEGORIES_REQUEST = 537,
|
|
91
|
+
GET_ACH_CATEGORIES_RESPONSE = 538,
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
ACHIEVEMENT_CLAIM_PRIZE_REQUEST = 539,
|
|
94
|
+
ACHIEVEMENT_CLAIM_PRIZE_RESPONSE = 540,
|
|
96
95
|
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
ACH_SHOP_ITEM_HISTORY_REQUEST = 541,
|
|
97
|
+
ACH_SHOP_ITEM_HISTORY_RESPONSE = 542,
|
|
99
98
|
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
GET_RELATED_ACH_N_TOURNAMENTS_REQUEST = 543,
|
|
100
|
+
GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE = 544,
|
|
102
101
|
|
|
103
|
-
|
|
102
|
+
/*
|
|
104
103
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
105
104
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
GET_BONUSES_REQUEST = 600,
|
|
108
|
+
GET_BONUSES_RESPONSE = 601,
|
|
109
|
+
CLAIM_BONUS_REQUEST = 602,
|
|
110
|
+
CLAIM_BONUS_RESPONSE = 603,
|
|
111
|
+
|
|
112
|
+
SAW_GET_SPINS_REQUEST = 700,
|
|
113
|
+
SAW_GET_SPINS_RESPONSE = 701,
|
|
114
|
+
SAW_DO_SPIN_REQUEST = 702,
|
|
115
|
+
SAW_DO_SPIN_RESPONSE = 703,
|
|
116
|
+
SAW_AKNOWLEDGE_REQUEST = 704,
|
|
117
|
+
SAW_AKNOWLEDGE_RESPONSE = 705,
|
|
118
|
+
SAW_SPINS_COUNT_PUSH = 706,
|
|
119
|
+
SAW_SHOW_SPIN_PUSH = 707,
|
|
120
|
+
SAW_PRIZE_DROP_WIN_PUSH = 708,
|
|
121
|
+
SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST = 709,
|
|
122
|
+
SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE = 710,
|
|
123
|
+
SAW_AKNOWLEDGE_SPIN_PUSH = 711,
|
|
124
|
+
|
|
125
|
+
/*
|
|
127
126
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
128
127
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
129
|
-
*/
|
|
130
|
-
|
|
128
|
+
*/
|
|
131
129
|
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
JP_GET_JACKPOTS_REQUEST = 800,
|
|
131
|
+
JP_GET_JACKPOTS_RESPONSE = 801,
|
|
134
132
|
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
JP_GET_LATEST_POTS_REQUEST = 802,
|
|
134
|
+
JP_GET_LATEST_POTS_RESPONSE = 803,
|
|
137
135
|
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
JP_OPTIN_REQUEST = 804,
|
|
137
|
+
JP_OPTIN_RESPONSE = 805,
|
|
140
138
|
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
JP_OPTOUT_REQUEST = 806,
|
|
140
|
+
JP_OPTOUT_RESPONSE = 807,
|
|
143
141
|
|
|
144
|
-
|
|
142
|
+
JP_WIN_PUSH = 808,
|
|
145
143
|
|
|
146
|
-
|
|
144
|
+
/*
|
|
147
145
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
148
146
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
149
147
|
*/
|
|
150
148
|
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ = 1003,
|
|
150
|
+
REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP = 2003,
|
|
153
151
|
|
|
154
|
-
|
|
152
|
+
CLIENT_DEBUG_REQUEST = 77777,
|
|
155
153
|
|
|
156
|
-
|
|
157
|
-
/*
|
|
154
|
+
/*
|
|
158
155
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
159
156
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
160
|
-
*/
|
|
157
|
+
*/
|
|
161
158
|
|
|
162
|
-
|
|
163
|
-
}
|
|
159
|
+
UNSUPPORTED_COMMAND = 99999,
|
|
160
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ClassId } from
|
|
1
|
+
import { ClassId } from './ClassId'
|
|
2
2
|
|
|
3
3
|
export interface ProtocolMessage {
|
|
4
|
+
cid: number // can be ClassId when we move all ClassIds from ach to use @smartico
|
|
5
|
+
ts?: number
|
|
6
|
+
uuid?: string
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
uuid?: string;
|
|
8
|
-
|
|
9
|
-
// eventType?: string;
|
|
10
|
-
// payload?: any;
|
|
8
|
+
// eventType?: string;
|
|
9
|
+
// payload?: any;
|
|
11
10
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ProtocolMessage } from
|
|
2
|
-
|
|
1
|
+
import { ProtocolMessage } from './ProtocolMessage'
|
|
3
2
|
|
|
4
3
|
export interface ProtocolRequest extends ProtocolMessage {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
api_key: string
|
|
5
|
+
brand_key: string
|
|
6
|
+
ext_user_id: string
|
|
8
7
|
}
|
package/src/CookieStore.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { TSMap } from
|
|
1
|
+
import { TSMap } from 'typescript-map'
|
|
2
2
|
|
|
3
3
|
class CookieStore {
|
|
4
|
-
|
|
4
|
+
private static cookieStore = new TSMap<string, string[]>()
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
6
|
+
public static get(key: string): string[] | undefined {
|
|
7
|
+
return CookieStore.cookieStore.get(key)
|
|
8
|
+
}
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
public static set(key: string, value: string[]) {
|
|
11
|
+
const v = value.map((v) => v.split(';')[0])
|
|
12
|
+
CookieStore.cookieStore.set(key, v)
|
|
13
|
+
}
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
export { CookieStore }
|
|
16
|
+
export { CookieStore }
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
export enum ActivityTypeLimited {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
2
|
+
DoNothing = 8,
|
|
3
|
+
Points = 12,
|
|
4
|
+
GiveMission = 14,
|
|
5
|
+
StartAnotherCampaign = 15,
|
|
6
|
+
MiniGameAttempt = 16,
|
|
7
|
+
DeductPoints = 21,
|
|
8
|
+
ResetPoints = 22,
|
|
9
|
+
Popup = 30,
|
|
10
|
+
Inbox = 31,
|
|
11
|
+
Slack = 70,
|
|
12
|
+
Email_To_Customer_Support = 80,
|
|
13
|
+
Email_To_Risk_Operator = 90,
|
|
14
|
+
Bonus = 100,
|
|
15
|
+
WebHook = 200,
|
|
16
|
+
TagCustomer = 504,
|
|
17
|
+
UnTagCustomer = 505,
|
|
18
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ProtocolResponse } from
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse'
|
|
2
2
|
|
|
3
3
|
export interface CheckSegmentMatchResponse extends ProtocolResponse {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
segments: {
|
|
5
|
+
segment_id: number
|
|
6
|
+
is_matching: boolean
|
|
7
|
+
}[]
|
|
8
|
+
}
|
package/src/Core/CoreUtils.ts
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
|
|
2
1
|
class CoreUtils {
|
|
2
|
+
public static avatarUrl = (avatar_id: string, avatarDomain: string): string => {
|
|
3
|
+
if (avatarDomain && avatar_id !== null && avatar_id !== undefined && !(avatar_id.startsWith && avatar_id.startsWith('http'))) {
|
|
4
|
+
if (avatarDomain.endsWith('/')) {
|
|
5
|
+
return avatarDomain.slice(0, -1) + '/avatar/' + avatar_id
|
|
6
|
+
} else {
|
|
7
|
+
return avatarDomain + '/avatar/' + avatar_id
|
|
8
|
+
}
|
|
9
|
+
} else {
|
|
10
|
+
return avatar_id
|
|
11
|
+
}
|
|
12
|
+
}
|
|
3
13
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
MXN: "MX$", // Mexican Peso
|
|
30
|
-
SGD: "S$", // Singapore Dollar
|
|
31
|
-
HKD: "HK$", // Hong Kong Dollar
|
|
32
|
-
NOK: "kr", // Norwegian Krone
|
|
33
|
-
KRW: "\u20A9", // South Korean Won
|
|
34
|
-
TRY: "\u20BA", // Turkish Lira
|
|
35
|
-
INR: "\u20B9", // Indian Rupee
|
|
36
|
-
RUB: "\u20BD", // Russian Ruble
|
|
37
|
-
BRL: "R$", // Brazilian Real
|
|
38
|
-
ZAR: "R", // South African Rand
|
|
39
|
-
}[currency?.toUpperCase()];
|
|
40
|
-
}
|
|
14
|
+
public static currencySymbol(currency: string) {
|
|
15
|
+
return {
|
|
16
|
+
[currency?.toUpperCase()]: currency?.toUpperCase(),
|
|
17
|
+
USD: '$', // United States Dollar
|
|
18
|
+
EUR: '\u20AC', // Euro
|
|
19
|
+
JPY: '\u00A5', // Japanese Yen
|
|
20
|
+
GBP: '\u00A3', // British Pound Sterling
|
|
21
|
+
AUD: 'A$', // Australian Dollar
|
|
22
|
+
CAD: 'C$', // Canadian Dollar
|
|
23
|
+
CHF: 'CHF', // Swiss Franc
|
|
24
|
+
CNY: '\u00A5', // Chinese Yuan
|
|
25
|
+
SEK: 'kr', // Swedish Krona
|
|
26
|
+
NZD: 'NZ$', // New Zealand Dollar
|
|
27
|
+
MXN: 'MX$', // Mexican Peso
|
|
28
|
+
SGD: 'S$', // Singapore Dollar
|
|
29
|
+
HKD: 'HK$', // Hong Kong Dollar
|
|
30
|
+
NOK: 'kr', // Norwegian Krone
|
|
31
|
+
KRW: '\u20A9', // South Korean Won
|
|
32
|
+
TRY: '\u20BA', // Turkish Lira
|
|
33
|
+
INR: '\u20B9', // Indian Rupee
|
|
34
|
+
RUB: '\u20BD', // Russian Ruble
|
|
35
|
+
BRL: 'R$', // Brazilian Real
|
|
36
|
+
ZAR: 'R', // South African Rand
|
|
37
|
+
}[currency?.toUpperCase()]
|
|
38
|
+
}
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
export { CoreUtils }
|
|
41
|
+
export { CoreUtils }
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
+
import { ProtocolRequest } from '../Base/ProtocolRequest'
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface GetAchievementsUserInfoRequest extends ProtocolRequest {
|
|
5
|
-
}
|
|
3
|
+
export interface GetAchievementsUserInfoRequest extends ProtocolRequest {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProtocolResponse } from
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse'
|
|
2
2
|
|
|
3
3
|
export interface GetAchievementsUserInfoResponse extends ProtocolResponse {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
4
|
+
level_counter_1?: number
|
|
5
|
+
level_counter_2?: number
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProtocolResponse } from
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse'
|
|
2
2
|
|
|
3
3
|
export interface GetLabelInfoResponse extends ProtocolResponse {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
settings: { [key: string]: string }
|
|
5
|
+
label_id: string
|
|
6
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { TranslationArea } from "./TranslationArea";
|
|
1
|
+
import { ProtocolRequest } from '../Base/ProtocolRequest'
|
|
2
|
+
import { TranslationArea } from './TranslationArea'
|
|
4
3
|
|
|
5
4
|
export interface GetTranslationsRequest extends ProtocolRequest {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
lang_code: string;
|
|
5
|
+
hash_code: number
|
|
6
|
+
areas: TranslationArea[]
|
|
7
|
+
lang_code: string
|
|
10
8
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ProtocolResponse } from
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse'
|
|
2
2
|
|
|
3
3
|
export interface GetTranslationsResponse extends ProtocolResponse {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
translations: {[key: string]: string};
|
|
4
|
+
hash_code: number
|
|
5
|
+
translations: { [key: string]: string }
|
|
7
6
|
}
|
|
8
|
-
|