@smartico/public-api 0.0.158 → 0.0.159
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 +30 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +253 -147
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +71 -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 +47 -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 +283 -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,117 @@ 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;
|
|
437
439
|
/** The date when the mission was started, relevant for the time limited missions */
|
|
438
|
-
dt_start: number
|
|
440
|
+
dt_start: number;
|
|
439
441
|
/** The progress of the mission in percents calculated as the aggregated relative percentage of all tasks */
|
|
440
|
-
progress: number
|
|
442
|
+
progress: number;
|
|
441
443
|
/**
|
|
442
444
|
* The action that should be performed when user clicks on the mission or badge
|
|
443
445
|
* 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
446
|
* The 'dp' function will handle the CTA and will execute it in the most safe way
|
|
445
447
|
*/
|
|
446
|
-
cta_action: string
|
|
448
|
+
cta_action: string;
|
|
447
449
|
/** The text of the CTA button, e.g. 'Make a deposit' */
|
|
448
|
-
cta_text: string
|
|
450
|
+
cta_text: string;
|
|
449
451
|
/**
|
|
450
452
|
* The ID of the custom section where the mission or badge is assigned
|
|
451
453
|
* The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
|
|
452
454
|
*/
|
|
453
|
-
custom_section_id: number
|
|
455
|
+
custom_section_id: number;
|
|
454
456
|
/** 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
|
|
457
|
+
only_in_custom_section: boolean;
|
|
456
458
|
/** The custom data of the mission or badge defined by operator. Can be a JSON object, string or number */
|
|
457
|
-
custom_data: any
|
|
459
|
+
custom_data: any;
|
|
458
460
|
|
|
459
461
|
/** The list of tasks of the mission or badge */
|
|
460
|
-
tasks: TMissionOrBadgeTask[]
|
|
462
|
+
tasks: TMissionOrBadgeTask[];
|
|
461
463
|
|
|
462
464
|
/** List of casino games (or other types of entities) related to the mission or badge */
|
|
463
|
-
related_games?: AchRelatedGame[]
|
|
465
|
+
related_games?: AchRelatedGame[];
|
|
464
466
|
|
|
465
467
|
/** 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[]
|
|
468
|
+
category_ids: number[];
|
|
467
469
|
|
|
468
470
|
/** The T&C text for the missions */
|
|
469
|
-
hint_text?: string
|
|
471
|
+
hint_text?: string;
|
|
470
472
|
|
|
471
473
|
/** Priority (or position) of the mission in the UI. Low value indicates higher position in the UI */
|
|
472
|
-
position?: number
|
|
474
|
+
position?: number;
|
|
473
475
|
|
|
474
476
|
/** 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
|
|
477
|
+
ribbon?: TRibbon;
|
|
476
478
|
|
|
477
479
|
/** ID of the completion fact from ach_completed or ach_completed_recurring tables */
|
|
478
|
-
ach_completed_id?: number
|
|
480
|
+
ach_completed_id?: number;
|
|
479
481
|
|
|
480
482
|
/** Flag from achievement if the mission prize will be given only after user claims it */
|
|
481
|
-
requires_prize_claim?: boolean
|
|
483
|
+
requires_prize_claim?: boolean;
|
|
482
484
|
|
|
483
485
|
/** The date/timestamp indicating when the prize was claimed by the user */
|
|
484
|
-
prize_claimed_date_ts?: number
|
|
486
|
+
prize_claimed_date_ts?: number;
|
|
485
487
|
|
|
486
488
|
/** Time in hours that took this player to complete mission */
|
|
487
|
-
complete_date?: string
|
|
489
|
+
complete_date?: string;
|
|
488
490
|
|
|
489
491
|
/** Time of mission/badge being completed, this property shows the epoch time in UTC */
|
|
490
|
-
complete_date_ts?: number
|
|
492
|
+
complete_date_ts?: number;
|
|
491
493
|
|
|
492
494
|
/** Flag for mission/badge indicating that mission/badge completed today */
|
|
493
|
-
completed_today?: boolean
|
|
495
|
+
completed_today?: boolean;
|
|
494
496
|
|
|
495
497
|
/** Flag for mission/badge indicating that mission/badge completed this week */
|
|
496
|
-
completed_this_week?: boolean
|
|
498
|
+
completed_this_week?: boolean;
|
|
497
499
|
|
|
498
500
|
/** Flag for mission/badge indicating that mission/badge completed this month */
|
|
499
|
-
completed_this_month?: boolean
|
|
501
|
+
completed_this_month?: boolean;
|
|
500
502
|
|
|
501
503
|
/** ID of specific Custom Section type */
|
|
502
|
-
custom_section_type_id?: number
|
|
504
|
+
custom_section_type_id?: number;
|
|
503
505
|
}
|
|
504
506
|
|
|
505
507
|
export interface AchRelatedGame {
|
|
506
508
|
/** The ID of the related game */
|
|
507
|
-
ext_game_id: string
|
|
509
|
+
ext_game_id: string;
|
|
508
510
|
/** Game public meta information */
|
|
509
511
|
game_public_meta: {
|
|
510
512
|
/** The name of the game */
|
|
511
|
-
name: string
|
|
513
|
+
name: string;
|
|
512
514
|
/** The URL to the game */
|
|
513
|
-
link: string
|
|
515
|
+
link: string;
|
|
514
516
|
/** The URL to the image of the game */
|
|
515
|
-
image: string
|
|
517
|
+
image: string;
|
|
516
518
|
/** The indicator if the game is enabled */
|
|
517
|
-
enabled: boolean
|
|
519
|
+
enabled: boolean;
|
|
518
520
|
/** The list of categories of the game */
|
|
519
|
-
game_categories: string[]
|
|
521
|
+
game_categories: string[];
|
|
520
522
|
/** The name of the game provider */
|
|
521
|
-
game_provider: string
|
|
522
|
-
}
|
|
523
|
+
game_provider: string;
|
|
524
|
+
};
|
|
523
525
|
}
|
|
524
526
|
|
|
525
527
|
/**
|
|
@@ -527,19 +529,19 @@ export interface AchRelatedGame {
|
|
|
527
529
|
*/
|
|
528
530
|
export interface TMissionOrBadgeTask {
|
|
529
531
|
/** ID of the task */
|
|
530
|
-
id: number
|
|
532
|
+
id: number;
|
|
531
533
|
/** Name of the task, translated to the user language */
|
|
532
|
-
name: string
|
|
534
|
+
name: string;
|
|
533
535
|
/** Indicator if the task is completed */
|
|
534
|
-
is_completed: boolean
|
|
536
|
+
is_completed: boolean;
|
|
535
537
|
/** The progress of the task in percents */
|
|
536
|
-
progress: number
|
|
538
|
+
progress: number;
|
|
537
539
|
/** Reward for completing the task in points */
|
|
538
|
-
points_reward: number
|
|
540
|
+
points_reward: number;
|
|
539
541
|
/** 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
|
|
542
|
+
execution_count_expected?: number;
|
|
541
543
|
/** 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
|
|
544
|
+
execution_count_actual?: number;
|
|
543
545
|
}
|
|
544
546
|
|
|
545
547
|
/**
|
|
@@ -547,9 +549,9 @@ export interface TMissionOrBadgeTask {
|
|
|
547
549
|
*/
|
|
548
550
|
export interface TMissionOptInResult {
|
|
549
551
|
/** Error code that represents outcome of the opt-in request. Successful opt-in in case err_code is 0 */
|
|
550
|
-
err_code: number
|
|
552
|
+
err_code: number;
|
|
551
553
|
/** Optional error message */
|
|
552
|
-
err_message: string
|
|
554
|
+
err_message: string;
|
|
553
555
|
}
|
|
554
556
|
|
|
555
557
|
/**
|
|
@@ -557,138 +559,169 @@ export interface TMissionOptInResult {
|
|
|
557
559
|
*/
|
|
558
560
|
export interface TMissionClaimRewardResult {
|
|
559
561
|
/** Error code that represents outcome of the claim request. Successful claim reward in case err_code is 0 */
|
|
560
|
-
err_code: number
|
|
562
|
+
err_code: number;
|
|
561
563
|
/** Optional error message */
|
|
562
|
-
err_message: string
|
|
564
|
+
err_message: string;
|
|
563
565
|
}
|
|
564
566
|
|
|
565
567
|
export interface TTournamentRegistrationResult {
|
|
566
568
|
/** Error code that represents outcome of the tournament registration request. Successful registration in case err_code is 0 */
|
|
567
|
-
err_code: TournamentRegistrationError
|
|
569
|
+
err_code: TournamentRegistrationError;
|
|
568
570
|
/** Optional error message */
|
|
569
|
-
err_message: string
|
|
571
|
+
err_message: string;
|
|
570
572
|
}
|
|
571
573
|
|
|
572
574
|
export interface TBuyStoreItemResult {
|
|
573
575
|
/** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0 */
|
|
574
|
-
err_code: BuyStoreItemErrorCode
|
|
576
|
+
err_code: BuyStoreItemErrorCode;
|
|
575
577
|
/** Optional error message */
|
|
576
|
-
err_message: string
|
|
578
|
+
err_message: string;
|
|
577
579
|
}
|
|
578
580
|
|
|
579
581
|
export interface TGetTranslations {
|
|
580
|
-
translations: { [key: string]: string }
|
|
582
|
+
translations: { [key: string]: string };
|
|
581
583
|
}
|
|
582
584
|
|
|
583
585
|
export interface TInboxMessage {
|
|
584
586
|
/** Uniq identifier of the message. It is needed to request the message body, mark the message as read/deleted/favorite. */
|
|
585
|
-
message_guid: string
|
|
587
|
+
message_guid: string;
|
|
586
588
|
/** Date when the message was sent */
|
|
587
|
-
sent_date: string
|
|
589
|
+
sent_date: string;
|
|
588
590
|
/** Indicator if a message is read */
|
|
589
|
-
read: boolean
|
|
591
|
+
read: boolean;
|
|
590
592
|
/** Indicator if a message is added to favorites */
|
|
591
|
-
favorite: boolean
|
|
593
|
+
favorite: boolean;
|
|
592
594
|
}
|
|
593
595
|
|
|
594
596
|
export interface TInboxMessageBody {
|
|
595
597
|
/** Message title */
|
|
596
|
-
title: string
|
|
598
|
+
title: string;
|
|
597
599
|
/** Short preview body of the message */
|
|
598
|
-
preview_body: string
|
|
600
|
+
preview_body: string;
|
|
599
601
|
/** Message icon */
|
|
600
|
-
icon: string
|
|
602
|
+
icon: string;
|
|
601
603
|
/** The action that should be performed when user clicks on the message.
|
|
602
604
|
* 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
605
|
* The 'dp' function will handle the CTA and will execute it in the most safe way.
|
|
604
606
|
* 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
|
|
607
|
+
action: string;
|
|
606
608
|
/** Rich HTML body of the message. */
|
|
607
|
-
html_body?: string
|
|
609
|
+
html_body?: string;
|
|
608
610
|
/** Optional additional buttons to show in the message, available only if message has rich HTML body. Max count - 2. */
|
|
609
611
|
buttons?: {
|
|
610
612
|
/** The action that should be performed when user clicks on the button. The logic is the same as for message actions */
|
|
611
|
-
action: string
|
|
613
|
+
action: string;
|
|
612
614
|
/** Button text */
|
|
613
|
-
text: string
|
|
614
|
-
}[]
|
|
615
|
+
text: string;
|
|
616
|
+
}[];
|
|
615
617
|
}
|
|
616
618
|
|
|
617
619
|
export interface InboxMarkMessageAction {
|
|
618
620
|
/** 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
|
|
621
|
+
err_code: number;
|
|
620
622
|
/** Optional error message */
|
|
621
|
-
err_message: string
|
|
623
|
+
err_message: string;
|
|
622
624
|
}
|
|
623
625
|
|
|
624
626
|
export interface LeaderBoardDetailsT {
|
|
625
627
|
/** ID of the leaderboard */
|
|
626
|
-
board_id: number
|
|
628
|
+
board_id: number;
|
|
627
629
|
/** Name of the leaderboard */
|
|
628
|
-
name: string
|
|
630
|
+
name: string;
|
|
629
631
|
/** Description of the leaderboard */
|
|
630
|
-
description: string
|
|
632
|
+
description: string;
|
|
631
633
|
/** Rules of the leaderboard */
|
|
632
|
-
rules: string
|
|
634
|
+
rules: string;
|
|
633
635
|
/** Leaderboard period type ID */
|
|
634
|
-
period_type_id: LeaderBoardPeriodType
|
|
636
|
+
period_type_id: LeaderBoardPeriodType;
|
|
635
637
|
/** Leaderboard points rewards */
|
|
636
|
-
rewards: LeaderBoardsRewardsT[]
|
|
638
|
+
rewards: LeaderBoardsRewardsT[];
|
|
637
639
|
/** Leaderboard users */
|
|
638
|
-
users: LeaderBoardUserT[]
|
|
640
|
+
users: LeaderBoardUserT[];
|
|
639
641
|
/** Info about current user in leaderboard */
|
|
640
|
-
me?: LeaderBoardUserT
|
|
642
|
+
me?: LeaderBoardUserT;
|
|
641
643
|
}
|
|
642
644
|
|
|
643
645
|
export interface LeaderBoardsRewardsT {
|
|
644
|
-
place: number
|
|
645
|
-
points: number
|
|
646
|
+
place: number;
|
|
647
|
+
points: number;
|
|
646
648
|
}
|
|
647
649
|
|
|
648
650
|
export interface LeaderBoardUserT {
|
|
649
651
|
/** The username of the participant */
|
|
650
|
-
public_username: string
|
|
652
|
+
public_username: string;
|
|
651
653
|
/** The URL to the avatar of the participant */
|
|
652
|
-
avatar_url: string
|
|
654
|
+
avatar_url: string;
|
|
653
655
|
/** The position of the participant in the leaderboard */
|
|
654
|
-
position: number
|
|
656
|
+
position: number;
|
|
655
657
|
/** The points of the participant in the leaderboard */
|
|
656
|
-
points: number
|
|
658
|
+
points: number;
|
|
657
659
|
/** The indicator if the participant is current user */
|
|
658
|
-
is_me: boolean
|
|
660
|
+
is_me: boolean;
|
|
659
661
|
}
|
|
660
662
|
|
|
661
663
|
export interface UserLevelExtraCountersT {
|
|
662
664
|
/** The counter of 1st metric used to reach the level. */
|
|
663
|
-
level_counter_1?: number
|
|
665
|
+
level_counter_1?: number;
|
|
664
666
|
/** The counter of 2nd metric used to reach the level. */
|
|
665
|
-
level_counter_2?: number
|
|
667
|
+
level_counter_2?: number;
|
|
666
668
|
}
|
|
667
669
|
|
|
668
670
|
export interface TSegmentCheckResult {
|
|
669
|
-
segment_id: number
|
|
670
|
-
is_matching: boolean
|
|
671
|
+
segment_id: number;
|
|
672
|
+
is_matching: boolean;
|
|
671
673
|
}
|
|
672
674
|
|
|
673
675
|
export interface TUICustomSection {
|
|
674
676
|
/** The body of the custom section */
|
|
675
|
-
body?: string
|
|
677
|
+
body?: string;
|
|
676
678
|
/** The image of the custom section */
|
|
677
|
-
menu_img?: string
|
|
679
|
+
menu_img?: string;
|
|
678
680
|
/** The name of the custom section */
|
|
679
|
-
menu_name?: string
|
|
681
|
+
menu_name?: string;
|
|
680
682
|
/** Custom images for custom section */
|
|
681
|
-
custom_skin_images?: string
|
|
683
|
+
custom_skin_images?: string;
|
|
682
684
|
/** The particular type of custom section, can be Missions, Tournaments, Lootbox and etc */
|
|
683
|
-
section_type_id?: AchCustomSectionType
|
|
685
|
+
section_type_id?: AchCustomSectionType;
|
|
684
686
|
/** Theme of the custom section */
|
|
685
|
-
theme?: AchCustomLayoutTheme
|
|
687
|
+
theme?: AchCustomLayoutTheme;
|
|
686
688
|
/** Custom css for the custom section */
|
|
687
|
-
generic_custom_css?: string
|
|
689
|
+
generic_custom_css?: string;
|
|
688
690
|
/** Tabs that can be shown in custom section, e.g Overview, No Overview, All tabs */
|
|
689
|
-
mission_tabs_options?: AchMissionsTabsOptions
|
|
691
|
+
mission_tabs_options?: AchMissionsTabsOptions;
|
|
690
692
|
/** Filter that allow to show missions by criteria */
|
|
691
|
-
overview_missions_filter?: AchOverviewMissionsFilter
|
|
693
|
+
overview_missions_filter?: AchOverviewMissionsFilter;
|
|
692
694
|
/** Quantity of missions to be shown in overview */
|
|
693
|
-
overview_missions_count?: number
|
|
695
|
+
overview_missions_count?: number;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export interface TBonus {
|
|
699
|
+
/** ID of the bonus */
|
|
700
|
+
bonus_id: number;
|
|
701
|
+
/** Can the bonus be redeemed (if bonus is redeemable the user needs to claim it) */
|
|
702
|
+
is_redeemable?: boolean;
|
|
703
|
+
/** Date of creation */
|
|
704
|
+
create_date?: string;
|
|
705
|
+
/** Date of redemption */
|
|
706
|
+
redeem_date?: string;
|
|
707
|
+
/** ID of template used */
|
|
708
|
+
label_bonus_template_id?: number;
|
|
709
|
+
/** ID of the bonus status */
|
|
710
|
+
bonus_status_id?: BonusStatus;
|
|
711
|
+
/** Additional information about the bonus(edscription, image,name, acknowledge) */
|
|
712
|
+
label_bonus_template_meta_map?: BonusTemplateMetaMap;
|
|
713
|
+
/** Additional information presented to the player when the bonus is redeemed */
|
|
714
|
+
bonus_meta_map?: BonusMetaMap;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* TClaimBonusResult describes the response of call to _smartico.api.claimBonus(bonus_id) method
|
|
719
|
+
*/
|
|
720
|
+
export interface TClaimBonusResult {
|
|
721
|
+
/** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
|
|
722
|
+
err_code: SAWSpinErrorCode;
|
|
723
|
+
/** Optional error message */
|
|
724
|
+
err_message: string;
|
|
725
|
+
/** If the bonus was claimed successfully, then success is true */
|
|
726
|
+
success?: boolean;
|
|
694
727
|
}
|