@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,6 +1,6 @@
|
|
|
1
|
-
import { Tournament } from
|
|
2
|
-
import { TournamentPlayer } from
|
|
3
|
-
import { TournamentPrize } from
|
|
1
|
+
import { Tournament } from './Tournament';
|
|
2
|
+
import { TournamentPlayer } from './TournamentPlayer';
|
|
3
|
+
import { TournamentPrize } from './TournamentPrize';
|
|
4
4
|
export declare class TournamentUtils {
|
|
5
5
|
static isCanRegister: (tournament: Tournament) => boolean;
|
|
6
6
|
static isInProgress: (tournament: Tournament) => boolean;
|
|
@@ -1,16 +1,16 @@
|
|
|
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
|
|
1
|
+
export * from './GetTournamentInfoRequest';
|
|
2
|
+
export * from './GetTournamentInfoResponse';
|
|
3
|
+
export * from './GetTournamentsRequest';
|
|
4
|
+
export * from './GetTournamentsResponse';
|
|
5
|
+
export * from './Tournament';
|
|
6
|
+
export * from './TournamentInstanceStatus';
|
|
7
|
+
export * from './TournamentPlayer';
|
|
8
|
+
export * from './TournamentPrize';
|
|
9
|
+
export * from './TournamentPublicMeta';
|
|
10
|
+
export * from './TournamentRegisterRequest';
|
|
11
|
+
export * from './TournamentRegisterResponse';
|
|
12
|
+
export * from './TournamentRegistrationError';
|
|
13
|
+
export * from './TournamentRegistrationStatus';
|
|
14
|
+
export * from './TournamentRegistrationType';
|
|
15
|
+
export * from './TournamentType';
|
|
16
|
+
export * from './TournamentUtils';
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SmarticoAPI } from
|
|
2
|
-
import { InboxMarkMessageAction, LeaderBoardDetailsT, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionClaimRewardResult, TMissionOptInResult, TMissionOrBadge, TSegmentCheckResult, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUICustomSection, TUserProfile, UserLevelExtraCountersT } from
|
|
3
|
-
import { LeaderBoardPeriodType } from
|
|
4
|
-
import { JackpotDetails, JackpotsOptinResponse, JackpotsOptoutResponse } from
|
|
1
|
+
import { SmarticoAPI } from '../SmarticoAPI';
|
|
2
|
+
import { InboxMarkMessageAction, LeaderBoardDetailsT, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionClaimRewardResult, TMissionOptInResult, TMissionOrBadge, TSegmentCheckResult, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUICustomSection, TUserProfile, UserLevelExtraCountersT } from './WSAPITypes';
|
|
3
|
+
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
4
|
+
import { JackpotDetails, JackpotsOptinResponse, JackpotsOptoutResponse } from '../Jackpots';
|
|
5
5
|
/** @group General API */
|
|
6
6
|
export declare class WSAPI {
|
|
7
7
|
private api;
|
|
@@ -29,7 +29,7 @@ export declare class WSAPI {
|
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
31
|
* **Visitor mode: not supported**
|
|
32
|
-
|
|
32
|
+
*/
|
|
33
33
|
checkSegmentMatch(segment_id: number): Promise<boolean>;
|
|
34
34
|
/** Check if user belongs to specific list of segments
|
|
35
35
|
* **Example**:
|
|
@@ -39,7 +39,7 @@ export declare class WSAPI {
|
|
|
39
39
|
* });
|
|
40
40
|
* ```
|
|
41
41
|
* **Visitor mode: not supported**
|
|
42
|
-
|
|
42
|
+
*/
|
|
43
43
|
checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]>;
|
|
44
44
|
/** Returns all the levels available the current user
|
|
45
45
|
* **Example**:
|
|
@@ -55,7 +55,7 @@ export declare class WSAPI {
|
|
|
55
55
|
* console.log(result);
|
|
56
56
|
* });
|
|
57
57
|
* ```
|
|
58
|
-
|
|
58
|
+
*/
|
|
59
59
|
getLevels(): Promise<TLevel[]>;
|
|
60
60
|
/** Returns all the missions available the current user.
|
|
61
61
|
* The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
@@ -83,7 +83,7 @@ export declare class WSAPI {
|
|
|
83
83
|
* Returns all the badges available the current user
|
|
84
84
|
*
|
|
85
85
|
* **Visitor mode: not supported**
|
|
86
|
-
|
|
86
|
+
*/
|
|
87
87
|
getBadges(): Promise<TMissionOrBadge[]>;
|
|
88
88
|
/**
|
|
89
89
|
* Returns the extra counters for the current user level.
|
|
@@ -98,7 +98,7 @@ export declare class WSAPI {
|
|
|
98
98
|
* ```
|
|
99
99
|
*
|
|
100
100
|
* **Visitor mode: not supported**
|
|
101
|
-
|
|
101
|
+
*/
|
|
102
102
|
getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
|
|
103
103
|
/**
|
|
104
104
|
*
|
|
@@ -117,7 +117,7 @@ export declare class WSAPI {
|
|
|
117
117
|
* console.log(result);
|
|
118
118
|
* });
|
|
119
119
|
* ```
|
|
120
|
-
|
|
120
|
+
*/
|
|
121
121
|
getStoreItems(): Promise<TStoreItem[]>;
|
|
122
122
|
/** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
|
|
123
123
|
* **Example**:
|
|
@@ -128,7 +128,7 @@ export declare class WSAPI {
|
|
|
128
128
|
* ```
|
|
129
129
|
*
|
|
130
130
|
* **Visitor mode: not supported**
|
|
131
|
-
|
|
131
|
+
*/
|
|
132
132
|
buyStoreItem(item_id: number): Promise<TBuyStoreItemResult>;
|
|
133
133
|
/**
|
|
134
134
|
*
|
|
@@ -150,19 +150,19 @@ export declare class WSAPI {
|
|
|
150
150
|
*/
|
|
151
151
|
getStoreCategories(): Promise<TStoreCategory[]>;
|
|
152
152
|
/**
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
153
|
+
* Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
154
|
+
* The maximum number of items per request is limited to 20.
|
|
155
|
+
* You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
|
|
156
|
+
*
|
|
157
|
+
* **Example**:
|
|
158
|
+
* ```
|
|
159
|
+
* _smartico.api.getStorePurchasedItems().then((result) => {
|
|
160
|
+
* console.log(result);
|
|
161
|
+
* });
|
|
162
|
+
* ```
|
|
163
|
+
*
|
|
164
|
+
* **Visitor mode: not supported**
|
|
165
|
+
*/
|
|
166
166
|
getStorePurchasedItems({ limit, offset, onUpdate }?: {
|
|
167
167
|
limit?: number;
|
|
168
168
|
offset?: number;
|
|
@@ -188,23 +188,23 @@ export declare class WSAPI {
|
|
|
188
188
|
* */
|
|
189
189
|
getAchCategories(): Promise<TAchCategory[]>;
|
|
190
190
|
/**
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
191
|
+
* Returns list of custom sections
|
|
192
|
+
*
|
|
193
|
+
* **Example**:
|
|
194
|
+
* ```
|
|
195
|
+
* _smartico.api.getCustomSections().then((result) => {
|
|
196
|
+
* console.log(result);
|
|
197
|
+
* });
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
200
|
+
* **Example in the Visitor mode**:
|
|
201
|
+
* ```
|
|
202
|
+
* _smartico.vapi('EN').getCustomSections().then((result) => {
|
|
203
|
+
* console.log(result);
|
|
204
|
+
* });
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
207
|
+
* */
|
|
208
208
|
getCustomSections(): Promise<TUICustomSection[]>;
|
|
209
209
|
/**
|
|
210
210
|
* Returns the list of mini-games available for user
|
|
@@ -233,19 +233,19 @@ export declare class WSAPI {
|
|
|
233
233
|
* Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
234
234
|
*
|
|
235
235
|
* **Visitor mode: not supported**
|
|
236
|
-
|
|
236
|
+
*/
|
|
237
237
|
playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
|
|
238
238
|
/**
|
|
239
239
|
* Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
240
240
|
*
|
|
241
241
|
* **Visitor mode: not supported**
|
|
242
|
-
|
|
242
|
+
*/
|
|
243
243
|
requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult>;
|
|
244
244
|
/**
|
|
245
245
|
* Request for claim reward for the specified mission id. Returns the err_code.
|
|
246
246
|
*
|
|
247
247
|
* **Visitor mode: not supported**
|
|
248
|
-
|
|
248
|
+
*/
|
|
249
249
|
requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult>;
|
|
250
250
|
/** Returns all the active instances of tournaments
|
|
251
251
|
* The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
@@ -271,7 +271,7 @@ export declare class WSAPI {
|
|
|
271
271
|
/**
|
|
272
272
|
* Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
|
|
273
273
|
*
|
|
274
|
-
|
|
274
|
+
* **Example**:
|
|
275
275
|
* ```
|
|
276
276
|
* _smartico.api.getTournamentsList().then((result) => {
|
|
277
277
|
* if (result.length > 0) {
|
|
@@ -298,7 +298,7 @@ export declare class WSAPI {
|
|
|
298
298
|
* Requests registration for the specified tournament instance. Returns the err_code.
|
|
299
299
|
*
|
|
300
300
|
* **Visitor mode: not supported**
|
|
301
|
-
|
|
301
|
+
*/
|
|
302
302
|
registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult>;
|
|
303
303
|
/**
|
|
304
304
|
* Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
|
|
@@ -320,17 +320,17 @@ export declare class WSAPI {
|
|
|
320
320
|
*/
|
|
321
321
|
getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT>;
|
|
322
322
|
/** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
323
|
+
* The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
324
|
+
* You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
325
|
+
* This functions return list of messages without the body of the message.
|
|
326
|
+
* To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
|
|
327
|
+
* All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
328
|
+
* The "onUpdate" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function.
|
|
329
|
+
*
|
|
330
|
+
* **Visitor mode: not supported**
|
|
331
|
+
*
|
|
332
|
+
* @param params
|
|
333
|
+
*/
|
|
334
334
|
getInboxMessages({ from, to, onlyFavorite, onUpdate }?: {
|
|
335
335
|
from?: number;
|
|
336
336
|
to?: number;
|
|
@@ -339,9 +339,9 @@ export declare class WSAPI {
|
|
|
339
339
|
}): Promise<TInboxMessage[]>;
|
|
340
340
|
/**
|
|
341
341
|
* Returns the message body of the specified message guid.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
*
|
|
343
|
+
* **Visitor mode: not supported**
|
|
344
|
+
*/
|
|
345
345
|
getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody>;
|
|
346
346
|
/**
|
|
347
347
|
* Requests to mark inbox message with specified guid as read
|
|
@@ -353,7 +353,7 @@ export declare class WSAPI {
|
|
|
353
353
|
* Requests to mark all inbox messages as rea
|
|
354
354
|
*
|
|
355
355
|
* **Visitor mode: not supported**
|
|
356
|
-
|
|
356
|
+
*/
|
|
357
357
|
markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction>;
|
|
358
358
|
/**
|
|
359
359
|
* Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
|
|
@@ -375,7 +375,7 @@ export declare class WSAPI {
|
|
|
375
375
|
deleteAllInboxMessages(): Promise<InboxMarkMessageAction>;
|
|
376
376
|
/**
|
|
377
377
|
* Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
|
|
378
|
-
|
|
378
|
+
*/
|
|
379
379
|
getTranslations(lang_code: string): Promise<TGetTranslations>;
|
|
380
380
|
private updateOnSpin;
|
|
381
381
|
private updateOnAddSpin;
|
|
@@ -403,7 +403,7 @@ export declare class WSAPI {
|
|
|
403
403
|
* console.log(result);
|
|
404
404
|
* });
|
|
405
405
|
* ```
|
|
406
|
-
|
|
406
|
+
*/
|
|
407
407
|
jackpotGet(filter?: {
|
|
408
408
|
related_game_id?: string;
|
|
409
409
|
jp_template_id?: number;
|
|
@@ -421,7 +421,7 @@ export declare class WSAPI {
|
|
|
421
421
|
*
|
|
422
422
|
* **Visitor mode: not supported**
|
|
423
423
|
*
|
|
424
|
-
|
|
424
|
+
*/
|
|
425
425
|
jackpotOptIn(filter: {
|
|
426
426
|
jp_template_id: number;
|
|
427
427
|
}): Promise<JackpotsOptinResponse>;
|
|
@@ -438,7 +438,7 @@ export declare class WSAPI {
|
|
|
438
438
|
*
|
|
439
439
|
* **Visitor mode: not supported**
|
|
440
440
|
*
|
|
441
|
-
|
|
441
|
+
*/
|
|
442
442
|
jackpotOptOut(filter: {
|
|
443
443
|
jp_template_id: number;
|
|
444
444
|
}): Promise<JackpotsOptoutResponse>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { BuyStoreItemErrorCode } from
|
|
2
|
-
import { MiniGamePrizeTypeName, SAWBuyInTypeName, SAWGameTypeName, SAWSpinErrorCode } from
|
|
3
|
-
import { TournamentRegistrationError, TournamentRegistrationStatusName, TournamentRegistrationTypeName } from
|
|
4
|
-
import { LeaderBoardPeriodType } from
|
|
5
|
-
import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from
|
|
1
|
+
import { BuyStoreItemErrorCode } from '../Store';
|
|
2
|
+
import { MiniGamePrizeTypeName, SAWBuyInTypeName, SAWGameTypeName, SAWSpinErrorCode } from '../MiniGames';
|
|
3
|
+
import { TournamentRegistrationError, TournamentRegistrationStatusName, TournamentRegistrationTypeName } from '../Tournaments';
|
|
4
|
+
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
5
|
+
import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from '../CustomSections';
|
|
6
6
|
type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string;
|
|
7
7
|
/**
|
|
8
8
|
* TMiniGamePrize describes the information of prize in the array of prizes in the TMiniGameTemplate
|
|
9
|
-
*/
|
|
9
|
+
*/
|
|
10
10
|
export interface TMiniGamePrize {
|
|
11
11
|
/** ID of the prize */
|
|
12
12
|
id: number;
|
|
@@ -31,7 +31,7 @@ export interface TMiniGamePrize {
|
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
|
|
34
|
-
*/
|
|
34
|
+
*/
|
|
35
35
|
export interface TMiniGamePlayResult {
|
|
36
36
|
/** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
|
|
37
37
|
err_code: SAWSpinErrorCode;
|
|
@@ -42,7 +42,7 @@ export interface TMiniGamePlayResult {
|
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* TMiniGameTemplate describes the information of mini-games available for the user
|
|
45
|
-
*/
|
|
45
|
+
*/
|
|
46
46
|
export interface TMiniGameTemplate {
|
|
47
47
|
/** ID of the mini-game template */
|
|
48
48
|
id: number;
|
|
@@ -88,7 +88,7 @@ export interface TMiniGameTemplate {
|
|
|
88
88
|
* The user object is returned by _smartico.api.getUserProfile() method.
|
|
89
89
|
* If you want to track the changes of the user profile, you can subscribe to the callback in the following way
|
|
90
90
|
* _smartico.on('props_change', () => console.log(_smartico.api.getUserProfile()) );
|
|
91
|
-
*/
|
|
91
|
+
*/
|
|
92
92
|
export interface TUserProfile {
|
|
93
93
|
/** The language of the user */
|
|
94
94
|
core_user_language: string;
|
|
@@ -101,7 +101,7 @@ export interface TUserProfile {
|
|
|
101
101
|
* They can be treated as server-based cookies.
|
|
102
102
|
* You can set tags using following method _smartico.event('core_public_tags_update', { core_public_tags: ['A', 'B'] } );
|
|
103
103
|
* And then you can check for the tags
|
|
104
|
-
|
|
104
|
+
*/
|
|
105
105
|
core_public_tags: string[];
|
|
106
106
|
/** The ID of the current level of the user */
|
|
107
107
|
ach_level_current_id?: number;
|
|
@@ -138,14 +138,14 @@ export interface TLevel {
|
|
|
138
138
|
* Relevant in case of using advanced leveling logic
|
|
139
139
|
* https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
|
|
140
140
|
*
|
|
141
|
-
|
|
141
|
+
*/
|
|
142
142
|
required_level_counter_1: number;
|
|
143
143
|
/**
|
|
144
144
|
* The counter of 2nd metric used to reach the Level.
|
|
145
145
|
* Relevant in case of using advanced leveling logic
|
|
146
146
|
* https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
|
|
147
147
|
*
|
|
148
|
-
|
|
148
|
+
*/
|
|
149
149
|
required_level_counter_2: number;
|
|
150
150
|
/** The custom data of the Level defined by operator in the BackOffice. Can be a JSON object, string or number */
|
|
151
151
|
custom_data: string;
|
|
@@ -172,7 +172,7 @@ export interface TTournament {
|
|
|
172
172
|
/**
|
|
173
173
|
* The ID of the custom section where the tournament is assigned
|
|
174
174
|
* The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
|
|
175
|
-
|
|
175
|
+
*/
|
|
176
176
|
custom_section_id: number;
|
|
177
177
|
/** The custom data of the tournament defined by operator. Can be a JSON object, string or number */
|
|
178
178
|
custom_data: any;
|
|
@@ -312,7 +312,7 @@ export interface TStoreItem {
|
|
|
312
312
|
/** URL of the image of the store item */
|
|
313
313
|
image: string;
|
|
314
314
|
/** Type of the store item. Can be 'bonus' or 'tangible' or different others. */
|
|
315
|
-
type: 'bonus' | 'tangible' | 'minigamespin' | 'changelevel' | 'prizedrop' |
|
|
315
|
+
type: 'bonus' | 'tangible' | 'minigamespin' | 'changelevel' | 'prizedrop' | 'unknown';
|
|
316
316
|
/** The price of the store item in the gamification points */
|
|
317
317
|
price: number;
|
|
318
318
|
/** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
@@ -329,7 +329,7 @@ export interface TStoreItem {
|
|
|
329
329
|
related_item_ids: number[];
|
|
330
330
|
/** The indicator if the user can buy the item
|
|
331
331
|
* This indicator is taking into account the segment conditions for the store item, the price of item towards users balance,
|
|
332
|
-
|
|
332
|
+
*/
|
|
333
333
|
can_buy: boolean;
|
|
334
334
|
/** The list of IDs of the categories where the store item is assigned, information about categories can be retrieved with getStoreCategories method */
|
|
335
335
|
category_ids: number[];
|
|
@@ -404,7 +404,7 @@ export interface TMissionOrBadge {
|
|
|
404
404
|
/**
|
|
405
405
|
* The ID of the custom section where the mission or badge is assigned
|
|
406
406
|
* The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
|
|
407
|
-
|
|
407
|
+
*/
|
|
408
408
|
custom_section_id: number;
|
|
409
409
|
/** The indicator if the mission or badge is visible only in the custom section and should be hidden from the main overview of missions/badges */
|
|
410
410
|
only_in_custom_section: boolean;
|
|
@@ -481,7 +481,7 @@ export interface TMissionOrBadgeTask {
|
|
|
481
481
|
}
|
|
482
482
|
/**
|
|
483
483
|
* TMissionOptInResult describes the response of call to _smartico.api.requestMissionOptIn(mission_id) method
|
|
484
|
-
*/
|
|
484
|
+
*/
|
|
485
485
|
export interface TMissionOptInResult {
|
|
486
486
|
/** Error code that represents outcome of the opt-in request. Successful opt-in in case err_code is 0 */
|
|
487
487
|
err_code: number;
|
|
@@ -490,7 +490,7 @@ export interface TMissionOptInResult {
|
|
|
490
490
|
}
|
|
491
491
|
/**
|
|
492
492
|
* TMissionClaimRewardResult describes the response of call to _smartico.api.requestMissionClaimReward(mission_id, ach_completed_id) method
|
|
493
|
-
*/
|
|
493
|
+
*/
|
|
494
494
|
export interface TMissionClaimRewardResult {
|
|
495
495
|
/** Error code that represents outcome of the claim request. Successful claim reward in case err_code is 0 */
|
|
496
496
|
err_code: number;
|