@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,445 +1,445 @@
1
- import { SmarticoAPI } from "../SmarticoAPI";
2
- import { InboxMarkMessageAction, LeaderBoardDetailsT, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionClaimRewardResult, TMissionOptInResult, TMissionOrBadge, TSegmentCheckResult, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUICustomSection, TUserProfile, UserLevelExtraCountersT } from "./WSAPITypes";
3
- import { LeaderBoardPeriodType } from "../Leaderboard";
4
- import { JackpotDetails, JackpotsOptinResponse, JackpotsOptoutResponse } from "../Jackpots";
5
- /** @group General API */
6
- export declare class WSAPI {
7
- private api;
8
- private onUpdateCallback;
9
- private jackpotGetSignature;
10
- /** @private */
11
- constructor(api: SmarticoAPI);
12
- /** Returns information about current user
13
- *
14
- * **Example**:
15
- * ```
16
- * _smartico.api.getUserProfile().then((result) => {
17
- * console.log(result);
18
- * });
19
- * ```
20
- * **Visitor mode: not supported**
21
- * */
22
- getUserProfile(): TUserProfile;
23
- /** Check if user belongs to specific segments
24
- * **Example**:
25
- * ```
26
- * _smartico.api.checkSegmentMatch(1).then((result) => {
27
- * console.log(result);
28
- * });
29
- * ```
30
- *
31
- * **Visitor mode: not supported**
32
- */
33
- checkSegmentMatch(segment_id: number): Promise<boolean>;
34
- /** Check if user belongs to specific list of segments
35
- * **Example**:
36
- * ```
37
- * _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
38
- * console.log(result);
39
- * });
40
- * ```
41
- * **Visitor mode: not supported**
42
- */
43
- checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]>;
44
- /** Returns all the levels available the current user
45
- * **Example**:
46
- * ```
47
- * _smartico.api.getLevels().then((result) => {
48
- * console.log(result);
49
- * });
50
- * ```
51
- *
52
- * **Example in the Visitor mode**:
53
- * ```
54
- * _smartico.vapi('EN').getLevels().then((result) => {
55
- * console.log(result);
56
- * });
57
- * ```
58
- */
59
- getLevels(): Promise<TLevel[]>;
60
- /** Returns all the missions available the current user.
61
- * The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
62
- * Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
63
- * The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
64
- *
65
- * **Example**:
66
- * ```
67
- * _smartico.api.getMissions().then((result) => {
68
- * console.log(result);
69
- * });
70
- * ```
71
- *
72
- * **Example in the Visitor mode**:
73
- * ```
74
- * _smartico.vapi('EN').getMissions().then((result) => {
75
- * console.log(result);
76
- * });
77
- * ```
78
- */
79
- getMissions({ onUpdate }?: {
80
- onUpdate?: (data: TMissionOrBadge[]) => void;
81
- }): Promise<TMissionOrBadge[]>;
82
- /**
83
- * Returns all the badges available the current user
84
- *
85
- * **Visitor mode: not supported**
86
- */
87
- getBadges(): Promise<TMissionOrBadge[]>;
88
- /**
89
- * Returns the extra counters for the current user level.
90
- * These are counters that are configured for each Smartico client separatly by request.
91
- * For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
92
- *
93
- * **Example**:
94
- * ```
95
- * _smartico.api.getUserLevelExtraCounters().then((result) => {
96
- * console.log(result);
97
- * });
98
- * ```
99
- *
100
- * **Visitor mode: not supported**
101
- */
102
- getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
103
- /**
104
- *
105
- * Returns all the store items available the current user
106
- *
107
- * **Example**:
108
- * ```
109
- * _smartico.api.getStoreItems().then((result) => {
110
- * console.log(result);
111
- * });
112
- * ```
113
- *
114
- * **Example in the Visitor mode**:
115
- * ```
116
- * _smartico.vapi('EN').getStoreItems().then((result) => {
117
- * console.log(result);
118
- * });
119
- * ```
120
- */
121
- getStoreItems(): Promise<TStoreItem[]>;
122
- /** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
123
- * **Example**:
124
- * ```
125
- * _smartico.api.buyStoreItem(1).then((result) => {
126
- * console.log(result);
127
- * });
128
- * ```
129
- *
130
- * **Visitor mode: not supported**
131
- */
132
- buyStoreItem(item_id: number): Promise<TBuyStoreItemResult>;
133
- /**
134
- *
135
- * Returns store categories
136
- *
137
- * **Example**:
138
- * ```
139
- * _smartico.api.getStoreCategories().then((result) => {
140
- * console.log(result);
141
- * });
142
- * ```
143
- *
144
- * **Example in the Visitor mode**:
145
- * ```
146
- * _smartico.vapi('EN').getStoreCategories().then((result) => {
147
- * console.log(result);
148
- * });
149
- * ```
150
- */
151
- getStoreCategories(): Promise<TStoreCategory[]>;
152
- /**
153
- * Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
154
- * The maximum number of items per request is limited to 20.
155
- * You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
156
- *
157
- * **Example**:
158
- * ```
159
- * _smartico.api.getStorePurchasedItems().then((result) => {
160
- * console.log(result);
161
- * });
162
- * ```
163
- *
164
- * **Visitor mode: not supported**
165
- */
166
- getStorePurchasedItems({ limit, offset, onUpdate }?: {
167
- limit?: number;
168
- offset?: number;
169
- onUpdate?: (data: TStoreItem[]) => void;
170
- }): Promise<TStoreItem[]>;
171
- /**
172
- * Returns missions & badges categories
173
- *
174
- * **Example**:
175
- * ```
176
- * _smartico.api.getAchCategories().then((result) => {
177
- * console.log(result);
178
- * });
179
- * ```
180
- *
181
- * **Example in the Visitor mode**:
182
- * ```
183
- * _smartico.vapi('EN').getAchCategories().then((result) => {
184
- * console.log(result);
185
- * });
186
- * ```
187
- *
188
- * */
189
- getAchCategories(): Promise<TAchCategory[]>;
190
- /**
191
- * Returns list of custom sections
192
- *
193
- * **Example**:
194
- * ```
195
- * _smartico.api.getCustomSections().then((result) => {
196
- * console.log(result);
197
- * });
198
- * ```
199
- *
200
- * **Example in the Visitor mode**:
201
- * ```
202
- * _smartico.vapi('EN').getCustomSections().then((result) => {
203
- * console.log(result);
204
- * });
205
- * ```
206
- *
207
- * */
208
- getCustomSections(): Promise<TUICustomSection[]>;
209
- /**
210
- * Returns the list of mini-games available for user
211
- * 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.
212
- * 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.
213
- *
214
- * **Example**:
215
- * ```
216
- * _smartico.api.getMiniGames().then((result) => {
217
- * console.log(result);
218
- * });
219
- * ```
220
- *
221
- * **Example in the Visitor mode**:
222
- * ```
223
- * _smartico.vapi('EN').getMiniGames().then((result) => {
224
- * console.log(result);
225
- * });
226
- * ```
227
- *
228
- */
229
- getMiniGames({ onUpdate }?: {
230
- onUpdate?: (data: TMiniGameTemplate[]) => void;
231
- }): Promise<TMiniGameTemplate[]>;
232
- /**
233
- * Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
234
- *
235
- * **Visitor mode: not supported**
236
- */
237
- playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
238
- /**
239
- * Requests an opt-in for the specified mission_id. Returns the err_code.
240
- *
241
- * **Visitor mode: not supported**
242
- */
243
- requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult>;
244
- /**
245
- * Request for claim reward for the specified mission id. Returns the err_code.
246
- *
247
- * **Visitor mode: not supported**
248
- */
249
- requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult>;
250
- /** Returns all the active instances of tournaments
251
- * 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.
252
- * The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
253
- *
254
- * **Example**:
255
- * ```
256
- * _smartico.api.getTournamentsList().then((result) => {
257
- * console.log(result);
258
- * });
259
- * ```
260
- *
261
- * **Example in the Visitor mode**:
262
- * ```
263
- * _smartico.vapi('EN').getTournamentsList().then((result) => {
264
- * console.log(result);
265
- * });
266
- * ```
267
- * */
268
- getTournamentsList({ onUpdate }?: {
269
- onUpdate?: (data: TTournament[]) => void;
270
- }): Promise<TTournament[]>;
271
- /**
272
- * Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
273
- *
274
- * **Example**:
275
- * ```
276
- * _smartico.api.getTournamentsList().then((result) => {
277
- * if (result.length > 0) {
278
- * _smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
279
- * console.log(result);
280
- * });
281
- * }
282
- * });
283
- * ```
284
- *
285
- * **Example in the Visitor mode**:
286
- * ```
287
- * _smartico.vapi('EN').getTournamentsList().then((result) => {
288
- * if (result.length > 0) {
289
- * _smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
290
- * console.log(result);
291
- * });
292
- * }
293
- * });
294
- * ```
295
- */
296
- getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed>;
297
- /**
298
- * Requests registration for the specified tournament instance. Returns the err_code.
299
- *
300
- * **Visitor mode: not supported**
301
- */
302
- registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult>;
303
- /**
304
- * 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.
305
- * For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
306
- *
307
- * **Example**:
308
- * ```
309
- * _smartico.api.getLeaderBoard(1).then((result) => {
310
- * console.log(result);
311
- * });
312
- * ```
313
- *
314
- * **Example in the Visitor mode**:
315
- * ```
316
- * _smartico.vapi('EN').getLeaderBoard(1).then((result) => {
317
- * console.log(result);
318
- * });
319
- * ```
320
- */
321
- getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT>;
322
- /** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
323
- * The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
324
- * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
325
- * This functions return list of messages without the body of the message.
326
- * 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.
327
- * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
328
- * 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.
329
- *
330
- * **Visitor mode: not supported**
331
- *
332
- * @param params
333
- */
334
- getInboxMessages({ from, to, onlyFavorite, onUpdate }?: {
335
- from?: number;
336
- to?: number;
337
- onlyFavorite?: boolean;
338
- onUpdate?: (data: TInboxMessage[]) => void;
339
- }): Promise<TInboxMessage[]>;
340
- /**
341
- * Returns the message body of the specified message guid.
342
- *
343
- * **Visitor mode: not supported**
344
- */
345
- getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody>;
346
- /**
347
- * Requests to mark inbox message with specified guid as read
348
- *
349
- * **Visitor mode: not supported**
350
- */
351
- markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction>;
352
- /**
353
- * Requests to mark all inbox messages as rea
354
- *
355
- * **Visitor mode: not supported**
356
- */
357
- markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction>;
358
- /**
359
- * Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
360
- *
361
- * **Visitor mode: not supported**
362
- */
363
- markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction>;
364
- /**
365
- * Requests to delete inbox message
366
- *
367
- * **Visitor mode: not supported**
368
- */
369
- deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction>;
370
- /**
371
- * Requests to delete all inbox messages
372
- *
373
- * **Visitor mode: not supported**
374
- */
375
- deleteAllInboxMessages(): Promise<InboxMarkMessageAction>;
376
- /**
377
- * Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
378
- */
379
- getTranslations(lang_code: string): Promise<TGetTranslations>;
380
- private updateOnSpin;
381
- private updateOnAddSpin;
382
- private updateOnPrizeWin;
383
- private updateMissionsOnOptIn;
384
- private updateTournamentsOnRegistration;
385
- private updateInboxMessages;
386
- private updateEntity;
387
- private jackpotClearCache;
388
- /** Returns list of Jackpots that are active in the systen and matching to the filter definition.
389
- * If filter is not provided, all active jackpots will be returned.
390
- * Filter can be used to get jackpots related to specific game or specific jackpot template.
391
- * You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users
392
- *
393
- * **Example**:
394
- * ```
395
- * _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
396
- * console.log(result);
397
- * });
398
- * ```
399
- *
400
- * **Example in the Visitor mode**:
401
- * ```
402
- * _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
403
- * console.log(result);
404
- * });
405
- * ```
406
- */
407
- jackpotGet(filter?: {
408
- related_game_id?: string;
409
- jp_template_id?: number;
410
- }): Promise<JackpotDetails[]>;
411
- /**
412
- * Opt-in currently logged in user to the jackpot with the specified jp_template_id.
413
- * You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
414
- *
415
- * **Example**:
416
- * ```
417
- * _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
418
- * console.log('Opted in to the jackpot');
419
- * });
420
- * ```
421
- *
422
- * **Visitor mode: not supported**
423
- *
424
- */
425
- jackpotOptIn(filter: {
426
- jp_template_id: number;
427
- }): Promise<JackpotsOptinResponse>;
428
- /**
429
- * Opt-out currently logged in user from the jackpot with the specified jp_template_id.
430
- * You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
431
- *
432
- * **Example**:
433
- * ```
434
- * _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
435
- * console.log('Opted out from the jackpot');
436
- * });
437
- * ```
438
- *
439
- * **Visitor mode: not supported**
440
- *
441
- */
442
- jackpotOptOut(filter: {
443
- jp_template_id: number;
444
- }): Promise<JackpotsOptoutResponse>;
445
- }
1
+ import { SmarticoAPI } from "../SmarticoAPI";
2
+ import { InboxMarkMessageAction, LeaderBoardDetailsT, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionClaimRewardResult, TMissionOptInResult, TMissionOrBadge, TSegmentCheckResult, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUICustomSection, TUserProfile, UserLevelExtraCountersT } from "./WSAPITypes";
3
+ import { LeaderBoardPeriodType } from "../Leaderboard";
4
+ import { JackpotDetails, JackpotsOptinResponse, JackpotsOptoutResponse } from "../Jackpots";
5
+ /** @group General API */
6
+ export declare class WSAPI {
7
+ private api;
8
+ private onUpdateCallback;
9
+ private jackpotGetSignature;
10
+ /** @private */
11
+ constructor(api: SmarticoAPI);
12
+ /** Returns information about current user
13
+ *
14
+ * **Example**:
15
+ * ```
16
+ * _smartico.api.getUserProfile().then((result) => {
17
+ * console.log(result);
18
+ * });
19
+ * ```
20
+ * **Visitor mode: not supported**
21
+ * */
22
+ getUserProfile(): TUserProfile;
23
+ /** Check if user belongs to specific segments
24
+ * **Example**:
25
+ * ```
26
+ * _smartico.api.checkSegmentMatch(1).then((result) => {
27
+ * console.log(result);
28
+ * });
29
+ * ```
30
+ *
31
+ * **Visitor mode: not supported**
32
+ */
33
+ checkSegmentMatch(segment_id: number): Promise<boolean>;
34
+ /** Check if user belongs to specific list of segments
35
+ * **Example**:
36
+ * ```
37
+ * _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
38
+ * console.log(result);
39
+ * });
40
+ * ```
41
+ * **Visitor mode: not supported**
42
+ */
43
+ checkSegmentListMatch(segment_ids: number[]): Promise<TSegmentCheckResult[]>;
44
+ /** Returns all the levels available the current user
45
+ * **Example**:
46
+ * ```
47
+ * _smartico.api.getLevels().then((result) => {
48
+ * console.log(result);
49
+ * });
50
+ * ```
51
+ *
52
+ * **Example in the Visitor mode**:
53
+ * ```
54
+ * _smartico.vapi('EN').getLevels().then((result) => {
55
+ * console.log(result);
56
+ * });
57
+ * ```
58
+ */
59
+ getLevels(): Promise<TLevel[]>;
60
+ /** Returns all the missions available the current user.
61
+ * The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
62
+ * Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
63
+ * The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
64
+ *
65
+ * **Example**:
66
+ * ```
67
+ * _smartico.api.getMissions().then((result) => {
68
+ * console.log(result);
69
+ * });
70
+ * ```
71
+ *
72
+ * **Example in the Visitor mode**:
73
+ * ```
74
+ * _smartico.vapi('EN').getMissions().then((result) => {
75
+ * console.log(result);
76
+ * });
77
+ * ```
78
+ */
79
+ getMissions({ onUpdate }?: {
80
+ onUpdate?: (data: TMissionOrBadge[]) => void;
81
+ }): Promise<TMissionOrBadge[]>;
82
+ /**
83
+ * Returns all the badges available the current user
84
+ *
85
+ * **Visitor mode: not supported**
86
+ */
87
+ getBadges(): Promise<TMissionOrBadge[]>;
88
+ /**
89
+ * Returns the extra counters for the current user level.
90
+ * These are counters that are configured for each Smartico client separatly by request.
91
+ * For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
92
+ *
93
+ * **Example**:
94
+ * ```
95
+ * _smartico.api.getUserLevelExtraCounters().then((result) => {
96
+ * console.log(result);
97
+ * });
98
+ * ```
99
+ *
100
+ * **Visitor mode: not supported**
101
+ */
102
+ getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
103
+ /**
104
+ *
105
+ * Returns all the store items available the current user
106
+ *
107
+ * **Example**:
108
+ * ```
109
+ * _smartico.api.getStoreItems().then((result) => {
110
+ * console.log(result);
111
+ * });
112
+ * ```
113
+ *
114
+ * **Example in the Visitor mode**:
115
+ * ```
116
+ * _smartico.vapi('EN').getStoreItems().then((result) => {
117
+ * console.log(result);
118
+ * });
119
+ * ```
120
+ */
121
+ getStoreItems(): Promise<TStoreItem[]>;
122
+ /** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
123
+ * **Example**:
124
+ * ```
125
+ * _smartico.api.buyStoreItem(1).then((result) => {
126
+ * console.log(result);
127
+ * });
128
+ * ```
129
+ *
130
+ * **Visitor mode: not supported**
131
+ */
132
+ buyStoreItem(item_id: number): Promise<TBuyStoreItemResult>;
133
+ /**
134
+ *
135
+ * Returns store categories
136
+ *
137
+ * **Example**:
138
+ * ```
139
+ * _smartico.api.getStoreCategories().then((result) => {
140
+ * console.log(result);
141
+ * });
142
+ * ```
143
+ *
144
+ * **Example in the Visitor mode**:
145
+ * ```
146
+ * _smartico.vapi('EN').getStoreCategories().then((result) => {
147
+ * console.log(result);
148
+ * });
149
+ * ```
150
+ */
151
+ getStoreCategories(): Promise<TStoreCategory[]>;
152
+ /**
153
+ * Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
154
+ * The maximum number of items per request is limited to 20.
155
+ * You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
156
+ *
157
+ * **Example**:
158
+ * ```
159
+ * _smartico.api.getStorePurchasedItems().then((result) => {
160
+ * console.log(result);
161
+ * });
162
+ * ```
163
+ *
164
+ * **Visitor mode: not supported**
165
+ */
166
+ getStorePurchasedItems({ limit, offset, onUpdate }?: {
167
+ limit?: number;
168
+ offset?: number;
169
+ onUpdate?: (data: TStoreItem[]) => void;
170
+ }): Promise<TStoreItem[]>;
171
+ /**
172
+ * Returns missions & badges categories
173
+ *
174
+ * **Example**:
175
+ * ```
176
+ * _smartico.api.getAchCategories().then((result) => {
177
+ * console.log(result);
178
+ * });
179
+ * ```
180
+ *
181
+ * **Example in the Visitor mode**:
182
+ * ```
183
+ * _smartico.vapi('EN').getAchCategories().then((result) => {
184
+ * console.log(result);
185
+ * });
186
+ * ```
187
+ *
188
+ * */
189
+ getAchCategories(): Promise<TAchCategory[]>;
190
+ /**
191
+ * Returns list of custom sections
192
+ *
193
+ * **Example**:
194
+ * ```
195
+ * _smartico.api.getCustomSections().then((result) => {
196
+ * console.log(result);
197
+ * });
198
+ * ```
199
+ *
200
+ * **Example in the Visitor mode**:
201
+ * ```
202
+ * _smartico.vapi('EN').getCustomSections().then((result) => {
203
+ * console.log(result);
204
+ * });
205
+ * ```
206
+ *
207
+ * */
208
+ getCustomSections(): Promise<TUICustomSection[]>;
209
+ /**
210
+ * Returns the list of mini-games available for user
211
+ * 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.
212
+ * 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.
213
+ *
214
+ * **Example**:
215
+ * ```
216
+ * _smartico.api.getMiniGames().then((result) => {
217
+ * console.log(result);
218
+ * });
219
+ * ```
220
+ *
221
+ * **Example in the Visitor mode**:
222
+ * ```
223
+ * _smartico.vapi('EN').getMiniGames().then((result) => {
224
+ * console.log(result);
225
+ * });
226
+ * ```
227
+ *
228
+ */
229
+ getMiniGames({ onUpdate }?: {
230
+ onUpdate?: (data: TMiniGameTemplate[]) => void;
231
+ }): Promise<TMiniGameTemplate[]>;
232
+ /**
233
+ * Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
234
+ *
235
+ * **Visitor mode: not supported**
236
+ */
237
+ playMiniGame(template_id: number): Promise<TMiniGamePlayResult>;
238
+ /**
239
+ * Requests an opt-in for the specified mission_id. Returns the err_code.
240
+ *
241
+ * **Visitor mode: not supported**
242
+ */
243
+ requestMissionOptIn(mission_id: number): Promise<TMissionOptInResult>;
244
+ /**
245
+ * Request for claim reward for the specified mission id. Returns the err_code.
246
+ *
247
+ * **Visitor mode: not supported**
248
+ */
249
+ requestMissionClaimReward(mission_id: number, ach_completed_id: number): Promise<TMissionClaimRewardResult>;
250
+ /** Returns all the active instances of tournaments
251
+ * 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.
252
+ * The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
253
+ *
254
+ * **Example**:
255
+ * ```
256
+ * _smartico.api.getTournamentsList().then((result) => {
257
+ * console.log(result);
258
+ * });
259
+ * ```
260
+ *
261
+ * **Example in the Visitor mode**:
262
+ * ```
263
+ * _smartico.vapi('EN').getTournamentsList().then((result) => {
264
+ * console.log(result);
265
+ * });
266
+ * ```
267
+ * */
268
+ getTournamentsList({ onUpdate }?: {
269
+ onUpdate?: (data: TTournament[]) => void;
270
+ }): Promise<TTournament[]>;
271
+ /**
272
+ * Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
273
+ *
274
+ * **Example**:
275
+ * ```
276
+ * _smartico.api.getTournamentsList().then((result) => {
277
+ * if (result.length > 0) {
278
+ * _smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
279
+ * console.log(result);
280
+ * });
281
+ * }
282
+ * });
283
+ * ```
284
+ *
285
+ * **Example in the Visitor mode**:
286
+ * ```
287
+ * _smartico.vapi('EN').getTournamentsList().then((result) => {
288
+ * if (result.length > 0) {
289
+ * _smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
290
+ * console.log(result);
291
+ * });
292
+ * }
293
+ * });
294
+ * ```
295
+ */
296
+ getTournamentInstanceInfo(tournamentInstanceId: number): Promise<TTournamentDetailed>;
297
+ /**
298
+ * Requests registration for the specified tournament instance. Returns the err_code.
299
+ *
300
+ * **Visitor mode: not supported**
301
+ */
302
+ registerInTournament(tournamentInstanceId: number): Promise<TTournamentRegistrationResult>;
303
+ /**
304
+ * 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.
305
+ * For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
306
+ *
307
+ * **Example**:
308
+ * ```
309
+ * _smartico.api.getLeaderBoard(1).then((result) => {
310
+ * console.log(result);
311
+ * });
312
+ * ```
313
+ *
314
+ * **Example in the Visitor mode**:
315
+ * ```
316
+ * _smartico.vapi('EN').getLeaderBoard(1).then((result) => {
317
+ * console.log(result);
318
+ * });
319
+ * ```
320
+ */
321
+ getLeaderBoard(periodType: LeaderBoardPeriodType, getPreviousPeriod?: boolean): Promise<LeaderBoardDetailsT>;
322
+ /** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
323
+ * The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
324
+ * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
325
+ * This functions return list of messages without the body of the message.
326
+ * 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.
327
+ * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
328
+ * 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.
329
+ *
330
+ * **Visitor mode: not supported**
331
+ *
332
+ * @param params
333
+ */
334
+ getInboxMessages({ from, to, onlyFavorite, onUpdate }?: {
335
+ from?: number;
336
+ to?: number;
337
+ onlyFavorite?: boolean;
338
+ onUpdate?: (data: TInboxMessage[]) => void;
339
+ }): Promise<TInboxMessage[]>;
340
+ /**
341
+ * Returns the message body of the specified message guid.
342
+ *
343
+ * **Visitor mode: not supported**
344
+ */
345
+ getInboxMessageBody(messageGuid: string): Promise<TInboxMessageBody>;
346
+ /**
347
+ * Requests to mark inbox message with specified guid as read
348
+ *
349
+ * **Visitor mode: not supported**
350
+ */
351
+ markInboxMessageAsRead(messageGuid: string): Promise<InboxMarkMessageAction>;
352
+ /**
353
+ * Requests to mark all inbox messages as rea
354
+ *
355
+ * **Visitor mode: not supported**
356
+ */
357
+ markAllInboxMessagesAsRead(): Promise<InboxMarkMessageAction>;
358
+ /**
359
+ * Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
360
+ *
361
+ * **Visitor mode: not supported**
362
+ */
363
+ markUnmarkInboxMessageAsFavorite(messageGuid: string, mark: boolean): Promise<InboxMarkMessageAction>;
364
+ /**
365
+ * Requests to delete inbox message
366
+ *
367
+ * **Visitor mode: not supported**
368
+ */
369
+ deleteInboxMessage(messageGuid: string): Promise<InboxMarkMessageAction>;
370
+ /**
371
+ * Requests to delete all inbox messages
372
+ *
373
+ * **Visitor mode: not supported**
374
+ */
375
+ deleteAllInboxMessages(): Promise<InboxMarkMessageAction>;
376
+ /**
377
+ * Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
378
+ */
379
+ getTranslations(lang_code: string): Promise<TGetTranslations>;
380
+ private updateOnSpin;
381
+ private updateOnAddSpin;
382
+ private updateOnPrizeWin;
383
+ private updateMissionsOnOptIn;
384
+ private updateTournamentsOnRegistration;
385
+ private updateInboxMessages;
386
+ private updateEntity;
387
+ private jackpotClearCache;
388
+ /** Returns list of Jackpots that are active in the systen and matching to the filter definition.
389
+ * If filter is not provided, all active jackpots will be returned.
390
+ * Filter can be used to get jackpots related to specific game or specific jackpot template.
391
+ * You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users
392
+ *
393
+ * **Example**:
394
+ * ```
395
+ * _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
396
+ * console.log(result);
397
+ * });
398
+ * ```
399
+ *
400
+ * **Example in the Visitor mode**:
401
+ * ```
402
+ * _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
403
+ * console.log(result);
404
+ * });
405
+ * ```
406
+ */
407
+ jackpotGet(filter?: {
408
+ related_game_id?: string;
409
+ jp_template_id?: number;
410
+ }): Promise<JackpotDetails[]>;
411
+ /**
412
+ * Opt-in currently logged in user to the jackpot with the specified jp_template_id.
413
+ * You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
414
+ *
415
+ * **Example**:
416
+ * ```
417
+ * _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
418
+ * console.log('Opted in to the jackpot');
419
+ * });
420
+ * ```
421
+ *
422
+ * **Visitor mode: not supported**
423
+ *
424
+ */
425
+ jackpotOptIn(filter: {
426
+ jp_template_id: number;
427
+ }): Promise<JackpotsOptinResponse>;
428
+ /**
429
+ * Opt-out currently logged in user from the jackpot with the specified jp_template_id.
430
+ * You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
431
+ *
432
+ * **Example**:
433
+ * ```
434
+ * _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
435
+ * console.log('Opted out from the jackpot');
436
+ * });
437
+ * ```
438
+ *
439
+ * **Visitor mode: not supported**
440
+ *
441
+ */
442
+ jackpotOptOut(filter: {
443
+ jp_template_id: number;
444
+ }): Promise<JackpotsOptoutResponse>;
445
+ }