@smartico/public-api 0.0.420 → 0.0.422

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 (133) hide show
  1. package/README.md +14 -0
  2. package/dist/ActivityLog/ActivityLogActivities.d.ts +1 -1
  3. package/dist/ActivityLog/ActivityLogEntry.d.ts +35 -17
  4. package/dist/ActivityLog/ActivityLogMeta.d.ts +31 -0
  5. package/dist/ActivityLog/GetActivityLogRequest.d.ts +2 -0
  6. package/dist/ActivityLog/GetActivityLogResponse.d.ts +1 -2
  7. package/dist/Jackpots/JackPotWinPushWinner.d.ts +34 -0
  8. package/dist/Jackpots/JackPotWinner.d.ts +3 -1
  9. package/dist/Jackpots/JackpotContributionRule.d.ts +23 -0
  10. package/dist/Jackpots/JackpotDetails.d.ts +8 -0
  11. package/dist/Jackpots/JackpotPot.d.ts +4 -2
  12. package/dist/Jackpots/JackpotPublicMeta.d.ts +6 -2
  13. package/dist/Jackpots/JackpotWinPush.d.ts +14 -2
  14. package/dist/Jackpots/index.d.ts +2 -0
  15. package/dist/SmarticoAPI.d.ts +1 -3
  16. package/dist/WSAPI/WSAPIBase.d.ts +0 -1
  17. package/dist/WSAPI/WSAPIJackpots.d.ts +2 -0
  18. package/dist/WSAPI/WSAPITypes.d.ts +19 -17
  19. package/dist/WSAPI/WSAPIUser.d.ts +11 -36
  20. package/dist/index.js +36 -128
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.modern.mjs +34 -100
  23. package/dist/index.modern.mjs.map +1 -1
  24. package/docs/Callbacks.md +1 -1
  25. package/docs/api/README.md +4 -4
  26. package/docs/api/classes/WSAPIJackpots.md +2 -0
  27. package/docs/api/classes/WSAPIUser.md +30 -59
  28. package/docs/api/documents/Callbacks.md +1 -1
  29. package/docs/api/enumerations/ActivityLogActivities.md +1 -1
  30. package/docs/api/enumerations/PointChangeSourceType.md +6 -0
  31. package/docs/api/interfaces/ActivityLogEntry.md +124 -0
  32. package/docs/api/interfaces/ActivityLogMeta.md +100 -0
  33. package/docs/api/interfaces/JackPotWinPushWinner.md +103 -0
  34. package/docs/api/interfaces/JackPotWinner.md +9 -1
  35. package/docs/api/interfaces/JackpotContributionRule.md +49 -0
  36. package/docs/api/interfaces/JackpotDetails.md +24 -0
  37. package/docs/api/interfaces/JackpotPot.md +9 -1
  38. package/docs/api/interfaces/JackpotPublicMeta.md +12 -2
  39. package/docs/api/interfaces/JackpotWinPush.md +14 -1
  40. package/docs/api/interfaces/TActivityLog.md +70 -2
  41. package/docs/api/type-aliases/TActivityLogEntry.md +7 -0
  42. package/docs/capabilities/_responses/gamePickGetActiveRound.json +37 -37
  43. package/docs/capabilities/_responses/gamePickGetActiveRounds.json +37 -131
  44. package/docs/capabilities/_responses/gamePickGetBoard.json +25 -14
  45. package/docs/capabilities/_responses/gamePickGetGameInfo.json +93 -79
  46. package/docs/capabilities/_responses/gamePickGetHistory.json +37 -131
  47. package/docs/capabilities/_responses/gamePickGetUserInfo.json +5 -5
  48. package/docs/capabilities/_responses/getActivityLog.json +106 -1
  49. package/docs/capabilities/_responses/getAvatarsCustomized.json +4 -4
  50. package/docs/capabilities/_responses/getAvatarsList.json +2 -2
  51. package/docs/capabilities/_responses/getBadges.json +27 -29
  52. package/docs/capabilities/_responses/getBonuses.json +1 -18
  53. package/docs/capabilities/_responses/getClanInfo.json +13 -13
  54. package/docs/capabilities/_responses/getClans.json +6 -6
  55. package/docs/capabilities/_responses/getCurrentLevel.json +12 -12
  56. package/docs/capabilities/_responses/getInboxMessageBody.json +2 -2
  57. package/docs/capabilities/_responses/getInboxMessages.json +6 -6
  58. package/docs/capabilities/_responses/getInboxUnreadCount.json +1 -1
  59. package/docs/capabilities/_responses/getJackpotWinners.json +14 -14
  60. package/docs/capabilities/_responses/getLeaderBoard.json +8 -8
  61. package/docs/capabilities/_responses/getMiniGames.json +92 -90
  62. package/docs/capabilities/_responses/getMiniGamesHistory.json +874 -1
  63. package/docs/capabilities/_responses/getMissions.json +2 -2
  64. package/docs/capabilities/_responses/getRaffleDrawRun.json +7 -7
  65. package/docs/capabilities/_responses/getRaffleDrawRunsHistory.json +6 -6
  66. package/docs/capabilities/_responses/getRaffles.json +14 -14
  67. package/docs/capabilities/_responses/getStorePurchasedItems.json +5 -5
  68. package/docs/capabilities/_responses/getTournamentInstanceInfo.json +100 -53
  69. package/docs/capabilities/_responses/getTournamentsList.json +12 -12
  70. package/docs/capabilities/_responses/getTranslations.json +1 -1
  71. package/docs/capabilities/_responses/getUserProfile.json +10 -10
  72. package/docs/capabilities/_responses/jackpotGet.json +33 -34
  73. package/docs/capabilities/gamePickGetActiveRound.md +22 -23
  74. package/docs/capabilities/gamePickGetActiveRounds.md +22 -23
  75. package/docs/capabilities/gamePickGetBoard.md +14 -14
  76. package/docs/capabilities/gamePickGetGameInfo.md +24 -44
  77. package/docs/capabilities/gamePickGetHistory.md +22 -23
  78. package/docs/capabilities/gamePickGetUserInfo.md +5 -5
  79. package/docs/capabilities/getActivityLog.md +69 -9
  80. package/docs/capabilities/getAvatarsCustomized.md +3 -3
  81. package/docs/capabilities/getBadges.md +13 -14
  82. package/docs/capabilities/getBonuses.md +2 -17
  83. package/docs/capabilities/getClanInfo.md +8 -8
  84. package/docs/capabilities/getClans.md +4 -4
  85. package/docs/capabilities/getCurrentLevel.md +12 -12
  86. package/docs/capabilities/getInboxMessageBody.md +2 -2
  87. package/docs/capabilities/getInboxMessages.md +3 -3
  88. package/docs/capabilities/getInboxUnreadCount.md +6 -0
  89. package/docs/capabilities/getJackpotWinners.md +9 -8
  90. package/docs/capabilities/getLeaderBoard.md +5 -5
  91. package/docs/capabilities/getMiniGames.md +35 -37
  92. package/docs/capabilities/getMiniGamesHistory.md +83 -2
  93. package/docs/capabilities/getMissions.md +1 -1
  94. package/docs/capabilities/getRaffleDrawRun.md +7 -7
  95. package/docs/capabilities/getRaffleDrawRunsHistory.md +3 -3
  96. package/docs/capabilities/getRaffles.md +8 -8
  97. package/docs/capabilities/getStorePurchasedItems.md +2 -2
  98. package/docs/capabilities/getTournamentInstanceInfo.md +45 -37
  99. package/docs/capabilities/getTournamentsList.md +6 -6
  100. package/docs/capabilities/getTranslations.md +1 -1
  101. package/docs/capabilities/getUserProfile.md +10 -10
  102. package/docs/capabilities/jackpotGet.md +56 -28
  103. package/docs/capabilities/jackpotOptIn.md +2 -0
  104. package/docs/capabilities/smarticoCallbacks.md +1 -1
  105. package/docs/native/PROTOCOL.md +141 -18
  106. package/docs/ui/jackpots/UIGuide_jackpotGet.md +1 -1
  107. package/docs/ui/user/UIGuide_getActivityLog.md +4 -2
  108. package/package.json +4 -3
  109. package/scripts/capture-responses-browser.mjs +8 -1
  110. package/src/ActivityLog/ActivityLogActivities.ts +1 -1
  111. package/src/ActivityLog/ActivityLogEntry.ts +33 -21
  112. package/src/ActivityLog/ActivityLogMeta.ts +31 -0
  113. package/src/ActivityLog/GetActivityLogRequest.ts +2 -0
  114. package/src/ActivityLog/GetActivityLogResponse.ts +23 -49
  115. package/src/Jackpots/JackPotWinPushWinner.ts +35 -0
  116. package/src/Jackpots/JackPotWinner.ts +3 -1
  117. package/src/Jackpots/JackpotContributionRule.ts +25 -0
  118. package/src/Jackpots/JackpotDetails.ts +8 -0
  119. package/src/Jackpots/JackpotPot.ts +4 -2
  120. package/src/Jackpots/JackpotPublicMeta.ts +6 -2
  121. package/src/Jackpots/JackpotWinPush.ts +14 -2
  122. package/src/Jackpots/index.ts +2 -0
  123. package/src/MiniGames/SAWGetTemplatesResponse.ts +1 -0
  124. package/src/SmarticoAPI.ts +1 -44
  125. package/src/WSAPI/WSAPIBase.ts +0 -1
  126. package/src/WSAPI/WSAPIJackpots.ts +2 -0
  127. package/src/WSAPI/WSAPITypes.ts +20 -18
  128. package/src/WSAPI/WSAPIUser.ts +10 -53
  129. package/docs/api/interfaces/GemsDiamondsLog.md +0 -45
  130. package/docs/api/interfaces/PointsLog.md +0 -45
  131. package/docs/api/interfaces/TActivityLogEntry.md +0 -100
  132. package/docs/api/type-aliases/ActivityLogEntry.md +0 -3
  133. package/docs/capabilities/getActivityLogV2.md +0 -62
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Returns the full detail of a single tournament instance — adds the player leaderboard, the full prize structure, and (for clan tournaments) the clan leaderboard and per-clan prize structure on top of everything already in `TTournament`.
4
4
  > Import: `import { TTournamentDetailed } from '@smartico/public-api'`
5
- > Search terms: getTournamentInstanceInfo, tournaments, getTournament, TTournamentDetailed, TRibbon, TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS, TournamentRegistrationTypeName, TournamentRegistrationStatusName, AchRelatedGame, Fixed, Dynamic, instance_id, tournament_id, name, description, image1, image2, image2_mobile, prize_pool_short
5
+ > Search terms: getTournamentInstanceInfo, tournaments, getTournament, TTournamentDetailed, TRibbon, TANGIBLE, POINTS_ADD, POINTS_DEDUCT, POINTS_RESET, MINI_GAME_ATTEMPT, BONUS, TournamentRegistrationTypeName, TournamentRegistrationStatusName, AchRelatedGame, Fixed, Dynamic, instance_id, tournament_id, name, description, image1, image2, custom_data, is_featured
6
6
 
7
7
  ## Signature
8
8
  ```ts
@@ -237,58 +237,66 @@ if (detail.me) {
237
237
  > Where this real payload differs from the typed Returns above (TS interface vs raw wire), the REAL shape is the runtime truth.
238
238
  ```json
239
239
  {
240
- "instance_id": 585461,
241
- "tournament_id": 4450,
242
- "name": "Old Dragon's Hoard",
243
- "description": " <style>\n /* Add your CSS here */\n .custom-rules {\n font-family: inherit;\n background-color: #2c295c !important;\n …",
244
- "image1": "https://cdn.example/00000000-0000-0000-0000-000000000000/entity-image-1773753066010-1.png",
245
- "image2": "https://cdn.example/00000000-0000-0000-0000-000000000000/entity-image-1773755039087-0.png",
246
- "image2_mobile": "https://cdn.example/00000000-0000-0000-0000-000000000000/entity-image-1773755761006-0.png",
247
- "prize_pool_short": "The Dragon's treasure",
240
+ "instance_id": 589587,
241
+ "tournament_id": 5285,
242
+ "name": "Lucky Charm Tournament",
243
+ "description": " <style>\n /* Add your CSS here */\n .custom-rules {\n font-family: inherit;\n background-color: #1b193e !important;\n …",
244
+ "image1": "https://cdn.example/00000000-0000-0000-0000-000000000000/entity-image-1780497274026-2.png",
245
+ "image2": "https://cdn.example/00000000-0000-0000-0000-000000000000/entity-image-1780498012321-2.png",
248
246
  "custom_data": {},
249
247
  "is_featured": false,
250
- "start_time": 1782216000000,
251
- "end_time": 1782302400000,
248
+ "start_time": 1786004100000,
249
+ "end_time": 1786090500000,
252
250
  "registration_count": 0,
253
251
  "is_user_registered": false,
254
252
  "players_min_count": 0,
255
- "players_max_count": 200,
253
+ "players_max_count": 5000,
256
254
  "registration_status": "UNKNOWN",
257
- "registration_type": "BUY_IN_GEMS",
258
- "registration_cost_gems": 3,
255
+ "registration_type": "AUTO",
259
256
  "duration_ms": 86400000,
260
257
  "is_active": true,
261
258
  "is_can_register": false,
262
259
  "is_cancelled": false,
263
260
  "is_finished": false,
264
- "is_in_progress": true,
265
- "is_upcoming": false,
261
+ "is_in_progress": false,
262
+ "is_upcoming": true,
266
263
  "min_scores_win": 1,
267
264
  "hide_leaderboard_min_scores": false,
268
265
  "total_scores": null,
269
- "is_clan_based": false,
270
- "related_games": [
271
- {
272
- "ext_game_id": "dragon-fortune",
273
- "game_public_meta": {
274
- "name": "Dragon Fortune",
275
- "link": "/game/dragon-fortune",
276
- "image": "https://cdn.example/e93b87dfd94d462de49bc3-china.png",
277
- "enabled": true,
278
- "priority": 1
279
- }
280
- }
281
- ],
266
+ "is_clan_based": true,
267
+ "related_games": [],
282
268
  "players": [],
283
- "prizes": [
269
+ "prizes": [],
270
+ "user_clan_id": 5,
271
+ "clan_leaderboard": [],
272
+ "clan_prize_structure": [
284
273
  {
285
- "gems": 10,
286
- "image_url": "https://cdn.example/ecec44e4c2d0555b4d8a32-Gems10.webp",
287
- "name": "10 gems",
288
- "id": 38778,
289
- "type": "GEMS_AND_DIAMONDS_ADD",
290
- "place_from": 1,
291
- "place_to": 1
274
+ "clan_place": 1,
275
+ "prize_type_id": 2,
276
+ "prize_pool_amount": 200,
277
+ "prize_pool_currency_code": null,
278
+ "activity_type_id": 25,
279
+ "details_json": {
280
+ "gems_diamonds_type": 0
281
+ },
282
+ "public_meta": {
283
+ "prize_name": ""
284
+ },
285
+ "tiers": [
286
+ {
287
+ "player_place_from": 1,
288
+ "player_place_to": 3,
289
+ "pool_amount": 100,
290
+ "distribution_type": 1,
291
+ "activity_type_id": 25,
292
+ "details_json": {
293
+ "gems_diamonds_type": 0
294
+ },
295
+ "public_meta": {
296
+ "name": "100 Gems"
297
+ }
298
+ }
299
+ ]
292
300
  }
293
301
  ]
294
302
  }
@@ -191,7 +191,7 @@ if (featured) {
191
191
  ```json
192
192
  [
193
193
  {
194
- "instance_id": 585461,
194
+ "instance_id": 589489,
195
195
  "tournament_id": 4450,
196
196
  "name": "Old Dragon's Hoard",
197
197
  "description": " <style>\n /* Add your CSS here */\n .custom-rules {\n font-family: inherit;\n background-color: #2c295c !important;\n …",
@@ -201,8 +201,8 @@ if (featured) {
201
201
  "prize_pool_short": "The Dragon's treasure",
202
202
  "custom_data": {},
203
203
  "is_featured": false,
204
- "start_time": 1782216000000,
205
- "end_time": 1782302400000,
204
+ "start_time": 1785844800000,
205
+ "end_time": 1785931200000,
206
206
  "registration_count": 0,
207
207
  "is_user_registered": false,
208
208
  "players_min_count": 0,
@@ -211,11 +211,11 @@ if (featured) {
211
211
  "registration_type": "BUY_IN_GEMS",
212
212
  "registration_cost_gems": 3,
213
213
  "duration_ms": 86400000,
214
- "is_active": true,
214
+ "is_active": false,
215
215
  "is_can_register": false,
216
216
  "is_cancelled": false,
217
- "is_finished": false,
218
- "is_in_progress": true,
217
+ "is_finished": true,
218
+ "is_in_progress": false,
219
219
  "is_upcoming": false,
220
220
  "min_scores_win": 1,
221
221
  "hide_leaderboard_min_scores": false,
@@ -83,7 +83,7 @@ console.log('[smartico] localized label "missions_title" →', t('missions_title
83
83
  "totalPool": "total pool",
84
84
  "placesPaid": "Places paid",
85
85
  "sawSpinCostSpins": "{value} spins available",
86
- "…": "(+804 more keys)"
86
+ "…": "(+842 more keys)"
87
87
  }
88
88
  }
89
89
  ```
@@ -144,24 +144,24 @@ if (balance < price) {
144
144
  "core_public_tags": [
145
145
  "SMARTICO.DEV"
146
146
  ],
147
- "ach_points_ever": 690,
147
+ "ach_points_ever": 12700,
148
148
  "core_clan_is_kicked": null,
149
149
  "user_last_session_push_state": "BLOCKED",
150
150
  "aff_referred_by_friend_ext_user_id": null,
151
- "core_inbox_unread_count": 0,
151
+ "core_inbox_unread_count": 8,
152
152
  "core_user_language": "EN",
153
- "ach_level_current": "Silver",
154
- "ach_gems_balance": 10,
155
- "ach_level_current_id": 698,
153
+ "ach_level_current": "Ruby",
154
+ "ach_gems_balance": 57,
155
+ "ach_level_current_id": 701,
156
156
  "user_country": "BG",
157
- "ach_points_balance": 326,
157
+ "ach_points_balance": 12286,
158
158
  "core_registration_date": 0,
159
159
  "core_recommended_deposit_amount": 0,
160
160
  "core_recommended_casino_bet_amount": 0,
161
161
  "ach_gamification_in_control_group": false,
162
162
  "core_avatar_real_id": null,
163
163
  "core_wallet_currency": "UNKNOWN",
164
- "ach_diamonds_balance": 1,
164
+ "ach_diamonds_balance": 40,
165
165
  "aff_refer_friend_url": null,
166
166
  "acc_bonus_abuser": false,
167
167
  "aff_refered_friends_count": 0,
@@ -169,10 +169,10 @@ if (balance < price) {
169
169
  "core_clan_id": "",
170
170
  "core_is_test_account": false,
171
171
  "user_id": 361368543,
172
- "avatar_id": "https://cdn.example/avatars/12/00000000-0000-0000-0000-000000000000.png",
173
- "avatar_real_id": 12,
172
+ "avatar_id": "https://cdn.example/avatars/11/00000000-0000-0000-0000-000000000000.png",
173
+ "avatar_real_id": 11,
174
174
  "public_username": "Antonio",
175
- "avatar_url": "https://cdn.example/avatars/12/00000000-0000-0000-0000-000000000000.png"
175
+ "avatar_url": "https://cdn.example/avatars/11/00000000-0000-0000-0000-000000000000.png"
176
176
  }
177
177
  ```
178
178
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Returns the user-eligible jackpots active for the label, fused with their live pot values.
4
4
  > Import: `import { JackpotDetails } from '@smartico/public-api'`
5
- > Search terms: jackpotGet, jackpots, JackpotDetails, JackpotType, JackpotPublicMeta, JackpotHtmlTemplate, JackpotContributionType, JackpotPot, JackPotTemparature, jp_template_id, jp_type_id, jp_public_meta, jp_currency, user_currency, related_games, contribution_type, contribution_value
5
+ > Search terms: jackpotGet, jackpots, JackpotDetails, JackpotType, JackpotPublicMeta, JackpotHtmlTemplate, JackpotContributionType, JackpotContributionRule, AchRelatedGame, JackpotPot, JackPotTemparature, jp_template_id, jp_type_id, jp_public_meta, jp_currency, user_currency, related_games, contribution_type, contribution_value
6
6
 
7
7
  ## Signature
8
8
  ```ts
@@ -30,19 +30,48 @@ Array of `JackpotDetails`. Each item:
30
30
  - `content` (string)
31
31
  - `placeholder1` (string) — custom value of placeholder1 defined by operator and can be used in the HTML templates
32
32
  - `placeholder2` (string) — custom value of placeholder2 defined by operator and can be used in the HTML templates
33
- - `custom_data` (string) — Custom data as string or JSON string that can be used in API to build custom UI You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice Read more here - <https://help.smartico.ai/welcome/products/tools-and-guides/custom-fields-attributes>
33
+ - `priority` (string) — operator-defined display order, ascending; sent as a string
34
+ - `custom_data` (any) — Custom data that can be used in API to build custom UI. `jackpotGet()` returns this already parsed — an object when the operator stored JSON, otherwise the raw string. Elsewhere (e.g. the jackpot-win push) it arrives unparsed. You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice Read more here - <https://help.smartico.ai/welcome/products/tools-and-guides/custom-fields-attributes>
34
35
  - `jp_currency` (string) — Native jackpot currency (ISO 4217). Used for winner-history amounts.
35
36
  - `user_currency` (string) — Current user's wallet currency. Used to display the pot via `pot.current_pot_amount_user_currency`.
36
37
  - `contribution_type` (JackpotContributionType) — Whether the contribution is a fixed amount or a percentage of the bet; see `JackpotContributionType`.
37
38
  - `contribution_value` (number) — Amount of contribution per qualifying bet — fixed value or percentage depending on `contribution_type`.
39
+ - `contribution_rules` (JackpotContributionRule[]) — Per-game / per-provider overrides of `contribution_type` + `contribution_value`; see `JackpotContributionRule`. Empty when the template contributes at a flat rate.
40
+ - `ruleId` (number) — Stable ID of the rule within its template
41
+ - `jpTemplateId` (number) — Template this rule belongs to
42
+ - `type` (JackpotContributionType) — Whether `contributionValue` is a fixed amount or a percentage; see `JackpotContributionType`
43
+ - `extEntityIds` (string[]) — Operator-side game or provider IDs this rule applies to
44
+ - `contributionValue` (number) — Contribution to apply for matching bets — fixed amount or percentage depending on `type`
45
+ - `related_games` (AchRelatedGame[]) — Reserved — the server currently always sends an empty array. Use `getJackpotEligibleGames()` for the eligible-games list.
46
+ - `ext_game_id` (string) — The ID of the related game
47
+ - `game_public_meta` ({
48
+ /** The name of the game */
49
+ name: string;
50
+ /** The URL to the game */
51
+ link: string;
52
+ /** The URL to the image of the game, 1:1 aspect ratio */
53
+ image: string;
54
+ /** The indicator if the game is enabled */
55
+ enabled: boolean;
56
+ /** The list of categories of the game */
57
+ game_categories: string[];
58
+ /** The name of the game provider */
59
+ game_provider: string;
60
+ /** The URL to the mobile game */
61
+ mobile_spec_link: string;
62
+ /** The priority of the game */
63
+ priority?: number;
64
+ }) — Game public meta information
38
65
  - `pot` (JackpotPot) — Live pot snapshot (amount, temperature, last explosion timestamp).
39
66
  - `jp_template_id` (number) — Template ID this pot belongs to.
40
67
  - `jp_pot_id` (number) — Stable numeric ID of the current pot instance (rotates when the pot explodes).
41
68
  - `current_pot_amount` (number) — Current pot amount in the jackpot's native currency (`jp_currency`).
42
69
  - `current_pot_amount_user_currency` (number) — Current pot amount converted to the user's wallet currency (`user_currency`).
43
- - `explode_date_ts` (number) — Unix ms timestamp of when this pot last exploded; `0` if it has never exploded.
70
+ - `explode_date_ts` (number | null) — Unix ms timestamp of when this pot last exploded; `null` while the pot is still running.
71
+ - `user_id` (number | null) — Owning user for `JackpotType.Personal` pots; `null` for shared `MultiUser` pots.
44
72
  - `current_pot_temperature` (JackPotTemparature) — Heat band of the pot relative to its explosion range; see `JackPotTemparature`.
45
73
  - `is_opted_in` (boolean) — `true` when the current user is currently opted in.
74
+ - `is_auto_opt_in` (boolean) — `true` when eligible users are opted in automatically, so no opt-in CTA is needed; `false` means `jackpotOptIn()` must be called explicitly.
46
75
  - `ach_related_game_allow_all` (boolean) — `true` when every game in the operator catalog contributes; if `true`, skip `getJackpotEligibleGames`.
47
76
  - `registration_count` (number) — Number of users currently opted in; always `1` for `JackpotType.Personal`.
48
77
  - `expose_winners_over_api` (boolean) — Operator flag: whether the winners list should be displayed. Enforced client-side only — gate `getJackpotWinners` calls on this.
@@ -112,22 +141,21 @@ console.log('[smartico] linked jackpots for game:', linked.length);
112
141
  ```json
113
142
  [
114
143
  {
115
- "jp_template_id": 6,
116
- "jp_type_id": 1,
144
+ "jp_template_id": 8,
145
+ "jp_type_id": 2,
117
146
  "jp_public_meta": {
118
147
  "image_url": "https://cdn.example/f8b68a18473c437e32a860-Jackpot1.jpg",
119
- "placeholder1": null,
120
- "placeholder2": null,
121
- "name": "Minor",
122
- "description": "1% on top of your bet amount will be contributed to the Jackpot",
148
+ "placeholder1": "111111111111111111",
149
+ "placeholder2": "XXXXXXXXXXXXXXXXX",
150
+ "name": "Personal Jackpot For All Games",
151
+ "description": "For every bet, 2% is added to the jackpot pot—split 50/50 between the player’s contribution and the house. Plus, 20% of each jackpot goes toward seeding the …",
123
152
  "not_winner_template": {
124
- "id": "0",
125
- "content": ""
153
+ "content": "\n<style>\n @keyframes reveal {\n 0% {\n transform: translateX(100%);\n }\n 100% {\n transform: translateX(0%);\n …",
154
+ "id": "1"
126
155
  },
127
- "priority": "1",
128
156
  "winner_template": {
129
- "id": "0",
130
- "content": ""
157
+ "content": "\n<script>\n document.addEventListener('DOMContentLoaded', () => {\n const counter = document.getElementById('counter'); \n const duration = 200…",
158
+ "id": "1"
131
159
  },
132
160
  "custom_data": {}
133
161
  },
@@ -135,32 +163,32 @@ console.log('[smartico] linked jackpots for game:', linked.length);
135
163
  "user_currency": "EUR",
136
164
  "related_games": [],
137
165
  "contribution_type": 2,
138
- "contribution_value": 0.2,
166
+ "contribution_value": 2,
139
167
  "pot": {
140
- "jp_template_id": 6,
141
- "jp_pot_id": 306140,
168
+ "jp_template_id": 8,
169
+ "jp_pot_id": null,
142
170
  "user_id": null,
143
- "current_pot_amount": 12.28367028,
144
- "current_pot_amount_user_currency": 12.28367028,
171
+ "current_pot_amount": 0,
172
+ "current_pot_amount_user_currency": 0,
145
173
  "explode_date_ts": null,
146
- "current_pot_temperature": 2
174
+ "current_pot_temperature": 0
147
175
  },
148
- "is_opted_in": false,
149
- "is_auto_opt_in": true,
176
+ "is_opted_in": true,
177
+ "is_auto_opt_in": false,
150
178
  "ach_related_game_allow_all": true,
151
- "registration_count": 17262,
179
+ "registration_count": 1,
152
180
  "contribution_rules": [
153
181
  {
154
- "ruleId": 1,
155
- "jpTemplateId": 6,
182
+ "ruleId": 4,
183
+ "jpTemplateId": 8,
156
184
  "type": 2,
157
185
  "extEntityIds": [
158
- "1111"
186
+ "123"
159
187
  ],
160
- "contributionValue": 4
188
+ "contributionValue": 12
161
189
  }
162
190
  ],
163
- "expose_winners_over_api": false
191
+ "expose_winners_over_api": true
164
192
  }
165
193
  ]
166
194
  ```
@@ -27,6 +27,8 @@ _smartico.api.jackpotOptIn(filter: { jp_template_id: number }): Promise<Jackpots
27
27
  - The jackpot must currently be active and the user must be in its
28
28
  eligibility segment. Ineligible jackpots are filtered out of
29
29
  `jackpotGet` entirely, so a card the user sees is opt-in-able.
30
+ - Skip the opt-in CTA when the template reports `is_auto_opt_in: true` —
31
+ eligible users are enrolled automatically and there is nothing to join.
30
32
 
31
33
  **Error handling**
32
34
  The server returns a non-zero `errCode` with a human-readable `errMsg`
@@ -91,7 +91,7 @@ strings below.
91
91
  | Event key | Fires when | Handler arguments |
92
92
  |---|---|---|
93
93
  | `mini_game_win` | A mini-game spin finishes and a prize is determined. Fires for both real and visitor-mode plays. | `({ prize_id, name, visitor_win_uuid })` — `name` is the prize display name. In visitor mode, `visitor_win_uuid` can be passed to `_smartico.convertVisitorGame(uuid)` to attach the win to a real account on registration. |
94
- | `jackpot_win` | A jackpot the user participates in is hit (the pot explodes and the user is among the recipients). | `(message)` — the win payload (winner details + jackpot info). See the Jackpots UI guide (`docs/ui/jackpots/`) for how the default Smartico UI surfaces wins. |
94
+ | `jackpot_win` | A jackpot the user participates in is hit (the pot explodes). Fires both for the winner and for other players taking part in the same jackpot. | `(message)` — the win payload: `jackpot` (template + live `pot`, where `pot.explode_date_ts` is the explosion time) and `winners` (currently a single entry). `winners[0].is_me` tells you whether the recipient is the winner; `winning_game_id` / `winning_provider_id` / `bet_original_date` describe the bet that triggered the win and are `null` when unavailable. See the Jackpots UI guide (`docs/ui/jackpots/`) for how the default Smartico UI surfaces wins. |
95
95
  | `ach_game_opening` | The user taps a related / eligible casino game tile from inside the gamification widget (mission, tournament, jackpot, or store context). Use this to launch the game in your own casino lobby. | `(game)` — the game object (catalog id, name, launch links, plus a `context` field naming where it was opened from). If you do not handle this event, the default Smartico UI opens the game's configured link itself. |
96
96
 
97
97
  ### Errors
@@ -558,39 +558,102 @@ Sent as a trigger to display a mini-game to the user (Spin-A-Wheel, Scratch Card
558
558
 
559
559
  ## JP_WIN_PUSH
560
560
 
561
- Sent when a jackpot is won (can be the current user or another player).
561
+ Sent when a jackpot is won. Delivered both to the winner and to other players taking
562
+ part in the same jackpot — `winners[].is_me` distinguishes the two, and the copy sent
563
+ to other players has its `public_username` masked.
562
564
 
563
565
  **ClassId:** `808`
564
566
 
567
+ **Fields:**
568
+
569
+ | Field | Type | Description |
570
+ |-------|------|-------------|
571
+ | `cid` | `number` | Message type identifier |
572
+ | `jackpot` | [`JackpotDetails`](../api/interfaces/JackpotDetails.md) | The jackpot that exploded, including its live `pot` snapshot. `pot.explode_date_ts` is the explosion time (epoch ms). `jp_public_meta.custom_data` arrives here as a raw JSON string |
573
+ | `winners` | [`JackPotWinPushWinner[]`](../api/interfaces/JackPotWinPushWinner.md) | Winner entries — currently always a single entry |
574
+
575
+ **`winners[]` entry:**
576
+
577
+ | Field | Type | Description |
578
+ |-------|------|-------------|
579
+ | `user_id` | `number` | Smartico user ID of the winner |
580
+ | `ext_user_id` | `string` | Operator's external user ID of the winner |
581
+ | `is_me` | `boolean` | `true` when this copy was delivered to the winner themselves |
582
+ | `public_username` | `string` | Winner display name; masked unless `is_me` (masking can be disabled per brand on request) |
583
+ | `public_username_custom` | `string` | Custom display name; falls back to `public_username` when not set |
584
+ | `winning_amount_jp_currency` | `number` | Won amount in the jackpot currency (real + bonus combined) |
585
+ | `winning_amount_wallet_currency` | `number` | Won amount in the user's wallet currency (real + bonus combined) |
586
+ | `winning_position` | `number` | Winner position; currently always `1` |
587
+ | `winning_game_id` | `string \| null` | External game ID of the game whose bet triggered the win. `null` when the triggering bet context is unavailable |
588
+ | `winning_provider_id` | `string \| null` | External provider ID of that game's provider. `null` when the triggering bet context is unavailable |
589
+ | `bet_original_date` | `number \| null` | Placement time of the triggering bet as reported by the operator (epoch ms) — not the time Smartico processed it. `null` when unavailable |
590
+ | `pending_approve` | `boolean` | Present only on the `is_me: true` copy; `true` while the win awaits manual approval before payout |
591
+
565
592
  **Example:**
566
593
 
567
594
  ```json
568
595
  {
569
596
  "cid": 808,
570
597
  "jackpot": {
571
- "jp_id": 456,
572
- "name": "Mega Jackpot",
573
- "current_value": 10000
598
+ "jp_template_id": 1183,
599
+ "jp_type_id": 1,
600
+ "jp_public_meta": {
601
+ "name": "Major",
602
+ "description": "1% on top of your bet amount will be contributed to the Jackpot",
603
+ "image_url": "https://cdn.example/Jackpot2.jpg",
604
+ "winner_template": { "id": "0", "content": "" },
605
+ "not_winner_template": { "id": "0", "content": "" },
606
+ "placeholder1": null,
607
+ "placeholder2": null,
608
+ "priority": "2",
609
+ "custom_data": "{}"
610
+ },
611
+ "jp_currency": "EUR",
612
+ "user_currency": "USD",
613
+ "related_games": [],
614
+ "contribution_type": 2,
615
+ "contribution_value": 0.5,
616
+ "contribution_rules": [],
617
+ "pot": {
618
+ "jp_template_id": 1183,
619
+ "jp_pot_id": 306053,
620
+ "user_id": null,
621
+ "current_pot_amount": 0,
622
+ "current_pot_amount_user_currency": 0,
623
+ "explode_date_ts": 1782295329703,
624
+ "current_pot_temperature": 0
625
+ },
626
+ "is_opted_in": true,
627
+ "is_auto_opt_in": true,
628
+ "ach_related_game_allow_all": true,
629
+ "registration_count": 412,
630
+ "expose_winners_over_api": true
574
631
  },
575
632
  "winners": [
576
633
  {
577
- "user_id": "user123",
578
- "amount": 10000,
579
- "won_at": 1704067200000
634
+ "user_id": 731,
635
+ "ext_user_id": "player-731",
636
+ "is_me": true,
637
+ "public_username": "LuckyPlayer",
638
+ "public_username_custom": "LuckyPlayer",
639
+ "winning_amount_jp_currency": 16.720332488,
640
+ "winning_amount_wallet_currency": 98.525768722,
641
+ "winning_position": 1,
642
+ "winning_game_id": "book-of-ra-deluxe",
643
+ "winning_provider_id": "novomatic",
644
+ "bet_original_date": 1782295327112,
645
+ "pending_approve": false
580
646
  }
581
647
  ]
582
648
  }
583
649
  ```
584
650
 
585
- **Fields:**
586
-
587
- | Field | Type | Description |
588
- |-------|------|-------------|
589
- | `cid` | `number` | Message type identifier |
590
- | `jackpot` | [`JackpotDetails`](../api/interfaces/JackpotDetails.md) | Jackpot information |
591
- | `winners` | [`JackPotWinner[]`](../api/interfaces/JackPotWinner.md) | Array of winners |
592
-
593
- **Recommended action:** Show jackpot win notification/celebration. Re-fetch jackpot data to update UI.
651
+ **Recommended action:** Show the jackpot win notification / celebration. Use
652
+ `winners[0].is_me` to pick the winner vs. other-player presentation, and
653
+ `jackpot.jp_public_meta.winner_template` / `not_winner_template` for the HTML.
654
+ `winning_game_id` / `winning_provider_id` let you link back to the triggering game in
655
+ your lobby — treat both, and `bet_original_date`, as optional. Re-fetch jackpot data
656
+ afterwards to refresh the pot amount.
594
657
 
595
658
  ---
596
659
 
@@ -2158,6 +2221,64 @@ Get all available jackpots.
2158
2221
  |-------|------|-------------|
2159
2222
  | `items` | [`JackpotDetails[]`](../api/interfaces/JackpotDetails.md) | Array of jackpots |
2160
2223
 
2224
+ Note for native clients: `jp_public_meta.custom_data` arrives as a **JSON-encoded
2225
+ string** and must be parsed by the client. `related_games` is reserved and is always
2226
+ sent empty — use `getJackpotEligibleGames` for the eligible-games list.
2227
+
2228
+ **Example:**
2229
+
2230
+ ```json
2231
+ {
2232
+ "cid": 801,
2233
+ "errCode": 0,
2234
+ "items": [
2235
+ {
2236
+ "jp_template_id": 6,
2237
+ "jp_type_id": 1,
2238
+ "jp_public_meta": {
2239
+ "name": "Minor",
2240
+ "description": "1% on top of your bet amount will be contributed to the Jackpot",
2241
+ "image_url": "https://cdn.example/Jackpot1.jpg",
2242
+ "winner_template": { "id": "0", "content": "" },
2243
+ "not_winner_template": { "id": "0", "content": "" },
2244
+ "placeholder1": null,
2245
+ "placeholder2": null,
2246
+ "priority": "1",
2247
+ "custom_data": "{}"
2248
+ },
2249
+ "jp_currency": "EUR",
2250
+ "user_currency": "EUR",
2251
+ "related_games": [],
2252
+ "contribution_type": 2,
2253
+ "contribution_value": 0.2,
2254
+ "contribution_rules": [
2255
+ { "ruleId": 1, "jpTemplateId": 6, "type": 2, "extEntityIds": ["1111"], "contributionValue": 4 },
2256
+ { "ruleId": 2, "jpTemplateId": 6, "type": 1, "extEntityIds": ["666666"], "contributionValue": 3 }
2257
+ ],
2258
+ "pot": {
2259
+ "jp_template_id": 6,
2260
+ "jp_pot_id": 306140,
2261
+ "user_id": null,
2262
+ "current_pot_amount": 12.28367028,
2263
+ "current_pot_amount_user_currency": 12.28367028,
2264
+ "explode_date_ts": null,
2265
+ "current_pot_temperature": 2
2266
+ },
2267
+ "is_opted_in": false,
2268
+ "is_auto_opt_in": true,
2269
+ "ach_related_game_allow_all": true,
2270
+ "registration_count": 17262,
2271
+ "expose_winners_over_api": false
2272
+ }
2273
+ ]
2274
+ }
2275
+ ```
2276
+
2277
+ `contribution_rules` override `contribution_type` / `contribution_value` for the
2278
+ operator-side game or provider IDs listed in `extEntityIds`; the server applies them,
2279
+ so clients only need them to explain rates in the UI. Note these entries are camelCase
2280
+ while the rest of the payload is snake_case.
2281
+
2161
2282
  ---
2162
2283
 
2163
2284
  ### jackpotOptIn
@@ -2285,7 +2406,8 @@ Each `JackpotPot`:
2285
2406
  | `jp_pot_id` | `number` | Jackpot pot ID |
2286
2407
  | `current_pot_amount` | `number` | Current pot amount in base currency |
2287
2408
  | `current_pot_amount_user_currency` | `number` | Current pot amount in user's currency |
2288
- | `explode_date_ts` | `number` | Timestamp when pot exploded (0 if not yet) |
2409
+ | `explode_date_ts` | `number \| null` | Timestamp (epoch ms) when the pot exploded; `null` while the pot is still running |
2410
+ | `user_id` | `number \| null` | Owning user for Personal pots; `null` for shared MultiUser pots |
2289
2411
  | `current_pot_temperature` | `number` | Temperature: 0=Cold, 1=Warm, 2=Hot, 3=Burning |
2290
2412
 
2291
2413
  **Example:**
@@ -2301,7 +2423,8 @@ Each `JackpotPot`:
2301
2423
  "jp_pot_id": 100,
2302
2424
  "current_pot_amount": 50000,
2303
2425
  "current_pot_amount_user_currency": 50000,
2304
- "explode_date_ts": 0,
2426
+ "explode_date_ts": null,
2427
+ "user_id": null,
2305
2428
  "current_pot_temperature": 2
2306
2429
  }
2307
2430
  ]
@@ -31,7 +31,7 @@ stagger-fade in at 100 ms per index.
31
31
  | Currency symbol | `user_currency` | Looked up by translation key |
32
32
  | Status pill | derived | "Opted in" if `is_opted_in`, otherwise nothing |
33
33
  | Registration count | `registration_count` | Shown on the home-card variant only |
34
- | CTA button | derived | "Join Jackpot" if `!is_opted_in`, otherwise "Details" |
34
+ | CTA button | derived | "Join Jackpot" if `!is_opted_in`, otherwise "Details" — but skip the join CTA entirely when `is_auto_opt_in` is `true`; eligible users are enrolled automatically and have nothing to join |
35
35
 
36
36
  **Click target**: whole-card tap → open detail modal.
37
37
 
@@ -1,8 +1,10 @@
1
1
  # UI Guide — `getActivityLog`
2
2
 
3
3
  ## Overview
4
- - Returns the user's unified balance-change history — every points / gems /
5
- diamonds transaction in the requested window, newest-first.
4
+ - Returns the user's activity history in the requested window, newest-first.
5
+ Wallet rows (points / gems / diamonds) are always available; richer activity
6
+ rows (missions, badges, levels, …) appear on the same method when the
7
+ server starts emitting them — optional fields on `TActivityLog`.
6
8
  - Power an "Activity" / "History" tab showing wins, claims, purchases,
7
9
  level-up rewards, and operator adjustments.
8
10
  - 30 s SDK cache + push refresh on every wallet change (with a caveat —
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.420",
3
+ "version": "0.0.422",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,13 +34,14 @@
34
34
  "typescript-map": "^0.1.0"
35
35
  },
36
36
  "devDependencies": {
37
+ "@types/node": "^22.9.0",
37
38
  "@types/node-fetch": "^2.6.2",
38
39
  "microbundle": "0.15.0",
39
40
  "npm-run-all": "4.1.5",
41
+ "playwright": "^1.62.1",
40
42
  "typedoc": "^0.28.17",
41
43
  "typedoc-plugin-markdown": "^4.11.0",
42
44
  "typedoc-plugin-merge-modules": "^7.0.0",
43
- "typescript": "~5.1.0",
44
- "@types/node": "^22.9.0"
45
+ "typescript": "~5.1.0"
45
46
  }
46
47
  }
@@ -196,7 +196,14 @@ const bound = (v) => {
196
196
  await safe('getCurrentLevel', () => api.getCurrentLevel(), clip);
197
197
  await safe('getLevels', () => api.getLevels());
198
198
  await safe('getUserLevelExtraCounters', () => api.getUserLevelExtraCounters(), clip);
199
- await safe('getActivityLog', () => api.getActivityLog({ startTimeSeconds: now - 2592000, endTimeSeconds: now, from: 0, to: 20 }));
199
+ // Comes back [] today, on env4 and env8 alike, and it is NOT the request: the outbound 545
200
+ // frame carries api_key, ext_user_id, startTimeSeconds, endTimeSeconds, limit and offset,
201
+ // yet the server answers errCode 0 with an empty logHistory for users that demonstrably
202
+ // have rows (verified on env8 label 2283 against a session bound to the right user_id).
203
+ // Server-side gap — re-capture once it is fixed. Wide window so a sparse account still
204
+ // yields a shape.
205
+ const activityWindow = { startTimeSeconds: now - 63072000, endTimeSeconds: now, from: 0, to: 20 };
206
+ await safe('getActivityLog', () => api.getActivityLog({ ...activityWindow }));
200
207
 
201
208
  // ---- detail / param methods — every id harvested from the lists above (no hardcodes) ----
202
209
  const ids = {};
@@ -1,4 +1,4 @@
1
- /** Activity-log entry type as returned on the v2 wire (`type_id`). */
1
+ /** Activity-log entry type as returned on the wire (`type_id`). */
2
2
  export enum ActivityLogActivities {
3
3
  Gems = 1,
4
4
  Diamonds = 2,