@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/SmarticoLib/index.ts
CHANGED
|
@@ -101,20 +101,20 @@ declare enum ClientActivityRequestId {
|
|
|
101
101
|
MISSIONS_CLICK = 201,
|
|
102
102
|
}
|
|
103
103
|
export interface PublicProperties {
|
|
104
|
-
core_user_language?: string
|
|
105
|
-
ach_points_balance?: number
|
|
106
|
-
ach_points_ever?: number
|
|
107
|
-
core_public_tags?: string[]
|
|
108
|
-
ach_level_current_id?: number
|
|
109
|
-
ach_level_current?: string
|
|
110
|
-
core_is_test_account?: boolean
|
|
111
|
-
avatar_id?: string
|
|
112
|
-
ach_gamification_in_control_group?: boolean
|
|
113
|
-
ach_gamification_ui_explicitly_on?: boolean
|
|
114
|
-
public_username?: string
|
|
115
|
-
core_inbox_unread_count?: number
|
|
116
|
-
is_visitor?: boolean
|
|
117
|
-
core_registration_date?: number
|
|
104
|
+
core_user_language?: string;
|
|
105
|
+
ach_points_balance?: number;
|
|
106
|
+
ach_points_ever?: number;
|
|
107
|
+
core_public_tags?: string[];
|
|
108
|
+
ach_level_current_id?: number;
|
|
109
|
+
ach_level_current?: string;
|
|
110
|
+
core_is_test_account?: boolean;
|
|
111
|
+
avatar_id?: string;
|
|
112
|
+
ach_gamification_in_control_group?: boolean;
|
|
113
|
+
ach_gamification_ui_explicitly_on?: boolean;
|
|
114
|
+
public_username?: string;
|
|
115
|
+
core_inbox_unread_count?: number;
|
|
116
|
+
is_visitor?: boolean;
|
|
117
|
+
core_registration_date?: number;
|
|
118
118
|
}
|
|
119
119
|
declare enum ClassId {
|
|
120
120
|
PING = 1,
|
|
@@ -214,11 +214,11 @@ declare enum ClassId {
|
|
|
214
214
|
UNSUPPORTED_COMMAND = 99999,
|
|
215
215
|
}
|
|
216
216
|
export interface ILogger {
|
|
217
|
-
debug(...any: any[]): void
|
|
218
|
-
error(...any: any[]): void
|
|
219
|
-
info(...any: any[]): void
|
|
220
|
-
warn(...any: any[]): void
|
|
221
|
-
always(...any: any[]): void
|
|
217
|
+
debug(...any: any[]): void;
|
|
218
|
+
error(...any: any[]): void;
|
|
219
|
+
info(...any: any[]): void;
|
|
220
|
+
warn(...any: any[]): void;
|
|
221
|
+
always(...any: any[]): void;
|
|
222
222
|
}
|
|
223
223
|
declare enum BuyStoreItemErrorCode {
|
|
224
224
|
FAILED_TO_BUY_SHOP_ITEM = 121,
|
|
@@ -232,62 +232,62 @@ declare enum BuyStoreItemErrorCode {
|
|
|
232
232
|
SHOP_FAILED_POOL_EMPTY = 11009,
|
|
233
233
|
}
|
|
234
234
|
export interface ProtocolMessage {
|
|
235
|
-
cid: number
|
|
236
|
-
ts?: number
|
|
237
|
-
uuid?: string
|
|
235
|
+
cid: number;
|
|
236
|
+
ts?: number;
|
|
237
|
+
uuid?: string;
|
|
238
238
|
}
|
|
239
239
|
export interface ProtocolResponse extends ProtocolMessage {
|
|
240
|
-
errCode?: number
|
|
241
|
-
errMsg?: string
|
|
240
|
+
errCode?: number;
|
|
241
|
+
errMsg?: string;
|
|
242
242
|
}
|
|
243
243
|
export interface BuyStoreItemResponse extends ProtocolResponse {
|
|
244
|
-
success?: boolean
|
|
244
|
+
success?: boolean;
|
|
245
245
|
}
|
|
246
246
|
export interface StoreCategoryPublicMeta {
|
|
247
|
-
name?: string
|
|
248
|
-
order?: number
|
|
247
|
+
name?: string;
|
|
248
|
+
order?: number;
|
|
249
249
|
}
|
|
250
250
|
export interface StoreCategory {
|
|
251
|
-
id?: number
|
|
252
|
-
publicMeta?: StoreCategoryPublicMeta
|
|
251
|
+
id?: number;
|
|
252
|
+
publicMeta?: StoreCategoryPublicMeta;
|
|
253
253
|
}
|
|
254
254
|
export interface GetCategoriesStoreResponse extends ProtocolResponse {
|
|
255
|
-
categories: StoreCategory[]
|
|
255
|
+
categories: StoreCategory[];
|
|
256
256
|
}
|
|
257
257
|
export interface StoreItemPublicMeta {
|
|
258
|
-
price: string
|
|
259
|
-
image_url: string
|
|
260
|
-
name: string
|
|
261
|
-
description: string
|
|
262
|
-
label_tag: string
|
|
263
|
-
custom_label_tag?: string
|
|
264
|
-
limit_message: string
|
|
265
|
-
priority: number
|
|
266
|
-
related_items: number[]
|
|
267
|
-
hint_text: string
|
|
258
|
+
price: string;
|
|
259
|
+
image_url: string;
|
|
260
|
+
name: string;
|
|
261
|
+
description: string;
|
|
262
|
+
label_tag: string;
|
|
263
|
+
custom_label_tag?: string;
|
|
264
|
+
limit_message: string;
|
|
265
|
+
priority: number;
|
|
266
|
+
related_items: number[];
|
|
267
|
+
hint_text: string;
|
|
268
268
|
}
|
|
269
269
|
declare enum StoreItemType {
|
|
270
270
|
Bonus = 1,
|
|
271
271
|
Manual = 2,
|
|
272
272
|
}
|
|
273
273
|
export interface StoreItem {
|
|
274
|
-
id: number
|
|
275
|
-
itemTypeId: StoreItemType
|
|
276
|
-
itemPublicMeta: StoreItemPublicMeta
|
|
277
|
-
categoryIds?: number[]
|
|
278
|
-
canBuy?: boolean
|
|
279
|
-
shopPool: number
|
|
274
|
+
id: number;
|
|
275
|
+
itemTypeId: StoreItemType;
|
|
276
|
+
itemPublicMeta: StoreItemPublicMeta;
|
|
277
|
+
categoryIds?: number[];
|
|
278
|
+
canBuy?: boolean;
|
|
279
|
+
shopPool: number;
|
|
280
280
|
}
|
|
281
281
|
export interface GetStoreItemsResponse extends ProtocolResponse {
|
|
282
|
-
items: StoreItem[]
|
|
282
|
+
items: StoreItem[];
|
|
283
283
|
}
|
|
284
284
|
export interface StoreItemPurchased extends StoreItem {
|
|
285
|
-
purchase_ts: number
|
|
286
|
-
purchase_points_amount: number
|
|
285
|
+
purchase_ts: number;
|
|
286
|
+
purchase_points_amount: number;
|
|
287
287
|
}
|
|
288
288
|
export interface GetStoreHistoryResponse extends ProtocolResponse {
|
|
289
|
-
items: StoreItemPurchased[]
|
|
290
|
-
hasMore: boolean
|
|
289
|
+
items: StoreItemPurchased[];
|
|
290
|
+
hasMore: boolean;
|
|
291
291
|
}
|
|
292
292
|
declare enum SAWBuyInType {
|
|
293
293
|
Free = 1,
|
|
@@ -345,100 +345,100 @@ declare enum SAWWinSoundType {
|
|
|
345
345
|
Custom = 5,
|
|
346
346
|
}
|
|
347
347
|
export interface SAWPrizeUI {
|
|
348
|
-
position?: number
|
|
349
|
-
name: string
|
|
350
|
-
name_original: string
|
|
351
|
-
aknowledge_message: string
|
|
352
|
-
sectors: number[]
|
|
353
|
-
acknowledge_type: SAWAcknowledgeType
|
|
354
|
-
acknowledge_dp?: string
|
|
355
|
-
font_size?: number
|
|
356
|
-
font_size_mobile?: number
|
|
357
|
-
sound_type: SAWWinSoundType
|
|
358
|
-
icon?: string
|
|
359
|
-
replace_name_with_image?: boolean
|
|
360
|
-
acknowledge_action_title?: string
|
|
361
|
-
custom_win_sound?: string
|
|
348
|
+
position?: number;
|
|
349
|
+
name: string;
|
|
350
|
+
name_original: string;
|
|
351
|
+
aknowledge_message: string;
|
|
352
|
+
sectors: number[];
|
|
353
|
+
acknowledge_type: SAWAcknowledgeType;
|
|
354
|
+
acknowledge_dp?: string;
|
|
355
|
+
font_size?: number;
|
|
356
|
+
font_size_mobile?: number;
|
|
357
|
+
sound_type: SAWWinSoundType;
|
|
358
|
+
icon?: string;
|
|
359
|
+
replace_name_with_image?: boolean;
|
|
360
|
+
acknowledge_action_title?: string;
|
|
361
|
+
custom_win_sound?: string;
|
|
362
362
|
}
|
|
363
363
|
export interface SAWPrize {
|
|
364
|
-
saw_prize_id: number
|
|
365
|
-
saw_prize_ui_definition: SAWPrizeUI
|
|
366
|
-
prize_value?: number
|
|
367
|
-
prize_type_id: SAWPrizeType
|
|
368
|
-
place_from?: number
|
|
369
|
-
place_to?: number
|
|
370
|
-
sawUniqueWinId?: string
|
|
364
|
+
saw_prize_id: number;
|
|
365
|
+
saw_prize_ui_definition: SAWPrizeUI;
|
|
366
|
+
prize_value?: number;
|
|
367
|
+
prize_type_id: SAWPrizeType;
|
|
368
|
+
place_from?: number;
|
|
369
|
+
place_to?: number;
|
|
370
|
+
sawUniqueWinId?: string;
|
|
371
371
|
}
|
|
372
372
|
declare enum SAWAskForUsername {
|
|
373
373
|
NOASK = 'no-ask',
|
|
374
374
|
ONSUMBIT = 'on-submit',
|
|
375
375
|
}
|
|
376
376
|
export interface SAWTemplateUI {
|
|
377
|
-
skin: string
|
|
378
|
-
name: string
|
|
379
|
-
description?: string
|
|
380
|
-
over_limit_message?: string
|
|
381
|
-
no_attempts_message?: string
|
|
382
|
-
thumbnail?: string
|
|
383
|
-
sectors_count: number
|
|
384
|
-
priority: number
|
|
385
|
-
flow_builder_only: boolean
|
|
386
|
-
background_image?: string
|
|
387
|
-
background_image_mobile?: string
|
|
388
|
-
background_sound?: string
|
|
389
|
-
spin_animation_duration?: number
|
|
390
|
-
scratch_logo?: string
|
|
391
|
-
scratch_cover?: string
|
|
392
|
-
scratch_bg_desktop?: string
|
|
393
|
-
scratch_bg_mobile?: string
|
|
394
|
-
scratch_cursor?: string
|
|
395
|
-
custom_css?: string
|
|
396
|
-
custom_skin_folder?: string
|
|
397
|
-
jackpot_symbol?: string
|
|
398
|
-
promo_image?: string
|
|
399
|
-
promo_text?: string
|
|
400
|
-
matchx_banner?: string
|
|
401
|
-
matchx_seasonal_ranking?: boolean
|
|
402
|
-
matchx_is_completed?: boolean
|
|
403
|
-
matchx_general_board_users_count?: number
|
|
404
|
-
matchx_hide_ranking?: boolean
|
|
405
|
-
ask_for_username?: SAWAskForUsername
|
|
406
|
-
show_prize_board?: boolean
|
|
407
|
-
max_spins_period_ms?: number
|
|
408
|
-
show_countdown_for_next_availability?: boolean
|
|
409
|
-
disable_background_music?: boolean
|
|
410
|
-
custom_section_id?: number
|
|
411
|
-
only_in_custom_section?: boolean
|
|
412
|
-
custom_data: any
|
|
413
|
-
placeholder1?: string
|
|
414
|
-
placeholder2?: string
|
|
377
|
+
skin: string;
|
|
378
|
+
name: string;
|
|
379
|
+
description?: string;
|
|
380
|
+
over_limit_message?: string;
|
|
381
|
+
no_attempts_message?: string;
|
|
382
|
+
thumbnail?: string;
|
|
383
|
+
sectors_count: number;
|
|
384
|
+
priority: number;
|
|
385
|
+
flow_builder_only: boolean;
|
|
386
|
+
background_image?: string;
|
|
387
|
+
background_image_mobile?: string;
|
|
388
|
+
background_sound?: string;
|
|
389
|
+
spin_animation_duration?: number;
|
|
390
|
+
scratch_logo?: string;
|
|
391
|
+
scratch_cover?: string;
|
|
392
|
+
scratch_bg_desktop?: string;
|
|
393
|
+
scratch_bg_mobile?: string;
|
|
394
|
+
scratch_cursor?: string;
|
|
395
|
+
custom_css?: string;
|
|
396
|
+
custom_skin_folder?: string;
|
|
397
|
+
jackpot_symbol?: string;
|
|
398
|
+
promo_image?: string;
|
|
399
|
+
promo_text?: string;
|
|
400
|
+
matchx_banner?: string;
|
|
401
|
+
matchx_seasonal_ranking?: boolean;
|
|
402
|
+
matchx_is_completed?: boolean;
|
|
403
|
+
matchx_general_board_users_count?: number;
|
|
404
|
+
matchx_hide_ranking?: boolean;
|
|
405
|
+
ask_for_username?: SAWAskForUsername;
|
|
406
|
+
show_prize_board?: boolean;
|
|
407
|
+
max_spins_period_ms?: number;
|
|
408
|
+
show_countdown_for_next_availability?: boolean;
|
|
409
|
+
disable_background_music?: boolean;
|
|
410
|
+
custom_section_id?: number;
|
|
411
|
+
only_in_custom_section?: boolean;
|
|
412
|
+
custom_data: any;
|
|
413
|
+
placeholder1?: string;
|
|
414
|
+
placeholder2?: string;
|
|
415
415
|
prize_drop_template?: {
|
|
416
|
-
id: string
|
|
417
|
-
content: string
|
|
418
|
-
}
|
|
416
|
+
id: string;
|
|
417
|
+
content: string;
|
|
418
|
+
};
|
|
419
419
|
}
|
|
420
420
|
export interface SAWTemplate {
|
|
421
|
-
saw_template_id: number
|
|
422
|
-
saw_game_type_id: SAWGameType
|
|
423
|
-
saw_template_ui_definition: SAWTemplateUI
|
|
424
|
-
saw_buyin_type_id: SAWBuyInType
|
|
425
|
-
buyin_cost_points?: number
|
|
426
|
-
visibile_when_can_spin: boolean
|
|
427
|
-
spin_count?: number
|
|
428
|
-
prizes: SAWPrize[]
|
|
429
|
-
is_visible: boolean
|
|
430
|
-
jackpot_add_on_attempt: number
|
|
431
|
-
jackpot_current: number
|
|
432
|
-
jackpot_guaranteed: number
|
|
433
|
-
maxActiveSpinsAllowed: number
|
|
434
|
-
maxSpinsCount: number
|
|
435
|
-
maxSpinsPediodMs: number
|
|
436
|
-
next_available_spin_ts?: number
|
|
437
|
-
saw_skin_key: string
|
|
421
|
+
saw_template_id: number;
|
|
422
|
+
saw_game_type_id: SAWGameType;
|
|
423
|
+
saw_template_ui_definition: SAWTemplateUI;
|
|
424
|
+
saw_buyin_type_id: SAWBuyInType;
|
|
425
|
+
buyin_cost_points?: number;
|
|
426
|
+
visibile_when_can_spin: boolean;
|
|
427
|
+
spin_count?: number;
|
|
428
|
+
prizes: SAWPrize[];
|
|
429
|
+
is_visible: boolean;
|
|
430
|
+
jackpot_add_on_attempt: number;
|
|
431
|
+
jackpot_current: number;
|
|
432
|
+
jackpot_guaranteed: number;
|
|
433
|
+
maxActiveSpinsAllowed: number;
|
|
434
|
+
maxSpinsCount: number;
|
|
435
|
+
maxSpinsPediodMs: number;
|
|
436
|
+
next_available_spin_ts?: number;
|
|
437
|
+
saw_skin_key: string;
|
|
438
438
|
saw_skin_ui_definition: {
|
|
439
|
-
skin_folder: string
|
|
440
|
-
skin_css: string
|
|
441
|
-
}
|
|
439
|
+
skin_folder: string;
|
|
440
|
+
skin_css: string;
|
|
441
|
+
};
|
|
442
442
|
}
|
|
443
443
|
declare enum SAWSpinErrorCode {
|
|
444
444
|
/** No error */
|
|
@@ -455,16 +455,16 @@ declare enum SAWSpinErrorCode {
|
|
|
455
455
|
SAW_VISITOR_STOP_SPIN_REQUEST = -40001,
|
|
456
456
|
}
|
|
457
457
|
export interface SAWDoSpinResponse extends ProtocolResponse {
|
|
458
|
-
errCode: SAWSpinErrorCode
|
|
459
|
-
errMsg?: string
|
|
460
|
-
request_id: string
|
|
461
|
-
saw_prize_id: number
|
|
462
|
-
jackpot_amount?: number
|
|
463
|
-
first_spin_in_period: number
|
|
464
|
-
visitor_win_uuid?: string
|
|
458
|
+
errCode: SAWSpinErrorCode;
|
|
459
|
+
errMsg?: string;
|
|
460
|
+
request_id: string;
|
|
461
|
+
saw_prize_id: number;
|
|
462
|
+
jackpot_amount?: number;
|
|
463
|
+
first_spin_in_period: number;
|
|
464
|
+
visitor_win_uuid?: string;
|
|
465
465
|
}
|
|
466
466
|
export interface SAWDoAknowledgeResponse extends ProtocolMessage {
|
|
467
|
-
request_id: string
|
|
467
|
+
request_id: string;
|
|
468
468
|
}
|
|
469
469
|
declare enum TournamentRegistrationType {
|
|
470
470
|
AUTO = 1,
|
|
@@ -473,7 +473,13 @@ declare enum TournamentRegistrationType {
|
|
|
473
473
|
MANUAL_APPROVAL = 4,
|
|
474
474
|
REQUIRES_QUALIFICATION = 5,
|
|
475
475
|
}
|
|
476
|
-
export type TournamentRegistrationTypeName =
|
|
476
|
+
export type TournamentRegistrationTypeName =
|
|
477
|
+
| 'AUTO'
|
|
478
|
+
| 'OPT_IN'
|
|
479
|
+
| 'BUY_IN_POINTS'
|
|
480
|
+
| 'MANUAL_APPROVAL'
|
|
481
|
+
| 'REQUIRES_QUALIFICATION'
|
|
482
|
+
| 'UNKNOWN';
|
|
477
483
|
declare enum TournamentInstanceStatus {
|
|
478
484
|
PUBLISHED = 1,
|
|
479
485
|
REGISTER = 2,
|
|
@@ -509,101 +515,101 @@ declare enum TournamentType {
|
|
|
509
515
|
}
|
|
510
516
|
export interface TournamentPublicMeta {
|
|
511
517
|
/** Name of tournament */
|
|
512
|
-
name?: string
|
|
518
|
+
name?: string;
|
|
513
519
|
/** 1st image */
|
|
514
|
-
image_url?: string
|
|
520
|
+
image_url?: string;
|
|
515
521
|
/** 2nd image */
|
|
516
|
-
image_url2?: string
|
|
522
|
+
image_url2?: string;
|
|
517
523
|
/** 2nd image for mobile */
|
|
518
|
-
image_url2_mobile?: string
|
|
524
|
+
image_url2_mobile?: string;
|
|
519
525
|
/** Description, html capable */
|
|
520
|
-
description?: string
|
|
526
|
+
description?: string;
|
|
521
527
|
/** Short explanation of prize pool */
|
|
522
|
-
prize_pool_short?: string
|
|
528
|
+
prize_pool_short?: string;
|
|
523
529
|
/** Message to show when user is not matching to the segment allowed to register (error code 30005 in registration response) */
|
|
524
|
-
segment_dont_match_message?: string
|
|
530
|
+
segment_dont_match_message?: string;
|
|
525
531
|
/** Short explanation of registration price */
|
|
526
|
-
custom_price_text?: string
|
|
532
|
+
custom_price_text?: string;
|
|
527
533
|
/** Indicator if the scores of other users should be shown in the leaderboard of tournament */
|
|
528
|
-
show_other_users_score?: boolean
|
|
529
|
-
custom_section_id?: number
|
|
530
|
-
only_in_custom_section?: boolean
|
|
531
|
-
label_tag?: string
|
|
532
|
-
custom_label_tag?: string
|
|
533
|
-
featured?: boolean
|
|
534
|
-
position?: number
|
|
535
|
-
custom_data?: string
|
|
534
|
+
show_other_users_score?: boolean;
|
|
535
|
+
custom_section_id?: number;
|
|
536
|
+
only_in_custom_section?: boolean;
|
|
537
|
+
label_tag?: string;
|
|
538
|
+
custom_label_tag?: string;
|
|
539
|
+
featured?: boolean;
|
|
540
|
+
position?: number;
|
|
541
|
+
custom_data?: string;
|
|
536
542
|
}
|
|
537
543
|
export interface AchRelatedGame {
|
|
538
|
-
ach_game_id: number
|
|
539
|
-
ext_game_id: string
|
|
544
|
+
ach_game_id: number;
|
|
545
|
+
ext_game_id: string;
|
|
540
546
|
game_public_meta: {
|
|
541
|
-
name: string
|
|
542
|
-
link: string
|
|
543
|
-
image: string
|
|
544
|
-
enabled: boolean
|
|
545
|
-
game_categories?: string[]
|
|
546
|
-
game_provider?: string
|
|
547
|
-
}
|
|
547
|
+
name: string;
|
|
548
|
+
link: string;
|
|
549
|
+
image: string;
|
|
550
|
+
enabled: boolean;
|
|
551
|
+
game_categories?: string[];
|
|
552
|
+
game_provider?: string;
|
|
553
|
+
};
|
|
548
554
|
}
|
|
549
555
|
export interface Tournament {
|
|
550
556
|
/** ID of tournament template */
|
|
551
|
-
tournamentId?: number
|
|
557
|
+
tournamentId?: number;
|
|
552
558
|
/** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */
|
|
553
|
-
tournamentInstanceId?: number
|
|
559
|
+
tournamentInstanceId?: number;
|
|
554
560
|
/** Type of the tournament. For now only SCHEDULED is support */
|
|
555
|
-
tournamentType?: TournamentType
|
|
561
|
+
tournamentType?: TournamentType;
|
|
556
562
|
/** Meta information about tournament that should be used to build UI */
|
|
557
|
-
publicMeta?: TournamentPublicMeta
|
|
563
|
+
publicMeta?: TournamentPublicMeta;
|
|
558
564
|
/** Cost of registration in the tournament in gamification points */
|
|
559
|
-
buyInAmount?: number
|
|
565
|
+
buyInAmount?: number;
|
|
560
566
|
/** Not in use */
|
|
561
|
-
prizePool?: number
|
|
567
|
+
prizePool?: number;
|
|
562
568
|
/** The time when tournament is going to start */
|
|
563
|
-
startTime?: string
|
|
569
|
+
startTime?: string;
|
|
564
570
|
/** The time when tournament is going to finish */
|
|
565
|
-
endTime?: string
|
|
571
|
+
endTime?: string;
|
|
566
572
|
/** The time when tournament is going to start, epoch */
|
|
567
|
-
startTimeTs?: number
|
|
573
|
+
startTimeTs?: number;
|
|
568
574
|
/** The time when tournament is going to finish, epoch */
|
|
569
|
-
endTimeTs?: number
|
|
575
|
+
endTimeTs?: number;
|
|
570
576
|
/** Number of users registered in the tournament */
|
|
571
|
-
registrationCount?: number
|
|
577
|
+
registrationCount?: number;
|
|
572
578
|
/** Not in use */
|
|
573
|
-
totalCount?: number
|
|
579
|
+
totalCount?: number;
|
|
574
580
|
/** Type of registration in the tournament */
|
|
575
|
-
registrationType?: TournamentRegistrationType
|
|
581
|
+
registrationType?: TournamentRegistrationType;
|
|
576
582
|
/** Status of registration in the tournament for current user */
|
|
577
|
-
tournamentRegistrationStatus?: TournamentRegistrationStatus
|
|
583
|
+
tournamentRegistrationStatus?: TournamentRegistrationStatus;
|
|
578
584
|
/** Status of tournament instance */
|
|
579
|
-
tournamentInstanceStatus?: TournamentInstanceStatus
|
|
585
|
+
tournamentInstanceStatus?: TournamentInstanceStatus;
|
|
580
586
|
/** flag indicating if current user is registered in the tournament */
|
|
581
|
-
isUserRegistered?: boolean
|
|
587
|
+
isUserRegistered?: boolean;
|
|
582
588
|
/** Indicator if tournament allows later registration, when tournament is already started */
|
|
583
|
-
allowLateRegistration?: boolean
|
|
589
|
+
allowLateRegistration?: boolean;
|
|
584
590
|
/** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */
|
|
585
|
-
playersMinCount?: number
|
|
591
|
+
playersMinCount?: number;
|
|
586
592
|
/** Maximum number of participant for this tournament. When reached, new users won't be able to register */
|
|
587
|
-
playersMaxCount?: number
|
|
593
|
+
playersMaxCount?: number;
|
|
588
594
|
/** Tournament duration in millisecnnds */
|
|
589
|
-
durationMs?: number
|
|
595
|
+
durationMs?: number;
|
|
590
596
|
/** prizes structure */
|
|
591
597
|
prizeStructure?: {
|
|
592
|
-
prizes: TournamentPrize[]
|
|
593
|
-
}
|
|
598
|
+
prizes: TournamentPrize[];
|
|
599
|
+
};
|
|
594
600
|
/** Information about current user */
|
|
595
|
-
tournamentPlayer?: TournamentPlayer
|
|
601
|
+
tournamentPlayer?: TournamentPlayer;
|
|
596
602
|
/** List of casino games (or other types of entities) related to the tournament */
|
|
597
|
-
related_games?: AchRelatedGame[]
|
|
603
|
+
related_games?: AchRelatedGame[];
|
|
598
604
|
}
|
|
599
605
|
export interface TournamentPlayer {
|
|
600
|
-
userAltName: string
|
|
601
|
-
position: number
|
|
602
|
-
scores: number
|
|
603
|
-
isMe: boolean
|
|
604
|
-
userId: number
|
|
605
|
-
avatar_id: string
|
|
606
|
-
avatar_url?: string
|
|
606
|
+
userAltName: string;
|
|
607
|
+
position: number;
|
|
608
|
+
scores: number;
|
|
609
|
+
isMe: boolean;
|
|
610
|
+
userId: number;
|
|
611
|
+
avatar_id: string;
|
|
612
|
+
avatar_url?: string;
|
|
607
613
|
}
|
|
608
614
|
declare enum ActivityTypeLimited {
|
|
609
615
|
DoNothing = 8,
|
|
@@ -624,33 +630,33 @@ declare enum ActivityTypeLimited {
|
|
|
624
630
|
UnTagCustomer = 505,
|
|
625
631
|
}
|
|
626
632
|
export interface TournamentPrize {
|
|
627
|
-
name: string
|
|
628
|
-
description: string
|
|
629
|
-
image_url: string
|
|
630
|
-
place_from: number
|
|
631
|
-
place_to: number
|
|
632
|
-
type: ActivityTypeLimited
|
|
633
|
-
points: number
|
|
633
|
+
name: string;
|
|
634
|
+
description: string;
|
|
635
|
+
image_url: string;
|
|
636
|
+
place_from: number;
|
|
637
|
+
place_to: number;
|
|
638
|
+
type: ActivityTypeLimited;
|
|
639
|
+
points: number;
|
|
634
640
|
}
|
|
635
641
|
export interface GetTournamentInfoResponse extends ProtocolResponse {
|
|
636
642
|
/** tournament info */
|
|
637
643
|
tournamentInfo: {
|
|
638
644
|
/** id of label, not in use */
|
|
639
|
-
labelId: number
|
|
640
|
-
tournamentLobbyInfo: Tournament
|
|
645
|
+
labelId: number;
|
|
646
|
+
tournamentLobbyInfo: Tournament;
|
|
641
647
|
/** list of registered users */
|
|
642
|
-
players: TournamentPlayer[]
|
|
643
|
-
}
|
|
648
|
+
players: TournamentPlayer[];
|
|
649
|
+
};
|
|
644
650
|
/** information about current user position */
|
|
645
|
-
userPosition: TournamentPlayer
|
|
651
|
+
userPosition: TournamentPlayer;
|
|
646
652
|
/** prizes structure */
|
|
647
653
|
prizeStructure?: {
|
|
648
|
-
prizes: TournamentPrize[]
|
|
649
|
-
}
|
|
654
|
+
prizes: TournamentPrize[];
|
|
655
|
+
};
|
|
650
656
|
}
|
|
651
657
|
export interface GetTournamentsResponse extends ProtocolResponse {
|
|
652
658
|
/** array of the tournaments */
|
|
653
|
-
tournaments?: Tournament[]
|
|
659
|
+
tournaments?: Tournament[];
|
|
654
660
|
}
|
|
655
661
|
declare enum TournamentRegistrationError {
|
|
656
662
|
NO_ERROR = 0,
|
|
@@ -664,7 +670,7 @@ declare enum TournamentRegistrationError {
|
|
|
664
670
|
TOURNAMENT_MAX_REGISTRATIONS_REACHED = 30008,
|
|
665
671
|
}
|
|
666
672
|
export interface TournamentRegisterResponse extends ProtocolResponse {
|
|
667
|
-
errCode?: TournamentRegistrationError
|
|
673
|
+
errCode?: TournamentRegistrationError;
|
|
668
674
|
}
|
|
669
675
|
declare enum LeaderBoardPeriodType {
|
|
670
676
|
DAILY = 1,
|
|
@@ -672,105 +678,105 @@ declare enum LeaderBoardPeriodType {
|
|
|
672
678
|
MONTHLY = 3,
|
|
673
679
|
}
|
|
674
680
|
export interface LeaderBoardPosition {
|
|
675
|
-
public_username?: string
|
|
676
|
-
user_alt_name: string
|
|
677
|
-
position_in_board: number
|
|
678
|
-
points_accumulated: number
|
|
679
|
-
is_me: boolean
|
|
680
|
-
level_id: number
|
|
681
|
-
avatar_id: string
|
|
682
|
-
avatar_url?: string
|
|
681
|
+
public_username?: string;
|
|
682
|
+
user_alt_name: string;
|
|
683
|
+
position_in_board: number;
|
|
684
|
+
points_accumulated: number;
|
|
685
|
+
is_me: boolean;
|
|
686
|
+
level_id: number;
|
|
687
|
+
avatar_id: string;
|
|
688
|
+
avatar_url?: string;
|
|
683
689
|
}
|
|
684
690
|
export interface LeaderBoardPublicMeta {
|
|
685
|
-
name: string
|
|
686
|
-
description: string
|
|
687
|
-
rules: string
|
|
691
|
+
name: string;
|
|
692
|
+
description: string;
|
|
693
|
+
rules: string;
|
|
688
694
|
}
|
|
689
695
|
export interface LeaderBoardDetails {
|
|
690
|
-
board_id: number
|
|
691
|
-
period_type_id: LeaderBoardPeriodType
|
|
692
|
-
create_date?: number
|
|
693
|
-
versiod_id: number
|
|
694
|
-
reward_points: number[]
|
|
695
|
-
board_public_meta: LeaderBoardPublicMeta
|
|
696
|
-
positions: LeaderBoardPosition[]
|
|
697
|
-
userPosition: LeaderBoardPosition
|
|
698
|
-
}
|
|
699
|
-
export type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string
|
|
696
|
+
board_id: number;
|
|
697
|
+
period_type_id: LeaderBoardPeriodType;
|
|
698
|
+
create_date?: number;
|
|
699
|
+
versiod_id: number;
|
|
700
|
+
reward_points: number[];
|
|
701
|
+
board_public_meta: LeaderBoardPublicMeta;
|
|
702
|
+
positions: LeaderBoardPosition[];
|
|
703
|
+
userPosition: LeaderBoardPosition;
|
|
704
|
+
}
|
|
705
|
+
export type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string;
|
|
700
706
|
/**
|
|
701
707
|
* TMiniGamePrize describes the information of prize in the array of prizes in the TMiniGameTemplate
|
|
702
708
|
*/
|
|
703
709
|
export interface TMiniGamePrize {
|
|
704
710
|
/** ID of the prize */
|
|
705
|
-
id: number
|
|
711
|
+
id: number;
|
|
706
712
|
/** The visual name of the prize */
|
|
707
|
-
name: string
|
|
713
|
+
name: string;
|
|
708
714
|
/** The type of the prize, no-prize, points, bonus, manual, spin, jackpot */
|
|
709
|
-
prize_type: MiniGamePrizeTypeName
|
|
715
|
+
prize_type: MiniGamePrizeTypeName;
|
|
710
716
|
/** Numeric value of the prize in case it's pints or spin type */
|
|
711
|
-
prize_value?: number
|
|
717
|
+
prize_value?: number;
|
|
712
718
|
/** Custom font size for the prize (desktop) */
|
|
713
|
-
font_size?: number
|
|
719
|
+
font_size?: number;
|
|
714
720
|
/** Custom font size for the prize (mobile) */
|
|
715
|
-
font_size_mobile?: number
|
|
721
|
+
font_size_mobile?: number;
|
|
716
722
|
/** The URL of the icon of the prize */
|
|
717
|
-
icon?: string
|
|
718
|
-
position: number
|
|
719
|
-
aknowledge_message: string
|
|
720
|
-
acknowledge_dp: string
|
|
721
|
-
acknowledge_action_title: string
|
|
723
|
+
icon?: string;
|
|
724
|
+
position: number;
|
|
725
|
+
aknowledge_message: string;
|
|
726
|
+
acknowledge_dp: string;
|
|
727
|
+
acknowledge_action_title: string;
|
|
722
728
|
}
|
|
723
729
|
/**
|
|
724
730
|
* TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
|
|
725
731
|
*/
|
|
726
732
|
export interface TMiniGamePlayResult {
|
|
727
733
|
/** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
|
|
728
|
-
err_code: SAWSpinErrorCode
|
|
734
|
+
err_code: SAWSpinErrorCode;
|
|
729
735
|
/** Optional error message */
|
|
730
|
-
err_message: string
|
|
736
|
+
err_message: string;
|
|
731
737
|
/** The prize_id that user won, details of the prize can be found in the mini-game definition */
|
|
732
|
-
prize_id: number
|
|
738
|
+
prize_id: number;
|
|
733
739
|
}
|
|
734
740
|
/**
|
|
735
741
|
* TMiniGameTemplate describes the information of mini-games available for the user
|
|
736
742
|
*/
|
|
737
743
|
export interface TMiniGameTemplate {
|
|
738
744
|
/** ID of the mini-game template */
|
|
739
|
-
id: number
|
|
745
|
+
id: number;
|
|
740
746
|
/** Name of the mini-game template, translated to the user language */
|
|
741
|
-
name: string
|
|
747
|
+
name: string;
|
|
742
748
|
/** Description of the mini-game template, translated to the user language */
|
|
743
|
-
description: string
|
|
749
|
+
description: string;
|
|
744
750
|
/** URL of the icon of the mini-game template */
|
|
745
|
-
thumbnail: string
|
|
751
|
+
thumbnail: string;
|
|
746
752
|
/** The type of the game, e.g. Spin the Wheel, Gift Box, Scratch card, MatchX etc */
|
|
747
|
-
saw_game_type: SAWGameTypeName
|
|
753
|
+
saw_game_type: SAWGameTypeName;
|
|
748
754
|
/** How the user is charged for each game attempt e.g. Free, Points or Spin attempts */
|
|
749
|
-
saw_buyin_type: SAWBuyInTypeName
|
|
755
|
+
saw_buyin_type: SAWBuyInTypeName;
|
|
750
756
|
/** in case of charging type 'Points', what is the points amount will be deducted from user balance */
|
|
751
|
-
buyin_cost_points: number
|
|
757
|
+
buyin_cost_points: number;
|
|
752
758
|
/** in case of charging type 'Spin attempts', shows the current number of spin attempts that user has */
|
|
753
|
-
spin_count?: number
|
|
759
|
+
spin_count?: number;
|
|
754
760
|
/** 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 */
|
|
755
|
-
next_available_spin_ts: number
|
|
761
|
+
next_available_spin_ts: number;
|
|
756
762
|
/** 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 */
|
|
757
|
-
over_limit_message: string
|
|
763
|
+
over_limit_message: string;
|
|
758
764
|
/** The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts or points. */
|
|
759
|
-
no_attempts_message: string
|
|
765
|
+
no_attempts_message: string;
|
|
760
766
|
/** Current jackpont amount, if jackpot is enabled. */
|
|
761
|
-
jackpot_current: number
|
|
767
|
+
jackpot_current: number;
|
|
762
768
|
/** 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. */
|
|
763
|
-
jackpot_add_on_attempt: number
|
|
769
|
+
jackpot_add_on_attempt: number;
|
|
764
770
|
/** 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'.
|
|
765
771
|
*/
|
|
766
|
-
jackpot_symbol: string
|
|
772
|
+
jackpot_symbol: string;
|
|
767
773
|
/** The promo image */
|
|
768
|
-
promo_image: string
|
|
774
|
+
promo_image: string;
|
|
769
775
|
/** The promo text */
|
|
770
|
-
promo_text: string
|
|
776
|
+
promo_text: string;
|
|
771
777
|
/** The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number */
|
|
772
|
-
custom_data: any
|
|
773
|
-
prizes: TMiniGamePrize[]
|
|
778
|
+
custom_data: any;
|
|
779
|
+
prizes: TMiniGamePrize[];
|
|
774
780
|
}
|
|
775
781
|
/**
|
|
776
782
|
* TUser describes the information of the user
|
|
@@ -780,28 +786,28 @@ export interface TMiniGameTemplate {
|
|
|
780
786
|
*/
|
|
781
787
|
export interface TUserProfile {
|
|
782
788
|
/** The language of the user */
|
|
783
|
-
core_user_language: string
|
|
789
|
+
core_user_language: string;
|
|
784
790
|
/** The current points balance that user can use in the Store, Mini-games, Tournaments, etc.. */
|
|
785
|
-
ach_points_balance: number
|
|
791
|
+
ach_points_balance: number;
|
|
786
792
|
/** The amount of points that user collected in total */
|
|
787
|
-
ach_points_ever: number
|
|
793
|
+
ach_points_ever: number;
|
|
788
794
|
/**
|
|
789
795
|
* The array of the public tags set on the user object.
|
|
790
796
|
* They can be treated as server-based cookies.
|
|
791
797
|
* You can set tags using following method _smartico.event('core_public_tags_update', { core_public_tags: ['A', 'B'] } );
|
|
792
798
|
* And then you can check for the tags
|
|
793
799
|
*/
|
|
794
|
-
core_public_tags: string[]
|
|
800
|
+
core_public_tags: string[];
|
|
795
801
|
/** The ID of the current level of the user */
|
|
796
|
-
ach_level_current_id?: number
|
|
802
|
+
ach_level_current_id?: number;
|
|
797
803
|
/** The indicator if user is marked as test user */
|
|
798
|
-
core_is_test_account?: boolean
|
|
804
|
+
core_is_test_account?: boolean;
|
|
799
805
|
/** The URL to the user avatar */
|
|
800
|
-
avatar_url?: string
|
|
806
|
+
avatar_url?: string;
|
|
801
807
|
/** The username of current user */
|
|
802
|
-
public_username?: string
|
|
808
|
+
public_username?: string;
|
|
803
809
|
/** THe number of unread inbox messages */
|
|
804
|
-
core_inbox_unread_count?: number
|
|
810
|
+
core_inbox_unread_count?: number;
|
|
805
811
|
}
|
|
806
812
|
/**
|
|
807
813
|
* TLevel describes the information of each level defined in the system
|
|
@@ -811,459 +817,517 @@ export interface TUserProfile {
|
|
|
811
817
|
*/
|
|
812
818
|
export interface TLevel {
|
|
813
819
|
/** The ID of the Level */
|
|
814
|
-
id: number
|
|
820
|
+
id: number;
|
|
815
821
|
/** The name of the Level, translated to the user language */
|
|
816
|
-
name: string
|
|
822
|
+
name: string;
|
|
817
823
|
/** The description of the Level, translated to the user language */
|
|
818
|
-
description: string
|
|
824
|
+
description: string;
|
|
819
825
|
/** The URL of the image of the Level */
|
|
820
|
-
image: string
|
|
826
|
+
image: string;
|
|
821
827
|
/** The amount of points required to reach the Level */
|
|
822
|
-
required_points: number
|
|
828
|
+
required_points: number;
|
|
823
829
|
/** Number of points that user should collect in order to see this level */
|
|
824
|
-
visibility_points: number
|
|
830
|
+
visibility_points: number;
|
|
825
831
|
/**
|
|
826
832
|
* The counter of 1st metric used to reach the Level.
|
|
827
833
|
* Relevant in case of using advanced leveling logic
|
|
828
834
|
* https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
|
|
829
835
|
*
|
|
830
836
|
*/
|
|
831
|
-
required_level_counter_1: number
|
|
837
|
+
required_level_counter_1: number;
|
|
832
838
|
/**
|
|
833
839
|
* The counter of 2nd metric used to reach the Level.
|
|
834
840
|
* Relevant in case of using advanced leveling logic
|
|
835
841
|
* https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
|
|
836
842
|
*
|
|
837
843
|
*/
|
|
838
|
-
required_level_counter_2: number
|
|
844
|
+
required_level_counter_2: number;
|
|
839
845
|
/** The custom data of the Level defined by operator in the BackOffice. Can be a JSON object, string or number */
|
|
840
|
-
custom_data: string
|
|
846
|
+
custom_data: string;
|
|
841
847
|
}
|
|
842
848
|
/**
|
|
843
849
|
* TTournament describes the general information of the tournament item
|
|
844
850
|
*/
|
|
845
851
|
export interface TTournament {
|
|
846
852
|
/** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */
|
|
847
|
-
instance_id: number
|
|
853
|
+
instance_id: number;
|
|
848
854
|
/** ID of tournament template */
|
|
849
|
-
tournament_id: number
|
|
855
|
+
tournament_id: number;
|
|
850
856
|
/** Name of the tournament, translated to the user language */
|
|
851
|
-
name: string
|
|
857
|
+
name: string;
|
|
852
858
|
/** Description of the tournament, translated to the user language */
|
|
853
|
-
description: string
|
|
854
|
-
image1: string
|
|
855
|
-
image2: string
|
|
856
|
-
prize_pool_short: string
|
|
857
|
-
custom_price_text: string
|
|
859
|
+
description: string;
|
|
860
|
+
image1: string;
|
|
861
|
+
image2: string;
|
|
862
|
+
prize_pool_short: string;
|
|
863
|
+
custom_price_text: string;
|
|
858
864
|
/** The message that should be shown to the user when the user cannot register in tournament with error code TOURNAMENT_USER_DONT_MATCH_CONDITIONS */
|
|
859
|
-
segment_dont_match_message: string
|
|
865
|
+
segment_dont_match_message: string;
|
|
860
866
|
/**
|
|
861
867
|
* The ID of the custom section where the tournament is assigned
|
|
862
868
|
* The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
|
|
863
869
|
*/
|
|
864
|
-
custom_section_id: number
|
|
870
|
+
custom_section_id: number;
|
|
865
871
|
/** The custom data of the tournament defined by operator. Can be a JSON object, string or number */
|
|
866
|
-
custom_data: any
|
|
872
|
+
custom_data: any;
|
|
867
873
|
/** The indicator if the tournament is 'Featured' */
|
|
868
|
-
is_featured: boolean
|
|
874
|
+
is_featured: boolean;
|
|
869
875
|
/** The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
870
|
-
ribbon: TRibbon
|
|
876
|
+
ribbon: TRibbon;
|
|
871
877
|
/** A number is used to order the tournaments, representing their priority in the list */
|
|
872
|
-
priority: number
|
|
878
|
+
priority: number;
|
|
873
879
|
/** Info about current player in tournament */
|
|
874
880
|
me?: {
|
|
875
881
|
/** The username of the participant */
|
|
876
|
-
public_username: string
|
|
882
|
+
public_username: string;
|
|
877
883
|
/** The URL to the avatar of the participant */
|
|
878
|
-
avatar_url: string
|
|
884
|
+
avatar_url: string;
|
|
879
885
|
/** The position of the participant in the tournament */
|
|
880
|
-
position: number
|
|
886
|
+
position: number;
|
|
881
887
|
/** The scores of the participant in the tournament */
|
|
882
|
-
scores: number
|
|
883
|
-
}
|
|
888
|
+
scores: number;
|
|
889
|
+
};
|
|
884
890
|
/** Prize structure */
|
|
885
891
|
prizes?: {
|
|
886
892
|
/** The name of the prize */
|
|
887
|
-
name: string
|
|
893
|
+
name: string;
|
|
888
894
|
/** The description of the prize */
|
|
889
|
-
description: string
|
|
895
|
+
description: string;
|
|
890
896
|
/** The image of the prize */
|
|
891
|
-
image_url: string
|
|
897
|
+
image_url: string;
|
|
892
898
|
/** from-to range of the places to which this prize */
|
|
893
|
-
place_from: number
|
|
894
|
-
place_to: number
|
|
899
|
+
place_from: number;
|
|
900
|
+
place_to: number;
|
|
895
901
|
/** type of the prize: TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS */
|
|
896
|
-
type: string
|
|
902
|
+
type: string;
|
|
897
903
|
/** if the prize is points related, indicates amount of points */
|
|
898
|
-
points?: number
|
|
899
|
-
}[]
|
|
904
|
+
points?: number;
|
|
905
|
+
}[];
|
|
900
906
|
/** The time when tournament is going to start, epoch with milliseconds */
|
|
901
|
-
start_time: number
|
|
907
|
+
start_time: number;
|
|
902
908
|
/** The time when tournament is going to finish, epoch with milliseconds */
|
|
903
|
-
end_time: number
|
|
909
|
+
end_time: number;
|
|
904
910
|
/** Type of registration in the tournament */
|
|
905
|
-
registration_type: TournamentRegistrationTypeName
|
|
911
|
+
registration_type: TournamentRegistrationTypeName;
|
|
906
912
|
/** Number of users registered in the tournament */
|
|
907
|
-
registration_count: number
|
|
913
|
+
registration_count: number;
|
|
908
914
|
/** flag indicating if current user is registered in the tournament */
|
|
909
|
-
is_user_registered: boolean
|
|
915
|
+
is_user_registered: boolean;
|
|
910
916
|
/** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */
|
|
911
|
-
players_min_count: number
|
|
917
|
+
players_min_count: number;
|
|
912
918
|
/** Maximum number of participant for this tournament. When reached, new users won't be able to register */
|
|
913
|
-
players_max_count: number
|
|
919
|
+
players_max_count: number;
|
|
914
920
|
/** Status of registration in the tournament for current user */
|
|
915
|
-
registration_status: TournamentRegistrationStatusName
|
|
921
|
+
registration_status: TournamentRegistrationStatusName;
|
|
916
922
|
/** Tournament duration in millisecnnds */
|
|
917
|
-
duration_ms: number
|
|
923
|
+
duration_ms: number;
|
|
918
924
|
/** Cost of registration in the tournament in gamification points */
|
|
919
|
-
registration_cost_points: number
|
|
925
|
+
registration_cost_points: number;
|
|
920
926
|
/** Indicator if tournament instance is active, means in one of the statues - PUBLISHED, REGISTED, STARTED */
|
|
921
|
-
is_active: boolean
|
|
927
|
+
is_active: boolean;
|
|
922
928
|
/** Indicator if user can register in this tournament instance, e.g tournament is active, max users is not reached, user is not registered yet */
|
|
923
|
-
is_can_register: boolean
|
|
929
|
+
is_can_register: boolean;
|
|
924
930
|
/** Indicator if tournament instance is cancelled (status CANCELLED) */
|
|
925
|
-
is_cancelled: boolean
|
|
931
|
+
is_cancelled: boolean;
|
|
926
932
|
/** Indicator if tournament instance is finished (status FINISHED, CANCELLED OR FINIALIZING) */
|
|
927
|
-
is_finished: boolean
|
|
933
|
+
is_finished: boolean;
|
|
928
934
|
/** Indicator if tournament instance is running (status STARTED) */
|
|
929
|
-
is_in_progress: boolean
|
|
935
|
+
is_in_progress: boolean;
|
|
930
936
|
/** Indicator if tournament instance is upcoming (status PUBLISHED or REGISTER) */
|
|
931
|
-
is_upcoming: boolean
|
|
937
|
+
is_upcoming: boolean;
|
|
932
938
|
}
|
|
933
939
|
/**
|
|
934
940
|
* TTournamentDetailed describes the information of the tournament item and includes list of participants, their scores and position in the tournament leaderboard
|
|
935
941
|
*/
|
|
936
942
|
export interface TTournamentDetailed extends TTournament {
|
|
937
943
|
/** List of casino games (or other types of entities) related to the tournament */
|
|
938
|
-
related_games?: AchRelatedGame$1[]
|
|
944
|
+
related_games?: AchRelatedGame$1[];
|
|
939
945
|
/** The list of the tournament participants */
|
|
940
946
|
players?: {
|
|
941
947
|
/** The username of the participant */
|
|
942
|
-
public_username: string
|
|
948
|
+
public_username: string;
|
|
943
949
|
/** The URL to the avatar of the participant */
|
|
944
|
-
avatar_url: string
|
|
950
|
+
avatar_url: string;
|
|
945
951
|
/** The position of the participant in the tournament */
|
|
946
|
-
position: number
|
|
952
|
+
position: number;
|
|
947
953
|
/** The scores of the participant in the tournament */
|
|
948
|
-
scores: number
|
|
954
|
+
scores: number;
|
|
949
955
|
/** The indicator if the participant is current user */
|
|
950
|
-
is_me: boolean
|
|
951
|
-
}[]
|
|
956
|
+
is_me: boolean;
|
|
957
|
+
}[];
|
|
952
958
|
/** The information about current user in the tournament if he is registered in the tournamnet */
|
|
953
959
|
me?: {
|
|
954
960
|
/** The username of the current user */
|
|
955
|
-
public_username: string
|
|
961
|
+
public_username: string;
|
|
956
962
|
/** The URL to the avatar of the current user */
|
|
957
|
-
avatar_url: string
|
|
963
|
+
avatar_url: string;
|
|
958
964
|
/** The position of the current user in the tournament */
|
|
959
|
-
position: number
|
|
965
|
+
position: number;
|
|
960
966
|
/** The scores of the current user in the tournament */
|
|
961
|
-
scores: number
|
|
962
|
-
}
|
|
967
|
+
scores: number;
|
|
968
|
+
};
|
|
963
969
|
prizes?: {
|
|
964
970
|
/** The name of the prize */
|
|
965
|
-
name: string
|
|
971
|
+
name: string;
|
|
966
972
|
/** The description of the prize */
|
|
967
|
-
description: string
|
|
973
|
+
description: string;
|
|
968
974
|
/** The image of the prize */
|
|
969
|
-
image_url: string
|
|
975
|
+
image_url: string;
|
|
970
976
|
/** from-to range of the places to which this prize */
|
|
971
|
-
place_from: number
|
|
972
|
-
place_to: number
|
|
977
|
+
place_from: number;
|
|
978
|
+
place_to: number;
|
|
973
979
|
/** type of the prize: TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS */
|
|
974
|
-
type: string
|
|
980
|
+
type: string;
|
|
975
981
|
/** if the prize is points related, indicates amount of points */
|
|
976
|
-
points?: number
|
|
977
|
-
}[]
|
|
982
|
+
points?: number;
|
|
983
|
+
}[];
|
|
978
984
|
}
|
|
979
985
|
/**
|
|
980
986
|
* TStoreCategory describes the store category item. Each store item can be assigned to 1 or more categories
|
|
981
987
|
*/
|
|
982
988
|
export interface TStoreCategory {
|
|
983
|
-
id: number
|
|
984
|
-
name: string
|
|
985
|
-
order: number
|
|
989
|
+
id: number;
|
|
990
|
+
name: string;
|
|
991
|
+
order: number;
|
|
986
992
|
}
|
|
987
993
|
/**
|
|
988
994
|
* TStoreItem describes the information of the store item defined in the system
|
|
989
995
|
*/
|
|
990
996
|
export interface TStoreItem {
|
|
991
997
|
/** ID of the store item */
|
|
992
|
-
id: number
|
|
998
|
+
id: number;
|
|
993
999
|
/** Name of the store item, translated to the user language */
|
|
994
|
-
name: string
|
|
1000
|
+
name: string;
|
|
995
1001
|
/** Description of the store item, translated to the user language */
|
|
996
|
-
description: string
|
|
1002
|
+
description: string;
|
|
997
1003
|
/** URL of the image of the store item */
|
|
998
|
-
image: string
|
|
1004
|
+
image: string;
|
|
999
1005
|
/** Type of the store item. Can be 'bonus' or 'manual'. Manual, means it's tangible item, e.g. iPhone */
|
|
1000
|
-
type: 'bonus' | 'manual'
|
|
1006
|
+
type: 'bonus' | 'manual';
|
|
1001
1007
|
/** The price of the store item in the gamification points */
|
|
1002
|
-
price: number
|
|
1008
|
+
price: number;
|
|
1003
1009
|
/** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
1004
|
-
ribbon: TRibbon
|
|
1010
|
+
ribbon: TRibbon;
|
|
1005
1011
|
/**
|
|
1006
1012
|
* 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.
|
|
1007
1013
|
The message is translated to the user language.
|
|
1008
1014
|
**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
|
|
1009
1015
|
*/
|
|
1010
|
-
limit_message: string
|
|
1016
|
+
limit_message: string;
|
|
1011
1017
|
/** The priority of the store item. Can be used to sort the items in the store */
|
|
1012
|
-
priority: number
|
|
1018
|
+
priority: number;
|
|
1013
1019
|
/** The list of IDs of the related items. Can be used to show the related items in the store */
|
|
1014
|
-
related_item_ids: number[]
|
|
1020
|
+
related_item_ids: number[];
|
|
1015
1021
|
/** The indicator if the user can buy the item
|
|
1016
1022
|
* This indicator is taking into account the segment conditions for the store item, the price of item towards users balance,
|
|
1017
1023
|
*/
|
|
1018
|
-
can_buy: boolean
|
|
1024
|
+
can_buy: boolean;
|
|
1019
1025
|
/** The list of IDs of the categories where the store item is assigned, information about categories can be retrieved with getStoreCategories method */
|
|
1020
|
-
category_ids: number[]
|
|
1026
|
+
category_ids: number[];
|
|
1021
1027
|
/** Number of items in the pool avaliable for the purchase.*/
|
|
1022
|
-
pool?: number
|
|
1028
|
+
pool?: number;
|
|
1023
1029
|
/** The T&C text for the store item */
|
|
1024
|
-
hint_text?: string
|
|
1030
|
+
hint_text?: string;
|
|
1025
1031
|
/** Purchase time to show in purchase history screen */
|
|
1026
|
-
purchase_ts?: number
|
|
1032
|
+
purchase_ts?: number;
|
|
1027
1033
|
/** The amount of points you can purchase an item */
|
|
1028
|
-
purchase_points_amount?: number
|
|
1034
|
+
purchase_points_amount?: number;
|
|
1029
1035
|
}
|
|
1030
1036
|
/**
|
|
1031
1037
|
* TAchCategory describes the badge category item. Each badge item can be assigned to 1 or more categories
|
|
1032
1038
|
*/
|
|
1033
1039
|
export interface TAchCategory {
|
|
1034
|
-
id: number
|
|
1035
|
-
name: string
|
|
1036
|
-
order: number
|
|
1040
|
+
id: number;
|
|
1041
|
+
name: string;
|
|
1042
|
+
order: number;
|
|
1037
1043
|
}
|
|
1038
1044
|
/**
|
|
1039
1045
|
* TMissionOrBadge describes the information of mission or badge defined in the system
|
|
1040
1046
|
*/
|
|
1041
1047
|
export interface TMissionOrBadge {
|
|
1042
1048
|
/** ID of the mission or badge */
|
|
1043
|
-
id: number
|
|
1049
|
+
id: number;
|
|
1044
1050
|
/** Type of entity. Can be 'mission' or 'badge' */
|
|
1045
|
-
type: 'mission' | 'badge'
|
|
1051
|
+
type: 'mission' | 'badge';
|
|
1046
1052
|
/** Name of the mission or badge, translated to the user language */
|
|
1047
|
-
name: string
|
|
1053
|
+
name: string;
|
|
1048
1054
|
/** Description of the mission or badge, translated to the user language */
|
|
1049
|
-
description: string
|
|
1055
|
+
description: string;
|
|
1050
1056
|
/** Description of the mission reward if defined */
|
|
1051
|
-
reward: string
|
|
1057
|
+
reward: string;
|
|
1052
1058
|
/** URL of the image of the mission or badge */
|
|
1053
|
-
image: string
|
|
1059
|
+
image: string;
|
|
1054
1060
|
/** Indicator if the mission is completed or badge is granted */
|
|
1055
|
-
is_completed: boolean
|
|
1061
|
+
is_completed: boolean;
|
|
1056
1062
|
/** Indicator if the mission is locked. Means that it's visible to the user, but he cannot progress in it until it's unlocked.
|
|
1057
1063
|
* Mission may optionally contain the explanation of what should be done to unlock it in the unlock_mission_description property
|
|
1058
1064
|
*/
|
|
1059
|
-
is_locked: boolean
|
|
1065
|
+
is_locked: boolean;
|
|
1060
1066
|
/** Optional explaination of what should be done to unlock the mission */
|
|
1061
|
-
unlock_mission_description: string
|
|
1067
|
+
unlock_mission_description: string;
|
|
1062
1068
|
/** Indicator if the mission requires opt-in. Means that user should explicitly opt-in to the mission in order to start progressing in it */
|
|
1063
|
-
is_requires_optin: boolean
|
|
1069
|
+
is_requires_optin: boolean;
|
|
1064
1070
|
/** Indicator if the user opted-in to the mission */
|
|
1065
|
-
is_opted_in: boolean
|
|
1071
|
+
is_opted_in: boolean;
|
|
1066
1072
|
/** The amount of time in milliseconds that user has to complete the mission */
|
|
1067
|
-
time_limit_ms: number
|
|
1073
|
+
time_limit_ms: number;
|
|
1068
1074
|
/** The date when the mission was started, relevant for the time limited missions */
|
|
1069
|
-
dt_start: number
|
|
1075
|
+
dt_start: number;
|
|
1070
1076
|
/** The progress of the mission in percents calculated as the aggregated relative percentage of all tasks */
|
|
1071
|
-
progress: number
|
|
1077
|
+
progress: number;
|
|
1072
1078
|
/**
|
|
1073
1079
|
* The action that should be performed when user clicks on the mission or badge
|
|
1074
1080
|
* 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);
|
|
1075
1081
|
* The 'dp' function will handle the CTA and will execute it in the most safe way
|
|
1076
1082
|
*/
|
|
1077
|
-
cta_action: string
|
|
1083
|
+
cta_action: string;
|
|
1078
1084
|
/** The text of the CTA button, e.g. 'Make a deposit' */
|
|
1079
|
-
cta_text: string
|
|
1085
|
+
cta_text: string;
|
|
1080
1086
|
/**
|
|
1081
1087
|
* The ID of the custom section where the mission or badge is assigned
|
|
1082
1088
|
* The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
|
|
1083
1089
|
*/
|
|
1084
|
-
custom_section_id: number
|
|
1090
|
+
custom_section_id: number;
|
|
1085
1091
|
/** 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 */
|
|
1086
|
-
only_in_custom_section: boolean
|
|
1092
|
+
only_in_custom_section: boolean;
|
|
1087
1093
|
/** The custom data of the mission or badge defined by operator. Can be a JSON object, string or number */
|
|
1088
|
-
custom_data: any
|
|
1094
|
+
custom_data: any;
|
|
1089
1095
|
/** The list of tasks of the mission or badge */
|
|
1090
|
-
tasks: TMissionOrBadgeTask[]
|
|
1096
|
+
tasks: TMissionOrBadgeTask[];
|
|
1091
1097
|
/** List of casino games (or other types of entities) related to the mission or badge */
|
|
1092
|
-
related_games?: AchRelatedGame$1[]
|
|
1098
|
+
related_games?: AchRelatedGame$1[];
|
|
1093
1099
|
/** The list of IDs of the categories where the badge item is assigned, information about categories can be retrieved with getAchCategories method */
|
|
1094
|
-
category_ids: number[]
|
|
1100
|
+
category_ids: number[];
|
|
1095
1101
|
/** The T&C text for the missions */
|
|
1096
|
-
hint_text?: string
|
|
1102
|
+
hint_text?: string;
|
|
1097
1103
|
/** Priority (or position) of the mission in the UI. Low value indicates higher position in the UI */
|
|
1098
|
-
position?: number
|
|
1104
|
+
position?: number;
|
|
1099
1105
|
/** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
|
|
1100
|
-
ribbon?: TRibbon
|
|
1106
|
+
ribbon?: TRibbon;
|
|
1101
1107
|
/** ID of the completion fact from ach_completed or ach_completed_recurring tables */
|
|
1102
|
-
ach_completed_id?: number
|
|
1108
|
+
ach_completed_id?: number;
|
|
1103
1109
|
/** Flag from achievement if the mission prize will be given only after user claims it */
|
|
1104
|
-
requires_prize_claim?: boolean
|
|
1110
|
+
requires_prize_claim?: boolean;
|
|
1105
1111
|
/** The date/timestamp indicating when the prize was claimed by the user */
|
|
1106
|
-
prize_claimed_date_ts?: number
|
|
1112
|
+
prize_claimed_date_ts?: number;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
export enum BonusStatus {
|
|
1116
|
+
/** The bonus is newly created (shouldn't be shown to the client) */
|
|
1117
|
+
New = 1,
|
|
1118
|
+
/** The bonus is issued and available for redemption but has not been redeemed yet */
|
|
1119
|
+
COUPON_ISSUED = 2,
|
|
1120
|
+
/** The bonus has been successfully redeemed */
|
|
1121
|
+
REDEEMED = 3,
|
|
1122
|
+
/** The bonus is still valid, but a previous redemption attempt failed */
|
|
1123
|
+
REDEEM_FAILED = 4,
|
|
1124
|
+
/** Failed to issue the bonus (shouldn't be shown to the client) */
|
|
1125
|
+
COUPON_ISSUE_FAILED = 5,
|
|
1126
|
+
/** The bonus was issued but has expired and can no longer be redeemed (shouldn't be shown to the client) */
|
|
1127
|
+
EXPIRED = 6,
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
export interface BonusTemplateMetaMap {
|
|
1131
|
+
/** Description of the bonus template*/
|
|
1132
|
+
description: string;
|
|
1133
|
+
/** Acknowledge message setup in the bonus template*/
|
|
1134
|
+
acknowledge: string;
|
|
1135
|
+
/** Image URL of the bonus template*/
|
|
1136
|
+
image_url: string;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
export interface BonusMetaMap {
|
|
1140
|
+
/** Label and description of the bonus sent to the player*/
|
|
1141
|
+
uiAmount?: string;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export interface TBonus {
|
|
1145
|
+
/** ID of the bonus */
|
|
1146
|
+
bonus_id: number;
|
|
1147
|
+
/** Can the bonus be redeemed (if bonus is redeemable the user needs to claim it) */
|
|
1148
|
+
is_redeemable?: boolean;
|
|
1149
|
+
/** Date of creation */
|
|
1150
|
+
create_date?: string;
|
|
1151
|
+
/** Date of last update */
|
|
1152
|
+
update_date?: string;
|
|
1153
|
+
/** Date of redemption */
|
|
1154
|
+
redeem_date?: string;
|
|
1155
|
+
/** Uniq identifier of the bonus sent to the player */
|
|
1156
|
+
engagement_uid?: string;
|
|
1157
|
+
/** ID of template used */
|
|
1158
|
+
label_bonus_template_id?: number;
|
|
1159
|
+
/** Reference ID of product */
|
|
1160
|
+
source_product_ref_id?: number;
|
|
1161
|
+
/** ID of product */
|
|
1162
|
+
source_product_id?: number;
|
|
1163
|
+
/** ID of the user who created the bonus */
|
|
1164
|
+
user_id?: number;
|
|
1165
|
+
/** ID of the bonus status */
|
|
1166
|
+
bonus_status_id?: BonusStatus;
|
|
1167
|
+
/** Additional information about the bonus(edscription, image,name, acknowledge) */
|
|
1168
|
+
label_bonus_template_meta_map?: BonusTemplateMetaMap;
|
|
1169
|
+
/** Additional information presented to the player when the bonus is redeemed */
|
|
1170
|
+
bonus_meta_map?: BonusMetaMap;
|
|
1107
1171
|
}
|
|
1108
1172
|
interface AchRelatedGame$1 {
|
|
1109
1173
|
/** The ID of the related game */
|
|
1110
|
-
ext_game_id: string
|
|
1174
|
+
ext_game_id: string;
|
|
1111
1175
|
/** Game public meta information */
|
|
1112
1176
|
game_public_meta: {
|
|
1113
1177
|
/** The name of the game */
|
|
1114
|
-
name: string
|
|
1178
|
+
name: string;
|
|
1115
1179
|
/** The URL to the game */
|
|
1116
|
-
link: string
|
|
1180
|
+
link: string;
|
|
1117
1181
|
/** The URL to the image of the game */
|
|
1118
|
-
image: string
|
|
1182
|
+
image: string;
|
|
1119
1183
|
/** The indicator if the game is enabled */
|
|
1120
|
-
enabled: boolean
|
|
1184
|
+
enabled: boolean;
|
|
1121
1185
|
/** The list of categories of the game */
|
|
1122
|
-
game_categories: string[]
|
|
1186
|
+
game_categories: string[];
|
|
1123
1187
|
/** The name of the game provider */
|
|
1124
|
-
game_provider: string
|
|
1125
|
-
}
|
|
1188
|
+
game_provider: string;
|
|
1189
|
+
};
|
|
1126
1190
|
}
|
|
1127
1191
|
/**
|
|
1128
1192
|
* TMissionOrBadgeTask describes the information of tasks that belings to mission or badge. See also TMissionOrBadge
|
|
1129
1193
|
*/
|
|
1130
1194
|
export interface TMissionOrBadgeTask {
|
|
1131
1195
|
/** ID of the task */
|
|
1132
|
-
id: number
|
|
1196
|
+
id: number;
|
|
1133
1197
|
/** Name of the task, translated to the user language */
|
|
1134
|
-
name: string
|
|
1198
|
+
name: string;
|
|
1135
1199
|
/** Indicator if the task is completed */
|
|
1136
|
-
is_completed: boolean
|
|
1200
|
+
is_completed: boolean;
|
|
1137
1201
|
/** The progress of the task in percents */
|
|
1138
|
-
progress: number
|
|
1202
|
+
progress: number;
|
|
1139
1203
|
/** Reward for completing the task in points */
|
|
1140
|
-
points_reward: number
|
|
1204
|
+
points_reward: number;
|
|
1141
1205
|
}
|
|
1142
1206
|
/**
|
|
1143
1207
|
* TMissionOptInResult describes the response of call to _smartico.api.requestMissionOptIn(mission_id) method
|
|
1144
1208
|
*/
|
|
1145
1209
|
export interface TMissionOptInResult {
|
|
1146
1210
|
/** Error code that represents outcome of the opt-in request. Successful opt-in in case err_code is 0 */
|
|
1147
|
-
err_code: number
|
|
1211
|
+
err_code: number;
|
|
1148
1212
|
/** Optional error message */
|
|
1149
|
-
err_message: string
|
|
1213
|
+
err_message: string;
|
|
1150
1214
|
}
|
|
1151
1215
|
/**
|
|
1152
1216
|
* TMissionClaimRewardResult describes the response of call to _smartico.api.requestMissionClaimReward(mission_id, ach_completed_id) method
|
|
1153
1217
|
*/
|
|
1154
1218
|
export interface TMissionClaimRewardResult {
|
|
1155
1219
|
/** Error code that represents outcome of the claim request. Successful claim reward in case err_code is 0 */
|
|
1156
|
-
err_code: number
|
|
1220
|
+
err_code: number;
|
|
1157
1221
|
/** Optional error message */
|
|
1158
|
-
err_message: string
|
|
1222
|
+
err_message: string;
|
|
1159
1223
|
}
|
|
1160
1224
|
export interface TTournamentRegistrationResult {
|
|
1161
1225
|
/** Error code that represents outcome of the tournament registration request. Successful registration in case err_code is 0 */
|
|
1162
|
-
err_code: TournamentRegistrationError
|
|
1226
|
+
err_code: TournamentRegistrationError;
|
|
1163
1227
|
/** Optional error message */
|
|
1164
|
-
err_message: string
|
|
1228
|
+
err_message: string;
|
|
1165
1229
|
}
|
|
1166
1230
|
export interface TBuyStoreItemResult {
|
|
1167
1231
|
/** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0 */
|
|
1168
|
-
err_code: BuyStoreItemErrorCode
|
|
1232
|
+
err_code: BuyStoreItemErrorCode;
|
|
1169
1233
|
/** Optional error message */
|
|
1170
|
-
err_message: string
|
|
1234
|
+
err_message: string;
|
|
1171
1235
|
}
|
|
1172
1236
|
export interface TGetTranslations {
|
|
1173
1237
|
translations: {
|
|
1174
|
-
[key: string]: string
|
|
1175
|
-
}
|
|
1238
|
+
[key: string]: string;
|
|
1239
|
+
};
|
|
1176
1240
|
}
|
|
1177
1241
|
export interface TInboxMessage {
|
|
1178
1242
|
/** Uniq identifier of the message. It is needed to request the message body, mark the message as read/deleted/favorite. */
|
|
1179
|
-
message_guid: string
|
|
1243
|
+
message_guid: string;
|
|
1180
1244
|
/** Date when the message was sent */
|
|
1181
|
-
sent_date: string
|
|
1245
|
+
sent_date: string;
|
|
1182
1246
|
/** Indicator if a message is read */
|
|
1183
|
-
read: boolean
|
|
1247
|
+
read: boolean;
|
|
1184
1248
|
/** Indicator if a message is added to favorites */
|
|
1185
|
-
favorite: boolean
|
|
1249
|
+
favorite: boolean;
|
|
1186
1250
|
}
|
|
1187
1251
|
export interface TInboxMessageBody {
|
|
1188
1252
|
/** Message title */
|
|
1189
|
-
title: string
|
|
1253
|
+
title: string;
|
|
1190
1254
|
/** Short preview body of the message */
|
|
1191
|
-
preview_body: string
|
|
1255
|
+
preview_body: string;
|
|
1192
1256
|
/** Message icon */
|
|
1193
|
-
icon: string
|
|
1257
|
+
icon: string;
|
|
1194
1258
|
/** The action that should be performed when user clicks on the message.
|
|
1195
1259
|
* 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);
|
|
1196
1260
|
* The 'dp' function will handle the CTA and will execute it in the most safe way.
|
|
1197
1261
|
* If the message has a rich html body - the action will always be 'dp:inbox' which will open the inbox widget when triggered. */
|
|
1198
|
-
action: string
|
|
1262
|
+
action: string;
|
|
1199
1263
|
/** Rich HTML body of the message. */
|
|
1200
|
-
html_body?: string
|
|
1264
|
+
html_body?: string;
|
|
1201
1265
|
/** Optional additional buttons to show in the message, available only if message has rich HTML body. Max count - 2. */
|
|
1202
1266
|
buttons?: {
|
|
1203
1267
|
/** The action that should be performed when user clicks on the button. The logic is the same as for message actions */
|
|
1204
|
-
action: string
|
|
1268
|
+
action: string;
|
|
1205
1269
|
/** Button text */
|
|
1206
|
-
text: string
|
|
1207
|
-
}[]
|
|
1270
|
+
text: string;
|
|
1271
|
+
}[];
|
|
1208
1272
|
}
|
|
1209
1273
|
export interface InboxMarkMessageAction {
|
|
1210
1274
|
/** An error code representing the result of marking a message as deleted, favorite or read. Successful marking action if err_code is 0 */
|
|
1211
|
-
err_code: number
|
|
1275
|
+
err_code: number;
|
|
1212
1276
|
/** Optional error message */
|
|
1213
|
-
err_message: string
|
|
1277
|
+
err_message: string;
|
|
1214
1278
|
}
|
|
1215
1279
|
export interface LeaderBoardDetailsT {
|
|
1216
1280
|
/** ID of the leaderboard */
|
|
1217
|
-
board_id: number
|
|
1281
|
+
board_id: number;
|
|
1218
1282
|
/** Name of the leaderboard */
|
|
1219
|
-
name: string
|
|
1283
|
+
name: string;
|
|
1220
1284
|
/** Description of the leaderboard */
|
|
1221
|
-
description: string
|
|
1285
|
+
description: string;
|
|
1222
1286
|
/** Rules of the leaderboard */
|
|
1223
|
-
rules: string
|
|
1287
|
+
rules: string;
|
|
1224
1288
|
/** Leaderboard period type ID */
|
|
1225
|
-
period_type_id: LeaderBoardPeriodType
|
|
1289
|
+
period_type_id: LeaderBoardPeriodType;
|
|
1226
1290
|
/** Leaderboard points rewards */
|
|
1227
|
-
rewards: LeaderBoardsRewardsT[]
|
|
1291
|
+
rewards: LeaderBoardsRewardsT[];
|
|
1228
1292
|
/** Leaderboard users */
|
|
1229
|
-
users: LeaderBoardUserT[]
|
|
1293
|
+
users: LeaderBoardUserT[];
|
|
1230
1294
|
/** Info about current user in leaderboard */
|
|
1231
|
-
me?: LeaderBoardUserT
|
|
1295
|
+
me?: LeaderBoardUserT;
|
|
1232
1296
|
}
|
|
1233
1297
|
export interface LeaderBoardsRewardsT {
|
|
1234
|
-
place: number
|
|
1235
|
-
points: number
|
|
1298
|
+
place: number;
|
|
1299
|
+
points: number;
|
|
1236
1300
|
}
|
|
1237
1301
|
export interface LeaderBoardUserT {
|
|
1238
1302
|
/** The username of the participant */
|
|
1239
|
-
public_username: string
|
|
1303
|
+
public_username: string;
|
|
1240
1304
|
/** The URL to the avatar of the participant */
|
|
1241
|
-
avatar_url: string
|
|
1305
|
+
avatar_url: string;
|
|
1242
1306
|
/** The position of the participant in the leaderboard */
|
|
1243
|
-
position: number
|
|
1307
|
+
position: number;
|
|
1244
1308
|
/** The points of the participant in the leaderboard */
|
|
1245
|
-
points: number
|
|
1309
|
+
points: number;
|
|
1246
1310
|
/** The indicator if the participant is current user */
|
|
1247
|
-
is_me: boolean
|
|
1311
|
+
is_me: boolean;
|
|
1248
1312
|
}
|
|
1249
1313
|
export interface UserLevelExtraCountersT {
|
|
1250
1314
|
/** The counter of 1st metric used to reach the level. */
|
|
1251
|
-
level_counter_1?: number
|
|
1315
|
+
level_counter_1?: number;
|
|
1252
1316
|
/** The counter of 2nd metric used to reach the level. */
|
|
1253
|
-
level_counter_2?: number
|
|
1317
|
+
level_counter_2?: number;
|
|
1254
1318
|
}
|
|
1255
1319
|
export interface TSegmentCheckResult {
|
|
1256
|
-
segment_id: number
|
|
1257
|
-
is_matching: boolean
|
|
1320
|
+
segment_id: number;
|
|
1321
|
+
is_matching: boolean;
|
|
1258
1322
|
}
|
|
1259
1323
|
export interface SAWGetTemplatesResponse extends ProtocolResponse {
|
|
1260
|
-
templates: SAWTemplate[]
|
|
1324
|
+
templates: SAWTemplate[];
|
|
1261
1325
|
}
|
|
1262
1326
|
export interface GetLabelInfoResponse extends ProtocolResponse {
|
|
1263
1327
|
settings: {
|
|
1264
|
-
[key: string]: string
|
|
1265
|
-
}
|
|
1266
|
-
label_id: string
|
|
1328
|
+
[key: string]: string;
|
|
1329
|
+
};
|
|
1330
|
+
label_id: string;
|
|
1267
1331
|
}
|
|
1268
1332
|
declare enum TranslationArea {
|
|
1269
1333
|
Casino = 1,
|
|
@@ -1275,10 +1339,10 @@ declare enum TranslationArea {
|
|
|
1275
1339
|
AffIliateAdminNew = 7,
|
|
1276
1340
|
}
|
|
1277
1341
|
export interface GetTranslationsResponse extends ProtocolResponse {
|
|
1278
|
-
hash_code: number
|
|
1342
|
+
hash_code: number;
|
|
1279
1343
|
translations: {
|
|
1280
|
-
[key: string]: string
|
|
1281
|
-
}
|
|
1344
|
+
[key: string]: string;
|
|
1345
|
+
};
|
|
1282
1346
|
}
|
|
1283
1347
|
declare enum PublicLabelSettings$1 {
|
|
1284
1348
|
PUBLIC_API_URL = 'PUBLIC_API_URL',
|
|
@@ -1308,22 +1372,22 @@ declare enum PublicLabelSettings$1 {
|
|
|
1308
1372
|
INBOX_PUBLIC_CDN = 'INBOX_PUBLIC_CDN',
|
|
1309
1373
|
}
|
|
1310
1374
|
interface PublicProperties$1 {
|
|
1311
|
-
core_user_language?: string
|
|
1312
|
-
ach_points_balance?: number
|
|
1313
|
-
ach_points_ever?: number
|
|
1314
|
-
ach_level_current_id?: number
|
|
1315
|
-
ach_level_current?: string
|
|
1316
|
-
core_is_test_account?: boolean
|
|
1317
|
-
ach_gamification_in_control_group?: boolean
|
|
1375
|
+
core_user_language?: string;
|
|
1376
|
+
ach_points_balance?: number;
|
|
1377
|
+
ach_points_ever?: number;
|
|
1378
|
+
ach_level_current_id?: number;
|
|
1379
|
+
ach_level_current?: string;
|
|
1380
|
+
core_is_test_account?: boolean;
|
|
1381
|
+
ach_gamification_in_control_group?: boolean;
|
|
1318
1382
|
}
|
|
1319
1383
|
export interface ResponseIdentify extends ProtocolResponse {
|
|
1320
|
-
user_id: number
|
|
1321
|
-
ext_user_id: string
|
|
1322
|
-
public_username: string
|
|
1323
|
-
avatar_id: string
|
|
1324
|
-
job: boolean
|
|
1325
|
-
props?: PublicProperties$1
|
|
1326
|
-
pubic_username_set: boolean
|
|
1384
|
+
user_id: number;
|
|
1385
|
+
ext_user_id: string;
|
|
1386
|
+
public_username: string;
|
|
1387
|
+
avatar_id: string;
|
|
1388
|
+
job: boolean;
|
|
1389
|
+
props?: PublicProperties$1;
|
|
1390
|
+
pubic_username_set: boolean;
|
|
1327
1391
|
}
|
|
1328
1392
|
declare enum InboxMessageType {
|
|
1329
1393
|
Custom = 0,
|
|
@@ -1337,60 +1401,60 @@ declare enum InboxMessageType {
|
|
|
1337
1401
|
PersonalMessage = 8,
|
|
1338
1402
|
}
|
|
1339
1403
|
export interface InboxMessageBody {
|
|
1340
|
-
action: string
|
|
1341
|
-
body: string
|
|
1342
|
-
type: InboxMessageType
|
|
1343
|
-
image: string
|
|
1344
|
-
title: string
|
|
1345
|
-
html_body: string
|
|
1404
|
+
action: string;
|
|
1405
|
+
body: string;
|
|
1406
|
+
type: InboxMessageType;
|
|
1407
|
+
image: string;
|
|
1408
|
+
title: string;
|
|
1409
|
+
html_body: string;
|
|
1346
1410
|
additional_buttons?: {
|
|
1347
|
-
inbox_cta_text: string
|
|
1348
|
-
action: string
|
|
1349
|
-
}[]
|
|
1411
|
+
inbox_cta_text: string;
|
|
1412
|
+
action: string;
|
|
1413
|
+
}[];
|
|
1350
1414
|
}
|
|
1351
1415
|
export interface InboxMessage {
|
|
1352
|
-
createDate: string
|
|
1353
|
-
body: InboxMessageBody
|
|
1354
|
-
engagement_uid: string
|
|
1355
|
-
is_read: boolean
|
|
1356
|
-
is_starred: boolean
|
|
1357
|
-
is_deleted?: boolean
|
|
1416
|
+
createDate: string;
|
|
1417
|
+
body: InboxMessageBody;
|
|
1418
|
+
engagement_uid: string;
|
|
1419
|
+
is_read: boolean;
|
|
1420
|
+
is_starred: boolean;
|
|
1421
|
+
is_deleted?: boolean;
|
|
1358
1422
|
}
|
|
1359
1423
|
export interface GetInboxMessagesResponse extends ProtocolResponse {
|
|
1360
|
-
log: InboxMessage[]
|
|
1424
|
+
log: InboxMessage[];
|
|
1361
1425
|
}
|
|
1362
1426
|
export interface MarkInboxMessageReadResponse extends ProtocolMessage {
|
|
1363
|
-
errCode: number
|
|
1364
|
-
errMsg?: string
|
|
1427
|
+
errCode: number;
|
|
1428
|
+
errMsg?: string;
|
|
1365
1429
|
}
|
|
1366
1430
|
export interface MarkInboxMessageStarredResponse extends ProtocolMessage {
|
|
1367
|
-
errCode: number
|
|
1368
|
-
errMsg?: string
|
|
1431
|
+
errCode: number;
|
|
1432
|
+
errMsg?: string;
|
|
1369
1433
|
}
|
|
1370
1434
|
export interface MarkInboxMessageDeletedResponse extends ProtocolMessage {
|
|
1371
|
-
errCode: number
|
|
1372
|
-
errMsg?: string
|
|
1435
|
+
errCode: number;
|
|
1436
|
+
errMsg?: string;
|
|
1373
1437
|
}
|
|
1374
1438
|
export interface AchievementOptinResponse extends ProtocolResponse {}
|
|
1375
1439
|
export interface AchievementPublicMeta {
|
|
1376
|
-
description?: string
|
|
1377
|
-
unlock_mission_description?: string
|
|
1378
|
-
custom_data?: string
|
|
1379
|
-
cta_text?: string
|
|
1380
|
-
cta_action?: string
|
|
1381
|
-
label_tag?: string
|
|
1382
|
-
custom_label_tag?: string
|
|
1383
|
-
reward?: string
|
|
1384
|
-
image_url?: string
|
|
1385
|
-
name?: string
|
|
1386
|
-
position?: number
|
|
1387
|
-
hide_tasks?: boolean
|
|
1388
|
-
hide_locked_mission?: boolean
|
|
1389
|
-
custom_section_id?: number
|
|
1390
|
-
only_in_custom_section?: boolean
|
|
1391
|
-
hint_text?: string
|
|
1392
|
-
hide_badge_from_ui?: boolean
|
|
1393
|
-
show_badge_first_task_completed?: boolean
|
|
1440
|
+
description?: string;
|
|
1441
|
+
unlock_mission_description?: string;
|
|
1442
|
+
custom_data?: string;
|
|
1443
|
+
cta_text?: string;
|
|
1444
|
+
cta_action?: string;
|
|
1445
|
+
label_tag?: string;
|
|
1446
|
+
custom_label_tag?: string;
|
|
1447
|
+
reward?: string;
|
|
1448
|
+
image_url?: string;
|
|
1449
|
+
name?: string;
|
|
1450
|
+
position?: number;
|
|
1451
|
+
hide_tasks?: boolean;
|
|
1452
|
+
hide_locked_mission?: boolean;
|
|
1453
|
+
custom_section_id?: number;
|
|
1454
|
+
only_in_custom_section?: boolean;
|
|
1455
|
+
hint_text?: string;
|
|
1456
|
+
hide_badge_from_ui?: boolean;
|
|
1457
|
+
show_badge_first_task_completed?: boolean;
|
|
1394
1458
|
}
|
|
1395
1459
|
declare enum AchievementStatus {
|
|
1396
1460
|
Draft = 1,
|
|
@@ -1401,7 +1465,7 @@ declare enum AchievementStatus {
|
|
|
1401
1465
|
FeaturedAI = 6,
|
|
1402
1466
|
}
|
|
1403
1467
|
export interface AchievementTaskPublicMeta {
|
|
1404
|
-
name?: string
|
|
1468
|
+
name?: string;
|
|
1405
1469
|
}
|
|
1406
1470
|
declare enum AchievementTaskType {
|
|
1407
1471
|
CompleteAchievement = 1,
|
|
@@ -1417,96 +1481,96 @@ declare enum ScheduledMissionType {
|
|
|
1417
1481
|
Present = 3,
|
|
1418
1482
|
}
|
|
1419
1483
|
export interface UserAchievementTask {
|
|
1420
|
-
task_id?: number
|
|
1421
|
-
task_public_meta?: AchievementTaskPublicMeta
|
|
1422
|
-
points_reward?: number
|
|
1423
|
-
task_type_id: AchievementTaskType
|
|
1424
|
-
isCompleted?: boolean
|
|
1425
|
-
userExecutedCount?: number
|
|
1426
|
-
userProgress?: number
|
|
1427
|
-
lastExecutionDate: string
|
|
1428
|
-
unlocked_by_mission_id?: number
|
|
1429
|
-
unlocked_by_level_id?: number
|
|
1484
|
+
task_id?: number;
|
|
1485
|
+
task_public_meta?: AchievementTaskPublicMeta;
|
|
1486
|
+
points_reward?: number;
|
|
1487
|
+
task_type_id: AchievementTaskType;
|
|
1488
|
+
isCompleted?: boolean;
|
|
1489
|
+
userExecutedCount?: number;
|
|
1490
|
+
userProgress?: number;
|
|
1491
|
+
lastExecutionDate: string;
|
|
1492
|
+
unlocked_by_mission_id?: number;
|
|
1493
|
+
unlocked_by_level_id?: number;
|
|
1430
1494
|
}
|
|
1431
1495
|
export interface UserAchievement {
|
|
1432
|
-
ach_id?: number
|
|
1433
|
-
ach_type_id?: AchievementType
|
|
1434
|
-
ach_public_meta?: AchievementPublicMeta
|
|
1435
|
-
isCompleted?: boolean
|
|
1436
|
-
isLocked?: boolean
|
|
1437
|
-
requiresOptin?: boolean
|
|
1438
|
-
isOptedIn?: boolean
|
|
1439
|
-
start_date?: string
|
|
1440
|
-
start_date_ts?: number
|
|
1441
|
-
time_limit_ms?: number
|
|
1442
|
-
progress?: number
|
|
1443
|
-
complete_date?: string
|
|
1444
|
-
unlock_date?: string
|
|
1445
|
-
milliseconds_till_available?: number
|
|
1446
|
-
completed_tasks?: number
|
|
1447
|
-
achievementTasks?: UserAchievementTask[]
|
|
1448
|
-
ach_status_id?: AchievementStatus
|
|
1449
|
-
scheduledMissionType?: ScheduledMissionType
|
|
1450
|
-
related_games?: AchRelatedGame[]
|
|
1451
|
-
active_from_ts?: number
|
|
1452
|
-
ach_categories?: number[]
|
|
1453
|
-
ach_completed_id?: number
|
|
1454
|
-
requires_prize_claim?: boolean
|
|
1455
|
-
prize_claimed_date_ts?: number
|
|
1496
|
+
ach_id?: number;
|
|
1497
|
+
ach_type_id?: AchievementType;
|
|
1498
|
+
ach_public_meta?: AchievementPublicMeta;
|
|
1499
|
+
isCompleted?: boolean;
|
|
1500
|
+
isLocked?: boolean;
|
|
1501
|
+
requiresOptin?: boolean;
|
|
1502
|
+
isOptedIn?: boolean;
|
|
1503
|
+
start_date?: string;
|
|
1504
|
+
start_date_ts?: number;
|
|
1505
|
+
time_limit_ms?: number;
|
|
1506
|
+
progress?: number;
|
|
1507
|
+
complete_date?: string;
|
|
1508
|
+
unlock_date?: string;
|
|
1509
|
+
milliseconds_till_available?: number;
|
|
1510
|
+
completed_tasks?: number;
|
|
1511
|
+
achievementTasks?: UserAchievementTask[];
|
|
1512
|
+
ach_status_id?: AchievementStatus;
|
|
1513
|
+
scheduledMissionType?: ScheduledMissionType;
|
|
1514
|
+
related_games?: AchRelatedGame[];
|
|
1515
|
+
active_from_ts?: number;
|
|
1516
|
+
ach_categories?: number[];
|
|
1517
|
+
ach_completed_id?: number;
|
|
1518
|
+
requires_prize_claim?: boolean;
|
|
1519
|
+
prize_claimed_date_ts?: number;
|
|
1456
1520
|
}
|
|
1457
1521
|
export interface GetAchievementMapResponse extends ProtocolResponse {
|
|
1458
|
-
achievements?: UserAchievement[]
|
|
1522
|
+
achievements?: UserAchievement[];
|
|
1459
1523
|
}
|
|
1460
1524
|
export interface AchCategoryPublicMeta {
|
|
1461
|
-
name?: string
|
|
1462
|
-
order?: number
|
|
1525
|
+
name?: string;
|
|
1526
|
+
order?: number;
|
|
1463
1527
|
}
|
|
1464
1528
|
export interface AchCategory {
|
|
1465
|
-
id?: number
|
|
1466
|
-
publicMeta?: AchCategoryPublicMeta
|
|
1529
|
+
id?: number;
|
|
1530
|
+
publicMeta?: AchCategoryPublicMeta;
|
|
1467
1531
|
}
|
|
1468
1532
|
export interface GetAchCategoriesResponse extends ProtocolResponse {
|
|
1469
|
-
categories: AchCategory[]
|
|
1533
|
+
categories: AchCategory[];
|
|
1470
1534
|
}
|
|
1471
1535
|
export interface AchClaimPrizeResponse extends ProtocolResponse {}
|
|
1472
1536
|
export interface LevelPublicMeta {
|
|
1473
1537
|
/** Description of level, HTML capabable */
|
|
1474
|
-
description?: string
|
|
1538
|
+
description?: string;
|
|
1475
1539
|
/** URL to the image of level */
|
|
1476
|
-
image_url?: string
|
|
1540
|
+
image_url?: string;
|
|
1477
1541
|
/** Name of level */
|
|
1478
|
-
name?: string
|
|
1542
|
+
name?: string;
|
|
1479
1543
|
/** Number of points that user should have collected in order to see this level */
|
|
1480
|
-
visibility_points?: number
|
|
1544
|
+
visibility_points?: number;
|
|
1481
1545
|
/** X & Y coordinates of level on the visual mission map, for desktop and mobile */
|
|
1482
1546
|
position?: {
|
|
1483
|
-
mx: number
|
|
1484
|
-
my: number
|
|
1485
|
-
dx: number
|
|
1486
|
-
dy: number
|
|
1487
|
-
}
|
|
1547
|
+
mx: number;
|
|
1548
|
+
my: number;
|
|
1549
|
+
dx: number;
|
|
1550
|
+
dy: number;
|
|
1551
|
+
};
|
|
1488
1552
|
/**custom data as string or JSON string that can be used in UIWidget */
|
|
1489
|
-
custom_data: string
|
|
1553
|
+
custom_data: string;
|
|
1490
1554
|
}
|
|
1491
1555
|
export interface Level {
|
|
1492
|
-
level_id: number
|
|
1493
|
-
level_public_meta: LevelPublicMeta
|
|
1494
|
-
required_points: number
|
|
1495
|
-
is_first_level: boolean
|
|
1556
|
+
level_id: number;
|
|
1557
|
+
level_public_meta: LevelPublicMeta;
|
|
1558
|
+
required_points: number;
|
|
1559
|
+
is_first_level: boolean;
|
|
1496
1560
|
/** Internal status of level. Not in use right now on the front-end */
|
|
1497
|
-
level_status_id: number
|
|
1498
|
-
required_level_counter_1: number
|
|
1499
|
-
required_level_counter_2: number
|
|
1500
|
-
general_level_progress: number
|
|
1561
|
+
level_status_id: number;
|
|
1562
|
+
required_level_counter_1: number;
|
|
1563
|
+
required_level_counter_2: number;
|
|
1564
|
+
general_level_progress: number;
|
|
1501
1565
|
}
|
|
1502
1566
|
export interface GetLevelMapResponse extends ProtocolResponse {
|
|
1503
|
-
levels: Level[]
|
|
1567
|
+
levels: Level[];
|
|
1504
1568
|
}
|
|
1505
1569
|
declare class WSAPI {
|
|
1506
|
-
private api
|
|
1507
|
-
private onUpdateCallback
|
|
1570
|
+
private api;
|
|
1571
|
+
private onUpdateCallback;
|
|
1508
1572
|
/** @private */
|
|
1509
|
-
constructor(api: SmarticoAPI)
|
|
1573
|
+
constructor(api: SmarticoAPI);
|
|
1510
1574
|
/** Returns information about current user
|
|
1511
1575
|
* Example usage:
|
|
1512
1576
|
* ```
|
|
@@ -1515,7 +1579,7 @@ declare class WSAPI {
|
|
|
1515
1579
|
* });
|
|
1516
1580
|
* ```
|
|
1517
1581
|
* */
|
|
1518
|
-
getUserProfile(): TUserProfile
|
|
1582
|
+
getUserProfile(): TUserProfile;
|
|
1519
1583
|
/** Check if user belongs to specific segments
|
|
1520
1584
|
* Example usage:
|
|
1521
1585
|
* ```
|
|
@@ -1524,7 +1588,7 @@ declare class WSAPI {
|
|
|
1524
1588
|
* });
|
|
1525
1589
|
* ```
|
|
1526
1590
|
*/
|
|
1527
|
-
checkSegmentMatch(segment_id: number): Promise<boolean
|
|
1591
|
+
checkSegmentMatch(segment_id: number): Promise<boolean>;
|
|
1528
1592
|
/** Check if user belongs to specific list of segments
|
|
1529
1593
|
* Example usage:
|
|
1530
1594
|
* ```
|
|
@@ -1533,7 +1597,7 @@ declare class WSAPI {
|
|
|
1533
1597
|
* });
|
|
1534
1598
|
* ```
|
|
1535
1599
|
*/
|
|
1536
|
-
checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]
|
|
1600
|
+
checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]>;
|
|
1537
1601
|
/** Returns all the levels available the current user
|
|
1538
1602
|
* Example usage:
|
|
1539
1603
|
* ```
|
|
@@ -1542,7 +1606,7 @@ declare class WSAPI {
|
|
|
1542
1606
|
* });
|
|
1543
1607
|
* ```
|
|
1544
1608
|
*/
|
|
1545
|
-
getLevels(): Promise<TLevel[]
|
|
1609
|
+
getLevels(): Promise<TLevel[]>;
|
|
1546
1610
|
/** Returns all the missions available the current user.
|
|
1547
1611
|
* The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
1548
1612
|
* Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
@@ -1556,9 +1620,11 @@ declare class WSAPI {
|
|
|
1556
1620
|
/**
|
|
1557
1621
|
* @param params
|
|
1558
1622
|
*/
|
|
1559
|
-
getMissions({ onUpdate }?: { onUpdate?: (data: TMissionOrBadge[]) => void }): Promise<TMissionOrBadge[]
|
|
1623
|
+
getMissions({ onUpdate }?: { onUpdate?: (data: TMissionOrBadge[]) => void }): Promise<TMissionOrBadge[]>;
|
|
1560
1624
|
/** Returns all the badges available the current user */
|
|
1561
|
-
getBadges(): Promise<TMissionOrBadge[]
|
|
1625
|
+
getBadges(): Promise<TMissionOrBadge[]>;
|
|
1626
|
+
/** Returns all the badges available the current user */
|
|
1627
|
+
getBonuses(): Promise<TBonus[]>;
|
|
1562
1628
|
/**
|
|
1563
1629
|
* Returns the extra counters for the current user level.
|
|
1564
1630
|
* These are counters that are configured for each Smartico client separatly by request.
|
|
@@ -1570,7 +1636,7 @@ declare class WSAPI {
|
|
|
1570
1636
|
* });
|
|
1571
1637
|
* ```
|
|
1572
1638
|
*/
|
|
1573
|
-
getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT
|
|
1639
|
+
getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
|
|
1574
1640
|
/** Returns all the store items available the current user
|
|
1575
1641
|
* Example usage:
|
|
1576
1642
|
* ```
|
|
@@ -1578,7 +1644,7 @@ declare class WSAPI {
|
|
|
1578
1644
|
* console.log(result);
|
|
1579
1645
|
* });
|
|
1580
1646
|
*/
|
|
1581
|
-
getStoreItems(): Promise<TStoreItem[]
|
|
1647
|
+
getStoreItems(): Promise<TStoreItem[]>;
|
|
1582
1648
|
/** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
|
|
1583
1649
|
* Example usage:
|
|
1584
1650
|
* ```
|
|
@@ -1586,9 +1652,9 @@ declare class WSAPI {
|
|
|
1586
1652
|
* console.log(result);
|
|
1587
1653
|
* });
|
|
1588
1654
|
*/
|
|
1589
|
-
buyStoreItem(item_id: number): Promise<TBuyStoreItemResult
|
|
1655
|
+
buyStoreItem(item_id: number): Promise<TBuyStoreItemResult>;
|
|
1590
1656
|
/** Returns store categories */
|
|
1591
|
-
getStoreCategories(): Promise<TStoreCategory[]
|
|
1657
|
+
getStoreCategories(): Promise<TStoreCategory[]>;
|
|
1592
1658
|
/** Returns store purchased items based on the provided parameters. "From" and "to" indicate the range of items to be fetched.
|
|
1593
1659
|
* The maximum number of messages per request is limited to 20.
|
|
1594
1660
|
* You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
|
|
@@ -1597,9 +1663,17 @@ declare class WSAPI {
|
|
|
1597
1663
|
/**
|
|
1598
1664
|
* @param params
|
|
1599
1665
|
*/
|
|
1600
|
-
storeGetPurchasedItems({
|
|
1666
|
+
storeGetPurchasedItems({
|
|
1667
|
+
from,
|
|
1668
|
+
to,
|
|
1669
|
+
onUpdate,
|
|
1670
|
+
}?: {
|
|
1671
|
+
from?: number;
|
|
1672
|
+
to?: number;
|
|
1673
|
+
onUpdate?: (data: TStoreItem[]) => void;
|
|
1674
|
+
}): Promise<TStoreItem[]>;
|
|
1601
1675
|
/** Returns missions & badges categories */
|
|
1602
|
-
getAchCategories(): Promise<TAchCategory[]
|
|
1676
|
+
getAchCategories(): Promise<TAchCategory[]>;
|
|
1603
1677
|
/** Returns the list of mini-games available for user
|
|
1604
1678
|
* The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1605
1679
|
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback. */
|
|
@@ -1607,28 +1681,28 @@ declare class WSAPI {
|
|
|
1607
1681
|
/**
|
|
1608
1682
|
* @param params
|
|
1609
1683
|
*/
|
|
1610
|
-
getMiniGames({ onUpdate }?: { onUpdate?: (data: TMiniGameTemplate[]) => void }): Promise<TMiniGameTemplate[]
|
|
1684
|
+
getMiniGames({ onUpdate }?: { onUpdate?: (data: TMiniGameTemplate[]) => void }): Promise<TMiniGameTemplate[]>;
|
|
1611
1685
|
/** Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code */
|
|
1612
|
-
playMiniGame(template_id: number): Promise<TMiniGamePlayResult
|
|
1686
|
+
playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
|
|
1613
1687
|
/** Requests an opt-in for the specified mission_id. Returns the err_code. */
|
|
1614
|
-
requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult
|
|
1688
|
+
requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult>;
|
|
1615
1689
|
/** Request for claim reward for the specified mission id. Returns the err_code. */
|
|
1616
|
-
requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult
|
|
1690
|
+
requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult>;
|
|
1617
1691
|
/** Returns all the active instances of tournaments
|
|
1618
1692
|
* The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1619
1693
|
* The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.*/
|
|
1620
1694
|
/**
|
|
1621
1695
|
* @param params
|
|
1622
1696
|
*/
|
|
1623
|
-
getTournamentsList({ onUpdate }?: { onUpdate?: (data: TTournament[]) => void }): Promise<TTournament[]
|
|
1697
|
+
getTournamentsList({ onUpdate }?: { onUpdate?: (data: TTournament[]) => void }): Promise<TTournament[]>;
|
|
1624
1698
|
/** Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players */
|
|
1625
|
-
getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed
|
|
1699
|
+
getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed>;
|
|
1626
1700
|
/** Requests registration for the specified tournament instance. Returns the err_code. */
|
|
1627
|
-
registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult
|
|
1701
|
+
registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult>;
|
|
1628
1702
|
/** Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
|
|
1629
1703
|
For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
|
|
1630
1704
|
*/
|
|
1631
|
-
getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT
|
|
1705
|
+
getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT>;
|
|
1632
1706
|
/** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
1633
1707
|
* The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
1634
1708
|
* You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
@@ -1639,140 +1713,177 @@ declare class WSAPI {
|
|
|
1639
1713
|
/**
|
|
1640
1714
|
* @param params
|
|
1641
1715
|
*/
|
|
1642
|
-
getInboxMessages({
|
|
1716
|
+
getInboxMessages({
|
|
1717
|
+
from,
|
|
1718
|
+
to,
|
|
1719
|
+
onlyFavorite,
|
|
1720
|
+
onUpdate,
|
|
1721
|
+
}?: {
|
|
1722
|
+
from?: number;
|
|
1723
|
+
to?: number;
|
|
1724
|
+
onlyFavorite?: boolean;
|
|
1725
|
+
onUpdate?: (data: TInboxMessage[]) => void;
|
|
1726
|
+
}): Promise<TInboxMessage[]>;
|
|
1643
1727
|
/** Returns the message body of the specified message guid. */
|
|
1644
|
-
getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody
|
|
1728
|
+
getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody>;
|
|
1645
1729
|
/** Requests to mark inbox message with specified guid as read */
|
|
1646
|
-
markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction
|
|
1730
|
+
markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction>;
|
|
1647
1731
|
/** Requests to mark all inbox messages as read */
|
|
1648
|
-
markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction
|
|
1732
|
+
markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction>;
|
|
1649
1733
|
/** Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove. */
|
|
1650
|
-
markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction
|
|
1734
|
+
markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction>;
|
|
1651
1735
|
/** Requests to delete inbox message */
|
|
1652
|
-
deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction
|
|
1736
|
+
deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction>;
|
|
1653
1737
|
/** Requests to delete all inbox messages */
|
|
1654
|
-
deleteAllInboxMessages(): Promise<InboxMarkMessageAction
|
|
1738
|
+
deleteAllInboxMessages(): Promise<InboxMarkMessageAction>;
|
|
1655
1739
|
/** Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office. */
|
|
1656
|
-
getTranslations(lang_code: string): Promise<TGetTranslations
|
|
1657
|
-
private updateOnSpin
|
|
1658
|
-
private updateOnAddSpin
|
|
1659
|
-
private updateOnPrizeWin
|
|
1660
|
-
private updateMissionsOnOptIn
|
|
1661
|
-
private updateTournamentsOnRegistration
|
|
1662
|
-
private updateInboxMessages
|
|
1663
|
-
private updateEntity
|
|
1740
|
+
getTranslations(lang_code: string): Promise<TGetTranslations>;
|
|
1741
|
+
private updateOnSpin;
|
|
1742
|
+
private updateOnAddSpin;
|
|
1743
|
+
private updateOnPrizeWin;
|
|
1744
|
+
private updateMissionsOnOptIn;
|
|
1745
|
+
private updateTournamentsOnRegistration;
|
|
1746
|
+
private updateInboxMessages;
|
|
1747
|
+
private updateEntity;
|
|
1664
1748
|
}
|
|
1665
1749
|
export interface GetAchievementsUserInfoResponse extends ProtocolResponse {
|
|
1666
|
-
level_counter_1?: number
|
|
1667
|
-
level_counter_2?: number
|
|
1750
|
+
level_counter_1?: number;
|
|
1751
|
+
level_counter_2?: number;
|
|
1668
1752
|
}
|
|
1669
1753
|
export interface Tracker {
|
|
1670
|
-
label_api_key: string
|
|
1671
|
-
userPublicProps: any
|
|
1672
|
-
on: (callBackKey: ClassId, func: (data: any) => void) => void
|
|
1673
|
-
getLabelSetting: (key: PublicLabelSettings$1) => any
|
|
1754
|
+
label_api_key: string;
|
|
1755
|
+
userPublicProps: any;
|
|
1756
|
+
on: (callBackKey: ClassId, func: (data: any) => void) => void;
|
|
1757
|
+
getLabelSetting: (key: PublicLabelSettings$1) => any;
|
|
1674
1758
|
}
|
|
1675
1759
|
export interface IOptions {
|
|
1676
|
-
logger?: ILogger
|
|
1677
|
-
logCIDs?: ClassId[]
|
|
1678
|
-
logHTTPTiming?: boolean
|
|
1679
|
-
tracker?: Tracker
|
|
1760
|
+
logger?: ILogger;
|
|
1761
|
+
logCIDs?: ClassId[];
|
|
1762
|
+
logHTTPTiming?: boolean;
|
|
1763
|
+
tracker?: Tracker;
|
|
1680
1764
|
}
|
|
1681
|
-
export type MessageSender = (message: any, publicApuUrl?: string, expectCID?: ClassId) => Promise<any
|
|
1765
|
+
export type MessageSender = (message: any, publicApuUrl?: string, expectCID?: ClassId) => Promise<any>;
|
|
1682
1766
|
declare class SmarticoAPI {
|
|
1683
|
-
private label_api_key
|
|
1684
|
-
private brand_api_key
|
|
1685
|
-
private messageSender
|
|
1686
|
-
private publicUrl
|
|
1687
|
-
private wsUrl
|
|
1688
|
-
private inboxCdnUrl
|
|
1689
|
-
private partnerUrl
|
|
1690
|
-
avatarDomain: string
|
|
1691
|
-
private logger
|
|
1692
|
-
private logCIDs
|
|
1693
|
-
private logHTTPTiming
|
|
1694
|
-
tracker?: Tracker
|
|
1695
|
-
constructor(label_api_key: string, brand_api_key: string, messageSender: MessageSender, options?: IOptions)
|
|
1696
|
-
static getEnvDnsSuffix(label_api_key: string): string
|
|
1697
|
-
static getEnvId(label_api_key: string): number
|
|
1698
|
-
static getCleanLabelApiKey(label_api_key: string): string
|
|
1699
|
-
static getPublicUrl(label_api_key: string): string
|
|
1700
|
-
static getPublicWsUrl(label_api_key: string): string
|
|
1701
|
-
static getAvatarUrl(label_api_key: string): string
|
|
1702
|
-
private send
|
|
1703
|
-
private buildMessage
|
|
1704
|
-
coreReportCustomEvent(user_ext_id: string, eventType: string, payload?: any): Promise<any
|
|
1705
|
-
coreGetTranslations(
|
|
1706
|
-
|
|
1707
|
-
|
|
1767
|
+
private label_api_key;
|
|
1768
|
+
private brand_api_key;
|
|
1769
|
+
private messageSender;
|
|
1770
|
+
private publicUrl;
|
|
1771
|
+
private wsUrl;
|
|
1772
|
+
private inboxCdnUrl;
|
|
1773
|
+
private partnerUrl;
|
|
1774
|
+
avatarDomain: string;
|
|
1775
|
+
private logger;
|
|
1776
|
+
private logCIDs;
|
|
1777
|
+
private logHTTPTiming;
|
|
1778
|
+
tracker?: Tracker;
|
|
1779
|
+
constructor(label_api_key: string, brand_api_key: string, messageSender: MessageSender, options?: IOptions);
|
|
1780
|
+
static getEnvDnsSuffix(label_api_key: string): string;
|
|
1781
|
+
static getEnvId(label_api_key: string): number;
|
|
1782
|
+
static getCleanLabelApiKey(label_api_key: string): string;
|
|
1783
|
+
static getPublicUrl(label_api_key: string): string;
|
|
1784
|
+
static getPublicWsUrl(label_api_key: string): string;
|
|
1785
|
+
static getAvatarUrl(label_api_key: string): string;
|
|
1786
|
+
private send;
|
|
1787
|
+
private buildMessage;
|
|
1788
|
+
coreReportCustomEvent(user_ext_id: string, eventType: string, payload?: any): Promise<any>;
|
|
1789
|
+
coreGetTranslations(
|
|
1790
|
+
user_ext_id: string,
|
|
1791
|
+
lang_code: string,
|
|
1792
|
+
areas: TranslationArea[],
|
|
1793
|
+
cacheSec?: number,
|
|
1794
|
+
): Promise<GetTranslationsResponse>;
|
|
1795
|
+
coreIdentifyLabel(user_ext_id: string, cacheSec?: number): Promise<GetLabelInfoResponse>;
|
|
1796
|
+
coreIdentifyUser(user_ext_id: string): Promise<ResponseIdentify>;
|
|
1708
1797
|
coreChangeUsername(
|
|
1709
1798
|
user_ext_id: string,
|
|
1710
1799
|
public_username_custom: string,
|
|
1711
1800
|
): Promise<{
|
|
1712
|
-
public_username_custom: string
|
|
1713
|
-
}
|
|
1714
|
-
coreCheckSegments(user_ext_id: string, segment_id: number[]): Promise<TSegmentCheckResult[]
|
|
1715
|
-
sawGetTemplates(user_ext_id: string, lang?: string, is_visitor_mode?: boolean): Promise<SAWGetTemplatesResponse
|
|
1716
|
-
sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]
|
|
1717
|
-
doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse
|
|
1718
|
-
sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise<SAWDoSpinResponse
|
|
1719
|
-
missionOptIn(user_ext_id: string, mission_id: number): Promise<AchievementOptinResponse
|
|
1720
|
-
missionClaimPrize(user_ext_id: string, mission_id: number, ach_completed_id: number): Promise<AchClaimPrizeResponse
|
|
1721
|
-
registerInTournament(user_ext_id: string, tournamentInstanceId: number): Promise<TournamentRegisterResponse
|
|
1722
|
-
buyStoreItem(user_ext_id: string, itemId: number): Promise<BuyStoreItemResponse
|
|
1723
|
-
inboxGetMessages(user_ext_id: string, limit?: number, offset?: number): Promise<GetInboxMessagesResponse
|
|
1724
|
-
storeGetItems(user_ext_id: string): Promise<GetStoreItemsResponse
|
|
1725
|
-
storeGetItemsT(user_ext_id: string): Promise<TStoreItem[]
|
|
1726
|
-
storeGetCategories(user_ext_id: string): Promise<GetCategoriesStoreResponse
|
|
1727
|
-
storeGetCategoriesT(user_ext_id: string): Promise<TStoreCategory[]
|
|
1728
|
-
storeGetPurchasedItems(user_ext_id: string, limit?: number, offset?: number): Promise<GetStoreHistoryResponse
|
|
1729
|
-
storeGetPurchasedItemsT(user_ext_id: string, from?: number, to?: number): Promise<TStoreItem[]
|
|
1730
|
-
missionsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse
|
|
1731
|
-
missionsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]
|
|
1732
|
-
getUserGamificationInfo(user_ext_id: string): Promise<GetAchievementsUserInfoResponse
|
|
1733
|
-
getUserGamificationInfoT(user_ext_id: string): Promise<UserLevelExtraCountersT
|
|
1734
|
-
achGetCategories(user_ext_id: string): Promise<GetAchCategoriesResponse
|
|
1735
|
-
achGetCategoriesT(user_ext_id: string): Promise<TAchCategory[]
|
|
1736
|
-
badgetsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse
|
|
1737
|
-
badgetsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]
|
|
1738
|
-
tournamentsGetLobby(user_ext_id: string): Promise<GetTournamentsResponse
|
|
1739
|
-
tournamentsGetLobbyT(user_ext_id: string): Promise<TTournament[]
|
|
1740
|
-
tournamentsGetInfo(user_ext_id: string, tournamentInstanceId: number): Promise<GetTournamentInfoResponse
|
|
1741
|
-
tournamentsGetInfoT(user_ext_id: string, tournamentInstanceId: number): Promise<TTournamentDetailed
|
|
1742
|
-
leaderboardGet(
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1801
|
+
public_username_custom: string;
|
|
1802
|
+
}>;
|
|
1803
|
+
coreCheckSegments(user_ext_id: string, segment_id: number[]): Promise<TSegmentCheckResult[]>;
|
|
1804
|
+
sawGetTemplates(user_ext_id: string, lang?: string, is_visitor_mode?: boolean): Promise<SAWGetTemplatesResponse>;
|
|
1805
|
+
sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]>;
|
|
1806
|
+
doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse>;
|
|
1807
|
+
sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise<SAWDoSpinResponse>;
|
|
1808
|
+
missionOptIn(user_ext_id: string, mission_id: number): Promise<AchievementOptinResponse>;
|
|
1809
|
+
missionClaimPrize(user_ext_id: string, mission_id: number, ach_completed_id: number): Promise<AchClaimPrizeResponse>;
|
|
1810
|
+
registerInTournament(user_ext_id: string, tournamentInstanceId: number): Promise<TournamentRegisterResponse>;
|
|
1811
|
+
buyStoreItem(user_ext_id: string, itemId: number): Promise<BuyStoreItemResponse>;
|
|
1812
|
+
inboxGetMessages(user_ext_id: string, limit?: number, offset?: number): Promise<GetInboxMessagesResponse>;
|
|
1813
|
+
storeGetItems(user_ext_id: string): Promise<GetStoreItemsResponse>;
|
|
1814
|
+
storeGetItemsT(user_ext_id: string): Promise<TStoreItem[]>;
|
|
1815
|
+
storeGetCategories(user_ext_id: string): Promise<GetCategoriesStoreResponse>;
|
|
1816
|
+
storeGetCategoriesT(user_ext_id: string): Promise<TStoreCategory[]>;
|
|
1817
|
+
storeGetPurchasedItems(user_ext_id: string, limit?: number, offset?: number): Promise<GetStoreHistoryResponse>;
|
|
1818
|
+
storeGetPurchasedItemsT(user_ext_id: string, from?: number, to?: number): Promise<TStoreItem[]>;
|
|
1819
|
+
missionsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
|
|
1820
|
+
missionsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
|
|
1821
|
+
getUserGamificationInfo(user_ext_id: string): Promise<GetAchievementsUserInfoResponse>;
|
|
1822
|
+
getUserGamificationInfoT(user_ext_id: string): Promise<UserLevelExtraCountersT>;
|
|
1823
|
+
achGetCategories(user_ext_id: string): Promise<GetAchCategoriesResponse>;
|
|
1824
|
+
achGetCategoriesT(user_ext_id: string): Promise<TAchCategory[]>;
|
|
1825
|
+
badgetsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
|
|
1826
|
+
badgetsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
|
|
1827
|
+
tournamentsGetLobby(user_ext_id: string): Promise<GetTournamentsResponse>;
|
|
1828
|
+
tournamentsGetLobbyT(user_ext_id: string): Promise<TTournament[]>;
|
|
1829
|
+
tournamentsGetInfo(user_ext_id: string, tournamentInstanceId: number): Promise<GetTournamentInfoResponse>;
|
|
1830
|
+
tournamentsGetInfoT(user_ext_id: string, tournamentInstanceId: number): Promise<TTournamentDetailed>;
|
|
1831
|
+
leaderboardGet(
|
|
1832
|
+
user_ext_id: string,
|
|
1833
|
+
period_type_id?: LeaderBoardPeriodType,
|
|
1834
|
+
prevPeriod?: boolean,
|
|
1835
|
+
): Promise<LeaderBoardDetails>;
|
|
1836
|
+
leaderboardsGetT(
|
|
1837
|
+
user_ext_id: string,
|
|
1838
|
+
period_type_id?: LeaderBoardPeriodType,
|
|
1839
|
+
prevPeriod?: boolean,
|
|
1840
|
+
): Promise<LeaderBoardDetailsT>;
|
|
1841
|
+
levelsGet(user_ext_id: string): Promise<GetLevelMapResponse>;
|
|
1842
|
+
levelsGetT(user_ext_id: string): Promise<TLevel[]>;
|
|
1843
|
+
getTranslationsT(
|
|
1844
|
+
user_ext_id: string,
|
|
1845
|
+
lang_code: string,
|
|
1846
|
+
areas: TranslationArea[],
|
|
1847
|
+
cacheSec?: number,
|
|
1848
|
+
): Promise<GetTranslationsResponse>;
|
|
1849
|
+
getInboxMessages(
|
|
1850
|
+
user_ext_id: string,
|
|
1851
|
+
limit: number,
|
|
1852
|
+
offset: number,
|
|
1853
|
+
starred_only: boolean,
|
|
1854
|
+
): Promise<GetInboxMessagesResponse>;
|
|
1855
|
+
getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean): Promise<TInboxMessage[]>;
|
|
1856
|
+
getInboxMessageBody(messageGuid: string): Promise<InboxMessageBody>;
|
|
1857
|
+
getInboxMessageBodyT(messageGuid: string): Promise<TInboxMessageBody>;
|
|
1858
|
+
markInboxMessageRead(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageReadResponse>;
|
|
1859
|
+
markAllInboxMessageRead(user_ext_id: string): Promise<MarkInboxMessageReadResponse>;
|
|
1860
|
+
markUnmarkInboxMessageAsFavorite(
|
|
1861
|
+
user_ext_id: string,
|
|
1862
|
+
messageGuid: string,
|
|
1863
|
+
mark: boolean,
|
|
1864
|
+
): Promise<MarkInboxMessageStarredResponse>;
|
|
1865
|
+
deleteInboxMessage(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageDeletedResponse>;
|
|
1866
|
+
deleteAllInboxMessages(user_ext_id: string): Promise<MarkInboxMessageDeletedResponse>;
|
|
1867
|
+
getWSCalls(): WSAPI;
|
|
1757
1868
|
}
|
|
1758
1869
|
export interface SmarticoClearParams {
|
|
1759
|
-
keepCallBacks: boolean
|
|
1870
|
+
keepCallBacks: boolean;
|
|
1760
1871
|
}
|
|
1761
1872
|
export interface RequestBase {
|
|
1762
|
-
cid?: number
|
|
1763
|
-
ts?: number
|
|
1764
|
-
uuid?: string
|
|
1873
|
+
cid?: number;
|
|
1874
|
+
ts?: number;
|
|
1875
|
+
uuid?: string;
|
|
1765
1876
|
}
|
|
1766
1877
|
export interface RequestClientEngagmentBase extends RequestBase {
|
|
1767
|
-
engagement_uid: string
|
|
1768
|
-
activityType: CJMActivityType
|
|
1878
|
+
engagement_uid: string;
|
|
1879
|
+
activityType: CJMActivityType;
|
|
1769
1880
|
}
|
|
1770
1881
|
export interface RequestClientEngagementAction extends RequestClientEngagmentBase {
|
|
1771
|
-
action?: string
|
|
1882
|
+
action?: string;
|
|
1772
1883
|
}
|
|
1773
1884
|
export interface RequestClientEngagementFailed extends RequestClientEngagmentBase {
|
|
1774
|
-
action?: string
|
|
1775
|
-
reason?: string
|
|
1885
|
+
action?: string;
|
|
1886
|
+
reason?: string;
|
|
1776
1887
|
}
|
|
1777
1888
|
declare enum EWidgetType {
|
|
1778
1889
|
Achievements2 = 'achievements2',
|
|
@@ -1835,100 +1946,105 @@ declare enum DpType {
|
|
|
1835
1946
|
Action = 'action',
|
|
1836
1947
|
}
|
|
1837
1948
|
export interface DeepLinkParams {
|
|
1838
|
-
[key: string]: string
|
|
1949
|
+
[key: string]: string;
|
|
1839
1950
|
}
|
|
1840
1951
|
export interface DeepLink {
|
|
1841
|
-
action: DpType
|
|
1842
|
-
params?: DeepLinkParams
|
|
1843
|
-
actionToReport?: string
|
|
1952
|
+
action: DpType;
|
|
1953
|
+
params?: DeepLinkParams;
|
|
1954
|
+
actionToReport?: string;
|
|
1844
1955
|
}
|
|
1845
1956
|
export interface IVisitorGameParams {
|
|
1846
|
-
template_id: number
|
|
1847
|
-
onBeforePlay: () => boolean
|
|
1848
|
-
onWin: (prize: SAWPrize) => void
|
|
1849
|
-
frame_id: string
|
|
1957
|
+
template_id: number;
|
|
1958
|
+
onBeforePlay: () => boolean;
|
|
1959
|
+
onWin: (prize: SAWPrize) => void;
|
|
1960
|
+
frame_id: string;
|
|
1850
1961
|
}
|
|
1851
1962
|
export interface IWidgetParams {
|
|
1852
|
-
iframe: string
|
|
1853
|
-
zoom: number
|
|
1854
|
-
height: 'auto' | string
|
|
1855
|
-
theme: string
|
|
1856
|
-
wuuid: string
|
|
1857
|
-
withBridge?: any
|
|
1858
|
-
noQuestionMark?: any
|
|
1859
|
-
inline?: boolean
|
|
1860
|
-
force_mobile?: boolean
|
|
1963
|
+
iframe: string;
|
|
1964
|
+
zoom: number;
|
|
1965
|
+
height: 'auto' | string;
|
|
1966
|
+
theme: string;
|
|
1967
|
+
wuuid: string;
|
|
1968
|
+
withBridge?: any;
|
|
1969
|
+
noQuestionMark?: any;
|
|
1970
|
+
inline?: boolean;
|
|
1971
|
+
force_mobile?: boolean;
|
|
1861
1972
|
}
|
|
1862
1973
|
declare enum ConnectionStatus {
|
|
1863
1974
|
OPEN = 0,
|
|
1864
1975
|
CLOSED = 1,
|
|
1865
1976
|
}
|
|
1866
1977
|
export interface TrackerInterface {
|
|
1867
|
-
log?: (message: string) => void
|
|
1868
|
-
clear?: (params: SmarticoClearParams) => void
|
|
1869
|
-
logout?: (payload: any) => void
|
|
1870
|
-
reportEngagmentAction: (message: RequestClientEngagementAction) => void
|
|
1871
|
-
reportEngagmentFail: (message: RequestClientEngagementFailed) => void
|
|
1872
|
-
reportEngagmentImpression: (message: RequestClientEngagementFailed) => void
|
|
1873
|
-
requestPushPermissions: () => void
|
|
1874
|
-
executeNativeDp: (dp: string) => void
|
|
1875
|
-
executeGfDp: (dp: DeepLink) => void
|
|
1876
|
-
executeManualDP?: (deepLink: string, engagement_uid?: string, activityType?: CJMActivityType) => void
|
|
1877
|
-
promoMessageClosed: () => void
|
|
1878
|
-
connectionStatus?: ConnectionStatus
|
|
1879
|
-
suspendPopups?: (flag: boolean) => void
|
|
1880
|
-
suspendInbox?: (flag: boolean) => void
|
|
1881
|
-
registerNativePushToken?: (token: string, platform: PushClientPlatform, app_package_id: any) => void
|
|
1882
|
-
registerHandler?: (cid: ClassId, handler: (o: any) => void) => void
|
|
1883
|
-
triggerExternalCallBack?: (callBackKey: EXTERNAL_CALLBACK_KEY | number, ...args: any[]) => void
|
|
1884
|
-
getExtUserId?: () => string
|
|
1885
|
-
bSuspendPopups?: boolean
|
|
1886
|
-
identify?: (ext_user_id: string, hash: string, payload: any, visitor_id: string) => void
|
|
1887
|
-
changeLanguage?: (lang: string) => void
|
|
1888
|
-
getPublicProps?: () => PublicProperties
|
|
1889
|
-
getLabelSetting?: (key: PublicLabelSettings) => any
|
|
1890
|
-
getParams?: () => typeof TrackerParams
|
|
1891
|
-
setNickname?: (nickname: string) => void
|
|
1892
|
-
setAvatar?: (avatar_id: string) => void
|
|
1893
|
-
setLoginPayload?: (payload: any) => void
|
|
1894
|
-
sendServerError?: (message: string) => void
|
|
1895
|
-
sendServerDebug?: (message: string) => void
|
|
1896
|
-
sendAnalytics?: (
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1978
|
+
log?: (message: string) => void;
|
|
1979
|
+
clear?: (params: SmarticoClearParams) => void;
|
|
1980
|
+
logout?: (payload: any) => void;
|
|
1981
|
+
reportEngagmentAction: (message: RequestClientEngagementAction) => void;
|
|
1982
|
+
reportEngagmentFail: (message: RequestClientEngagementFailed) => void;
|
|
1983
|
+
reportEngagmentImpression: (message: RequestClientEngagementFailed) => void;
|
|
1984
|
+
requestPushPermissions: () => void;
|
|
1985
|
+
executeNativeDp: (dp: string) => void;
|
|
1986
|
+
executeGfDp: (dp: DeepLink) => void;
|
|
1987
|
+
executeManualDP?: (deepLink: string, engagement_uid?: string, activityType?: CJMActivityType) => void;
|
|
1988
|
+
promoMessageClosed: () => void;
|
|
1989
|
+
connectionStatus?: ConnectionStatus;
|
|
1990
|
+
suspendPopups?: (flag: boolean) => void;
|
|
1991
|
+
suspendInbox?: (flag: boolean) => void;
|
|
1992
|
+
registerNativePushToken?: (token: string, platform: PushClientPlatform, app_package_id: any) => void;
|
|
1993
|
+
registerHandler?: (cid: ClassId, handler: (o: any) => void) => void;
|
|
1994
|
+
triggerExternalCallBack?: (callBackKey: EXTERNAL_CALLBACK_KEY | number, ...args: any[]) => void;
|
|
1995
|
+
getExtUserId?: () => string;
|
|
1996
|
+
bSuspendPopups?: boolean;
|
|
1997
|
+
identify?: (ext_user_id: string, hash: string, payload: any, visitor_id: string) => void;
|
|
1998
|
+
changeLanguage?: (lang: string) => void;
|
|
1999
|
+
getPublicProps?: () => PublicProperties;
|
|
2000
|
+
getLabelSetting?: (key: PublicLabelSettings) => any;
|
|
2001
|
+
getParams?: () => typeof TrackerParams;
|
|
2002
|
+
setNickname?: (nickname: string) => void;
|
|
2003
|
+
setAvatar?: (avatar_id: string) => void;
|
|
2004
|
+
setLoginPayload?: (payload: any) => void;
|
|
2005
|
+
sendServerError?: (message: string) => void;
|
|
2006
|
+
sendServerDebug?: (message: string) => void;
|
|
2007
|
+
sendAnalytics?: (
|
|
2008
|
+
activity_id: ClientActivityRequestId,
|
|
2009
|
+
type: 'view' | 'click' | 'other',
|
|
2010
|
+
view_time_sec?: number,
|
|
2011
|
+
more?: any,
|
|
2012
|
+
) => void;
|
|
2013
|
+
sendRow: (cid: ClassId, toIdentified: boolean, data?: any) => string;
|
|
2014
|
+
miniGame?: (saw_template_id: string, params: IWidgetParams) => void;
|
|
2015
|
+
showWidget?: (widgetType: EWidgetType, params: IWidgetParams) => void;
|
|
2016
|
+
showVisitorGame?: (params: IVisitorGameParams) => void;
|
|
2017
|
+
convertVisitorGame?: (visitor_win_uuid: string) => void;
|
|
2018
|
+
isIdenfitied?: () => boolean;
|
|
1903
2019
|
}
|
|
1904
2020
|
declare const TrackerParams: {
|
|
1905
|
-
brand_key: any
|
|
1906
|
-
debug: boolean
|
|
1907
|
-
server: any
|
|
1908
|
-
simulation_mode: boolean
|
|
1909
|
-
gamification_wrapper_mode: boolean
|
|
1910
|
-
generate_visit: boolean
|
|
1911
|
-
lang: string
|
|
1912
|
-
}
|
|
1913
|
-
declare const CallBackDefaultParams: {}
|
|
2021
|
+
brand_key: any;
|
|
2022
|
+
debug: boolean;
|
|
2023
|
+
server: any;
|
|
2024
|
+
simulation_mode: boolean;
|
|
2025
|
+
gamification_wrapper_mode: boolean;
|
|
2026
|
+
generate_visit: boolean;
|
|
2027
|
+
lang: string;
|
|
2028
|
+
};
|
|
2029
|
+
declare const CallBackDefaultParams: {};
|
|
1914
2030
|
declare class GamificationEngine {
|
|
1915
|
-
private static _instance
|
|
1916
|
-
private readonly _tracker
|
|
1917
|
-
private readonly _socketPromises
|
|
1918
|
-
private readonly _socketListeners
|
|
1919
|
-
static instance(tracker: TrackerInterface): GamificationEngine
|
|
1920
|
-
private constructor()
|
|
1921
|
-
doGetLevels: () => Promise<any
|
|
1922
|
-
doGetMissions: () => Promise<any
|
|
1923
|
-
doOptinMission: (achievementId: number) => Promise<any
|
|
1924
|
-
doClaimRewardMission: (achievementId: number) => Promise<any
|
|
1925
|
-
doGetTournaments: () => Promise<any
|
|
1926
|
-
doGetTournamentLobby: (tournamentInstanceId: number) => Promise<any
|
|
1927
|
-
doTournamentRegister: (tournamentInstanceId: number) => Promise<any
|
|
1928
|
-
private socketRequest
|
|
1929
|
-
private socketResponse
|
|
1930
|
-
private listen
|
|
1931
|
-
private notify
|
|
2031
|
+
private static _instance;
|
|
2032
|
+
private readonly _tracker;
|
|
2033
|
+
private readonly _socketPromises;
|
|
2034
|
+
private readonly _socketListeners;
|
|
2035
|
+
static instance(tracker: TrackerInterface): GamificationEngine;
|
|
2036
|
+
private constructor();
|
|
2037
|
+
doGetLevels: () => Promise<any>;
|
|
2038
|
+
doGetMissions: () => Promise<any>;
|
|
2039
|
+
doOptinMission: (achievementId: number) => Promise<any>;
|
|
2040
|
+
doClaimRewardMission: (achievementId: number) => Promise<any>;
|
|
2041
|
+
doGetTournaments: () => Promise<any>;
|
|
2042
|
+
doGetTournamentLobby: (tournamentInstanceId: number) => Promise<any>;
|
|
2043
|
+
doTournamentRegister: (tournamentInstanceId: number) => Promise<any>;
|
|
2044
|
+
private socketRequest;
|
|
2045
|
+
private socketResponse;
|
|
2046
|
+
private listen;
|
|
2047
|
+
private notify;
|
|
1932
2048
|
}
|
|
1933
2049
|
declare enum ClientEventTypes {
|
|
1934
2050
|
client_action = 'client_action',
|
|
@@ -1940,64 +2056,64 @@ declare enum ClientEventTypes {
|
|
|
1940
2056
|
gf_avatar_changed = 'gf_avatar_changed',
|
|
1941
2057
|
}
|
|
1942
2058
|
declare class Smartico {
|
|
1943
|
-
private static tracker
|
|
1944
|
-
private static trackerShadow
|
|
1945
|
-
private static initParams
|
|
1946
|
-
private static initLabelApiKey
|
|
1947
|
-
private static shadowQueue
|
|
1948
|
-
private static shadowInterval
|
|
1949
|
-
static gf: GamificationEngine
|
|
1950
|
-
static api: WSAPI
|
|
1951
|
-
private static readonly gf_api_promises
|
|
1952
|
-
private static readonly gf_api_handlers
|
|
1953
|
-
constructor()
|
|
1954
|
-
static startIntegrationWithIframe(): void
|
|
1955
|
-
private static checkInit
|
|
1956
|
-
private static checkSuccessfullyIdentify
|
|
1957
|
-
private static initShadowLabel
|
|
1958
|
-
private static onlineTrackerInterval
|
|
1959
|
-
private static onlineTrackerLastUserId
|
|
1960
|
-
private static onlineTrackerLastLanguage
|
|
1961
|
-
private static getUserID
|
|
1962
|
-
private static getUserHash
|
|
1963
|
-
private static getLanguage
|
|
1964
|
-
private static getVisitorGameWinUUID
|
|
1965
|
-
private static getVisitorID
|
|
1966
|
-
private static onlinetrackerByInterval
|
|
1967
|
-
static init(label_api_key: string, params: typeof TrackerParams): void
|
|
1968
|
-
static initVisitorMode(label_api_key: string, params: typeof TrackerParams): void
|
|
1969
|
-
static clear(params?: SmarticoClearParams): void
|
|
1970
|
-
static getPublicProps(): PublicProperties
|
|
1971
|
-
static sendServerError(message: string): void
|
|
1972
|
-
static sendServerDebug(message: string): void
|
|
1973
|
-
static requestPushPermissions(): void
|
|
1974
|
-
static registerNativePushToken(token: string, platform?: PushClientPlatform, app_package_id?: string): void
|
|
1975
|
-
static identify(ext_user_id: string, hash: string, payload: any): Promise<void
|
|
1976
|
-
static online(ext_user_id: string, language: string, user_hash: string): Promise<void
|
|
1977
|
-
static login(language?: string, payload?: any): void
|
|
1978
|
-
static logout(payload?: any): void
|
|
1979
|
-
static changeLanguage(language: string): void
|
|
1980
|
-
static event(eventType: ClientEventTypes, payload?: any): void
|
|
1981
|
-
static sendRow(cid: ClassId, payload?: any): void
|
|
1982
|
-
static action(actionValue: any): void
|
|
1983
|
-
static setLoginEntry(core_last_login_entry: string): void
|
|
1984
|
-
static setAvatar(avatar_id: string): void
|
|
1985
|
-
static setNickname(nickname: string): void
|
|
1986
|
-
static dp(deepLink: string): void
|
|
1987
|
-
static miniGame(saw_template_id: string, params: IWidgetParams): void
|
|
1988
|
-
static showWidget(widgetType: EWidgetType, params: IWidgetParams): void
|
|
1989
|
-
static sendAnalytics(activity_id: ClientActivityRequestId, view_time_sec?: number): void
|
|
1990
|
-
static on(callBackKey: EXTERNAL_CALLBACK_KEY, f: null | (() => void), params?: typeof CallBackDefaultParams): void
|
|
1991
|
-
static suspendPopups(flag: boolean): void
|
|
1992
|
-
static suspendInbox(flag: boolean): void
|
|
1993
|
-
static parseUrl(): any
|
|
1994
|
-
static parseUrlHash(): any
|
|
1995
|
-
static isMobile(): boolean
|
|
1996
|
-
static showVisitorGame(params: IVisitorGameParams): void
|
|
1997
|
-
static convertVisitorGame(visitor_win_uuid: string): void
|
|
1998
|
-
private static customScripts
|
|
2059
|
+
private static tracker;
|
|
2060
|
+
private static trackerShadow;
|
|
2061
|
+
private static initParams;
|
|
2062
|
+
private static initLabelApiKey;
|
|
2063
|
+
private static shadowQueue;
|
|
2064
|
+
private static shadowInterval;
|
|
2065
|
+
static gf: GamificationEngine;
|
|
2066
|
+
static api: WSAPI;
|
|
2067
|
+
private static readonly gf_api_promises;
|
|
2068
|
+
private static readonly gf_api_handlers;
|
|
2069
|
+
constructor();
|
|
2070
|
+
static startIntegrationWithIframe(): void;
|
|
2071
|
+
private static checkInit;
|
|
2072
|
+
private static checkSuccessfullyIdentify;
|
|
2073
|
+
private static initShadowLabel;
|
|
2074
|
+
private static onlineTrackerInterval;
|
|
2075
|
+
private static onlineTrackerLastUserId;
|
|
2076
|
+
private static onlineTrackerLastLanguage;
|
|
2077
|
+
private static getUserID;
|
|
2078
|
+
private static getUserHash;
|
|
2079
|
+
private static getLanguage;
|
|
2080
|
+
private static getVisitorGameWinUUID;
|
|
2081
|
+
private static getVisitorID;
|
|
2082
|
+
private static onlinetrackerByInterval;
|
|
2083
|
+
static init(label_api_key: string, params: typeof TrackerParams): void;
|
|
2084
|
+
static initVisitorMode(label_api_key: string, params: typeof TrackerParams): void;
|
|
2085
|
+
static clear(params?: SmarticoClearParams): void;
|
|
2086
|
+
static getPublicProps(): PublicProperties;
|
|
2087
|
+
static sendServerError(message: string): void;
|
|
2088
|
+
static sendServerDebug(message: string): void;
|
|
2089
|
+
static requestPushPermissions(): void;
|
|
2090
|
+
static registerNativePushToken(token: string, platform?: PushClientPlatform, app_package_id?: string): void;
|
|
2091
|
+
static identify(ext_user_id: string, hash: string, payload: any): Promise<void>;
|
|
2092
|
+
static online(ext_user_id: string, language: string, user_hash: string): Promise<void>;
|
|
2093
|
+
static login(language?: string, payload?: any): void;
|
|
2094
|
+
static logout(payload?: any): void;
|
|
2095
|
+
static changeLanguage(language: string): void;
|
|
2096
|
+
static event(eventType: ClientEventTypes, payload?: any): void;
|
|
2097
|
+
static sendRow(cid: ClassId, payload?: any): void;
|
|
2098
|
+
static action(actionValue: any): void;
|
|
2099
|
+
static setLoginEntry(core_last_login_entry: string): void;
|
|
2100
|
+
static setAvatar(avatar_id: string): void;
|
|
2101
|
+
static setNickname(nickname: string): void;
|
|
2102
|
+
static dp(deepLink: string): void;
|
|
2103
|
+
static miniGame(saw_template_id: string, params: IWidgetParams): void;
|
|
2104
|
+
static showWidget(widgetType: EWidgetType, params: IWidgetParams): void;
|
|
2105
|
+
static sendAnalytics(activity_id: ClientActivityRequestId, view_time_sec?: number): void;
|
|
2106
|
+
static on(callBackKey: EXTERNAL_CALLBACK_KEY, f: null | (() => void), params?: typeof CallBackDefaultParams): void;
|
|
2107
|
+
static suspendPopups(flag: boolean): void;
|
|
2108
|
+
static suspendInbox(flag: boolean): void;
|
|
2109
|
+
static parseUrl(): any;
|
|
2110
|
+
static parseUrlHash(): any;
|
|
2111
|
+
static isMobile(): boolean;
|
|
2112
|
+
static showVisitorGame(params: IVisitorGameParams): void;
|
|
2113
|
+
static convertVisitorGame(visitor_win_uuid: string): void;
|
|
2114
|
+
private static customScripts;
|
|
1999
2115
|
}
|
|
2000
2116
|
|
|
2001
|
-
export { Smartico as default }
|
|
2117
|
+
export { Smartico as default };
|
|
2002
2118
|
|
|
2003
|
-
export {}
|
|
2119
|
+
export {};
|