@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
@@ -16,9 +16,9 @@ var ClassId;
16
16
  ClassId[ClassId["LOGOUT_RESPONSE"] = 12] = "LOGOUT_RESPONSE";
17
17
  ClassId[ClassId["GET_TRANSLATIONS_REQUEST"] = 13] = "GET_TRANSLATIONS_REQUEST";
18
18
  ClassId[ClassId["GET_TRANSLATIONS_RESPONSE"] = 14] = "GET_TRANSLATIONS_RESPONSE";
19
- /*
20
- !Important, if adding new messages that are 'acting' on behalf of the client,
21
- you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
19
+ /*
20
+ !Important, if adding new messages that are 'acting' on behalf of the client,
21
+ you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
22
22
  */
23
23
  ClassId[ClassId["CLIENT_ENGAGEMENT_IMPRESSION_REQUEST"] = 103] = "CLIENT_ENGAGEMENT_IMPRESSION_REQUEST";
24
24
  ClassId[ClassId["CLIENT_ENGAGEMENT_ACTION_REQUEST"] = 104] = "CLIENT_ENGAGEMENT_ACTION_REQUEST";
@@ -34,9 +34,9 @@ var ClassId;
34
34
  ClassId[ClassId["CLIENT_SET_CUSTOM_USERNAME_RESPONSE"] = 160] = "CLIENT_SET_CUSTOM_USERNAME_RESPONSE";
35
35
  ClassId[ClassId["CHECK_SEGMENT_MATCH_REQUEST"] = 161] = "CHECK_SEGMENT_MATCH_REQUEST";
36
36
  ClassId[ClassId["CHECK_SEGMENT_MATCH_RESPONSE"] = 162] = "CHECK_SEGMENT_MATCH_RESPONSE";
37
- /*
38
- !Important, if adding new messages that are 'acting' on behalf of the client,
39
- you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
37
+ /*
38
+ !Important, if adding new messages that are 'acting' on behalf of the client,
39
+ you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
40
40
  */
41
41
  // 500-1000 - Achievements
42
42
  ClassId[ClassId["GET_LEVEL_MAP_REQUEST"] = 500] = "GET_LEVEL_MAP_REQUEST";
@@ -64,9 +64,9 @@ var ClassId;
64
64
  ClassId[ClassId["GET_CUSTOM_SECTIONS_RESPONSE"] = 524] = "GET_CUSTOM_SECTIONS_RESPONSE";
65
65
  ClassId[ClassId["MISSION_OPTIN_REQUEST"] = 525] = "MISSION_OPTIN_REQUEST";
66
66
  ClassId[ClassId["MISSION_OPTIN_RESPONSE"] = 526] = "MISSION_OPTIN_RESPONSE";
67
- /*
68
- !Important, if adding new messages that are 'acting' on behalf of the client,
69
- you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
67
+ /*
68
+ !Important, if adding new messages that are 'acting' on behalf of the client,
69
+ you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
70
70
  */
71
71
  ClassId[ClassId["GET_ACHIEVEMENT_USER_REQUEST"] = 527] = "GET_ACHIEVEMENT_USER_REQUEST";
72
72
  ClassId[ClassId["GET_ACHIEVEMENT_USER_RESPONSE"] = 528] = "GET_ACHIEVEMENT_USER_RESPONSE";
@@ -82,9 +82,9 @@ var ClassId;
82
82
  ClassId[ClassId["ACHIEVEMENT_CLAIM_PRIZE_RESPONSE"] = 540] = "ACHIEVEMENT_CLAIM_PRIZE_RESPONSE";
83
83
  ClassId[ClassId["ACH_SHOP_ITEM_HISTORY_REQUEST"] = 541] = "ACH_SHOP_ITEM_HISTORY_REQUEST";
84
84
  ClassId[ClassId["ACH_SHOP_ITEM_HISTORY_RESPONSE"] = 542] = "ACH_SHOP_ITEM_HISTORY_RESPONSE";
85
- /*
86
- !Important, if adding new messages that are 'acting' on behalf of the client,
87
- you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
85
+ /*
86
+ !Important, if adding new messages that are 'acting' on behalf of the client,
87
+ you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
88
88
  */
89
89
  ClassId[ClassId["GET_BONUSES_REQUEST"] = 600] = "GET_BONUSES_REQUEST";
90
90
  ClassId[ClassId["GET_BONUSES_RESPONSE"] = 601] = "GET_BONUSES_RESPONSE";
@@ -101,9 +101,9 @@ var ClassId;
101
101
  ClassId[ClassId["SAW_PRIZE_DROP_WIN_PUSH"] = 708] = "SAW_PRIZE_DROP_WIN_PUSH";
102
102
  ClassId[ClassId["SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST"] = 709] = "SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST";
103
103
  ClassId[ClassId["SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE"] = 710] = "SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE";
104
- /*
105
- !Important, if adding new messages that are 'acting' on behalf of the client,
106
- you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
104
+ /*
105
+ !Important, if adding new messages that are 'acting' on behalf of the client,
106
+ you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
107
107
  */
108
108
  ClassId[ClassId["JP_GET_JACKPOTS_REQUEST"] = 800] = "JP_GET_JACKPOTS_REQUEST";
109
109
  ClassId[ClassId["JP_GET_JACKPOTS_RESPONSE"] = 801] = "JP_GET_JACKPOTS_RESPONSE";
@@ -114,16 +114,16 @@ var ClassId;
114
114
  ClassId[ClassId["JP_OPTOUT_REQUEST"] = 806] = "JP_OPTOUT_REQUEST";
115
115
  ClassId[ClassId["JP_OPTOUT_RESPONSE"] = 807] = "JP_OPTOUT_RESPONSE";
116
116
  ClassId[ClassId["JP_WIN_PUSH"] = 808] = "JP_WIN_PUSH";
117
- /*
118
- !Important, if adding new messages that are 'acting' on behalf of the client,
119
- you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
117
+ /*
118
+ !Important, if adding new messages that are 'acting' on behalf of the client,
119
+ you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
120
120
  */
121
121
  ClassId[ClassId["REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ"] = 1003] = "REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ";
122
122
  ClassId[ClassId["REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP"] = 2003] = "REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP";
123
123
  ClassId[ClassId["CLIENT_DEBUG_REQUEST"] = 77777] = "CLIENT_DEBUG_REQUEST";
124
- /*
125
- !Important, if adding new messages that are 'acting' on behalf of the client,
126
- you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
124
+ /*
125
+ !Important, if adding new messages that are 'acting' on behalf of the client,
126
+ you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
127
127
  */
128
128
  ClassId[ClassId["UNSUPPORTED_COMMAND"] = 99999] = "UNSUPPORTED_COMMAND";
129
129
  })(ClassId || (ClassId = {}));
@@ -179,6 +179,13 @@ IntUtils.JsonOrText = str => {
179
179
  }
180
180
  return str;
181
181
  };
182
+ // public static wsTimeToEpoch = (time: string): number => {
183
+ // if (time) {
184
+ // return moment.utc(time, "DD/MM/YYYY HH:mm:ss").valueOf()
185
+ // } else {
186
+ // return null
187
+ // }
188
+ // }
182
189
  IntUtils.isWithinPeriod = (timestamp, period) => {
183
190
  const now = new Date();
184
191
  const completedDate = new Date(timestamp);
@@ -371,8 +378,8 @@ const SAWTemplatesTransform = items => {
371
378
  });
372
379
  };
373
380
 
374
- /*
375
- * Possible error codes for the mini-games attempts
381
+ /*
382
+ * Possible error codes for the mini-games attempts
376
383
  */
377
384
  var SAWSpinErrorCode;
378
385
  (function (SAWSpinErrorCode) {
@@ -527,25 +534,25 @@ class CoreUtils {
527
534
  return {
528
535
  [currency == null ? void 0 : currency.toUpperCase()]: currency == null ? void 0 : currency.toUpperCase(),
529
536
  USD: "$",
530
- EUR: "",
531
- JPY: "¥",
532
- GBP: "£",
537
+ EUR: "\u20AC",
538
+ JPY: "\u00A5",
539
+ GBP: "\u00A3",
533
540
  AUD: "A$",
534
541
  CAD: "C$",
535
542
  CHF: "CHF",
536
- CNY: "¥",
543
+ CNY: "\u00A5",
537
544
  SEK: "kr",
538
545
  NZD: "NZ$",
539
546
  MXN: "MX$",
540
547
  SGD: "S$",
541
548
  HKD: "HK$",
542
549
  NOK: "kr",
543
- KRW: "",
544
- TRY: "",
545
- INR: "",
546
- RUB: "",
550
+ KRW: "\u20A9",
551
+ TRY: "\u20BA",
552
+ INR: "\u20B9",
553
+ RUB: "\u20BD",
547
554
  BRL: "R$",
548
- ZAR: "R" // South African Rand
555
+ ZAR: "R" // South African Rand
549
556
  }[currency == null ? void 0 : currency.toUpperCase()];
550
557
  }
551
558
  }
@@ -1175,15 +1182,15 @@ class WSAPI {
1175
1182
  on(ClassId.JP_OPTIN_RESPONSE, data => this.jackpotClearCache());
1176
1183
  }
1177
1184
  }
1178
- /** Returns information about current user
1179
- *
1180
- * **Example**:
1181
- * ```
1182
- * _smartico.api.getUserProfile().then((result) => {
1183
- * console.log(result);
1184
- * });
1185
- * ```
1186
- * **Visitor mode: not supported**
1185
+ /** Returns information about current user
1186
+ *
1187
+ * **Example**:
1188
+ * ```
1189
+ * _smartico.api.getUserProfile().then((result) => {
1190
+ * console.log(result);
1191
+ * });
1192
+ * ```
1193
+ * **Visitor mode: not supported**
1187
1194
  * */
1188
1195
  getUserProfile() {
1189
1196
  if (this.api.tracker) {
@@ -1194,15 +1201,15 @@ class WSAPI {
1194
1201
  throw new Error('Tracker is not initialized, cannot getUserProfile');
1195
1202
  }
1196
1203
  }
1197
- /** Check if user belongs to specific segments
1198
- * **Example**:
1199
- * ```
1200
- * _smartico.api.checkSegmentMatch(1).then((result) => {
1201
- * console.log(result);
1202
- * });
1203
- * ```
1204
- *
1205
- * **Visitor mode: not supported**
1204
+ /** Check if user belongs to specific segments
1205
+ * **Example**:
1206
+ * ```
1207
+ * _smartico.api.checkSegmentMatch(1).then((result) => {
1208
+ * console.log(result);
1209
+ * });
1210
+ * ```
1211
+ *
1212
+ * **Visitor mode: not supported**
1206
1213
  */
1207
1214
  async checkSegmentMatch(segment_id) {
1208
1215
  const r = await this.api.coreCheckSegments(null, [segment_id]);
@@ -1212,54 +1219,54 @@ class WSAPI {
1212
1219
  return false;
1213
1220
  }
1214
1221
  }
1215
- /** Check if user belongs to specific list of segments
1216
- * **Example**:
1217
- * ```
1218
- * _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
1219
- * console.log(result);
1220
- * });
1221
- * ```
1222
- * **Visitor mode: not supported**
1222
+ /** Check if user belongs to specific list of segments
1223
+ * **Example**:
1224
+ * ```
1225
+ * _smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
1226
+ * console.log(result);
1227
+ * });
1228
+ * ```
1229
+ * **Visitor mode: not supported**
1223
1230
  */
1224
1231
  async checkSegmentListMatch(segment_ids) {
1225
1232
  return await this.api.coreCheckSegments(null, Array.isArray(segment_ids) ? segment_ids : [segment_ids]);
1226
1233
  }
1227
- /** Returns all the levels available the current user
1228
- * **Example**:
1229
- * ```
1230
- * _smartico.api.getLevels().then((result) => {
1231
- * console.log(result);
1232
- * });
1233
- * ```
1234
- *
1235
- * **Example in the Visitor mode**:
1236
- * ```
1237
- * _smartico.vapi('EN').getLevels().then((result) => {
1238
- * console.log(result);
1239
- * });
1240
- * ```
1234
+ /** Returns all the levels available the current user
1235
+ * **Example**:
1236
+ * ```
1237
+ * _smartico.api.getLevels().then((result) => {
1238
+ * console.log(result);
1239
+ * });
1240
+ * ```
1241
+ *
1242
+ * **Example in the Visitor mode**:
1243
+ * ```
1244
+ * _smartico.vapi('EN').getLevels().then((result) => {
1245
+ * console.log(result);
1246
+ * });
1247
+ * ```
1241
1248
  */
1242
1249
  async getLevels() {
1243
1250
  return OCache.use(onUpdateContextKey.Levels, ECacheContext.WSAPI, () => this.api.levelsGetT(null), CACHE_DATA_SEC);
1244
1251
  }
1245
- /** Returns all the missions available the current user.
1246
- * The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
1247
- * Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
1248
- * The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
1249
- *
1250
- * **Example**:
1251
- * ```
1252
- * _smartico.api.getMissions().then((result) => {
1253
- * console.log(result);
1254
- * });
1255
- * ```
1256
- *
1257
- * **Example in the Visitor mode**:
1258
- * ```
1259
- * _smartico.vapi('EN').getMissions().then((result) => {
1260
- * console.log(result);
1261
- * });
1262
- * ```
1252
+ /** Returns all the missions available the current user.
1253
+ * The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
1254
+ * Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
1255
+ * The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
1256
+ *
1257
+ * **Example**:
1258
+ * ```
1259
+ * _smartico.api.getMissions().then((result) => {
1260
+ * console.log(result);
1261
+ * });
1262
+ * ```
1263
+ *
1264
+ * **Example in the Visitor mode**:
1265
+ * ```
1266
+ * _smartico.vapi('EN').getMissions().then((result) => {
1267
+ * console.log(result);
1268
+ * });
1269
+ * ```
1263
1270
  */
1264
1271
  async getMissions({
1265
1272
  onUpdate
@@ -1269,61 +1276,61 @@ class WSAPI {
1269
1276
  }
1270
1277
  return OCache.use(onUpdateContextKey.Missions, ECacheContext.WSAPI, () => this.api.missionsGetItemsT(null), CACHE_DATA_SEC);
1271
1278
  }
1272
- /**
1273
- * Returns all the badges available the current user
1274
- *
1275
- * **Visitor mode: not supported**
1279
+ /**
1280
+ * Returns all the badges available the current user
1281
+ *
1282
+ * **Visitor mode: not supported**
1276
1283
  */
1277
1284
  async getBadges() {
1278
1285
  return OCache.use(onUpdateContextKey.Badges, ECacheContext.WSAPI, () => this.api.badgetsGetItemsT(null), CACHE_DATA_SEC);
1279
1286
  }
1280
- /**
1281
- * Returns the extra counters for the current user level.
1282
- * These are counters that are configured for each Smartico client separatly by request.
1283
- * For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
1284
- *
1285
- * **Example**:
1286
- * ```
1287
- * _smartico.api.getUserLevelExtraCounters().then((result) => {
1288
- * console.log(result);
1289
- * });
1290
- * ```
1291
- *
1292
- * **Visitor mode: not supported**
1287
+ /**
1288
+ * Returns the extra counters for the current user level.
1289
+ * These are counters that are configured for each Smartico client separatly by request.
1290
+ * For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
1291
+ *
1292
+ * **Example**:
1293
+ * ```
1294
+ * _smartico.api.getUserLevelExtraCounters().then((result) => {
1295
+ * console.log(result);
1296
+ * });
1297
+ * ```
1298
+ *
1299
+ * **Visitor mode: not supported**
1293
1300
  */
1294
1301
  async getUserLevelExtraCounters() {
1295
1302
  return OCache.use(onUpdateContextKey.LevelExtraCounters, ECacheContext.WSAPI, () => this.api.getUserGamificationInfoT(null), CACHE_DATA_SEC);
1296
1303
  }
1297
- /**
1298
- *
1299
- * Returns all the store items available the current user
1300
- *
1301
- * **Example**:
1302
- * ```
1303
- * _smartico.api.getStoreItems().then((result) => {
1304
- * console.log(result);
1305
- * });
1306
- * ```
1307
- *
1308
- * **Example in the Visitor mode**:
1309
- * ```
1310
- * _smartico.vapi('EN').getStoreItems().then((result) => {
1311
- * console.log(result);
1312
- * });
1313
- * ```
1304
+ /**
1305
+ *
1306
+ * Returns all the store items available the current user
1307
+ *
1308
+ * **Example**:
1309
+ * ```
1310
+ * _smartico.api.getStoreItems().then((result) => {
1311
+ * console.log(result);
1312
+ * });
1313
+ * ```
1314
+ *
1315
+ * **Example in the Visitor mode**:
1316
+ * ```
1317
+ * _smartico.vapi('EN').getStoreItems().then((result) => {
1318
+ * console.log(result);
1319
+ * });
1320
+ * ```
1314
1321
  */
1315
1322
  async getStoreItems() {
1316
1323
  return OCache.use(onUpdateContextKey.StoreItems, ECacheContext.WSAPI, () => this.api.storeGetItemsT(null), CACHE_DATA_SEC);
1317
1324
  }
1318
- /** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
1319
- * **Example**:
1320
- * ```
1321
- * _smartico.api.buyStoreItem(1).then((result) => {
1322
- * console.log(result);
1323
- * });
1324
- * ```
1325
- *
1326
- * **Visitor mode: not supported**
1325
+ /** Buy the specific shop item by item_id. Returns the err_code in case of success or error.
1326
+ * **Example**:
1327
+ * ```
1328
+ * _smartico.api.buyStoreItem(1).then((result) => {
1329
+ * console.log(result);
1330
+ * });
1331
+ * ```
1332
+ *
1333
+ * **Visitor mode: not supported**
1327
1334
  */
1328
1335
  async buyStoreItem(item_id) {
1329
1336
  const r = await this.api.buyStoreItem(null, item_id);
@@ -1333,40 +1340,40 @@ class WSAPI {
1333
1340
  };
1334
1341
  return o;
1335
1342
  }
1336
- /**
1337
- *
1338
- * Returns store categories
1339
- *
1340
- * **Example**:
1341
- * ```
1342
- * _smartico.api.getStoreCategories().then((result) => {
1343
- * console.log(result);
1344
- * });
1345
- * ```
1346
- *
1347
- * **Example in the Visitor mode**:
1348
- * ```
1349
- * _smartico.vapi('EN').getStoreCategories().then((result) => {
1350
- * console.log(result);
1351
- * });
1352
- * ```
1343
+ /**
1344
+ *
1345
+ * Returns store categories
1346
+ *
1347
+ * **Example**:
1348
+ * ```
1349
+ * _smartico.api.getStoreCategories().then((result) => {
1350
+ * console.log(result);
1351
+ * });
1352
+ * ```
1353
+ *
1354
+ * **Example in the Visitor mode**:
1355
+ * ```
1356
+ * _smartico.vapi('EN').getStoreCategories().then((result) => {
1357
+ * console.log(result);
1358
+ * });
1359
+ * ```
1353
1360
  */
1354
1361
  async getStoreCategories() {
1355
1362
  return OCache.use(onUpdateContextKey.StoreCategories, ECacheContext.WSAPI, () => this.api.storeGetCategoriesT(null), CACHE_DATA_SEC);
1356
1363
  }
1357
- /**
1358
- * Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
1359
- * The maximum number of items per request is limited to 20.
1360
- * You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
1361
- *
1362
- * **Example**:
1363
- * ```
1364
- * _smartico.api.getStorePurchasedItems().then((result) => {
1365
- * console.log(result);
1366
- * });
1367
- * ```
1368
- *
1369
- * **Visitor mode: not supported**
1364
+ /**
1365
+ * Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
1366
+ * The maximum number of items per request is limited to 20.
1367
+ * You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
1368
+ *
1369
+ * **Example**:
1370
+ * ```
1371
+ * _smartico.api.getStorePurchasedItems().then((result) => {
1372
+ * console.log(result);
1373
+ * });
1374
+ * ```
1375
+ *
1376
+ * **Visitor mode: not supported**
1370
1377
  */
1371
1378
  async getStorePurchasedItems({
1372
1379
  limit,
@@ -1378,67 +1385,67 @@ class WSAPI {
1378
1385
  }
1379
1386
  return OCache.use(onUpdateContextKey.StoreHistory, ECacheContext.WSAPI, () => this.api.storeGetPurchasedItemsT(null, limit, offset), CACHE_DATA_SEC);
1380
1387
  }
1381
- /**
1382
- * Returns missions & badges categories
1383
- *
1384
- * **Example**:
1385
- * ```
1386
- * _smartico.api.getAchCategories().then((result) => {
1387
- * console.log(result);
1388
- * });
1389
- * ```
1390
- *
1391
- * **Example in the Visitor mode**:
1392
- * ```
1393
- * _smartico.vapi('EN').getAchCategories().then((result) => {
1394
- * console.log(result);
1395
- * });
1396
- * ```
1397
- *
1388
+ /**
1389
+ * Returns missions & badges categories
1390
+ *
1391
+ * **Example**:
1392
+ * ```
1393
+ * _smartico.api.getAchCategories().then((result) => {
1394
+ * console.log(result);
1395
+ * });
1396
+ * ```
1397
+ *
1398
+ * **Example in the Visitor mode**:
1399
+ * ```
1400
+ * _smartico.vapi('EN').getAchCategories().then((result) => {
1401
+ * console.log(result);
1402
+ * });
1403
+ * ```
1404
+ *
1398
1405
  * */
1399
1406
  async getAchCategories() {
1400
1407
  return OCache.use(onUpdateContextKey.AchCategories, ECacheContext.WSAPI, () => this.api.achGetCategoriesT(null), CACHE_DATA_SEC);
1401
1408
  }
1402
- /**
1403
- * Returns list of custom sections
1404
- *
1405
- * **Example**:
1406
- * ```
1407
- * _smartico.api.getCustomSections().then((result) => {
1408
- * console.log(result);
1409
- * });
1410
- * ```
1411
- *
1412
- * **Example in the Visitor mode**:
1413
- * ```
1414
- * _smartico.vapi('EN').getCustomSections().then((result) => {
1415
- * console.log(result);
1416
- * });
1417
- * ```
1418
- *
1409
+ /**
1410
+ * Returns list of custom sections
1411
+ *
1412
+ * **Example**:
1413
+ * ```
1414
+ * _smartico.api.getCustomSections().then((result) => {
1415
+ * console.log(result);
1416
+ * });
1417
+ * ```
1418
+ *
1419
+ * **Example in the Visitor mode**:
1420
+ * ```
1421
+ * _smartico.vapi('EN').getCustomSections().then((result) => {
1422
+ * console.log(result);
1423
+ * });
1424
+ * ```
1425
+ *
1419
1426
  * */
1420
1427
  async getCustomSections() {
1421
1428
  return OCache.use(onUpdateContextKey.CustomSections, ECacheContext.WSAPI, () => this.api.getCustomSectionsT(null), CACHE_DATA_SEC);
1422
1429
  }
1423
- /**
1424
- * Returns the list of mini-games available for user
1425
- * 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.
1426
- * 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.
1427
- *
1428
- * **Example**:
1429
- * ```
1430
- * _smartico.api.getMiniGames().then((result) => {
1431
- * console.log(result);
1432
- * });
1433
- * ```
1434
- *
1435
- * **Example in the Visitor mode**:
1436
- * ```
1437
- * _smartico.vapi('EN').getMiniGames().then((result) => {
1438
- * console.log(result);
1439
- * });
1440
- * ```
1441
- *
1430
+ /**
1431
+ * Returns the list of mini-games available for user
1432
+ * 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.
1433
+ * 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.
1434
+ *
1435
+ * **Example**:
1436
+ * ```
1437
+ * _smartico.api.getMiniGames().then((result) => {
1438
+ * console.log(result);
1439
+ * });
1440
+ * ```
1441
+ *
1442
+ * **Example in the Visitor mode**:
1443
+ * ```
1444
+ * _smartico.vapi('EN').getMiniGames().then((result) => {
1445
+ * console.log(result);
1446
+ * });
1447
+ * ```
1448
+ *
1442
1449
  */
1443
1450
  async getMiniGames({
1444
1451
  onUpdate
@@ -1448,10 +1455,10 @@ class WSAPI {
1448
1455
  }
1449
1456
  return OCache.use(onUpdateContextKey.Saw, ECacheContext.WSAPI, () => this.api.sawGetTemplatesT(null), CACHE_DATA_SEC);
1450
1457
  }
1451
- /**
1452
- * Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
1453
- *
1454
- * **Visitor mode: not supported**
1458
+ /**
1459
+ * Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
1460
+ *
1461
+ * **Visitor mode: not supported**
1455
1462
  */
1456
1463
  async playMiniGame(template_id) {
1457
1464
  const r = await this.api.sawSpinRequest(null, template_id);
@@ -1463,10 +1470,10 @@ class WSAPI {
1463
1470
  };
1464
1471
  return o;
1465
1472
  }
1466
- /**
1467
- * Requests an opt-in for the specified mission_id. Returns the err_code.
1468
- *
1469
- * **Visitor mode: not supported**
1473
+ /**
1474
+ * Requests an opt-in for the specified mission_id. Returns the err_code.
1475
+ *
1476
+ * **Visitor mode: not supported**
1470
1477
  */
1471
1478
  async requestMissionOptIn(mission_id) {
1472
1479
  const r = await this.api.missionOptIn(null, mission_id);
@@ -1476,10 +1483,10 @@ class WSAPI {
1476
1483
  };
1477
1484
  return o;
1478
1485
  }
1479
- /**
1480
- * Request for claim reward for the specified mission id. Returns the err_code.
1481
- *
1482
- * **Visitor mode: not supported**
1486
+ /**
1487
+ * Request for claim reward for the specified mission id. Returns the err_code.
1488
+ *
1489
+ * **Visitor mode: not supported**
1483
1490
  */
1484
1491
  async requestMissionClaimReward(mission_id, ach_completed_id) {
1485
1492
  const r = await this.api.missionClaimPrize(null, mission_id, ach_completed_id);
@@ -1489,23 +1496,23 @@ class WSAPI {
1489
1496
  };
1490
1497
  return o;
1491
1498
  }
1492
- /** Returns all the active instances of tournaments
1493
- * 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.
1494
- * The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
1495
- *
1496
- * **Example**:
1497
- * ```
1498
- * _smartico.api.getTournamentsList().then((result) => {
1499
- * console.log(result);
1500
- * });
1501
- * ```
1502
- *
1503
- * **Example in the Visitor mode**:
1504
- * ```
1505
- * _smartico.vapi('EN').getTournamentsList().then((result) => {
1506
- * console.log(result);
1507
- * });
1508
- * ```
1499
+ /** Returns all the active instances of tournaments
1500
+ * 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.
1501
+ * The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
1502
+ *
1503
+ * **Example**:
1504
+ * ```
1505
+ * _smartico.api.getTournamentsList().then((result) => {
1506
+ * console.log(result);
1507
+ * });
1508
+ * ```
1509
+ *
1510
+ * **Example in the Visitor mode**:
1511
+ * ```
1512
+ * _smartico.vapi('EN').getTournamentsList().then((result) => {
1513
+ * console.log(result);
1514
+ * });
1515
+ * ```
1509
1516
  * */
1510
1517
  async getTournamentsList({
1511
1518
  onUpdate
@@ -1515,38 +1522,38 @@ class WSAPI {
1515
1522
  }
1516
1523
  return OCache.use(onUpdateContextKey.TournamentList, ECacheContext.WSAPI, () => this.api.tournamentsGetLobbyT(null), CACHE_DATA_SEC);
1517
1524
  }
1518
- /**
1519
- * Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
1520
- *
1521
- * **Example**:
1522
- * ```
1523
- * _smartico.api.getTournamentsList().then((result) => {
1524
- * if (result.length > 0) {
1525
- * _smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
1526
- * console.log(result);
1527
- * });
1528
- * }
1529
- * });
1530
- * ```
1531
- *
1532
- * **Example in the Visitor mode**:
1533
- * ```
1534
- * _smartico.vapi('EN').getTournamentsList().then((result) => {
1535
- * if (result.length > 0) {
1536
- * _smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
1537
- * console.log(result);
1538
- * });
1539
- * }
1540
- * });
1541
- * ```
1525
+ /**
1526
+ * Returns details information of specific tournament instance, the response will include tournament info and the leaderboard of players
1527
+ *
1528
+ * **Example**:
1529
+ * ```
1530
+ * _smartico.api.getTournamentsList().then((result) => {
1531
+ * if (result.length > 0) {
1532
+ * _smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
1533
+ * console.log(result);
1534
+ * });
1535
+ * }
1536
+ * });
1537
+ * ```
1538
+ *
1539
+ * **Example in the Visitor mode**:
1540
+ * ```
1541
+ * _smartico.vapi('EN').getTournamentsList().then((result) => {
1542
+ * if (result.length > 0) {
1543
+ * _smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
1544
+ * console.log(result);
1545
+ * });
1546
+ * }
1547
+ * });
1548
+ * ```
1542
1549
  */
1543
1550
  async getTournamentInstanceInfo(tournamentInstanceId) {
1544
1551
  return this.api.tournamentsGetInfoT(null, tournamentInstanceId);
1545
1552
  }
1546
- /**
1547
- * Requests registration for the specified tournament instance. Returns the err_code.
1548
- *
1549
- * **Visitor mode: not supported**
1553
+ /**
1554
+ * Requests registration for the specified tournament instance. Returns the err_code.
1555
+ *
1556
+ * **Visitor mode: not supported**
1550
1557
  */
1551
1558
  async registerInTournament(tournamentInstanceId) {
1552
1559
  const r = await this.api.registerInTournament(null, tournamentInstanceId);
@@ -1556,38 +1563,38 @@ class WSAPI {
1556
1563
  };
1557
1564
  return o;
1558
1565
  }
1559
- /**
1560
- * 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.
1561
- * For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
1562
- *
1563
- * **Example**:
1564
- * ```
1565
- * _smartico.api.getLeaderBoard(1).then((result) => {
1566
- * console.log(result);
1567
- * });
1568
- * ```
1569
- *
1570
- * **Example in the Visitor mode**:
1571
- * ```
1572
- * _smartico.vapi('EN').getLeaderBoard(1).then((result) => {
1573
- * console.log(result);
1574
- * });
1575
- * ```
1566
+ /**
1567
+ * 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.
1568
+ * For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
1569
+ *
1570
+ * **Example**:
1571
+ * ```
1572
+ * _smartico.api.getLeaderBoard(1).then((result) => {
1573
+ * console.log(result);
1574
+ * });
1575
+ * ```
1576
+ *
1577
+ * **Example in the Visitor mode**:
1578
+ * ```
1579
+ * _smartico.vapi('EN').getLeaderBoard(1).then((result) => {
1580
+ * console.log(result);
1581
+ * });
1582
+ * ```
1576
1583
  */
1577
1584
  async getLeaderBoard(periodType, getPreviousPeriod) {
1578
1585
  return OCache.use(onUpdateContextKey.LeaderBoards, ECacheContext.WSAPI, () => this.api.leaderboardsGetT(null, periodType, getPreviousPeriod), CACHE_DATA_SEC);
1579
1586
  }
1580
- /** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
1581
- * The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
1582
- * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
1583
- * This functions return list of messages without the body of the message.
1584
- * 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.
1585
- * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
1586
- * 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.
1587
- *
1588
- * **Visitor mode: not supported**
1589
- *
1590
- * @param params
1587
+ /** Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
1588
+ * The maximum number of messages per request is limited to 20. An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
1589
+ * You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
1590
+ * This functions return list of messages without the body of the message.
1591
+ * 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.
1592
+ * All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
1593
+ * 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.
1594
+ *
1595
+ * **Visitor mode: not supported**
1596
+ *
1597
+ * @param params
1591
1598
  */
1592
1599
  async getInboxMessages({
1593
1600
  from,
@@ -1600,18 +1607,18 @@ class WSAPI {
1600
1607
  }
1601
1608
  return await this.api.getInboxMessagesT(null, from, to, onlyFavorite);
1602
1609
  }
1603
- /**
1604
- * Returns the message body of the specified message guid.
1605
- *
1606
- * **Visitor mode: not supported**
1610
+ /**
1611
+ * Returns the message body of the specified message guid.
1612
+ *
1613
+ * **Visitor mode: not supported**
1607
1614
  */
1608
1615
  async getInboxMessageBody(messageGuid) {
1609
1616
  return await this.api.getInboxMessageBodyT(messageGuid);
1610
1617
  }
1611
- /**
1612
- * Requests to mark inbox message with specified guid as read
1613
- *
1614
- * **Visitor mode: not supported**
1618
+ /**
1619
+ * Requests to mark inbox message with specified guid as read
1620
+ *
1621
+ * **Visitor mode: not supported**
1615
1622
  */
1616
1623
  async markInboxMessageAsRead(messageGuid) {
1617
1624
  const r = await this.api.markInboxMessageRead(null, messageGuid);
@@ -1620,10 +1627,10 @@ class WSAPI {
1620
1627
  err_message: r.errMsg
1621
1628
  };
1622
1629
  }
1623
- /**
1624
- * Requests to mark all inbox messages as rea
1625
- *
1626
- * **Visitor mode: not supported**
1630
+ /**
1631
+ * Requests to mark all inbox messages as rea
1632
+ *
1633
+ * **Visitor mode: not supported**
1627
1634
  */
1628
1635
  async markAllInboxMessagesAsRead() {
1629
1636
  const r = await this.api.markAllInboxMessageRead(null);
@@ -1632,10 +1639,10 @@ class WSAPI {
1632
1639
  err_message: r.errMsg
1633
1640
  };
1634
1641
  }
1635
- /**
1636
- * Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
1637
- *
1638
- * **Visitor mode: not supported**
1642
+ /**
1643
+ * Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
1644
+ *
1645
+ * **Visitor mode: not supported**
1639
1646
  */
1640
1647
  async markUnmarkInboxMessageAsFavorite(messageGuid, mark) {
1641
1648
  const r = await this.api.markUnmarkInboxMessageAsFavorite(null, messageGuid, mark);
@@ -1644,10 +1651,10 @@ class WSAPI {
1644
1651
  err_message: r.errMsg
1645
1652
  };
1646
1653
  }
1647
- /**
1648
- * Requests to delete inbox message
1649
- *
1650
- * **Visitor mode: not supported**
1654
+ /**
1655
+ * Requests to delete inbox message
1656
+ *
1657
+ * **Visitor mode: not supported**
1651
1658
  */
1652
1659
  async deleteInboxMessage(messageGuid) {
1653
1660
  const r = await this.api.deleteInboxMessage(null, messageGuid);
@@ -1656,10 +1663,10 @@ class WSAPI {
1656
1663
  err_message: r.errMsg
1657
1664
  };
1658
1665
  }
1659
- /**
1660
- * Requests to delete all inbox messages
1661
- *
1662
- * **Visitor mode: not supported**
1666
+ /**
1667
+ * Requests to delete all inbox messages
1668
+ *
1669
+ * **Visitor mode: not supported**
1663
1670
  */
1664
1671
  async deleteAllInboxMessages() {
1665
1672
  const r = await this.api.deleteAllInboxMessages(null);
@@ -1668,8 +1675,8 @@ class WSAPI {
1668
1675
  err_message: r.errMsg
1669
1676
  };
1670
1677
  }
1671
- /**
1672
- * Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
1678
+ /**
1679
+ * Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
1673
1680
  */
1674
1681
  async getTranslations(lang_code) {
1675
1682
  const r = await this.api.getTranslationsT(null, lang_code, []);
@@ -1722,24 +1729,24 @@ class WSAPI {
1722
1729
  OCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Jackpots);
1723
1730
  OCache.clear(ECacheContext.WSAPI, onUpdateContextKey.Pots);
1724
1731
  }
1725
- /** Returns list of Jackpots that are active in the systen and matching to the filter definition.
1726
- * If filter is not provided, all active jackpots will be returned.
1727
- * Filter can be used to get jackpots related to specific game or specific jackpot template.
1728
- * 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
1729
- *
1730
- * **Example**:
1731
- * ```
1732
- * _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
1733
- * console.log(result);
1734
- * });
1735
- * ```
1736
- *
1737
- * **Example in the Visitor mode**:
1738
- * ```
1739
- * _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
1740
- * console.log(result);
1741
- * });
1742
- * ```
1732
+ /** Returns list of Jackpots that are active in the systen and matching to the filter definition.
1733
+ * If filter is not provided, all active jackpots will be returned.
1734
+ * Filter can be used to get jackpots related to specific game or specific jackpot template.
1735
+ * 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
1736
+ *
1737
+ * **Example**:
1738
+ * ```
1739
+ * _smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
1740
+ * console.log(result);
1741
+ * });
1742
+ * ```
1743
+ *
1744
+ * **Example in the Visitor mode**:
1745
+ * ```
1746
+ * _smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
1747
+ * console.log(result);
1748
+ * });
1749
+ * ```
1743
1750
  */
1744
1751
  async jackpotGet(filter) {
1745
1752
  var _this = this;
@@ -1771,19 +1778,19 @@ class WSAPI {
1771
1778
  return _jp;
1772
1779
  });
1773
1780
  }
1774
- /**
1775
- * Opt-in currently logged in user to the jackpot with the specified jp_template_id.
1776
- * You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
1777
- *
1778
- * **Example**:
1779
- * ```
1780
- * _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
1781
- * console.log('Opted in to the jackpot');
1782
- * });
1783
- * ```
1784
- *
1785
- * **Visitor mode: not supported**
1786
- *
1781
+ /**
1782
+ * Opt-in currently logged in user to the jackpot with the specified jp_template_id.
1783
+ * You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
1784
+ *
1785
+ * **Example**:
1786
+ * ```
1787
+ * _smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
1788
+ * console.log('Opted in to the jackpot');
1789
+ * });
1790
+ * ```
1791
+ *
1792
+ * **Visitor mode: not supported**
1793
+ *
1787
1794
  */
1788
1795
  async jackpotOptIn(filter) {
1789
1796
  if (!filter.jp_template_id) {
@@ -1792,19 +1799,19 @@ class WSAPI {
1792
1799
  const result = await this.api.jackpotOptIn(null, filter);
1793
1800
  return result;
1794
1801
  }
1795
- /**
1796
- * Opt-out currently logged in user from the jackpot with the specified jp_template_id.
1797
- * You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
1798
- *
1799
- * **Example**:
1800
- * ```
1801
- * _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
1802
- * console.log('Opted out from the jackpot');
1803
- * });
1804
- * ```
1805
- *
1806
- * **Visitor mode: not supported**
1807
- *
1802
+ /**
1803
+ * Opt-out currently logged in user from the jackpot with the specified jp_template_id.
1804
+ * You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
1805
+ *
1806
+ * **Example**:
1807
+ * ```
1808
+ * _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
1809
+ * console.log('Opted out from the jackpot');
1810
+ * });
1811
+ * ```
1812
+ *
1813
+ * **Visitor mode: not supported**
1814
+ *
1808
1815
  */
1809
1816
  async jackpotOptOut(filter) {
1810
1817
  if (!filter.jp_template_id) {
@@ -2091,7 +2098,6 @@ class SmarticoAPI {
2091
2098
  const message = this.buildMessage(user_ext_id, ClassId.IDENTIFY, {
2092
2099
  request_id: IntUtils.uuid() // AA: do we need request_id?
2093
2100
  });
2094
-
2095
2101
  const r = await this.send(message, ClassId.IDENTIFY_RESPONSE);
2096
2102
  r.avatar_id = CoreUtils.avatarUrl(r.avatar_id, this.avatarDomain);
2097
2103
  return r;
@@ -2331,7 +2337,7 @@ class SmarticoAPI {
2331
2337
  return tournamentInfoItemTransform(response);
2332
2338
  }
2333
2339
  async leaderboardGet(user_ext_id, period_type_id, prevPeriod = false, force_language) {
2334
- var _response$map$boardKe, _response$map$boardKe2, _response$map$boardKe3, _response$map$boardKe4;
2340
+ var _response$map$boardKe, _response$map$boardKe2;
2335
2341
  const message = this.buildMessage(user_ext_id, ClassId.GET_LEADERS_BOARD_REQUEST, {
2336
2342
  period_type_id,
2337
2343
  snapshot_offset: prevPeriod ? 1 : 0,
@@ -2342,10 +2348,10 @@ class SmarticoAPI {
2342
2348
  if (boardKey === undefined) {
2343
2349
  return undefined;
2344
2350
  }
2345
- if ((_response$map$boardKe = response.map[boardKey]) != null && (_response$map$boardKe2 = _response$map$boardKe.userPosition) != null && _response$map$boardKe2.avatar_id) {
2351
+ if ((_response$map$boardKe = response.map[boardKey]) != null && (_response$map$boardKe = _response$map$boardKe.userPosition) != null && _response$map$boardKe.avatar_id) {
2346
2352
  response.map[boardKey].userPosition.avatar_url = CoreUtils.avatarUrl(response.map[boardKey].userPosition.avatar_id, this.avatarDomain);
2347
2353
  }
2348
- if ((_response$map$boardKe3 = response.map[boardKey]) != null && (_response$map$boardKe4 = _response$map$boardKe3.positions) != null && _response$map$boardKe4.length) {
2354
+ if ((_response$map$boardKe2 = response.map[boardKey]) != null && (_response$map$boardKe2 = _response$map$boardKe2.positions) != null && _response$map$boardKe2.length) {
2349
2355
  response.map[boardKey].positions.forEach(p => {
2350
2356
  p.avatar_url = CoreUtils.avatarUrl(p.avatar_id, this.avatarDomain);
2351
2357
  });