@smartico/public-api 0.0.154 → 0.0.155

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