@smartico/public-api 0.0.154 → 0.0.155

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/.prettierrc +12 -0
  2. package/dist/Base/ProtocolRequest.d.ts +1 -1
  3. package/dist/Base/ProtocolResponse.d.ts +1 -1
  4. package/dist/Core/CheckSegmentMatchRequest.d.ts +1 -1
  5. package/dist/Core/CheckSegmentMatchResponse.d.ts +1 -1
  6. package/dist/Core/GetAchievementsUserInfoRequest.d.ts +1 -1
  7. package/dist/Core/GetAchievementsUserInfoResponse.d.ts +1 -1
  8. package/dist/Core/GetLabelInfoRequest.d.ts +1 -1
  9. package/dist/Core/GetLabelInfoResponse.d.ts +1 -1
  10. package/dist/Core/GetTranslationsRequest.d.ts +2 -2
  11. package/dist/Core/GetTranslationsResponse.d.ts +1 -1
  12. package/dist/Core/ResponseIdentify.d.ts +2 -2
  13. package/dist/CustomSections/GetCustomSectionsRequest.d.ts +1 -1
  14. package/dist/CustomSections/GetCustomSectionsResponse.d.ts +2 -2
  15. package/dist/CustomSections/UICustomSection.d.ts +2 -2
  16. package/dist/GResponse.d.ts +1 -1
  17. package/dist/Inbox/GetInboxMessagesRequest.d.ts +1 -1
  18. package/dist/Inbox/GetInboxMessagesResponse.d.ts +3 -3
  19. package/dist/Inbox/InboxMessage.d.ts +2 -2
  20. package/dist/Inbox/MarkInboxMessageDeletedRequest.d.ts +1 -1
  21. package/dist/Inbox/MarkInboxMessageDeletedResponse.d.ts +1 -1
  22. package/dist/Inbox/MarkInboxMessageReadRequest.d.ts +1 -1
  23. package/dist/Inbox/MarkInboxMessageReadResponse.d.ts +1 -1
  24. package/dist/Inbox/MarkInboxMessageStarredRequest.d.ts +1 -1
  25. package/dist/Inbox/MarkInboxMessageStarredResponse.d.ts +1 -1
  26. package/dist/Inbox/index.d.ts +8 -8
  27. package/dist/Jackpots/GetJackpotsPotsRequest.d.ts +1 -1
  28. package/dist/Jackpots/GetJackpotsPotsResponse.d.ts +2 -2
  29. package/dist/Jackpots/GetJackpotsRequest.d.ts +1 -1
  30. package/dist/Jackpots/GetJackpotsResponse.d.ts +2 -2
  31. package/dist/Jackpots/JackpotDetails.d.ts +6 -6
  32. package/dist/Jackpots/JackpotWinPush.d.ts +3 -3
  33. package/dist/Jackpots/JackpotsOptinRequest.d.ts +1 -1
  34. package/dist/Jackpots/JackpotsOptinResponse.d.ts +1 -1
  35. package/dist/Jackpots/JackpotsOptoutRequest.d.ts +1 -1
  36. package/dist/Jackpots/JackpotsOptoutResponse.d.ts +1 -1
  37. package/dist/Leaderboard/GetLeaderBoardsRequest.d.ts +2 -2
  38. package/dist/Leaderboard/GetLeaderBoardsResponse.d.ts +2 -2
  39. package/dist/Leaderboard/LeaderBoardDetails.d.ts +3 -3
  40. package/dist/Leaderboard/LeaderBoards.d.ts +2 -2
  41. package/dist/Leaderboard/index.d.ts +6 -6
  42. package/dist/Level/GetLevelMapResponse.d.ts +3 -3
  43. package/dist/Level/Level.d.ts +1 -1
  44. package/dist/MiniGames/SAWAcknowledgeSpinPushRequest.d.ts +1 -1
  45. package/dist/MiniGames/SAWDoAknowledgeRequest.d.ts +1 -1
  46. package/dist/MiniGames/SAWDoAknowledgeResponse.d.ts +1 -1
  47. package/dist/MiniGames/SAWDoSpinRequest.d.ts +1 -1
  48. package/dist/MiniGames/SAWDoSpinResponse.d.ts +2 -2
  49. package/dist/MiniGames/SAWEventSawPush.d.ts +1 -1
  50. package/dist/MiniGames/SAWGetTemplatesRequest.d.ts +1 -1
  51. package/dist/MiniGames/SAWGetTemplatesResponse.d.ts +3 -3
  52. package/dist/MiniGames/SAWPrize.d.ts +2 -2
  53. package/dist/MiniGames/SAWPrizeDropAknowledgeRequest.d.ts +3 -1
  54. package/dist/MiniGames/SAWPrizeDropAknowledgeResponse.d.ts +1 -1
  55. package/dist/MiniGames/SAWPrizeDropWinPush.d.ts +4 -3
  56. package/dist/MiniGames/SAWPrizeUI.d.ts +2 -2
  57. package/dist/MiniGames/SAWSpinsCountPush.d.ts +1 -1
  58. package/dist/MiniGames/SAWTemplate.d.ts +4 -4
  59. package/dist/MiniGames/SAWTemplateUI.d.ts +1 -1
  60. package/dist/MiniGames/SAWUtils.d.ts +1 -1
  61. package/dist/MiniGames/index.d.ts +24 -22
  62. package/dist/Missions/AchClaimPrizeRequest.d.ts +1 -1
  63. package/dist/Missions/AchClaimPrizeResponse.d.ts +1 -1
  64. package/dist/Missions/AchievementCategory.d.ts +2 -2
  65. package/dist/Missions/AchievementOptinRequest.d.ts +1 -1
  66. package/dist/Missions/AchievementOptinResponse.d.ts +1 -1
  67. package/dist/Missions/GetAchCategoriesRequest.d.ts +1 -1
  68. package/dist/Missions/GetAchCategoriesResponse.d.ts +2 -2
  69. package/dist/Missions/GetAchievementMapRequest.d.ts +1 -1
  70. package/dist/Missions/GetAchievementMapResponse.d.ts +2 -2
  71. package/dist/Missions/GetRelatedAchTourRequest.d.ts +1 -1
  72. package/dist/Missions/GetRelatedAchTourResponse.d.ts +3 -3
  73. package/dist/Missions/ReloadAchievementsEvent.d.ts +2 -2
  74. package/dist/Missions/UserAchievement.d.ts +7 -7
  75. package/dist/Missions/UserAchievementTask.d.ts +2 -2
  76. package/dist/Missions/index.d.ts +13 -13
  77. package/dist/Quiz/MarketsInfo.d.ts +2 -2
  78. package/dist/Quiz/MarketsPerSport.d.ts +1 -1
  79. package/dist/SmarticoAPI.d.ts +8 -8
  80. package/dist/SmarticoLib/index.d.ts +39 -39
  81. package/dist/Store/BuyStoreItemRequest.d.ts +1 -1
  82. package/dist/Store/BuyStoreItemResponse.d.ts +1 -1
  83. package/dist/Store/GetCategoriesStoreResponse.d.ts +2 -2
  84. package/dist/Store/GetStoreHistoryRequest.d.ts +1 -1
  85. package/dist/Store/GetStoreHistoryResponse.d.ts +2 -2
  86. package/dist/Store/GetStoreItemsResponse.d.ts +2 -2
  87. package/dist/Store/StoreCategory.d.ts +2 -2
  88. package/dist/Store/StoreItem.d.ts +3 -3
  89. package/dist/Store/StoreItemPurchased.d.ts +2 -2
  90. package/dist/Store/index.d.ts +10 -10
  91. package/dist/Tournaments/GetTournamentInfoRequest.d.ts +1 -1
  92. package/dist/Tournaments/GetTournamentInfoResponse.d.ts +5 -5
  93. package/dist/Tournaments/GetTournamentsRequest.d.ts +1 -1
  94. package/dist/Tournaments/GetTournamentsResponse.d.ts +2 -2
  95. package/dist/Tournaments/Tournament.d.ts +8 -8
  96. package/dist/Tournaments/TournamentPrize.d.ts +1 -1
  97. package/dist/Tournaments/TournamentRegisterRequest.d.ts +1 -1
  98. package/dist/Tournaments/TournamentRegisterResponse.d.ts +2 -2
  99. package/dist/Tournaments/TournamentUtils.d.ts +3 -3
  100. package/dist/Tournaments/index.d.ts +16 -16
  101. package/dist/WSAPI/WSAPI.d.ts +65 -65
  102. package/dist/WSAPI/WSAPITypes.d.ts +18 -18
  103. package/dist/index.js +76 -78
  104. package/dist/index.js.map +1 -1
  105. package/dist/index.modern.mjs +103 -103
  106. package/dist/index.modern.mjs.map +1 -1
  107. package/package.json +1 -1
  108. package/src/Base/AchRelatedGame.ts +13 -13
  109. package/src/Base/ClassId.ts +118 -121
  110. package/src/Base/ProtocolMessage.ts +6 -7
  111. package/src/Base/ProtocolRequest.ts +4 -5
  112. package/src/Base/ProtocolResponse.ts +3 -5
  113. package/src/CookieStore.ts +10 -11
  114. package/src/Core/ActivityTypeLimited.ts +17 -18
  115. package/src/Core/CheckSegmentMatchRequest.ts +2 -3
  116. package/src/Core/CheckSegmentMatchResponse.ts +6 -6
  117. package/src/Core/CoreUtils.ts +37 -39
  118. package/src/Core/GetAchievementsUserInfoRequest.ts +2 -4
  119. package/src/Core/GetAchievementsUserInfoResponse.ts +4 -4
  120. package/src/Core/GetLabelInfoRequest.ts +2 -4
  121. package/src/Core/GetLabelInfoResponse.ts +4 -4
  122. package/src/Core/GetTranslationsRequest.ts +5 -7
  123. package/src/Core/GetTranslationsResponse.ts +3 -5
  124. package/src/Core/PublicLabelSettings.ts +29 -30
  125. package/src/Core/PublicProperties.ts +7 -7
  126. package/src/Core/ResponseIdentify.ts +12 -12
  127. package/src/Core/TranslationArea.ts +8 -9
  128. package/src/Core/index.ts +1 -1
  129. package/src/CustomSections/AchCustomSection.ts +20 -20
  130. package/src/CustomSections/GetCustomSectionsRequest.ts +2 -4
  131. package/src/CustomSections/GetCustomSectionsResponse.ts +4 -5
  132. package/src/CustomSections/UICustomSection.ts +30 -29
  133. package/src/CustomSections/index.ts +4 -4
  134. package/src/ErrorCodes.ts +11 -12
  135. package/src/GResponse.ts +5 -5
  136. package/src/ILogger.ts +6 -10
  137. package/src/Inbox/GetInboxMessagesRequest.ts +4 -5
  138. package/src/Inbox/GetInboxMessagesResponse.ts +15 -17
  139. package/src/Inbox/InboxMessage.ts +31 -33
  140. package/src/Inbox/InboxMessageType.ts +9 -9
  141. package/src/Inbox/MarkInboxMessageDeletedRequest.ts +3 -3
  142. package/src/Inbox/MarkInboxMessageDeletedResponse.ts +3 -3
  143. package/src/Inbox/MarkInboxMessageReadRequest.ts +4 -5
  144. package/src/Inbox/MarkInboxMessageReadResponse.ts +4 -5
  145. package/src/Inbox/MarkInboxMessageStarredRequest.ts +4 -5
  146. package/src/Inbox/MarkInboxMessageStarredResponse.ts +4 -5
  147. package/src/Inbox/index.ts +10 -10
  148. package/src/IntUtils.ts +72 -85
  149. package/src/Jackpots/GetJackpotsPotsRequest.ts +3 -3
  150. package/src/Jackpots/GetJackpotsPotsResponse.ts +3 -5
  151. package/src/Jackpots/GetJackpotsRequest.ts +4 -6
  152. package/src/Jackpots/GetJackpotsResponse.ts +5 -7
  153. package/src/Jackpots/JackPotWinner.ts +11 -12
  154. package/src/Jackpots/JackpotContributionType.ts +3 -4
  155. package/src/Jackpots/JackpotDetails.ts +31 -31
  156. package/src/Jackpots/JackpotHtmlTemplate.ts +3 -3
  157. package/src/Jackpots/JackpotPot.ts +11 -12
  158. package/src/Jackpots/JackpotPublicMeta.ts +16 -16
  159. package/src/Jackpots/JackpotType.ts +2 -5
  160. package/src/Jackpots/JackpotWinPush.ts +6 -6
  161. package/src/Jackpots/JackpotsOptinRequest.ts +3 -5
  162. package/src/Jackpots/JackpotsOptinResponse.ts +2 -4
  163. package/src/Jackpots/JackpotsOptoutRequest.ts +3 -5
  164. package/src/Jackpots/JackpotsOptoutResponse.ts +2 -4
  165. package/src/Jackpots/index.ts +16 -16
  166. package/src/Leaderboard/GetLeaderBoardsRequest.ts +8 -9
  167. package/src/Leaderboard/GetLeaderBoardsResponse.ts +4 -6
  168. package/src/Leaderboard/LeaderBoardDetails.ts +11 -12
  169. package/src/Leaderboard/LeaderBoardPeriodType.ts +3 -3
  170. package/src/Leaderboard/LeaderBoardPosition.ts +9 -10
  171. package/src/Leaderboard/LeaderBoardPublicMeta.ts +3 -4
  172. package/src/Leaderboard/LeaderBoards.ts +42 -42
  173. package/src/Leaderboard/index.ts +6 -6
  174. package/src/Level/GetLevelMapResponse.ts +18 -21
  175. package/src/Level/Level.ts +10 -11
  176. package/src/Level/LevelPublicMeta.ts +17 -17
  177. package/src/Level/index.ts +3 -3
  178. package/src/MiniGames/SAWAcknowledgeSpinPushRequest.ts +3 -4
  179. package/src/MiniGames/SAWAcknowledgeType.ts +3 -4
  180. package/src/MiniGames/SAWAskForUsername.ts +3 -4
  181. package/src/MiniGames/SAWBuyInType.ts +15 -13
  182. package/src/MiniGames/SAWDoAknowledgeRequest.ts +3 -3
  183. package/src/MiniGames/SAWDoAknowledgeResponse.ts +3 -3
  184. package/src/MiniGames/SAWDoSpinRequest.ts +3 -5
  185. package/src/MiniGames/SAWDoSpinResponse.ts +10 -11
  186. package/src/MiniGames/SAWEventSawPush.ts +3 -4
  187. package/src/MiniGames/SAWGameType.ts +23 -21
  188. package/src/MiniGames/SAWGetTemplatesRequest.ts +3 -3
  189. package/src/MiniGames/SAWGetTemplatesResponse.ts +53 -65
  190. package/src/MiniGames/SAWPrize.ts +11 -12
  191. package/src/MiniGames/SAWPrizeDropAknowledgeRequest.ts +5 -3
  192. package/src/MiniGames/SAWPrizeDropAknowledgeResponse.ts +3 -3
  193. package/src/MiniGames/SAWPrizeDropWinPush.ts +9 -8
  194. package/src/MiniGames/SAWPrizeType.ts +23 -22
  195. package/src/MiniGames/SAWPrizeUI.ts +17 -17
  196. package/src/MiniGames/SAWSpinErrorCode.ts +15 -16
  197. package/src/MiniGames/SAWSpinsCountPush.ts +4 -4
  198. package/src/MiniGames/SAWTemplate.ts +29 -29
  199. package/src/MiniGames/SAWTemplateUI.ts +45 -47
  200. package/src/MiniGames/SAWUtils.ts +23 -26
  201. package/src/MiniGames/SAWWinSoundType.ts +10 -11
  202. package/src/MiniGames/index.ts +24 -22
  203. package/src/Missions/AchCategoryPublicMeta.ts +2 -3
  204. package/src/Missions/AchClaimPrizeRequest.ts +4 -5
  205. package/src/Missions/AchClaimPrizeResponse.ts +3 -4
  206. package/src/Missions/AchievementCategory.ts +14 -15
  207. package/src/Missions/AchievementOptinRequest.ts +3 -5
  208. package/src/Missions/AchievementOptinResponse.ts +2 -4
  209. package/src/Missions/AchievementPublicMeta.ts +19 -20
  210. package/src/Missions/AchievementStatus.ts +7 -8
  211. package/src/Missions/AchievementTaskPublicMeta.ts +2 -3
  212. package/src/Missions/AchievementTaskType.ts +2 -2
  213. package/src/Missions/AchievementType.ts +2 -3
  214. package/src/Missions/GetAchCategoriesRequest.ts +2 -4
  215. package/src/Missions/GetAchCategoriesResponse.ts +4 -5
  216. package/src/Missions/GetAchievementMapRequest.ts +2 -4
  217. package/src/Missions/GetAchievementMapResponse.ts +3 -5
  218. package/src/Missions/GetRelatedAchTourRequest.ts +3 -4
  219. package/src/Missions/GetRelatedAchTourResponse.ts +5 -7
  220. package/src/Missions/ReloadAchievementsEvent.ts +5 -5
  221. package/src/Missions/ScheduledMissionType.ts +4 -5
  222. package/src/Missions/UserAchievement.ts +104 -108
  223. package/src/Missions/UserAchievementTask.ts +13 -15
  224. package/src/Missions/index.ts +19 -19
  225. package/src/NodeCache.ts +44 -49
  226. package/src/OCache.ts +51 -57
  227. package/src/Quiz/MarketsAnswers.ts +34 -34
  228. package/src/Quiz/MarketsInfo.ts +184 -177
  229. package/src/Quiz/MarketsPerSport.ts +30 -37
  230. package/src/Quiz/MarketsType.ts +28 -28
  231. package/src/Quiz/ScoreResultTypes.ts +18 -18
  232. package/src/Quiz/SportTypes.ts +4 -4
  233. package/src/Quiz/index.ts +6 -6
  234. package/src/SmarticoAPI.ts +769 -730
  235. package/src/SmarticoLib/index.ts +1053 -1069
  236. package/src/Store/BuyStoreItemErrorCode.ts +10 -10
  237. package/src/Store/BuyStoreItemRequest.ts +2 -2
  238. package/src/Store/BuyStoreItemResponse.ts +2 -3
  239. package/src/Store/GetCategoriesStoreResponse.ts +3 -8
  240. package/src/Store/GetStoreHistoryRequest.ts +3 -3
  241. package/src/Store/GetStoreHistoryResponse.ts +4 -4
  242. package/src/Store/GetStoreItemsResponse.ts +3 -4
  243. package/src/Store/StoreCategory.ts +14 -15
  244. package/src/Store/StoreCategoryPublicMeta.ts +2 -3
  245. package/src/Store/StoreItem.ts +32 -33
  246. package/src/Store/StoreItemPublicMeta.ts +10 -10
  247. package/src/Store/StoreItemPurchased.ts +40 -40
  248. package/src/Store/StoreItemType.ts +20 -19
  249. package/src/Store/index.ts +13 -13
  250. package/src/Tournaments/GetTournamentInfoRequest.ts +2 -3
  251. package/src/Tournaments/GetTournamentInfoResponse.ts +45 -48
  252. package/src/Tournaments/GetTournamentsRequest.ts +2 -4
  253. package/src/Tournaments/GetTournamentsResponse.ts +7 -14
  254. package/src/Tournaments/Tournament.ts +109 -115
  255. package/src/Tournaments/TournamentInstanceStatus.ts +17 -18
  256. package/src/Tournaments/TournamentPlayer.ts +7 -8
  257. package/src/Tournaments/TournamentPrize.ts +9 -10
  258. package/src/Tournaments/TournamentPublicMeta.ts +26 -26
  259. package/src/Tournaments/TournamentRegisterRequest.ts +2 -3
  260. package/src/Tournaments/TournamentRegisterResponse.ts +3 -7
  261. package/src/Tournaments/TournamentRegistrationError.ts +9 -9
  262. package/src/Tournaments/TournamentRegistrationStatus.ts +25 -27
  263. package/src/Tournaments/TournamentRegistrationType.ts +15 -16
  264. package/src/Tournaments/TournamentType.ts +3 -4
  265. package/src/Tournaments/TournamentUtils.ts +90 -89
  266. package/src/Tournaments/index.ts +16 -16
  267. package/src/WSAPI/WSAPI.ts +781 -763
  268. package/src/WSAPI/WSAPITypes.ts +574 -586
  269. package/src/index.ts +15 -15
@@ -1,32 +1,33 @@
1
1
  /** @hidden */
2
2
  export enum SAWPrizeType {
3
-
4
- NO_PRIZE = 1,
5
- POINTS = 2,
6
- BONUS = 3,
7
- MANUAL = 4,
8
- SPIN = 5,
9
- JACKPOT = 6
3
+ NO_PRIZE = 1,
4
+ POINTS = 2,
5
+ BONUS = 3,
6
+ MANUAL = 4,
7
+ SPIN = 5,
8
+ JACKPOT = 6,
10
9
  }
11
10
 
12
11
  export enum MiniGamePrizeTypeName {
13
- NO_PRIZE = 'no-prize',
14
- POINTS = 'points',
15
- BONUS = 'bonus',
16
- MANUAL = 'manual',
17
- SPIN = 'spin',
18
- JACKPOT = 'jackpot',
19
- UNKNOWN = "unknown"
12
+ NO_PRIZE = 'no-prize',
13
+ POINTS = 'points',
14
+ BONUS = 'bonus',
15
+ MANUAL = 'manual',
16
+ SPIN = 'spin',
17
+ JACKPOT = 'jackpot',
18
+ UNKNOWN = 'unknown',
20
19
  }
21
20
 
22
21
  /** @hidden */
23
22
  export const MiniGamePrizeTypeNamed = (type: SAWPrizeType): MiniGamePrizeTypeName => {
24
- return {
25
- [SAWPrizeType.NO_PRIZE]: MiniGamePrizeTypeName.NO_PRIZE,
26
- [SAWPrizeType.POINTS]: MiniGamePrizeTypeName.POINTS,
27
- [SAWPrizeType.BONUS]: MiniGamePrizeTypeName.BONUS,
28
- [SAWPrizeType.MANUAL]: MiniGamePrizeTypeName.MANUAL,
29
- [SAWPrizeType.SPIN]: MiniGamePrizeTypeName.SPIN,
30
- [SAWPrizeType.JACKPOT]: MiniGamePrizeTypeName.JACKPOT,
31
- }[type] || MiniGamePrizeTypeName.UNKNOWN;
23
+ return (
24
+ {
25
+ [SAWPrizeType.NO_PRIZE]: MiniGamePrizeTypeName.NO_PRIZE,
26
+ [SAWPrizeType.POINTS]: MiniGamePrizeTypeName.POINTS,
27
+ [SAWPrizeType.BONUS]: MiniGamePrizeTypeName.BONUS,
28
+ [SAWPrizeType.MANUAL]: MiniGamePrizeTypeName.MANUAL,
29
+ [SAWPrizeType.SPIN]: MiniGamePrizeTypeName.SPIN,
30
+ [SAWPrizeType.JACKPOT]: MiniGamePrizeTypeName.JACKPOT,
31
+ }[type] || MiniGamePrizeTypeName.UNKNOWN
32
+ )
32
33
  }
@@ -1,19 +1,19 @@
1
- import { SAWAcknowledgeType } from "./SAWAcknowledgeType";
2
- import { SAWWinSoundType } from "./SAWWinSoundType";
1
+ import { SAWAcknowledgeType } from './SAWAcknowledgeType'
2
+ import { SAWWinSoundType } from './SAWWinSoundType'
3
3
 
4
4
  export interface SAWPrizeUI {
5
- position?: number; // for scratch card defines position of prize in the list
6
- name: string;
7
- name_original: string; // keeps original name, how it came from the servers. This is needed for the Jackpot value replacemenet
8
- aknowledge_message: string;
9
- sectors: number[];
10
- acknowledge_type: SAWAcknowledgeType;
11
- acknowledge_dp?: string;
12
- font_size?: number;
13
- font_size_mobile?: number;
14
- sound_type: SAWWinSoundType;
15
- icon?: string;
16
- replace_name_with_image?: boolean;
17
- acknowledge_action_title?: string;
18
- custom_win_sound?: string;
19
- }
5
+ position?: number // for scratch card defines position of prize in the list
6
+ name: string
7
+ name_original: string // keeps original name, how it came from the servers. This is needed for the Jackpot value replacemenet
8
+ aknowledge_message: string
9
+ sectors: number[]
10
+ acknowledge_type: SAWAcknowledgeType
11
+ acknowledge_dp?: string
12
+ font_size?: number
13
+ font_size_mobile?: number
14
+ sound_type: SAWWinSoundType
15
+ icon?: string
16
+ replace_name_with_image?: boolean
17
+ acknowledge_action_title?: string
18
+ custom_win_sound?: string
19
+ }
@@ -1,18 +1,17 @@
1
-
2
1
  /*
3
- * Possible error codes for the mini-games attempts
4
- */
2
+ * Possible error codes for the mini-games attempts
3
+ */
5
4
  export enum SAWSpinErrorCode {
6
- /** No error */
7
- SAW_OK = 0,
8
- /** User doesn't have 'spin attempts' to play. In case buy in type for the game is 'spins' based */
9
- SAW_NO_SPINS = 40001,
10
- /** The are no prizes left to play the game */
11
- SAW_PRIZE_POOL_EMPTY = 40002,
12
- /** User doesn't have enough points to play. In case buy in type for the game is 'points' based */
13
- SAW_NOT_ENOUGH_POINTS = 40003,
14
- /** User reached max number of game attempts defined in the BackOffice */
15
- SAW_FAILED_MAX_SPINS_REACHED = 40004,
16
- /** Special code for the 'visitor' mode */
17
- SAW_VISITOR_STOP_SPIN_REQUEST = -40001
18
- }
5
+ /** No error */
6
+ SAW_OK = 0,
7
+ /** User doesn't have 'spin attempts' to play. In case buy in type for the game is 'spins' based */
8
+ SAW_NO_SPINS = 40001,
9
+ /** The are no prizes left to play the game */
10
+ SAW_PRIZE_POOL_EMPTY = 40002,
11
+ /** User doesn't have enough points to play. In case buy in type for the game is 'points' based */
12
+ SAW_NOT_ENOUGH_POINTS = 40003,
13
+ /** User reached max number of game attempts defined in the BackOffice */
14
+ SAW_FAILED_MAX_SPINS_REACHED = 40004,
15
+ /** Special code for the 'visitor' mode */
16
+ SAW_VISITOR_STOP_SPIN_REQUEST = -40001,
17
+ }
@@ -1,6 +1,6 @@
1
- import { ProtocolMessage } from ".././Base/ProtocolMessage";
1
+ import { ProtocolMessage } from '.././Base/ProtocolMessage'
2
2
 
3
3
  export interface SAWSpinsCountPush extends ProtocolMessage {
4
- saw_template_id: number;
5
- spin_count: number;
6
- }
4
+ saw_template_id: number
5
+ spin_count: number
6
+ }
@@ -1,41 +1,41 @@
1
- import { SAWBuyInType } from "./SAWBuyInType";
2
- import { SAWGameType } from "./SAWGameType";
3
- import { SAWPrize } from "./SAWPrize";
4
- import { SAWTemplateUI } from "./SAWTemplateUI";
1
+ import { SAWBuyInType } from './SAWBuyInType'
2
+ import { SAWGameType } from './SAWGameType'
3
+ import { SAWPrize } from './SAWPrize'
4
+ import { SAWTemplateUI } from './SAWTemplateUI'
5
5
 
6
6
  export interface SAWTemplate {
7
- saw_template_id: number;
8
- saw_game_type_id: SAWGameType;
9
- saw_template_ui_definition: SAWTemplateUI;
7
+ saw_template_id: number
8
+ saw_game_type_id: SAWGameType
9
+ saw_template_ui_definition: SAWTemplateUI
10
10
 
11
- saw_buyin_type_id: SAWBuyInType;
12
- buyin_cost_points?: number;
13
- visibile_when_can_spin: boolean;
11
+ saw_buyin_type_id: SAWBuyInType
12
+ buyin_cost_points?: number
13
+ visibile_when_can_spin: boolean
14
14
 
15
- spin_count?: number; // inital count, after that server will push SAWSpinsCountPush
15
+ spin_count?: number // inital count, after that server will push SAWSpinsCountPush
16
16
 
17
- prizes: SAWPrize[];
17
+ prizes: SAWPrize[]
18
18
 
19
- is_visible: boolean;
19
+ is_visible: boolean
20
20
 
21
- jackpot_add_on_attempt: number;
22
- jackpot_current: number;
23
- jackpot_guaranteed: number;
21
+ jackpot_add_on_attempt: number
22
+ jackpot_current: number
23
+ jackpot_guaranteed: number
24
24
 
25
- maxActiveSpinsAllowed: number;
26
- maxSpinsCount: number;
27
- maxSpinsPediodMs: number;
25
+ maxActiveSpinsAllowed: number
26
+ maxSpinsCount: number
27
+ maxSpinsPediodMs: number
28
28
 
29
- next_available_spin_ts?: number;
29
+ next_available_spin_ts?: number
30
30
 
31
- saw_skin_key: string;
32
- saw_skin_ui_definition: {
33
- skin_folder: string;
34
- skin_css: string;
35
- };
31
+ saw_skin_key: string
32
+ saw_skin_ui_definition: {
33
+ skin_folder: string
34
+ skin_css: string
35
+ }
36
36
 
37
- expose_game_stat_on_api?: boolean;
38
-
39
- // AA: releavnt only in the context of the SAWPrizeDropWinPush
40
- requires_prize_claim?: boolean;
37
+ expose_game_stat_on_api?: boolean
38
+
39
+ // AA: releavnt only in the context of the SAWPrizeDropWinPush
40
+ requires_prize_claim?: boolean
41
41
  }
@@ -1,53 +1,51 @@
1
- import { SAWAskForUsername } from "./SAWAskForUsername";
1
+ import { SAWAskForUsername } from './SAWAskForUsername'
2
2
 
3
3
  export interface SAWTemplateUI {
4
- skin: string;
5
- name: string;
6
- description?: string;
7
- over_limit_message?: string;
8
- no_attempts_message?: string;
9
- thumbnail?: string;
10
- sectors_count: number;
11
- priority: number;
12
- flow_builder_only: boolean;
13
- background_image?: string;
14
- background_image_mobile?: string;
15
- background_sound?: string;
16
- spin_animation_duration?: number;
17
- scratch_logo?: string;
18
- scratch_cover?: string;
19
- scratch_bg_desktop?: string;
20
- scratch_bg_mobile?: string;
21
- scratch_cursor?: string;
22
- custom_css?: string;
23
- custom_skin_folder?: string;
24
- jackpot_symbol?: string;
4
+ skin: string
5
+ name: string
6
+ description?: string
7
+ over_limit_message?: string
8
+ no_attempts_message?: string
9
+ thumbnail?: string
10
+ sectors_count: number
11
+ priority: number
12
+ flow_builder_only: boolean
13
+ background_image?: string
14
+ background_image_mobile?: string
15
+ background_sound?: string
16
+ spin_animation_duration?: number
17
+ scratch_logo?: string
18
+ scratch_cover?: string
19
+ scratch_bg_desktop?: string
20
+ scratch_bg_mobile?: string
21
+ scratch_cursor?: string
22
+ custom_css?: string
23
+ custom_skin_folder?: string
24
+ jackpot_symbol?: string
25
25
 
26
- promo_image?: string;
27
- promo_text?: string;
28
- matchx_banner?: string;
29
- matchx_seasonal_ranking?: boolean;
30
- matchx_is_completed?: boolean;
31
- matchx_general_board_users_count?: number;
32
- matchx_hide_ranking?: boolean;
33
- ask_for_username?: SAWAskForUsername;
34
- show_prize_board?: boolean;
26
+ promo_image?: string
27
+ promo_text?: string
28
+ matchx_banner?: string
29
+ matchx_seasonal_ranking?: boolean
30
+ matchx_is_completed?: boolean
31
+ matchx_general_board_users_count?: number
32
+ matchx_hide_ranking?: boolean
33
+ ask_for_username?: SAWAskForUsername
34
+ show_prize_board?: boolean
35
35
 
36
- max_spins_period_ms?: number;
37
- show_countdown_for_next_availability?: boolean;
38
- disable_background_music?: boolean;
39
- custom_section_id?: number;
40
- only_in_custom_section?: boolean;
36
+ max_spins_period_ms?: number
37
+ show_countdown_for_next_availability?: boolean
38
+ disable_background_music?: boolean
39
+ custom_section_id?: number
40
+ only_in_custom_section?: boolean
41
41
 
42
- custom_data: any;
42
+ custom_data: any
43
43
 
44
-
45
- // prize drop specific
46
- placeholder1?: string;
47
- placeholder2?: string;
48
- prize_drop_template?: {
49
- id: string;
50
- content: string;
51
- }
52
-
53
- }
44
+ // prize drop specific
45
+ placeholder1?: string
46
+ placeholder2?: string
47
+ prize_drop_template?: {
48
+ id: string
49
+ content: string
50
+ }
51
+ }
@@ -1,31 +1,28 @@
1
- import { SAWBuyInType } from "./SAWBuyInType";
2
- import { SAWTemplate } from "./SAWTemplate";
3
-
1
+ import { SAWBuyInType } from './SAWBuyInType'
2
+ import { SAWTemplate } from './SAWTemplate'
4
3
 
5
4
  class SAWUtils {
5
+ public static canPlay = (t: SAWTemplate, pointsBalance: number): boolean => {
6
+ if (t === null || t === undefined) {
7
+ return false
8
+ }
6
9
 
7
- public static canPlay = (t: SAWTemplate, pointsBalance: number): boolean => {
8
- if (t === null || t === undefined) {
9
- return false;
10
- }
11
-
12
- switch (t.saw_buyin_type_id) {
13
- case SAWBuyInType.Free: {
14
- return true;
15
- }
16
- case SAWBuyInType.Spins: {
17
- return t.spin_count !== null && t.spin_count > 0
18
- }
19
- case SAWBuyInType.Points: {
20
- return t.buyin_cost_points <= pointsBalance;
21
- }
22
- default: {
23
- console.error("MiniGamesUtils.canPlay: Unknwon SAW buyin type " + t.saw_buyin_type_id);
24
- return false;
25
- }
26
- }
27
- }
28
-
10
+ switch (t.saw_buyin_type_id) {
11
+ case SAWBuyInType.Free: {
12
+ return true
13
+ }
14
+ case SAWBuyInType.Spins: {
15
+ return t.spin_count !== null && t.spin_count > 0
16
+ }
17
+ case SAWBuyInType.Points: {
18
+ return t.buyin_cost_points <= pointsBalance
19
+ }
20
+ default: {
21
+ console.error('MiniGamesUtils.canPlay: Unknwon SAW buyin type ' + t.saw_buyin_type_id)
22
+ return false
23
+ }
24
+ }
25
+ }
29
26
  }
30
27
 
31
- export { SAWUtils }
28
+ export { SAWUtils }
@@ -1,15 +1,14 @@
1
1
  export enum SAWWinSoundType {
2
-
3
- Disappointing = 1,
4
- Positive = 2,
5
- HighlyPositive = 3,
6
- NoSound = 4,
7
- Custom = 5,
2
+ Disappointing = 1,
3
+ Positive = 2,
4
+ HighlyPositive = 3,
5
+ NoSound = 4,
6
+ Custom = 5,
8
7
  }
9
8
 
10
9
  export const SAWWinSoundFiles = {
11
- [SAWWinSoundType.NoSound]: null,
12
- [SAWWinSoundType.Disappointing]: "saw-disappointed.m4a",
13
- [SAWWinSoundType.Positive]: "saw-positive.m4a",
14
- [SAWWinSoundType.HighlyPositive]: "saw-highly-positive.m4a",
15
- }
10
+ [SAWWinSoundType.NoSound]: null,
11
+ [SAWWinSoundType.Disappointing]: 'saw-disappointed.m4a',
12
+ [SAWWinSoundType.Positive]: 'saw-positive.m4a',
13
+ [SAWWinSoundType.HighlyPositive]: 'saw-highly-positive.m4a',
14
+ }
@@ -1,22 +1,24 @@
1
- export * from "./SAWUtils";
2
- export * from "./SAWAcknowledgeType";
3
- export * from "./SAWAskForUsername";
4
- export * from "./SAWBuyInType";
5
- export * from "./SAWDoSpinRequest";
6
- export * from "./SAWDoSpinResponse";
7
- export * from "./SAWGameType";
8
- export * from "./SAWGetTemplatesRequest";
9
- export * from "./SAWGetTemplatesResponse";
10
- export * from "./SAWPrize";
11
- export * from "./SAWPrizeType";
12
- export * from "./SAWPrizeUI";
13
- export * from "./SAWSpinErrorCode";
14
- export * from "./SAWTemplate";
15
- export * from "./SAWTemplateUI";
16
- export * from "./SAWWinSoundType";
17
- export * from "./SAWDoAknowledgeRequest";
18
- export * from "./SAWDoAknowledgeResponse";
19
- export * from "./SAWSpinsCountPush";
20
- export * from "./SAWPrizeDropWinPush";
21
- export * from "./SAWEventSawPush";
22
- export * from "./SAWAcknowledgeSpinPushRequest";
1
+ export * from './SAWUtils'
2
+ export * from './SAWAcknowledgeType'
3
+ export * from './SAWAskForUsername'
4
+ export * from './SAWBuyInType'
5
+ export * from './SAWDoSpinRequest'
6
+ export * from './SAWDoSpinResponse'
7
+ export * from './SAWGameType'
8
+ export * from './SAWGetTemplatesRequest'
9
+ export * from './SAWGetTemplatesResponse'
10
+ export * from './SAWPrize'
11
+ export * from './SAWPrizeType'
12
+ export * from './SAWPrizeUI'
13
+ export * from './SAWSpinErrorCode'
14
+ export * from './SAWTemplate'
15
+ export * from './SAWTemplateUI'
16
+ export * from './SAWWinSoundType'
17
+ export * from './SAWDoAknowledgeRequest'
18
+ export * from './SAWDoAknowledgeResponse'
19
+ export * from './SAWSpinsCountPush'
20
+ export * from './SAWPrizeDropWinPush'
21
+ export * from './SAWPrizeDropAknowledgeRequest'
22
+ export * from './SAWPrizeDropAknowledgeResponse'
23
+ export * from './SAWEventSawPush'
24
+ export * from './SAWAcknowledgeSpinPushRequest'
@@ -1,5 +1,4 @@
1
1
  export interface AchCategoryPublicMeta {
2
-
3
- name?: string;
4
- order?: number;
2
+ name?: string
3
+ order?: number
5
4
  }
@@ -1,7 +1,6 @@
1
- import { ProtocolMessage } from "../Base/ProtocolMessage";
1
+ import { ProtocolMessage } from '../Base/ProtocolMessage'
2
2
 
3
3
  export interface AchClaimPrizeRequest extends ProtocolMessage {
4
-
5
- ach_id: number;
6
- ach_completed_id: number; // ID of the completion fact from ach_completed or ach_completed_recurring tables
7
- }
4
+ ach_id: number
5
+ ach_completed_id: number // ID of the completion fact from ach_completed or ach_completed_recurring tables
6
+ }
@@ -1,5 +1,4 @@
1
- import { ProtocolResponse } from "../Base/ProtocolResponse";
1
+ import { ProtocolResponse } from '../Base/ProtocolResponse'
2
2
  export interface AchClaimPrizeResponse extends ProtocolResponse {
3
-
4
- // no details here, just check for errCode and reload list of missions
5
- }
3
+ // no details here, just check for errCode and reload list of missions
4
+ }
@@ -1,19 +1,18 @@
1
- import { TAchCategory } from "../WSAPI/WSAPITypes";
2
- import { AchCategoryPublicMeta } from "./AchCategoryPublicMeta";
1
+ import { TAchCategory } from '../WSAPI/WSAPITypes'
2
+ import { AchCategoryPublicMeta } from './AchCategoryPublicMeta'
3
3
 
4
4
  export interface AchCategory {
5
-
6
- id?: number;
7
- publicMeta?: AchCategoryPublicMeta;
5
+ id?: number
6
+ publicMeta?: AchCategoryPublicMeta
8
7
  }
9
8
 
10
- export const AchCategoryTransform = (items: AchCategory[]): TAchCategory[] => {
11
- return items.map( r => {
12
- const x: TAchCategory = {
13
- id: r.id,
14
- name: r.publicMeta?.name,
15
- order: r.publicMeta?.order
16
- }
17
- return x;
18
- })
19
- }
9
+ export const AchCategoryTransform = (items: AchCategory[]): TAchCategory[] => {
10
+ return items.map((r) => {
11
+ const x: TAchCategory = {
12
+ id: r.id,
13
+ name: r.publicMeta?.name,
14
+ order: r.publicMeta?.order,
15
+ }
16
+ return x
17
+ })
18
+ }
@@ -1,7 +1,5 @@
1
- import { ProtocolMessage } from "../Base/ProtocolMessage";
2
-
1
+ import { ProtocolMessage } from '../Base/ProtocolMessage'
3
2
 
4
3
  export interface AchievementOptinRequest extends ProtocolMessage {
5
-
6
- achievementId: number;
7
- }
4
+ achievementId: number
5
+ }
@@ -1,5 +1,3 @@
1
- import { ProtocolResponse } from "../Base/ProtocolResponse";
1
+ import { ProtocolResponse } from '../Base/ProtocolResponse'
2
2
 
3
- export interface AchievementOptinResponse extends ProtocolResponse {
4
-
5
- }
3
+ export interface AchievementOptinResponse extends ProtocolResponse {}
@@ -1,22 +1,21 @@
1
1
  export interface AchievementPublicMeta {
2
-
3
- description?: string;
4
- unlock_mission_description?: string;
5
- custom_data?: string;
6
- cta_text?: string;
7
- cta_action?: string;
8
- label_tag?: string;
9
- custom_label_tag?: string;
10
- reward?: string;
11
- image_url?: string;
12
- name?: string;
13
- position?: number;
14
- hide_tasks?: boolean;
15
- hide_locked_mission?: boolean;
16
- custom_section_id?: number;
17
- only_in_custom_section?: boolean;
18
- hint_text?: string;
19
- hide_badge_from_ui?: boolean;
20
- show_badge_first_task_completed?: boolean;
21
- custom_section_type_id?: number;
2
+ description?: string
3
+ unlock_mission_description?: string
4
+ custom_data?: string
5
+ cta_text?: string
6
+ cta_action?: string
7
+ label_tag?: string
8
+ custom_label_tag?: string
9
+ reward?: string
10
+ image_url?: string
11
+ name?: string
12
+ position?: number
13
+ hide_tasks?: boolean
14
+ hide_locked_mission?: boolean
15
+ custom_section_id?: number
16
+ only_in_custom_section?: boolean
17
+ hint_text?: string
18
+ hide_badge_from_ui?: boolean
19
+ show_badge_first_task_completed?: boolean
20
+ custom_section_type_id?: number
22
21
  }
@@ -1,10 +1,9 @@
1
1
  export enum AchievementStatus {
2
-
3
- Draft = 1,
4
- AvailableUnlocked = 2,
5
- AvailableLocked = 3,
6
- Archived = 4,
7
- FeaturedManually = 5,
8
- FeaturedAI = 6,
9
- Recurring = 7
2
+ Draft = 1,
3
+ AvailableUnlocked = 2,
4
+ AvailableLocked = 3,
5
+ Archived = 4,
6
+ FeaturedManually = 5,
7
+ FeaturedAI = 6,
8
+ Recurring = 7,
10
9
  }
@@ -1,5 +1,4 @@
1
1
  export interface AchievementTaskPublicMeta {
2
-
3
- name?: string;
4
- display_progress_as_count?: boolean;
2
+ name?: string
3
+ display_progress_as_count?: boolean
5
4
  }
@@ -1,4 +1,4 @@
1
1
  export enum AchievementTaskType {
2
- CompleteAchievement = 1,
3
- UnlockAchievement = 2
2
+ CompleteAchievement = 1,
3
+ UnlockAchievement = 2,
4
4
  }
@@ -1,5 +1,4 @@
1
1
  export enum AchievementType {
2
-
3
- Mission = 1,
4
- Badge = 2
2
+ Mission = 1,
3
+ Badge = 2,
5
4
  }
@@ -1,5 +1,3 @@
1
- import { ProtocolMessage } from "../Base/ProtocolMessage";
1
+ import { ProtocolMessage } from '../Base/ProtocolMessage'
2
2
 
3
- export interface GetAchCategoriesRequest extends ProtocolMessage {
4
-
5
- }
3
+ export interface GetAchCategoriesRequest extends ProtocolMessage {}
@@ -1,7 +1,6 @@
1
- import { ProtocolResponse } from "../Base/ProtocolResponse";
2
- import { AchCategory } from "./AchievementCategory";
1
+ import { ProtocolResponse } from '../Base/ProtocolResponse'
2
+ import { AchCategory } from './AchievementCategory'
3
3
 
4
4
  export interface GetAchCategoriesResponse extends ProtocolResponse {
5
-
6
- categories: AchCategory[];
7
- }
5
+ categories: AchCategory[]
6
+ }