@smartico/public-api 0.0.158 → 0.0.160
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 +10 -10
- package/dist/Bonuses/Bonus.d.ts +20 -0
- package/dist/Bonuses/BonusMetaMap.d.ts +3 -0
- package/dist/Bonuses/BonusStatus.d.ts +8 -0
- package/dist/Bonuses/BonusTemplateMetaMap.d.ts +5 -0
- package/dist/Bonuses/ClaimBonusRequest.d.ts +4 -0
- package/dist/Bonuses/ClaimBonusResponse.d.ts +4 -0
- package/dist/Bonuses/GetBonusesRequest.d.ts +3 -0
- package/dist/Bonuses/GetBonusesResponse.d.ts +5 -0
- package/dist/Bonuses/index.d.ts +7 -0
- package/dist/SmarticoAPI.d.ts +5 -1
- package/dist/SmarticoLib/index.d.ts +58 -2
- package/dist/WSAPI/WSAPI.d.ts +18 -3
- package/dist/WSAPI/WSAPITypes.d.ts +32 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +254 -147
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +72 -2
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +2 -0
- package/docs/classes/WSAPI.md +109 -72
- package/docs/interfaces/TBonus.md +65 -0
- package/docs/interfaces/TClaimBonusResult.md +27 -0
- package/docs/interfaces/TInboxMessageBody.md +2 -2
- package/docs/interfaces/TLevel.md +2 -2
- package/docs/interfaces/TMissionOrBadgeTask.md +1 -10
- package/docs/interfaces/TTournament.md +1 -1
- package/docs/interfaces/TTournamentDetailed.md +2 -2
- package/docs/interfaces/TUserProfile.md +2 -2
- package/package.json +41 -41
- package/src/Base/AchRelatedGame.ts +10 -10
- package/src/Base/ProtocolMessage.ts +4 -4
- package/src/Base/ProtocolRequest.ts +4 -4
- package/src/Base/ProtocolResponse.ts +3 -3
- package/src/Bonuses/Bonus.ts +40 -0
- package/src/Bonuses/BonusMetaMap.ts +3 -0
- package/src/Bonuses/BonusStatus.ts +8 -0
- package/src/Bonuses/BonusTemplateMetaMap.ts +6 -0
- package/src/Bonuses/ClaimBonusRequest.ts +5 -0
- package/src/Bonuses/ClaimBonusResponse.ts +5 -0
- package/src/Bonuses/GetBonusesRequest.ts +3 -0
- package/src/Bonuses/GetBonusesResponse.ts +6 -0
- package/src/Bonuses/index.ts +7 -0
- package/src/CookieStore.ts +6 -6
- package/src/Core/CheckSegmentMatchRequest.ts +2 -2
- package/src/Core/CheckSegmentMatchResponse.ts +4 -4
- package/src/Core/CoreUtils.ts +12 -7
- package/src/Core/GetAchievementsUserInfoRequest.ts +1 -1
- package/src/Core/GetAchievementsUserInfoResponse.ts +3 -3
- package/src/Core/GetLabelInfoRequest.ts +1 -1
- package/src/Core/GetLabelInfoResponse.ts +3 -3
- package/src/Core/GetTranslationsRequest.ts +5 -5
- package/src/Core/GetTranslationsResponse.ts +3 -3
- package/src/Core/PublicProperties.ts +7 -7
- package/src/Core/ResponseIdentify.ts +10 -10
- package/src/Core/TranslationArea.ts +1 -1
- package/src/Core/index.ts +9 -9
- package/src/CustomSections/GetCustomSectionsRequest.ts +1 -1
- package/src/CustomSections/GetCustomSectionsResponse.ts +3 -3
- package/src/CustomSections/UICustomSection.ts +21 -16
- package/src/CustomSections/index.ts +4 -4
- package/src/ErrorCodes.ts +2 -2
- package/src/GResponse.ts +5 -5
- package/src/ILogger.ts +5 -5
- package/src/Inbox/GetInboxMessagesRequest.ts +4 -4
- package/src/Inbox/GetInboxMessagesResponse.ts +8 -8
- package/src/Inbox/InboxMessage.ts +20 -20
- package/src/Inbox/MarkInboxMessageDeletedRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageDeletedResponse.ts +3 -3
- package/src/Inbox/MarkInboxMessageReadRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageReadResponse.ts +3 -3
- package/src/Inbox/MarkInboxMessageStarredRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageStarredResponse.ts +3 -3
- package/src/Inbox/index.ts +10 -10
- package/src/IntUtils.ts +36 -28
- package/src/Jackpots/GetJackpotsPotsRequest.ts +2 -2
- package/src/Jackpots/GetJackpotsPotsResponse.ts +3 -3
- package/src/Jackpots/GetJackpotsRequest.ts +3 -3
- package/src/Jackpots/GetJackpotsResponse.ts +4 -4
- package/src/Jackpots/JackPotWinner.ts +6 -6
- package/src/Jackpots/JackpotContributionType.ts +1 -1
- package/src/Jackpots/JackpotDetails.ts +18 -18
- package/src/Jackpots/JackpotHtmlTemplate.ts +3 -3
- package/src/Jackpots/JackpotPot.ts +6 -6
- package/src/Jackpots/JackpotPublicMeta.ts +9 -9
- package/src/Jackpots/JackpotType.ts +1 -1
- package/src/Jackpots/JackpotWinPush.ts +5 -5
- package/src/Jackpots/JackpotsOptinRequest.ts +2 -2
- package/src/Jackpots/JackpotsOptinResponse.ts +1 -1
- package/src/Jackpots/JackpotsOptoutRequest.ts +2 -2
- package/src/Jackpots/JackpotsOptoutResponse.ts +1 -1
- package/src/Jackpots/index.ts +16 -16
- package/src/Leaderboard/GetLeaderBoardsRequest.ts +5 -5
- package/src/Leaderboard/GetLeaderBoardsResponse.ts +3 -3
- package/src/Leaderboard/LeaderBoardDetails.ts +11 -11
- package/src/Leaderboard/LeaderBoardPosition.ts +8 -8
- package/src/Leaderboard/LeaderBoardPublicMeta.ts +3 -3
- package/src/Leaderboard/LeaderBoards.ts +16 -16
- package/src/Leaderboard/index.ts +6 -6
- package/src/Level/GetLevelMapResponse.ts +7 -7
- package/src/Level/Level.ts +9 -9
- package/src/Level/LevelPublicMeta.ts +10 -10
- package/src/Level/index.ts +3 -3
- package/src/MiniGames/SAWAcknowledgeSpinPushRequest.ts +3 -3
- package/src/MiniGames/SAWBuyInType.ts +2 -2
- package/src/MiniGames/SAWDoAknowledgeRequest.ts +2 -2
- package/src/MiniGames/SAWDoAknowledgeResponse.ts +2 -2
- package/src/MiniGames/SAWDoSpinRequest.ts +3 -3
- package/src/MiniGames/SAWDoSpinResponse.ts +9 -9
- package/src/MiniGames/SAWEventSawPush.ts +3 -3
- package/src/MiniGames/SAWGameType.ts +2 -2
- package/src/MiniGames/SAWGetTemplatesRequest.ts +3 -3
- package/src/MiniGames/SAWGetTemplatesResponse.ts +18 -16
- package/src/MiniGames/SAWPrize.ts +11 -11
- package/src/MiniGames/SAWPrizeDropAknowledgeRequest.ts +4 -4
- package/src/MiniGames/SAWPrizeDropAknowledgeResponse.ts +2 -2
- package/src/MiniGames/SAWPrizeDropWinPush.ts +8 -8
- package/src/MiniGames/SAWPrizeType.ts +2 -2
- package/src/MiniGames/SAWPrizeUI.ts +16 -16
- package/src/MiniGames/SAWSpinsCountPush.ts +3 -3
- package/src/MiniGames/SAWTemplate.ts +26 -26
- package/src/MiniGames/SAWTemplateUI.ts +42 -42
- package/src/MiniGames/SAWUtils.ts +10 -10
- package/src/MiniGames/SAWWinSoundType.ts +1 -1
- package/src/MiniGames/index.ts +24 -24
- package/src/Missions/AchCategoryPublicMeta.ts +2 -2
- package/src/Missions/AchClaimPrizeRequest.ts +3 -3
- package/src/Missions/AchClaimPrizeResponse.ts +1 -1
- package/src/Missions/AchievementCategory.ts +8 -8
- package/src/Missions/AchievementOptinRequest.ts +2 -2
- package/src/Missions/AchievementOptinResponse.ts +1 -1
- package/src/Missions/AchievementPublicMeta.ts +19 -19
- package/src/Missions/AchievementTaskPublicMeta.ts +2 -2
- package/src/Missions/GetAchCategoriesRequest.ts +1 -1
- package/src/Missions/GetAchCategoriesResponse.ts +3 -3
- package/src/Missions/GetAchievementMapRequest.ts +1 -1
- package/src/Missions/GetAchievementMapResponse.ts +3 -3
- package/src/Missions/GetRelatedAchTourRequest.ts +2 -2
- package/src/Missions/GetRelatedAchTourResponse.ts +5 -5
- package/src/Missions/ReloadAchievementsEvent.ts +3 -3
- package/src/Missions/UserAchievement.ts +48 -46
- package/src/Missions/UserAchievementTask.ts +13 -13
- package/src/Missions/index.ts +19 -19
- package/src/NodeCache.ts +12 -12
- package/src/OCache.ts +22 -22
- package/src/Quiz/MarketsAnswers.ts +9 -9
- package/src/Quiz/MarketsInfo.ts +62 -23
- package/src/Quiz/MarketsPerSport.ts +11 -4
- package/src/Quiz/ScoreResultTypes.ts +22 -22
- package/src/Quiz/SportTypes.ts +1 -1
- package/src/Quiz/index.ts +6 -6
- package/src/SmarticoAPI.ts +556 -303
- package/src/SmarticoLib/index.ts +956 -840
- package/src/Store/BuyStoreItemRequest.ts +2 -2
- package/src/Store/BuyStoreItemResponse.ts +2 -2
- package/src/Store/GetCategoriesStoreResponse.ts +3 -3
- package/src/Store/GetStoreHistoryRequest.ts +3 -3
- package/src/Store/GetStoreHistoryResponse.ts +4 -4
- package/src/Store/GetStoreItemsResponse.ts +3 -3
- package/src/Store/StoreCategory.ts +8 -8
- package/src/Store/StoreCategoryPublicMeta.ts +2 -2
- package/src/Store/StoreItem.ts +13 -13
- package/src/Store/StoreItemPublicMeta.ts +10 -10
- package/src/Store/StoreItemPurchased.ts +17 -17
- package/src/Store/StoreItemType.ts +2 -2
- package/src/Store/index.ts +13 -13
- package/src/Tournaments/GetTournamentInfoRequest.ts +2 -2
- package/src/Tournaments/GetTournamentInfoResponse.ts +18 -18
- package/src/Tournaments/GetTournamentsRequest.ts +1 -1
- package/src/Tournaments/GetTournamentsResponse.ts +6 -6
- package/src/Tournaments/Tournament.ts +43 -39
- package/src/Tournaments/TournamentInstanceStatus.ts +2 -2
- package/src/Tournaments/TournamentPlayer.ts +7 -7
- package/src/Tournaments/TournamentPrize.ts +8 -8
- package/src/Tournaments/TournamentPublicMeta.ts +16 -16
- package/src/Tournaments/TournamentRegisterRequest.ts +2 -2
- package/src/Tournaments/TournamentRegisterResponse.ts +3 -3
- package/src/Tournaments/TournamentRegistrationStatus.ts +6 -4
- package/src/Tournaments/TournamentRegistrationType.ts +9 -3
- package/src/Tournaments/TournamentUtils.ts +44 -38
- package/src/Tournaments/index.ts +16 -16
- package/src/WSAPI/WSAPI.ts +244 -132
- package/src/WSAPI/WSAPITypes.ts +287 -250
- package/src/index.ts +16 -15
- package/tsconfig.json +41 -43
package/src/WSAPI/WSAPITypes.ts
CHANGED
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { BuyStoreItemErrorCode } from '../Store'
|
|
2
|
-
import { MiniGamePrizeTypeName, SAWBuyInTypeName, SAWGameTypeName, SAWSpinErrorCode } from '../MiniGames'
|
|
3
|
-
import { TournamentRegistrationError, TournamentRegistrationStatusName, TournamentRegistrationTypeName } from '../Tournaments'
|
|
4
|
-
import { AchCategory } from '../Missions'
|
|
5
|
-
import { LeaderBoardPeriodType } from '../Leaderboard'
|
|
6
|
-
import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from '../CustomSections'
|
|
1
|
+
import { BuyStoreItemErrorCode } from '../Store';
|
|
2
|
+
import { MiniGamePrizeTypeName, SAWBuyInTypeName, SAWGameTypeName, SAWSpinErrorCode } from '../MiniGames';
|
|
3
|
+
import { TournamentRegistrationError, TournamentRegistrationStatusName, TournamentRegistrationTypeName } from '../Tournaments';
|
|
4
|
+
import { AchCategory } from '../Missions';
|
|
5
|
+
import { LeaderBoardPeriodType } from '../Leaderboard';
|
|
6
|
+
import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from '../CustomSections';
|
|
7
|
+
import { BonusStatus , BonusTemplateMetaMap, BonusMetaMap} from '../Bonuses';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string;
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* TMiniGamePrize describes the information of prize in the array of prizes in the TMiniGameTemplate
|
|
12
14
|
*/
|
|
13
15
|
export interface TMiniGamePrize {
|
|
14
16
|
/** ID of the prize */
|
|
15
|
-
id: number
|
|
17
|
+
id: number;
|
|
16
18
|
/** The visual name of the prize */
|
|
17
|
-
name: string
|
|
19
|
+
name: string;
|
|
18
20
|
/** The type of the prize, no-prize, points, bonus, manual, spin, jackpot */
|
|
19
|
-
prize_type: MiniGamePrizeTypeName
|
|
21
|
+
prize_type: MiniGamePrizeTypeName;
|
|
20
22
|
/** Numeric value of the prize in case it's pints or spin type */
|
|
21
|
-
prize_value?: number
|
|
23
|
+
prize_value?: number;
|
|
22
24
|
/** Custom font size for the prize (desktop) */
|
|
23
|
-
font_size?: number
|
|
25
|
+
font_size?: number;
|
|
24
26
|
/** Custom font size for the prize (mobile) */
|
|
25
|
-
font_size_mobile?: number
|
|
27
|
+
font_size_mobile?: number;
|
|
26
28
|
/** The URL of the icon of the prize */
|
|
27
|
-
icon?: string
|
|
29
|
+
icon?: string;
|
|
28
30
|
/* for scratch card defines position of prize in the list */
|
|
29
|
-
position: number
|
|
31
|
+
position: number;
|
|
30
32
|
/* Message that will be shown to user in modal pop-up */
|
|
31
|
-
aknowledge_message: string
|
|
33
|
+
aknowledge_message: string;
|
|
32
34
|
/* Deep link that will trigger some action in modal pop-up */
|
|
33
|
-
acknowledge_dp: string
|
|
35
|
+
acknowledge_dp: string;
|
|
34
36
|
/* The name of the action button in modal pop-up */
|
|
35
|
-
acknowledge_action_title: string
|
|
37
|
+
acknowledge_action_title: string;
|
|
36
38
|
/* Number of items in stock */
|
|
37
|
-
pool?: number
|
|
39
|
+
pool?: number;
|
|
38
40
|
/* Number of wins in game */
|
|
39
|
-
wins_count?: number
|
|
41
|
+
wins_count?: number;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
/**
|
|
@@ -44,11 +46,11 @@ export interface TMiniGamePrize {
|
|
|
44
46
|
*/
|
|
45
47
|
export interface TMiniGamePlayResult {
|
|
46
48
|
/** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
|
|
47
|
-
err_code: SAWSpinErrorCode
|
|
49
|
+
err_code: SAWSpinErrorCode;
|
|
48
50
|
/** Optional error message */
|
|
49
|
-
err_message: string
|
|
51
|
+
err_message: string;
|
|
50
52
|
/** The prize_id that user won, details of the prize can be found in the mini-game definition */
|
|
51
|
-
prize_id: number
|
|
53
|
+
prize_id: number;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
/**
|
|
@@ -56,52 +58,52 @@ export interface TMiniGamePlayResult {
|
|
|
56
58
|
*/
|
|
57
59
|
export interface TMiniGameTemplate {
|
|
58
60
|
/** ID of the mini-game template */
|
|
59
|
-
id: number
|
|
61
|
+
id: number;
|
|
60
62
|
/** Name of the mini-game template, translated to the user language */
|
|
61
|
-
name: string
|
|
63
|
+
name: string;
|
|
62
64
|
/** Description of the mini-game template, translated to the user language */
|
|
63
|
-
description: string
|
|
65
|
+
description: string;
|
|
64
66
|
/** URL of the icon of the mini-game template */
|
|
65
|
-
thumbnail: string
|
|
67
|
+
thumbnail: string;
|
|
66
68
|
|
|
67
69
|
/** The type of the game, e.g. Spin the Wheel, Gift Box, Scratch card, MatchX etc */
|
|
68
|
-
saw_game_type: SAWGameTypeName
|
|
70
|
+
saw_game_type: SAWGameTypeName;
|
|
69
71
|
/** How the user is charged for each game attempt e.g. Free, Points or Spin attempts */
|
|
70
|
-
saw_buyin_type: SAWBuyInTypeName
|
|
72
|
+
saw_buyin_type: SAWBuyInTypeName;
|
|
71
73
|
|
|
72
74
|
/** in case of charging type 'Points', what is the points amount will be deducted from user balance */
|
|
73
|
-
buyin_cost_points: number
|
|
75
|
+
buyin_cost_points: number;
|
|
74
76
|
/** in case of charging type 'Spin attempts', shows the current number of spin attempts that user has */
|
|
75
|
-
spin_count?: number
|
|
77
|
+
spin_count?: number;
|
|
76
78
|
|
|
77
79
|
/** if the game is limit to the number of spins that user can do during period of time, this property shows the epoch time in UTC when the next attempt will be available */
|
|
78
|
-
next_available_spin_ts: number
|
|
80
|
+
next_available_spin_ts: number;
|
|
79
81
|
|
|
80
82
|
/** The message that should be shown to the user when he cannot play the game, server rejected attempt with error code SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED */
|
|
81
|
-
over_limit_message: string
|
|
83
|
+
over_limit_message: string;
|
|
82
84
|
/** The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts or points. */
|
|
83
|
-
no_attempts_message: string
|
|
85
|
+
no_attempts_message: string;
|
|
84
86
|
|
|
85
87
|
/** Current jackpont amount, if jackpot is enabled. */
|
|
86
|
-
jackpot_current: number
|
|
88
|
+
jackpot_current: number;
|
|
87
89
|
/** The amount that will be added to the jackpot every time when somebody plays the game. Note that the contribution amount is abstract, means that no money or points are deducted from the user balance. */
|
|
88
|
-
jackpot_add_on_attempt: number
|
|
90
|
+
jackpot_add_on_attempt: number;
|
|
89
91
|
/** The symbol of jackpot that is giving the sense to the 'amount' E.g. the symbol could be EUR and connected to the amount it can indicate that amount is monetary, e.g. '100 EUR'. Or the symbol can be 'Free spins' and connected to the amount it can indicate that amount is number of free spins, e.g. '100 Free spins'.
|
|
90
92
|
*/
|
|
91
|
-
jackpot_symbol: string
|
|
93
|
+
jackpot_symbol: string;
|
|
92
94
|
|
|
93
95
|
/** The promo image */
|
|
94
|
-
promo_image: string
|
|
96
|
+
promo_image: string;
|
|
95
97
|
/** The promo text */
|
|
96
|
-
promo_text: string
|
|
98
|
+
promo_text: string;
|
|
97
99
|
/** The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number */
|
|
98
|
-
custom_data: any
|
|
100
|
+
custom_data: any;
|
|
99
101
|
|
|
100
102
|
/** List of prizes for mini-games */
|
|
101
|
-
prizes: TMiniGamePrize[]
|
|
103
|
+
prizes: TMiniGamePrize[];
|
|
102
104
|
|
|
103
105
|
/* When enabled, the number of items in the pool and number of won items will be exposed in the Retention API and in the UI Widgets */
|
|
104
|
-
expose_game_stat_on_api?: boolean
|
|
106
|
+
expose_game_stat_on_api?: boolean;
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
/**
|
|
@@ -113,28 +115,28 @@ export interface TMiniGameTemplate {
|
|
|
113
115
|
|
|
114
116
|
export interface TUserProfile {
|
|
115
117
|
/** The language of the user */
|
|
116
|
-
core_user_language: string
|
|
118
|
+
core_user_language: string;
|
|
117
119
|
/** The current points balance that user can use in the Store, Mini-games, Tournaments, etc.. */
|
|
118
|
-
ach_points_balance: number
|
|
120
|
+
ach_points_balance: number;
|
|
119
121
|
/** The amount of points that user collected in total */
|
|
120
|
-
ach_points_ever: number
|
|
122
|
+
ach_points_ever: number;
|
|
121
123
|
/**
|
|
122
124
|
* The array of the public tags set on the user object.
|
|
123
125
|
* They can be treated as server-based cookies.
|
|
124
126
|
* You can set tags using following method _smartico.event('core_public_tags_update', { core_public_tags: ['A', 'B'] } );
|
|
125
127
|
* And then you can check for the tags
|
|
126
128
|
*/
|
|
127
|
-
core_public_tags: string[]
|
|
129
|
+
core_public_tags: string[];
|
|
128
130
|
/** The ID of the current level of the user */
|
|
129
|
-
ach_level_current_id?: number
|
|
131
|
+
ach_level_current_id?: number;
|
|
130
132
|
/** The indicator if user is marked as test user */
|
|
131
|
-
core_is_test_account?: boolean
|
|
133
|
+
core_is_test_account?: boolean;
|
|
132
134
|
/** The URL to the user avatar */
|
|
133
|
-
avatar_url?: string
|
|
135
|
+
avatar_url?: string;
|
|
134
136
|
/** The username of current user */
|
|
135
|
-
public_username?: string
|
|
137
|
+
public_username?: string;
|
|
136
138
|
/** THe number of unread inbox messages */
|
|
137
|
-
core_inbox_unread_count?: number
|
|
139
|
+
core_inbox_unread_count?: number;
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
/**
|
|
@@ -145,34 +147,34 @@ export interface TUserProfile {
|
|
|
145
147
|
*/
|
|
146
148
|
export interface TLevel {
|
|
147
149
|
/** The ID of the Level */
|
|
148
|
-
id: number
|
|
150
|
+
id: number;
|
|
149
151
|
/** The name of the Level, translated to the user language */
|
|
150
|
-
name: string
|
|
152
|
+
name: string;
|
|
151
153
|
/** The description of the Level, translated to the user language */
|
|
152
|
-
description: string
|
|
154
|
+
description: string;
|
|
153
155
|
/** The URL of the image of the Level */
|
|
154
|
-
image: string
|
|
156
|
+
image: string;
|
|
155
157
|
/** The amount of points required to reach the Level */
|
|
156
|
-
required_points: number
|
|
158
|
+
required_points: number;
|
|
157
159
|
/** Number of points that user should collect in order to see this level */
|
|
158
|
-
visibility_points: number
|
|
160
|
+
visibility_points: number;
|
|
159
161
|
/**
|
|
160
162
|
* The counter of 1st metric used to reach the Level.
|
|
161
163
|
* Relevant in case of using advanced leveling logic
|
|
162
164
|
* https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
|
|
163
165
|
*
|
|
164
166
|
*/
|
|
165
|
-
required_level_counter_1: number
|
|
167
|
+
required_level_counter_1: number;
|
|
166
168
|
/**
|
|
167
169
|
* The counter of 2nd metric used to reach the Level.
|
|
168
170
|
* Relevant in case of using advanced leveling logic
|
|
169
171
|
* https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
|
|
170
172
|
*
|
|
171
173
|
*/
|
|
172
|
-
required_level_counter_2: number
|
|
174
|
+
required_level_counter_2: number;
|
|
173
175
|
|
|
174
176
|
/** The custom data of the Level defined by operator in the BackOffice. Can be a JSON object, string or number */
|
|
175
|
-
custom_data: string
|
|
177
|
+
custom_data: string;
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
/**
|
|
@@ -181,105 +183,105 @@ export interface TLevel {
|
|
|
181
183
|
|
|
182
184
|
export interface TTournament {
|
|
183
185
|
/** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */
|
|
184
|
-
instance_id: number
|
|
186
|
+
instance_id: number;
|
|
185
187
|
/** ID of tournament template */
|
|
186
|
-
tournament_id: number
|
|
188
|
+
tournament_id: number;
|
|
187
189
|
/** Name of the tournament, translated to the user language */
|
|
188
|
-
name: string
|
|
190
|
+
name: string;
|
|
189
191
|
/** Description of the tournament, translated to the user language */
|
|
190
|
-
description: string
|
|
192
|
+
description: string;
|
|
191
193
|
/* 1st image URL representing the tournament */
|
|
192
|
-
image1: string
|
|
194
|
+
image1: string;
|
|
193
195
|
/* 2nd image URL representing the tournament */
|
|
194
|
-
image2: string
|
|
196
|
+
image2: string;
|
|
195
197
|
/* 2nd image URL representing the tournament for mobile */
|
|
196
|
-
image2_mobile: string
|
|
198
|
+
image2_mobile: string;
|
|
197
199
|
/* The message indicating the prize pool of the tournament */
|
|
198
|
-
prize_pool_short: string
|
|
200
|
+
prize_pool_short: string;
|
|
199
201
|
/* The message indicating the price to register in the tournament */
|
|
200
|
-
custom_price_text: string
|
|
202
|
+
custom_price_text: string;
|
|
201
203
|
|
|
202
204
|
/** The message that should be shown to the user when the user cannot register in tournament with error code TOURNAMENT_USER_DONT_MATCH_CONDITIONS */
|
|
203
|
-
segment_dont_match_message: string
|
|
205
|
+
segment_dont_match_message: string;
|
|
204
206
|
/**
|
|
205
207
|
* The ID of the custom section where the tournament is assigned
|
|
206
208
|
* The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
|
|
207
209
|
*/
|
|
208
|
-
custom_section_id: number
|
|
210
|
+
custom_section_id: number;
|
|
209
211
|
/** The custom data of the tournament defined by operator. Can be a JSON object, string or number */
|
|
210
|
-
custom_data: any
|
|
212
|
+
custom_data: any;
|
|
211
213
|
|
|
212
214
|
/** The indicator if the tournament is 'Featured' */
|
|
213
|
-
is_featured: boolean
|
|
215
|
+
is_featured: boolean;
|
|
214
216
|
|
|
215
217
|
/** The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
216
|
-
ribbon: TRibbon
|
|
218
|
+
ribbon: TRibbon;
|
|
217
219
|
|
|
218
220
|
/** A number is used to order the tournaments, representing their priority in the list */
|
|
219
|
-
priority: number
|
|
221
|
+
priority: number;
|
|
220
222
|
/** Info about current player in tournament */
|
|
221
223
|
me?: {
|
|
222
224
|
/** The username of the participant */
|
|
223
|
-
public_username: string
|
|
225
|
+
public_username: string;
|
|
224
226
|
/** The URL to the avatar of the participant */
|
|
225
|
-
avatar_url: string
|
|
227
|
+
avatar_url: string;
|
|
226
228
|
/** The position of the participant in the tournament */
|
|
227
|
-
position: number
|
|
229
|
+
position: number;
|
|
228
230
|
/** The scores of the participant in the tournament */
|
|
229
|
-
scores: number
|
|
230
|
-
}
|
|
231
|
+
scores: number;
|
|
232
|
+
};
|
|
231
233
|
/** Prize structure */
|
|
232
234
|
prizes?: {
|
|
233
235
|
/** The name of the prize */
|
|
234
|
-
name: string
|
|
236
|
+
name: string;
|
|
235
237
|
/** The description of the prize */
|
|
236
|
-
description: string
|
|
238
|
+
description: string;
|
|
237
239
|
/** The image of the prize */
|
|
238
|
-
image_url: string
|
|
240
|
+
image_url: string;
|
|
239
241
|
/** from-to range of the places to which this prize */
|
|
240
|
-
place_from: number
|
|
241
|
-
place_to: number
|
|
242
|
+
place_from: number;
|
|
243
|
+
place_to: number;
|
|
242
244
|
/** type of the prize: TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS */
|
|
243
|
-
type: string
|
|
245
|
+
type: string;
|
|
244
246
|
/** if the prize is points related, indicates amount of points */
|
|
245
|
-
points?: number
|
|
246
|
-
}[]
|
|
247
|
+
points?: number;
|
|
248
|
+
}[];
|
|
247
249
|
|
|
248
250
|
/** The time when tournament is going to start, epoch with milliseconds */
|
|
249
|
-
start_time: number
|
|
251
|
+
start_time: number;
|
|
250
252
|
/** The time when tournament is going to finish, epoch with milliseconds */
|
|
251
|
-
end_time: number
|
|
253
|
+
end_time: number;
|
|
252
254
|
/** Type of registration in the tournament */
|
|
253
|
-
registration_type: TournamentRegistrationTypeName
|
|
255
|
+
registration_type: TournamentRegistrationTypeName;
|
|
254
256
|
/** Number of users registered in the tournament */
|
|
255
|
-
registration_count: number
|
|
257
|
+
registration_count: number;
|
|
256
258
|
/** flag indicating if current user is registered in the tournament */
|
|
257
|
-
is_user_registered: boolean
|
|
259
|
+
is_user_registered: boolean;
|
|
258
260
|
/** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */
|
|
259
|
-
players_min_count: number
|
|
261
|
+
players_min_count: number;
|
|
260
262
|
/** Maximum number of participant for this tournament. When reached, new users won't be able to register */
|
|
261
|
-
players_max_count: number
|
|
263
|
+
players_max_count: number;
|
|
262
264
|
/** Status of registration in the tournament for current user */
|
|
263
|
-
registration_status: TournamentRegistrationStatusName
|
|
265
|
+
registration_status: TournamentRegistrationStatusName;
|
|
264
266
|
/** Tournament duration in millisecnnds */
|
|
265
|
-
duration_ms: number
|
|
267
|
+
duration_ms: number;
|
|
266
268
|
|
|
267
269
|
/** Cost of registration in the tournament in gamification points */
|
|
268
|
-
registration_cost_points: number
|
|
270
|
+
registration_cost_points: number;
|
|
269
271
|
|
|
270
272
|
/** Indicator if tournament instance is active, means in one of the statues - PUBLISHED, REGISTED, STARTED */
|
|
271
|
-
is_active: boolean
|
|
273
|
+
is_active: boolean;
|
|
272
274
|
|
|
273
275
|
/** Indicator if user can register in this tournament instance, e.g tournament is active, max users is not reached, user is not registered yet */
|
|
274
|
-
is_can_register: boolean
|
|
276
|
+
is_can_register: boolean;
|
|
275
277
|
/** Indicator if tournament instance is cancelled (status CANCELLED) */
|
|
276
|
-
is_cancelled: boolean
|
|
278
|
+
is_cancelled: boolean;
|
|
277
279
|
/** Indicator if tournament instance is finished (status FINISHED, CANCELLED OR FINIALIZING) */
|
|
278
|
-
is_finished: boolean
|
|
280
|
+
is_finished: boolean;
|
|
279
281
|
/** Indicator if tournament instance is running (status STARTED) */
|
|
280
|
-
is_in_progress: boolean
|
|
282
|
+
is_in_progress: boolean;
|
|
281
283
|
/** Indicator if tournament instance is upcoming (status PUBLISHED or REGISTER) */
|
|
282
|
-
is_upcoming: boolean
|
|
284
|
+
is_upcoming: boolean;
|
|
283
285
|
}
|
|
284
286
|
|
|
285
287
|
/**
|
|
@@ -287,47 +289,47 @@ export interface TTournament {
|
|
|
287
289
|
*/
|
|
288
290
|
export interface TTournamentDetailed extends TTournament {
|
|
289
291
|
/** List of casino games (or other types of entities) related to the tournament */
|
|
290
|
-
related_games?: AchRelatedGame[]
|
|
292
|
+
related_games?: AchRelatedGame[];
|
|
291
293
|
/** The list of the tournament participants */
|
|
292
294
|
players?: {
|
|
293
295
|
/** The username of the participant */
|
|
294
|
-
public_username: string
|
|
296
|
+
public_username: string;
|
|
295
297
|
/** The URL to the avatar of the participant */
|
|
296
|
-
avatar_url: string
|
|
298
|
+
avatar_url: string;
|
|
297
299
|
/** The position of the participant in the tournament */
|
|
298
|
-
position: number
|
|
300
|
+
position: number;
|
|
299
301
|
/** The scores of the participant in the tournament */
|
|
300
|
-
scores: number
|
|
302
|
+
scores: number;
|
|
301
303
|
/** The indicator if the participant is current user */
|
|
302
|
-
is_me: boolean
|
|
303
|
-
}[]
|
|
304
|
+
is_me: boolean;
|
|
305
|
+
}[];
|
|
304
306
|
/** The information about current user in the tournament if he is registered in the tournamnet */
|
|
305
307
|
me?: {
|
|
306
308
|
/** The username of the current user */
|
|
307
|
-
public_username: string
|
|
309
|
+
public_username: string;
|
|
308
310
|
/** The URL to the avatar of the current user */
|
|
309
|
-
avatar_url: string
|
|
311
|
+
avatar_url: string;
|
|
310
312
|
/** The position of the current user in the tournament */
|
|
311
|
-
position: number
|
|
313
|
+
position: number;
|
|
312
314
|
/** The scores of the current user in the tournament */
|
|
313
|
-
scores: number
|
|
314
|
-
}
|
|
315
|
+
scores: number;
|
|
316
|
+
};
|
|
315
317
|
|
|
316
318
|
prizes?: {
|
|
317
319
|
/** The name of the prize */
|
|
318
|
-
name: string
|
|
320
|
+
name: string;
|
|
319
321
|
/** The description of the prize */
|
|
320
|
-
description: string
|
|
322
|
+
description: string;
|
|
321
323
|
/** The image of the prize */
|
|
322
|
-
image_url: string
|
|
324
|
+
image_url: string;
|
|
323
325
|
/** from-to range of the places to which this prize */
|
|
324
|
-
place_from: number
|
|
325
|
-
place_to: number
|
|
326
|
+
place_from: number;
|
|
327
|
+
place_to: number;
|
|
326
328
|
/** type of the prize: TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS */
|
|
327
|
-
type: string
|
|
329
|
+
type: string;
|
|
328
330
|
/** if the prize is points related, indicates amount of points */
|
|
329
|
-
points?: number
|
|
330
|
-
}[]
|
|
331
|
+
points?: number;
|
|
332
|
+
}[];
|
|
331
333
|
}
|
|
332
334
|
|
|
333
335
|
/**
|
|
@@ -335,11 +337,11 @@ export interface TTournamentDetailed extends TTournament {
|
|
|
335
337
|
*/
|
|
336
338
|
export interface TStoreCategory {
|
|
337
339
|
/**ID of the store category */
|
|
338
|
-
id: number
|
|
340
|
+
id: number;
|
|
339
341
|
/**Name of the store category */
|
|
340
|
-
name: string
|
|
342
|
+
name: string;
|
|
341
343
|
/**Order of the store category among other categories. Default value is 1 */
|
|
342
|
-
order: number
|
|
344
|
+
order: number;
|
|
343
345
|
}
|
|
344
346
|
|
|
345
347
|
/**
|
|
@@ -347,49 +349,49 @@ export interface TStoreCategory {
|
|
|
347
349
|
*/
|
|
348
350
|
export interface TStoreItem {
|
|
349
351
|
/** ID of the store item */
|
|
350
|
-
id: number
|
|
352
|
+
id: number;
|
|
351
353
|
/** Name of the store item, translated to the user language */
|
|
352
|
-
name: string
|
|
354
|
+
name: string;
|
|
353
355
|
/** Description of the store item, translated to the user language */
|
|
354
|
-
description: string
|
|
356
|
+
description: string;
|
|
355
357
|
/** URL of the image of the store item */
|
|
356
|
-
image: string
|
|
358
|
+
image: string;
|
|
357
359
|
/** Type of the store item. Can be 'bonus' or 'tangible' or different others. */
|
|
358
|
-
type: 'bonus' | 'tangible' | 'minigamespin' | 'changelevel' | 'prizedrop' | 'unknown'
|
|
360
|
+
type: 'bonus' | 'tangible' | 'minigamespin' | 'changelevel' | 'prizedrop' | 'unknown';
|
|
359
361
|
/** The price of the store item in the gamification points */
|
|
360
|
-
price: number
|
|
362
|
+
price: number;
|
|
361
363
|
/** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
362
|
-
ribbon: TRibbon
|
|
364
|
+
ribbon: TRibbon;
|
|
363
365
|
/**
|
|
364
366
|
* The message that should be shown to the user if he is not eligible to buy it. this message can be used to explain the reason why user cannot buy the item, e.g. 'You should be VIP to buy this item' and can be used in case can_buy property is false.
|
|
365
367
|
The message is translated to the user language.
|
|
366
368
|
**Note**: when user is trying to buy the item, the response from server can return custom error messages that can be shown to the user as well
|
|
367
369
|
*/
|
|
368
|
-
limit_message: string
|
|
370
|
+
limit_message: string;
|
|
369
371
|
/** The priority of the store item. Can be used to sort the items in the store */
|
|
370
|
-
priority: number
|
|
372
|
+
priority: number;
|
|
371
373
|
/** The list of IDs of the related items. Can be used to show the related items in the store */
|
|
372
|
-
related_item_ids: number[]
|
|
374
|
+
related_item_ids: number[];
|
|
373
375
|
/** The indicator if the user can buy the item
|
|
374
376
|
* This indicator is taking into account the segment conditions for the store item, the price of item towards users balance,
|
|
375
377
|
*/
|
|
376
|
-
can_buy: boolean
|
|
378
|
+
can_buy: boolean;
|
|
377
379
|
/** The list of IDs of the categories where the store item is assigned, information about categories can be retrieved with getStoreCategories method */
|
|
378
|
-
category_ids: number[]
|
|
380
|
+
category_ids: number[];
|
|
379
381
|
/** Number of items in the pool avaliable for the purchase.*/
|
|
380
|
-
pool?: number
|
|
382
|
+
pool?: number;
|
|
381
383
|
/** The T&C text for the store item */
|
|
382
|
-
hint_text?: string
|
|
384
|
+
hint_text?: string;
|
|
383
385
|
/** Purchase time to show in purchase history screen */
|
|
384
|
-
purchase_ts?: number
|
|
386
|
+
purchase_ts?: number;
|
|
385
387
|
/** The amount of points you can purchase an item */
|
|
386
|
-
purchase_points_amount?: number
|
|
388
|
+
purchase_points_amount?: number;
|
|
387
389
|
/** Flag for store item indicating that it was purchased today */
|
|
388
|
-
purchased_today?: boolean
|
|
390
|
+
purchased_today?: boolean;
|
|
389
391
|
/** Flag for store item indicating that it was purchased this week */
|
|
390
|
-
purchased_this_week?: boolean
|
|
392
|
+
purchased_this_week?: boolean;
|
|
391
393
|
/** Flag for store item indicating that it was purchased this month */
|
|
392
|
-
purchased_this_month?: boolean
|
|
394
|
+
purchased_this_month?: boolean;
|
|
393
395
|
}
|
|
394
396
|
|
|
395
397
|
/**
|
|
@@ -397,11 +399,11 @@ export interface TStoreItem {
|
|
|
397
399
|
*/
|
|
398
400
|
export interface TAchCategory {
|
|
399
401
|
/**ID of the badge category */
|
|
400
|
-
id: number
|
|
402
|
+
id: number;
|
|
401
403
|
/**Name of the badge category */
|
|
402
|
-
name: string
|
|
404
|
+
name: string;
|
|
403
405
|
/**Order of the badge category among other categories. Default value is 1 */
|
|
404
|
-
order: number
|
|
406
|
+
order: number;
|
|
405
407
|
}
|
|
406
408
|
|
|
407
409
|
/**
|
|
@@ -409,117 +411,121 @@ export interface TAchCategory {
|
|
|
409
411
|
*/
|
|
410
412
|
export interface TMissionOrBadge {
|
|
411
413
|
/** ID of the mission or badge */
|
|
412
|
-
id: number
|
|
414
|
+
id: number;
|
|
413
415
|
/** Type of entity. Can be 'mission' or 'badge' */
|
|
414
|
-
type: 'mission' | 'badge'
|
|
416
|
+
type: 'mission' | 'badge';
|
|
415
417
|
/** Name of the mission or badge, translated to the user language */
|
|
416
|
-
name: string
|
|
418
|
+
name: string;
|
|
417
419
|
/** Description of the mission or badge, translated to the user language */
|
|
418
|
-
description: string
|
|
420
|
+
description: string;
|
|
419
421
|
/** Description of the mission reward if defined */
|
|
420
|
-
reward: string
|
|
422
|
+
reward: string;
|
|
421
423
|
/** URL of the image of the mission or badge */
|
|
422
|
-
image: string
|
|
424
|
+
image: string;
|
|
423
425
|
/** Indicator if the mission is completed or badge is granted */
|
|
424
|
-
is_completed: boolean
|
|
426
|
+
is_completed: boolean;
|
|
425
427
|
/** Indicator if the mission is locked. Means that it's visible to the user, but he cannot progress in it until it's unlocked.
|
|
426
428
|
* Mission may optionally contain the explanation of what should be done to unlock it in the unlock_mission_description property
|
|
427
429
|
*/
|
|
428
|
-
is_locked: boolean
|
|
430
|
+
is_locked: boolean;
|
|
429
431
|
/** Optional explaination of what should be done to unlock the mission */
|
|
430
|
-
unlock_mission_description: string
|
|
432
|
+
unlock_mission_description: string;
|
|
431
433
|
/** Indicator if the mission requires opt-in. Means that user should explicitly opt-in to the mission in order to start progressing in it */
|
|
432
|
-
is_requires_optin: boolean
|
|
434
|
+
is_requires_optin: boolean;
|
|
433
435
|
/** Indicator if the user opted-in to the mission */
|
|
434
|
-
is_opted_in: boolean
|
|
436
|
+
is_opted_in: boolean;
|
|
435
437
|
/** The amount of time in milliseconds that user has to complete the mission */
|
|
436
|
-
time_limit_ms: number
|
|
438
|
+
time_limit_ms: number;
|
|
439
|
+
|
|
440
|
+
/** Holds time from which mission will become available, for the missions that are targeted to be available from specific date/time */
|
|
441
|
+
active_from_ts: number;
|
|
442
|
+
|
|
437
443
|
/** The date when the mission was started, relevant for the time limited missions */
|
|
438
|
-
dt_start: number
|
|
444
|
+
dt_start: number;
|
|
439
445
|
/** The progress of the mission in percents calculated as the aggregated relative percentage of all tasks */
|
|
440
|
-
progress: number
|
|
446
|
+
progress: number;
|
|
441
447
|
/**
|
|
442
448
|
* The action that should be performed when user clicks on the mission or badge
|
|
443
449
|
* Can be URL or deep link, e.g. 'dp:deposit'. The most safe to execute CTA is to pass it to _smartico.dp(cta_action);
|
|
444
450
|
* The 'dp' function will handle the CTA and will execute it in the most safe way
|
|
445
451
|
*/
|
|
446
|
-
cta_action: string
|
|
452
|
+
cta_action: string;
|
|
447
453
|
/** The text of the CTA button, e.g. 'Make a deposit' */
|
|
448
|
-
cta_text: string
|
|
454
|
+
cta_text: string;
|
|
449
455
|
/**
|
|
450
456
|
* The ID of the custom section where the mission or badge is assigned
|
|
451
457
|
* The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
|
|
452
458
|
*/
|
|
453
|
-
custom_section_id: number
|
|
459
|
+
custom_section_id: number;
|
|
454
460
|
/** 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 */
|
|
455
|
-
only_in_custom_section: boolean
|
|
461
|
+
only_in_custom_section: boolean;
|
|
456
462
|
/** The custom data of the mission or badge defined by operator. Can be a JSON object, string or number */
|
|
457
|
-
custom_data: any
|
|
463
|
+
custom_data: any;
|
|
458
464
|
|
|
459
465
|
/** The list of tasks of the mission or badge */
|
|
460
|
-
tasks: TMissionOrBadgeTask[]
|
|
466
|
+
tasks: TMissionOrBadgeTask[];
|
|
461
467
|
|
|
462
468
|
/** List of casino games (or other types of entities) related to the mission or badge */
|
|
463
|
-
related_games?: AchRelatedGame[]
|
|
469
|
+
related_games?: AchRelatedGame[];
|
|
464
470
|
|
|
465
471
|
/** The list of IDs of the categories where the badge item is assigned, information about categories can be retrieved with getAchCategories method */
|
|
466
|
-
category_ids: number[]
|
|
472
|
+
category_ids: number[];
|
|
467
473
|
|
|
468
474
|
/** The T&C text for the missions */
|
|
469
|
-
hint_text?: string
|
|
475
|
+
hint_text?: string;
|
|
470
476
|
|
|
471
477
|
/** Priority (or position) of the mission in the UI. Low value indicates higher position in the UI */
|
|
472
|
-
position?: number
|
|
478
|
+
position?: number;
|
|
473
479
|
|
|
474
480
|
/** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
475
|
-
ribbon?: TRibbon
|
|
481
|
+
ribbon?: TRibbon;
|
|
476
482
|
|
|
477
483
|
/** ID of the completion fact from ach_completed or ach_completed_recurring tables */
|
|
478
|
-
ach_completed_id?: number
|
|
484
|
+
ach_completed_id?: number;
|
|
479
485
|
|
|
480
486
|
/** Flag from achievement if the mission prize will be given only after user claims it */
|
|
481
|
-
requires_prize_claim?: boolean
|
|
487
|
+
requires_prize_claim?: boolean;
|
|
482
488
|
|
|
483
489
|
/** The date/timestamp indicating when the prize was claimed by the user */
|
|
484
|
-
prize_claimed_date_ts?: number
|
|
490
|
+
prize_claimed_date_ts?: number;
|
|
485
491
|
|
|
486
492
|
/** Time in hours that took this player to complete mission */
|
|
487
|
-
complete_date?: string
|
|
493
|
+
complete_date?: string;
|
|
488
494
|
|
|
489
495
|
/** Time of mission/badge being completed, this property shows the epoch time in UTC */
|
|
490
|
-
complete_date_ts?: number
|
|
496
|
+
complete_date_ts?: number;
|
|
491
497
|
|
|
492
498
|
/** Flag for mission/badge indicating that mission/badge completed today */
|
|
493
|
-
completed_today?: boolean
|
|
499
|
+
completed_today?: boolean;
|
|
494
500
|
|
|
495
501
|
/** Flag for mission/badge indicating that mission/badge completed this week */
|
|
496
|
-
completed_this_week?: boolean
|
|
502
|
+
completed_this_week?: boolean;
|
|
497
503
|
|
|
498
504
|
/** Flag for mission/badge indicating that mission/badge completed this month */
|
|
499
|
-
completed_this_month?: boolean
|
|
505
|
+
completed_this_month?: boolean;
|
|
500
506
|
|
|
501
507
|
/** ID of specific Custom Section type */
|
|
502
|
-
custom_section_type_id?: number
|
|
508
|
+
custom_section_type_id?: number;
|
|
503
509
|
}
|
|
504
510
|
|
|
505
511
|
export interface AchRelatedGame {
|
|
506
512
|
/** The ID of the related game */
|
|
507
|
-
ext_game_id: string
|
|
513
|
+
ext_game_id: string;
|
|
508
514
|
/** Game public meta information */
|
|
509
515
|
game_public_meta: {
|
|
510
516
|
/** The name of the game */
|
|
511
|
-
name: string
|
|
517
|
+
name: string;
|
|
512
518
|
/** The URL to the game */
|
|
513
|
-
link: string
|
|
519
|
+
link: string;
|
|
514
520
|
/** The URL to the image of the game */
|
|
515
|
-
image: string
|
|
521
|
+
image: string;
|
|
516
522
|
/** The indicator if the game is enabled */
|
|
517
|
-
enabled: boolean
|
|
523
|
+
enabled: boolean;
|
|
518
524
|
/** The list of categories of the game */
|
|
519
|
-
game_categories: string[]
|
|
525
|
+
game_categories: string[];
|
|
520
526
|
/** The name of the game provider */
|
|
521
|
-
game_provider: string
|
|
522
|
-
}
|
|
527
|
+
game_provider: string;
|
|
528
|
+
};
|
|
523
529
|
}
|
|
524
530
|
|
|
525
531
|
/**
|
|
@@ -527,19 +533,19 @@ export interface AchRelatedGame {
|
|
|
527
533
|
*/
|
|
528
534
|
export interface TMissionOrBadgeTask {
|
|
529
535
|
/** ID of the task */
|
|
530
|
-
id: number
|
|
536
|
+
id: number;
|
|
531
537
|
/** Name of the task, translated to the user language */
|
|
532
|
-
name: string
|
|
538
|
+
name: string;
|
|
533
539
|
/** Indicator if the task is completed */
|
|
534
|
-
is_completed: boolean
|
|
540
|
+
is_completed: boolean;
|
|
535
541
|
/** The progress of the task in percents */
|
|
536
|
-
progress: number
|
|
542
|
+
progress: number;
|
|
537
543
|
/** Reward for completing the task in points */
|
|
538
|
-
points_reward: number
|
|
544
|
+
points_reward: number;
|
|
539
545
|
/** This is the total number of times the user needs to execute to complete task. e.g. he needs to bet 100 times. Here will be 100 */
|
|
540
|
-
execution_count_expected?: number
|
|
546
|
+
execution_count_expected?: number;
|
|
541
547
|
/** This is the number of times the user has executed 'activity' of the task. e.g. he bet 5 times out of 100. Here will be 5 */
|
|
542
|
-
execution_count_actual?: number
|
|
548
|
+
execution_count_actual?: number;
|
|
543
549
|
}
|
|
544
550
|
|
|
545
551
|
/**
|
|
@@ -547,9 +553,9 @@ export interface TMissionOrBadgeTask {
|
|
|
547
553
|
*/
|
|
548
554
|
export interface TMissionOptInResult {
|
|
549
555
|
/** Error code that represents outcome of the opt-in request. Successful opt-in in case err_code is 0 */
|
|
550
|
-
err_code: number
|
|
556
|
+
err_code: number;
|
|
551
557
|
/** Optional error message */
|
|
552
|
-
err_message: string
|
|
558
|
+
err_message: string;
|
|
553
559
|
}
|
|
554
560
|
|
|
555
561
|
/**
|
|
@@ -557,138 +563,169 @@ export interface TMissionOptInResult {
|
|
|
557
563
|
*/
|
|
558
564
|
export interface TMissionClaimRewardResult {
|
|
559
565
|
/** Error code that represents outcome of the claim request. Successful claim reward in case err_code is 0 */
|
|
560
|
-
err_code: number
|
|
566
|
+
err_code: number;
|
|
561
567
|
/** Optional error message */
|
|
562
|
-
err_message: string
|
|
568
|
+
err_message: string;
|
|
563
569
|
}
|
|
564
570
|
|
|
565
571
|
export interface TTournamentRegistrationResult {
|
|
566
572
|
/** Error code that represents outcome of the tournament registration request. Successful registration in case err_code is 0 */
|
|
567
|
-
err_code: TournamentRegistrationError
|
|
573
|
+
err_code: TournamentRegistrationError;
|
|
568
574
|
/** Optional error message */
|
|
569
|
-
err_message: string
|
|
575
|
+
err_message: string;
|
|
570
576
|
}
|
|
571
577
|
|
|
572
578
|
export interface TBuyStoreItemResult {
|
|
573
579
|
/** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0 */
|
|
574
|
-
err_code: BuyStoreItemErrorCode
|
|
580
|
+
err_code: BuyStoreItemErrorCode;
|
|
575
581
|
/** Optional error message */
|
|
576
|
-
err_message: string
|
|
582
|
+
err_message: string;
|
|
577
583
|
}
|
|
578
584
|
|
|
579
585
|
export interface TGetTranslations {
|
|
580
|
-
translations: { [key: string]: string }
|
|
586
|
+
translations: { [key: string]: string };
|
|
581
587
|
}
|
|
582
588
|
|
|
583
589
|
export interface TInboxMessage {
|
|
584
590
|
/** Uniq identifier of the message. It is needed to request the message body, mark the message as read/deleted/favorite. */
|
|
585
|
-
message_guid: string
|
|
591
|
+
message_guid: string;
|
|
586
592
|
/** Date when the message was sent */
|
|
587
|
-
sent_date: string
|
|
593
|
+
sent_date: string;
|
|
588
594
|
/** Indicator if a message is read */
|
|
589
|
-
read: boolean
|
|
595
|
+
read: boolean;
|
|
590
596
|
/** Indicator if a message is added to favorites */
|
|
591
|
-
favorite: boolean
|
|
597
|
+
favorite: boolean;
|
|
592
598
|
}
|
|
593
599
|
|
|
594
600
|
export interface TInboxMessageBody {
|
|
595
601
|
/** Message title */
|
|
596
|
-
title: string
|
|
602
|
+
title: string;
|
|
597
603
|
/** Short preview body of the message */
|
|
598
|
-
preview_body: string
|
|
604
|
+
preview_body: string;
|
|
599
605
|
/** Message icon */
|
|
600
|
-
icon: string
|
|
606
|
+
icon: string;
|
|
601
607
|
/** The action that should be performed when user clicks on the message.
|
|
602
608
|
* Can be URL or deep link, e.g. 'dp:deposit'. The most safe to execute CTA is to pass it to _smartico.dp(cta_action);
|
|
603
609
|
* The 'dp' function will handle the CTA and will execute it in the most safe way.
|
|
604
610
|
* If the message has a rich html body - the action will always be 'dp:inbox' which will open the inbox widget when triggered. */
|
|
605
|
-
action: string
|
|
611
|
+
action: string;
|
|
606
612
|
/** Rich HTML body of the message. */
|
|
607
|
-
html_body?: string
|
|
613
|
+
html_body?: string;
|
|
608
614
|
/** Optional additional buttons to show in the message, available only if message has rich HTML body. Max count - 2. */
|
|
609
615
|
buttons?: {
|
|
610
616
|
/** The action that should be performed when user clicks on the button. The logic is the same as for message actions */
|
|
611
|
-
action: string
|
|
617
|
+
action: string;
|
|
612
618
|
/** Button text */
|
|
613
|
-
text: string
|
|
614
|
-
}[]
|
|
619
|
+
text: string;
|
|
620
|
+
}[];
|
|
615
621
|
}
|
|
616
622
|
|
|
617
623
|
export interface InboxMarkMessageAction {
|
|
618
624
|
/** An error code representing the result of marking a message as deleted, favorite or read. Successful marking action if err_code is 0 */
|
|
619
|
-
err_code: number
|
|
625
|
+
err_code: number;
|
|
620
626
|
/** Optional error message */
|
|
621
|
-
err_message: string
|
|
627
|
+
err_message: string;
|
|
622
628
|
}
|
|
623
629
|
|
|
624
630
|
export interface LeaderBoardDetailsT {
|
|
625
631
|
/** ID of the leaderboard */
|
|
626
|
-
board_id: number
|
|
632
|
+
board_id: number;
|
|
627
633
|
/** Name of the leaderboard */
|
|
628
|
-
name: string
|
|
634
|
+
name: string;
|
|
629
635
|
/** Description of the leaderboard */
|
|
630
|
-
description: string
|
|
636
|
+
description: string;
|
|
631
637
|
/** Rules of the leaderboard */
|
|
632
|
-
rules: string
|
|
638
|
+
rules: string;
|
|
633
639
|
/** Leaderboard period type ID */
|
|
634
|
-
period_type_id: LeaderBoardPeriodType
|
|
640
|
+
period_type_id: LeaderBoardPeriodType;
|
|
635
641
|
/** Leaderboard points rewards */
|
|
636
|
-
rewards: LeaderBoardsRewardsT[]
|
|
642
|
+
rewards: LeaderBoardsRewardsT[];
|
|
637
643
|
/** Leaderboard users */
|
|
638
|
-
users: LeaderBoardUserT[]
|
|
644
|
+
users: LeaderBoardUserT[];
|
|
639
645
|
/** Info about current user in leaderboard */
|
|
640
|
-
me?: LeaderBoardUserT
|
|
646
|
+
me?: LeaderBoardUserT;
|
|
641
647
|
}
|
|
642
648
|
|
|
643
649
|
export interface LeaderBoardsRewardsT {
|
|
644
|
-
place: number
|
|
645
|
-
points: number
|
|
650
|
+
place: number;
|
|
651
|
+
points: number;
|
|
646
652
|
}
|
|
647
653
|
|
|
648
654
|
export interface LeaderBoardUserT {
|
|
649
655
|
/** The username of the participant */
|
|
650
|
-
public_username: string
|
|
656
|
+
public_username: string;
|
|
651
657
|
/** The URL to the avatar of the participant */
|
|
652
|
-
avatar_url: string
|
|
658
|
+
avatar_url: string;
|
|
653
659
|
/** The position of the participant in the leaderboard */
|
|
654
|
-
position: number
|
|
660
|
+
position: number;
|
|
655
661
|
/** The points of the participant in the leaderboard */
|
|
656
|
-
points: number
|
|
662
|
+
points: number;
|
|
657
663
|
/** The indicator if the participant is current user */
|
|
658
|
-
is_me: boolean
|
|
664
|
+
is_me: boolean;
|
|
659
665
|
}
|
|
660
666
|
|
|
661
667
|
export interface UserLevelExtraCountersT {
|
|
662
668
|
/** The counter of 1st metric used to reach the level. */
|
|
663
|
-
level_counter_1?: number
|
|
669
|
+
level_counter_1?: number;
|
|
664
670
|
/** The counter of 2nd metric used to reach the level. */
|
|
665
|
-
level_counter_2?: number
|
|
671
|
+
level_counter_2?: number;
|
|
666
672
|
}
|
|
667
673
|
|
|
668
674
|
export interface TSegmentCheckResult {
|
|
669
|
-
segment_id: number
|
|
670
|
-
is_matching: boolean
|
|
675
|
+
segment_id: number;
|
|
676
|
+
is_matching: boolean;
|
|
671
677
|
}
|
|
672
678
|
|
|
673
679
|
export interface TUICustomSection {
|
|
674
680
|
/** The body of the custom section */
|
|
675
|
-
body?: string
|
|
681
|
+
body?: string;
|
|
676
682
|
/** The image of the custom section */
|
|
677
|
-
menu_img?: string
|
|
683
|
+
menu_img?: string;
|
|
678
684
|
/** The name of the custom section */
|
|
679
|
-
menu_name?: string
|
|
685
|
+
menu_name?: string;
|
|
680
686
|
/** Custom images for custom section */
|
|
681
|
-
custom_skin_images?: string
|
|
687
|
+
custom_skin_images?: string;
|
|
682
688
|
/** The particular type of custom section, can be Missions, Tournaments, Lootbox and etc */
|
|
683
|
-
section_type_id?: AchCustomSectionType
|
|
689
|
+
section_type_id?: AchCustomSectionType;
|
|
684
690
|
/** Theme of the custom section */
|
|
685
|
-
theme?: AchCustomLayoutTheme
|
|
691
|
+
theme?: AchCustomLayoutTheme;
|
|
686
692
|
/** Custom css for the custom section */
|
|
687
|
-
generic_custom_css?: string
|
|
693
|
+
generic_custom_css?: string;
|
|
688
694
|
/** Tabs that can be shown in custom section, e.g Overview, No Overview, All tabs */
|
|
689
|
-
mission_tabs_options?: AchMissionsTabsOptions
|
|
695
|
+
mission_tabs_options?: AchMissionsTabsOptions;
|
|
690
696
|
/** Filter that allow to show missions by criteria */
|
|
691
|
-
overview_missions_filter?: AchOverviewMissionsFilter
|
|
697
|
+
overview_missions_filter?: AchOverviewMissionsFilter;
|
|
692
698
|
/** Quantity of missions to be shown in overview */
|
|
693
|
-
overview_missions_count?: number
|
|
699
|
+
overview_missions_count?: number;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
export interface TBonus {
|
|
703
|
+
/** ID of the bonus */
|
|
704
|
+
bonus_id: number;
|
|
705
|
+
/** Can the bonus be redeemed (if bonus is redeemable the user needs to claim it) */
|
|
706
|
+
is_redeemable?: boolean;
|
|
707
|
+
/** Date of creation */
|
|
708
|
+
create_date?: string;
|
|
709
|
+
/** Date of redemption */
|
|
710
|
+
redeem_date?: string;
|
|
711
|
+
/** ID of template used */
|
|
712
|
+
label_bonus_template_id?: number;
|
|
713
|
+
/** ID of the bonus status */
|
|
714
|
+
bonus_status_id?: BonusStatus;
|
|
715
|
+
/** Additional information about the bonus(edscription, image,name, acknowledge) */
|
|
716
|
+
label_bonus_template_meta_map?: BonusTemplateMetaMap;
|
|
717
|
+
/** Additional information presented to the player when the bonus is redeemed */
|
|
718
|
+
bonus_meta_map?: BonusMetaMap;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* TClaimBonusResult describes the response of call to _smartico.api.claimBonus(bonus_id) method
|
|
723
|
+
*/
|
|
724
|
+
export interface TClaimBonusResult {
|
|
725
|
+
/** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
|
|
726
|
+
err_code: SAWSpinErrorCode;
|
|
727
|
+
/** Optional error message */
|
|
728
|
+
err_message: string;
|
|
729
|
+
/** If the bonus was claimed successfully, then success is true */
|
|
730
|
+
success?: boolean;
|
|
694
731
|
}
|