@smartico/public-api 0.0.409 → 0.0.411

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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/MiniGames/SAWDoAknowledgeRequest.d.ts +2 -0
  3. package/dist/MiniGames/SAWPrize.d.ts +18 -0
  4. package/dist/MiniGames/SAWPrizeUI.d.ts +1 -0
  5. package/dist/MiniGames/SAWTemplate.d.ts +24 -0
  6. package/dist/SmarticoAPI.d.ts +1 -1
  7. package/dist/SmarticoLib/index.d.ts +1 -1
  8. package/dist/WSAPI/WSAPIJackpots.d.ts +11 -2
  9. package/dist/WSAPI/WSAPIMiniGames.d.ts +92 -23
  10. package/dist/WSAPI/WSAPITypes.d.ts +45 -44
  11. package/dist/index.js +112 -31
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.modern.mjs +109 -28
  14. package/dist/index.modern.mjs.map +1 -1
  15. package/docs/api/classes/WSAPIJackpots.md +11 -2
  16. package/docs/api/classes/WSAPIMiniGames.md +92 -23
  17. package/docs/api/interfaces/SAWDoAknowledgeRequest.md +8 -0
  18. package/docs/api/interfaces/SAWPrize.md +36 -0
  19. package/docs/api/interfaces/SAWPrizeUI.md +2 -0
  20. package/docs/api/interfaces/SAWTemplate.md +48 -0
  21. package/docs/api/interfaces/TMiniGamePrize.md +51 -27
  22. package/docs/api/interfaces/TMiniGameTemplate.md +15 -16
  23. package/docs/capabilities/getJackpotEligibleGames.md +11 -2
  24. package/docs/capabilities/getMiniGames.md +63 -39
  25. package/docs/capabilities/miniGameWinAcknowledgeRequest.md +36 -7
  26. package/docs/capabilities/playMiniGame.md +27 -14
  27. package/docs/native/PROTOCOL.md +7 -0
  28. package/docs/ui/jackpots/UIGuide_getJackpotEligibleGames.md +8 -0
  29. package/docs/ui/minigames/UIGuide_getMiniGames.md +46 -0
  30. package/docs/ui/minigames/UIGuide_getMiniGamesHistory.md +1 -1
  31. package/docs/ui/minigames/UIGuide_miniGameWinAcknowledgeRequest.md +90 -0
  32. package/docs/ui/minigames/UIGuide_playMiniGame.md +38 -2
  33. package/package.json +1 -1
  34. package/src/MiniGames/SAWDoAknowledgeRequest.ts +2 -0
  35. package/src/MiniGames/SAWGetTemplatesResponse.ts +1 -0
  36. package/src/MiniGames/SAWPrize.ts +18 -0
  37. package/src/MiniGames/SAWPrizeUI.ts +2 -1
  38. package/src/MiniGames/SAWTemplate.ts +27 -4
  39. package/src/SmarticoAPI.ts +7 -1
  40. package/src/SmarticoLib/index.ts +1 -1
  41. package/src/WSAPI/WSAPIJackpots.ts +11 -2
  42. package/src/WSAPI/WSAPIMiniGames.ts +91 -24
  43. package/src/WSAPI/WSAPITypes.ts +47 -46
@@ -16,7 +16,7 @@ ID of the prize
16
16
 
17
17
  > **name**: `string`
18
18
 
19
- The visual name of the prize
19
+ Display name of the prize, pre-translated; any jackpot placeholder in it arrives resolved to the live jackpot value
20
20
 
21
21
  ***
22
22
 
@@ -24,7 +24,7 @@ The visual name of the prize
24
24
 
25
25
  > **prize\_type**: [`MiniGamePrizeTypeName`](../enumerations/MiniGamePrizeTypeName.md)
26
26
 
27
- The type of the prize, no-prize, points, bonus, manual, spin, jackpot
27
+ The type of the prize — see [MiniGamePrizeTypeName](../enumerations/MiniGamePrizeTypeName.md) ('no-prize', 'points', 'gems-and-diamonds', 'spin', 'bonus', 'jackpot', 'raffle-ticket', 'mission', 'change-level', 'manual')
28
28
 
29
29
  ***
30
30
 
@@ -32,7 +32,7 @@ The type of the prize, no-prize, points, bonus, manual, spin, jackpot
32
32
 
33
33
  > `optional` **prize\_value?**: `number`
34
34
 
35
- Numeric value of the prize in case it's 'points' or 'spin' type. For other types of prizes this value is not relevant.
35
+ Numeric value of the prize in case it's 'points' or 'spin' type. For other types of prizes this value is not relevant.
36
36
  For example for prize '100 points' the prize_value will be 100. For '100 free spins' the prize_value will be 100.
37
37
 
38
38
  ***
@@ -41,7 +41,7 @@ For example for prize '100 points' the prize_value will be 100. For '100 free s
41
41
 
42
42
  > `optional` **font\_size?**: `number`
43
43
 
44
- Custom font size for the prize (desktop)
44
+ Custom font size in px for rendering the prize name on the game surface (e.g. a wheel sector), desktop
45
45
 
46
46
  ***
47
47
 
@@ -49,7 +49,7 @@ Custom font size for the prize (desktop)
49
49
 
50
50
  > `optional` **font\_size\_mobile?**: `number`
51
51
 
52
- Custom font size for the prize (mobile)
52
+ Custom font size in px for the prize name, mobile; falls back to `font_size` when absent
53
53
 
54
54
  ***
55
55
 
@@ -65,7 +65,7 @@ The URL of the icon of the prize, aspect ratio 1:1
65
65
 
66
66
  > **position**: `number`
67
67
 
68
- for scratch card defines position of prize in the list
68
+ For Scratch Card games — relative order of the prize in the scratch grid (lower first). May be absent for other game types
69
69
 
70
70
  ***
71
71
 
@@ -73,7 +73,7 @@ for scratch card defines position of prize in the list
73
73
 
74
74
  > **sectors**: `number`[]
75
75
 
76
- List of sectors for the prize
76
+ For Spin-a-Wheel games — wheel sector indices this prize occupies. Absent for non-wheel games
77
77
 
78
78
  ***
79
79
 
@@ -81,7 +81,7 @@ List of sectors for the prize
81
81
 
82
82
  > **acknowledge\_type**: [`SAWAcknowledgeTypeName`](../enumerations/SAWAcknowledgeTypeName.md)
83
83
 
84
- Type of acknowledge message for users
84
+ Which win modal the prize uses — see [SAWAcknowledgeTypeName](../enumerations/SAWAcknowledgeTypeName.md) (Silent / QuickMessage / FullMessage / ExplicitAcknowledge)
85
85
 
86
86
  ***
87
87
 
@@ -93,11 +93,19 @@ Message that will be shown to user in modal pop-up
93
93
 
94
94
  ***
95
95
 
96
+ ### aknowledge\_message\_lose?
97
+
98
+ > `optional` **aknowledge\_message\_lose?**: `string`
99
+
100
+ Message shown instead of `aknowledge_message` when the spin is finalised as lost (`lose: true` acknowledge flows — games with a client-decided outcome, e.g. Voyager). Absent unless configured
101
+
102
+ ***
103
+
96
104
  ### acknowledge\_dp
97
105
 
98
106
  > **acknowledge\_dp**: `string`
99
107
 
100
- Deep link that will trigger some action in modal pop-up
108
+ Deep link executed when the user taps the main action button in the win modal (run it via `_smartico.dp()`)
101
109
 
102
110
  ***
103
111
 
@@ -105,7 +113,7 @@ Deep link that will trigger some action in modal pop-up
105
113
 
106
114
  > **acknowledge\_action\_title**: `string`
107
115
 
108
- The name of the action button in modal pop-up
116
+ Label of the main action button in the win modal
109
117
 
110
118
  ***
111
119
 
@@ -113,7 +121,7 @@ The name of the action button in modal pop-up
113
121
 
114
122
  > `optional` **acknowledge\_dp\_additional?**: `string`
115
123
 
116
- Deep link that will trigger some action in modal pop-up (additional)
124
+ Deep link of the additional action button in the win modal
117
125
 
118
126
  ***
119
127
 
@@ -121,7 +129,23 @@ Deep link that will trigger some action in modal pop-up (additional)
121
129
 
122
130
  > `optional` **acknowledge\_action\_title\_additional?**: `string`
123
131
 
124
- The name of the action button in modal pop-up (additional)
132
+ Label of the additional action button in the win modal
133
+
134
+ ***
135
+
136
+ ### second\_btn?
137
+
138
+ > `optional` **second\_btn?**: `string`
139
+
140
+ Deep link of the secondary button in the win modal
141
+
142
+ ***
143
+
144
+ ### second\_btn\_action\_title?
145
+
146
+ > `optional` **second\_btn\_action\_title?**: `string`
147
+
148
+ Label of the secondary button in the win modal
125
149
 
126
150
  ***
127
151
 
@@ -137,7 +161,7 @@ Message when the prize pool is empty for that specific prize
137
161
 
138
162
  > `optional` **pool?**: `number`
139
163
 
140
- Number of items in stock
164
+ Remaining stock of the prize — decrements on each win, refunded if the spin is finalised as lost. Populated only when the template's `expose_game_stat_on_api` is enabled; always populated for MatchX / Quiz games
141
165
 
142
166
  ***
143
167
 
@@ -145,7 +169,7 @@ Number of items in stock
145
169
 
146
170
  > `optional` **pool\_initial?**: `number`
147
171
 
148
- Initial number of items in stock
172
+ Initial (configured) stock of the prize. Populated regardless of `expose_game_stat_on_api`
149
173
 
150
174
  ***
151
175
 
@@ -153,7 +177,7 @@ Initial number of items in stock
153
177
 
154
178
  > `optional` **wins\_count?**: `number`
155
179
 
156
- Number of wins in game
180
+ Number of times the prize has been won, across all players. Populated only when the template's `expose_game_stat_on_api` is enabled
157
181
 
158
182
  ***
159
183
 
@@ -161,7 +185,7 @@ Number of wins in game
161
185
 
162
186
  > `optional` **weekdays?**: `number`[]
163
187
 
164
- Number of days of week, when the prize can be available
188
+ ISO weekday numbers (1 = Monday … 7 = Sunday) on which the prize can be won; absent = any day. Populated only when the template's `expose_game_stat_on_api` is enabled
165
189
 
166
190
  ***
167
191
 
@@ -169,7 +193,7 @@ Number of days of week, when the prize can be available
169
193
 
170
194
  > `optional` **active\_from\_ts?**: `number`
171
195
 
172
- Holds time from which prize will become available, for the prizes that are targeted to be available from specific time (UNIX timestamp)
196
+ Time from which the prize can be won (epoch ms), evaluated against `relative_period_timezone`. Populated only when the template's `expose_game_stat_on_api` is enabled
173
197
 
174
198
  ***
175
199
 
@@ -177,7 +201,7 @@ Holds time from which prize will become available, for the prizes that are targe
177
201
 
178
202
  > `optional` **active\_till\_ts?**: `number`
179
203
 
180
- Holds time till which prize will become available, for the prizes that are targeted to be available from specific time (UNIX timestamp)
204
+ Time until which the prize can be won (epoch ms), evaluated against `relative_period_timezone`. Populated only when the template's `expose_game_stat_on_api` is enabled
181
205
 
182
206
  ***
183
207
 
@@ -185,7 +209,7 @@ Holds time till which prize will become available, for the prizes that are targe
185
209
 
186
210
  > `optional` **relative\_period\_timezone?**: `number`
187
211
 
188
- Time zone to ensure each day aligns with your local midnight.
212
+ Timezone offset in minutes used to evaluate `weekdays` and the active window (UTC minus local, as in JS `Date.getTimezoneOffset()` — e.g. `-180` for UTC+3)
189
213
 
190
214
  ***
191
215
 
@@ -193,7 +217,7 @@ Time zone to ensure each day aligns with your local midnight.
193
217
 
194
218
  > `optional` **is\_surcharge?**: `boolean`
195
219
 
196
- Flag indicating that the prize is surcharged (available all the time, despite pool numbers)
220
+ When true, the prize stays winnable even when its `pool` reaches 0 (effectively unlimited stock)
197
221
 
198
222
  ***
199
223
 
@@ -201,7 +225,7 @@ Flag indicating that the prize is surcharged (available all the time, despite po
201
225
 
202
226
  > `optional` **is\_deleted?**: `boolean`
203
227
 
204
- Flag indicating the state of the prize
228
+ Always `false` in API responses — deleted prizes are excluded server-side
205
229
 
206
230
  ***
207
231
 
@@ -209,7 +233,7 @@ Flag indicating the state of the prize
209
233
 
210
234
  > `optional` **custom\_data?**: `any`
211
235
 
212
- The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number
236
+ The custom data of the prize defined by the operator. Can be a JSON object, string or number
213
237
 
214
238
  ***
215
239
 
@@ -217,7 +241,7 @@ The custom data of the mini-game defined by operator in the BackOffice. Can be a
217
241
 
218
242
  > `optional` **prize\_modifiers?**: [`PrizeModifiers`](../enumerations/PrizeModifiers.md)[]
219
243
 
220
- Prize modifiers that will multiply by 2x, 5x or 10x the current total. This will not affect the final Prize Amount that will be awarded.
244
+ Step-modifier tiles for step games (Treasure Hunt / Voyager) — see [PrizeModifiers](../enumerations/PrizeModifiers.md) (2x / 5x / 10x, /2 / /5 / /10, 0, reset) applied to the running total revealed during the game. Presentation only — the awarded amount is still `prize_value`
221
245
 
222
246
  ***
223
247
 
@@ -225,7 +249,7 @@ Prize modifiers that will multiply by 2x, 5x or 10x the current total. This will
225
249
 
226
250
  > `optional` **allow\_split\_decimal?**: `boolean`
227
251
 
228
- When enabled, you can split prize value by decimal values
252
+ Step games (Treasure Hunt / Voyager): when true, the per-step revealed amounts of the prize value may be fractional; when false the split uses whole numbers
229
253
 
230
254
  ***
231
255
 
@@ -233,7 +257,7 @@ When enabled, you can split prize value by decimal values
233
257
 
234
258
  > `optional` **hide\_prize\_from\_history?**: `boolean`
235
259
 
236
- When enabled, you can hide prize from prize history
260
+ Operator hint to hide this prize when rendering prize-history UIs. Informational only — API responses are not filtered by it
237
261
 
238
262
  ***
239
263
 
@@ -241,7 +265,7 @@ When enabled, you can hide prize from prize history
241
265
 
242
266
  > `optional` **requirements\_to\_get\_prize?**: `string`
243
267
 
244
- Requirements to claim the prize (lootbox specific)
268
+ Operator text describing what the user must do to be eligible for this prize (lootbox games); shown when the prize is not yet available to the user
245
269
 
246
270
  ***
247
271
 
@@ -249,4 +273,4 @@ Requirements to claim the prize (lootbox specific)
249
273
 
250
274
  > `optional` **max\_give\_period\_type\_id?**: [`AttemptPeriodType`](../enumerations/AttemptPeriodType.md)
251
275
 
252
- The period type for the prize to be given: Time from last attempt, Calendar days UTC, Calendar days user time zone, Lifetime
276
+ Period basis for the prize availability restriction — see [AttemptPeriodType](../enumerations/AttemptPeriodType.md). `CalendarDaysUserTimeZone` evaluates `weekdays` / the active window in the user's timezone; the other types use `relative_period_timezone`
@@ -96,10 +96,9 @@ in case of charging type 'Spin attempts', shows the current number of spin attem
96
96
 
97
97
  > **next\_available\_spin\_ts**: `number`
98
98
 
99
- if the game is limit to the number of spins that user can do during period of time,
100
- this property shows the epoch time in UTC when the next attempt will be available.
101
- Note that you need to enable 'Show time to the next available spin' setting on mini-game template in the backoffice
102
- Important: this field will not be populated if “Max number of attempts a user can do” is set to value different from 1
99
+ If the game limits the number of attempts per period of time, the epoch-ms time (UTC) when the next attempt becomes available.
100
+ Populated only when the operator enabled the "show time to the next available spin" template setting, and only when the
101
+ template's maximum attempts per period is 1.
103
102
 
104
103
  ***
105
104
 
@@ -144,7 +143,7 @@ The message that should be shown to the user when he cannot play the game becaus
144
143
 
145
144
  > **jackpot\_current**: `number`
146
145
 
147
- Current jackpont amount, if jackpot is enabled.
146
+ Current jackpot amount, if jackpot is enabled.
148
147
 
149
148
  ***
150
149
 
@@ -192,7 +191,7 @@ The custom data of the mini-game defined by operator in the BackOffice. Can be a
192
191
 
193
192
  > **prizes**: [`TMiniGamePrize`](TMiniGamePrize.md)[]
194
193
 
195
- List of prizes for mini-games
194
+ Prizes configured for this game — see [TMiniGamePrize](TMiniGamePrize.md)
196
195
 
197
196
  ***
198
197
 
@@ -200,7 +199,7 @@ List of prizes for mini-games
200
199
 
201
200
  > `optional` **expose\_game\_stat\_on\_api?**: `boolean`
202
201
 
203
- When enabled, the number of items in the pool and number of won items will be exposed in the Retention API and in the UI Widgets
202
+ Operator template setting. When enabled, the per-prize stock statistics (`pool`, `wins_count`, `weekdays`, `active_from_ts` / `active_till_ts`) are populated on `prizes` and kept current after every play; when disabled (default) those fields are omitted. See `getMiniGames` "Per-prize statistics"
204
203
 
205
204
  ***
206
205
 
@@ -208,7 +207,7 @@ When enabled, the number of items in the pool and number of won items will be ex
208
207
 
209
208
  > `optional` **relative\_period\_timezone?**: `number`
210
209
 
211
- Time zone to ensure each day aligns with your local midnight.
210
+ Timezone offset in minutes used to evaluate the template's period-based rules (UTC minus local, as in JS `Date.getTimezoneOffset()` — e.g. `-180` for UTC+3)
212
211
 
213
212
  ***
214
213
 
@@ -216,7 +215,7 @@ Time zone to ensure each day aligns with your local midnight.
216
215
 
217
216
  > `optional` **activeFromDate?**: `number`
218
217
 
219
- Holds time from which template will become available, for the template that are targeted to be available from specific time (UNIX timestamp)
218
+ Time from which the template becomes available (epoch ms); absent when not restricted
220
219
 
221
220
  ***
222
221
 
@@ -224,7 +223,7 @@ Holds time from which template will become available, for the template that are
224
223
 
225
224
  > `optional` **activeTillDate?**: `number`
226
225
 
227
- Holds time till which template will become available, for the templates that are targeted to be available from specific time (UNIX timestamp)
226
+ Time until which the template stays available (epoch ms); absent when not restricted
228
227
 
229
228
  ***
230
229
 
@@ -232,7 +231,7 @@ Holds time till which template will become available, for the templates that are
232
231
 
233
232
  > `optional` **steps\_to\_finish\_game?**: `number`
234
233
 
235
- The amount of steps to complete the game and gather the prize
234
+ Number of steps to complete the game and collect the prize (step games — Voyager / Treasure Hunt)
236
235
 
237
236
  ***
238
237
 
@@ -240,7 +239,7 @@ The amount of steps to complete the game and gather the prize
240
239
 
241
240
  > `optional` **custom\_section\_id?**: `number`
242
241
 
243
- Hold the id of the custom section
242
+ ID of the operator-defined custom section (widget menu grouping) the mini-game is assigned to
244
243
 
245
244
  ***
246
245
 
@@ -248,7 +247,7 @@ Hold the id of the custom section
248
247
 
249
248
  > **saw\_template\_ui\_definition**: [`SAWTemplateUI`](SAWTemplateUI.md)
250
249
 
251
- The UI definition of the mini-game
250
+ Full raw UI definition of the mini-game (skin, colors, per-game visual settings) — see [SAWTemplateUI](SAWTemplateUI.md). The commonly needed values are already lifted onto this template object
252
251
 
253
252
  ***
254
253
 
@@ -256,7 +255,7 @@ The UI definition of the mini-game
256
255
 
257
256
  > `optional` **game\_layout?**: [`SAWGameLayoutName`](../enumerations/SAWGameLayoutName.md)
258
257
 
259
- The layout of the game
258
+ Grid layout of the game. Populated only for Lootbox game types (LootboxWeekdays / LootboxCalendarDays)
260
259
 
261
260
  ***
262
261
 
@@ -264,7 +263,7 @@ The layout of the game
264
263
 
265
264
  > `optional` **show\_prize\_history?**: `boolean`
266
265
 
267
- When enabled the prize history icon is visible on a certain template
266
+ Operator setting: show a prize-history entry point (icon / button) on this game's view
268
267
 
269
268
  ***
270
269
 
@@ -288,4 +287,4 @@ The period of time in milliseconds during which the user can do the maximum numb
288
287
 
289
288
  > `optional` **expose\_user\_spin\_id?**: [`SAWExposeUserSpinIdName`](../enumerations/SAWExposeUserSpinIdName.md)
290
289
 
291
- The ID of the user spin id to expose on the game
290
+ Which identifier to show next to a win result for transparency/audit — 'userId' (the player's external user id) or 'spinId' (the spin's transaction id). Absent when the operator disabled it
@@ -33,7 +33,7 @@ _None._
33
33
 
34
34
  ## Behavioral contract
35
35
  **Preconditions**
36
- - User must be authenticated. Visitor mode not supported.
36
+ - No authentication required — works in both identified and visitor mode.
37
37
  - `jp_template_id` is mandatory.
38
38
 
39
39
  **`onUpdate` caveat**
@@ -51,7 +51,12 @@ Treat it as a no-op for now.
51
51
  Non-zero `errCode` on control-group users or generic server errors.
52
52
  Branch on `errCode === 0` and surface `errMsg` on failure.
53
53
 
54
- **Visitor mode**: not supported.
54
+ **Visitor mode**: supported via
55
+ `_smartico.vapi(lang).getJackpotEligibleGames(...)`. The eligible-games
56
+ list is template-level (which games contribute to the pot) and carries no
57
+ per-user fields, so a visitor session receives the same list an identified
58
+ user would. The `lang` passed to `_smartico.vapi(lang)` drives the
59
+ translation of game names.
55
60
 
56
61
  **UI guidance**: see [UI Guide — `getJackpotEligibleGames`](../../docs/ui/jackpots/UIGuide_getJackpotEligibleGames.md).
57
62
 
@@ -66,6 +71,10 @@ if (jp?.ach_related_game_allow_all) {
66
71
 
67
72
  const r = await window._smartico.api.getJackpotEligibleGames({ jp_template_id: 42 });
68
73
  console.log('[smartico] render', r.eligible_games.length, 'eligible game tiles');
74
+
75
+ // Visitor mode — same shape, language driven by the vapi(lang) argument
76
+ const visitor = await window._smartico.vapi('EN').getJackpotEligibleGames({ jp_template_id: 42 });
77
+ console.log('[smartico] visitor eligible games:', visitor.eligible_games.length);
69
78
  ```
70
79
 
71
80
  ### Example response (REAL shape)
@@ -30,56 +30,59 @@ Array of `TMiniGameTemplate`. Each item:
30
30
  - `buyin_cost_gems` (number) — in case of charging type 'Gems', what is the gems amount will be deducted from user balance
31
31
  - `buyin_cost_diamonds` (number) — in case of charging type 'Diamonds', what is the diamonds amount will be deducted from user balance
32
32
  - `spin_count` (number) — in case of charging type 'Spin attempts', shows the current number of spin attempts that user has
33
- - `next_available_spin_ts` (number) — if the game is limit to the number of spins that user can do during period of time, this property shows the epoch time in UTC when the next attempt will be available. Note that you need to enable 'Show time to the next available spin' setting on mini-game template in the backoffice Important: this field will not be populated if “Max number of attempts a user can do” is set to value different from 1
33
+ - `next_available_spin_ts` (number) — If the game limits the number of attempts per period of time, the epoch-ms time (UTC) when the next attempt becomes available. Populated only when the operator enabled the "show time to the next available spin" template setting, and only when the template's maximum attempts per period is 1.
34
34
  - `earliest_expiration_dt` (number | null) — Soonest-expiring spin's expiration time for the current user, as an epoch-ms timestamp. `null` when the user has no expirable spins for this template — spins only expire when the template defines a spin-expiration rule (Wheel of Fortune, Loot Boxes, etc.). Pair with `latest_expiration_dt` to render a "spins expire between X and Y" window.
35
35
  - `latest_expiration_dt` (number | null) — Latest-expiring spin's expiration time for the current user, as an epoch-ms timestamp. `null` when the user has no expirable spins; equals `earliest_expiration_dt` when a single expiration applies.
36
36
  - `over_limit_message` (string) — The message that should be shown to the user when he cannot play the game, server rejected attempt with error code SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED
37
37
  - `no_attempts_message` (string) — The message that should be shown to the user when he cannot play the game because he doesn't have spin attempts or points.
38
- - `jackpot_current` (number) — Current jackpont amount, if jackpot is enabled.
38
+ - `jackpot_current` (number) — Current jackpot amount, if jackpot is enabled.
39
39
  - `jackpot_add_on_attempt` (number) — The amount that will be added to the jackpot every time when somebody plays the game. Note that the contribution amount is abstract, means that no money or points are deducted from the user balance.
40
40
  - `jackpot_symbol` (string) — The symbol of jackpot that is giving the sense to the 'amount' E.g. the symbol could be EUR and connected to the amount it can indicate that amount is monetary, e.g. '100 EUR'. Or the symbol can be 'Free spins' and connected to the amount it can indicate that amount is number of free spins, e.g. '100 Free spins'.
41
41
  - `promo_image` (string) — The promo image, 500x240px
42
42
  - `promo_text` (string) — The promo text
43
43
  - `custom_data` (any) — The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number
44
- - `prizes` (TMiniGamePrize[]) — List of prizes for mini-games
44
+ - `prizes` (TMiniGamePrize[]) — Prizes configured for this game — see `TMiniGamePrize`
45
45
  - `id` (number) — ID of the prize
46
- - `name` (string) — The visual name of the prize
47
- - `prize_type` (MiniGamePrizeTypeName) — The type of the prize, no-prize, points, bonus, manual, spin, jackpot
46
+ - `name` (string) — Display name of the prize, pre-translated; any jackpot placeholder in it arrives resolved to the live jackpot value
47
+ - `prize_type` (MiniGamePrizeTypeName) — The type of the prize — see `MiniGamePrizeTypeName` ('no-prize', 'points', 'gems-and-diamonds', 'spin', 'bonus', 'jackpot', 'raffle-ticket', 'mission', 'change-level', 'manual')
48
48
  - `prize_value` (number) — Numeric value of the prize in case it's 'points' or 'spin' type. For other types of prizes this value is not relevant. For example for prize '100 points' the prize_value will be 100. For '100 free spins' the prize_value will be 100.
49
- - `font_size` (number) — Custom font size for the prize (desktop)
50
- - `font_size_mobile` (number) — Custom font size for the prize (mobile)
49
+ - `font_size` (number) — Custom font size in px for rendering the prize name on the game surface (e.g. a wheel sector), desktop
50
+ - `font_size_mobile` (number) — Custom font size in px for the prize name, mobile; falls back to `font_size` when absent
51
51
  - `icon` (string) — The URL of the icon of the prize, aspect ratio 1:1
52
- - `position` (number) — for scratch card defines position of prize in the list
53
- - `sectors` (number[]) — List of sectors for the prize
54
- - `acknowledge_type` (SAWAcknowledgeTypeName) — Type of acknowledge message for users
52
+ - `position` (number) — For Scratch Card games — relative order of the prize in the scratch grid (lower first). May be absent for other game types
53
+ - `sectors` (number[]) — For Spin-a-Wheel games — wheel sector indices this prize occupies. Absent for non-wheel games
54
+ - `acknowledge_type` (SAWAcknowledgeTypeName) — Which win modal the prize uses — see `SAWAcknowledgeTypeName` (Silent / QuickMessage / FullMessage / ExplicitAcknowledge)
55
55
  - `aknowledge_message` (string) — Message that will be shown to user in modal pop-up
56
- - `acknowledge_dp` (string) — Deep link that will trigger some action in modal pop-up
57
- - `acknowledge_action_title` (string) — The name of the action button in modal pop-up
58
- - `acknowledge_dp_additional` (string) — Deep link that will trigger some action in modal pop-up (additional)
59
- - `acknowledge_action_title_additional` (string) — The name of the action button in modal pop-up (additional)
56
+ - `aknowledge_message_lose` (string) — Message shown instead of `aknowledge_message` when the spin is finalised as lost (`lose: true` acknowledge flows — games with a client-decided outcome, e.g. Voyager). Absent unless configured
57
+ - `acknowledge_dp` (string) — Deep link executed when the user taps the main action button in the win modal (run it via `_smartico.dp()`)
58
+ - `acknowledge_action_title` (string) — Label of the main action button in the win modal
59
+ - `acknowledge_dp_additional` (string) — Deep link of the additional action button in the win modal
60
+ - `acknowledge_action_title_additional` (string) — Label of the additional action button in the win modal
61
+ - `second_btn` (string) — Deep link of the secondary button in the win modal
62
+ - `second_btn_action_title` (string) — Label of the secondary button in the win modal
60
63
  - `out_of_stock_message` (string) — Message when the prize pool is empty for that specific prize
61
- - `pool` (number) — Number of items in stock
62
- - `pool_initial` (number) — Initial number of items in stock
63
- - `wins_count` (number) — Number of wins in game
64
- - `weekdays` (number[]) — Number of days of week, when the prize can be available
65
- - `active_from_ts` (number) — Holds time from which prize will become available, for the prizes that are targeted to be available from specific time (UNIX timestamp)
66
- - `active_till_ts` (number) — Holds time till which prize will become available, for the prizes that are targeted to be available from specific time (UNIX timestamp)
67
- - `relative_period_timezone` (number) — Time zone to ensure each day aligns with your local midnight.
68
- - `is_surcharge` (boolean) — Flag indicating that the prize is surcharged (available all the time, despite pool numbers)
69
- - `is_deleted` (boolean) — Flag indicating the state of the prize
70
- - `custom_data` (any) — The custom data of the mini-game defined by operator in the BackOffice. Can be a JSON object, string or number
71
- - `prize_modifiers` (PrizeModifiers[]) — Prize modifiers that will multiply by 2x, 5x or 10x the current total. This will not affect the final Prize Amount that will be awarded.
72
- - `allow_split_decimal` (boolean) — When enabled, you can split prize value by decimal values
73
- - `hide_prize_from_history` (boolean) — When enabled, you can hide prize from prize history
74
- - `requirements_to_get_prize` (string) — Requirements to claim the prize (lootbox specific)
75
- - `max_give_period_type_id` (AttemptPeriodType) — The period type for the prize to be given: Time from last attempt, Calendar days UTC, Calendar days user time zone, Lifetime
76
- - `expose_game_stat_on_api` (boolean) — When enabled, the number of items in the pool and number of won items will be exposed in the Retention API and in the UI Widgets
77
- - `relative_period_timezone` (number) — Time zone to ensure each day aligns with your local midnight.
78
- - `activeFromDate` (number) — Holds time from which template will become available, for the template that are targeted to be available from specific time (UNIX timestamp)
79
- - `activeTillDate` (number) — Holds time till which template will become available, for the templates that are targeted to be available from specific time (UNIX timestamp)
80
- - `steps_to_finish_game` (number) — The amount of steps to complete the game and gather the prize
81
- - `custom_section_id` (number) — Hold the id of the custom section
82
- - `saw_template_ui_definition` (SAWTemplateUI) — The UI definition of the mini-game
64
+ - `pool` (number) — Remaining stock of the prize — decrements on each win, refunded if the spin is finalised as lost. Populated only when the template's `expose_game_stat_on_api` is enabled; always populated for MatchX / Quiz games
65
+ - `pool_initial` (number) — Initial (configured) stock of the prize. Populated regardless of `expose_game_stat_on_api`
66
+ - `wins_count` (number) — Number of times the prize has been won, across all players. Populated only when the template's `expose_game_stat_on_api` is enabled
67
+ - `weekdays` (number[]) — ISO weekday numbers (1 = Monday … 7 = Sunday) on which the prize can be won; absent = any day. Populated only when the template's `expose_game_stat_on_api` is enabled
68
+ - `active_from_ts` (number) — Time from which the prize can be won (epoch ms), evaluated against `relative_period_timezone`. Populated only when the template's `expose_game_stat_on_api` is enabled
69
+ - `active_till_ts` (number) — Time until which the prize can be won (epoch ms), evaluated against `relative_period_timezone`. Populated only when the template's `expose_game_stat_on_api` is enabled
70
+ - `relative_period_timezone` (number) — Timezone offset in minutes used to evaluate `weekdays` and the active window (UTC minus local, as in JS `Date.getTimezoneOffset()` — e.g. `-180` for UTC+3)
71
+ - `is_surcharge` (boolean) — When true, the prize stays winnable even when its `pool` reaches 0 (effectively unlimited stock)
72
+ - `is_deleted` (boolean) — Always `false` in API responses — deleted prizes are excluded server-side
73
+ - `custom_data` (any) — The custom data of the prize defined by the operator. Can be a JSON object, string or number
74
+ - `prize_modifiers` (PrizeModifiers[]) — Step-modifier tiles for step games (Treasure Hunt / Voyager) — see `PrizeModifiers` (2x / 5x / 10x, /2 / /5 / /10, 0, reset) applied to the running total revealed during the game. Presentation only — the awarded amount is still `prize_value`
75
+ - `allow_split_decimal` (boolean) — Step games (Treasure Hunt / Voyager): when true, the per-step revealed amounts of the prize value may be fractional; when false the split uses whole numbers
76
+ - `hide_prize_from_history` (boolean) — Operator hint to hide this prize when rendering prize-history UIs. Informational only — API responses are not filtered by it
77
+ - `requirements_to_get_prize` (string) — Operator text describing what the user must do to be eligible for this prize (lootbox games); shown when the prize is not yet available to the user
78
+ - `max_give_period_type_id` (AttemptPeriodType) — Period basis for the prize availability restriction — see `AttemptPeriodType`. `CalendarDaysUserTimeZone` evaluates `weekdays` / the active window in the user's timezone; the other types use `relative_period_timezone`
79
+ - `expose_game_stat_on_api` (boolean) — Operator template setting. When enabled, the per-prize stock statistics (`pool`, `wins_count`, `weekdays`, `active_from_ts` / `active_till_ts`) are populated on `prizes` and kept current after every play; when disabled (default) those fields are omitted. See `getMiniGames` "Per-prize statistics"
80
+ - `relative_period_timezone` (number) — Timezone offset in minutes used to evaluate the template's period-based rules (UTC minus local, as in JS `Date.getTimezoneOffset()` — e.g. `-180` for UTC+3)
81
+ - `activeFromDate` (number) — Time from which the template becomes available (epoch ms); absent when not restricted
82
+ - `activeTillDate` (number) — Time until which the template stays available (epoch ms); absent when not restricted
83
+ - `steps_to_finish_game` (number) — Number of steps to complete the game and collect the prize (step games — Voyager / Treasure Hunt)
84
+ - `custom_section_id` (number) — ID of the operator-defined custom section (widget menu grouping) the mini-game is assigned to
85
+ - `saw_template_ui_definition` (SAWTemplateUI) — Full raw UI definition of the mini-game (skin, colors, per-game visual settings) — see `SAWTemplateUI`. The commonly needed values are already lifted onto this template object
83
86
  - `skin` (string)
84
87
  - `name` (string)
85
88
  - `description` (string)
@@ -124,11 +127,11 @@ Array of `TMiniGameTemplate`. Each item:
124
127
  id: string;
125
128
  content: string;
126
129
  })
127
- - `game_layout` (SAWGameLayoutName) — The layout of the game
128
- - `show_prize_history` (boolean) — When enabled the prize history icon is visible on a certain template
130
+ - `game_layout` (SAWGameLayoutName) — Grid layout of the game. Populated only for Lootbox game types (LootboxWeekdays / LootboxCalendarDays)
131
+ - `show_prize_history` (boolean) — Operator setting: show a prize-history entry point (icon / button) on this game's view
129
132
  - `max_number_of_attempts` (number) — The maximum number of attempts that user can do during period of time
130
133
  - `max_spins_period_ms` (number) — The period of time in milliseconds during which the user can do the maximum number of attempts
131
- - `expose_user_spin_id` (SAWExposeUserSpinIdName) — The ID of the user spin id to expose on the game
134
+ - `expose_user_spin_id` (SAWExposeUserSpinIdName) — Which identifier to show next to a win result for transparency/audit — 'userId' (the player's external user id) or 'spinId' (the spin's transaction id). Absent when the operator disabled it
132
135
 
133
136
  ## Behavioral contract
134
137
  **Subscription model (`onUpdate`)**
@@ -166,6 +169,27 @@ played via `playMiniGame`; the exceptions are:
166
169
  games server (not this SDK); the SAW spin is fired
167
170
  server-internally to deduct the buy-in.
168
171
 
172
+ **Per-prize statistics (`expose_game_stat_on_api`)**
173
+ Each template's `prizes` array always carries the definition
174
+ fields — name, icon, `prize_type`, `prize_value`, acknowledge
175
+ configuration. The stock-statistics fields are gated by an
176
+ operator template setting, surfaced as
177
+ `expose_game_stat_on_api`:
178
+ - Populated when enabled: `pool` (remaining stock),
179
+ `wins_count` (total wins across all players), `weekdays`
180
+ (ISO 1–7 days the prize can be won), `active_from_ts` /
181
+ `active_till_ts` (prize availability window).
182
+ - Omitted when disabled (the default) — this keeps the live
183
+ prize economy (stock levels, win rates, schedules) hidden
184
+ from players.
185
+ - Exception: `pool` is always populated for `MatchX` / `Quiz`
186
+ templates, whose game flow needs the remaining stock.
187
+ - `pool_initial` is populated regardless of the setting.
188
+ When enabled, the values are also kept current — the server
189
+ refreshes the prize rows on each fetch and drops its template
190
+ caches after every play, so `pool` / `wins_count` are safe to
191
+ drive an "X prizes left" scarcity UI.
192
+
169
193
  **Cache TTL**: the SDK caches the response for 30 seconds. Cache
170
194
  is fully cleared on login / logout.
171
195