@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,2013 +1,2013 @@
1
- declare enum CJMActivityType {
2
- Root = 0,
3
- Journey_Started = 1,
4
- Journey_Stopped = 2,
5
- Journey_Converted = 3,
6
- Delay = 6,
7
- Control_Group = 7,
8
- Do_Nothing = 8,
9
- WaitForEvent = 9,
10
- DeepLink = 10,
11
- JSCode = 11,
12
- Banner = 20,
13
- Popup = 30,
14
- Inbox = 31,
15
- Push = 40,
16
- Email = 50,
17
- SMS = 60,
18
- Slack = 70,
19
- Email_To_Customer_Support = 80,
20
- Email_To_Risk_Operator = 90,
21
- Give_Bonus = 100,
22
- WebHook = 200,
23
- UserStateCheck = 201,
24
- Pixel = 300,
25
- WhatsApp_Connect = 400
26
- }
27
- declare enum PublicLabelSettings {
28
- PUBLIC_API_URL = "PUBLIC_API_URL",
29
- FCM_CLIENT_CONFIG = "FCM_CLIENT_CONFIG",
30
- FCM_SW_URL_V2 = "FCM_SW_URL_V2",
31
- RECORDING_ENABLED_FOR_ALL_USERS = "RECORDING_ENABLED_FOR_ALL_USERS",
32
- JS_INJECTION = "JS_INJECTION",
33
- GAMIFICATION_UI_MAIN = "GAMIFICATION_UI_MAIN",
34
- GAMIFICATION_UI_WIDGET = "GAMIFICATION_UI_WIDGET",
35
- GAMIFICATION_UI_MINI_GAME = "GAMIFICATION_UI_MINI_GAME",
36
- GAMIFICATION_UI_SETTINGS_V2 = "GAMIFICATION_UI_SETTINGS_V2",
37
- GAMIFICATION_UI_MAIN_TEST = "GAMIFICATION_UI_MAIN_TEST",
38
- GAMIFICATION_UI_WIDGET_TEST = "GAMIFICATION_UI_WIDGET_TEST",
39
- GAMIFICATION_UI_SETTINGS_TEST_V2 = "GAMIFICATION_UI_SETTINGS_TEST_V2",
40
- FRONT_END_ALLOWED_LANGUAGES = "FRONT_END_ALLOWED_LANGUAGES",
41
- FRONT_END_ALLOW_DOMAINS = "FRONT_END_ALLOW_DOMAINS",
42
- DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS = "DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS",
43
- SHADOW_LABEL_PUBLIC_KEY = "SHADOW_LABEL_PUBLIC_KEY",
44
- DYNAMIC_IMAGE_DOMAIN = "DYNAMIC_IMAGE_DOMAIN",
45
- GAMIFICATION_MATCHX_NEW_VERSION = "GAMIFICATION_MATCHX_NEW_VERSION",
46
- GAMIFICATION_WIDGET_BG_OPACITY = "GAMIFICATION_WIDGET_BG_OPACITY",
47
- GAMIFICATION_POPUP_BG_OPACITY = "GAMIFICATION_POPUP_BG_OPACITY",
48
- GAMIFICATION_POPUP_BG_BLUR = "GAMIFICATION_POPUP_BG_BLUR",
49
- GAMIFICATION_UI_LEVEL_ENABLED = "GAMIFICATION_UI_LEVEL_ENABLED",
50
- GAMIFICATION_UI_LEVEL_IMAGE_MOB = "GAMIFICATION_UI_LEVEL_IMAGE_MOB",
51
- GAMIFICATION_UI_LEVEL_IMAGE_DESK = "GAMIFICATION_UI_LEVEL_IMAGE_DESK",
52
- GAMIFICATION_LEVELS_LOGIC2 = "GAMIFICATION_LEVELS_LOGIC2",
53
- GAMIFICATION_LEVELS_LOGIC3 = "GAMIFICATION_LEVELS_LOGIC3",
54
- AVATAR_CUSTOM_IMAGE_MAX_ID = "AVATAR_CUSTOM_IMAGE_MAX_ID",
55
- AVATAR_CUSTOM_IMAGE_FOLDER = "AVATAR_CUSTOM_IMAGE_FOLDER",
56
- GAMIFICATION_SHOW_POWERED_BY = "GAMIFICATION_SHOW_POWERED_BY",
57
- INBOX_PUBLIC_CDN = "INBOX_PUBLIC_CDN",
58
- GAMIFICATION_INBOX_NEW_VERSION = "GAMIFICATION_INBOX_NEW_VERSION",
59
- GAMIFICATION_INBOX_NEW_VERSION_FOR_TEST_USERS = "GAMIFICATION_INBOX_NEW_VERSION_FOR_TEST_USERS",
60
- GF_TOURNAMENT_LOBBY_NEW_UI_TEST_USERS = "GF_TOURNAMENT_LOBBY_NEW_UI_TEST_USERS",
61
- GF_TOURNAMENT_LOBBY_NEW_UI = "GF_TOURNAMENT_LOBBY_NEW_UI",
62
- GAMIFICATION_CUSTOM_JS = "GAMIFICATION_CUSTOM_JS",
63
- GAMIFICATION_DISABLE_FOR_BRAND = "GAMIFICATION_DISABLE_FOR_BRAND"
64
- }
65
- declare enum PushClientPlatform {
66
- CHROME_DESKTOP = 0,
67
- FIREFOX_DESKTOP = 1,
68
- EDGE_DESKTOP = 2,
69
- OPERA_DESKTOP = 3,
70
- SAFARI_DESKTOP = 4,
71
- OTHER = 5,
72
- NATIVE_IOS = 6,
73
- NATIVE_ANDROID = 7,
74
- CHROME_MOBILE = 8,
75
- FIREFOX_MOBILE = 9,
76
- SAFARI_MOBILE = 10,
77
- OPERA_MOBILE = 11
78
- }
79
- declare enum ClientActivityRequestId {
80
- MINI_WIDGET_SHOWN = 1,
81
- MINI_WIDGET_HIDDEN = 2,
82
- MINI_WIDGET_CLICKED = 3,
83
- INBOX_MESSAGE_SHOWN = 4,
84
- INBOX_MESSAGE_HIDDEN = 5,
85
- INBOX_CLICKED = 6,
86
- BIG_WIDGET_SHOWN = 7,
87
- BIG_WIDGET_HIDDEN = 8,
88
- MISSIONS_SHOWN = 9,
89
- BOARD_SHOWN = 10,
90
- LEVELS_SHOWN = 11,
91
- BONUSES_SHOWN = 12,
92
- STORE_SHOWN = 13,
93
- ACTIVITY_LOG_SHOWN = 14,
94
- LOGOUT = 20,
95
- LOGIN = 21,
96
- ENGAGEMENT_FAILED = 30,
97
- ENGAGEMENT_ACTION = 31,
98
- ENGAGEMENT_IMPRESSION = 32,
99
- MISSIONS_CLICK = 201
100
- }
101
- export interface PublicProperties {
102
- core_user_language?: string;
103
- ach_points_balance?: number;
104
- ach_points_ever?: number;
105
- core_public_tags?: string[];
106
- ach_level_current_id?: number;
107
- ach_level_current?: string;
108
- core_is_test_account?: boolean;
109
- avatar_id?: string;
110
- ach_gamification_in_control_group?: boolean;
111
- ach_gamification_ui_explicitly_on?: boolean;
112
- public_username?: string;
113
- core_inbox_unread_count?: number;
114
- is_visitor?: boolean;
115
- core_registration_date?: number;
116
- }
117
- declare enum ClassId {
118
- PING = 1,
119
- PONG = 2,
120
- INIT = 3,
121
- INIT_RESPONSE = 4,
122
- IDENTIFY = 5,
123
- IDENTIFY_RESPONSE = 6,
124
- LOGIN = 7,
125
- LOGOUT = 8,
126
- EVENT = 9,
127
- EVENT_RESPONSE = 10,
128
- LOGIN_RESPONSE = 11,
129
- LOGOUT_RESPONSE = 12,
130
- GET_TRANSLATIONS_REQUEST = 13,
131
- GET_TRANSLATIONS_RESPONSE = 14,
132
- CLIENT_ENGAGEMENT_IMPRESSION_REQUEST = 103,
133
- CLIENT_ENGAGEMENT_ACTION_REQUEST = 104,
134
- CLIENT_EXECUTE_DEEPLINK_EVENT = 105,
135
- CLIENT_ENGAGEMENT_FAILED_REQUEST = 106,
136
- CLIENT_EXECUTE_JS_EVENT = 107,
137
- CLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT = 108,
138
- CLIENT_ENGAGEMENT_EVENT_NEW = 110,
139
- CLIENT_TRACK_ACTIVITY_REQUEST = 155,
140
- CLIENT_SET_AVATAR_REQUEST = 157,
141
- CLIENT_SET_AVATAR_RESPONSE = 158,
142
- CLIENT_SET_CUSTOM_USERNAME_REQUEST = 159,
143
- CLIENT_SET_CUSTOM_USERNAME_RESPONSE = 160,
144
- CHECK_SEGMENT_MATCH_REQUEST = 161,
145
- CHECK_SEGMENT_MATCH_RESPONSE = 162,
146
- GET_LEVEL_MAP_REQUEST = 500,
147
- GET_LEVEL_MAP_RESPONSE = 501,
148
- GET_ACHIEVEMENT_MAP_REQUEST = 502,
149
- GET_ACHIEVEMENT_MAP_RESPONSE = 503,
150
- RELOAD_ACHIEVEMENTS_EVENT = 504,
151
- GET_LEADERS_BOARD_REQUEST = 505,
152
- GET_LEADERS_BOARD_RESPONSE = 506,
153
- GET_SHOP_ITEMS_REQUEST = 509,
154
- GET_SHOP_ITEMS_RESPONSE = 510,
155
- BUY_SHOP_ITEM_REQUEST = 511,
156
- BUY_SHOP_ITEM_RESPONSE = 512,
157
- GET_INBOX_MESSAGES_REQUEST = 513,
158
- GET_INBOX_MESSAGES_RESPONSE = 514,
159
- GET_SHOP_CATEGORIES_REQUEST = 515,
160
- GET_SHOP_CATEGORIES_RESPONSE = 516,
161
- GET_TOURNAMENT_LOBBY_REQUEST = 517,
162
- GET_TOURNAMENT_LOBBY_RESPONSE = 518,
163
- GET_TOURNAMENT_INFO_REQUEST = 519,
164
- GET_TOURNAMENT_INFO_RESPONSE = 520,
165
- TOURNAMENT_REGISTER_REQUEST = 521,
166
- TOURNAMENT_REGISTER_RESPONSE = 522,
167
- GET_CUSTOM_SECTIONS_REQUEST = 523,
168
- GET_CUSTOM_SECTIONS_RESPONSE = 524,
169
- MISSION_OPTIN_REQUEST = 525,
170
- MISSION_OPTIN_RESPONSE = 526,
171
- GET_ACHIEVEMENT_USER_REQUEST = 527,
172
- GET_ACHIEVEMENT_USER_RESPONSE = 528,
173
- MARK_INBOX_READ_REQUEST = 529,
174
- MARK_INBOX_READ_RESPONSE = 530,
175
- MARK_INBOX_STARRED_REQUEST = 531,
176
- MARK_INBOX_STARRED_RESPONSE = 532,
177
- MARK_INBOX_DELETED_REQUEST = 535,
178
- MARK_INBOX_DELETED_RESPONSE = 536,
179
- GET_ACH_CATEGORIES_REQUEST = 537,
180
- GET_ACH_CATEGORIES_RESPONSE = 538,
181
- ACHIEVEMENT_CLAIM_PRIZE_REQUEST = 539,
182
- ACHIEVEMENT_CLAIM_PRIZE_RESPONSE = 540,
183
- ACH_SHOP_ITEM_HISTORY_REQUEST = 541,
184
- ACH_SHOP_ITEM_HISTORY_RESPONSE = 542,
185
- GET_BONUSES_REQUEST = 600,
186
- GET_BONUSES_RESPONSE = 601,
187
- CLAIM_BONUS_REQUEST = 602,
188
- CLAIM_BONUS_RESPONSE = 603,
189
- SAW_GET_SPINS_REQUEST = 700,
190
- SAW_GET_SPINS_RESPONSE = 701,
191
- SAW_DO_SPIN_REQUEST = 702,
192
- SAW_DO_SPIN_RESPONSE = 703,
193
- SAW_AKNOWLEDGE_REQUEST = 704,
194
- SAW_AKNOWLEDGE_RESPONSE = 705,
195
- SAW_SPINS_COUNT_PUSH = 706,
196
- SAW_SHOW_SPIN_PUSH = 707,
197
- SAW_PRIZE_DROP_WIN_PUSH = 708,
198
- SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST = 709,
199
- SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE = 710,
200
- JP_GET_JACKPOTS_REQUEST = 800,
201
- JP_GET_JACKPOTS_RESPONSE = 801,
202
- JP_GET_LATEST_POTS_REQUEST = 802,
203
- JP_GET_LATEST_POTS_RESPONSE = 803,
204
- JP_OPTIN_REQUEST = 804,
205
- JP_OPTIN_RESPONSE = 805,
206
- JP_OPTOUT_REQUEST = 806,
207
- JP_OPTOUT_RESPONSE = 807,
208
- JP_WIN_PUSH = 808,
209
- REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ = 1003,
210
- REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP = 2003,
211
- CLIENT_DEBUG_REQUEST = 77777,
212
- UNSUPPORTED_COMMAND = 99999
213
- }
214
- export interface ILogger {
215
- debug(...any: any[]): void;
216
- error(...any: any[]): void;
217
- info(...any: any[]): void;
218
- warn(...any: any[]): void;
219
- always(...any: any[]): void;
220
- }
221
- declare enum BuyStoreItemErrorCode {
222
- FAILED_TO_BUY_SHOP_ITEM = 121,
223
- SHOP_NO_BALANCE = 11000,
224
- SHOP_WRONG_LABEL = 11001,
225
- SHOP_FAILED_TO_BUY_BONUS = 11002,
226
- SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION = 11003,
227
- SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE = 11004,
228
- SHOP_FAILED_TO_BUY_MATCHING_BONUS = 11005,
229
- SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED = 11006,
230
- SHOP_FAILED_POOL_EMPTY = 11009
231
- }
232
- export interface ProtocolMessage {
233
- cid: number;
234
- ts?: number;
235
- uuid?: string;
236
- }
237
- export interface ProtocolResponse extends ProtocolMessage {
238
- errCode?: number;
239
- errMsg?: string;
240
- }
241
- export interface BuyStoreItemResponse extends ProtocolResponse {
242
- success?: boolean;
243
- }
244
- export interface StoreCategoryPublicMeta {
245
- name?: string;
246
- order?: number;
247
- }
248
- export interface StoreCategory {
249
- id?: number;
250
- publicMeta?: StoreCategoryPublicMeta;
251
- }
252
- export interface GetCategoriesStoreResponse extends ProtocolResponse {
253
- categories: StoreCategory[];
254
- }
255
- export interface StoreItemPublicMeta {
256
- price: string;
257
- image_url: string;
258
- name: string;
259
- description: string;
260
- label_tag: string;
261
- custom_label_tag?: string;
262
- limit_message: string;
263
- priority: number;
264
- related_items: number[];
265
- hint_text: string;
266
- }
267
- declare enum StoreItemType {
268
- Bonus = 1,
269
- Manual = 2
270
- }
271
- export interface StoreItem {
272
- id: number;
273
- itemTypeId: StoreItemType;
274
- itemPublicMeta: StoreItemPublicMeta;
275
- categoryIds?: number[];
276
- canBuy?: boolean;
277
- shopPool: number;
278
- }
279
- export interface GetStoreItemsResponse extends ProtocolResponse {
280
- items: StoreItem[];
281
- }
282
- export interface StoreItemPurchased extends StoreItem {
283
- purchase_ts: number;
284
- purchase_points_amount: number;
285
- }
286
- export interface GetStoreHistoryResponse extends ProtocolResponse {
287
- items: StoreItemPurchased[];
288
- hasMore: boolean;
289
- }
290
- declare enum SAWBuyInType {
291
- Free = 1,
292
- Points = 2,
293
- Spins = 3
294
- }
295
- declare enum SAWBuyInTypeName {
296
- Free = "free",
297
- Points = "points",
298
- Spins = "spins",
299
- Unknown = "unknown"
300
- }
301
- declare enum SAWGameType {
302
- SpinAWheel = 1,
303
- ScratchCard = 2,
304
- MatchX = 3,
305
- GiftBox = 4,
306
- PrizeDrop = 5
307
- }
308
- declare enum SAWGameTypeName {
309
- SpinAWheel = "wheel",
310
- ScratchCard = "scratch",
311
- MatchX = "matchx",
312
- GiftBox = "giftbox",
313
- PrizeDrop = "prizedrop",
314
- Unknown = "unknown"
315
- }
316
- declare enum SAWPrizeType {
317
- NO_PRIZE = 1,
318
- POINTS = 2,
319
- BONUS = 3,
320
- MANUAL = 4,
321
- SPIN = 5,
322
- JACKPOT = 6
323
- }
324
- declare enum MiniGamePrizeTypeName {
325
- NO_PRIZE = "no-prize",
326
- POINTS = "points",
327
- BONUS = "bonus",
328
- MANUAL = "manual",
329
- SPIN = "spin",
330
- JACKPOT = "jackpot",
331
- UNKNOWN = "unknown"
332
- }
333
- declare enum SAWAcknowledgeType {
334
- Silent = 1,
335
- QuickMessage = 2,
336
- FullMessage = 3
337
- }
338
- declare enum SAWWinSoundType {
339
- Disappointing = 1,
340
- Positive = 2,
341
- HighlyPositive = 3,
342
- NoSound = 4,
343
- Custom = 5
344
- }
345
- export interface SAWPrizeUI {
346
- position?: number;
347
- name: string;
348
- name_original: string;
349
- aknowledge_message: string;
350
- sectors: number[];
351
- acknowledge_type: SAWAcknowledgeType;
352
- acknowledge_dp?: string;
353
- font_size?: number;
354
- font_size_mobile?: number;
355
- sound_type: SAWWinSoundType;
356
- icon?: string;
357
- replace_name_with_image?: boolean;
358
- acknowledge_action_title?: string;
359
- custom_win_sound?: string;
360
- }
361
- export interface SAWPrize {
362
- saw_prize_id: number;
363
- saw_prize_ui_definition: SAWPrizeUI;
364
- prize_value?: number;
365
- prize_type_id: SAWPrizeType;
366
- place_from?: number;
367
- place_to?: number;
368
- sawUniqueWinId?: string;
369
- }
370
- declare enum SAWAskForUsername {
371
- NOASK = "no-ask",
372
- ONSUMBIT = "on-submit"
373
- }
374
- export interface SAWTemplateUI {
375
- skin: string;
376
- name: string;
377
- description?: string;
378
- over_limit_message?: string;
379
- no_attempts_message?: string;
380
- thumbnail?: string;
381
- sectors_count: number;
382
- priority: number;
383
- flow_builder_only: boolean;
384
- background_image?: string;
385
- background_image_mobile?: string;
386
- background_sound?: string;
387
- spin_animation_duration?: number;
388
- scratch_logo?: string;
389
- scratch_cover?: string;
390
- scratch_bg_desktop?: string;
391
- scratch_bg_mobile?: string;
392
- scratch_cursor?: string;
393
- custom_css?: string;
394
- custom_skin_folder?: string;
395
- jackpot_symbol?: string;
396
- promo_image?: string;
397
- promo_text?: string;
398
- matchx_banner?: string;
399
- matchx_seasonal_ranking?: boolean;
400
- matchx_is_completed?: boolean;
401
- matchx_general_board_users_count?: number;
402
- matchx_hide_ranking?: boolean;
403
- ask_for_username?: SAWAskForUsername;
404
- show_prize_board?: boolean;
405
- max_spins_period_ms?: number;
406
- show_countdown_for_next_availability?: boolean;
407
- disable_background_music?: boolean;
408
- custom_section_id?: number;
409
- only_in_custom_section?: boolean;
410
- custom_data: any;
411
- placeholder1?: string;
412
- placeholder2?: string;
413
- prize_drop_template?: {
414
- id: string;
415
- content: string;
416
- };
417
- }
418
- export interface SAWTemplate {
419
- saw_template_id: number;
420
- saw_game_type_id: SAWGameType;
421
- saw_template_ui_definition: SAWTemplateUI;
422
- saw_buyin_type_id: SAWBuyInType;
423
- buyin_cost_points?: number;
424
- visibile_when_can_spin: boolean;
425
- spin_count?: number;
426
- prizes: SAWPrize[];
427
- is_visible: boolean;
428
- jackpot_add_on_attempt: number;
429
- jackpot_current: number;
430
- jackpot_guaranteed: number;
431
- maxActiveSpinsAllowed: number;
432
- maxSpinsCount: number;
433
- maxSpinsPediodMs: number;
434
- next_available_spin_ts?: number;
435
- saw_skin_key: string;
436
- saw_skin_ui_definition: {
437
- skin_folder: string;
438
- skin_css: string;
439
- };
440
- }
441
- declare enum SAWSpinErrorCode {
442
- /** No error */
443
- SAW_OK = 0,
444
- /** User doesn't have 'spin attempts' to play. In case buy in type for the game is 'spins' based */
445
- SAW_NO_SPINS = 40001,
446
- /** The are no prizes left to play the game */
447
- SAW_PRIZE_POOL_EMPTY = 40002,
448
- /** User doesn't have enough points to play. In case buy in type for the game is 'points' based */
449
- SAW_NOT_ENOUGH_POINTS = 40003,
450
- /** User reached max number of game attempts defined in the BackOffice */
451
- SAW_FAILED_MAX_SPINS_REACHED = 40004,
452
- /** Special code for the 'visitor' mode */
453
- SAW_VISITOR_STOP_SPIN_REQUEST = -40001
454
- }
455
- export interface SAWDoSpinResponse extends ProtocolResponse {
456
- errCode: SAWSpinErrorCode;
457
- errMsg?: string;
458
- request_id: string;
459
- saw_prize_id: number;
460
- jackpot_amount?: number;
461
- first_spin_in_period: number;
462
- visitor_win_uuid?: string;
463
- }
464
- export interface SAWDoAknowledgeResponse extends ProtocolMessage {
465
- request_id: string;
466
- }
467
- declare enum TournamentRegistrationType {
468
- AUTO = 1,
469
- OPT_IN = 2,
470
- BUY_IN_POINTS = 3,
471
- MANUAL_APPROVAL = 4,
472
- REQUIRES_QUALIFICATION = 5
473
- }
474
- export type TournamentRegistrationTypeName = "AUTO" | "OPT_IN" | "BUY_IN_POINTS" | "MANUAL_APPROVAL" | "REQUIRES_QUALIFICATION" | "UNKNOWN";
475
- declare enum TournamentInstanceStatus {
476
- PUBLISHED = 1,
477
- REGISTER = 2,
478
- STARTED = 3,
479
- FINISHED = 4,
480
- CANCELLED = 5,
481
- FAILED = 6,
482
- FINALIZING = 7
483
- }
484
- declare enum TournamentRegistrationStatus {
485
- NOT_REGISTERED = 0,
486
- REGISTERED = 1,
487
- FINISHED = 2,
488
- PENDING = 3,
489
- CANCELLED = 4,
490
- REGISTERED_PENDING_QUALIFICATION = 5,
491
- QUALIFIED_PENDING_REGISTRATION = 6
492
- }
493
- declare enum TournamentRegistrationStatusName {
494
- NOT_REGISTERED = "NOT_REGISTERED",
495
- REGISTERED = "REGISTERED",
496
- FINISHED = "FINISHED",
497
- PENDING = "PENDING",
498
- CANCELLED = "CANCELLED",
499
- REGISTERED_PENDING_QUALIFICATION = "REGISTERED_PENDING_QUALIFICATION",
500
- QUALIFIED_PENDING_REGISTRATION = "QUALIFIED_PENDING_REGISTRATION",
501
- UNKNOWN = "UNKNOWN"
502
- }
503
- declare enum TournamentType {
504
- SCHEDULED = 1,
505
- SNG = 2,
506
- TEST = 3
507
- }
508
- export interface TournamentPublicMeta {
509
- /** Name of tournament */
510
- name?: string;
511
- /** 1st image */
512
- image_url?: string;
513
- /** 2nd image */
514
- image_url2?: string;
515
- /** 2nd image for mobile */
516
- image_url2_mobile?: string;
517
- /** Description, html capable */
518
- description?: string;
519
- /** Short explanation of prize pool */
520
- prize_pool_short?: string;
521
- /** Message to show when user is not matching to the segment allowed to register (error code 30005 in registration response) */
522
- segment_dont_match_message?: string;
523
- /** Short explanation of registration price */
524
- custom_price_text?: string;
525
- /** Indicator if the scores of other users should be shown in the leaderboard of tournament */
526
- show_other_users_score?: boolean;
527
- custom_section_id?: number;
528
- only_in_custom_section?: boolean;
529
- label_tag?: string;
530
- custom_label_tag?: string;
531
- featured?: boolean;
532
- position?: number;
533
- custom_data?: string;
534
- }
535
- export interface AchRelatedGame {
536
- ach_game_id: number;
537
- ext_game_id: string;
538
- game_public_meta: {
539
- name: string;
540
- link: string;
541
- image: string;
542
- enabled: boolean;
543
- game_categories?: string[];
544
- game_provider?: string;
545
- };
546
- }
547
- export interface Tournament {
548
- /** ID of tournament template */
549
- tournamentId?: number;
550
- /** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */
551
- tournamentInstanceId?: number;
552
- /** Type of the tournament. For now only SCHEDULED is support */
553
- tournamentType?: TournamentType;
554
- /** Meta information about tournament that should be used to build UI */
555
- publicMeta?: TournamentPublicMeta;
556
- /** Cost of registration in the tournament in gamification points */
557
- buyInAmount?: number;
558
- /** Not in use */
559
- prizePool?: number;
560
- /** The time when tournament is going to start */
561
- startTime?: string;
562
- /** The time when tournament is going to finish */
563
- endTime?: string;
564
- /** The time when tournament is going to start, epoch */
565
- startTimeTs?: number;
566
- /** The time when tournament is going to finish, epoch */
567
- endTimeTs?: number;
568
- /** Number of users registered in the tournament */
569
- registrationCount?: number;
570
- /** Not in use */
571
- totalCount?: number;
572
- /** Type of registration in the tournament */
573
- registrationType?: TournamentRegistrationType;
574
- /** Status of registration in the tournament for current user */
575
- tournamentRegistrationStatus?: TournamentRegistrationStatus;
576
- /** Status of tournament instance */
577
- tournamentInstanceStatus?: TournamentInstanceStatus;
578
- /** flag indicating if current user is registered in the tournament */
579
- isUserRegistered?: boolean;
580
- /** Indicator if tournament allows later registration, when tournament is already started */
581
- allowLateRegistration?: boolean;
582
- /** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */
583
- playersMinCount?: number;
584
- /** Maximum number of participant for this tournament. When reached, new users won't be able to register */
585
- playersMaxCount?: number;
586
- /** Tournament duration in millisecnnds */
587
- durationMs?: number;
588
- /** prizes structure */
589
- prizeStructure?: {
590
- prizes: TournamentPrize[];
591
- };
592
- /** Information about current user */
593
- tournamentPlayer?: TournamentPlayer;
594
- /** List of casino games (or other types of entities) related to the tournament */
595
- related_games?: AchRelatedGame[];
596
- }
597
- export interface TournamentPlayer {
598
- userAltName: string;
599
- position: number;
600
- scores: number;
601
- isMe: boolean;
602
- userId: number;
603
- avatar_id: string;
604
- avatar_url?: string;
605
- }
606
- declare enum ActivityTypeLimited {
607
- DoNothing = 8,
608
- Points = 12,
609
- GiveMission = 14,
610
- StartAnotherCampaign = 15,
611
- MiniGameAttempt = 16,
612
- DeductPoints = 21,
613
- ResetPoints = 22,
614
- Popup = 30,
615
- Inbox = 31,
616
- Slack = 70,
617
- Email_To_Customer_Support = 80,
618
- Email_To_Risk_Operator = 90,
619
- Bonus = 100,
620
- WebHook = 200,
621
- TagCustomer = 504,
622
- UnTagCustomer = 505
623
- }
624
- export interface TournamentPrize {
625
- name: string;
626
- description: string;
627
- image_url: string;
628
- place_from: number;
629
- place_to: number;
630
- type: ActivityTypeLimited;
631
- points: number;
632
- }
633
- export interface GetTournamentInfoResponse extends ProtocolResponse {
634
- /** tournament info */
635
- tournamentInfo: {
636
- /** id of label, not in use */
637
- labelId: number;
638
- tournamentLobbyInfo: Tournament;
639
- /** list of registered users */
640
- players: TournamentPlayer[];
641
- };
642
- /** information about current user position */
643
- userPosition: TournamentPlayer;
644
- /** prizes structure */
645
- prizeStructure?: {
646
- prizes: TournamentPrize[];
647
- };
648
- }
649
- export interface GetTournamentsResponse extends ProtocolResponse {
650
- /** array of the tournaments */
651
- tournaments?: Tournament[];
652
- }
653
- declare enum TournamentRegistrationError {
654
- NO_ERROR = 0,
655
- TOURNAMENT_INSTANCE_NOT_FOUND = 30001,
656
- TOURNAMENT_REGISTRATION_NOT_ENOUGH_POINTS = 30002,
657
- TOURNAMENT_INSTANCE_NOT_IN_STATE = 30003,
658
- TOURNAMENT_ALREADY_REGISTERED = 30004,
659
- TOURNAMENT_USER_DONT_MATCH_CONDITIONS = 30005,
660
- TOURNAMENT_USER_NOT_REGISTERED = 30006,
661
- TOURNAMENT_CANT_CHANGE_REGISTRATION_STATUS = 30007,
662
- TOURNAMENT_MAX_REGISTRATIONS_REACHED = 30008
663
- }
664
- export interface TournamentRegisterResponse extends ProtocolResponse {
665
- errCode?: TournamentRegistrationError;
666
- }
667
- declare enum LeaderBoardPeriodType {
668
- DAILY = 1,
669
- WEEKLY = 2,
670
- MONTHLY = 3
671
- }
672
- export interface LeaderBoardPosition {
673
- public_username?: string;
674
- user_alt_name: string;
675
- position_in_board: number;
676
- points_accumulated: number;
677
- is_me: boolean;
678
- level_id: number;
679
- avatar_id: string;
680
- avatar_url?: string;
681
- }
682
- export interface LeaderBoardPublicMeta {
683
- name: string;
684
- description: string;
685
- rules: string;
686
- }
687
- export interface LeaderBoardDetails {
688
- board_id: number;
689
- period_type_id: LeaderBoardPeriodType;
690
- create_date?: number;
691
- versiod_id: number;
692
- reward_points: number[];
693
- board_public_meta: LeaderBoardPublicMeta;
694
- positions: LeaderBoardPosition[];
695
- userPosition: LeaderBoardPosition;
696
- }
697
- export type TRibbon = "sale" | "hot" | "new" | "vip" | string;
698
- /**
699
- * TMiniGamePrize describes the information of prize in the array of prizes in the TMiniGameTemplate
700
- */
701
- export interface TMiniGamePrize {
702
- /** ID of the prize */
703
- id: number;
704
- /** The visual name of the prize */
705
- name: string;
706
- /** The type of the prize, no-prize, points, bonus, manual, spin, jackpot */
707
- prize_type: MiniGamePrizeTypeName;
708
- /** Numeric value of the prize in case it's pints or spin type */
709
- prize_value?: number;
710
- /** Custom font size for the prize (desktop) */
711
- font_size?: number;
712
- /** Custom font size for the prize (mobile) */
713
- font_size_mobile?: number;
714
- /** The URL of the icon of the prize */
715
- icon?: string;
716
- position: number;
717
- aknowledge_message: string;
718
- acknowledge_dp: string;
719
- acknowledge_action_title: string;
720
- }
721
- /**
722
- * TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
723
- */
724
- export interface TMiniGamePlayResult {
725
- /** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
726
- err_code: SAWSpinErrorCode;
727
- /** Optional error message */
728
- err_message: string;
729
- /** The prize_id that user won, details of the prize can be found in the mini-game definition */
730
- prize_id: number;
731
- }
732
- /**
733
- * TMiniGameTemplate describes the information of mini-games available for the user
734
- */
735
- export interface TMiniGameTemplate {
736
- /** ID of the mini-game template */
737
- id: number;
738
- /** Name of the mini-game template, translated to the user language */
739
- name: string;
740
- /** Description of the mini-game template, translated to the user language */
741
- description: string;
742
- /** URL of the icon of the mini-game template */
743
- thumbnail: string;
744
- /** The type of the game, e.g. Spin the Wheel, Gift Box, Scratch card, MatchX etc */
745
- saw_game_type: SAWGameTypeName;
746
- /** How the user is charged for each game attempt e.g. Free, Points or Spin attempts */
747
- saw_buyin_type: SAWBuyInTypeName;
748
- /** in case of charging type 'Points', what is the points amount will be deducted from user balance */
749
- buyin_cost_points: number;
750
- /** in case of charging type 'Spin attempts', shows the current number of spin attempts that user has */
751
- spin_count?: number;
752
- /** 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 */
753
- next_available_spin_ts: number;
754
- /** 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 */
755
- over_limit_message: string;
756
- /** The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts or points. */
757
- no_attempts_message: string;
758
- /** Current jackpont amount, if jackpot is enabled. */
759
- jackpot_current: number;
760
- /** 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. */
761
- jackpot_add_on_attempt: number;
762
- /** 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'.
763
- */
764
- jackpot_symbol: string;
765
- /** The promo image */
766
- promo_image: string;
767
- /** The promo text */
768
- promo_text: string;
769
- /** The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number */
770
- custom_data: any;
771
- prizes: TMiniGamePrize[];
772
- }
773
- /**
774
- * TUser describes the information of the user
775
- * The user object is returned by _smartico.api.getUserProfile() method.
776
- * If you want to track the changes of the user profile, you can subscribe to the callback in the following way
777
- * _smartico.on('props_change', () => console.log(_smartico.api.getUserProfile()) );
778
- */
779
- export interface TUserProfile {
780
- /** The language of the user */
781
- core_user_language: string;
782
- /** The current points balance that user can use in the Store, Mini-games, Tournaments, etc.. */
783
- ach_points_balance: number;
784
- /** The amount of points that user collected in total */
785
- ach_points_ever: number;
786
- /**
787
- * The array of the public tags set on the user object.
788
- * They can be treated as server-based cookies.
789
- * You can set tags using following method _smartico.event('core_public_tags_update', { core_public_tags: ['A', 'B'] } );
790
- * And then you can check for the tags
791
- */
792
- core_public_tags: string[];
793
- /** The ID of the current level of the user */
794
- ach_level_current_id?: number;
795
- /** The indicator if user is marked as test user */
796
- core_is_test_account?: boolean;
797
- /** The URL to the user avatar */
798
- avatar_url?: string;
799
- /** The username of current user */
800
- public_username?: string;
801
- /** THe number of unread inbox messages */
802
- core_inbox_unread_count?: number;
803
- }
804
- /**
805
- * TLevel describes the information of each level defined in the system
806
- * There is no order of the levels, but it can be calculated using required_points property
807
- * The current level of user can be taken from the user object using ach_level_current_id property
808
- * The progress to the next level can be calculated using ach_points_ever and required_points properties of next level
809
- */
810
- export interface TLevel {
811
- /** The ID of the Level */
812
- id: number;
813
- /** The name of the Level, translated to the user language */
814
- name: string;
815
- /** The description of the Level, translated to the user language */
816
- description: string;
817
- /** The URL of the image of the Level */
818
- image: string;
819
- /** The amount of points required to reach the Level */
820
- required_points: number;
821
- /** Number of points that user should collect in order to see this level */
822
- visibility_points: number;
823
- /**
824
- * The counter of 1st metric used to reach the Level.
825
- * Relevant in case of using advanced leveling logic
826
- * https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
827
- *
828
- */
829
- required_level_counter_1: number;
830
- /**
831
- * The counter of 2nd metric used to reach the Level.
832
- * Relevant in case of using advanced leveling logic
833
- * https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
834
- *
835
- */
836
- required_level_counter_2: number;
837
- /** The custom data of the Level defined by operator in the BackOffice. Can be a JSON object, string or number */
838
- custom_data: string;
839
- }
840
- /**
841
- * TTournament describes the general information of the tournament item
842
- */
843
- export interface TTournament {
844
- /** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */
845
- instance_id: number;
846
- /** ID of tournament template */
847
- tournament_id: number;
848
- /** Name of the tournament, translated to the user language */
849
- name: string;
850
- /** Description of the tournament, translated to the user language */
851
- description: string;
852
- image1: string;
853
- image2: string;
854
- prize_pool_short: string;
855
- custom_price_text: string;
856
- /** The message that should be shown to the user when the user cannot register in tournament with error code TOURNAMENT_USER_DONT_MATCH_CONDITIONS */
857
- segment_dont_match_message: string;
858
- /**
859
- * The ID of the custom section where the tournament is assigned
860
- * The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
861
- */
862
- custom_section_id: number;
863
- /** The custom data of the tournament defined by operator. Can be a JSON object, string or number */
864
- custom_data: any;
865
- /** The indicator if the tournament is 'Featured' */
866
- is_featured: boolean;
867
- /** The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
868
- ribbon: TRibbon;
869
- /** A number is used to order the tournaments, representing their priority in the list */
870
- priority: number;
871
- /** Info about current player in tournament */
872
- me?: {
873
- /** The username of the participant */
874
- public_username: string;
875
- /** The URL to the avatar of the participant */
876
- avatar_url: string;
877
- /** The position of the participant in the tournament */
878
- position: number;
879
- /** The scores of the participant in the tournament */
880
- scores: number;
881
- };
882
- /** Prize structure */
883
- prizes?: {
884
- /** The name of the prize */
885
- name: string;
886
- /** The description of the prize */
887
- description: string;
888
- /** The image of the prize */
889
- image_url: string;
890
- /** from-to range of the places to which this prize */
891
- place_from: number;
892
- place_to: number;
893
- /** type of the prize: TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS */
894
- type: string;
895
- /** if the prize is points related, indicates amount of points */
896
- points?: number;
897
- }[];
898
- /** The time when tournament is going to start, epoch with milliseconds */
899
- start_time: number;
900
- /** The time when tournament is going to finish, epoch with milliseconds */
901
- end_time: number;
902
- /** Type of registration in the tournament */
903
- registration_type: TournamentRegistrationTypeName;
904
- /** Number of users registered in the tournament */
905
- registration_count: number;
906
- /** flag indicating if current user is registered in the tournament */
907
- is_user_registered: boolean;
908
- /** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */
909
- players_min_count: number;
910
- /** Maximum number of participant for this tournament. When reached, new users won't be able to register */
911
- players_max_count: number;
912
- /** Status of registration in the tournament for current user */
913
- registration_status: TournamentRegistrationStatusName;
914
- /** Tournament duration in millisecnnds */
915
- duration_ms: number;
916
- /** Cost of registration in the tournament in gamification points */
917
- registration_cost_points: number;
918
- /** Indicator if tournament instance is active, means in one of the statues - PUBLISHED, REGISTED, STARTED */
919
- is_active: boolean;
920
- /** Indicator if user can register in this tournament instance, e.g tournament is active, max users is not reached, user is not registered yet */
921
- is_can_register: boolean;
922
- /** Indicator if tournament instance is cancelled (status CANCELLED) */
923
- is_cancelled: boolean;
924
- /** Indicator if tournament instance is finished (status FINISHED, CANCELLED OR FINIALIZING) */
925
- is_finished: boolean;
926
- /** Indicator if tournament instance is running (status STARTED) */
927
- is_in_progress: boolean;
928
- /** Indicator if tournament instance is upcoming (status PUBLISHED or REGISTER) */
929
- is_upcoming: boolean;
930
- }
931
- /**
932
- * TTournamentDetailed describes the information of the tournament item and includes list of participants, their scores and position in the tournament leaderboard
933
- */
934
- export interface TTournamentDetailed extends TTournament {
935
- /** List of casino games (or other types of entities) related to the tournament */
936
- related_games?: AchRelatedGame$1[];
937
- /** The list of the tournament participants */
938
- players?: {
939
- /** The username of the participant */
940
- public_username: string;
941
- /** The URL to the avatar of the participant */
942
- avatar_url: string;
943
- /** The position of the participant in the tournament */
944
- position: number;
945
- /** The scores of the participant in the tournament */
946
- scores: number;
947
- /** The indicator if the participant is current user */
948
- is_me: boolean;
949
- }[];
950
- /** The information about current user in the tournament if he is registered in the tournamnet */
951
- me?: {
952
- /** The username of the current user */
953
- public_username: string;
954
- /** The URL to the avatar of the current user */
955
- avatar_url: string;
956
- /** The position of the current user in the tournament */
957
- position: number;
958
- /** The scores of the current user in the tournament */
959
- scores: number;
960
- };
961
- prizes?: {
962
- /** The name of the prize */
963
- name: string;
964
- /** The description of the prize */
965
- description: string;
966
- /** The image of the prize */
967
- image_url: string;
968
- /** from-to range of the places to which this prize */
969
- place_from: number;
970
- place_to: number;
971
- /** type of the prize: TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS */
972
- type: string;
973
- /** if the prize is points related, indicates amount of points */
974
- points?: number;
975
- }[];
976
- }
977
- /**
978
- * TStoreCategory describes the store category item. Each store item can be assigned to 1 or more categories
979
- */
980
- export interface TStoreCategory {
981
- id: number;
982
- name: string;
983
- order: number;
984
- }
985
- /**
986
- * TStoreItem describes the information of the store item defined in the system
987
- */
988
- export interface TStoreItem {
989
- /** ID of the store item */
990
- id: number;
991
- /** Name of the store item, translated to the user language */
992
- name: string;
993
- /** Description of the store item, translated to the user language */
994
- description: string;
995
- /** URL of the image of the store item */
996
- image: string;
997
- /** Type of the store item. Can be 'bonus' or 'manual'. Manual, means it's tangible item, e.g. iPhone */
998
- type: "bonus" | "manual";
999
- /** The price of the store item in the gamification points */
1000
- price: number;
1001
- /** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
1002
- ribbon: TRibbon;
1003
- /**
1004
- * 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.
1005
- The message is translated to the user language.
1006
- **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
1007
- */
1008
- limit_message: string;
1009
- /** The priority of the store item. Can be used to sort the items in the store */
1010
- priority: number;
1011
- /** The list of IDs of the related items. Can be used to show the related items in the store */
1012
- related_item_ids: number[];
1013
- /** The indicator if the user can buy the item
1014
- * This indicator is taking into account the segment conditions for the store item, the price of item towards users balance,
1015
- */
1016
- can_buy: boolean;
1017
- /** The list of IDs of the categories where the store item is assigned, information about categories can be retrieved with getStoreCategories method */
1018
- category_ids: number[];
1019
- /** Number of items in the pool avaliable for the purchase.*/
1020
- pool?: number;
1021
- /** The T&C text for the store item */
1022
- hint_text?: string;
1023
- /** Purchase time to show in purchase history screen */
1024
- purchase_ts?: number;
1025
- /** The amount of points you can purchase an item */
1026
- purchase_points_amount?: number;
1027
- }
1028
- /**
1029
- * TAchCategory describes the badge category item. Each badge item can be assigned to 1 or more categories
1030
- */
1031
- export interface TAchCategory {
1032
- id: number;
1033
- name: string;
1034
- order: number;
1035
- }
1036
- /**
1037
- * TMissionOrBadge describes the information of mission or badge defined in the system
1038
- */
1039
- export interface TMissionOrBadge {
1040
- /** ID of the mission or badge */
1041
- id: number;
1042
- /** Type of entity. Can be 'mission' or 'badge' */
1043
- type: "mission" | "badge";
1044
- /** Name of the mission or badge, translated to the user language */
1045
- name: string;
1046
- /** Description of the mission or badge, translated to the user language */
1047
- description: string;
1048
- /** Description of the mission reward if defined */
1049
- reward: string;
1050
- /** URL of the image of the mission or badge */
1051
- image: string;
1052
- /** Indicator if the mission is completed or badge is granted */
1053
- is_completed: boolean;
1054
- /** Indicator if the mission is locked. Means that it's visible to the user, but he cannot progress in it until it's unlocked.
1055
- * Mission may optionally contain the explanation of what should be done to unlock it in the unlock_mission_description property
1056
- */
1057
- is_locked: boolean;
1058
- /** Optional explaination of what should be done to unlock the mission */
1059
- unlock_mission_description: string;
1060
- /** Indicator if the mission requires opt-in. Means that user should explicitly opt-in to the mission in order to start progressing in it */
1061
- is_requires_optin: boolean;
1062
- /** Indicator if the user opted-in to the mission */
1063
- is_opted_in: boolean;
1064
- /** The amount of time in milliseconds that user has to complete the mission */
1065
- time_limit_ms: number;
1066
- /** The date when the mission was started, relevant for the time limited missions */
1067
- dt_start: number;
1068
- /** The progress of the mission in percents calculated as the aggregated relative percentage of all tasks */
1069
- progress: number;
1070
- /**
1071
- * The action that should be performed when user clicks on the mission or badge
1072
- * 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);
1073
- * The 'dp' function will handle the CTA and will execute it in the most safe way
1074
- */
1075
- cta_action: string;
1076
- /** The text of the CTA button, e.g. 'Make a deposit' */
1077
- cta_text: string;
1078
- /**
1079
- * The ID of the custom section where the mission or badge is assigned
1080
- * The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
1081
- */
1082
- custom_section_id: number;
1083
- /** 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 */
1084
- only_in_custom_section: boolean;
1085
- /** The custom data of the mission or badge defined by operator. Can be a JSON object, string or number */
1086
- custom_data: any;
1087
- /** The list of tasks of the mission or badge */
1088
- tasks: TMissionOrBadgeTask[];
1089
- /** List of casino games (or other types of entities) related to the mission or badge */
1090
- related_games?: AchRelatedGame$1[];
1091
- /** The list of IDs of the categories where the badge item is assigned, information about categories can be retrieved with getAchCategories method */
1092
- category_ids: number[];
1093
- /** The T&C text for the missions */
1094
- hint_text?: string;
1095
- /** Priority (or position) of the mission in the UI. Low value indicates higher position in the UI */
1096
- position?: number;
1097
- /** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
1098
- ribbon?: TRibbon;
1099
- /** ID of the completion fact from ach_completed or ach_completed_recurring tables */
1100
- ach_completed_id?: number;
1101
- /** Flag from achievement if the mission prize will be given only after user claims it */
1102
- requires_prize_claim?: boolean;
1103
- /** The date/timestamp indicating when the prize was claimed by the user */
1104
- prize_claimed_date_ts?: number;
1105
- }
1106
- interface AchRelatedGame$1 {
1107
- /** The ID of the related game */
1108
- ext_game_id: string;
1109
- /** Game public meta information */
1110
- game_public_meta: {
1111
- /** The name of the game */
1112
- name: string;
1113
- /** The URL to the game */
1114
- link: string;
1115
- /** The URL to the image of the game */
1116
- image: string;
1117
- /** The indicator if the game is enabled */
1118
- enabled: boolean;
1119
- /** The list of categories of the game */
1120
- game_categories: string[];
1121
- /** The name of the game provider */
1122
- game_provider: string;
1123
- };
1124
- }
1125
- /**
1126
- * TMissionOrBadgeTask describes the information of tasks that belings to mission or badge. See also TMissionOrBadge
1127
- */
1128
- export interface TMissionOrBadgeTask {
1129
- /** ID of the task */
1130
- id: number;
1131
- /** Name of the task, translated to the user language */
1132
- name: string;
1133
- /** Indicator if the task is completed */
1134
- is_completed: boolean;
1135
- /** The progress of the task in percents */
1136
- progress: number;
1137
- /** Reward for completing the task in points */
1138
- points_reward: number;
1139
- }
1140
- /**
1141
- * TMissionOptInResult describes the response of call to _smartico.api.requestMissionOptIn(mission_id) method
1142
- */
1143
- export interface TMissionOptInResult {
1144
- /** Error code that represents outcome of the opt-in request. Successful opt-in in case err_code is 0 */
1145
- err_code: number;
1146
- /** Optional error message */
1147
- err_message: string;
1148
- }
1149
- /**
1150
- * TMissionClaimRewardResult describes the response of call to _smartico.api.requestMissionClaimReward(mission_id, ach_completed_id) method
1151
- */
1152
- export interface TMissionClaimRewardResult {
1153
- /** Error code that represents outcome of the claim request. Successful claim reward in case err_code is 0 */
1154
- err_code: number;
1155
- /** Optional error message */
1156
- err_message: string;
1157
- }
1158
- export interface TTournamentRegistrationResult {
1159
- /** Error code that represents outcome of the tournament registration request. Successful registration in case err_code is 0 */
1160
- err_code: TournamentRegistrationError;
1161
- /** Optional error message */
1162
- err_message: string;
1163
- }
1164
- export interface TBuyStoreItemResult {
1165
- /** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0 */
1166
- err_code: BuyStoreItemErrorCode;
1167
- /** Optional error message */
1168
- err_message: string;
1169
- }
1170
- export interface TGetTranslations {
1171
- translations: {
1172
- [key: string]: string;
1173
- };
1174
- }
1175
- export interface TInboxMessage {
1176
- /** Uniq identifier of the message. It is needed to request the message body, mark the message as read/deleted/favorite. */
1177
- message_guid: string;
1178
- /** Date when the message was sent */
1179
- sent_date: string;
1180
- /** Indicator if a message is read */
1181
- read: boolean;
1182
- /** Indicator if a message is added to favorites */
1183
- favorite: boolean;
1184
- }
1185
- export interface TInboxMessageBody {
1186
- /** Message title */
1187
- title: string;
1188
- /** Short preview body of the message */
1189
- preview_body: string;
1190
- /** Message icon */
1191
- icon: string;
1192
- /** The action that should be performed when user clicks on the message.
1193
- * 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);
1194
- * The 'dp' function will handle the CTA and will execute it in the most safe way.
1195
- * If the message has a rich html body - the action will always be 'dp:inbox' which will open the inbox widget when triggered. */
1196
- action: string;
1197
- /** Rich HTML body of the message. */
1198
- html_body?: string;
1199
- /** Optional additional buttons to show in the message, available only if message has rich HTML body. Max count - 2. */
1200
- buttons?: {
1201
- /** The action that should be performed when user clicks on the button. The logic is the same as for message actions */
1202
- action: string;
1203
- /** Button text */
1204
- text: string;
1205
- }[];
1206
- }
1207
- export interface InboxMarkMessageAction {
1208
- /** An error code representing the result of marking a message as deleted, favorite or read. Successful marking action if err_code is 0 */
1209
- err_code: number;
1210
- /** Optional error message */
1211
- err_message: string;
1212
- }
1213
- export interface LeaderBoardDetailsT {
1214
- /** ID of the leaderboard */
1215
- board_id: number;
1216
- /** Name of the leaderboard */
1217
- name: string;
1218
- /** Description of the leaderboard */
1219
- description: string;
1220
- /** Rules of the leaderboard */
1221
- rules: string;
1222
- /** Leaderboard period type ID */
1223
- period_type_id: LeaderBoardPeriodType;
1224
- /** Leaderboard points rewards */
1225
- rewards: LeaderBoardsRewardsT[];
1226
- /** Leaderboard users */
1227
- users: LeaderBoardUserT[];
1228
- /** Info about current user in leaderboard */
1229
- me?: LeaderBoardUserT;
1230
- }
1231
- export interface LeaderBoardsRewardsT {
1232
- place: number;
1233
- points: number;
1234
- }
1235
- export interface LeaderBoardUserT {
1236
- /** The username of the participant */
1237
- public_username: string;
1238
- /** The URL to the avatar of the participant */
1239
- avatar_url: string;
1240
- /** The position of the participant in the leaderboard */
1241
- position: number;
1242
- /** The points of the participant in the leaderboard */
1243
- points: number;
1244
- /** The indicator if the participant is current user */
1245
- is_me: boolean;
1246
- }
1247
- export interface UserLevelExtraCountersT {
1248
- /** The counter of 1st metric used to reach the level. */
1249
- level_counter_1?: number;
1250
- /** The counter of 2nd metric used to reach the level. */
1251
- level_counter_2?: number;
1252
- }
1253
- export interface TSegmentCheckResult {
1254
- segment_id: number;
1255
- is_matching: boolean;
1256
- }
1257
- export interface SAWGetTemplatesResponse extends ProtocolResponse {
1258
- templates: SAWTemplate[];
1259
- }
1260
- export interface GetLabelInfoResponse extends ProtocolResponse {
1261
- settings: {
1262
- [key: string]: string;
1263
- };
1264
- label_id: string;
1265
- }
1266
- declare enum TranslationArea {
1267
- Casino = 1,
1268
- Gamification = 2,
1269
- Trading = 3,
1270
- Archived = 4,
1271
- Affiliation = 5,
1272
- RetentionGames = 6,
1273
- AffIliateAdminNew = 7
1274
- }
1275
- export interface GetTranslationsResponse extends ProtocolResponse {
1276
- hash_code: number;
1277
- translations: {
1278
- [key: string]: string;
1279
- };
1280
- }
1281
- declare enum PublicLabelSettings$1 {
1282
- PUBLIC_API_URL = "PUBLIC_API_URL",
1283
- RECORDING_ENABLED_FOR_ALL_USERS = "RECORDING_ENABLED_FOR_ALL_USERS",
1284
- JS_INJECTION = "JS_INJECTION",
1285
- GAMIFICATION_UI_MAIN = "GAMIFICATION_UI_MAIN",
1286
- GAMIFICATION_UI_WIDGET = "GAMIFICATION_UI_WIDGET",
1287
- GAMIFICATION_UI_MINI_GAME = "GAMIFICATION_UI_MINI_GAME",
1288
- GAMIFICATION_UI_SETTINGS = "GAMIFICATION_UI_SETTINGS",
1289
- GAMIFICATION_UI_MAIN_TEST = "GAMIFICATION_UI_MAIN_TEST",
1290
- GAMIFICATION_UI_WIDGET_TEST = "GAMIFICATION_UI_WIDGET_TEST",
1291
- GAMIFICATION_UI_SETTINGS_TEST = "GAMIFICATION_UI_SETTINGS_TEST",
1292
- FRONT_END_ALLOWED_LANGUAGES = "FRONT_END_ALLOWED_LANGUAGES",
1293
- FRONT_END_ALLOW_DOMAINS = "FRONT_END_ALLOW_DOMAINS",
1294
- DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS = "DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS",
1295
- SHADOW_LABEL_PUBLIC_KEY = "SHADOW_LABEL_PUBLIC_KEY",
1296
- DYNAMIC_IMAGE_DOMAIN = "DYNAMIC_IMAGE_DOMAIN",
1297
- GAMIFICATION_UI_LEVEL_ENABLED = "GAMIFICATION_UI_LEVEL_ENABLED",
1298
- GAMIFICATION_UI_LEVEL_IMAGE_MOB = "GAMIFICATION_UI_LEVEL_IMAGE_MOB",
1299
- GAMIFICATION_UI_LEVEL_IMAGE_DESK = "GAMIFICATION_UI_LEVEL_IMAGE_DESK",
1300
- GAMIFICATION_LEVELS_LOGIC2 = "GAMIFICATION_LEVELS_LOGIC2",
1301
- GAMIFICATION_LEVELS_LOGIC3 = "GAMIFICATION_LEVELS_LOGIC2",
1302
- AVATAR_CUSTOM_IMAGE_MAX_ID = "AVATAR_CUSTOM_IMAGE_MAX_ID",
1303
- AVATAR_CUSTOM_IMAGE_FOLDER = "AVATAR_CUSTOM_IMAGE_FOLDER",
1304
- GAMIFICATION_SHOW_POWERED_BY = "GAMIFICATION_SHOW_POWERED_BY",
1305
- _system_leader_board_mask_username = "_system_leader_board_mask_username",
1306
- INBOX_PUBLIC_CDN = "INBOX_PUBLIC_CDN"
1307
- }
1308
- interface PublicProperties$1 {
1309
- core_user_language?: string;
1310
- ach_points_balance?: number;
1311
- ach_points_ever?: number;
1312
- ach_level_current_id?: number;
1313
- ach_level_current?: string;
1314
- core_is_test_account?: boolean;
1315
- ach_gamification_in_control_group?: boolean;
1316
- }
1317
- export interface ResponseIdentify extends ProtocolResponse {
1318
- user_id: number;
1319
- ext_user_id: string;
1320
- public_username: string;
1321
- avatar_id: string;
1322
- job: boolean;
1323
- props?: PublicProperties$1;
1324
- pubic_username_set: boolean;
1325
- }
1326
- declare enum InboxMessageType {
1327
- Custom = 0,
1328
- MissionCompleted = 1,
1329
- MissionUnlocked = 2,
1330
- LeaderboardWon = 3,
1331
- LevelChanged = 4,
1332
- BonusGiven = 5,
1333
- PointsAdded = 6,
1334
- PointsUsed = 7,
1335
- PersonalMessage = 8
1336
- }
1337
- export interface InboxMessageBody {
1338
- action: string;
1339
- body: string;
1340
- type: InboxMessageType;
1341
- image: string;
1342
- title: string;
1343
- html_body: string;
1344
- additional_buttons?: {
1345
- inbox_cta_text: string;
1346
- action: string;
1347
- }[];
1348
- }
1349
- export interface InboxMessage {
1350
- createDate: string;
1351
- body: InboxMessageBody;
1352
- engagement_uid: string;
1353
- is_read: boolean;
1354
- is_starred: boolean;
1355
- is_deleted?: boolean;
1356
- }
1357
- export interface GetInboxMessagesResponse extends ProtocolResponse {
1358
- log: InboxMessage[];
1359
- }
1360
- export interface MarkInboxMessageReadResponse extends ProtocolMessage {
1361
- errCode: number;
1362
- errMsg?: string;
1363
- }
1364
- export interface MarkInboxMessageStarredResponse extends ProtocolMessage {
1365
- errCode: number;
1366
- errMsg?: string;
1367
- }
1368
- export interface MarkInboxMessageDeletedResponse extends ProtocolMessage {
1369
- errCode: number;
1370
- errMsg?: string;
1371
- }
1372
- export interface AchievementOptinResponse extends ProtocolResponse {
1373
- }
1374
- export interface AchievementPublicMeta {
1375
- description?: string;
1376
- unlock_mission_description?: string;
1377
- custom_data?: string;
1378
- cta_text?: string;
1379
- cta_action?: string;
1380
- label_tag?: string;
1381
- custom_label_tag?: string;
1382
- reward?: string;
1383
- image_url?: string;
1384
- name?: string;
1385
- position?: number;
1386
- hide_tasks?: boolean;
1387
- hide_locked_mission?: boolean;
1388
- custom_section_id?: number;
1389
- only_in_custom_section?: boolean;
1390
- hint_text?: string;
1391
- hide_badge_from_ui?: boolean;
1392
- show_badge_first_task_completed?: boolean;
1393
- }
1394
- declare enum AchievementStatus {
1395
- Draft = 1,
1396
- AvailableUnlocked = 2,
1397
- AvailableLocked = 3,
1398
- Archived = 4,
1399
- FeaturedManually = 5,
1400
- FeaturedAI = 6
1401
- }
1402
- export interface AchievementTaskPublicMeta {
1403
- name?: string;
1404
- }
1405
- declare enum AchievementTaskType {
1406
- CompleteAchievement = 1,
1407
- UnlockAchievement = 2
1408
- }
1409
- declare enum AchievementType {
1410
- Mission = 1,
1411
- Badge = 2
1412
- }
1413
- declare enum ScheduledMissionType {
1414
- Future = 1,
1415
- Past = 2,
1416
- Present = 3
1417
- }
1418
- export interface UserAchievementTask {
1419
- task_id?: number;
1420
- task_public_meta?: AchievementTaskPublicMeta;
1421
- points_reward?: number;
1422
- task_type_id: AchievementTaskType;
1423
- isCompleted?: boolean;
1424
- userExecutedCount?: number;
1425
- userProgress?: number;
1426
- lastExecutionDate: string;
1427
- unlocked_by_mission_id?: number;
1428
- unlocked_by_level_id?: number;
1429
- }
1430
- export interface UserAchievement {
1431
- ach_id?: number;
1432
- ach_type_id?: AchievementType;
1433
- ach_public_meta?: AchievementPublicMeta;
1434
- isCompleted?: boolean;
1435
- isLocked?: boolean;
1436
- requiresOptin?: boolean;
1437
- isOptedIn?: boolean;
1438
- start_date?: string;
1439
- start_date_ts?: number;
1440
- time_limit_ms?: number;
1441
- progress?: number;
1442
- complete_date?: string;
1443
- unlock_date?: string;
1444
- milliseconds_till_available?: number;
1445
- completed_tasks?: number;
1446
- achievementTasks?: UserAchievementTask[];
1447
- ach_status_id?: AchievementStatus;
1448
- scheduledMissionType?: ScheduledMissionType;
1449
- related_games?: AchRelatedGame[];
1450
- active_from_ts?: number;
1451
- ach_categories?: number[];
1452
- ach_completed_id?: number;
1453
- requires_prize_claim?: boolean;
1454
- prize_claimed_date_ts?: number;
1455
- }
1456
- export interface GetAchievementMapResponse extends ProtocolResponse {
1457
- achievements?: UserAchievement[];
1458
- }
1459
- export interface AchCategoryPublicMeta {
1460
- name?: string;
1461
- order?: number;
1462
- }
1463
- export interface AchCategory {
1464
- id?: number;
1465
- publicMeta?: AchCategoryPublicMeta;
1466
- }
1467
- export interface GetAchCategoriesResponse extends ProtocolResponse {
1468
- categories: AchCategory[];
1469
- }
1470
- export interface AchClaimPrizeResponse extends ProtocolResponse {
1471
- }
1472
- export interface LevelPublicMeta {
1473
- /** Description of level, HTML capabable */
1474
- description?: string;
1475
- /** URL to the image of level */
1476
- image_url?: string;
1477
- /** Name of level */
1478
- name?: string;
1479
- /** Number of points that user should have collected in order to see this level */
1480
- visibility_points?: number;
1481
- /** X & Y coordinates of level on the visual mission map, for desktop and mobile */
1482
- position?: {
1483
- mx: number;
1484
- my: number;
1485
- dx: number;
1486
- dy: number;
1487
- };
1488
- /**custom data as string or JSON string that can be used in UIWidget */
1489
- custom_data: string;
1490
- }
1491
- export interface Level {
1492
- level_id: number;
1493
- level_public_meta: LevelPublicMeta;
1494
- required_points: number;
1495
- is_first_level: boolean;
1496
- /** Internal status of level. Not in use right now on the front-end */
1497
- level_status_id: number;
1498
- required_level_counter_1: number;
1499
- required_level_counter_2: number;
1500
- general_level_progress: number;
1501
- }
1502
- export interface GetLevelMapResponse extends ProtocolResponse {
1503
- levels: Level[];
1504
- }
1505
- declare class WSAPI {
1506
- private api;
1507
- private onUpdateCallback;
1508
- /** @private */
1509
- constructor(api: SmarticoAPI);
1510
- /** Returns information about current user
1511
- * Example usage:
1512
- * ```
1513
- * _smartico.api.getUserProfile().then((result) => {
1514
- * console.log(result);
1515
- * });
1516
- * ```
1517
- * */
1518
- getUserProfile(): TUserProfile;
1519
- /** Check if user belongs to specific segments
1520
- * Example usage:
1521
- * ```
1522
- * _smartico.api.checkSegmentMatch(1).then((result) => {
1523
- * console.log(result);
1524
- * });
1525
- * ```
1526
- */
1527
- checkSegmentMatch(segment_id: number): Promise<boolean>;
1528
- /** Check if user belongs to specific list of segments
1529
- * Example usage:
1530
- * ```
1531
- * _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
1532
- * console.log(result);
1533
- * });
1534
- * ```
1535
- */
1536
- checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]>;
1537
- /** Returns all the levels available the current user
1538
- * Example usage:
1539
- * ```
1540
- * _smartico.api.getLevels().then((result) => {
1541
- * console.log(result);
1542
- * });
1543
- * ```
1544
- */
1545
- getLevels(): Promise<TLevel[]>;
1546
- /** Returns all the missions available the current user.
1547
- * The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
1548
- * Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
1549
- * The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
1550
- * Example usage:
1551
- * ```
1552
- * _smartico.api.getMissions().then((result) => {
1553
- * console.log(result);
1554
- * });
1555
- * ```
1556
- /**
1557
- * @param params
1558
- */
1559
- getMissions({ onUpdate }?: {
1560
- onUpdate?: (data: TMissionOrBadge[]) => void;
1561
- }): Promise<TMissionOrBadge[]>;
1562
- /** Returns all the badges available the current user */
1563
- getBadges(): Promise<TMissionOrBadge[]>;
1564
- /**
1565
- * Returns the extra counters for the current user level.
1566
- * These are counters that are configured for each Smartico client separatly by request.
1567
- * For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
1568
- * Example usage:
1569
- * ```
1570
- * _smartico.api.getUserLevelExtraCounters().then((result) => {
1571
- * console.log(result);
1572
- * });
1573
- * ```
1574
- */
1575
- getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
1576
- /** Returns all the store items available the current user
1577
- * Example usage:
1578
- * ```
1579
- * _smartico.api.getStoreItems().then((result) => {
1580
- * console.log(result);
1581
- * });
1582
- */
1583
- getStoreItems(): Promise<TStoreItem[]>;
1584
- /** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
1585
- * Example usage:
1586
- * ```
1587
- * _smartico.api.buyStoreItem(1).then((result) => {
1588
- * console.log(result);
1589
- * });
1590
- */
1591
- buyStoreItem(item_id: number): Promise<TBuyStoreItemResult>;
1592
- /** Returns store categories */
1593
- getStoreCategories(): Promise<TStoreCategory[]>;
1594
- /** Returns store purchased items based on the provided parameters. "From" and "to" indicate the range of items to be fetched.
1595
- * The maximum number of messages per request is limited to 20.
1596
- * You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
1597
- * This functions return list of purchased items.
1598
- * The "onUpdate" callback will be triggered when the user receives a new purchased item. It will provide an updated list of items, ranging from 0 to 20, to the onUpdate callback function. */
1599
- /**
1600
- * @param params
1601
- */
1602
- storeGetPurchasedItems({ from, to, onUpdate }?: {
1603
- from?: number;
1604
- to?: number;
1605
- onUpdate?: (data: TStoreItem[]) => void;
1606
- }): Promise<TStoreItem[]>;
1607
- /** Returns missions & badges categories */
1608
- getAchCategories(): Promise<TAchCategory[]>;
1609
- /** Returns the list of mini-games available for user
1610
- * The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
1611
- * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback. */
1612
- /**
1613
- /**
1614
- * @param params
1615
- */
1616
- getMiniGames({ onUpdate }?: {
1617
- onUpdate?: (data: TMiniGameTemplate[]) => void;
1618
- }): Promise<TMiniGameTemplate[]>;
1619
- /** Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code */
1620
- playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
1621
- /** Requests an opt-in for the specified mission_id. Returns the err_code. */
1622
- requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult>;
1623
- /** Request for claim reward for the specified mission id. Returns the err_code. */
1624
- requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult>;
1625
- /** Returns all the active instances of tournaments
1626
- * The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
1627
- * The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.*/
1628
- /**
1629
- * @param params
1630
- */
1631
- getTournamentsList({ onUpdate }?: {
1632
- onUpdate?: (data: TTournament[]) => void;
1633
- }): Promise<TTournament[]>;
1634
- /** Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players */
1635
- getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed>;
1636
- /** Requests registration for the specified tournament instance. Returns the err_code. */
1637
- registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult>;
1638
- /** Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
1639
- For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
1640
- */
1641
- getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT>;
1642
- /** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
1643
- * The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
1644
- * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
1645
- * This functions return list of messages without the body of the message.
1646
- * To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
1647
- * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
1648
- * The "onUpdate" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function. */
1649
- /**
1650
- * @param params
1651
- */
1652
- getInboxMessages({ from, to, onlyFavorite, onUpdate }?: {
1653
- from?: number;
1654
- to?: number;
1655
- onlyFavorite?: boolean;
1656
- onUpdate?: (data: TInboxMessage[]) => void;
1657
- }): Promise<TInboxMessage[]>;
1658
- /** Returns the message body of the specified message guid. */
1659
- getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody>;
1660
- /** Requests to mark inbox message with specified guid as read */
1661
- markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction>;
1662
- /** Requests to mark all inbox messages as read */
1663
- markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction>;
1664
- /** Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove. */
1665
- markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction>;
1666
- /** Requests to delete inbox message */
1667
- deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction>;
1668
- /** Requests to delete all inbox messages */
1669
- deleteAllInboxMessages(): Promise<InboxMarkMessageAction>;
1670
- /** Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office. */
1671
- getTranslations(lang_code: string): Promise<TGetTranslations>;
1672
- private updateOnSpin;
1673
- private updateOnAddSpin;
1674
- private updateOnPrizeWin;
1675
- private updateMissionsOnOptIn;
1676
- private updateTournamentsOnRegistration;
1677
- private updateInboxMessages;
1678
- private updateEntity;
1679
- }
1680
- export interface GetAchievementsUserInfoResponse extends ProtocolResponse {
1681
- level_counter_1?: number;
1682
- level_counter_2?: number;
1683
- }
1684
- export interface Tracker {
1685
- label_api_key: string;
1686
- userPublicProps: any;
1687
- on: (callBackKey: ClassId, func: (data: any) => void) => void;
1688
- getLabelSetting: (key: PublicLabelSettings$1) => any;
1689
- }
1690
- export interface IOptions {
1691
- logger?: ILogger;
1692
- logCIDs?: ClassId[];
1693
- logHTTPTiming?: boolean;
1694
- tracker?: Tracker;
1695
- }
1696
- export type MessageSender = (message: any, publicApuUrl?: string, expectCID?: ClassId) => Promise<any>;
1697
- declare class SmarticoAPI {
1698
- private label_api_key;
1699
- private brand_api_key;
1700
- private messageSender;
1701
- private publicUrl;
1702
- private wsUrl;
1703
- private inboxCdnUrl;
1704
- private partnerUrl;
1705
- avatarDomain: string;
1706
- private logger;
1707
- private logCIDs;
1708
- private logHTTPTiming;
1709
- tracker?: Tracker;
1710
- constructor(label_api_key: string, brand_api_key: string, messageSender: MessageSender, options?: IOptions);
1711
- static getEnvDnsSuffix(label_api_key: string): string;
1712
- static getEnvId(label_api_key: string): number;
1713
- static getCleanLabelApiKey(label_api_key: string): string;
1714
- static getPublicUrl(label_api_key: string): string;
1715
- static getPublicWsUrl(label_api_key: string): string;
1716
- static getAvatarUrl(label_api_key: string): string;
1717
- private send;
1718
- private buildMessage;
1719
- coreReportCustomEvent(user_ext_id: string, eventType: string, payload?: any): Promise<any>;
1720
- coreGetTranslations(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
1721
- coreIdentifyLabel(user_ext_id: string, cacheSec?: number): Promise<GetLabelInfoResponse>;
1722
- coreIdentifyUser(user_ext_id: string): Promise<ResponseIdentify>;
1723
- coreChangeUsername(user_ext_id: string, public_username_custom: string): Promise<{
1724
- public_username_custom: string;
1725
- }>;
1726
- coreCheckSegments(user_ext_id: string, segment_id: number[]): Promise<TSegmentCheckResult[]>;
1727
- sawGetTemplates(user_ext_id: string, lang?: string, is_visitor_mode?: boolean): Promise<SAWGetTemplatesResponse>;
1728
- sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]>;
1729
- doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse>;
1730
- sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise<SAWDoSpinResponse>;
1731
- missionOptIn(user_ext_id: string, mission_id: number): Promise<AchievementOptinResponse>;
1732
- missionClaimPrize(user_ext_id: string, mission_id: number, ach_completed_id: number): Promise<AchClaimPrizeResponse>;
1733
- registerInTournament(user_ext_id: string, tournamentInstanceId: number): Promise<TournamentRegisterResponse>;
1734
- buyStoreItem(user_ext_id: string, itemId: number): Promise<BuyStoreItemResponse>;
1735
- inboxGetMessages(user_ext_id: string, limit?: number, offset?: number): Promise<GetInboxMessagesResponse>;
1736
- storeGetItems(user_ext_id: string): Promise<GetStoreItemsResponse>;
1737
- storeGetItemsT(user_ext_id: string): Promise<TStoreItem[]>;
1738
- storeGetCategories(user_ext_id: string): Promise<GetCategoriesStoreResponse>;
1739
- storeGetCategoriesT(user_ext_id: string): Promise<TStoreCategory[]>;
1740
- storeGetPurchasedItems(user_ext_id: string, limit?: number, offset?: number): Promise<GetStoreHistoryResponse>;
1741
- storeGetPurchasedItemsT(user_ext_id: string, from?: number, to?: number): Promise<TStoreItem[]>;
1742
- missionsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
1743
- missionsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
1744
- getUserGamificationInfo(user_ext_id: string): Promise<GetAchievementsUserInfoResponse>;
1745
- getUserGamificationInfoT(user_ext_id: string): Promise<UserLevelExtraCountersT>;
1746
- achGetCategories(user_ext_id: string): Promise<GetAchCategoriesResponse>;
1747
- achGetCategoriesT(user_ext_id: string): Promise<TAchCategory[]>;
1748
- badgetsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
1749
- badgetsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
1750
- tournamentsGetLobby(user_ext_id: string): Promise<GetTournamentsResponse>;
1751
- tournamentsGetLobbyT(user_ext_id: string): Promise<TTournament[]>;
1752
- tournamentsGetInfo(user_ext_id: string, tournamentInstanceId: number): Promise<GetTournamentInfoResponse>;
1753
- tournamentsGetInfoT(user_ext_id: string, tournamentInstanceId: number): Promise<TTournamentDetailed>;
1754
- leaderboardGet(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean): Promise<LeaderBoardDetails>;
1755
- leaderboardsGetT(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean): Promise<LeaderBoardDetailsT>;
1756
- levelsGet(user_ext_id: string): Promise<GetLevelMapResponse>;
1757
- levelsGetT(user_ext_id: string): Promise<TLevel[]>;
1758
- getTranslationsT(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
1759
- getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean): Promise<GetInboxMessagesResponse>;
1760
- getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean): Promise<TInboxMessage[]>;
1761
- getInboxMessageBody(messageGuid: string): Promise<InboxMessageBody>;
1762
- getInboxMessageBodyT(messageGuid: string): Promise<TInboxMessageBody>;
1763
- markInboxMessageRead(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageReadResponse>;
1764
- markAllInboxMessageRead(user_ext_id: string): Promise<MarkInboxMessageReadResponse>;
1765
- markUnmarkInboxMessageAsFavorite(user_ext_id: string, messageGuid: string, mark: boolean): Promise<MarkInboxMessageStarredResponse>;
1766
- deleteInboxMessage(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageDeletedResponse>;
1767
- deleteAllInboxMessages(user_ext_id: string): Promise<MarkInboxMessageDeletedResponse>;
1768
- getWSCalls(): WSAPI;
1769
- }
1770
- export interface SmarticoClearParams {
1771
- keepCallBacks: boolean;
1772
- }
1773
- export interface RequestBase {
1774
- cid?: number;
1775
- ts?: number;
1776
- uuid?: string;
1777
- }
1778
- export interface RequestClientEngagmentBase extends RequestBase {
1779
- engagement_uid: string;
1780
- activityType: CJMActivityType;
1781
- }
1782
- export interface RequestClientEngagementAction extends RequestClientEngagmentBase {
1783
- action?: string;
1784
- }
1785
- export interface RequestClientEngagementFailed extends RequestClientEngagmentBase {
1786
- action?: string;
1787
- reason?: string;
1788
- }
1789
- declare enum EWidgetType {
1790
- Achievements2 = "achievements2",
1791
- Achievements = "achievements",
1792
- ShortInfo1 = "short_info1",
1793
- ShortInfo = "short_info",
1794
- Tournaments = "tournaments",
1795
- Store = "store",
1796
- Inbox = "inbox",
1797
- Missions = "missions",
1798
- MiniGame = "mini-game",
1799
- MatchX = "match-x",
1800
- MatchXNew = "match-x-2",
1801
- CustomSection = "custom-section",
1802
- InboxWidget = "inbox-widget",
1803
- UIWidget = "ui-widget"
1804
- }
1805
- declare enum EXTERNAL_CALLBACK_KEY {
1806
- INIT = "init",
1807
- IDENTIFY = "identify",
1808
- LOGIN = "login",
1809
- LOGOUT = "logout",
1810
- USER_PROPS_CHANGE = "props_change",
1811
- SESSION_BASED_DP_DETECTED = "session_based_dp_detected",
1812
- GF_CLOSING = "gf_closing",
1813
- GF_STARTING = "gf_starting",
1814
- GF_STARTED = "gf_started",
1815
- SAW_STARTING = "saw_starting",
1816
- INBOX_STARTING = "inbox_starting",
1817
- PROTOCOL_ERROR = "protocol_error",
1818
- MNIGAME_WIN = "mini_game_win",
1819
- ACH_GAME_OPENING = "ach_game_opening"
1820
- }
1821
- declare enum DpType {
1822
- AskPushPermissions = "ask_push_permissions",
1823
- Ok = "ok",
1824
- Cancel = "cancel",
1825
- Close = "close",
1826
- Go = "go",
1827
- Inbox = "inbox",
1828
- GfMain = "gf",
1829
- Activity = "gf_activity",
1830
- Missions = "gf_missions",
1831
- Badges = "gf_badges",
1832
- LeaderBoard = "gf_board",
1833
- Tournaments = "gf_tournaments",
1834
- LeaderBoardPrev = "gf_board_previous",
1835
- LeaderBoardRules = "gf_board_rules",
1836
- Bonuses = "gf_bonuses",
1837
- Levels = "gf_levels",
1838
- Saw = "gf_saw",
1839
- MatchX = "gf_matchx",
1840
- Store = "gf_store",
1841
- Settings = "gf_settings",
1842
- Section = "gf_section",
1843
- GfClose = "gf_close",
1844
- ChangeNickname = "gf_change_nickname",
1845
- ChangeAvatar = "gf_change_avatar",
1846
- Submit = "submit",
1847
- Action = "action"
1848
- }
1849
- export interface DeepLinkParams {
1850
- [key: string]: string;
1851
- }
1852
- export interface DeepLink {
1853
- action: DpType;
1854
- params?: DeepLinkParams;
1855
- actionToReport?: string;
1856
- }
1857
- export interface IVisitorGameParams {
1858
- template_id: number;
1859
- onBeforePlay: () => boolean;
1860
- onWin: (prize: SAWPrize) => void;
1861
- frame_id: string;
1862
- }
1863
- export interface IWidgetParams {
1864
- iframe: string;
1865
- zoom: number;
1866
- height: "auto" | string;
1867
- theme: string;
1868
- wuuid: string;
1869
- withBridge?: any;
1870
- noQuestionMark?: any;
1871
- inline?: boolean;
1872
- force_mobile?: boolean;
1873
- }
1874
- declare enum ConnectionStatus {
1875
- OPEN = 0,
1876
- CLOSED = 1
1877
- }
1878
- export interface TrackerInterface {
1879
- log?: (message: string) => void;
1880
- clear?: (params: SmarticoClearParams) => void;
1881
- logout?: (payload: any) => void;
1882
- reportEngagmentAction: (message: RequestClientEngagementAction) => void;
1883
- reportEngagmentFail: (message: RequestClientEngagementFailed) => void;
1884
- reportEngagmentImpression: (message: RequestClientEngagementFailed) => void;
1885
- requestPushPermissions: () => void;
1886
- executeNativeDp: (dp: string) => void;
1887
- executeGfDp: (dp: DeepLink) => void;
1888
- executeManualDP?: (deepLink: string, engagement_uid?: string, activityType?: CJMActivityType) => void;
1889
- promoMessageClosed: () => void;
1890
- connectionStatus?: ConnectionStatus;
1891
- suspendPopups?: (flag: boolean) => void;
1892
- suspendInbox?: (flag: boolean) => void;
1893
- registerNativePushToken?: (token: string, platform: PushClientPlatform, app_package_id: any) => void;
1894
- registerHandler?: (cid: ClassId, handler: (o: any) => void) => void;
1895
- triggerExternalCallBack?: (callBackKey: EXTERNAL_CALLBACK_KEY | number, ...args: any[]) => void;
1896
- getExtUserId?: () => string;
1897
- bSuspendPopups?: boolean;
1898
- identify?: (ext_user_id: string, hash: string, payload: any, visitor_id: string) => void;
1899
- changeLanguage?: (lang: string) => void;
1900
- getPublicProps?: () => PublicProperties;
1901
- getLabelSetting?: (key: PublicLabelSettings) => any;
1902
- getParams?: () => typeof TrackerParams;
1903
- setNickname?: (nickname: string) => void;
1904
- setAvatar?: (avatar_id: string) => void;
1905
- setLoginPayload?: (payload: any) => void;
1906
- sendServerError?: (message: string) => void;
1907
- sendServerDebug?: (message: string) => void;
1908
- sendAnalytics?: (activity_id: ClientActivityRequestId, type: "view" | "click" | "other", view_time_sec?: number, more?: any) => void;
1909
- sendRow: (cid: ClassId, toIdentified: boolean, data?: any) => string;
1910
- miniGame?: (saw_template_id: string, params: IWidgetParams) => void;
1911
- showWidget?: (widgetType: EWidgetType, params: IWidgetParams) => void;
1912
- showVisitorGame?: (params: IVisitorGameParams) => void;
1913
- convertVisitorGame?: (visitor_win_uuid: string) => void;
1914
- isIdenfitied?: () => boolean;
1915
- }
1916
- declare const TrackerParams: {
1917
- brand_key: any;
1918
- debug: boolean;
1919
- server: any;
1920
- simulation_mode: boolean;
1921
- gamification_wrapper_mode: boolean;
1922
- generate_visit: boolean;
1923
- lang: string;
1924
- };
1925
- declare const CallBackDefaultParams: {};
1926
- declare class GamificationEngine {
1927
- private static _instance;
1928
- private readonly _tracker;
1929
- private readonly _socketPromises;
1930
- private readonly _socketListeners;
1931
- static instance(tracker: TrackerInterface): GamificationEngine;
1932
- private constructor();
1933
- doGetLevels: () => Promise<any>;
1934
- doGetMissions: () => Promise<any>;
1935
- doOptinMission: (achievementId: number) => Promise<any>;
1936
- doClaimRewardMission: (achievementId: number) => Promise<any>;
1937
- doGetTournaments: () => Promise<any>;
1938
- doGetTournamentLobby: (tournamentInstanceId: number) => Promise<any>;
1939
- doTournamentRegister: (tournamentInstanceId: number) => Promise<any>;
1940
- private socketRequest;
1941
- private socketResponse;
1942
- private listen;
1943
- private notify;
1944
- }
1945
- declare enum ClientEventTypes {
1946
- client_action = "client_action",
1947
- update_sensitive_properties = "update_sensitive_properties",
1948
- core_language_changed = "core_language_changed",
1949
- core_cannot_open_gamification = "core_cannot_open_gamification",
1950
- core_set_last_login_entry = "core_set_last_login_entry",
1951
- gf_nickname_changed = "gf_nickname_changed",
1952
- gf_avatar_changed = "gf_avatar_changed"
1953
- }
1954
- declare class Smartico {
1955
- private static tracker;
1956
- private static trackerShadow;
1957
- private static initParams;
1958
- private static initLabelApiKey;
1959
- private static shadowQueue;
1960
- private static shadowInterval;
1961
- static gf: GamificationEngine;
1962
- static api: WSAPI;
1963
- private static readonly gf_api_promises;
1964
- private static readonly gf_api_handlers;
1965
- constructor();
1966
- static startIntegrationWithIframe(): void;
1967
- private static checkInit;
1968
- private static checkSuccessfullyIdentify;
1969
- private static initShadowLabel;
1970
- private static onlineTrackerInterval;
1971
- private static onlineTrackerLastUserId;
1972
- private static onlineTrackerLastLanguage;
1973
- private static getUserID;
1974
- private static getUserHash;
1975
- private static getLanguage;
1976
- private static getVisitorGameWinUUID;
1977
- private static getVisitorID;
1978
- private static onlinetrackerByInterval;
1979
- static init(label_api_key: string, params: typeof TrackerParams): void;
1980
- static initVisitorMode(label_api_key: string, params: typeof TrackerParams): void;
1981
- static clear(params?: SmarticoClearParams): void;
1982
- static getPublicProps(): PublicProperties;
1983
- static sendServerError(message: string): void;
1984
- static sendServerDebug(message: string): void;
1985
- static requestPushPermissions(): void;
1986
- static registerNativePushToken(token: string, platform?: PushClientPlatform, app_package_id?: string): void;
1987
- static identify(ext_user_id: string, hash: string, payload: any): Promise<void>;
1988
- static online(ext_user_id: string, language: string, user_hash: string): Promise<void>;
1989
- static login(language?: string, payload?: any): void;
1990
- static logout(payload?: any): void;
1991
- static changeLanguage(language: string): void;
1992
- static event(eventType: ClientEventTypes, payload?: any): void;
1993
- static sendRow(cid: ClassId, payload?: any): void;
1994
- static action(actionValue: any): void;
1995
- static setLoginEntry(core_last_login_entry: string): void;
1996
- static setAvatar(avatar_id: string): void;
1997
- static setNickname(nickname: string): void;
1998
- static dp(deepLink: string): void;
1999
- static miniGame(saw_template_id: string, params: IWidgetParams): void;
2000
- static showWidget(widgetType: EWidgetType, params: IWidgetParams): void;
2001
- static sendAnalytics(activity_id: ClientActivityRequestId, view_time_sec?: number): void;
2002
- static on(callBackKey: EXTERNAL_CALLBACK_KEY, f: null | (() => void), params?: typeof CallBackDefaultParams): void;
2003
- static suspendPopups(flag: boolean): void;
2004
- static suspendInbox(flag: boolean): void;
2005
- static parseUrl(): any;
2006
- static parseUrlHash(): any;
2007
- static isMobile(): boolean;
2008
- static showVisitorGame(params: IVisitorGameParams): void;
2009
- static convertVisitorGame(visitor_win_uuid: string): void;
2010
- private static customScripts;
2011
- }
2012
- export { Smartico as default, };
2013
- export {};
1
+ declare enum CJMActivityType {
2
+ Root = 0,
3
+ Journey_Started = 1,
4
+ Journey_Stopped = 2,
5
+ Journey_Converted = 3,
6
+ Delay = 6,
7
+ Control_Group = 7,
8
+ Do_Nothing = 8,
9
+ WaitForEvent = 9,
10
+ DeepLink = 10,
11
+ JSCode = 11,
12
+ Banner = 20,
13
+ Popup = 30,
14
+ Inbox = 31,
15
+ Push = 40,
16
+ Email = 50,
17
+ SMS = 60,
18
+ Slack = 70,
19
+ Email_To_Customer_Support = 80,
20
+ Email_To_Risk_Operator = 90,
21
+ Give_Bonus = 100,
22
+ WebHook = 200,
23
+ UserStateCheck = 201,
24
+ Pixel = 300,
25
+ WhatsApp_Connect = 400
26
+ }
27
+ declare enum PublicLabelSettings {
28
+ PUBLIC_API_URL = "PUBLIC_API_URL",
29
+ FCM_CLIENT_CONFIG = "FCM_CLIENT_CONFIG",
30
+ FCM_SW_URL_V2 = "FCM_SW_URL_V2",
31
+ RECORDING_ENABLED_FOR_ALL_USERS = "RECORDING_ENABLED_FOR_ALL_USERS",
32
+ JS_INJECTION = "JS_INJECTION",
33
+ GAMIFICATION_UI_MAIN = "GAMIFICATION_UI_MAIN",
34
+ GAMIFICATION_UI_WIDGET = "GAMIFICATION_UI_WIDGET",
35
+ GAMIFICATION_UI_MINI_GAME = "GAMIFICATION_UI_MINI_GAME",
36
+ GAMIFICATION_UI_SETTINGS_V2 = "GAMIFICATION_UI_SETTINGS_V2",
37
+ GAMIFICATION_UI_MAIN_TEST = "GAMIFICATION_UI_MAIN_TEST",
38
+ GAMIFICATION_UI_WIDGET_TEST = "GAMIFICATION_UI_WIDGET_TEST",
39
+ GAMIFICATION_UI_SETTINGS_TEST_V2 = "GAMIFICATION_UI_SETTINGS_TEST_V2",
40
+ FRONT_END_ALLOWED_LANGUAGES = "FRONT_END_ALLOWED_LANGUAGES",
41
+ FRONT_END_ALLOW_DOMAINS = "FRONT_END_ALLOW_DOMAINS",
42
+ DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS = "DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS",
43
+ SHADOW_LABEL_PUBLIC_KEY = "SHADOW_LABEL_PUBLIC_KEY",
44
+ DYNAMIC_IMAGE_DOMAIN = "DYNAMIC_IMAGE_DOMAIN",
45
+ GAMIFICATION_MATCHX_NEW_VERSION = "GAMIFICATION_MATCHX_NEW_VERSION",
46
+ GAMIFICATION_WIDGET_BG_OPACITY = "GAMIFICATION_WIDGET_BG_OPACITY",
47
+ GAMIFICATION_POPUP_BG_OPACITY = "GAMIFICATION_POPUP_BG_OPACITY",
48
+ GAMIFICATION_POPUP_BG_BLUR = "GAMIFICATION_POPUP_BG_BLUR",
49
+ GAMIFICATION_UI_LEVEL_ENABLED = "GAMIFICATION_UI_LEVEL_ENABLED",
50
+ GAMIFICATION_UI_LEVEL_IMAGE_MOB = "GAMIFICATION_UI_LEVEL_IMAGE_MOB",
51
+ GAMIFICATION_UI_LEVEL_IMAGE_DESK = "GAMIFICATION_UI_LEVEL_IMAGE_DESK",
52
+ GAMIFICATION_LEVELS_LOGIC2 = "GAMIFICATION_LEVELS_LOGIC2",
53
+ GAMIFICATION_LEVELS_LOGIC3 = "GAMIFICATION_LEVELS_LOGIC3",
54
+ AVATAR_CUSTOM_IMAGE_MAX_ID = "AVATAR_CUSTOM_IMAGE_MAX_ID",
55
+ AVATAR_CUSTOM_IMAGE_FOLDER = "AVATAR_CUSTOM_IMAGE_FOLDER",
56
+ GAMIFICATION_SHOW_POWERED_BY = "GAMIFICATION_SHOW_POWERED_BY",
57
+ INBOX_PUBLIC_CDN = "INBOX_PUBLIC_CDN",
58
+ GAMIFICATION_INBOX_NEW_VERSION = "GAMIFICATION_INBOX_NEW_VERSION",
59
+ GAMIFICATION_INBOX_NEW_VERSION_FOR_TEST_USERS = "GAMIFICATION_INBOX_NEW_VERSION_FOR_TEST_USERS",
60
+ GF_TOURNAMENT_LOBBY_NEW_UI_TEST_USERS = "GF_TOURNAMENT_LOBBY_NEW_UI_TEST_USERS",
61
+ GF_TOURNAMENT_LOBBY_NEW_UI = "GF_TOURNAMENT_LOBBY_NEW_UI",
62
+ GAMIFICATION_CUSTOM_JS = "GAMIFICATION_CUSTOM_JS",
63
+ GAMIFICATION_DISABLE_FOR_BRAND = "GAMIFICATION_DISABLE_FOR_BRAND"
64
+ }
65
+ declare enum PushClientPlatform {
66
+ CHROME_DESKTOP = 0,
67
+ FIREFOX_DESKTOP = 1,
68
+ EDGE_DESKTOP = 2,
69
+ OPERA_DESKTOP = 3,
70
+ SAFARI_DESKTOP = 4,
71
+ OTHER = 5,
72
+ NATIVE_IOS = 6,
73
+ NATIVE_ANDROID = 7,
74
+ CHROME_MOBILE = 8,
75
+ FIREFOX_MOBILE = 9,
76
+ SAFARI_MOBILE = 10,
77
+ OPERA_MOBILE = 11
78
+ }
79
+ declare enum ClientActivityRequestId {
80
+ MINI_WIDGET_SHOWN = 1,
81
+ MINI_WIDGET_HIDDEN = 2,
82
+ MINI_WIDGET_CLICKED = 3,
83
+ INBOX_MESSAGE_SHOWN = 4,
84
+ INBOX_MESSAGE_HIDDEN = 5,
85
+ INBOX_CLICKED = 6,
86
+ BIG_WIDGET_SHOWN = 7,
87
+ BIG_WIDGET_HIDDEN = 8,
88
+ MISSIONS_SHOWN = 9,
89
+ BOARD_SHOWN = 10,
90
+ LEVELS_SHOWN = 11,
91
+ BONUSES_SHOWN = 12,
92
+ STORE_SHOWN = 13,
93
+ ACTIVITY_LOG_SHOWN = 14,
94
+ LOGOUT = 20,
95
+ LOGIN = 21,
96
+ ENGAGEMENT_FAILED = 30,
97
+ ENGAGEMENT_ACTION = 31,
98
+ ENGAGEMENT_IMPRESSION = 32,
99
+ MISSIONS_CLICK = 201
100
+ }
101
+ export interface PublicProperties {
102
+ core_user_language?: string;
103
+ ach_points_balance?: number;
104
+ ach_points_ever?: number;
105
+ core_public_tags?: string[];
106
+ ach_level_current_id?: number;
107
+ ach_level_current?: string;
108
+ core_is_test_account?: boolean;
109
+ avatar_id?: string;
110
+ ach_gamification_in_control_group?: boolean;
111
+ ach_gamification_ui_explicitly_on?: boolean;
112
+ public_username?: string;
113
+ core_inbox_unread_count?: number;
114
+ is_visitor?: boolean;
115
+ core_registration_date?: number;
116
+ }
117
+ declare enum ClassId {
118
+ PING = 1,
119
+ PONG = 2,
120
+ INIT = 3,
121
+ INIT_RESPONSE = 4,
122
+ IDENTIFY = 5,
123
+ IDENTIFY_RESPONSE = 6,
124
+ LOGIN = 7,
125
+ LOGOUT = 8,
126
+ EVENT = 9,
127
+ EVENT_RESPONSE = 10,
128
+ LOGIN_RESPONSE = 11,
129
+ LOGOUT_RESPONSE = 12,
130
+ GET_TRANSLATIONS_REQUEST = 13,
131
+ GET_TRANSLATIONS_RESPONSE = 14,
132
+ CLIENT_ENGAGEMENT_IMPRESSION_REQUEST = 103,
133
+ CLIENT_ENGAGEMENT_ACTION_REQUEST = 104,
134
+ CLIENT_EXECUTE_DEEPLINK_EVENT = 105,
135
+ CLIENT_ENGAGEMENT_FAILED_REQUEST = 106,
136
+ CLIENT_EXECUTE_JS_EVENT = 107,
137
+ CLIENT_PUBLIC_PROPERTIES_CHANGED_EVENT = 108,
138
+ CLIENT_ENGAGEMENT_EVENT_NEW = 110,
139
+ CLIENT_TRACK_ACTIVITY_REQUEST = 155,
140
+ CLIENT_SET_AVATAR_REQUEST = 157,
141
+ CLIENT_SET_AVATAR_RESPONSE = 158,
142
+ CLIENT_SET_CUSTOM_USERNAME_REQUEST = 159,
143
+ CLIENT_SET_CUSTOM_USERNAME_RESPONSE = 160,
144
+ CHECK_SEGMENT_MATCH_REQUEST = 161,
145
+ CHECK_SEGMENT_MATCH_RESPONSE = 162,
146
+ GET_LEVEL_MAP_REQUEST = 500,
147
+ GET_LEVEL_MAP_RESPONSE = 501,
148
+ GET_ACHIEVEMENT_MAP_REQUEST = 502,
149
+ GET_ACHIEVEMENT_MAP_RESPONSE = 503,
150
+ RELOAD_ACHIEVEMENTS_EVENT = 504,
151
+ GET_LEADERS_BOARD_REQUEST = 505,
152
+ GET_LEADERS_BOARD_RESPONSE = 506,
153
+ GET_SHOP_ITEMS_REQUEST = 509,
154
+ GET_SHOP_ITEMS_RESPONSE = 510,
155
+ BUY_SHOP_ITEM_REQUEST = 511,
156
+ BUY_SHOP_ITEM_RESPONSE = 512,
157
+ GET_INBOX_MESSAGES_REQUEST = 513,
158
+ GET_INBOX_MESSAGES_RESPONSE = 514,
159
+ GET_SHOP_CATEGORIES_REQUEST = 515,
160
+ GET_SHOP_CATEGORIES_RESPONSE = 516,
161
+ GET_TOURNAMENT_LOBBY_REQUEST = 517,
162
+ GET_TOURNAMENT_LOBBY_RESPONSE = 518,
163
+ GET_TOURNAMENT_INFO_REQUEST = 519,
164
+ GET_TOURNAMENT_INFO_RESPONSE = 520,
165
+ TOURNAMENT_REGISTER_REQUEST = 521,
166
+ TOURNAMENT_REGISTER_RESPONSE = 522,
167
+ GET_CUSTOM_SECTIONS_REQUEST = 523,
168
+ GET_CUSTOM_SECTIONS_RESPONSE = 524,
169
+ MISSION_OPTIN_REQUEST = 525,
170
+ MISSION_OPTIN_RESPONSE = 526,
171
+ GET_ACHIEVEMENT_USER_REQUEST = 527,
172
+ GET_ACHIEVEMENT_USER_RESPONSE = 528,
173
+ MARK_INBOX_READ_REQUEST = 529,
174
+ MARK_INBOX_READ_RESPONSE = 530,
175
+ MARK_INBOX_STARRED_REQUEST = 531,
176
+ MARK_INBOX_STARRED_RESPONSE = 532,
177
+ MARK_INBOX_DELETED_REQUEST = 535,
178
+ MARK_INBOX_DELETED_RESPONSE = 536,
179
+ GET_ACH_CATEGORIES_REQUEST = 537,
180
+ GET_ACH_CATEGORIES_RESPONSE = 538,
181
+ ACHIEVEMENT_CLAIM_PRIZE_REQUEST = 539,
182
+ ACHIEVEMENT_CLAIM_PRIZE_RESPONSE = 540,
183
+ ACH_SHOP_ITEM_HISTORY_REQUEST = 541,
184
+ ACH_SHOP_ITEM_HISTORY_RESPONSE = 542,
185
+ GET_BONUSES_REQUEST = 600,
186
+ GET_BONUSES_RESPONSE = 601,
187
+ CLAIM_BONUS_REQUEST = 602,
188
+ CLAIM_BONUS_RESPONSE = 603,
189
+ SAW_GET_SPINS_REQUEST = 700,
190
+ SAW_GET_SPINS_RESPONSE = 701,
191
+ SAW_DO_SPIN_REQUEST = 702,
192
+ SAW_DO_SPIN_RESPONSE = 703,
193
+ SAW_AKNOWLEDGE_REQUEST = 704,
194
+ SAW_AKNOWLEDGE_RESPONSE = 705,
195
+ SAW_SPINS_COUNT_PUSH = 706,
196
+ SAW_SHOW_SPIN_PUSH = 707,
197
+ SAW_PRIZE_DROP_WIN_PUSH = 708,
198
+ SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST = 709,
199
+ SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE = 710,
200
+ JP_GET_JACKPOTS_REQUEST = 800,
201
+ JP_GET_JACKPOTS_RESPONSE = 801,
202
+ JP_GET_LATEST_POTS_REQUEST = 802,
203
+ JP_GET_LATEST_POTS_RESPONSE = 803,
204
+ JP_OPTIN_REQUEST = 804,
205
+ JP_OPTIN_RESPONSE = 805,
206
+ JP_OPTOUT_REQUEST = 806,
207
+ JP_OPTOUT_RESPONSE = 807,
208
+ JP_WIN_PUSH = 808,
209
+ REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ = 1003,
210
+ REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP = 2003,
211
+ CLIENT_DEBUG_REQUEST = 77777,
212
+ UNSUPPORTED_COMMAND = 99999
213
+ }
214
+ export interface ILogger {
215
+ debug(...any: any[]): void;
216
+ error(...any: any[]): void;
217
+ info(...any: any[]): void;
218
+ warn(...any: any[]): void;
219
+ always(...any: any[]): void;
220
+ }
221
+ declare enum BuyStoreItemErrorCode {
222
+ FAILED_TO_BUY_SHOP_ITEM = 121,
223
+ SHOP_NO_BALANCE = 11000,
224
+ SHOP_WRONG_LABEL = 11001,
225
+ SHOP_FAILED_TO_BUY_BONUS = 11002,
226
+ SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION = 11003,
227
+ SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE = 11004,
228
+ SHOP_FAILED_TO_BUY_MATCHING_BONUS = 11005,
229
+ SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED = 11006,
230
+ SHOP_FAILED_POOL_EMPTY = 11009
231
+ }
232
+ export interface ProtocolMessage {
233
+ cid: number;
234
+ ts?: number;
235
+ uuid?: string;
236
+ }
237
+ export interface ProtocolResponse extends ProtocolMessage {
238
+ errCode?: number;
239
+ errMsg?: string;
240
+ }
241
+ export interface BuyStoreItemResponse extends ProtocolResponse {
242
+ success?: boolean;
243
+ }
244
+ export interface StoreCategoryPublicMeta {
245
+ name?: string;
246
+ order?: number;
247
+ }
248
+ export interface StoreCategory {
249
+ id?: number;
250
+ publicMeta?: StoreCategoryPublicMeta;
251
+ }
252
+ export interface GetCategoriesStoreResponse extends ProtocolResponse {
253
+ categories: StoreCategory[];
254
+ }
255
+ export interface StoreItemPublicMeta {
256
+ price: string;
257
+ image_url: string;
258
+ name: string;
259
+ description: string;
260
+ label_tag: string;
261
+ custom_label_tag?: string;
262
+ limit_message: string;
263
+ priority: number;
264
+ related_items: number[];
265
+ hint_text: string;
266
+ }
267
+ declare enum StoreItemType {
268
+ Bonus = 1,
269
+ Manual = 2
270
+ }
271
+ export interface StoreItem {
272
+ id: number;
273
+ itemTypeId: StoreItemType;
274
+ itemPublicMeta: StoreItemPublicMeta;
275
+ categoryIds?: number[];
276
+ canBuy?: boolean;
277
+ shopPool: number;
278
+ }
279
+ export interface GetStoreItemsResponse extends ProtocolResponse {
280
+ items: StoreItem[];
281
+ }
282
+ export interface StoreItemPurchased extends StoreItem {
283
+ purchase_ts: number;
284
+ purchase_points_amount: number;
285
+ }
286
+ export interface GetStoreHistoryResponse extends ProtocolResponse {
287
+ items: StoreItemPurchased[];
288
+ hasMore: boolean;
289
+ }
290
+ declare enum SAWBuyInType {
291
+ Free = 1,
292
+ Points = 2,
293
+ Spins = 3
294
+ }
295
+ declare enum SAWBuyInTypeName {
296
+ Free = "free",
297
+ Points = "points",
298
+ Spins = "spins",
299
+ Unknown = "unknown"
300
+ }
301
+ declare enum SAWGameType {
302
+ SpinAWheel = 1,
303
+ ScratchCard = 2,
304
+ MatchX = 3,
305
+ GiftBox = 4,
306
+ PrizeDrop = 5
307
+ }
308
+ declare enum SAWGameTypeName {
309
+ SpinAWheel = "wheel",
310
+ ScratchCard = "scratch",
311
+ MatchX = "matchx",
312
+ GiftBox = "giftbox",
313
+ PrizeDrop = "prizedrop",
314
+ Unknown = "unknown"
315
+ }
316
+ declare enum SAWPrizeType {
317
+ NO_PRIZE = 1,
318
+ POINTS = 2,
319
+ BONUS = 3,
320
+ MANUAL = 4,
321
+ SPIN = 5,
322
+ JACKPOT = 6
323
+ }
324
+ declare enum MiniGamePrizeTypeName {
325
+ NO_PRIZE = "no-prize",
326
+ POINTS = "points",
327
+ BONUS = "bonus",
328
+ MANUAL = "manual",
329
+ SPIN = "spin",
330
+ JACKPOT = "jackpot",
331
+ UNKNOWN = "unknown"
332
+ }
333
+ declare enum SAWAcknowledgeType {
334
+ Silent = 1,
335
+ QuickMessage = 2,
336
+ FullMessage = 3
337
+ }
338
+ declare enum SAWWinSoundType {
339
+ Disappointing = 1,
340
+ Positive = 2,
341
+ HighlyPositive = 3,
342
+ NoSound = 4,
343
+ Custom = 5
344
+ }
345
+ export interface SAWPrizeUI {
346
+ position?: number;
347
+ name: string;
348
+ name_original: string;
349
+ aknowledge_message: string;
350
+ sectors: number[];
351
+ acknowledge_type: SAWAcknowledgeType;
352
+ acknowledge_dp?: string;
353
+ font_size?: number;
354
+ font_size_mobile?: number;
355
+ sound_type: SAWWinSoundType;
356
+ icon?: string;
357
+ replace_name_with_image?: boolean;
358
+ acknowledge_action_title?: string;
359
+ custom_win_sound?: string;
360
+ }
361
+ export interface SAWPrize {
362
+ saw_prize_id: number;
363
+ saw_prize_ui_definition: SAWPrizeUI;
364
+ prize_value?: number;
365
+ prize_type_id: SAWPrizeType;
366
+ place_from?: number;
367
+ place_to?: number;
368
+ sawUniqueWinId?: string;
369
+ }
370
+ declare enum SAWAskForUsername {
371
+ NOASK = "no-ask",
372
+ ONSUMBIT = "on-submit"
373
+ }
374
+ export interface SAWTemplateUI {
375
+ skin: string;
376
+ name: string;
377
+ description?: string;
378
+ over_limit_message?: string;
379
+ no_attempts_message?: string;
380
+ thumbnail?: string;
381
+ sectors_count: number;
382
+ priority: number;
383
+ flow_builder_only: boolean;
384
+ background_image?: string;
385
+ background_image_mobile?: string;
386
+ background_sound?: string;
387
+ spin_animation_duration?: number;
388
+ scratch_logo?: string;
389
+ scratch_cover?: string;
390
+ scratch_bg_desktop?: string;
391
+ scratch_bg_mobile?: string;
392
+ scratch_cursor?: string;
393
+ custom_css?: string;
394
+ custom_skin_folder?: string;
395
+ jackpot_symbol?: string;
396
+ promo_image?: string;
397
+ promo_text?: string;
398
+ matchx_banner?: string;
399
+ matchx_seasonal_ranking?: boolean;
400
+ matchx_is_completed?: boolean;
401
+ matchx_general_board_users_count?: number;
402
+ matchx_hide_ranking?: boolean;
403
+ ask_for_username?: SAWAskForUsername;
404
+ show_prize_board?: boolean;
405
+ max_spins_period_ms?: number;
406
+ show_countdown_for_next_availability?: boolean;
407
+ disable_background_music?: boolean;
408
+ custom_section_id?: number;
409
+ only_in_custom_section?: boolean;
410
+ custom_data: any;
411
+ placeholder1?: string;
412
+ placeholder2?: string;
413
+ prize_drop_template?: {
414
+ id: string;
415
+ content: string;
416
+ };
417
+ }
418
+ export interface SAWTemplate {
419
+ saw_template_id: number;
420
+ saw_game_type_id: SAWGameType;
421
+ saw_template_ui_definition: SAWTemplateUI;
422
+ saw_buyin_type_id: SAWBuyInType;
423
+ buyin_cost_points?: number;
424
+ visibile_when_can_spin: boolean;
425
+ spin_count?: number;
426
+ prizes: SAWPrize[];
427
+ is_visible: boolean;
428
+ jackpot_add_on_attempt: number;
429
+ jackpot_current: number;
430
+ jackpot_guaranteed: number;
431
+ maxActiveSpinsAllowed: number;
432
+ maxSpinsCount: number;
433
+ maxSpinsPediodMs: number;
434
+ next_available_spin_ts?: number;
435
+ saw_skin_key: string;
436
+ saw_skin_ui_definition: {
437
+ skin_folder: string;
438
+ skin_css: string;
439
+ };
440
+ }
441
+ declare enum SAWSpinErrorCode {
442
+ /** No error */
443
+ SAW_OK = 0,
444
+ /** User doesn't have 'spin attempts' to play. In case buy in type for the game is 'spins' based */
445
+ SAW_NO_SPINS = 40001,
446
+ /** The are no prizes left to play the game */
447
+ SAW_PRIZE_POOL_EMPTY = 40002,
448
+ /** User doesn't have enough points to play. In case buy in type for the game is 'points' based */
449
+ SAW_NOT_ENOUGH_POINTS = 40003,
450
+ /** User reached max number of game attempts defined in the BackOffice */
451
+ SAW_FAILED_MAX_SPINS_REACHED = 40004,
452
+ /** Special code for the 'visitor' mode */
453
+ SAW_VISITOR_STOP_SPIN_REQUEST = -40001
454
+ }
455
+ export interface SAWDoSpinResponse extends ProtocolResponse {
456
+ errCode: SAWSpinErrorCode;
457
+ errMsg?: string;
458
+ request_id: string;
459
+ saw_prize_id: number;
460
+ jackpot_amount?: number;
461
+ first_spin_in_period: number;
462
+ visitor_win_uuid?: string;
463
+ }
464
+ export interface SAWDoAknowledgeResponse extends ProtocolMessage {
465
+ request_id: string;
466
+ }
467
+ declare enum TournamentRegistrationType {
468
+ AUTO = 1,
469
+ OPT_IN = 2,
470
+ BUY_IN_POINTS = 3,
471
+ MANUAL_APPROVAL = 4,
472
+ REQUIRES_QUALIFICATION = 5
473
+ }
474
+ export type TournamentRegistrationTypeName = "AUTO" | "OPT_IN" | "BUY_IN_POINTS" | "MANUAL_APPROVAL" | "REQUIRES_QUALIFICATION" | "UNKNOWN";
475
+ declare enum TournamentInstanceStatus {
476
+ PUBLISHED = 1,
477
+ REGISTER = 2,
478
+ STARTED = 3,
479
+ FINISHED = 4,
480
+ CANCELLED = 5,
481
+ FAILED = 6,
482
+ FINALIZING = 7
483
+ }
484
+ declare enum TournamentRegistrationStatus {
485
+ NOT_REGISTERED = 0,
486
+ REGISTERED = 1,
487
+ FINISHED = 2,
488
+ PENDING = 3,
489
+ CANCELLED = 4,
490
+ REGISTERED_PENDING_QUALIFICATION = 5,
491
+ QUALIFIED_PENDING_REGISTRATION = 6
492
+ }
493
+ declare enum TournamentRegistrationStatusName {
494
+ NOT_REGISTERED = "NOT_REGISTERED",
495
+ REGISTERED = "REGISTERED",
496
+ FINISHED = "FINISHED",
497
+ PENDING = "PENDING",
498
+ CANCELLED = "CANCELLED",
499
+ REGISTERED_PENDING_QUALIFICATION = "REGISTERED_PENDING_QUALIFICATION",
500
+ QUALIFIED_PENDING_REGISTRATION = "QUALIFIED_PENDING_REGISTRATION",
501
+ UNKNOWN = "UNKNOWN"
502
+ }
503
+ declare enum TournamentType {
504
+ SCHEDULED = 1,
505
+ SNG = 2,
506
+ TEST = 3
507
+ }
508
+ export interface TournamentPublicMeta {
509
+ /** Name of tournament */
510
+ name?: string;
511
+ /** 1st image */
512
+ image_url?: string;
513
+ /** 2nd image */
514
+ image_url2?: string;
515
+ /** 2nd image for mobile */
516
+ image_url2_mobile?: string;
517
+ /** Description, html capable */
518
+ description?: string;
519
+ /** Short explanation of prize pool */
520
+ prize_pool_short?: string;
521
+ /** Message to show when user is not matching to the segment allowed to register (error code 30005 in registration response) */
522
+ segment_dont_match_message?: string;
523
+ /** Short explanation of registration price */
524
+ custom_price_text?: string;
525
+ /** Indicator if the scores of other users should be shown in the leaderboard of tournament */
526
+ show_other_users_score?: boolean;
527
+ custom_section_id?: number;
528
+ only_in_custom_section?: boolean;
529
+ label_tag?: string;
530
+ custom_label_tag?: string;
531
+ featured?: boolean;
532
+ position?: number;
533
+ custom_data?: string;
534
+ }
535
+ export interface AchRelatedGame {
536
+ ach_game_id: number;
537
+ ext_game_id: string;
538
+ game_public_meta: {
539
+ name: string;
540
+ link: string;
541
+ image: string;
542
+ enabled: boolean;
543
+ game_categories?: string[];
544
+ game_provider?: string;
545
+ };
546
+ }
547
+ export interface Tournament {
548
+ /** ID of tournament template */
549
+ tournamentId?: number;
550
+ /** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */
551
+ tournamentInstanceId?: number;
552
+ /** Type of the tournament. For now only SCHEDULED is support */
553
+ tournamentType?: TournamentType;
554
+ /** Meta information about tournament that should be used to build UI */
555
+ publicMeta?: TournamentPublicMeta;
556
+ /** Cost of registration in the tournament in gamification points */
557
+ buyInAmount?: number;
558
+ /** Not in use */
559
+ prizePool?: number;
560
+ /** The time when tournament is going to start */
561
+ startTime?: string;
562
+ /** The time when tournament is going to finish */
563
+ endTime?: string;
564
+ /** The time when tournament is going to start, epoch */
565
+ startTimeTs?: number;
566
+ /** The time when tournament is going to finish, epoch */
567
+ endTimeTs?: number;
568
+ /** Number of users registered in the tournament */
569
+ registrationCount?: number;
570
+ /** Not in use */
571
+ totalCount?: number;
572
+ /** Type of registration in the tournament */
573
+ registrationType?: TournamentRegistrationType;
574
+ /** Status of registration in the tournament for current user */
575
+ tournamentRegistrationStatus?: TournamentRegistrationStatus;
576
+ /** Status of tournament instance */
577
+ tournamentInstanceStatus?: TournamentInstanceStatus;
578
+ /** flag indicating if current user is registered in the tournament */
579
+ isUserRegistered?: boolean;
580
+ /** Indicator if tournament allows later registration, when tournament is already started */
581
+ allowLateRegistration?: boolean;
582
+ /** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */
583
+ playersMinCount?: number;
584
+ /** Maximum number of participant for this tournament. When reached, new users won't be able to register */
585
+ playersMaxCount?: number;
586
+ /** Tournament duration in millisecnnds */
587
+ durationMs?: number;
588
+ /** prizes structure */
589
+ prizeStructure?: {
590
+ prizes: TournamentPrize[];
591
+ };
592
+ /** Information about current user */
593
+ tournamentPlayer?: TournamentPlayer;
594
+ /** List of casino games (or other types of entities) related to the tournament */
595
+ related_games?: AchRelatedGame[];
596
+ }
597
+ export interface TournamentPlayer {
598
+ userAltName: string;
599
+ position: number;
600
+ scores: number;
601
+ isMe: boolean;
602
+ userId: number;
603
+ avatar_id: string;
604
+ avatar_url?: string;
605
+ }
606
+ declare enum ActivityTypeLimited {
607
+ DoNothing = 8,
608
+ Points = 12,
609
+ GiveMission = 14,
610
+ StartAnotherCampaign = 15,
611
+ MiniGameAttempt = 16,
612
+ DeductPoints = 21,
613
+ ResetPoints = 22,
614
+ Popup = 30,
615
+ Inbox = 31,
616
+ Slack = 70,
617
+ Email_To_Customer_Support = 80,
618
+ Email_To_Risk_Operator = 90,
619
+ Bonus = 100,
620
+ WebHook = 200,
621
+ TagCustomer = 504,
622
+ UnTagCustomer = 505
623
+ }
624
+ export interface TournamentPrize {
625
+ name: string;
626
+ description: string;
627
+ image_url: string;
628
+ place_from: number;
629
+ place_to: number;
630
+ type: ActivityTypeLimited;
631
+ points: number;
632
+ }
633
+ export interface GetTournamentInfoResponse extends ProtocolResponse {
634
+ /** tournament info */
635
+ tournamentInfo: {
636
+ /** id of label, not in use */
637
+ labelId: number;
638
+ tournamentLobbyInfo: Tournament;
639
+ /** list of registered users */
640
+ players: TournamentPlayer[];
641
+ };
642
+ /** information about current user position */
643
+ userPosition: TournamentPlayer;
644
+ /** prizes structure */
645
+ prizeStructure?: {
646
+ prizes: TournamentPrize[];
647
+ };
648
+ }
649
+ export interface GetTournamentsResponse extends ProtocolResponse {
650
+ /** array of the tournaments */
651
+ tournaments?: Tournament[];
652
+ }
653
+ declare enum TournamentRegistrationError {
654
+ NO_ERROR = 0,
655
+ TOURNAMENT_INSTANCE_NOT_FOUND = 30001,
656
+ TOURNAMENT_REGISTRATION_NOT_ENOUGH_POINTS = 30002,
657
+ TOURNAMENT_INSTANCE_NOT_IN_STATE = 30003,
658
+ TOURNAMENT_ALREADY_REGISTERED = 30004,
659
+ TOURNAMENT_USER_DONT_MATCH_CONDITIONS = 30005,
660
+ TOURNAMENT_USER_NOT_REGISTERED = 30006,
661
+ TOURNAMENT_CANT_CHANGE_REGISTRATION_STATUS = 30007,
662
+ TOURNAMENT_MAX_REGISTRATIONS_REACHED = 30008
663
+ }
664
+ export interface TournamentRegisterResponse extends ProtocolResponse {
665
+ errCode?: TournamentRegistrationError;
666
+ }
667
+ declare enum LeaderBoardPeriodType {
668
+ DAILY = 1,
669
+ WEEKLY = 2,
670
+ MONTHLY = 3
671
+ }
672
+ export interface LeaderBoardPosition {
673
+ public_username?: string;
674
+ user_alt_name: string;
675
+ position_in_board: number;
676
+ points_accumulated: number;
677
+ is_me: boolean;
678
+ level_id: number;
679
+ avatar_id: string;
680
+ avatar_url?: string;
681
+ }
682
+ export interface LeaderBoardPublicMeta {
683
+ name: string;
684
+ description: string;
685
+ rules: string;
686
+ }
687
+ export interface LeaderBoardDetails {
688
+ board_id: number;
689
+ period_type_id: LeaderBoardPeriodType;
690
+ create_date?: number;
691
+ versiod_id: number;
692
+ reward_points: number[];
693
+ board_public_meta: LeaderBoardPublicMeta;
694
+ positions: LeaderBoardPosition[];
695
+ userPosition: LeaderBoardPosition;
696
+ }
697
+ export type TRibbon = "sale" | "hot" | "new" | "vip" | string;
698
+ /**
699
+ * TMiniGamePrize describes the information of prize in the array of prizes in the TMiniGameTemplate
700
+ */
701
+ export interface TMiniGamePrize {
702
+ /** ID of the prize */
703
+ id: number;
704
+ /** The visual name of the prize */
705
+ name: string;
706
+ /** The type of the prize, no-prize, points, bonus, manual, spin, jackpot */
707
+ prize_type: MiniGamePrizeTypeName;
708
+ /** Numeric value of the prize in case it's pints or spin type */
709
+ prize_value?: number;
710
+ /** Custom font size for the prize (desktop) */
711
+ font_size?: number;
712
+ /** Custom font size for the prize (mobile) */
713
+ font_size_mobile?: number;
714
+ /** The URL of the icon of the prize */
715
+ icon?: string;
716
+ position: number;
717
+ aknowledge_message: string;
718
+ acknowledge_dp: string;
719
+ acknowledge_action_title: string;
720
+ }
721
+ /**
722
+ * TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
723
+ */
724
+ export interface TMiniGamePlayResult {
725
+ /** Error code that represents outcome of the game play attempt. Game succeed to be played in case err_code is 0 */
726
+ err_code: SAWSpinErrorCode;
727
+ /** Optional error message */
728
+ err_message: string;
729
+ /** The prize_id that user won, details of the prize can be found in the mini-game definition */
730
+ prize_id: number;
731
+ }
732
+ /**
733
+ * TMiniGameTemplate describes the information of mini-games available for the user
734
+ */
735
+ export interface TMiniGameTemplate {
736
+ /** ID of the mini-game template */
737
+ id: number;
738
+ /** Name of the mini-game template, translated to the user language */
739
+ name: string;
740
+ /** Description of the mini-game template, translated to the user language */
741
+ description: string;
742
+ /** URL of the icon of the mini-game template */
743
+ thumbnail: string;
744
+ /** The type of the game, e.g. Spin the Wheel, Gift Box, Scratch card, MatchX etc */
745
+ saw_game_type: SAWGameTypeName;
746
+ /** How the user is charged for each game attempt e.g. Free, Points or Spin attempts */
747
+ saw_buyin_type: SAWBuyInTypeName;
748
+ /** in case of charging type 'Points', what is the points amount will be deducted from user balance */
749
+ buyin_cost_points: number;
750
+ /** in case of charging type 'Spin attempts', shows the current number of spin attempts that user has */
751
+ spin_count?: number;
752
+ /** 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 */
753
+ next_available_spin_ts: number;
754
+ /** 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 */
755
+ over_limit_message: string;
756
+ /** The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts or points. */
757
+ no_attempts_message: string;
758
+ /** Current jackpont amount, if jackpot is enabled. */
759
+ jackpot_current: number;
760
+ /** 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. */
761
+ jackpot_add_on_attempt: number;
762
+ /** 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'.
763
+ */
764
+ jackpot_symbol: string;
765
+ /** The promo image */
766
+ promo_image: string;
767
+ /** The promo text */
768
+ promo_text: string;
769
+ /** The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number */
770
+ custom_data: any;
771
+ prizes: TMiniGamePrize[];
772
+ }
773
+ /**
774
+ * TUser describes the information of the user
775
+ * The user object is returned by _smartico.api.getUserProfile() method.
776
+ * If you want to track the changes of the user profile, you can subscribe to the callback in the following way
777
+ * _smartico.on('props_change', () => console.log(_smartico.api.getUserProfile()) );
778
+ */
779
+ export interface TUserProfile {
780
+ /** The language of the user */
781
+ core_user_language: string;
782
+ /** The current points balance that user can use in the Store, Mini-games, Tournaments, etc.. */
783
+ ach_points_balance: number;
784
+ /** The amount of points that user collected in total */
785
+ ach_points_ever: number;
786
+ /**
787
+ * The array of the public tags set on the user object.
788
+ * They can be treated as server-based cookies.
789
+ * You can set tags using following method _smartico.event('core_public_tags_update', { core_public_tags: ['A', 'B'] } );
790
+ * And then you can check for the tags
791
+ */
792
+ core_public_tags: string[];
793
+ /** The ID of the current level of the user */
794
+ ach_level_current_id?: number;
795
+ /** The indicator if user is marked as test user */
796
+ core_is_test_account?: boolean;
797
+ /** The URL to the user avatar */
798
+ avatar_url?: string;
799
+ /** The username of current user */
800
+ public_username?: string;
801
+ /** THe number of unread inbox messages */
802
+ core_inbox_unread_count?: number;
803
+ }
804
+ /**
805
+ * TLevel describes the information of each level defined in the system
806
+ * There is no order of the levels, but it can be calculated using required_points property
807
+ * The current level of user can be taken from the user object using ach_level_current_id property
808
+ * The progress to the next level can be calculated using ach_points_ever and required_points properties of next level
809
+ */
810
+ export interface TLevel {
811
+ /** The ID of the Level */
812
+ id: number;
813
+ /** The name of the Level, translated to the user language */
814
+ name: string;
815
+ /** The description of the Level, translated to the user language */
816
+ description: string;
817
+ /** The URL of the image of the Level */
818
+ image: string;
819
+ /** The amount of points required to reach the Level */
820
+ required_points: number;
821
+ /** Number of points that user should collect in order to see this level */
822
+ visibility_points: number;
823
+ /**
824
+ * The counter of 1st metric used to reach the Level.
825
+ * Relevant in case of using advanced leveling logic
826
+ * https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
827
+ *
828
+ */
829
+ required_level_counter_1: number;
830
+ /**
831
+ * The counter of 2nd metric used to reach the Level.
832
+ * Relevant in case of using advanced leveling logic
833
+ * https://help.smartico.ai/welcome/more/release-notes/september-2022#new-logic-for-leveling-users
834
+ *
835
+ */
836
+ required_level_counter_2: number;
837
+ /** The custom data of the Level defined by operator in the BackOffice. Can be a JSON object, string or number */
838
+ custom_data: string;
839
+ }
840
+ /**
841
+ * TTournament describes the general information of the tournament item
842
+ */
843
+ export interface TTournament {
844
+ /** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */
845
+ instance_id: number;
846
+ /** ID of tournament template */
847
+ tournament_id: number;
848
+ /** Name of the tournament, translated to the user language */
849
+ name: string;
850
+ /** Description of the tournament, translated to the user language */
851
+ description: string;
852
+ image1: string;
853
+ image2: string;
854
+ prize_pool_short: string;
855
+ custom_price_text: string;
856
+ /** The message that should be shown to the user when the user cannot register in tournament with error code TOURNAMENT_USER_DONT_MATCH_CONDITIONS */
857
+ segment_dont_match_message: string;
858
+ /**
859
+ * The ID of the custom section where the tournament is assigned
860
+ * The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
861
+ */
862
+ custom_section_id: number;
863
+ /** The custom data of the tournament defined by operator. Can be a JSON object, string or number */
864
+ custom_data: any;
865
+ /** The indicator if the tournament is 'Featured' */
866
+ is_featured: boolean;
867
+ /** The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
868
+ ribbon: TRibbon;
869
+ /** A number is used to order the tournaments, representing their priority in the list */
870
+ priority: number;
871
+ /** Info about current player in tournament */
872
+ me?: {
873
+ /** The username of the participant */
874
+ public_username: string;
875
+ /** The URL to the avatar of the participant */
876
+ avatar_url: string;
877
+ /** The position of the participant in the tournament */
878
+ position: number;
879
+ /** The scores of the participant in the tournament */
880
+ scores: number;
881
+ };
882
+ /** Prize structure */
883
+ prizes?: {
884
+ /** The name of the prize */
885
+ name: string;
886
+ /** The description of the prize */
887
+ description: string;
888
+ /** The image of the prize */
889
+ image_url: string;
890
+ /** from-to range of the places to which this prize */
891
+ place_from: number;
892
+ place_to: number;
893
+ /** type of the prize: TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS */
894
+ type: string;
895
+ /** if the prize is points related, indicates amount of points */
896
+ points?: number;
897
+ }[];
898
+ /** The time when tournament is going to start, epoch with milliseconds */
899
+ start_time: number;
900
+ /** The time when tournament is going to finish, epoch with milliseconds */
901
+ end_time: number;
902
+ /** Type of registration in the tournament */
903
+ registration_type: TournamentRegistrationTypeName;
904
+ /** Number of users registered in the tournament */
905
+ registration_count: number;
906
+ /** flag indicating if current user is registered in the tournament */
907
+ is_user_registered: boolean;
908
+ /** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */
909
+ players_min_count: number;
910
+ /** Maximum number of participant for this tournament. When reached, new users won't be able to register */
911
+ players_max_count: number;
912
+ /** Status of registration in the tournament for current user */
913
+ registration_status: TournamentRegistrationStatusName;
914
+ /** Tournament duration in millisecnnds */
915
+ duration_ms: number;
916
+ /** Cost of registration in the tournament in gamification points */
917
+ registration_cost_points: number;
918
+ /** Indicator if tournament instance is active, means in one of the statues - PUBLISHED, REGISTED, STARTED */
919
+ is_active: boolean;
920
+ /** Indicator if user can register in this tournament instance, e.g tournament is active, max users is not reached, user is not registered yet */
921
+ is_can_register: boolean;
922
+ /** Indicator if tournament instance is cancelled (status CANCELLED) */
923
+ is_cancelled: boolean;
924
+ /** Indicator if tournament instance is finished (status FINISHED, CANCELLED OR FINIALIZING) */
925
+ is_finished: boolean;
926
+ /** Indicator if tournament instance is running (status STARTED) */
927
+ is_in_progress: boolean;
928
+ /** Indicator if tournament instance is upcoming (status PUBLISHED or REGISTER) */
929
+ is_upcoming: boolean;
930
+ }
931
+ /**
932
+ * TTournamentDetailed describes the information of the tournament item and includes list of participants, their scores and position in the tournament leaderboard
933
+ */
934
+ export interface TTournamentDetailed extends TTournament {
935
+ /** List of casino games (or other types of entities) related to the tournament */
936
+ related_games?: AchRelatedGame$1[];
937
+ /** The list of the tournament participants */
938
+ players?: {
939
+ /** The username of the participant */
940
+ public_username: string;
941
+ /** The URL to the avatar of the participant */
942
+ avatar_url: string;
943
+ /** The position of the participant in the tournament */
944
+ position: number;
945
+ /** The scores of the participant in the tournament */
946
+ scores: number;
947
+ /** The indicator if the participant is current user */
948
+ is_me: boolean;
949
+ }[];
950
+ /** The information about current user in the tournament if he is registered in the tournamnet */
951
+ me?: {
952
+ /** The username of the current user */
953
+ public_username: string;
954
+ /** The URL to the avatar of the current user */
955
+ avatar_url: string;
956
+ /** The position of the current user in the tournament */
957
+ position: number;
958
+ /** The scores of the current user in the tournament */
959
+ scores: number;
960
+ };
961
+ prizes?: {
962
+ /** The name of the prize */
963
+ name: string;
964
+ /** The description of the prize */
965
+ description: string;
966
+ /** The image of the prize */
967
+ image_url: string;
968
+ /** from-to range of the places to which this prize */
969
+ place_from: number;
970
+ place_to: number;
971
+ /** type of the prize: TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS */
972
+ type: string;
973
+ /** if the prize is points related, indicates amount of points */
974
+ points?: number;
975
+ }[];
976
+ }
977
+ /**
978
+ * TStoreCategory describes the store category item. Each store item can be assigned to 1 or more categories
979
+ */
980
+ export interface TStoreCategory {
981
+ id: number;
982
+ name: string;
983
+ order: number;
984
+ }
985
+ /**
986
+ * TStoreItem describes the information of the store item defined in the system
987
+ */
988
+ export interface TStoreItem {
989
+ /** ID of the store item */
990
+ id: number;
991
+ /** Name of the store item, translated to the user language */
992
+ name: string;
993
+ /** Description of the store item, translated to the user language */
994
+ description: string;
995
+ /** URL of the image of the store item */
996
+ image: string;
997
+ /** Type of the store item. Can be 'bonus' or 'manual'. Manual, means it's tangible item, e.g. iPhone */
998
+ type: "bonus" | "manual";
999
+ /** The price of the store item in the gamification points */
1000
+ price: number;
1001
+ /** The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
1002
+ ribbon: TRibbon;
1003
+ /**
1004
+ * 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.
1005
+ The message is translated to the user language.
1006
+ **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
1007
+ */
1008
+ limit_message: string;
1009
+ /** The priority of the store item. Can be used to sort the items in the store */
1010
+ priority: number;
1011
+ /** The list of IDs of the related items. Can be used to show the related items in the store */
1012
+ related_item_ids: number[];
1013
+ /** The indicator if the user can buy the item
1014
+ * This indicator is taking into account the segment conditions for the store item, the price of item towards users balance,
1015
+ */
1016
+ can_buy: boolean;
1017
+ /** The list of IDs of the categories where the store item is assigned, information about categories can be retrieved with getStoreCategories method */
1018
+ category_ids: number[];
1019
+ /** Number of items in the pool avaliable for the purchase.*/
1020
+ pool?: number;
1021
+ /** The T&C text for the store item */
1022
+ hint_text?: string;
1023
+ /** Purchase time to show in purchase history screen */
1024
+ purchase_ts?: number;
1025
+ /** The amount of points you can purchase an item */
1026
+ purchase_points_amount?: number;
1027
+ }
1028
+ /**
1029
+ * TAchCategory describes the badge category item. Each badge item can be assigned to 1 or more categories
1030
+ */
1031
+ export interface TAchCategory {
1032
+ id: number;
1033
+ name: string;
1034
+ order: number;
1035
+ }
1036
+ /**
1037
+ * TMissionOrBadge describes the information of mission or badge defined in the system
1038
+ */
1039
+ export interface TMissionOrBadge {
1040
+ /** ID of the mission or badge */
1041
+ id: number;
1042
+ /** Type of entity. Can be 'mission' or 'badge' */
1043
+ type: "mission" | "badge";
1044
+ /** Name of the mission or badge, translated to the user language */
1045
+ name: string;
1046
+ /** Description of the mission or badge, translated to the user language */
1047
+ description: string;
1048
+ /** Description of the mission reward if defined */
1049
+ reward: string;
1050
+ /** URL of the image of the mission or badge */
1051
+ image: string;
1052
+ /** Indicator if the mission is completed or badge is granted */
1053
+ is_completed: boolean;
1054
+ /** Indicator if the mission is locked. Means that it's visible to the user, but he cannot progress in it until it's unlocked.
1055
+ * Mission may optionally contain the explanation of what should be done to unlock it in the unlock_mission_description property
1056
+ */
1057
+ is_locked: boolean;
1058
+ /** Optional explaination of what should be done to unlock the mission */
1059
+ unlock_mission_description: string;
1060
+ /** Indicator if the mission requires opt-in. Means that user should explicitly opt-in to the mission in order to start progressing in it */
1061
+ is_requires_optin: boolean;
1062
+ /** Indicator if the user opted-in to the mission */
1063
+ is_opted_in: boolean;
1064
+ /** The amount of time in milliseconds that user has to complete the mission */
1065
+ time_limit_ms: number;
1066
+ /** The date when the mission was started, relevant for the time limited missions */
1067
+ dt_start: number;
1068
+ /** The progress of the mission in percents calculated as the aggregated relative percentage of all tasks */
1069
+ progress: number;
1070
+ /**
1071
+ * The action that should be performed when user clicks on the mission or badge
1072
+ * 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);
1073
+ * The 'dp' function will handle the CTA and will execute it in the most safe way
1074
+ */
1075
+ cta_action: string;
1076
+ /** The text of the CTA button, e.g. 'Make a deposit' */
1077
+ cta_text: string;
1078
+ /**
1079
+ * The ID of the custom section where the mission or badge is assigned
1080
+ * The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
1081
+ */
1082
+ custom_section_id: number;
1083
+ /** 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 */
1084
+ only_in_custom_section: boolean;
1085
+ /** The custom data of the mission or badge defined by operator. Can be a JSON object, string or number */
1086
+ custom_data: any;
1087
+ /** The list of tasks of the mission or badge */
1088
+ tasks: TMissionOrBadgeTask[];
1089
+ /** List of casino games (or other types of entities) related to the mission or badge */
1090
+ related_games?: AchRelatedGame$1[];
1091
+ /** The list of IDs of the categories where the badge item is assigned, information about categories can be retrieved with getAchCategories method */
1092
+ category_ids: number[];
1093
+ /** The T&C text for the missions */
1094
+ hint_text?: string;
1095
+ /** Priority (or position) of the mission in the UI. Low value indicates higher position in the UI */
1096
+ position?: number;
1097
+ /** The ribbon of the mission/badge item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon */
1098
+ ribbon?: TRibbon;
1099
+ /** ID of the completion fact from ach_completed or ach_completed_recurring tables */
1100
+ ach_completed_id?: number;
1101
+ /** Flag from achievement if the mission prize will be given only after user claims it */
1102
+ requires_prize_claim?: boolean;
1103
+ /** The date/timestamp indicating when the prize was claimed by the user */
1104
+ prize_claimed_date_ts?: number;
1105
+ }
1106
+ interface AchRelatedGame$1 {
1107
+ /** The ID of the related game */
1108
+ ext_game_id: string;
1109
+ /** Game public meta information */
1110
+ game_public_meta: {
1111
+ /** The name of the game */
1112
+ name: string;
1113
+ /** The URL to the game */
1114
+ link: string;
1115
+ /** The URL to the image of the game */
1116
+ image: string;
1117
+ /** The indicator if the game is enabled */
1118
+ enabled: boolean;
1119
+ /** The list of categories of the game */
1120
+ game_categories: string[];
1121
+ /** The name of the game provider */
1122
+ game_provider: string;
1123
+ };
1124
+ }
1125
+ /**
1126
+ * TMissionOrBadgeTask describes the information of tasks that belings to mission or badge. See also TMissionOrBadge
1127
+ */
1128
+ export interface TMissionOrBadgeTask {
1129
+ /** ID of the task */
1130
+ id: number;
1131
+ /** Name of the task, translated to the user language */
1132
+ name: string;
1133
+ /** Indicator if the task is completed */
1134
+ is_completed: boolean;
1135
+ /** The progress of the task in percents */
1136
+ progress: number;
1137
+ /** Reward for completing the task in points */
1138
+ points_reward: number;
1139
+ }
1140
+ /**
1141
+ * TMissionOptInResult describes the response of call to _smartico.api.requestMissionOptIn(mission_id) method
1142
+ */
1143
+ export interface TMissionOptInResult {
1144
+ /** Error code that represents outcome of the opt-in request. Successful opt-in in case err_code is 0 */
1145
+ err_code: number;
1146
+ /** Optional error message */
1147
+ err_message: string;
1148
+ }
1149
+ /**
1150
+ * TMissionClaimRewardResult describes the response of call to _smartico.api.requestMissionClaimReward(mission_id, ach_completed_id) method
1151
+ */
1152
+ export interface TMissionClaimRewardResult {
1153
+ /** Error code that represents outcome of the claim request. Successful claim reward in case err_code is 0 */
1154
+ err_code: number;
1155
+ /** Optional error message */
1156
+ err_message: string;
1157
+ }
1158
+ export interface TTournamentRegistrationResult {
1159
+ /** Error code that represents outcome of the tournament registration request. Successful registration in case err_code is 0 */
1160
+ err_code: TournamentRegistrationError;
1161
+ /** Optional error message */
1162
+ err_message: string;
1163
+ }
1164
+ export interface TBuyStoreItemResult {
1165
+ /** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0 */
1166
+ err_code: BuyStoreItemErrorCode;
1167
+ /** Optional error message */
1168
+ err_message: string;
1169
+ }
1170
+ export interface TGetTranslations {
1171
+ translations: {
1172
+ [key: string]: string;
1173
+ };
1174
+ }
1175
+ export interface TInboxMessage {
1176
+ /** Uniq identifier of the message. It is needed to request the message body, mark the message as read/deleted/favorite. */
1177
+ message_guid: string;
1178
+ /** Date when the message was sent */
1179
+ sent_date: string;
1180
+ /** Indicator if a message is read */
1181
+ read: boolean;
1182
+ /** Indicator if a message is added to favorites */
1183
+ favorite: boolean;
1184
+ }
1185
+ export interface TInboxMessageBody {
1186
+ /** Message title */
1187
+ title: string;
1188
+ /** Short preview body of the message */
1189
+ preview_body: string;
1190
+ /** Message icon */
1191
+ icon: string;
1192
+ /** The action that should be performed when user clicks on the message.
1193
+ * 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);
1194
+ * The 'dp' function will handle the CTA and will execute it in the most safe way.
1195
+ * If the message has a rich html body - the action will always be 'dp:inbox' which will open the inbox widget when triggered. */
1196
+ action: string;
1197
+ /** Rich HTML body of the message. */
1198
+ html_body?: string;
1199
+ /** Optional additional buttons to show in the message, available only if message has rich HTML body. Max count - 2. */
1200
+ buttons?: {
1201
+ /** The action that should be performed when user clicks on the button. The logic is the same as for message actions */
1202
+ action: string;
1203
+ /** Button text */
1204
+ text: string;
1205
+ }[];
1206
+ }
1207
+ export interface InboxMarkMessageAction {
1208
+ /** An error code representing the result of marking a message as deleted, favorite or read. Successful marking action if err_code is 0 */
1209
+ err_code: number;
1210
+ /** Optional error message */
1211
+ err_message: string;
1212
+ }
1213
+ export interface LeaderBoardDetailsT {
1214
+ /** ID of the leaderboard */
1215
+ board_id: number;
1216
+ /** Name of the leaderboard */
1217
+ name: string;
1218
+ /** Description of the leaderboard */
1219
+ description: string;
1220
+ /** Rules of the leaderboard */
1221
+ rules: string;
1222
+ /** Leaderboard period type ID */
1223
+ period_type_id: LeaderBoardPeriodType;
1224
+ /** Leaderboard points rewards */
1225
+ rewards: LeaderBoardsRewardsT[];
1226
+ /** Leaderboard users */
1227
+ users: LeaderBoardUserT[];
1228
+ /** Info about current user in leaderboard */
1229
+ me?: LeaderBoardUserT;
1230
+ }
1231
+ export interface LeaderBoardsRewardsT {
1232
+ place: number;
1233
+ points: number;
1234
+ }
1235
+ export interface LeaderBoardUserT {
1236
+ /** The username of the participant */
1237
+ public_username: string;
1238
+ /** The URL to the avatar of the participant */
1239
+ avatar_url: string;
1240
+ /** The position of the participant in the leaderboard */
1241
+ position: number;
1242
+ /** The points of the participant in the leaderboard */
1243
+ points: number;
1244
+ /** The indicator if the participant is current user */
1245
+ is_me: boolean;
1246
+ }
1247
+ export interface UserLevelExtraCountersT {
1248
+ /** The counter of 1st metric used to reach the level. */
1249
+ level_counter_1?: number;
1250
+ /** The counter of 2nd metric used to reach the level. */
1251
+ level_counter_2?: number;
1252
+ }
1253
+ export interface TSegmentCheckResult {
1254
+ segment_id: number;
1255
+ is_matching: boolean;
1256
+ }
1257
+ export interface SAWGetTemplatesResponse extends ProtocolResponse {
1258
+ templates: SAWTemplate[];
1259
+ }
1260
+ export interface GetLabelInfoResponse extends ProtocolResponse {
1261
+ settings: {
1262
+ [key: string]: string;
1263
+ };
1264
+ label_id: string;
1265
+ }
1266
+ declare enum TranslationArea {
1267
+ Casino = 1,
1268
+ Gamification = 2,
1269
+ Trading = 3,
1270
+ Archived = 4,
1271
+ Affiliation = 5,
1272
+ RetentionGames = 6,
1273
+ AffIliateAdminNew = 7
1274
+ }
1275
+ export interface GetTranslationsResponse extends ProtocolResponse {
1276
+ hash_code: number;
1277
+ translations: {
1278
+ [key: string]: string;
1279
+ };
1280
+ }
1281
+ declare enum PublicLabelSettings$1 {
1282
+ PUBLIC_API_URL = "PUBLIC_API_URL",
1283
+ RECORDING_ENABLED_FOR_ALL_USERS = "RECORDING_ENABLED_FOR_ALL_USERS",
1284
+ JS_INJECTION = "JS_INJECTION",
1285
+ GAMIFICATION_UI_MAIN = "GAMIFICATION_UI_MAIN",
1286
+ GAMIFICATION_UI_WIDGET = "GAMIFICATION_UI_WIDGET",
1287
+ GAMIFICATION_UI_MINI_GAME = "GAMIFICATION_UI_MINI_GAME",
1288
+ GAMIFICATION_UI_SETTINGS = "GAMIFICATION_UI_SETTINGS",
1289
+ GAMIFICATION_UI_MAIN_TEST = "GAMIFICATION_UI_MAIN_TEST",
1290
+ GAMIFICATION_UI_WIDGET_TEST = "GAMIFICATION_UI_WIDGET_TEST",
1291
+ GAMIFICATION_UI_SETTINGS_TEST = "GAMIFICATION_UI_SETTINGS_TEST",
1292
+ FRONT_END_ALLOWED_LANGUAGES = "FRONT_END_ALLOWED_LANGUAGES",
1293
+ FRONT_END_ALLOW_DOMAINS = "FRONT_END_ALLOW_DOMAINS",
1294
+ DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS = "DELAY_ENGAGEMENT_EXECUTION_ON_LOGIN_MS",
1295
+ SHADOW_LABEL_PUBLIC_KEY = "SHADOW_LABEL_PUBLIC_KEY",
1296
+ DYNAMIC_IMAGE_DOMAIN = "DYNAMIC_IMAGE_DOMAIN",
1297
+ GAMIFICATION_UI_LEVEL_ENABLED = "GAMIFICATION_UI_LEVEL_ENABLED",
1298
+ GAMIFICATION_UI_LEVEL_IMAGE_MOB = "GAMIFICATION_UI_LEVEL_IMAGE_MOB",
1299
+ GAMIFICATION_UI_LEVEL_IMAGE_DESK = "GAMIFICATION_UI_LEVEL_IMAGE_DESK",
1300
+ GAMIFICATION_LEVELS_LOGIC2 = "GAMIFICATION_LEVELS_LOGIC2",
1301
+ GAMIFICATION_LEVELS_LOGIC3 = "GAMIFICATION_LEVELS_LOGIC2",
1302
+ AVATAR_CUSTOM_IMAGE_MAX_ID = "AVATAR_CUSTOM_IMAGE_MAX_ID",
1303
+ AVATAR_CUSTOM_IMAGE_FOLDER = "AVATAR_CUSTOM_IMAGE_FOLDER",
1304
+ GAMIFICATION_SHOW_POWERED_BY = "GAMIFICATION_SHOW_POWERED_BY",
1305
+ _system_leader_board_mask_username = "_system_leader_board_mask_username",
1306
+ INBOX_PUBLIC_CDN = "INBOX_PUBLIC_CDN"
1307
+ }
1308
+ interface PublicProperties$1 {
1309
+ core_user_language?: string;
1310
+ ach_points_balance?: number;
1311
+ ach_points_ever?: number;
1312
+ ach_level_current_id?: number;
1313
+ ach_level_current?: string;
1314
+ core_is_test_account?: boolean;
1315
+ ach_gamification_in_control_group?: boolean;
1316
+ }
1317
+ export interface ResponseIdentify extends ProtocolResponse {
1318
+ user_id: number;
1319
+ ext_user_id: string;
1320
+ public_username: string;
1321
+ avatar_id: string;
1322
+ job: boolean;
1323
+ props?: PublicProperties$1;
1324
+ pubic_username_set: boolean;
1325
+ }
1326
+ declare enum InboxMessageType {
1327
+ Custom = 0,
1328
+ MissionCompleted = 1,
1329
+ MissionUnlocked = 2,
1330
+ LeaderboardWon = 3,
1331
+ LevelChanged = 4,
1332
+ BonusGiven = 5,
1333
+ PointsAdded = 6,
1334
+ PointsUsed = 7,
1335
+ PersonalMessage = 8
1336
+ }
1337
+ export interface InboxMessageBody {
1338
+ action: string;
1339
+ body: string;
1340
+ type: InboxMessageType;
1341
+ image: string;
1342
+ title: string;
1343
+ html_body: string;
1344
+ additional_buttons?: {
1345
+ inbox_cta_text: string;
1346
+ action: string;
1347
+ }[];
1348
+ }
1349
+ export interface InboxMessage {
1350
+ createDate: string;
1351
+ body: InboxMessageBody;
1352
+ engagement_uid: string;
1353
+ is_read: boolean;
1354
+ is_starred: boolean;
1355
+ is_deleted?: boolean;
1356
+ }
1357
+ export interface GetInboxMessagesResponse extends ProtocolResponse {
1358
+ log: InboxMessage[];
1359
+ }
1360
+ export interface MarkInboxMessageReadResponse extends ProtocolMessage {
1361
+ errCode: number;
1362
+ errMsg?: string;
1363
+ }
1364
+ export interface MarkInboxMessageStarredResponse extends ProtocolMessage {
1365
+ errCode: number;
1366
+ errMsg?: string;
1367
+ }
1368
+ export interface MarkInboxMessageDeletedResponse extends ProtocolMessage {
1369
+ errCode: number;
1370
+ errMsg?: string;
1371
+ }
1372
+ export interface AchievementOptinResponse extends ProtocolResponse {
1373
+ }
1374
+ export interface AchievementPublicMeta {
1375
+ description?: string;
1376
+ unlock_mission_description?: string;
1377
+ custom_data?: string;
1378
+ cta_text?: string;
1379
+ cta_action?: string;
1380
+ label_tag?: string;
1381
+ custom_label_tag?: string;
1382
+ reward?: string;
1383
+ image_url?: string;
1384
+ name?: string;
1385
+ position?: number;
1386
+ hide_tasks?: boolean;
1387
+ hide_locked_mission?: boolean;
1388
+ custom_section_id?: number;
1389
+ only_in_custom_section?: boolean;
1390
+ hint_text?: string;
1391
+ hide_badge_from_ui?: boolean;
1392
+ show_badge_first_task_completed?: boolean;
1393
+ }
1394
+ declare enum AchievementStatus {
1395
+ Draft = 1,
1396
+ AvailableUnlocked = 2,
1397
+ AvailableLocked = 3,
1398
+ Archived = 4,
1399
+ FeaturedManually = 5,
1400
+ FeaturedAI = 6
1401
+ }
1402
+ export interface AchievementTaskPublicMeta {
1403
+ name?: string;
1404
+ }
1405
+ declare enum AchievementTaskType {
1406
+ CompleteAchievement = 1,
1407
+ UnlockAchievement = 2
1408
+ }
1409
+ declare enum AchievementType {
1410
+ Mission = 1,
1411
+ Badge = 2
1412
+ }
1413
+ declare enum ScheduledMissionType {
1414
+ Future = 1,
1415
+ Past = 2,
1416
+ Present = 3
1417
+ }
1418
+ export interface UserAchievementTask {
1419
+ task_id?: number;
1420
+ task_public_meta?: AchievementTaskPublicMeta;
1421
+ points_reward?: number;
1422
+ task_type_id: AchievementTaskType;
1423
+ isCompleted?: boolean;
1424
+ userExecutedCount?: number;
1425
+ userProgress?: number;
1426
+ lastExecutionDate: string;
1427
+ unlocked_by_mission_id?: number;
1428
+ unlocked_by_level_id?: number;
1429
+ }
1430
+ export interface UserAchievement {
1431
+ ach_id?: number;
1432
+ ach_type_id?: AchievementType;
1433
+ ach_public_meta?: AchievementPublicMeta;
1434
+ isCompleted?: boolean;
1435
+ isLocked?: boolean;
1436
+ requiresOptin?: boolean;
1437
+ isOptedIn?: boolean;
1438
+ start_date?: string;
1439
+ start_date_ts?: number;
1440
+ time_limit_ms?: number;
1441
+ progress?: number;
1442
+ complete_date?: string;
1443
+ unlock_date?: string;
1444
+ milliseconds_till_available?: number;
1445
+ completed_tasks?: number;
1446
+ achievementTasks?: UserAchievementTask[];
1447
+ ach_status_id?: AchievementStatus;
1448
+ scheduledMissionType?: ScheduledMissionType;
1449
+ related_games?: AchRelatedGame[];
1450
+ active_from_ts?: number;
1451
+ ach_categories?: number[];
1452
+ ach_completed_id?: number;
1453
+ requires_prize_claim?: boolean;
1454
+ prize_claimed_date_ts?: number;
1455
+ }
1456
+ export interface GetAchievementMapResponse extends ProtocolResponse {
1457
+ achievements?: UserAchievement[];
1458
+ }
1459
+ export interface AchCategoryPublicMeta {
1460
+ name?: string;
1461
+ order?: number;
1462
+ }
1463
+ export interface AchCategory {
1464
+ id?: number;
1465
+ publicMeta?: AchCategoryPublicMeta;
1466
+ }
1467
+ export interface GetAchCategoriesResponse extends ProtocolResponse {
1468
+ categories: AchCategory[];
1469
+ }
1470
+ export interface AchClaimPrizeResponse extends ProtocolResponse {
1471
+ }
1472
+ export interface LevelPublicMeta {
1473
+ /** Description of level, HTML capabable */
1474
+ description?: string;
1475
+ /** URL to the image of level */
1476
+ image_url?: string;
1477
+ /** Name of level */
1478
+ name?: string;
1479
+ /** Number of points that user should have collected in order to see this level */
1480
+ visibility_points?: number;
1481
+ /** X & Y coordinates of level on the visual mission map, for desktop and mobile */
1482
+ position?: {
1483
+ mx: number;
1484
+ my: number;
1485
+ dx: number;
1486
+ dy: number;
1487
+ };
1488
+ /**custom data as string or JSON string that can be used in UIWidget */
1489
+ custom_data: string;
1490
+ }
1491
+ export interface Level {
1492
+ level_id: number;
1493
+ level_public_meta: LevelPublicMeta;
1494
+ required_points: number;
1495
+ is_first_level: boolean;
1496
+ /** Internal status of level. Not in use right now on the front-end */
1497
+ level_status_id: number;
1498
+ required_level_counter_1: number;
1499
+ required_level_counter_2: number;
1500
+ general_level_progress: number;
1501
+ }
1502
+ export interface GetLevelMapResponse extends ProtocolResponse {
1503
+ levels: Level[];
1504
+ }
1505
+ declare class WSAPI {
1506
+ private api;
1507
+ private onUpdateCallback;
1508
+ /** @private */
1509
+ constructor(api: SmarticoAPI);
1510
+ /** Returns information about current user
1511
+ * Example usage:
1512
+ * ```
1513
+ * _smartico.api.getUserProfile().then((result) => {
1514
+ * console.log(result);
1515
+ * });
1516
+ * ```
1517
+ * */
1518
+ getUserProfile(): TUserProfile;
1519
+ /** Check if user belongs to specific segments
1520
+ * Example usage:
1521
+ * ```
1522
+ * _smartico.api.checkSegmentMatch(1).then((result) => {
1523
+ * console.log(result);
1524
+ * });
1525
+ * ```
1526
+ */
1527
+ checkSegmentMatch(segment_id: number): Promise<boolean>;
1528
+ /** Check if user belongs to specific list of segments
1529
+ * Example usage:
1530
+ * ```
1531
+ * _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
1532
+ * console.log(result);
1533
+ * });
1534
+ * ```
1535
+ */
1536
+ checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]>;
1537
+ /** Returns all the levels available the current user
1538
+ * Example usage:
1539
+ * ```
1540
+ * _smartico.api.getLevels().then((result) => {
1541
+ * console.log(result);
1542
+ * });
1543
+ * ```
1544
+ */
1545
+ getLevels(): Promise<TLevel[]>;
1546
+ /** Returns all the missions available the current user.
1547
+ * The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
1548
+ * Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
1549
+ * The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
1550
+ * Example usage:
1551
+ * ```
1552
+ * _smartico.api.getMissions().then((result) => {
1553
+ * console.log(result);
1554
+ * });
1555
+ * ```
1556
+ /**
1557
+ * @param params
1558
+ */
1559
+ getMissions({ onUpdate }?: {
1560
+ onUpdate?: (data: TMissionOrBadge[]) => void;
1561
+ }): Promise<TMissionOrBadge[]>;
1562
+ /** Returns all the badges available the current user */
1563
+ getBadges(): Promise<TMissionOrBadge[]>;
1564
+ /**
1565
+ * Returns the extra counters for the current user level.
1566
+ * These are counters that are configured for each Smartico client separatly by request.
1567
+ * For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
1568
+ * Example usage:
1569
+ * ```
1570
+ * _smartico.api.getUserLevelExtraCounters().then((result) => {
1571
+ * console.log(result);
1572
+ * });
1573
+ * ```
1574
+ */
1575
+ getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
1576
+ /** Returns all the store items available the current user
1577
+ * Example usage:
1578
+ * ```
1579
+ * _smartico.api.getStoreItems().then((result) => {
1580
+ * console.log(result);
1581
+ * });
1582
+ */
1583
+ getStoreItems(): Promise<TStoreItem[]>;
1584
+ /** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
1585
+ * Example usage:
1586
+ * ```
1587
+ * _smartico.api.buyStoreItem(1).then((result) => {
1588
+ * console.log(result);
1589
+ * });
1590
+ */
1591
+ buyStoreItem(item_id: number): Promise<TBuyStoreItemResult>;
1592
+ /** Returns store categories */
1593
+ getStoreCategories(): Promise<TStoreCategory[]>;
1594
+ /** Returns store purchased items based on the provided parameters. "From" and "to" indicate the range of items to be fetched.
1595
+ * The maximum number of messages per request is limited to 20.
1596
+ * You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
1597
+ * This functions return list of purchased items.
1598
+ * The "onUpdate" callback will be triggered when the user receives a new purchased item. It will provide an updated list of items, ranging from 0 to 20, to the onUpdate callback function. */
1599
+ /**
1600
+ * @param params
1601
+ */
1602
+ storeGetPurchasedItems({ from, to, onUpdate }?: {
1603
+ from?: number;
1604
+ to?: number;
1605
+ onUpdate?: (data: TStoreItem[]) => void;
1606
+ }): Promise<TStoreItem[]>;
1607
+ /** Returns missions & badges categories */
1608
+ getAchCategories(): Promise<TAchCategory[]>;
1609
+ /** Returns the list of mini-games available for user
1610
+ * The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
1611
+ * The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback. */
1612
+ /**
1613
+ /**
1614
+ * @param params
1615
+ */
1616
+ getMiniGames({ onUpdate }?: {
1617
+ onUpdate?: (data: TMiniGameTemplate[]) => void;
1618
+ }): Promise<TMiniGameTemplate[]>;
1619
+ /** Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code */
1620
+ playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
1621
+ /** Requests an opt-in for the specified mission_id. Returns the err_code. */
1622
+ requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult>;
1623
+ /** Request for claim reward for the specified mission id. Returns the err_code. */
1624
+ requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult>;
1625
+ /** Returns all the active instances of tournaments
1626
+ * The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
1627
+ * The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.*/
1628
+ /**
1629
+ * @param params
1630
+ */
1631
+ getTournamentsList({ onUpdate }?: {
1632
+ onUpdate?: (data: TTournament[]) => void;
1633
+ }): Promise<TTournament[]>;
1634
+ /** Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players */
1635
+ getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed>;
1636
+ /** Requests registration for the specified tournament instance. Returns the err_code. */
1637
+ registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult>;
1638
+ /** Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
1639
+ For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
1640
+ */
1641
+ getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT>;
1642
+ /** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
1643
+ * The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
1644
+ * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
1645
+ * This functions return list of messages without the body of the message.
1646
+ * To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
1647
+ * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
1648
+ * The "onUpdate" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function. */
1649
+ /**
1650
+ * @param params
1651
+ */
1652
+ getInboxMessages({ from, to, onlyFavorite, onUpdate }?: {
1653
+ from?: number;
1654
+ to?: number;
1655
+ onlyFavorite?: boolean;
1656
+ onUpdate?: (data: TInboxMessage[]) => void;
1657
+ }): Promise<TInboxMessage[]>;
1658
+ /** Returns the message body of the specified message guid. */
1659
+ getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody>;
1660
+ /** Requests to mark inbox message with specified guid as read */
1661
+ markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction>;
1662
+ /** Requests to mark all inbox messages as read */
1663
+ markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction>;
1664
+ /** Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove. */
1665
+ markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction>;
1666
+ /** Requests to delete inbox message */
1667
+ deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction>;
1668
+ /** Requests to delete all inbox messages */
1669
+ deleteAllInboxMessages(): Promise<InboxMarkMessageAction>;
1670
+ /** Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office. */
1671
+ getTranslations(lang_code: string): Promise<TGetTranslations>;
1672
+ private updateOnSpin;
1673
+ private updateOnAddSpin;
1674
+ private updateOnPrizeWin;
1675
+ private updateMissionsOnOptIn;
1676
+ private updateTournamentsOnRegistration;
1677
+ private updateInboxMessages;
1678
+ private updateEntity;
1679
+ }
1680
+ export interface GetAchievementsUserInfoResponse extends ProtocolResponse {
1681
+ level_counter_1?: number;
1682
+ level_counter_2?: number;
1683
+ }
1684
+ export interface Tracker {
1685
+ label_api_key: string;
1686
+ userPublicProps: any;
1687
+ on: (callBackKey: ClassId, func: (data: any) => void) => void;
1688
+ getLabelSetting: (key: PublicLabelSettings$1) => any;
1689
+ }
1690
+ export interface IOptions {
1691
+ logger?: ILogger;
1692
+ logCIDs?: ClassId[];
1693
+ logHTTPTiming?: boolean;
1694
+ tracker?: Tracker;
1695
+ }
1696
+ export type MessageSender = (message: any, publicApuUrl?: string, expectCID?: ClassId) => Promise<any>;
1697
+ declare class SmarticoAPI {
1698
+ private label_api_key;
1699
+ private brand_api_key;
1700
+ private messageSender;
1701
+ private publicUrl;
1702
+ private wsUrl;
1703
+ private inboxCdnUrl;
1704
+ private partnerUrl;
1705
+ avatarDomain: string;
1706
+ private logger;
1707
+ private logCIDs;
1708
+ private logHTTPTiming;
1709
+ tracker?: Tracker;
1710
+ constructor(label_api_key: string, brand_api_key: string, messageSender: MessageSender, options?: IOptions);
1711
+ static getEnvDnsSuffix(label_api_key: string): string;
1712
+ static getEnvId(label_api_key: string): number;
1713
+ static getCleanLabelApiKey(label_api_key: string): string;
1714
+ static getPublicUrl(label_api_key: string): string;
1715
+ static getPublicWsUrl(label_api_key: string): string;
1716
+ static getAvatarUrl(label_api_key: string): string;
1717
+ private send;
1718
+ private buildMessage;
1719
+ coreReportCustomEvent(user_ext_id: string, eventType: string, payload?: any): Promise<any>;
1720
+ coreGetTranslations(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
1721
+ coreIdentifyLabel(user_ext_id: string, cacheSec?: number): Promise<GetLabelInfoResponse>;
1722
+ coreIdentifyUser(user_ext_id: string): Promise<ResponseIdentify>;
1723
+ coreChangeUsername(user_ext_id: string, public_username_custom: string): Promise<{
1724
+ public_username_custom: string;
1725
+ }>;
1726
+ coreCheckSegments(user_ext_id: string, segment_id: number[]): Promise<TSegmentCheckResult[]>;
1727
+ sawGetTemplates(user_ext_id: string, lang?: string, is_visitor_mode?: boolean): Promise<SAWGetTemplatesResponse>;
1728
+ sawGetTemplatesT(user_ext_id: string): Promise<TMiniGameTemplate[]>;
1729
+ doAcknowledgeRequest(user_ext_id: string, request_id: string): Promise<SAWDoAknowledgeResponse>;
1730
+ sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise<SAWDoSpinResponse>;
1731
+ missionOptIn(user_ext_id: string, mission_id: number): Promise<AchievementOptinResponse>;
1732
+ missionClaimPrize(user_ext_id: string, mission_id: number, ach_completed_id: number): Promise<AchClaimPrizeResponse>;
1733
+ registerInTournament(user_ext_id: string, tournamentInstanceId: number): Promise<TournamentRegisterResponse>;
1734
+ buyStoreItem(user_ext_id: string, itemId: number): Promise<BuyStoreItemResponse>;
1735
+ inboxGetMessages(user_ext_id: string, limit?: number, offset?: number): Promise<GetInboxMessagesResponse>;
1736
+ storeGetItems(user_ext_id: string): Promise<GetStoreItemsResponse>;
1737
+ storeGetItemsT(user_ext_id: string): Promise<TStoreItem[]>;
1738
+ storeGetCategories(user_ext_id: string): Promise<GetCategoriesStoreResponse>;
1739
+ storeGetCategoriesT(user_ext_id: string): Promise<TStoreCategory[]>;
1740
+ storeGetPurchasedItems(user_ext_id: string, limit?: number, offset?: number): Promise<GetStoreHistoryResponse>;
1741
+ storeGetPurchasedItemsT(user_ext_id: string, from?: number, to?: number): Promise<TStoreItem[]>;
1742
+ missionsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
1743
+ missionsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
1744
+ getUserGamificationInfo(user_ext_id: string): Promise<GetAchievementsUserInfoResponse>;
1745
+ getUserGamificationInfoT(user_ext_id: string): Promise<UserLevelExtraCountersT>;
1746
+ achGetCategories(user_ext_id: string): Promise<GetAchCategoriesResponse>;
1747
+ achGetCategoriesT(user_ext_id: string): Promise<TAchCategory[]>;
1748
+ badgetsGetItems(user_ext_id: string): Promise<GetAchievementMapResponse>;
1749
+ badgetsGetItemsT(user_ext_id: string): Promise<TMissionOrBadge[]>;
1750
+ tournamentsGetLobby(user_ext_id: string): Promise<GetTournamentsResponse>;
1751
+ tournamentsGetLobbyT(user_ext_id: string): Promise<TTournament[]>;
1752
+ tournamentsGetInfo(user_ext_id: string, tournamentInstanceId: number): Promise<GetTournamentInfoResponse>;
1753
+ tournamentsGetInfoT(user_ext_id: string, tournamentInstanceId: number): Promise<TTournamentDetailed>;
1754
+ leaderboardGet(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean): Promise<LeaderBoardDetails>;
1755
+ leaderboardsGetT(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean): Promise<LeaderBoardDetailsT>;
1756
+ levelsGet(user_ext_id: string): Promise<GetLevelMapResponse>;
1757
+ levelsGetT(user_ext_id: string): Promise<TLevel[]>;
1758
+ getTranslationsT(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
1759
+ getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean): Promise<GetInboxMessagesResponse>;
1760
+ getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean): Promise<TInboxMessage[]>;
1761
+ getInboxMessageBody(messageGuid: string): Promise<InboxMessageBody>;
1762
+ getInboxMessageBodyT(messageGuid: string): Promise<TInboxMessageBody>;
1763
+ markInboxMessageRead(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageReadResponse>;
1764
+ markAllInboxMessageRead(user_ext_id: string): Promise<MarkInboxMessageReadResponse>;
1765
+ markUnmarkInboxMessageAsFavorite(user_ext_id: string, messageGuid: string, mark: boolean): Promise<MarkInboxMessageStarredResponse>;
1766
+ deleteInboxMessage(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageDeletedResponse>;
1767
+ deleteAllInboxMessages(user_ext_id: string): Promise<MarkInboxMessageDeletedResponse>;
1768
+ getWSCalls(): WSAPI;
1769
+ }
1770
+ export interface SmarticoClearParams {
1771
+ keepCallBacks: boolean;
1772
+ }
1773
+ export interface RequestBase {
1774
+ cid?: number;
1775
+ ts?: number;
1776
+ uuid?: string;
1777
+ }
1778
+ export interface RequestClientEngagmentBase extends RequestBase {
1779
+ engagement_uid: string;
1780
+ activityType: CJMActivityType;
1781
+ }
1782
+ export interface RequestClientEngagementAction extends RequestClientEngagmentBase {
1783
+ action?: string;
1784
+ }
1785
+ export interface RequestClientEngagementFailed extends RequestClientEngagmentBase {
1786
+ action?: string;
1787
+ reason?: string;
1788
+ }
1789
+ declare enum EWidgetType {
1790
+ Achievements2 = "achievements2",
1791
+ Achievements = "achievements",
1792
+ ShortInfo1 = "short_info1",
1793
+ ShortInfo = "short_info",
1794
+ Tournaments = "tournaments",
1795
+ Store = "store",
1796
+ Inbox = "inbox",
1797
+ Missions = "missions",
1798
+ MiniGame = "mini-game",
1799
+ MatchX = "match-x",
1800
+ MatchXNew = "match-x-2",
1801
+ CustomSection = "custom-section",
1802
+ InboxWidget = "inbox-widget",
1803
+ UIWidget = "ui-widget"
1804
+ }
1805
+ declare enum EXTERNAL_CALLBACK_KEY {
1806
+ INIT = "init",
1807
+ IDENTIFY = "identify",
1808
+ LOGIN = "login",
1809
+ LOGOUT = "logout",
1810
+ USER_PROPS_CHANGE = "props_change",
1811
+ SESSION_BASED_DP_DETECTED = "session_based_dp_detected",
1812
+ GF_CLOSING = "gf_closing",
1813
+ GF_STARTING = "gf_starting",
1814
+ GF_STARTED = "gf_started",
1815
+ SAW_STARTING = "saw_starting",
1816
+ INBOX_STARTING = "inbox_starting",
1817
+ PROTOCOL_ERROR = "protocol_error",
1818
+ MNIGAME_WIN = "mini_game_win",
1819
+ ACH_GAME_OPENING = "ach_game_opening"
1820
+ }
1821
+ declare enum DpType {
1822
+ AskPushPermissions = "ask_push_permissions",
1823
+ Ok = "ok",
1824
+ Cancel = "cancel",
1825
+ Close = "close",
1826
+ Go = "go",
1827
+ Inbox = "inbox",
1828
+ GfMain = "gf",
1829
+ Activity = "gf_activity",
1830
+ Missions = "gf_missions",
1831
+ Badges = "gf_badges",
1832
+ LeaderBoard = "gf_board",
1833
+ Tournaments = "gf_tournaments",
1834
+ LeaderBoardPrev = "gf_board_previous",
1835
+ LeaderBoardRules = "gf_board_rules",
1836
+ Bonuses = "gf_bonuses",
1837
+ Levels = "gf_levels",
1838
+ Saw = "gf_saw",
1839
+ MatchX = "gf_matchx",
1840
+ Store = "gf_store",
1841
+ Settings = "gf_settings",
1842
+ Section = "gf_section",
1843
+ GfClose = "gf_close",
1844
+ ChangeNickname = "gf_change_nickname",
1845
+ ChangeAvatar = "gf_change_avatar",
1846
+ Submit = "submit",
1847
+ Action = "action"
1848
+ }
1849
+ export interface DeepLinkParams {
1850
+ [key: string]: string;
1851
+ }
1852
+ export interface DeepLink {
1853
+ action: DpType;
1854
+ params?: DeepLinkParams;
1855
+ actionToReport?: string;
1856
+ }
1857
+ export interface IVisitorGameParams {
1858
+ template_id: number;
1859
+ onBeforePlay: () => boolean;
1860
+ onWin: (prize: SAWPrize) => void;
1861
+ frame_id: string;
1862
+ }
1863
+ export interface IWidgetParams {
1864
+ iframe: string;
1865
+ zoom: number;
1866
+ height: "auto" | string;
1867
+ theme: string;
1868
+ wuuid: string;
1869
+ withBridge?: any;
1870
+ noQuestionMark?: any;
1871
+ inline?: boolean;
1872
+ force_mobile?: boolean;
1873
+ }
1874
+ declare enum ConnectionStatus {
1875
+ OPEN = 0,
1876
+ CLOSED = 1
1877
+ }
1878
+ export interface TrackerInterface {
1879
+ log?: (message: string) => void;
1880
+ clear?: (params: SmarticoClearParams) => void;
1881
+ logout?: (payload: any) => void;
1882
+ reportEngagmentAction: (message: RequestClientEngagementAction) => void;
1883
+ reportEngagmentFail: (message: RequestClientEngagementFailed) => void;
1884
+ reportEngagmentImpression: (message: RequestClientEngagementFailed) => void;
1885
+ requestPushPermissions: () => void;
1886
+ executeNativeDp: (dp: string) => void;
1887
+ executeGfDp: (dp: DeepLink) => void;
1888
+ executeManualDP?: (deepLink: string, engagement_uid?: string, activityType?: CJMActivityType) => void;
1889
+ promoMessageClosed: () => void;
1890
+ connectionStatus?: ConnectionStatus;
1891
+ suspendPopups?: (flag: boolean) => void;
1892
+ suspendInbox?: (flag: boolean) => void;
1893
+ registerNativePushToken?: (token: string, platform: PushClientPlatform, app_package_id: any) => void;
1894
+ registerHandler?: (cid: ClassId, handler: (o: any) => void) => void;
1895
+ triggerExternalCallBack?: (callBackKey: EXTERNAL_CALLBACK_KEY | number, ...args: any[]) => void;
1896
+ getExtUserId?: () => string;
1897
+ bSuspendPopups?: boolean;
1898
+ identify?: (ext_user_id: string, hash: string, payload: any, visitor_id: string) => void;
1899
+ changeLanguage?: (lang: string) => void;
1900
+ getPublicProps?: () => PublicProperties;
1901
+ getLabelSetting?: (key: PublicLabelSettings) => any;
1902
+ getParams?: () => typeof TrackerParams;
1903
+ setNickname?: (nickname: string) => void;
1904
+ setAvatar?: (avatar_id: string) => void;
1905
+ setLoginPayload?: (payload: any) => void;
1906
+ sendServerError?: (message: string) => void;
1907
+ sendServerDebug?: (message: string) => void;
1908
+ sendAnalytics?: (activity_id: ClientActivityRequestId, type: "view" | "click" | "other", view_time_sec?: number, more?: any) => void;
1909
+ sendRow: (cid: ClassId, toIdentified: boolean, data?: any) => string;
1910
+ miniGame?: (saw_template_id: string, params: IWidgetParams) => void;
1911
+ showWidget?: (widgetType: EWidgetType, params: IWidgetParams) => void;
1912
+ showVisitorGame?: (params: IVisitorGameParams) => void;
1913
+ convertVisitorGame?: (visitor_win_uuid: string) => void;
1914
+ isIdenfitied?: () => boolean;
1915
+ }
1916
+ declare const TrackerParams: {
1917
+ brand_key: any;
1918
+ debug: boolean;
1919
+ server: any;
1920
+ simulation_mode: boolean;
1921
+ gamification_wrapper_mode: boolean;
1922
+ generate_visit: boolean;
1923
+ lang: string;
1924
+ };
1925
+ declare const CallBackDefaultParams: {};
1926
+ declare class GamificationEngine {
1927
+ private static _instance;
1928
+ private readonly _tracker;
1929
+ private readonly _socketPromises;
1930
+ private readonly _socketListeners;
1931
+ static instance(tracker: TrackerInterface): GamificationEngine;
1932
+ private constructor();
1933
+ doGetLevels: () => Promise<any>;
1934
+ doGetMissions: () => Promise<any>;
1935
+ doOptinMission: (achievementId: number) => Promise<any>;
1936
+ doClaimRewardMission: (achievementId: number) => Promise<any>;
1937
+ doGetTournaments: () => Promise<any>;
1938
+ doGetTournamentLobby: (tournamentInstanceId: number) => Promise<any>;
1939
+ doTournamentRegister: (tournamentInstanceId: number) => Promise<any>;
1940
+ private socketRequest;
1941
+ private socketResponse;
1942
+ private listen;
1943
+ private notify;
1944
+ }
1945
+ declare enum ClientEventTypes {
1946
+ client_action = "client_action",
1947
+ update_sensitive_properties = "update_sensitive_properties",
1948
+ core_language_changed = "core_language_changed",
1949
+ core_cannot_open_gamification = "core_cannot_open_gamification",
1950
+ core_set_last_login_entry = "core_set_last_login_entry",
1951
+ gf_nickname_changed = "gf_nickname_changed",
1952
+ gf_avatar_changed = "gf_avatar_changed"
1953
+ }
1954
+ declare class Smartico {
1955
+ private static tracker;
1956
+ private static trackerShadow;
1957
+ private static initParams;
1958
+ private static initLabelApiKey;
1959
+ private static shadowQueue;
1960
+ private static shadowInterval;
1961
+ static gf: GamificationEngine;
1962
+ static api: WSAPI;
1963
+ private static readonly gf_api_promises;
1964
+ private static readonly gf_api_handlers;
1965
+ constructor();
1966
+ static startIntegrationWithIframe(): void;
1967
+ private static checkInit;
1968
+ private static checkSuccessfullyIdentify;
1969
+ private static initShadowLabel;
1970
+ private static onlineTrackerInterval;
1971
+ private static onlineTrackerLastUserId;
1972
+ private static onlineTrackerLastLanguage;
1973
+ private static getUserID;
1974
+ private static getUserHash;
1975
+ private static getLanguage;
1976
+ private static getVisitorGameWinUUID;
1977
+ private static getVisitorID;
1978
+ private static onlinetrackerByInterval;
1979
+ static init(label_api_key: string, params: typeof TrackerParams): void;
1980
+ static initVisitorMode(label_api_key: string, params: typeof TrackerParams): void;
1981
+ static clear(params?: SmarticoClearParams): void;
1982
+ static getPublicProps(): PublicProperties;
1983
+ static sendServerError(message: string): void;
1984
+ static sendServerDebug(message: string): void;
1985
+ static requestPushPermissions(): void;
1986
+ static registerNativePushToken(token: string, platform?: PushClientPlatform, app_package_id?: string): void;
1987
+ static identify(ext_user_id: string, hash: string, payload: any): Promise<void>;
1988
+ static online(ext_user_id: string, language: string, user_hash: string): Promise<void>;
1989
+ static login(language?: string, payload?: any): void;
1990
+ static logout(payload?: any): void;
1991
+ static changeLanguage(language: string): void;
1992
+ static event(eventType: ClientEventTypes, payload?: any): void;
1993
+ static sendRow(cid: ClassId, payload?: any): void;
1994
+ static action(actionValue: any): void;
1995
+ static setLoginEntry(core_last_login_entry: string): void;
1996
+ static setAvatar(avatar_id: string): void;
1997
+ static setNickname(nickname: string): void;
1998
+ static dp(deepLink: string): void;
1999
+ static miniGame(saw_template_id: string, params: IWidgetParams): void;
2000
+ static showWidget(widgetType: EWidgetType, params: IWidgetParams): void;
2001
+ static sendAnalytics(activity_id: ClientActivityRequestId, view_time_sec?: number): void;
2002
+ static on(callBackKey: EXTERNAL_CALLBACK_KEY, f: null | (() => void), params?: typeof CallBackDefaultParams): void;
2003
+ static suspendPopups(flag: boolean): void;
2004
+ static suspendInbox(flag: boolean): void;
2005
+ static parseUrl(): any;
2006
+ static parseUrlHash(): any;
2007
+ static isMobile(): boolean;
2008
+ static showVisitorGame(params: IVisitorGameParams): void;
2009
+ static convertVisitorGame(visitor_win_uuid: string): void;
2010
+ private static customScripts;
2011
+ }
2012
+ export { Smartico as default, };
2013
+ export {};