@smartico/public-api 0.0.149 → 0.0.151

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